/* Nos Listes — sobre et chaleureux. Polices système, aucune ressource externe.
   Aucun style en ligne : la CSP n'autorise que ce fichier (style-src 'self'). */

:root {
  color-scheme: light dark;
  --fond: #FBF6EE;
  --surface: #FFFFFF;
  --surface-2: #F3ECE0;
  --encre: #2A2722;
  --encre-2: #6B645A;
  --trait: #E6DDCF;
  --vert: #1F4D3A;
  --vert-2: #2C6650;
  --vert-doux: #E3EEE6;
  --sur-vert: #FBF6EE;
  --corail: #E4532F;
  --corail-2: #C94422;
  --corail-doux: #FBE3DA;
  --sur-corail: #FFFFFF;
  --ambre: #B7791F;
  --ambre-doux: #FBEFD5;
  --alerte: #B3261E;
  --ombre: 0 1px 2px rgba(42, 39, 34, .06), 0 4px 14px rgba(42, 39, 34, .07);
  --rayon: 16px;
  --onglets: 60px;
  --action: 72px;
  --entete: 52px;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --gauche: env(safe-area-inset-left, 0px);
  --droite: env(safe-area-inset-right, 0px);
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;

  /* teintes des rayons (vignettes rondes) */
  --r-fruits-legumes: #7FA65A;
  --r-frais: #6C9BC7;
  --r-boucherie-poisson: #C46A57;
  --r-surgeles: #69B3C4;
  --r-epicerie-salee: #C9933D;
  --r-epicerie-sucree: #D27C9A;
  --r-boissons: #5E8FA8;
  --r-ustensiles: #8C7F6E;
  --r-maison: #8A8FB0;
  --r-hygiene: #9AB5A6;
  --r-autre: #A39C90;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #131614;
    --surface: #1C201D;
    --surface-2: #252A26;
    --encre: #EEE9E0;
    --encre-2: #A9A397;
    --trait: #333A35;
    --vert: #1E4A38;
    --vert-2: #2F7258;
    --vert-doux: #1D2D25;
    --sur-vert: #F3EFE6;
    --corail: #EF6440;
    --corail-2: #F27C5C;
    --corail-doux: #3A231C;
    --ambre: #E0A84A;
    --ambre-doux: #33291A;
    --alerte: #F2867E;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--fond); color: var(--encre); }
body {
  font: 16px/1.45 var(--police);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: var(--vert-2); }
h1, h2, h3 { font-family: var(--police-titre); line-height: 1.2; margin: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
button, input, select, textarea { font: inherit; color: inherit; }
/* iOS zoome sur un champ en dessous de 16 px */
input, select, textarea { font-size: 16px; }
[hidden] { display: none !important; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 4px;
  min-height: calc(var(--entete) + var(--haut));
  padding: var(--haut) calc(8px + var(--droite)) 0 calc(12px + var(--gauche));
  background: color-mix(in srgb, var(--fond) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--trait);
}
.entete-titre { flex: 1; min-width: 0; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete-actions { display: flex; gap: 2px; }
.bouton-icone, .entete-retour {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; color: var(--encre); cursor: pointer; text-decoration: none; flex: none;
}
.bouton-icone:active, .entete-retour:active { background: var(--surface-2); }
.bouton-icone svg, .entete-retour svg { width: 24px; height: 24px; }
.indicateur {
  font-size: 13px; color: var(--ambre); background: var(--ambre-doux);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; flex: none;
}

/* ---------- Vue ---------- */
.vue {
  padding: 16px calc(16px + var(--droite)) calc(var(--onglets) + var(--bas) + 28px) calc(16px + var(--gauche));
  max-width: 760px; margin: 0 auto; outline: none;
}
body.avec-action .vue { padding-bottom: calc(var(--onglets) + var(--bas) + var(--action) + 28px); }
.chargement, .vide { color: var(--encre-2); text-align: center; padding: 32px 8px; }

/* ---------- Barre d'onglets ---------- */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--onglets) + var(--bas));
  padding: 0 var(--droite) var(--bas) var(--gauche);
  background: var(--surface); border-top: 1px solid var(--trait);
}
.onglet {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; color: var(--encre-2); text-decoration: none; font-size: 12px; font-weight: 600;
}
.onglet-icone svg { width: 26px; height: 26px; }
.onglet.actif { color: var(--vert-2); }
@media (prefers-color-scheme: dark) { .onglet.actif { color: #8FD1B2; } }

/* ---------- Bouton d'action fixe ---------- */
.action-fixe {
  position: fixed; z-index: 25;
  left: calc(16px + var(--gauche)); right: calc(16px + var(--droite));
  bottom: calc(var(--onglets) + var(--bas) + 10px);
  max-width: 728px; margin: 0 auto;
}
.action-fixe .bouton { width: 100%; min-height: 54px; font-size: 17px; box-shadow: 0 6px 20px rgba(228, 83, 47, .35); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 650; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--surface-2); color: var(--encre);
  transition: transform .08s ease, background .15s ease;
}
.bouton:active { transform: scale(.98); }
.bouton:disabled { opacity: .55; cursor: default; }
.bouton svg { width: 20px; height: 20px; flex: none; }
.bouton-principal { background: var(--corail); color: var(--sur-corail); }
.bouton-principal:active { background: var(--corail-2); }
.bouton-vert { background: var(--vert); color: var(--sur-vert); }
.bouton-contour { background: transparent; border-color: var(--trait); }
.bouton-danger { background: transparent; color: var(--alerte); border-color: color-mix(in srgb, var(--alerte) 40%, transparent); }
.bouton-petit { min-height: 44px; padding: 6px 14px; font-size: 15px; }
.rangee-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rangee-boutons .bouton { flex: 1 1 auto; }

/* ---------- Pastilles, puces, badges ---------- */
.puces { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  flex: none; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--trait); background: var(--surface); color: var(--encre);
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.puce.active { background: var(--vert); border-color: var(--vert); color: var(--sur-vert); }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--ambre-doux); color: var(--ambre); vertical-align: middle;
}
.badge-vert { background: var(--vert-doux); color: var(--vert-2); }
@media (prefers-color-scheme: dark) { .badge-vert { color: #8FD1B2; } }
.tag { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--encre-2); margin: 0 4px 4px 0; }

/* ---------- Champs ---------- */
.champ { display: block; margin: 0 0 14px; }
.champ > span, .champ > label, .libelle { display: block; font-size: 14px; font-weight: 650; color: var(--encre-2); margin-bottom: 6px; }
.saisie, .champ input:not([type=checkbox]):not([type=file]), .champ select, .champ textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--trait); background: var(--surface); color: var(--encre);
  -webkit-appearance: none; appearance: none;
}
.champ textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.champ select { background-image: linear-gradient(45deg, transparent 50%, var(--encre-2) 50%), linear-gradient(135deg, var(--encre-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.saisie:focus, .champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--vert-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vert-2) 25%, transparent); }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trois-colonnes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.case { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.case input { width: 22px; height: 22px; accent-color: var(--vert-2); }
.aide-texte { font-size: 14px; color: var(--encre-2); }
.erreur { color: var(--alerte); font-weight: 600; }

.choix-photo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.choix-photo .apercu { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; background: var(--surface-2); flex: none; }
.choix-photo label.bouton { position: relative; overflow: hidden; }
.choix-photo input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }

/* ---------- Cartes ---------- */
.carte { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px; margin-bottom: 12px; }
.section-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 0 10px; }
.section-titre h2, .section-titre h3 { font-size: 1.1rem; }
.section-titre .compte { color: var(--encre-2); font-size: 14px; }

/* ---------- Recettes : liste ---------- */
.recherche { margin-bottom: 10px; }
.grille-recettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
@media (min-width: 600px) { .grille-recettes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.carte-recette { display: block; background: var(--surface); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); text-decoration: none; color: inherit; position: relative; }
.carte-recette img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.carte-recette .corps { padding: 10px 12px 12px; }
.carte-recette h3 { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.carte-recette .meta { font-size: 13px; color: var(--encre-2); margin-top: 4px; }
.carte-recette .badge { position: absolute; top: 8px; left: 8px; }
.carte-recette .coeur { position: absolute; top: 6px; right: 8px; color: var(--corail); }
.carte-recette .coeur svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }

/* ---------- Recette : fiche ---------- */
.fiche-photo { margin: -16px -16px 0; position: relative; }
.fiche-photo img { width: 100%; aspect-ratio: 4 / 3; max-height: 48vh; object-fit: cover; background: var(--surface-2); }
.fiche-titre { margin: 16px 0 6px; font-size: 1.6rem; overflow-wrap: anywhere; }
.bandeau {
  display: flex; justify-content: space-around; gap: 6px;
  background: var(--vert); color: var(--sur-vert);
  margin: 14px -16px; padding: 16px 12px;
}
.pastille { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.pastille .rond {
  width: 66px; height: 66px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--sur-vert) 70%, transparent);
  display: grid; place-items: center; text-align: center; font-weight: 750; font-size: 17px; line-height: 1.05;
}
.pastille .rond small { display: block; font-size: 11px; font-weight: 600; opacity: .85; }
.pastille .legende { font-size: 13px; opacity: .9; }
.couverts { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 8px; font-size: 18px; font-weight: 650; }
.couverts .compteur { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--trait); border-radius: 999px; background: var(--surface); }
.couverts .compteur button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--vert-2); }
.couverts .compteur output { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.grille-ingredients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; margin: 12px 0 8px; }
.ingredient { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.vignette {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--t, var(--r-autre)) 22%, var(--surface)); color: var(--t, var(--r-autre));
  font-family: var(--police-titre); font-weight: 800; font-size: 22px; text-transform: uppercase;
  border: 2px solid color-mix(in srgb, var(--t, var(--r-autre)) 45%, transparent);
}
.ingredient .qte { font-weight: 750; font-size: 15px; }
.ingredient .nom { font-size: 14px; color: var(--encre-2); overflow-wrap: anywhere; line-height: 1.25; }
.ingredient .note { font-size: 12px; color: var(--encre-2); font-style: italic; }
.placard { background: var(--surface-2); border-radius: var(--rayon); padding: 12px 14px; margin: 16px 0; }
.placard h3 { font-size: 15px; margin-bottom: 6px; }
.placard ul { margin: 0; padding-left: 20px; color: var(--encre-2); }
.etapes { list-style: none; padding: 0; margin: 10px 0; counter-reset: etape; }
.etapes li { position: relative; padding: 4px 0 14px 46px; counter-increment: etape; overflow-wrap: anywhere; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--vert); color: var(--sur-vert); font-weight: 750; font-size: 15px;
}
.source { font-size: 14px; color: var(--encre-2); overflow-wrap: anywhere; }
.bandeau-brouillon { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ambre-doux); color: var(--encre); border-radius: var(--rayon); padding: 10px 12px; margin: 12px 0; }

/* r-* : teinte par rayon */
.r-fruits-legumes { --t: var(--r-fruits-legumes); } .r-frais { --t: var(--r-frais); }
.r-boucherie-poisson { --t: var(--r-boucherie-poisson); } .r-surgeles { --t: var(--r-surgeles); }
.r-epicerie-salee { --t: var(--r-epicerie-salee); } .r-epicerie-sucree { --t: var(--r-epicerie-sucree); }
.r-boissons { --t: var(--r-boissons); } .r-ustensiles { --t: var(--r-ustensiles); }
.r-maison { --t: var(--r-maison); } .r-hygiene { --t: var(--r-hygiene); } .r-autre { --t: var(--r-autre); }

/* ---------- Mode en cuisine ---------- */
.cuisine {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--vert); color: var(--sur-vert);
  padding: calc(var(--haut) + 8px) calc(16px + var(--droite)) calc(var(--bas) + 12px) calc(16px + var(--gauche));
  touch-action: pan-y;
}
.cuisine-haut { display: flex; align-items: center; gap: 8px; }
.cuisine-haut .progression { flex: 1; font-weight: 650; }
.cuisine .bouton-icone { color: var(--sur-vert); }
.cuisine .bouton-icone:active { background: rgba(255,255,255,.12); }
.cuisine-barre { height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); margin: 6px 0 0; overflow: hidden; }
.cuisine-barre span { display: block; height: 100%; background: var(--corail); transition: width .25s ease; }
.cuisine-etape { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; padding: 16px 4px; }
.cuisine-etape .numero { font-family: var(--police-titre); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-bottom: 10px; }
.cuisine-etape p { font-size: clamp(22px, 6.2vw, 30px); line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.cuisine-ingredients { background: rgba(255,255,255,.08); border-radius: var(--rayon); padding: 10px 14px; margin-top: 8px; max-height: 40vh; overflow-y: auto; }
.cuisine-ingredients ul { margin: 0; padding-left: 18px; }
.cuisine-bas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cuisine-bas .bouton { min-height: 56px; font-size: 17px; }
.cuisine-bas .bouton-contour { color: var(--sur-vert); border-color: rgba(255,255,255,.35); }
.cuisine-veille { font-size: 13px; opacity: .8; text-align: center; margin: 8px 0 4px; min-height: 18px; }

/* ---------- Courses ---------- */
.barre-ajout { position: sticky; top: calc(var(--entete) + var(--haut)); z-index: 10; margin: -16px -16px 8px; padding: 10px 16px; background: var(--fond); }
.barre-ajout form { display: flex; gap: 8px; }
.barre-ajout input { flex: 1; min-width: 0; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--trait); background: var(--surface); }
.barre-ajout input:focus { outline: none; border-color: var(--vert-2); }
.barre-ajout .bouton { width: 50px; min-height: 50px; padding: 0; border-radius: 14px; flex: none; }
.suggestions { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--surface); border-radius: 14px; box-shadow: var(--ombre); }
.suggestions button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 0; background: transparent; border-radius: 10px; text-align: left; cursor: pointer; }
.suggestions button:active, .suggestions button.focus { background: var(--surface-2); }
.suggestions .rayon-nom { font-size: 13px; color: var(--encre-2); }
.rayon-titre { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 750; color: var(--encre-2); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 6px; }
.rayon-titre::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--t, var(--r-autre)); }
.articles { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.article { display: flex; align-items: center; min-height: 56px; border-top: 1px solid var(--trait); }
.article:first-child { border-top: 0; }
.article .cocher { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 4px 8px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.article .rond { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--trait); flex: none; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.article .rond svg { width: 16px; height: 16px; opacity: 0; color: #fff; }
.article .texte { flex: 1; min-width: 0; }
.article .nom { display: block; font-size: 17px; overflow-wrap: anywhere; }
.article .origine { display: block; font-size: 13px; color: var(--encre-2); overflow-wrap: anywhere; }
.article .origine a { color: var(--vert-2); }
.article .qte { flex: none; font-weight: 650; color: var(--encre-2); font-variant-numeric: tabular-nums; padding-left: 6px; }
.article .plus { width: 44px; height: 56px; border: 0; background: transparent; color: var(--encre-2); cursor: pointer; flex: none; display: grid; place-items: center; }
.article .plus svg { width: 20px; height: 20px; }
.article.coche .rond, .article.cochant .rond { background: var(--vert-2); border-color: var(--vert-2); }
.article.coche .rond svg, .article.cochant .rond svg { opacity: 1; }
.article.coche .nom, .article.cochant .nom { text-decoration: line-through; color: var(--encre-2); }
.article.coche { opacity: .7; }
.article.cochant { animation: descend .32s ease-in forwards; }
.article.arrive { animation: arrive .3s ease-out; }
.article.local .nom::after { content: " ·"; color: var(--ambre); font-weight: 900; }
@keyframes descend { 0% { transform: none; opacity: 1; } 60% { opacity: .8; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes arrive { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .article.cochant, .article.arrive { animation: none; } }

/* ---------- Bucket list ---------- */
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.segments a { min-height: 44px; display: grid; place-items: center; border-radius: 10px; text-decoration: none; color: var(--encre-2); font-weight: 650; font-size: 15px; }
.segments a.actif { background: var(--surface); color: var(--encre); box-shadow: var(--ombre); }
.rituel { background: var(--vert); color: var(--sur-vert); border-radius: var(--rayon); padding: 14px; margin-bottom: 14px; }
.rituel h3 { font-size: 1.05rem; }
.rituel p { margin: 6px 0 10px; font-size: 14px; opacity: .9; }
.rituel .semaines { display: flex; gap: 6px; margin: 10px 0 12px; align-items: flex-end; }
.rituel .semaine { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; opacity: .85; min-width: 0; }
.rituel .semaine span:first-child { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); }
.rituel .semaine.faite span:first-child { background: var(--corail); border-color: var(--corail); }
.rituel .fait-semaine { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rituel .bouton-contour { color: var(--sur-vert); border-color: rgba(255,255,255,.4); }
.liste-activites { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.liste-activites li { border-top: 1px solid var(--trait); }
.liste-activites li:first-child { border-top: 0; }
.liste-activites a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; text-decoration: none; color: inherit; }
.liste-activites .emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; font-size: 20px; }
.liste-activites .texte { flex: 1; min-width: 0; }
.liste-activites .titre { display: block; overflow-wrap: anywhere; }
.liste-activites .sous { display: block; font-size: 13px; color: var(--encre-2); }
.compteur-x { font-weight: 800; color: var(--corail); font-size: 14px; flex: none; }
.fiche-activite .photo-activite { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon); margin-bottom: 12px; background: var(--surface-2); }
.fiche-activite h2 { font-size: 1.45rem; overflow-wrap: anywhere; }
.fiche-activite .notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.souvenirs { display: grid; gap: 12px; }
.souvenir { display: flex; gap: 12px; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 10px; text-decoration: none; color: inherit; border: 0; width: 100%; text-align: left; cursor: pointer; }
.souvenir img, .souvenir .sans-photo { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; font-size: 28px; }
.souvenir .texte { flex: 1; min-width: 0; }
.souvenir .titre { font-weight: 650; overflow-wrap: anywhere; display: block; }
.souvenir .date { font-size: 13px; color: var(--encre-2); display: block; }
.souvenir .commentaire { font-size: 14px; display: block; overflow-wrap: anywhere; margin-top: 2px; }
.carte-souvenirs { height: calc(100dvh - var(--entete) - var(--haut) - var(--onglets) - var(--bas) - 140px); min-height: 280px; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); z-index: 0; }
.carte-choix { height: 240px; border-radius: 14px; overflow: hidden; margin-bottom: 8px; z-index: 0; }
.tirage { text-align: center; padding: 18px 8px; }
.tirage .emoji-grand { font-size: 46px; }
.tirage h3 { font-size: 1.4rem; margin: 8px 0 4px; overflow-wrap: anywhere; }

/* ---------- Feuille (modale du bas) ---------- */
.calque { position: fixed; inset: 0; z-index: 50; background: rgba(20, 18, 15, .45); display: flex; align-items: flex-end; justify-content: center; }
.feuille {
  width: 100%; max-width: 640px; max-height: calc(100dvh - var(--haut) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--fond); border-radius: 22px 22px 0 0;
  padding: 10px calc(16px + var(--droite)) calc(20px + var(--bas)) calc(16px + var(--gauche));
  animation: monte .22s ease-out;
}
.feuille::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--trait); margin: 0 auto 10px; }
.feuille h2 { margin-bottom: 14px; }
@keyframes monte { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--onglets) + var(--bas) + 12px); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
body.avec-action .toasts { bottom: calc(var(--onglets) + var(--bas) + var(--action) + 12px); }
.toast { background: var(--encre); color: var(--fond); padding: 10px 16px; border-radius: 14px; font-size: 15px; box-shadow: var(--ombre); pointer-events: auto; max-width: 100%; overflow-wrap: anywhere; animation: arrive .2s ease-out; }
.toast a { color: inherit; font-weight: 700; margin-left: 6px; }

/* ---------- Réglages ---------- */
.ligne-session { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--trait); }
.ligne-session:first-of-type { border-top: 0; }
.ligne-session .texte { flex: 1; min-width: 0; }
.ligne-session .sous { display: block; font-size: 13px; color: var(--encre-2); }
.code-jumelage { font: 800 34px/1.1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; text-align: center; padding: 16px; background: var(--surface-2); border-radius: 14px; margin: 10px 0; user-select: all; }
.lien-invitation { font: 14px ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 12px; padding: 10px; user-select: all; }

/* ---------- Pages seules (connexion, invitation) ---------- */
.page-seule { display: grid; place-items: center; padding: calc(24px + var(--haut)) 16px calc(24px + var(--bas)); }
.carte-seule { width: 100%; max-width: 420px; background: var(--surface); border-radius: 22px; box-shadow: var(--ombre); padding: 28px 22px; text-align: center; }
.carte-seule .logo { margin: 0 auto 12px; border-radius: 18px; }
.carte-seule h1 { font-size: 1.6rem; }
.sous-titre { color: var(--encre-2); margin: 6px 0 18px; }
.formulaire { display: grid; gap: 10px; text-align: left; margin: 12px 0; }
.formulaire label { font-weight: 650; font-size: 14px; color: var(--encre-2); }
.formulaire input { min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--trait); background: var(--fond); text-align: center; letter-spacing: .06em; }
.formulaire .bouton { min-height: 52px; }
.aide { text-align: left; margin-top: 14px; color: var(--encre-2); font-size: 15px; }
.aide summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 650; color: var(--vert-2); }

/* Leaflet : la carte forme son propre contexte d'empilement (z-index: 0 sur
   .carte-souvenirs et .carte-choix) et reste donc sous l'en-tête et les onglets. */
.leaflet-container { font: inherit; background: var(--surface-2); position: relative; }

.barre-ajout-simple { display: flex; gap: 8px; align-items: flex-start; }
.barre-ajout-simple .champ { flex: 1; min-width: 0; margin: 0; }
.barre-ajout-simple .bouton { min-height: 48px; }
.popup-photo { width: 160px; max-width: 100%; border-radius: 8px; margin-top: 6px; }
.lien-rituel { color: inherit; text-decoration: none; }
.article .nom::first-letter, .ingredient .nom::first-letter, .suggestions span:first-child::first-letter { text-transform: uppercase; }
