/* ── Variables ─────────────────────────────── */
:root {
  --bg:       #f4f1ec;
  --surface:  #ffffff;
  --border:   #e0d9d0;
  --text:     #1a1612;
  --text2:    #6b5f52;
  --text3:    #9c8e82;
  --accent:   #2a5298;
  --accent2:  #1e3d72;
  --danger:   #c0392b;
  --success:  #27745c;
  --yes-bg:   #e8f5e9;
  --yes-col:  #2e7d32;
  --no-bg:    #fce4e4;
  --no-col:   #c0392b;
  --radius:   12px;
  --radius-s: 7px;
  --shadow:   0 2px 16px rgba(0,0,0,.08);
  --shadow-lg:0 8px 40px rgba(0,0,0,.13);
  --font-s:   'Inter', system-ui, sans-serif;
  --font-h:   'Libre Baskerville', Georgia, serif;
  --nav-h:    58px;
  --bar-h:    6px;   /* hauteur barres dispo */
  --bar-r:    3px;
}
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html,body { height:100%; background:var(--bg); color:var(--text); font-family:var(--font-s); font-size:15px; }
.screen { min-height:100vh; }
.hidden { display:none !important; }

/* ── AUTH ──────────────────────────────────── */
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; position:relative; overflow:hidden; background:linear-gradient(135deg,#0f1f45 0%,#1a3a6b 50%,#0d2847 100%); }
.auth-deco { position:absolute; inset:0; pointer-events:none; }
.deco-line { position:absolute; background:rgba(255,255,255,.06); }
.l1{width:1px;height:80%;top:10%;left:20%;transform:rotate(15deg);}
.l2{width:1px;height:60%;top:20%;right:25%;transform:rotate(-8deg);}
.l3{width:60%;height:1px;top:35%;left:5%;transform:rotate(-3deg);}
.deco-circle { position:absolute; border-radius:50%; border:1px solid rgba(255,255,255,.07); }
.c1{width:400px;height:400px;top:-100px;right:-80px;}
.c2{width:250px;height:250px;bottom:-60px;left:30px;}
.auth-card { background:var(--surface); border-radius:20px; padding:40px; width:420px; max-width:100%; box-shadow:var(--shadow-lg); animation:fadeUp .4s ease both; }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:32px; font-family:var(--font-h); font-size:1.3rem; color:var(--text); }
.auth-tabs { display:flex; border-bottom:2px solid var(--border); margin-bottom:28px; }
.atab { flex:1; padding:10px; background:none; border:none; border-bottom:2px solid transparent; margin-bottom:-2px; font-family:var(--font-s); font-size:.9rem; color:var(--text3); cursor:pointer; transition:all .2s; }
.atab.active { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.atab-panel { display:none; }
.atab-panel.active { display:block; }
.field { margin-bottom:18px; }
.field label { display:block; font-size:.78rem; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--text2); margin-bottom:6px; }
.field .hint { font-weight:400; text-transform:none; letter-spacing:0; color:var(--text3); }
.field input[type=text],.field input[type=email],.field input[type=password] { width:100%; padding:10px 14px; border:1.5px solid var(--border); border-radius:var(--radius-s); background:var(--bg); font-family:var(--font-s); font-size:.95rem; color:var(--text); transition:border-color .2s; outline:none; }
.field input:focus { border-color:var(--accent); background:#fff; }
.color-row { display:flex; align-items:center; gap:12px; }
.color-row input[type=color] { width:44px; height:36px; border:1.5px solid var(--border); border-radius:var(--radius-s); cursor:pointer; padding:3px; }
.btn-main { width:100%; padding:12px; background:var(--accent); color:#fff; border:none; border-radius:var(--radius-s); font-family:var(--font-s); font-size:.95rem; font-weight:600; cursor:pointer; transition:background .2s; margin-top:4px; }
.btn-main:hover { background:var(--accent2); }
.btn-accent { padding:10px 18px; background:var(--accent); color:#fff; border:none; border-radius:var(--radius-s); font-family:var(--font-s); font-size:.9rem; font-weight:600; cursor:pointer; transition:background .2s; }
.btn-accent:hover { background:var(--accent2); }
.auth-err { color:var(--danger); font-size:.85rem; margin-top:10px; min-height:18px; }

/* ── NAV ───────────────────────────────────── */
.topnav { height:var(--nav-h); background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 20px; gap:12px; position:sticky; top:0; z-index:100; box-shadow:0 1px 8px rgba(0,0,0,.06); }
.nav-brand { display:flex; align-items:center; gap:10px; font-family:var(--font-h); font-size:1.05rem; color:var(--text); margin-right:8px; white-space:nowrap; }
.nav-links { display:flex; gap:4px; flex:1; }
.navbtn { display:flex; align-items:center; gap:7px; padding:7px 14px; border:none; background:none; border-radius:var(--radius-s); font-family:var(--font-s); font-size:.88rem; color:var(--text2); cursor:pointer; transition:all .15s; }
.navbtn:hover { background:var(--bg); color:var(--text); }
.navbtn.active { background:var(--bg); color:var(--accent); font-weight:600; }
.nav-user { display:flex; align-items:center; gap:8px; margin-left:auto; }
.user-badge { width:9px; height:9px; border-radius:50%; }
#nav-name { font-size:.88rem; font-weight:500; color:var(--text2); }
.btn-logout { padding:5px 12px; background:none; border:1.5px solid var(--border); border-radius:var(--radius-s); font-size:.8rem; color:var(--text3); cursor:pointer; transition:all .15s; }
.btn-logout:hover { border-color:var(--danger); color:var(--danger); }

/* ── PAGES ─────────────────────────────────── */
.page { display:flex; flex-direction:column; padding:20px 24px; gap:16px; min-height:calc(100vh - var(--nav-h)); }
.page-head { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.page-head h1 { font-family:var(--font-h); font-size:1.5rem; font-weight:400; color:var(--text); }
.subhead { color:var(--text3); font-size:.85rem; margin-top:4px; }

/* ── CALENDRIER ────────────────────────────── */
.cal-nav { display:flex; gap:8px; align-items:center; }
.btn-icon { width:34px; height:34px; border-radius:50%; border:1.5px solid var(--border); background:var(--surface); font-size:1.3rem; color:var(--text2); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .15s; line-height:1; }
.btn-icon:hover { border-color:var(--accent); color:var(--accent); }
.legend { display:flex; flex-wrap:wrap; gap:10px; }
.legend-item { display:flex; align-items:center; gap:6px; font-size:.82rem; color:var(--text2); }
.legend-dot { width:9px; height:9px; border-radius:50%; }

.cal-grid { flex:1; display:flex; flex-direction:column; }
.dow-row { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; margin-bottom:3px; }
.dow-row div { text-align:center; font-size:.72rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--text3); padding:3px 0; }

/* viewport pour l'animation slide */
.cal-viewport { flex:1; overflow:hidden; position:relative; }
.cal-days { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.cal-days.slide-left  { animation: slideLeft  .28s cubic-bezier(.4,0,.2,1) both; }
.cal-days.slide-right { animation: slideRight .28s cubic-bezier(.4,0,.2,1) both; }
@keyframes slideLeft  { from{opacity:0;transform:translateX(48px)}  to{opacity:1;transform:none} }
@keyframes slideRight { from{opacity:0;transform:translateX(-48px)} to{opacity:1;transform:none} }

/* Cellule jour */
.cal-day { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-s); min-height:80px; padding:6px 6px 4px; cursor:pointer; transition:border-color .15s,box-shadow .15s; display:flex; flex-direction:column; position:relative; overflow:visible; }
.cal-day:hover { border-color:var(--accent); box-shadow:0 2px 10px rgba(42,82,152,.1); }
.cal-day.other  { opacity:.3; pointer-events:none; }
.cal-day.today  { border-color:var(--accent); border-width:2px; }
.cal-day.drag-over { border-color:var(--accent); background:#eef3fb; }
.day-n { font-size:.78rem; font-weight:700; color:var(--text2); line-height:1; margin-bottom:auto; }
.cal-day.today .day-n { color:var(--accent); }

/* Barres de disponibilité */
.avail-bars { display:flex; flex-direction:column; gap:2px; margin-top:4px; }
.abar {
  height:var(--bar-h);
  border-radius:var(--bar-r);
  position:relative;
  /* extensions latérales pour relier les jours consécutifs */
  margin-left:0; margin-right:0;
}
/* Prolongement vers la droite (jour suivant dispo) */
.abar.cont-right {
  border-top-right-radius:0;
  border-bottom-right-radius:0;
  margin-right:-9px;   /* dépasse jusqu'au gap + bord suivant */
}
/* Prolongement depuis la gauche (jour précédent dispo) */
.abar.cont-left {
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  margin-left:-9px;
}

/* ── MODAL ─────────────────────────────────── */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(3px); }
.modal-box { background:var(--surface); border-radius:18px; width:460px; max-width:calc(100vw - 24px); max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-lg); animation:fadeUp .22s ease both; }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:22px 24px 16px; border-bottom:1px solid var(--border); }
.modal-head h2 { font-family:var(--font-h); font-size:1.15rem; font-weight:400; }
.modal-close { width:30px; height:30px; border:none; background:var(--bg); border-radius:50%; cursor:pointer; font-size:.9rem; color:var(--text3); transition:all .15s; }
.modal-close:hover { background:var(--border); color:var(--text); }
.modal-body { padding:20px 24px; display:flex; flex-direction:column; gap:22px; }
.modal-body section h3 { font-size:.72rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--text3); margin-bottom:12px; }

/* Boutons dispo oui/non */
.dispo-btns { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:14px; }
.dispo-btn { padding:12px; border:1.5px solid var(--border); border-radius:10px; background:var(--bg); font-family:var(--font-s); font-size:.95rem; cursor:pointer; transition:all .15s; font-weight:500; }
.dispo-btn.yes:hover,.dispo-btn.yes.on { border-color:var(--yes-col); background:var(--yes-bg); color:var(--yes-col); font-weight:700; }
.dispo-btn.no:hover,.dispo-btn.no.on  { border-color:var(--no-col);  background:var(--no-bg);  color:var(--no-col);  font-weight:700; }
.modal-multi-hint { font-size:.82rem; color:var(--text3); margin-bottom:8px; font-style:italic; }

.note-input { width:100%; padding:9px 12px; border:1.5px solid var(--border); border-radius:var(--radius-s); background:var(--bg); font-family:var(--font-s); font-size:.88rem; color:var(--text); outline:none; margin-bottom:12px; }
.note-input:focus { border-color:var(--accent); background:#fff; }

.fam-item { display:flex; align-items:center; gap:9px; padding:8px 12px; background:var(--bg); border-radius:8px; margin-bottom:5px; font-size:.88rem; }
.fam-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.fam-name { font-weight:600; }
.fam-status-yes { color:var(--yes-col); font-size:.8rem; }
.fam-status-no  { color:var(--no-col);  font-size:.8rem; }
.fam-note { color:var(--text3); font-size:.78rem; margin-left:auto; }

/* ── VOTES ─────────────────────────────────── */
.votes-list { display:flex; flex-direction:column; gap:16px; }
.vote-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); }
.vote-card-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:6px; }
.vote-card-head h3 { font-family:var(--font-h); font-size:1.1rem; font-weight:400; }
.vote-card-desc { color:var(--text3); font-size:.85rem; margin-bottom:18px; }
.vote-creator { font-size:.78rem; color:var(--text3); }
.vote-closed-badge { font-size:.75rem; background:#eee; color:var(--text3); padding:3px 9px; border-radius:20px; font-weight:600; }
.vote-dates { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }
.vote-date-row { display:flex; align-items:center; gap:10px; padding:10px 14px; background:var(--bg); border-radius:8px; }
.vote-date-label { font-weight:600; font-size:.9rem; flex:1; }
.vote-bar-wrap { flex:2; height:8px; background:var(--border); border-radius:4px; overflow:hidden; }
.vote-bar-fill { height:100%; border-radius:4px; background:var(--accent); transition:width .4s ease; }
.vote-count { font-size:.8rem; color:var(--text3); white-space:nowrap; min-width:60px; text-align:right; }
.vote-btns { display:flex; gap:8px; flex-wrap:wrap; }
.vote-opt-btn { padding:6px 14px; border:1.5px solid var(--border); border-radius:20px; background:var(--bg); font-family:var(--font-s); font-size:.82rem; cursor:pointer; transition:all .15s; }
.vote-opt-btn:hover { border-color:var(--accent); color:var(--accent); }
.vote-opt-btn.voted { border-color:var(--accent); background:var(--accent); color:#fff; font-weight:600; }
.vote-actions { display:flex; gap:8px; margin-top:14px; border-top:1px solid var(--border); padding-top:14px; }
.btn-sm-danger { padding:5px 12px; border:1.5px solid var(--border); border-radius:var(--radius-s); background:none; font-size:.8rem; color:var(--text3); cursor:pointer; transition:all .15s; }
.btn-sm-danger:hover { border-color:var(--danger); color:var(--danger); }
.votes-empty { color:var(--text3); font-size:.95rem; padding:40px 0; text-align:center; }

/* Vote modal dates */
.vote-date-entry { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.vote-date-entry input[type=date] { flex:1; padding:8px 10px; border:1.5px solid var(--border); border-radius:var(--radius-s); font-family:var(--font-s); font-size:.9rem; background:var(--bg); outline:none; }
.vote-date-entry input:focus { border-color:var(--accent); }
.btn-remove-date { width:26px; height:26px; border:none; background:var(--border); border-radius:50%; cursor:pointer; font-size:.9rem; color:var(--text3); transition:all .15s; display:flex; align-items:center; justify-content:center; }
.btn-remove-date:hover { background:var(--no-bg); color:var(--no-col); }

/* ── TABLEAU ────────────────────────────────── */
.sheet-actions { display:flex; gap:6px; flex-wrap:wrap; }
.btn-sm { padding:6px 13px; border:1.5px solid var(--border); background:var(--surface); border-radius:var(--radius-s); font-size:.82rem; color:var(--text2); cursor:pointer; transition:all .15s; }
.btn-sm:hover { border-color:var(--text2); }
.btn-sm.danger:hover { border-color:var(--danger); color:var(--danger); }
.sheet-tabs { display:flex; gap:3px; border-bottom:2px solid var(--border); }
.stab { padding:7px 18px; border:1.5px solid transparent; border-bottom:none; border-radius:7px 7px 0 0; background:none; font-size:.85rem; color:var(--text3); cursor:pointer; transition:all .15s; position:relative; bottom:-2px; }
.stab:hover { color:var(--text); }
.stab.active { background:var(--surface); border-color:var(--border); color:var(--accent); font-weight:600; }
.sheet-wrap { flex:1; overflow:hidden; border:1px solid var(--border); border-top:none; border-radius:0 0 var(--radius) var(--radius); background:var(--surface); }
.sheet-scroll { width:100%; height:100%; overflow:auto; }
#sheet-table { border-collapse:collapse; min-width:100%; }
#sheet-table th { background:var(--bg); color:var(--text2); font-weight:600; padding:5px 8px; border:1px solid var(--border); text-align:center; position:sticky; top:0; z-index:2; font-size:.75rem; min-width:30px; user-select:none; }
#sheet-table th.rh { position:sticky; left:0; z-index:3; min-width:36px; }
#sheet-table td { border:1px solid var(--border); padding:0; }
#sheet-table td.rn { background:var(--bg); color:var(--text3); text-align:center; font-size:.75rem; padding:4px 6px; position:sticky; left:0; z-index:1; width:36px; min-width:36px; user-select:none; }
.ci { width:100%; padding:4px 8px; border:none; outline:none; font-family:var(--font-s); font-size:.85rem; color:var(--text); background:transparent; min-height:28px; min-width:100px; }
.ci:focus { background:#f0f5ff; box-shadow:inset 0 0 0 2px var(--accent); }
.autosave-bar { height:22px; font-size:.78rem; color:var(--success); display:flex; align-items:center; padding:0 4px; }

/* ── TOAST ─────────────────────────────────── */
#toast { position:fixed; bottom:24px; right:24px; z-index:999; background:var(--text); color:#fff; padding:10px 18px; border-radius:9px; font-size:.88rem; opacity:0; transition:opacity .3s; pointer-events:none; box-shadow:var(--shadow); }
#toast.show { opacity:1; }
#toast.ok  { background:var(--success); }
#toast.err { background:var(--danger); }

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }

/* ── Responsive ────────────────────────────── */
@media (max-width:600px) {
  .nav-brand span { display:none; }
  .navbtn span { display:none; }
  .page { padding:12px; gap:12px; }
  .cal-day { min-height:56px; padding:4px; }
  .auth-card { padding:28px 20px; }
}

/* ── Ajouts v6 ─────────────────────────────── */

/* Pass wrap */
.pass-wrap { position:relative; display:flex; }
.pass-wrap input { flex:1; padding-right:40px !important; }
.eye-btn { position:absolute; right:10px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer; font-size:1rem; color:var(--text3); padding:0; line-height:1; }

/* Auth ok */
.auth-ok { color:var(--success); font-size:.85rem; margin-top:10px; }

/* Checkbox label */
.checkbox-label { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:.9rem; color:var(--text2); }
.checkbox-label input[type=checkbox] { width:16px; height:16px; cursor:pointer; accent-color:var(--accent); }

/* Nav icon buttons */
.btn-icon-sm { width:30px; height:30px; border:1.5px solid var(--border); border-radius:50%; background:none; cursor:pointer; font-size:.9rem; transition:all .15s; display:flex; align-items:center; justify-content:center; }
.btn-icon-sm:hover { border-color:var(--accent); background:var(--bg); }

/* Events on calendar */
.cal-events { display:flex; flex-direction:column; gap:2px; margin-top:2px; }
.cev { height:5px; border-radius:3px; cursor:pointer; transition:opacity .15s; }
.cev:hover { opacity:.75; }
.cev-label { font-size:.62rem; color:#fff; padding:1px 4px; border-radius:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; cursor:pointer; }

/* Admin table */
.admin-table { width:100%; border-collapse:collapse; font-size:.88rem; }
.admin-table th { text-align:left; padding:8px 12px; background:var(--bg); border-bottom:2px solid var(--border); font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text3); }
.admin-table td { padding:10px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.admin-table tr:last-child td { border-bottom:none; }
.admin-badge { display:inline-block; font-size:.7rem; background:var(--accent); color:#fff; padding:2px 8px; border-radius:20px; font-weight:600; }
.admin-color-dot { width:14px; height:14px; border-radius:50%; display:inline-block; vertical-align:middle; }
.admin-actions { display:flex; gap:6px; }
.btn-admin-act { padding:4px 10px; border:1.5px solid var(--border); border-radius:var(--radius-s); background:none; font-size:.78rem; cursor:pointer; transition:all .15s; color:var(--text2); }
.btn-admin-act:hover { border-color:var(--accent); color:var(--accent); }
.btn-admin-act.danger:hover { border-color:var(--danger); color:var(--danger); }

/* ── Page d'accueil ────────────────────────── */
.home-wrap { max-width:800px; margin:0 auto; padding:20px 0; }
.home-header { text-align:center; margin-bottom:40px; }
.home-logo { margin-bottom:16px; }
.home-header h1 { font-family:var(--font-h); font-size:2rem; color:var(--text); margin-bottom:8px; }
.home-header h1 span { color:var(--accent); }
.home-header p { color:var(--text3); font-size:1rem; }
.home-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:32px; }
@media(max-width:600px) { .home-cards { grid-template-columns:1fr; } }
.home-card {
  background:var(--surface); border:1.5px solid var(--border); border-radius:var(--radius);
  padding:28px 20px; text-align:center; cursor:pointer; transition:all .2s;
  display:flex; flex-direction:column; align-items:center; gap:10px;
}
.home-card:hover { border-color:var(--accent); transform:translateY(-3px); box-shadow:0 8px 24px rgba(42,82,152,.12); }
.home-card-icon { font-size:2.2rem; }
.home-card-title { font-family:var(--font-h); font-size:1.05rem; color:var(--text); font-weight:700; }
.home-card-desc { font-size:.82rem; color:var(--text3); line-height:1.5; }
.home-summary { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px 24px; }
.home-summary h3 { font-size:.75rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--text3); margin-bottom:14px; }
.home-avail-item { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--border); font-size:.88rem; }
.home-avail-item:last-child { border-bottom:none; }

/* ── Bandeaux événements multi-jours ───────── */
.cal-days { position: relative; }

.ev-banner {
  position: absolute;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 0 5px;
  font-size: .68rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .92;
  transition: opacity .15s, filter .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.ev-banner:hover { opacity: 1; filter: brightness(1.08); }

/* Détail du jour dans la modale */
.day-detail-event {
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dde-title { font-weight: 600; font-size: .9rem; color: var(--text); }
.dde-sub   { font-size: .75rem; color: var(--text3); }
.dde-del   {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 10px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: none;
  font-size: .75rem;
  color: var(--text3);
  cursor: pointer;
  transition: all .15s;
}
.dde-del:hover { border-color: var(--danger); color: var(--danger); }

/* ── Détail événement — actions modifier/supprimer ── */
.dde-actions { display:flex; gap:6px; margin-top:6px; }
.dde-edit {
  padding:3px 10px; border:1.5px solid var(--border); border-radius:6px;
  background:none; font-size:.75rem; color:var(--accent); cursor:pointer; transition:all .15s;
}
.dde-edit:hover { border-color:var(--accent); background:#eef3fb; }
.dde-note { font-size:.8rem; color:var(--text3); font-style:italic; }

/* ── Intendance W-E ────────────────────────── */
.intend-tabs-wrap { display:flex; align-items:flex-end; gap:0; border-bottom:2px solid var(--border); }
.intend-tabs-wrap .sheet-tabs { flex:1; border-bottom:none; }
.intend-recap-tab {
  padding:7px 16px; border:1.5px solid var(--border); border-bottom:none;
  border-radius:8px 8px 0 0; background:none; font-size:.85rem;
  color:var(--text3); cursor:pointer; transition:all .15s;
  position:relative; bottom:-2px; white-space:nowrap;
}
.intend-recap-tab.active { background:var(--surface); border-color:var(--accent); color:var(--accent); font-weight:600; }

.intend-toolbar {
  display:flex; gap:6px; align-items:center; flex-wrap:wrap;
  padding:8px 0;
}
.toolbar-status { font-size:.8rem; color:var(--success); font-weight:600; }

/* Barre mise en forme */
.fmt-bar {
  display:flex; align-items:center; gap:4px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:8px; padding:4px 8px; margin-left:auto;
}
.fmt-btn {
  width:28px; height:26px; border:1.5px solid var(--border);
  border-radius:5px; background:none; cursor:pointer;
  font-size:.85rem; transition:all .15s; display:flex; align-items:center; justify-content:center;
}
.fmt-btn:hover { border-color:var(--accent); background:#eef3fb; }
.fmt-btn.active { border-color:var(--accent); background:#eef3fb; color:var(--accent); }
.fmt-btn.fmt-clear:hover { border-color:var(--danger); color:var(--danger); }
.fmt-sep { width:1px; height:20px; background:var(--border); margin:0 2px; }
.fmt-color-label { display:flex; align-items:center; gap:4px; cursor:pointer; font-size:.9rem; }
.fmt-color-label input[type=color] { width:24px; height:24px; border:none; border-radius:4px; padding:1px; cursor:pointer; }

/* Table intendance */
.intend-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
.intend-table { width:100%; border-collapse:collapse; min-width:500px; }
.intend-table thead th {
  background:var(--bg); padding:8px 10px; text-align:left;
  font-size:.75rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.05em; color:var(--text3); border-bottom:2px solid var(--border);
  white-space:nowrap; user-select:none;
}
.intend-table tbody tr { border-bottom:1px solid var(--border); transition:background .1s; }
.intend-table tbody tr:last-child { border-bottom:none; }
.intend-table tbody tr:hover { background:#faf8f6; }
.intend-table tbody tr.done-row { opacity:.55; }

.intend-table td { padding:2px 4px; vertical-align:middle; }
.intend-table td.td-num { color:var(--text3); font-size:.75rem; text-align:center; width:36px; }
.intend-table td.td-status { text-align:center; width:90px; }
.intend-table td.td-del { text-align:center; width:36px; }

/* Inputs dans la table */
.intend-cell {
  width:100%; padding:5px 8px; border:none; outline:none;
  font-family:var(--font-s); font-size:.88rem; color:var(--text);
  background:transparent; border-radius:4px; min-height:32px;
}
.intend-cell:focus { background:#f0f5ff; box-shadow:inset 0 0 0 2px var(--accent); }
.intend-cell.selected { background:#f0f5ff; box-shadow:inset 0 0 0 2px var(--accent); }

/* Select utilisateur */
.who-select {
  width:100%; padding:5px 8px; border:none; outline:none;
  font-family:var(--font-s); font-size:.88rem; color:var(--text);
  background:transparent; cursor:pointer; border-radius:4px;
}
.who-select:focus { background:#f0f5ff; box-shadow:inset 0 0 0 2px var(--accent); }

/* Checkbox statut */
.done-check { width:18px; height:18px; cursor:pointer; accent-color:var(--success); }

/* Bouton supprimer ligne */
.btn-del-row-intend {
  width:24px; height:24px; border:none; background:none;
  color:var(--text3); cursor:pointer; border-radius:4px;
  font-size:.9rem; transition:all .15s; display:flex; align-items:center; justify-content:center;
}
.btn-del-row-intend:hover { background:var(--no-bg); color:var(--danger); }

/* Bouton ajouter ligne entre deux */
.btn-insert-row {
  display:none; position:absolute; left:50%; transform:translateX(-50%);
  z-index:10; background:var(--accent); color:#fff; border:none;
  border-radius:50%; width:20px; height:20px; font-size:.9rem;
  cursor:pointer; align-items:center; justify-content:center;
  box-shadow:0 2px 6px rgba(0,0,0,.2); transition:transform .15s;
}
tr:hover .btn-insert-row, .btn-insert-row:hover { display:flex; }

/* Bouton ajouter en bas */
.intend-add-bottom {
  display:flex; align-items:center; gap:6px;
  margin:8px 0; padding:8px 16px;
  border:1.5px dashed var(--border); border-radius:var(--radius-s);
  background:none; color:var(--text3); cursor:pointer;
  font-family:var(--font-s); font-size:.88rem; transition:all .15s; width:100%;
}
.intend-add-bottom:hover { border-color:var(--accent); color:var(--accent); background:#f0f5ff; }

/* Récap */
.recap-header { margin-bottom:16px; }
.recap-header h3 { font-family:var(--font-h); font-size:1.2rem; }
.recap-list-title { font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text3); margin:16px 0 8px; }
.recap-item {
  display:flex; align-items:center; gap:10px; padding:10px 14px;
  background:var(--surface); border:1px solid var(--border); border-radius:8px; margin-bottom:6px;
}
.recap-item.done { opacity:.5; text-decoration:line-through; }
.recap-what { font-weight:600; flex:1; }
.recap-comment { color:var(--text3); font-size:.85rem; }
