/* LesCouzz v2 — appli de poche : fond doux, cartes blanches arrondies, un accent chaud, pictogrammes partout, texte court. */
:root {
  --bg: #f3f4f7; --surface: #ffffff; --surface-2: #eef0f4; --fg: #141a26; --muted: #6b7384; --line: #e4e7ee;
  --accent: #ff6a3d; --accent-fg: #ffffff; --accent-soft: #ffe9e1;
  --blue: #2f6fed; --blue-soft: #e4ecfd; --green: #1f9d6a; --green-soft: #dff5ea; --amber: #e5950b; --amber-soft: #fff1d6; --red: #d94848; --red-soft: #fde3e3; --violet: #7c5cff; --violet-soft: #ebe6ff;
  --ia: #3B82F6; --ia-soft: #3B82F617; --ia-line: #3B82F647;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --r: 18px; --r-s: 12px; --nav-h: 64px;
  --shadow: 0 1px 2px rgba(20,26,38,.06), 0 10px 30px -18px rgba(20,26,38,.25);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1218; --surface: #181c25; --surface-2: #222835; --fg: #eef0f5; --muted: #98a0b3; --line: #2b3242;
  --accent: #ff7d55; --accent-fg: #1a0d08; --accent-soft: #3a241c; --blue: #7ea6ff; --blue-soft: #1f2a44; --green: #5fd39e; --green-soft: #173327; --amber: #f3b64a; --amber-soft: #3a2d12; --red: #f07676; --red-soft: #3d1f1f; --violet: #a893ff; --violet-soft: #2a2347;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -18px rgba(0,0,0,.6);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f1218; --surface: #181c25; --surface-2: #222835; --fg: #eef0f5; --muted: #98a0b3; --line: #2b3242;
  --accent: #ff7d55; --accent-fg: #1a0d08; --accent-soft: #3a241c; --blue: #7ea6ff; --blue-soft: #1f2a44; --green: #5fd39e; --green-soft: #173327; --amber: #f3b64a; --amber-soft: #3a2d12; --red: #f07676; --red-soft: #3d1f1f; --violet: #a893ff; --violet-soft: #2a2347;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -18px rgba(0,0,0,.6);
  color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15.5px; line-height: 1.45; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 800; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; } h2 { font-size: 1.35rem; letter-spacing: -.015em; } h3 { font-size: 1.05rem; } h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
p { margin: 0; } a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; color: inherit; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 40%, transparent); outline-offset: 2px; }
.tabular { font-variant-numeric: tabular-nums; } .muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .76rem; }
[hidden] { display: none !important; }
svg.ic { width: 1.15em; height: 1.15em; vertical-align: -.22em; stroke-width: 2.1; flex: 0 0 auto; }

/* ---------- Barre du haut ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 900px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 10px; }
.top .titre { flex: 1; min-width: 0; display: grid; }
.top .titre b { font-size: 1.15rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .titre span { font-size: .78rem; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .85rem; white-space: nowrap; box-shadow: var(--shadow); }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: var(--shadow); color: #fff; font-weight: 900; font-size: .85rem; display: grid; place-items: center; }
.tabs-desktop { display: none; }
@media (min-width: 820px) {
  .tabs-desktop { display: flex; gap: 4px; max-width: 900px; margin: 0 auto; padding: 0 16px 8px; }
  .tabs-desktop button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font-weight: 800; color: var(--muted); }
  .tabs-desktop button[aria-current="page"] { background: var(--fg); color: var(--bg); }
  .nav { display: none !important; } :root { --nav-h: 0px; }
}

/* ---------- Contenu ---------- */
main { max-width: 900px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 16px; min-height: 60vh; align-content: start; }
.sous-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.sous-nav::-webkit-scrollbar { display: none; }
.sous-nav button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: .88rem; font-weight: 800; color: var(--muted); }
.sous-nav button[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.entete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead { color: var(--muted); font-size: .92rem; max-width: 60ch; }

/* ---------- Barre du bas ---------- */
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.nav button { display: grid; place-items: center; gap: 2px; font-size: .68rem; font-weight: 800; color: var(--muted); padding: 8px 0 6px; }
.nav button svg.ic { width: 24px; height: 24px; stroke-width: 2; }
.nav button[aria-current="page"] { color: var(--accent); }

/* ---------- Briques ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: grid; gap: 12px; min-width: 0; }
.card.plate { box-shadow: none; border: 1px solid var(--line); }
.card.accent { background: linear-gradient(135deg, var(--accent) 0%, #ff9068 100%); color: #fff; }
.card.accent .muted { color: rgba(255,255,255,.8); }
.card.ia { border: 1.5px solid var(--ia-line); background: var(--ia-soft); box-shadow: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--accent); color: var(--accent-fg); border-radius: 999px; padding: 11px 18px; font-weight: 800; font-size: .95rem; box-shadow: 0 6px 16px -8px var(--accent); white-space: nowrap; }
.btn.secondaire { background: var(--surface-2); color: var(--fg); box-shadow: none; } .btn.bleu { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -8px var(--blue); } .btn.vert { background: var(--green); color: #fff; box-shadow: none; }
.btn.rouge { background: var(--red-soft); color: var(--red); box-shadow: none; } .btn.ia { background: var(--ia); color: #fff; box-shadow: none; }
.btn.petit { padding: 7px 12px; font-size: .85rem; } .btn.bloc { width: 100%; } .btn:disabled { opacity: .5; cursor: default; }
.btn-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--fg); flex: 0 0 auto; }
.btn-ic.actif { background: var(--fg); color: var(--bg); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.vert { background: var(--green-soft); color: var(--green); } .tag.ambre { background: var(--amber-soft); color: var(--amber); } .tag.rouge { background: var(--red-soft); color: var(--red); } .tag.bleu { background: var(--blue-soft); color: var(--blue); } .tag.violet { background: var(--violet-soft); color: var(--violet); } .tag.ia { background: var(--ia); color: #fff; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 800; z-index: 40; max-width: 90vw; box-shadow: var(--shadow); }
.vide { color: var(--muted); text-align: center; padding: 24px 12px; display: grid; gap: 6px; justify-items: center; } .vide svg.ic { width: 34px; height: 34px; opacity: .5; }
.avatar { border-radius: 50%; display: inline-grid; place-items: center; font-weight: 900; color: #fff; flex: 0 0 auto; }
.pile { display: flex; } .pile .avatar { margin-left: -6px; border: 2px solid var(--surface); } .pile .avatar:first-child { margin-left: 0; }

/* Compteurs en pictogrammes */
.pictos { display: flex; gap: 6px; flex-wrap: wrap; }
.picto { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border-radius: 10px; padding: 5px 9px; font-weight: 800; font-size: .86rem; }
.picto svg.ic { width: 17px; height: 17px; } .picto.vert { background: var(--green-soft); color: var(--green); } .picto.ambre { background: var(--amber-soft); color: var(--amber); } .picto.bleu { background: var(--blue-soft); color: var(--blue); } .picto.violet { background: var(--violet-soft); color: var(--violet); } .picto.rouge { background: var(--red-soft); color: var(--red); }
.compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.compteur { background: var(--surface); border-radius: var(--r-s); padding: 10px 8px; display: grid; justify-items: center; gap: 3px; text-align: center; box-shadow: var(--shadow); }
.compteur svg.ic { width: 24px; height: 24px; color: var(--accent); } .compteur b { font-size: 1.35rem; line-height: 1; } .compteur span { font-size: .72rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.compteur.vert svg.ic { color: var(--green); } .compteur.bleu svg.ic { color: var(--blue); } .compteur.violet svg.ic { color: var(--violet); } .compteur.ambre svg.ic { color: var(--amber); }

/* Groupes de foyers */
.groupe { display: grid; gap: 8px; }
.groupe-titre { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: .95rem; padding: 4px 2px; }
.groupe-titre .n { background: var(--surface-2); border-radius: 999px; padding: 1px 9px; font-size: .8rem; }
.groupe-titre.vert { color: var(--green); } .groupe-titre.ambre { color: var(--amber); } .groupe-titre.rouge { color: var(--red); }
.foyer { background: var(--surface); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 12px; align-items: center; }
.foyer.mien { outline: 2px solid var(--accent); }
.foyer .em { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; }
.foyer .nom { font-weight: 900; } .foyer .pictos { grid-column: 2 / 4; } .foyer .note { grid-column: 2 / 4; color: var(--muted); font-size: .84rem; }
.foyer .droite { display: grid; justify-items: end; gap: 4px; }
.foyer .ligne-ic { display: inline-flex; gap: 2px; align-items: center; } .foyer .ligne-ic svg.ic { width: 18px; height: 18px; }

/* Fiche : compteurs +/- , segments, interrupteurs */
.stepper { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; background: var(--surface-2); border-radius: var(--r-s); padding: 8px 8px 8px 12px; }
.stepper .lbl { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .92rem; } .stepper .lbl svg.ic { color: var(--accent); width: 20px; height: 20px; }
.stepper .ctl { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 999px; padding: 2px; }
.stepper .ctl button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; } .stepper .ctl button:active { background: var(--surface-2); }
.stepper .ctl output { min-width: 26px; text-align: center; font-weight: 900; font-size: 1.1rem; }
.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); border-radius: var(--r-s); padding: 4px; }
.segments button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 9px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.segments button svg.ic { width: 22px; height: 22px; } .segments button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.segments.grand button { font-size: .82rem; padding: 10px 6px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-2); border-radius: var(--r-s); padding: 10px 12px; font-weight: 800; font-size: .92rem; }
.switch .lbl { display: flex; align-items: center; gap: 8px; } .switch .lbl svg.ic { color: var(--accent); width: 20px; height: 20px; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: 0 0 auto; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked { background: var(--green); } .switch input:checked::after { transform: translateX(18px); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { background: var(--surface-2); border-radius: 999px; padding: 7px 13px; font-weight: 800; font-size: .86rem; color: var(--muted); }
.chips button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.champ { display: grid; gap: 5px; font-size: .8rem; font-weight: 800; color: var(--muted); }
.champ input, .champ select, .champ textarea, .input { font: inherit; color: var(--fg); background: var(--surface-2); border: 0; border-radius: var(--r-s); padding: 11px 12px; width: 100%; min-width: 0; font-weight: 600; }
.grille2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fiche { display: grid; gap: 10px; }
.fiche h3 { display: flex; align-items: center; gap: 8px; }

/* ---------- Accueil ---------- */
.hero { border-radius: 22px; padding: 18px; background: linear-gradient(140deg, #ff6a3d 0%, #ff9a6a 55%, #ffc39b 100%); color: #fff; display: grid; gap: 10px; box-shadow: 0 16px 40px -24px #ff6a3d; }
.hero .quoi { font-size: .82rem; font-weight: 800; opacity: .9; text-transform: uppercase; letter-spacing: .08em; }
.hero .compte { font-size: 3rem; font-weight: 900; line-height: 1; letter-spacing: -.03em; } .hero .compte small { font-size: 1rem; font-weight: 700; opacity: .9; margin-left: 8px; letter-spacing: 0; }
.hero .ou { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.hero .pictos .picto { background: rgba(255,255,255,.2); color: #fff; }
.hero .btn { background: #fff; color: #c2410c; box-shadow: none; }
.meteo { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.meteo::-webkit-scrollbar { display: none; }
.meteo .j { flex: 0 0 auto; width: 64px; text-align: center; background: var(--surface); border-radius: 12px; padding: 7px 4px; font-size: .74rem; box-shadow: var(--shadow); }
.meteo .j.sejour { background: var(--amber-soft); } .meteo .j b { display: block; font-size: 1.35rem; line-height: 1.3; } .meteo .j .t { font-weight: 800; } .meteo .j .d { color: var(--muted); font-weight: 800; }
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tuile { background: var(--surface); border-radius: var(--r); padding: 12px 8px; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .78rem; font-weight: 800; box-shadow: var(--shadow); color: var(--fg); }
.tuile .bulle { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; background: var(--surface-2); }
.tuile:active { transform: scale(.97); }
.raccourcis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.raccourci { background: var(--surface); border-radius: var(--r); padding: 12px; display: grid; grid-template-columns: 38px 1fr; gap: 2px 10px; align-items: center; box-shadow: var(--shadow); color: var(--fg); text-align: left; }
.raccourci .bulle { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; grid-row: 1 / 3; } .raccourci .bulle svg.ic { width: 20px; height: 20px; }
.raccourci b { font-size: .92rem; } .raccourci span { font-size: .78rem; color: var(--muted); }
.b-bleu { background: var(--blue-soft); color: var(--blue); } .b-vert { background: var(--green-soft); color: var(--green); } .b-ambre { background: var(--amber-soft); color: var(--amber); } .b-violet { background: var(--violet-soft); color: var(--violet); } .b-rouge { background: var(--red-soft); color: var(--red); } .b-accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- Fil ---------- */
.fil { display: grid; gap: 10px; }
.msg { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: start; }
.msg .bulle { background: var(--surface); border-radius: 16px 16px 16px 4px; padding: 10px 13px; display: grid; gap: 6px; min-width: 0; box-shadow: var(--shadow); }
.msg .bulle.appel { background: var(--amber-soft); } .msg .bulle.sondage { background: var(--blue-soft); } .msg .bulle.systeme { background: var(--surface-2); box-shadow: none; }
.msg .qui { font-size: .76rem; color: var(--muted); display: flex; gap: 6px; justify-content: space-between; font-weight: 800; } .msg .qui b { color: var(--fg); }
.msg .texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; } .reacts button { background: var(--surface-2); border-radius: 999px; padding: 2px 9px; font-size: .8rem; font-weight: 800; }
.reacts button.moi { background: var(--blue-soft); color: var(--blue); }
.options { display: grid; gap: 5px; } .options button { text-align: left; background: var(--surface); border-radius: 10px; padding: 8px 11px; display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; font-weight: 700; }
.options button.moi { outline: 2px solid var(--blue); } .options .n { color: var(--muted); font-size: .78rem; white-space: nowrap; font-weight: 800; }
.compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

/* ---------- Lieux ---------- */
.lieu { background: var(--surface); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; min-width: 0; }
.lieu.retenu { outline: 2px solid var(--green); }
.lieu header { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start; }
.lieu .prix { text-align: right; } .lieu .prix b { font-size: 1.25rem; display: block; line-height: 1.1; } .lieu .prix span { font-size: .74rem; color: var(--muted); font-weight: 800; }
.trajets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.trajet { background: var(--surface-2); border-radius: 10px; padding: 7px 6px; display: grid; justify-items: center; gap: 1px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.trajet b { font-size: .95rem; color: var(--fg); } .trajet.ok { background: var(--green-soft); } .trajet.ok b { color: var(--green); } .trajet.loin { background: var(--red-soft); } .trajet.loin b { color: var(--red); }
.votes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.vote { display: grid; justify-items: center; gap: 2px; background: var(--surface-2); border-radius: 12px; padding: 8px 4px; font-size: .78rem; font-weight: 800; color: var(--muted); }
.vote svg.ic { width: 20px; height: 20px; } .vote .n { font-size: .72rem; }
.vote[aria-pressed="true"].up { background: var(--green-soft); color: var(--green); } .vote[aria-pressed="true"].down { background: var(--amber-soft); color: var(--amber); } .vote[aria-pressed="true"].veto { background: var(--red-soft); color: var(--red); }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Repas ---------- */
.jour { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-weight: 900; }
.jour .d { background: var(--fg); color: var(--bg); border-radius: 10px; padding: 4px 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.repas-card { background: var(--surface); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: 40px 1fr auto; gap: 6px 12px; align-items: center; }
.repas-card.libre { background: transparent; box-shadow: none; border: 2px dashed var(--line); }
.repas-card .mom { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); } .repas-card .mom.soir { background: var(--violet-soft); color: var(--violet); } .repas-card .mom svg.ic { width: 20px; height: 20px; }
.repas-card .titre { font-weight: 900; } .repas-card .plat { font-weight: 700; } .repas-card .qui { font-size: .8rem; color: var(--muted); font-weight: 800; display: flex; align-items: center; gap: 6px; }
.repas-card .corps { grid-column: 2 / 4; display: grid; gap: 8px; min-width: 0; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opts button { background: var(--surface-2); border-radius: 999px; padding: 7px 12px; font-size: .86rem; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.opts button.moi { background: var(--green); color: #fff; } .opts .n { background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 7px; font-size: .74rem; } .opts button.moi .n { background: rgba(255,255,255,.25); }
.alerte { display: flex; gap: 8px; align-items: center; background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 8px 10px; font-size: .84rem; font-weight: 800; }

/* ---------- Courses ---------- */
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--green); width: 0; transition: width .3s; border-radius: 4px; }
.rayon { background: var(--surface); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); display: grid; gap: 2px; min-width: 0; }
.rayon h3 { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 6px; } .rayon h3 .n { margin-left: auto; color: var(--muted); font-size: .78rem; }
.art { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; font-weight: 700; }
.art:last-child { border-bottom: 0; } .art.fait { color: var(--muted); } .art.fait .a { text-decoration: line-through; } .art .q { color: var(--muted); font-size: .82rem; white-space: nowrap; font-weight: 800; }
.art input[type="checkbox"] { appearance: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); margin: 0; display: grid; place-items: center; cursor: pointer; }
.art input[type="checkbox"]:checked { background: var(--green); border-color: var(--green); } .art input[type="checkbox"]:checked::after { content: '✓'; color: #fff; font-weight: 900; font-size: .9rem; }
.courses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }

/* ---------- Activités ---------- */
.acti { background: var(--surface); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: 48px 1fr; gap: 6px 12px; }
.acti .em { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--surface-2); }
.acti .titre { font-weight: 900; font-size: 1.02rem; } .acti .quand { color: var(--blue); font-weight: 800; font-size: .84rem; display: flex; gap: 10px; flex-wrap: wrap; } .acti .quand span { display: inline-flex; gap: 4px; align-items: center; }
.acti .corps { display: grid; gap: 8px; min-width: 0; } .acti.annulee { opacity: .55; } .acti.annulee .titre { text-decoration: line-through; }
.presence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.presence button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; background: var(--surface-2); border-radius: 12px; padding: 9px 6px; font-size: .82rem; font-weight: 800; color: var(--muted); }
.presence button.moi { background: var(--green); color: #fff; } .presence button.moi.pe { background: var(--amber); } .presence button.moi.non { background: var(--surface-2); color: var(--fg); outline: 2px solid var(--line); }
.qui-vient { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); font-weight: 800; }
#carte { height: min(58vh, 520px); border-radius: var(--r); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.leaflet-container { font-family: var(--font); }
.avatar-marker { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .8rem; }
.kv { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; }
.kv .k { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); } .kv .k svg.ic { width: 18px; height: 18px; }
.kv .v { display: grid; } .kv .v span { font-size: .74rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; } .kv .v b { overflow-wrap: anywhere; }
.code { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; letter-spacing: .08em; }

/* ---------- Photos ---------- */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
.galerie button { background: var(--surface-2); aspect-ratio: 1; overflow: hidden; border-radius: 10px; position: relative; }
.galerie img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galerie .pastille { position: absolute; bottom: 5px; left: 5px; font-size: .68rem; font-weight: 800; background: rgba(0,0,0,.55); color: #fff; padding: 1px 7px; border-radius: 999px; }
.upload { border-radius: var(--r); padding: 16px; display: grid; grid-template-columns: 48px 1fr; gap: 2px 12px; align-items: center; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.upload .bulle { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); grid-row: 1 / 3; } .upload .bulle svg.ic { width: 24px; height: 24px; }
.upload input { display: none; } .upload b { font-size: 1rem; } .upload span { font-size: .8rem; color: var(--muted); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 50; display: grid; grid-template-rows: 1fr auto; }
.lightbox img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.lightbox .bas { color: #fff; padding: 10px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 8px; }
.lightbox .fermer { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 14px; background: rgba(255,255,255,.2); color: #fff; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; }
.lightbox .reacts button { color: #fff; background: rgba(255,255,255,.14); } .lightbox .btn.secondaire { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Souvenirs ---------- */
.couverture { border-radius: 22px; overflow: hidden; position: relative; min-height: 190px; display: grid; align-items: end; color: #fff; background: linear-gradient(140deg, #2f6fed, #7c5cff); box-shadow: var(--shadow); }
.couverture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.couverture .voile-txt { position: relative; padding: 16px; background: linear-gradient(to top, rgba(0,0,0,.65), transparent); display: grid; gap: 4px; }
.couverture h2 { color: #fff; } .couverture .ou { font-weight: 700; opacity: .95; }
.pm { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.pm .bloc { background: var(--surface); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.pm .bloc h3 { display: flex; align-items: center; gap: 8px; font-size: .9rem; } .pm ul { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 4px; }
.pm .plus h3 { color: var(--green); } .pm .moins h3 { color: var(--red); } .pm .idee h3 { color: var(--blue); }
.phrase { background: var(--amber-soft); border-radius: 14px 14px 14px 4px; padding: 10px 13px; font-size: .92rem; display: grid; gap: 4px; } .phrase small { color: var(--amber); font-weight: 800; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }

/* ---------- Assistant ---------- */
.cerveau { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ia); color: #fff; } .cerveau svg.ic { width: 16px; height: 16px; }
.fab { position: fixed; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 30; width: 54px; height: 54px; border-radius: 50%; background: var(--ia); color: #fff; box-shadow: 0 8px 20px -6px var(--ia); display: grid; place-items: center; }
.fab svg.ic { width: 26px; height: 26px; }
.ia-reponse { white-space: pre-wrap; background: var(--surface); border: 1.5px solid var(--ia-line); border-radius: var(--r); padding: 12px 14px; font-size: .92rem; }
.ia-q { display: flex; gap: 6px; flex-wrap: wrap; } .ia-q button { border: 1.5px solid var(--ia-line); background: var(--surface); color: var(--ia); border-radius: 999px; padding: 7px 12px; font-size: .85rem; font-weight: 800; text-align: left; }

/* ---------- Organisateur ---------- */
.personne { display: grid; grid-template-columns: 36px 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.personne:last-child { border-bottom: 0; } .personne .lien { grid-column: 2 / 4; font-family: ui-monospace, Consolas, monospace; font-size: .72rem; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Dialogue ---------- */
.voile { position: fixed; inset: 0; background: rgba(10,12,20,.5); z-index: 60; display: grid; place-items: end center; }
@media (min-width: 640px) { .voile { place-items: center; } }
.dialogue { background: var(--surface); color: var(--fg); border-radius: 22px 22px 0 0; width: 100%; max-width: 520px; padding: 18px max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; box-shadow: 0 -10px 40px rgba(0,0,0,.3); }
@media (min-width: 640px) { .dialogue { border-radius: 22px; } }
.dialogue .actions { justify-content: flex-end; }

/* ---------- Porte ---------- */
.porte { max-width: 460px; margin: 12vh auto; padding: 24px; display: grid; gap: 14px; text-align: center; justify-items: center; }
.porte .logo { width: 84px; height: 84px; border-radius: 26px; background: linear-gradient(140deg, #ff6a3d, #ffc39b); display: grid; place-items: center; font-size: 2.4rem; box-shadow: 0 16px 40px -20px #ff6a3d; }
footer.pied { color: var(--muted); font-size: .74rem; text-align: center; padding-top: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
