/* =========================================================
   Liste d'invités — webapp pleine largeur, codes Airbnb
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-2: #f7f7f7;
  --bg-3: #ebebeb;
  --text: #222222;
  --text-2: #6a6a6a;
  --text-3: #b0b0b0;
  --border: #dddddd;
  --border-2: #ebebeb;
  --primary: #ff385c;
  --primary-dark: #d70466;
  --primary-grad: linear-gradient(to right, #e61e4d 0%, #e31c5f 50%, #d70466 100%);
  --primary-soft: #fff0f3;
  --oui: #008a05;
  --oui-soft: #e9f6ea;
  --non: #c13515;
  --non-soft: #fdeeea;
  --attente: #b07a00;
  --attente-soft: #fff5d9;
  --ferdy: #3d6b8c;
  --ferdy-soft: #e8f0f6;
  --ines: #8c3d7a;
  --ines-soft: #f6e8f3;
  --shadow: 0 6px 16px rgba(0, 0, 0, .12);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, .08), 0 0 0 1px var(--border-2);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .28);
  --r: 12px;
  --r-lg: 16px;
  --pill: 999px;
  --font: "Figtree", "Circular", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 22px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.muted { color: var(--text-2); font-weight: 400; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--border-2); }
.header-inner { max-width: 1760px; margin: 0 auto; padding: 0 80px; height: 80px; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 24px; }
.icon-btn.burger { display: none; width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 5px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.topnav { display: flex; gap: 4px; }
.topnav a { height: 40px; padding: 0 14px; border-radius: var(--pill); display: inline-flex; align-items: center; font-weight: 600; font-size: 14px; color: var(--text-2); }
.topnav a:hover { background: var(--bg-2); color: var(--text); }
.topnav a.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); border-radius: 0; }
.search { justify-self: center; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); justify-self: start; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--primary); white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 6px; justify-self: end; }

.search { position: relative; width: 420px; max-width: 100%; }
.search-ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text); pointer-events: none; }
.search-input {
  width: 100%; height: 48px; padding: 0 44px 0 44px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--bg); font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); transition: box-shadow .2s var(--ease);
}
.search-input::placeholder { color: var(--text-2); font-weight: 600; }
.search-input:hover { box-shadow: var(--shadow); }
.search-input:focus { outline: 0; box-shadow: var(--shadow); border-color: var(--text); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg-3); color: var(--text); font-size: 18px; line-height: 1; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px;
  border-radius: var(--pill); border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap;
  background: var(--bg); color: var(--text); transition: transform .1s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--primary-grad); color: #fff; }
.btn-primary:hover { filter: brightness(.95); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { border-color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--bg-2); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-white { background: var(--bg); border-color: var(--text); box-shadow: var(--shadow-sm); }
.btn-white:hover { background: var(--bg-2); }
.btn-danger { color: var(--non); }
.btn-danger:hover { background: var(--non-soft); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; color: var(--text); }
.icon-btn:hover { background: var(--bg-2); }

.fab {
  display: none; position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 58px; height: 58px; border-radius: 50%;
  border: 0; background: var(--primary-grad); color: #fff; font-size: 30px; line-height: 1; box-shadow: var(--shadow-lg);
}

/* ---------- Menu ajouter ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; min-width: 250px;
  background: var(--bg); border-radius: var(--r); padding: 8px 0; box-shadow: var(--shadow-lg);
  transform-origin: top right; animation: pop .16s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-2px); } }
.menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; }
.menu button:hover { background: var(--bg-2); }
.menu button b { font-weight: 600; font-size: 14px; }
.menu button span { font-size: 13px; color: var(--text-2); }

/* ---------- Page ---------- */
.page { max-width: 1760px; margin: 0 auto; padding: 24px 80px 120px; }
.section { margin-top: 48px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.section-sub { font-size: 14px; color: var(--text-2); font-weight: 500; }

/* ---------- Hero plein écran ---------- */
.hero { position: relative; height: calc(100vh - 80px); height: calc(100dvh - 80px); min-height: 600px; background: #1f1f1f; isolation: isolate; display: flex; overflow: hidden; }
.hero-media { position: absolute; inset: 0; background: linear-gradient(135deg, #f4c6cf 0%, #e8a2b4 40%, #b86b8d 100%); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media .initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22vw; font-weight: 800; color: rgba(255, 255, 255, .28); letter-spacing: -.05em; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0, 0, 0, .66) 0%, rgba(0, 0, 0, .38) 45%, rgba(0, 0, 0, .22) 100%), linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 55%); }
.hero-grid { position: relative; z-index: 1; width: 100%; height: 100%; max-width: 1760px; margin: 0 auto; padding: 40px 80px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 520px; grid-template-rows: minmax(0, 1fr); gap: 48px; align-items: end; }
.hero-left { color: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.hero-eyebrow { margin: 0; font-size: 16px; font-weight: 600; opacity: .92; }
.hero-title { font-size: clamp(44px, 6vw, 84px); font-weight: 800; line-height: .98; letter-spacing: -.035em; }
.hero-when { margin: 4px 0 0; font-size: 18px; font-weight: 500; opacity: .95; }
.hero-when b { font-weight: 700; }
.countdown { display: flex; align-items: flex-end; gap: 0; margin-top: 22px; flex-wrap: nowrap; }
.cd { position: relative; padding: 0 20px 0 0; margin-right: 18px; text-align: left; white-space: nowrap; }
.cd + .cd::before { content: ""; position: absolute; left: -18px; top: 12px; bottom: 26px; width: 1px; background: rgba(255, 255, 255, .35); }
.cd b { display: block; font-size: clamp(44px, 4.6vw, 84px); font-weight: 800; line-height: .95; font-variant-numeric: tabular-nums; letter-spacing: -.045em; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.cd span { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; opacity: .85; }
.cd-msg { font-size: 44px; font-weight: 800; }
.hero-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; align-self: stretch; min-height: 0; height: 100%; }

/* KPI compacts */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; max-width: 720px; }
.kpi { background: rgba(20, 20, 20, .36); backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; border-radius: 14px; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi .lbl { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .8); display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.kpi .lbl .muted { color: rgba(255, 255, 255, .65); }
.kpi .lbl .tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--pill); }
.tag-ok { background: var(--oui-soft); color: var(--oui); }
.tag-warn { background: var(--non-soft); color: var(--non); }
.kpi .big { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .big small { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .7); letter-spacing: 0; margin-left: 6px; }
.kpi .sub { font-size: 12px; color: rgba(255, 255, 255, .75); line-height: 1.35; text-wrap: pretty; }
.kpi .sub b { font-weight: 700; color: #fff; }
.stack { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .25); }
.stack > i { display: block; height: 100%; transition: width .3s var(--ease); }
.s-oui { background: #4cd964; } .s-attente { background: #f2c94c; } .s-non { background: #ff6b5b; }
.seats { display: grid; grid-template-columns: repeat(25, 1fr); gap: 2px; }
.seat { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.seat-maries { background: var(--primary); } .seat-presta { background: rgba(255, 255, 255, .6); } .seat-inv { background: #fff; }

/* Panneau todo compact */
.panel { background: rgba(20, 20, 20, .36); backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; border-radius: 14px; padding: 10px 14px 10px; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.ptabs { display: inline-flex; background: rgba(255, 255, 255, .14); border-radius: var(--pill); padding: 3px; gap: 3px; }
.ptabs button { height: 30px; padding: 0 12px; border: 0; border-radius: var(--pill); background: transparent; color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.ptabs button .cnt { font-size: 11px; font-weight: 700; opacity: .8; }
.ptabs button.on { background: #fff; color: var(--text); }
.ptabs button.on .cnt { color: var(--text-2); }
.panel-sub { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .75); flex: 1; }
.panel-sub .late { color: #ffb4a8; }
.panel-link { border: 0; background: none; color: #fff; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; cursor: pointer; opacity: .9; }
.panel-link:hover { opacity: 1; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
.todo-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); background: transparent; }
.todo-item:last-child { border-bottom: 0; }
.todo-item.dragging { opacity: .35; }
.todo-item.drop-before { box-shadow: 0 -2px 0 0 var(--primary); }
.todo-item.drop-after { box-shadow: 0 2px 0 0 var(--primary); }
.tgrip { margin-top: 3px; color: rgba(255, 255, 255, .6); cursor: grab; font-size: 14px; letter-spacing: -5px; padding-right: 4px; user-select: none; -webkit-user-select: none; line-height: 1; flex: none; opacity: 0; transition: opacity .12s var(--ease); }
.todo-item:hover .tgrip { opacity: 1; }
.todo-item:hover { background: rgba(255, 255, 255, .06); }
.tgrip:active { cursor: grabbing; }
.todo-check {
  flex: none; width: 20px; height: 20px; margin-top: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; font-weight: 900;
  transition: background-color .12s var(--ease), border-color .12s var(--ease), transform .1s var(--ease);
}
.todo-check:hover { border-color: #fff; background: rgba(255, 255, 255, .2); }
.todo-check:active { transform: scale(.9); }
.todo-item.done .todo-check { background: #fff; border-color: #fff; color: var(--text); }
.todo-text { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: #fff; line-height: 1.35; cursor: text; text-wrap: pretty; overflow-wrap: anywhere; }
.todo-item.done .todo-text { color: rgba(255, 255, 255, .6); text-decoration: line-through; font-weight: 400; }
.who { flex: none; height: 20px; padding: 0 6px; border-radius: 6px; border: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; background: rgba(255, 255, 255, .22); color: #fff; cursor: pointer; }
.who[data-qui="Ferdy"] { background: var(--ferdy-soft); color: var(--ferdy); }
.who[data-qui="Inès"] { background: var(--ines-soft); color: var(--ines); }
.who:hover { filter: brightness(.95); }
.todo-due { flex: none; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--pill); background: rgba(255, 255, 255, .22); color: #fff; white-space: nowrap; border: 0; cursor: pointer; }
.todo-due.soon { background: var(--attente-soft); color: var(--attente); }
.todo-due.today { background: var(--primary-soft); color: var(--primary-dark); }
.todo-due.late { background: var(--non-soft); color: var(--non); }
.todo-due.add { opacity: .55; border: 1px dashed rgba(255, 255, 255, .5); background: transparent; }
.todo-item:hover .todo-due.add { opacity: 1; }
.todo-date-edit { height: 30px; width: 150px; font-size: 12px; padding: 0 8px; }
.todo-tools { display: flex; gap: 0; flex: none; opacity: 0; transition: opacity .12s var(--ease); }
.todo-item:hover .todo-tools, .todo-item:focus-within .todo-tools { opacity: 1; }
.todo-tools button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1; }
.todo-tools button:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.todo-tools button.del:hover { background: var(--non-soft); color: var(--non); }
.todo-add { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .14); align-items: center; }
.todo-add .input, .todo-add .select { height: 36px; font-size: 13px; padding: 0 10px; background: rgba(255, 255, 255, .92); border-color: transparent; color: var(--text); }
.todo-add .select { width: auto; padding-right: 28px; }
.todo-add .todo-date { width: 138px; color: var(--text-2); }
.todo-done summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .8); padding: 6px 2px 2px; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 3px; }
.todo-done summary::-webkit-details-marker { display: none; }
.todo-done .todo-list { max-height: 160px; }
.todo-empty { padding: 8px 0; color: rgba(255, 255, 255, .75); font-size: 13px; }
.todo-edit { flex: 1; height: 30px; font-size: 13px; padding: 0 8px; background: rgba(255, 255, 255, .95); color: var(--text); border-color: transparent; }
.todo-date-edit { background: rgba(255, 255, 255, .95); color: var(--text); border-color: transparent; }
/* ---------- Catégories (onglets) et filtres (pilules) ---------- */
.cats-wrap { position: sticky; top: 80px; z-index: 20; background: var(--bg); display: flex; align-items: center; gap: 16px; padding: 6px 0 0; border-bottom: 1px solid var(--border-2); margin-bottom: 20px; }
.cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px 12px; border: 0; background: none;
  color: var(--text-2); font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; transition: color .15s var(--ease), border-color .15s var(--ease); white-space: nowrap;
}
.cat svg { width: 24px; height: 24px; opacity: .7; }
.cat:hover { color: var(--text); border-bottom-color: var(--border); }
.cat.on { color: var(--text); border-bottom-color: var(--text); }
.cat.on svg { opacity: 1; }
.cat .cnt { font-weight: 500; color: var(--text-3); margin-left: 4px; }
.pills { display: flex; gap: 8px; flex: none; padding-bottom: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  height: 40px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.pill:hover { border-color: var(--text); }
.pill.on { border-color: var(--text); background: var(--bg-2); box-shadow: 0 0 0 1px var(--text) inset; }
.pill .cnt { font-size: 12px; font-weight: 500; color: var(--text-2); }
.pill-reset { border-style: dashed; color: var(--text-2); }

.filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: -6px 0 18px; padding: 14px 20px; border-radius: var(--r); background: var(--bg-2); font-size: 14px; color: var(--text-2); }
.filter-summary .fs-item { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.filter-summary .fs-item b { font-size: 20px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.filter-summary .oui b { color: var(--oui); } .filter-summary .attente b { color: var(--attente); } .filter-summary .non b { color: var(--non); }
.filter-summary .fs-sub { color: var(--text-2); font-size: 13px; }

/* ---------- Grille des foyers ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.group-title { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 10px; font-size: 18px; font-weight: 700; }
.group-title:first-child { margin-top: 0; }
.group-title .n { font-size: 14px; font-weight: 500; color: var(--text-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }

.foyer { border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.foyer:hover { box-shadow: var(--shadow); }
.foyer-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 12px 10px 18px; }
.foyer-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.foyer-name .n { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.foyer-name .n .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.tag-ferdy { background: var(--ferdy-soft); color: var(--ferdy); }
.tag-ines { background: var(--ines-soft); color: var(--ines); }
.contact { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.membre { display: flex; flex-direction: column; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border-2); }
.m-name { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.m-name .p { font-size: 16px; font-weight: 600; }
.m-name .dim { font-weight: 400; color: var(--text-2); }
.m-name .meta { font-size: 13px; color: var(--text-2); }
.m-name .regime { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--bg-2); padding: 2px 8px; border-radius: 6px; }
.m-name .flag { font-size: 12px; font-weight: 600; color: var(--attente); cursor: help; }
.m-controls { display: flex; align-items: center; gap: 8px; }
.foyer.solo .foyer-head { padding-bottom: 6px; }
.foyer.solo .membre { border-top: 0; padding-top: 4px; }
.foyer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px 14px; border-top: 1px solid var(--border-2); margin-top: auto; }

/* poignées */
.grip { color: var(--text-3); cursor: grab; font-size: 15px; letter-spacing: -5px; padding-right: 6px; user-select: none; -webkit-user-select: none; line-height: 1; flex: none; opacity: 0; transition: opacity .15s var(--ease), color .15s var(--ease); }
.foyer:hover .grip { opacity: 1; }
.grip:hover { color: var(--text); }
.grip:active { cursor: grabbing; }
.dnd-hint { margin: 20px 4px 0; font-size: 13px; color: var(--text-2); text-wrap: pretty; }
.dnd-hint .grip { opacity: 1; cursor: default; padding: 0 2px; }

/* réponse : segment */
.seg { display: inline-flex; flex: 1; background: var(--bg-2); border-radius: var(--pill); padding: 4px; gap: 4px; }
.seg button {
  flex: 1; height: 36px; min-width: 52px; padding: 0 12px; border: 0; border-radius: var(--pill); background: transparent; color: var(--text-2);
  font-size: 14px; font-weight: 600; transition: background-color .12s var(--ease), color .12s var(--ease), transform .1s var(--ease);
}
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, .8); }
.seg button:active { transform: scale(.96); }
.seg button.on { color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); font-weight: 700; }
.seg button.on[data-v="Oui"] { background: var(--oui); }
.seg button.on[data-v="Non"] { background: var(--non); }
.seg button.on[data-v="En attente"] { background: var(--text); }

/* bascules */
.toggle {
  height: 44px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  transition: background-color .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease), transform .1s var(--ease);
}
.toggle::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }
.toggle:hover { border-color: var(--text); }
.toggle:active { transform: scale(.97); }
.toggle.on { background: var(--text); border-color: var(--text); color: #fff; }
.toggle.on::before { content: "✓"; background: #fff; border-color: #fff; color: var(--text); }
.toggle-mairie.on { background: var(--primary); border-color: var(--primary); }
.toggle-mairie.on::before { color: var(--primary); }
.toggle-mairie.on.excl { background: var(--text-3); border-color: var(--text-3); }
.toggle-mairie.on.excl::before { color: var(--text-3); }
.toggle-prevenu.on { background: var(--oui); border-color: var(--oui); }
.toggle-prevenu.on::before { color: var(--oui); }

.empty { padding: 64px 20px; text-align: center; color: var(--text-2); border: 1px solid var(--border); border-radius: var(--r); }
.empty b { display: block; color: var(--text); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.error-box { padding: 18px; border-radius: var(--r); background: var(--non-soft); color: var(--non); font-size: 14px; white-space: pre-wrap; }

/* ---------- Glisser-déposer ---------- */
.membre.dragging, .foyer-head.dragging { opacity: .35; }
.foyer.drop-over { box-shadow: 0 0 0 3px var(--primary), var(--shadow); background: var(--primary-soft); }
.dropzone {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 45;
  padding: 16px 28px; border: 2px dashed var(--text-2); border-radius: var(--pill); background: var(--bg);
  color: var(--text); font-weight: 700; font-size: 15px; box-shadow: var(--shadow-lg);
  animation: rise .2s var(--ease); max-width: calc(100vw - 32px); text-align: center;
}
.dropzone.over { border-color: var(--non); border-style: solid; color: var(--non); background: var(--non-soft); }

/* ---------- En chiffres ---------- */
.details summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 14px; }
.details summary::-webkit-details-marker { display: none; }
.details summary h2::after { content: " ▸"; font-size: 14px; color: var(--text-2); }
.details[open] summary h2::after { content: " ▾"; }
.details-body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 18px; }
.dbox { border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; }
.dbox h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.dline { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border-2); font-size: 14px; color: var(--text-2); }
.dline:first-of-type { border-top: 0; }
.dline b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dline .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-3); align-self: center; overflow: hidden; }
.dline .bar > i { display: block; height: 100%; border-radius: 4px; background: var(--ferdy); }
.dline .bar > i.ines { background: var(--ines); }
.dline .l { min-width: 110px; }

/* ---------- Tiroir (fiche foyer) ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .4); animation: fade .18s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(640px, 100vw); background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .25s var(--ease); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer form { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border-2); }
.drawer-head h2 { font-size: 18px; flex: 1; text-align: center; }
.drawer-head .icon-btn { margin-left: -8px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 28px; }
.drawer-foot { display: flex; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border-2); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.drawer-foot .spacer { flex: 1; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section-title .muted { font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; color: var(--text); font-weight: 600; }
.field.span-2 { grid-column: span 2; }
.input, .select, .textarea {
  height: 48px; width: 100%; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 15px; transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.input::placeholder { color: var(--text-2); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.textarea { height: auto; min-height: 80px; padding: 12px 14px; resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; cursor: pointer; min-height: 48px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--text); }
.hint { font-size: 13px; color: var(--text-2); margin: 12px 0 0; text-wrap: pretty; }

.radio-seg { display: inline-flex; background: var(--bg-2); border-radius: var(--pill); padding: 4px; gap: 4px; height: 48px; }
.radio-seg label { display: flex; align-items: center; padding: 0 18px; border-radius: var(--pill); font-size: 14px; color: var(--text-2); cursor: pointer; font-weight: 600; }
.radio-seg input { position: absolute; opacity: 0; pointer-events: none; }
.radio-seg label:has(input:checked) { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }

.mrows { display: flex; flex-direction: column; gap: 12px; }
.mrow { border: 1px solid var(--border); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.mrow.enfant { background: var(--bg-2); }
.mrow .l1 { display: grid; grid-template-columns: 1.2fr 1fr auto 84px 40px; gap: 10px; align-items: center; }
.mrow .l2 { display: grid; grid-template-columns: auto auto 1fr 1fr; gap: 10px; align-items: center; }
.mrow .l3 { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); font-weight: 600; }
.mrow .rm { width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); font-size: 22px; display: inline-flex; align-items: center; justify-content: center; }
.mrow .rm:hover { background: var(--non-soft); color: var(--non); }
.mrow-add { display: flex; gap: 10px; margin-top: 12px; }
.mrow .type-select { min-width: 110px; }
.mrow .age { display: none; }
.mrow.enfant .age { display: block; }

/* ---------- Réglages (modale) ---------- */
.dialog { border: 0; border-radius: var(--r); padding: 0; background: var(--bg); color: var(--text); width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(0, 0, 0, .4); }
.dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.dialog-head { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-bottom: 1px solid var(--border-2); }
.dialog-head h2 { font-size: 18px; flex: 1; text-align: center; margin-right: 36px; }
.dialog-body { padding: 24px; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: space-between; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border-2); }
.photo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-preview { width: 96px; height: 72px; border-radius: 8px; background: linear-gradient(135deg, #f4c6cf, #b86b8d); overflow: hidden; flex: none; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pick { cursor: pointer; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 70;
  background: var(--text); color: #fff; padding: 14px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: rise .2s var(--ease); max-width: calc(100vw - 32px); text-align: center;
}
.toast.err { background: var(--non); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1128px) {
  .header-inner { padding: 0 40px; }
  .page { padding: 20px 40px 120px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 420px; padding: 32px 40px 40px; gap: 28px; }
  .kpis { gap: 8px; }
  .kpi { padding: 10px 12px 8px; }
  .kpi .lbl { font-size: 11px; white-space: nowrap; }
  .kpi .lbl .muted, .kpi .lbl .tag { display: none; }
  .kpi .big { font-size: 26px; }
  .kpi .big small { font-size: 12px; margin-left: 4px; }
  .kpi .sub { font-size: 11px; }
  .details-body { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; height: auto; padding: 10px 16px; row-gap: 10px; column-gap: 8px; }
  .icon-btn.burger { display: inline-flex; }
  .topnav { display: none; }
  .search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .hero-right { display: none; }
  .hero-grid { padding-bottom: 24px; }
  .header-actions .btn-ghost { display: none; }
  .header-actions .menu-wrap:not(.more-wrap) { display: none; }
  .more-wrap { display: block; }
  .fab { display: flex; align-items: center; justify-content: center; }
  .page { padding: 16px 24px 120px; }
  .hero { height: auto; min-height: 0; overflow: visible; }
  .hero-grid { height: auto; grid-template-rows: none; }
  .hero-grid { grid-template-columns: 1fr; padding: 28px 20px 28px; gap: 22px; }
  .hero-left { padding-top: 120px; }
  .cd { padding-right: 18px; margin-right: 14px; }
  .cd + .cd::before { left: -14px; }
  .cd b { font-size: 40px; }
  .cd span { font-size: 10px; letter-spacing: .08em; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:first-child { grid-column: span 2; }
  .todo-add { grid-template-columns: 1fr 1fr; }
  .todo-add .input[name="texte"] { grid-column: span 2; }
  .todo-add .todo-date { width: 100%; }
  .tgrip { display: none; }
  .cats-wrap { top: 118px; flex-direction: column; align-items: stretch; gap: 8px; }
  .pills { justify-content: flex-start; }
  .todo-tools, .todo-due.add { opacity: 1; }
  .grid { grid-template-columns: 1fr; }
  .grip, .dnd-hint { display: none; }
  .drawer { width: 100vw; }
  .mrow .l1 { grid-template-columns: 1fr 1fr; }
  .mrow .l1 .rm { justify-self: end; }
  .mrow .l2 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: span 1; }
  .details-body { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Lien avec les mariés ---------- */
.lien-title { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 10px; font-size: 14px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.lien-title .n { font-weight: 600; color: var(--text-3); letter-spacing: 0; text-transform: none; }
.lien-title.todo-lien { color: var(--attente); }
.group-title + .lien-title { margin-top: 4px; }
.lien-select {
  appearance: none; -webkit-appearance: none; height: 24px; padding: 0 22px 0 9px; border-radius: 6px; border: 1px dashed var(--border);
  background: transparent; color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236a6a6a' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
}
.lien-select:hover { border-color: var(--text); color: var(--text); }
.lien-select.set { border-style: solid; border-color: transparent; background-color: var(--primary-soft); color: var(--primary-dark); }
.lien-select:focus { outline: 2px solid var(--text); outline-offset: 1px; }
/* ---------- Témoins ---------- */
.star { border: 0; background: transparent; padding: 0 2px; font-size: 18px; line-height: 1; color: var(--border); cursor: pointer; transition: color .12s var(--ease), transform .1s var(--ease); }
.star:hover { color: var(--attente); transform: scale(1.15); }
.star.on { color: #f5a623; }
.membre:not(:hover) .star:not(.on) { opacity: 0; }
.group-title.temoins { color: var(--primary-dark); }
.mrow .l2 { grid-template-columns: auto auto auto 1fr 1fr; }
@media (max-width: 900px) { .membre .star:not(.on) { opacity: 1; } .mrow .l2 { grid-template-columns: 1fr 1fr; } }
/* ---------- Commutateur cartes / liste ---------- */
.view-toggle { margin-left: auto; display: inline-flex; background: var(--bg-2); border-radius: var(--pill); padding: 4px; gap: 4px; }
.view-toggle button { height: 34px; padding: 0 14px; border: 0; border-radius: var(--pill); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.view-toggle button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }

/* ---------- Vue liste ---------- */
.list-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.list-table thead th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.list-table td { padding: 6px 12px; vertical-align: middle; border-top: 1px solid var(--border-2); font-size: 14px; }
.list-table tbody:first-of-type tr:first-child td { border-top: 0; }
.list-table tbody + tbody tr:first-child td { border-top: 1px solid var(--border); }
.list-table tbody:hover td { background: #fbfbfb; }
.list-table .c-foyer { width: 23%; min-width: 220px; border-right: 1px solid var(--border-2); vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.list-table .c-foyer .fname { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; margin-bottom: 6px; line-height: 1.2; }
.list-table .c-foyer .fname .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-table .c-foyer .fname .nb { font-size: 11px; font-weight: 700; color: var(--text-2); background: var(--bg-3); padding: 1px 7px; border-radius: var(--pill); flex: none; }
.list-table .c-foyer .fname.solo { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.list-table .c-foyer .fname .t.muted { font-weight: 600; }
.list-table .c-foyer .tags { gap: 4px; }
.list-table .c-foyer .contact { margin-top: 5px; font-size: 12px; }
.list-table .c-person { min-width: 220px; }
.list-table .c-person .m-name { gap: 6px; }
.list-table .c-person .m-name .p { font-size: 15px; }
.list-table .c-person .m-name .meta { font-size: 12px; }
.list-table .c-rep { width: 1%; white-space: nowrap; }
.list-table .c-rep .seg { flex: none; padding: 3px; }
.list-table .c-rep .seg button { height: 30px; min-width: 46px; padding: 0 10px; font-size: 13px; }
.list-table .c-mairie { width: 1%; white-space: nowrap; }
.list-table .c-mairie .toggle { height: 34px; padding: 0 12px; font-size: 13px; }
.list-table .c-prev { width: 1%; white-space: nowrap; border-left: 1px solid var(--border-2); vertical-align: middle; }
.list-table .c-prev .toggle { height: 34px; padding: 0 12px; font-size: 13px; }
.list-table .c-edit { width: 1%; padding-left: 4px; padding-right: 8px; }
.list-table tbody:hover .grip { opacity: 1; }
.list-table tbody.drop-over td { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.list-table tr.membre.dragging td { opacity: .35; }
.list-table .star { font-size: 16px; }
.list-table tbody.foyer { display: table-row-group; border: 0; border-radius: 0; box-shadow: none; }
.list-table tbody.foyer:hover { box-shadow: none; }
.list-table tr.membre { display: table-row; padding: 0; border: 0; gap: 0; }
.list-table .m-name { flex-wrap: nowrap; }
.list-table .m-name .p { white-space: nowrap; }
.list + .dnd-hint { margin-top: 16px; }
@media (max-width: 900px) { .view-toggle { display: none; } }


@media (max-width: 900px) { .hero-right { align-self: auto; } .panel { flex: none; } .todo-list { max-height: 50vh; } }

.todo-item .who, .todo-item .todo-due { margin-top: 0; }
.todo-item .todo-tools { margin-top: -2px; }

/* filtres Inès / Ferdy / Les 2 dans la todo */
.pfilters { display: inline-flex; gap: 4px; margin-left: auto; }
.pfilters button { height: 26px; padding: 0 10px; border-radius: var(--pill); border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: rgba(255, 255, 255, .85); font-size: 12px; font-weight: 700; transition: background-color .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease); }
.pfilters button:hover { border-color: #fff; color: #fff; }
.pfilters button.on { background: #fff; color: var(--text); border-color: #fff; }
.pfilters button.on[data-who="Inès"] { background: var(--ines-soft); color: var(--ines); border-color: var(--ines-soft); }
.pfilters button.on[data-who="Ferdy"] { background: var(--ferdy-soft); color: var(--ferdy); border-color: var(--ferdy-soft); }
.panel-head .panel-sub { flex-basis: 100%; }
/* ---------- Menu « plus » (téléphone) ---------- */
@media (min-width: 901px) { .more-wrap { display: none; } }
.icon-btn.more { font-size: 22px; font-weight: 800; }
.menu a { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 12px 16px; }
.menu a:hover { background: var(--bg-2); }
.menu a b { font-weight: 600; font-size: 14px; }
.menu a span { font-size: 13px; color: var(--text-2); }
@media (max-width: 900px) {
  .header-actions { gap: 0; }
}

/* ---------- Feuille d'ajout (téléphone) ---------- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--bg); border-radius: 20px 20px 0 0; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: sheet .25s var(--ease); display: flex; flex-direction: column; }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 4px auto 10px; }
.sheet h3 { font-size: 18px; padding: 4px 12px 10px; }
.sheet > button[data-preset] { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 14px 12px; border: 0; border-top: 1px solid var(--border-2); background: none; text-align: left; }
.sheet > button[data-preset]:active { background: var(--bg-2); }
.sheet > button b { font-weight: 700; font-size: 16px; }
.sheet > button span { font-size: 13px; color: var(--text-2); }
.sheet .sheet-cancel { margin-top: 8px; width: 100%; }

/* ---------- Mini menu (attribution d'une tâche) ---------- */
.mini-menu { position: fixed; z-index: 80; min-width: 160px; background: var(--bg); color: var(--text); border-radius: var(--r); padding: 6px; box-shadow: var(--shadow-lg); animation: pop .14s var(--ease); }
.mini-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; font-size: 14px; font-weight: 600; text-align: left; }
.mini-menu button:hover { background: var(--bg-2); }
.mini-menu button.on::after { content: "✓"; margin-left: auto; color: var(--text-2); }
.mini-menu .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.mini-menu .dot-ines { background: var(--ines); }
.mini-menu .dot-ferdy { background: var(--ferdy); }

/* ---------- Toast avec action ---------- */
.toast { display: flex; align-items: center; gap: 14px; }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: var(--pill); }
.toast button:hover { background: rgba(255, 255, 255, .26); }

/* ---------- Chargement ---------- */
.loading { padding: 40px; text-align: center; color: var(--text-2); font-size: 14px; animation: fade .3s var(--ease); }
.hero-title:empty::before { content: "…"; opacity: .4; }
.kpi .muted, .panel .muted { color: rgba(255, 255, 255, .7); }

/* ---------- Menu latéral (téléphone) ---------- */
.navdrawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 62; width: min(320px, 85vw); background: var(--bg); box-shadow: var(--shadow-lg); padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 2px; animation: navin .22s var(--ease); }
@keyframes navin { from { transform: translateX(-24px); opacity: 0; } }
.navdrawer-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 14px 12px; }
.navdrawer a, .navdrawer button[data-open-settings] { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 14px; border: 0; border-radius: var(--r); background: none; font-size: 16px; font-weight: 600; color: var(--text); text-align: left; }
.navdrawer a svg, .navdrawer button svg { width: 22px; height: 22px; color: var(--text-2); flex: none; }
.navdrawer a:hover, .navdrawer button[data-open-settings]:hover { background: var(--bg-2); }
.navdrawer a.on { background: var(--bg-2); }
.navdrawer a.on svg { color: var(--primary); }
.navdrawer a .cnt { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--bg-3); padding: 2px 8px; border-radius: var(--pill); }
.navdrawer-sep { height: 1px; background: var(--border-2); margin: 8px 12px; }

/* ---------- Page « À faire » ---------- */
.module { min-height: 60vh; }
.module-head { margin-bottom: 20px; }
#tachesHost .panel { background: var(--bg); border: 1px solid var(--border); color: var(--text); flex: none; max-width: 860px; padding: 14px 18px 16px; backdrop-filter: none; -webkit-backdrop-filter: none; }
#tachesHost .todo-list { max-height: none; overflow: visible; }
#tachesHost .todo-item { border-bottom-color: var(--border-2); }
#tachesHost .todo-item:hover { background: var(--bg-2); }
#tachesHost .todo-text { color: var(--text); font-size: 15px; }
#tachesHost .todo-item.done .todo-text { color: var(--text-2); }
#tachesHost .todo-check { border-color: var(--text-3); }
#tachesHost .todo-check:hover { border-color: var(--text); background: var(--bg-2); }
#tachesHost .todo-item.done .todo-check { background: var(--text); border-color: var(--text); color: #fff; }
#tachesHost .tgrip { color: var(--text-3); }
#tachesHost .who { background: var(--bg-3); color: var(--text-2); }
#tachesHost .who[data-qui="Ferdy"] { background: var(--ferdy-soft); color: var(--ferdy); }
#tachesHost .who[data-qui="Inès"] { background: var(--ines-soft); color: var(--ines); }
#tachesHost .todo-due { background: var(--bg-3); color: var(--text-2); }
#tachesHost .todo-due.soon { background: var(--attente-soft); color: var(--attente); }
#tachesHost .todo-due.today { background: var(--primary-soft); color: var(--primary-dark); }
#tachesHost .todo-due.late { background: var(--non-soft); color: var(--non); }
#tachesHost .todo-due.add { border-color: var(--border); color: var(--text-2); }
#tachesHost .todo-tools button { color: var(--text-2); }
#tachesHost .todo-tools button:hover { background: var(--bg-3); color: var(--text); }
#tachesHost .ptabs { background: var(--bg-2); }
#tachesHost .ptabs button { color: var(--text-2); }
#tachesHost .ptabs button.on { background: var(--text); color: #fff; }
#tachesHost .ptabs button.on .cnt { color: rgba(255, 255, 255, .8); }
#tachesHost .pfilters button { border-color: var(--border); color: var(--text-2); }
#tachesHost .pfilters button:hover { border-color: var(--text); color: var(--text); }
#tachesHost .pfilters button.on { background: var(--text); color: #fff; border-color: var(--text); }
#tachesHost .panel-sub { color: var(--text-2); }
#tachesHost .panel-sub .late { color: var(--non); }
#tachesHost .todo-add { border-top-color: var(--border-2); }
#tachesHost .todo-add .input, #tachesHost .todo-add .select { background: var(--bg); border-color: var(--border); }
#tachesHost .todo-empty { color: var(--text-2); }
#tachesHost .muted { color: var(--text-2); }
body.route-taches .fab { display: none; }
@media (max-width: 900px) { body.route-taches .search { display: none; } #tachesHost .todo-tools { opacity: 1; } }
@media (max-width: 900px) {
  #tachesHost .todo-item { flex-wrap: wrap; row-gap: 6px; }
  #tachesHost .todo-text { flex: 1 1 calc(100% - 40px); }
  #tachesHost .who { margin-left: 28px; }
  #tachesHost .todo-tools { margin-left: auto; }
  #tachesHost .panel { padding: 12px 12px 14px; }
}

/* ---------- Utilisateur connecté ---------- */
.user-chip { padding-left: 6px; gap: 8px; }
.user-chip .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.navdrawer-user { padding: 6px 14px 4px; font-size: 13px; color: var(--text-2); }
.navdrawer button[data-logout] { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 14px; border: 0; border-radius: var(--r); background: none; font-size: 16px; font-weight: 600; color: var(--text); text-align: left; }
.navdrawer button[data-logout] svg { width: 22px; height: 22px; color: var(--text-2); }
.navdrawer button[data-logout]:hover { background: var(--bg-2); }
.pwd-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-2); }
.pwd-box h3 { font-size: 15px; margin-bottom: 12px; }
@media (max-width: 900px) { .user-chip { display: none; } }
/* ---------- Téléphone : bloc de filtres fixe mais compact ---------- */
@media (max-width: 900px) {
  .cats-wrap { gap: 0; padding: 0; margin-bottom: 14px; }
  .cats { gap: 0; padding: 2px 0 0; }
  .cat { flex-direction: row; gap: 6px; padding: 8px 10px 9px; font-size: 12.5px; }
  .cat svg { width: 16px; height: 16px; }
  .cat .cnt { margin-left: 2px; }
  .pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; gap: 6px; padding: 8px 0 10px; }
  .pills::-webkit-scrollbar { display: none; }
  .pill { flex: none; height: 32px; padding: 0 12px; font-size: 13px; }
  .pill .cnt { font-size: 11px; }
}
