/* Flemme — fond de frigo, étiquettes de circulaire.
 * Jaune = prix de la circulaire. Vert = bon prix ou « fait ». Rouge = attention. Encre = sélection. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(polices/archivo-latin-standard-normal.woff2) format("woff2-variations"), url(polices/archivo-latin-standard-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(polices/archivo-latin-ext-standard-normal.woff2) format("woff2-variations"), url(polices/archivo-latin-ext-standard-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --sortie: cubic-bezier(.2, .8, .2, 1);
  --ressort: cubic-bezier(.34, 1.45, .64, 1);
  --fond: #E9EFEC;
  --carte: #FFFFFF;
  --encre: #1D2B2A;
  --encre-2: #56655F;
  --encre-3: #7F8D88;
  --ligne: #D3DCD8;
  --sticker: #FFD23F;
  --sticker-encre: #2A2100;
  --basilic: #2B7148;
  --ketchup: #B3322A;
  --ketchup-pale: #F8E3E0;
  --focus: #1F5FBF;
  --r: 14px;
  --police: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 62px;
  --cible: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font-family: var(--police); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 20px);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, [data-ticker] { font-variant-numeric: tabular-nums; }
s { color: var(--encre-2); font-weight: 500; text-decoration-thickness: 1.5px; }

/* ---------- En-tête et navigation ---------- */
.entete { position: relative; z-index: 12; background: var(--fond); padding: calc(env(safe-area-inset-top) + 10px) 16px 2px; }
.entete-ligne { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; min-height: var(--cible); }
.marque { margin: 0; font-size: 27px; line-height: 1; font-weight: 900; font-stretch: 66%; letter-spacing: -0.01em; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.marque .logo { width: 28px; height: 30px; margin-top: -4px; }
.etat-circ {
  margin-left: auto; border: 0; background: none; padding: 0; font-size: 13px; color: var(--encre-2); text-align: right; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 7px; min-height: var(--cible);
}
.etat-circ .point { width: 8px; height: 8px; border-radius: 50%; background: var(--encre-3); flex: none; }
.etat-circ .point.ok { background: var(--basilic); }
.etat-circ .point.erreur { background: var(--ketchup); }
.etat-circ .point.charge { animation: pulse 1s ease-in-out infinite alternate; }
.etat-circ .point.hors { background: transparent; border: 2px solid var(--encre-2); }
@keyframes pulse { to { opacity: .3; } }

.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--carte); border-top: 1px solid var(--ligne);
  padding: 4px max(6px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
}
.onglets button {
  border: 0; background: none; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; color: var(--encre-2); border-radius: 12px;
}
.onglets button[aria-current="page"] { color: var(--encre); font-weight: 800; }
.onglets button[aria-current="page"] svg { stroke-width: 2.4; }
.lib-bureau { display: none; }

/* ---------- Mise en page ---------- */
html { scrollbar-gutter: stable; }
.vue { max-width: 560px; margin: 0 auto; padding: 0 16px 24px; outline: none; }
.titre-vue { font-size: 32px; line-height: 1.02; margin: 14px 0 4px; font-weight: 900; font-stretch: 66%; letter-spacing: -0.01em; }
.sous-titre { margin: 0 0 16px; color: var(--encre-2); }
.section { font-size: 19px; font-weight: 800; font-stretch: 78%; margin: 28px 0 10px; line-height: 1.15; }
.discret { color: var(--encre-2); }
.petit { font-size: 13px; }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); }
.pile > * + * { margin-top: 10px; }
.colonne-liste, .colonne-plan { min-width: 0; }
.rangee { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; }
.rangee.centre { justify-content: center; margin-top: 14px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--encre);
  background: var(--encre); color: #fff; font-weight: 700; white-space: nowrap;
}
.btn.secondaire { background: transparent; color: var(--encre); }
.btn.plein { width: 100%; margin-top: 10px; }
.btn.petit { min-height: var(--cible); padding: 0 16px; font-size: 15px; }
.btn.danger { background: var(--ketchup); border-color: var(--ketchup); }
.btn svg { width: 19px; height: 19px; }
.lien {
  border: 0; background: none; padding: 0; color: var(--encre); font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1.5px; display: inline-flex; gap: 6px; align-items: center; min-height: var(--cible);
}
.lien svg { width: 18px; height: 18px; }
.lien.danger { color: var(--ketchup); }
.icone-btn {
  display: inline-grid; place-items: center; width: var(--cible); height: var(--cible); border-radius: 50%;
  border: 1px solid var(--ligne); background: var(--carte); color: var(--encre); padding: 0; flex: none; font-size: 20px; line-height: 1;
}
.icone-btn svg { width: 20px; height: 20px; }
.icone-btn[aria-pressed="true"], .icone-btn.actif { background: var(--encre); color: #fff; border-color: var(--encre); }

/* ---------- Étiquette de prix de circulaire (jaune = circulaire, rien d'autre) ---------- */
.etiquette {
  --pointe: 12px;
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  background: var(--sticker) radial-gradient(circle at calc(var(--pointe) + 1px) 50%, var(--fond) 3.5px, transparent 4px);
  color: var(--sticker-encre);
  padding: 7px 12px 7px calc(var(--pointe) + 11px);
  clip-path: polygon(var(--pointe) 0, 100% 0, 100% 100%, var(--pointe) 100%, 0 50%);
  transform: rotate(-3deg); line-height: 1; flex: none;
}
.etiquette .montant { font-size: 30px; font-weight: 900; font-stretch: 62%; letter-spacing: -0.02em; white-space: nowrap; }
.etiquette .montant sup { font-size: .52em; vertical-align: .55em; margin-left: 1px; }
.etiquette .legende { font-size: 12px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.etiquette.petite { --pointe: 8px; padding: 4px 8px 4px calc(var(--pointe) + 8px); }
.etiquette.petite .montant { font-size: 20px; }
.spec { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--encre); }
.spec::before { content: ""; width: 11px; height: 11px; background: var(--sticker); clip-path: polygon(35% 0, 100% 0, 100% 100%, 35% 100%, 0 50%); flex: none; }

/* ---------- Pictos ---------- */
.pictos { display: inline-flex; gap: 3px; align-items: center; color: var(--encre-2); }
.pictos svg { width: 22px; height: 22px; stroke-width: 1.6; }
.temps { display: inline-flex; align-items: center; gap: 4px; }
.temps svg { width: 15px; height: 15px; }

/* ---------- Semaine ---------- */
.bilan { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px; margin-bottom: 12px; }
.bilan .gros { font-size: 46px; line-height: .9; font-weight: 900; font-stretch: 62%; letter-spacing: -0.02em; }
.bilan .gros small { font-size: .5em; letter-spacing: 0; }
.bilan .sous { margin-top: 6px; font-size: 14px; color: var(--encre-2); }
.bilan .sous b { color: var(--encre); font-weight: 700; }
.sacs-mini { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; color: var(--encre-2); white-space: nowrap; flex: none; }
.duo { display: flex; gap: 3px; }
.sac { width: 30px; height: 36px; }
.sac .contour { fill: none; stroke: var(--encre); stroke-width: 2.4; }
.sac .rempli { fill: var(--basilic); transition: y .5s var(--ressort), height .5s var(--ressort); }
.sac .prevu { fill: var(--basilic); opacity: .25; }
.sac.trop .prevu { fill: var(--ketchup); opacity: .3; }
.sac.trop .rempli { fill: var(--ketchup); }

/* même hauteur pour toutes les cartes (1 ou 2 soirs, titre court ou long) : changer un repas ne déplace rien */
.repas { display: grid; grid-template-columns: 64px 1fr; align-items: stretch; overflow: hidden; min-height: var(--h-repas, 125px); }
.repas.verrouille { border-color: var(--encre); }
.repas.aujourdhui { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); }
.repas.passe { opacity: .5; }
.repas .dates { display: flex; flex-direction: column; border-right: 1px solid var(--ligne); }
.repas .date { padding: 13px 0 11px 14px; font-stretch: 68%; line-height: 1; flex: 1; }
.repas .date b { display: block; font-size: 21px; font-weight: 900; }
.repas .date span { display: block; font-size: 13px; color: var(--encre-2); margin-top: 3px; font-stretch: 85%; }
.repas .date.restes { border-top: 1px dashed var(--ligne); }
.repas .date.restes b { color: var(--encre-2); }
.repas .date.ajd b, .repas .date.restes.ajd b { color: var(--encre); font-size: 17px; }
.repas .droite { display: flex; flex-direction: column; min-width: 0; }
.repas .corps { padding: 13px 14px 2px; border: 0; background: none; text-align: left; display: flex; flex-direction: column; gap: 4px; width: 100%; color: inherit; }
.repas .ligne-nom { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.repas .nom { font-size: 18px; font-weight: 800; font-stretch: 85%; line-height: 1.18; min-height: 2.36em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
@media (max-width: 380px) { .repas .nom { font-size: 16.5px; } .repas .corps { padding-right: 12px; } }
.repas .cout, .ligne-recette .cout { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.repas .cout { font-weight: 800; font-stretch: 72%; font-size: 19px; line-height: 1; text-align: right; white-space: nowrap; }
.repas .cout small, .ligne-recette .cout small { font-weight: 500; font-size: 13px; color: var(--encre-2); font-stretch: 100%; }
.repas .cout s, .ligne-recette .cout s { font-size: 14px; font-stretch: 85%; }
.repas .ingr { display: none; font-size: 14px; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repas .pied { display: flex; align-items: center; gap: 8px; padding: 2px 10px 10px 14px; margin-top: auto; }
.repas .meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; font-size: 13px; color: var(--encre-2); margin-right: auto; min-width: 0; white-space: nowrap; }
.repas .meta > * { flex: none; }
.repas .meta > .spec { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.repas .spec-long { display: none; }
.repas .meta > .spec::before { display: inline-block; vertical-align: -1px; margin-right: 6px; }
.actions-semaine { margin-top: 18px; }

/* ---------- Bandeaux ---------- */
.bandeau { display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 14px; border-radius: var(--r); background: var(--carte); border: 1px solid var(--ligne); font-size: 14px; margin: 10px 0; }
.bandeau p { margin: 0; flex: 1; }
.bandeau.erreur { background: var(--ketchup-pale); border-color: transparent; color: var(--ketchup); }
.bandeau.erreur .btn.secondaire { border-color: var(--ketchup); color: var(--ketchup); }

/* ---------- Liste ---------- */
.barre-panier { padding: 10px 0 12px; background: var(--fond); }
.barre-panier.collante { position: sticky; top: 0; z-index: 4; margin: 0 -16px; padding: 10px 16px 12px; }
.barre-panier .ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--encre-2); min-height: 36px; }
.barre-panier .ligne b { color: var(--encre); font-size: 16px; }
.barre-panier .poids { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.barre-panier .poids .sac { width: 24px; height: 29px; }
.barre-panier .poids.trop { color: var(--ketchup); font-weight: 700; }
.barre-panier .fin { display: inline-flex; align-items: center; gap: 8px; color: var(--encre); min-width: 0; }
.barre-panier .fin .sac { width: 24px; height: 29px; }
.barre-panier .fin b { font-size: 17px; font-weight: 900; font-stretch: 72%; white-space: nowrap; }
.barre-panier .fin .duo { gap: 2px; }
.barre-panier .btn-fin { border: 0; border-radius: 999px; background: var(--encre); color: #fff; font-weight: 800; font-size: 14px; min-height: 36px; padding: 0 16px; flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.barre-panier .btn-fin svg { width: 18px; height: 18px; stroke-width: 2.6; }
.barre-panier.complet .barre-progres i { background: var(--basilic); }
.barre-panier.joue .fin .duo { animation: sacs-pleins .8s var(--ressort) both; }
.barre-panier.joue .btn-fin { animation: arriver .4s var(--sortie) .15s both; }
.barre-progres { height: 6px; border-radius: 3px; background: var(--ligne); margin-top: 6px; overflow: hidden; }
.barre-progres i { display: block; height: 100%; background: var(--basilic); border-radius: 3px; transition: width .45s var(--ressort); }
.rayon-titre { font-size: 15px; font-weight: 800; font-stretch: 80%; color: var(--encre-2); margin: 22px 0 4px; }
.groupe { border-top: 1px solid var(--ligne); }
.achat { display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--ligne); }
.achat:has(.retirer) { grid-template-columns: 1fr auto auto; }
.achat .cocher { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; padding: 12px 6px 12px 0; border: 0; background: none; text-align: left; min-height: 60px; color: inherit; }
.case { width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--encre); display: grid; place-items: center; margin-top: 1px; background: var(--carte); transition: background .15s, border-color .15s, transform .15s var(--ressort); }
.case svg { width: 17px; height: 17px; stroke-width: 3; opacity: 0; color: #fff; }
.achat.fait .case { background: var(--basilic); border-color: var(--basilic); }
.achat.fait .case svg { opacity: 1; }
.achat.vient .case { animation: pop-case .3s var(--ressort); }
.achat.vient .case svg { stroke-dasharray: 24; animation: tracer .28s var(--sortie) both; }
@keyframes pop-case { 50% { transform: scale(1.12); } }
.achat.fait .prix-btn, .achat.fait .prix-btn.statique { opacity: .5; transition: opacity .2s; }
.achat .texte { min-width: 0; }
.achat .quoi { display: block; font-weight: 700; line-height: 1.25; }
.qte { display: inline-block; font-weight: 900; font-stretch: 75%; padding: 0 6px; border-radius: 6px; background: var(--encre); color: #fff; font-size: 14px; margin-left: 4px; vertical-align: 1px; }
.achat .format { display: block; font-size: 14px; color: var(--encre-2); margin-top: 2px; line-height: 1.3; }
.achat .attendre { display: block; font-size: 13px; color: var(--ketchup); margin-top: 3px; font-weight: 600; }
.achat .quoi, .achat .format { transition: color .2s; }
/* le trait suit chaque ligne de texte, même sur deux lignes */
.achat .t { background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0% 1.5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .28s var(--sortie); }
.achat.fait .quoi, .achat.fait .format { color: var(--encre-2); }
.achat.fait .t { background-size: 100% 1.5px; }
.achat.fait .qte { background: var(--encre-2); }
.achat .prix-btn { border: 0; background: none; padding: 10px 0 10px 4px; display: flex; align-items: center; justify-content: flex-end; min-height: 60px; color: inherit; }
.achat .prix-btn > span { display: flex; flex-direction: column; align-items: flex-end; }
.achat .prix-btn > svg { width: 16px; height: 16px; color: var(--encre-3); margin-left: 2px; }
.achat .prix-btn.statique { padding-right: 8px; }
.achat .valeur { font-weight: 800; font-stretch: 72%; font-size: 19px; line-height: 1; white-space: nowrap; }
.achat .unit { display: block; font-size: 12px; color: var(--encre-2); margin-top: 4px; white-space: nowrap; }
.achat .etiquette.petite { margin: -2px -2px 2px 0; }
.achat .retirer { border-color: transparent; background: transparent; color: var(--encre-2); }
.ajout { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.ajout .champ { flex: 1; }
.ligne-simple { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0; border: 0; border-bottom: 1px solid var(--ligne); background: none; text-align: left; color: inherit; }
.ligne-simple span:first-child { flex: 1; font-weight: 600; }
.ligne-simple svg { width: 16px; height: 16px; color: var(--encre-3); }
details.panier { margin-top: 18px; }
details.panier > summary, details.pli > summary {
  list-style: none; cursor: pointer; font-weight: 800; font-stretch: 80%; font-size: 16px; padding: 0; min-height: var(--cible);
  display: flex; gap: 8px; align-items: center;
}
details.panier > summary { color: var(--encre-2); font-size: 15px; }
details.panier > summary::-webkit-details-marker, details.pli > summary::-webkit-details-marker { display: none; }
details > summary svg { width: 16px; height: 16px; transition: transform .15s; }
details[open] > summary svg { transform: rotate(90deg); }
details.pli { margin-top: 20px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces.filtres { margin-bottom: 8px; }
.puce {
  border: 1.5px solid var(--encre-3); background: transparent; border-radius: 999px; padding: 0 15px; font-size: 15px;
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--cible);
}
.puce svg { width: 16px; height: 16px; stroke-width: 2.6; flex: none; }
.puce[aria-pressed="true"] { border-color: var(--encre); background: var(--encre); color: #fff; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 24px; padding: 14px 16px; border-radius: var(--r); background: var(--encre); color: #fff; }
.total b { font-size: 30px; font-weight: 900; font-stretch: 64%; }

/* ---------- Circulaire ---------- */
.offre { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 14px 16px; width: 100%; text-align: left; color: inherit; }
.offre .haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.offre .titre { font-weight: 800; font-stretch: 85%; font-size: 17px; line-height: 1.2; display: block; }
.offre .pour { display: block; font-size: 13px; color: var(--encre-2); margin-top: 3px; }
.offre .etiquette { margin: -2px -2px 0 0; }
.jauge { display: flex; align-items: center; gap: 12px; }
.jauge .piste { flex: 1; height: 12px; border-radius: 6px; background: var(--ligne); overflow: hidden; }
.jauge .piste i { display: block; height: 100%; background: var(--sticker); border-right: 2px solid var(--sticker-encre); }
.jauge .pct { color: var(--basilic); font-size: 20px; font-weight: 900; font-stretch: 70%; white-space: nowrap; }
.offre .detail { font-size: 14px; color: var(--encre-2); font-variant-numeric: tabular-nums; }
.offre .notes { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--encre-2); }
.dans-liste { display: inline-flex; align-items: center; gap: 4px; color: var(--encre); font-weight: 700; font-size: 13px; margin-left: 8px; }
.dans-liste svg { width: 14px; height: 14px; stroke-width: 2.6; }
.offre .notes .dans-liste { margin-left: 0; }
.segment.large { margin-bottom: 14px; }
.item-circ { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--ligne); font-size: 14px; min-height: 52px; }
.item-circ > span { flex: 1; }
.item-circ small { display: block; color: var(--encre-2); font-size: 13px; }
.item-circ b { font-weight: 700; white-space: nowrap; }
.item-circ .icone-btn { flex: none; }
.recherche { margin-bottom: 4px; }

/* ---------- Recettes (lignes) ---------- */
.grille-recettes { border-top: 1px solid var(--ligne); }
.ligne-recette {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; width: 100%;
  padding: 13px 0; border: 0; border-bottom: 1px solid var(--ligne); background: none; text-align: left; color: inherit; min-height: 64px;
}
.ligne-recette .nom { font-size: 17px; font-weight: 800; font-stretch: 85%; line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.ligne-recette .nom .fav svg { width: 16px; height: 16px; fill: var(--encre); stroke: var(--encre); }
.ligne-recette .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--encre-2); margin-top: 5px; }
.ligne-recette .cout { font-weight: 800; font-stretch: 72%; font-size: 19px; text-align: right; white-space: nowrap; line-height: 1.1; }
.ligne-recette .cout small { display: block; margin-top: 3px; }
.ligne-recette .cout small.moins { color: var(--basilic); font-weight: 700; }
.ligne-recette.attenuee { opacity: .5; }

/* ---------- Panneau de détail ---------- */
.voile { position: fixed; inset: 0; background: rgba(20, 30, 28, .45); z-index: 20; }
.feuille {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 90vh; overflow-y: auto;
  background: var(--carte); border-radius: 20px 20px 0 0; padding: 0 18px calc(24px + env(safe-area-inset-bottom));
  max-width: 600px; margin: 0 auto; overscroll-behavior: contain; animation: monter .34s var(--sortie);
  box-shadow: 0 -10px 40px rgba(20, 40, 35, .12);
}
.feuille.ferme { animation: descendre .17s ease-in forwards; }
.voile { animation: fondu .25s ease-out; }
.voile.ferme { animation: fondu .17s ease-in reverse forwards; }
@keyframes monter { from { transform: translateY(100%); } }
@keyframes descendre { to { transform: translateY(100%); } }
@keyframes glisser { from { transform: translateX(40px); opacity: .4; } }
@keyframes sortir-droite { to { transform: translateX(60px); opacity: 0; } }
@keyframes fondu { from { opacity: 0; } }

.tete { position: sticky; top: 0; background: var(--carte); padding: 14px 0 8px; z-index: 1; }
.tete-ligne { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tete h2 { font-size: 27px; line-height: 1.05; font-weight: 900; font-stretch: 68%; margin: 4px 0 0; }
.resume { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--encre-2); font-size: 14px; margin: 2px 0 6px; }
.resume .num { color: var(--encre); font-weight: 700; display: inline-flex; gap: 6px; align-items: baseline; }
.resume .num small { font-weight: 500; color: var(--encre-2); }
.ingredients { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ligne); }
.ingredients li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--ligne); font-size: 15px; }
.ingredients.cochables li { display: grid; grid-template-columns: 20px auto 1fr; gap: 12px; align-items: center; cursor: pointer; min-height: var(--cible); }
.ingredients li span:last-child { color: var(--encre-2); text-align: right; }
.ingredients .nom-ing { max-width: 15em; }
.ingredients li.opt span:first-child { color: var(--encre-2); }
.etapes { padding-left: 0; margin: 0; list-style: none; counter-reset: e; }
.etapes.cochables li { display: block; padding: 0; }
.etapes.cochables li::before { content: none; }
.etapes li { counter-increment: e; display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 7px 0; }
.etapes li::before { content: counter(e); font-weight: 900; font-stretch: 62%; font-size: 25px; line-height: 1; }
.note { background: var(--fond); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.actions-feuille { margin-top: 20px; }
.formats { width: 100%; border-collapse: collapse; font-size: 14px; }
.formats th { font-size: 13px; font-weight: 600; color: var(--encre-2); text-align: left; padding: 0 4px 6px 0; border-bottom: 1px solid var(--ligne); }
.formats th.droite { text-align: right; }
.formats td { padding: 10px 4px 10px 0; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.formats td.droite { text-align: right; white-space: nowrap; padding-right: 0; }
.formats tr.choisi td:first-child { box-shadow: inset 3px 0 0 var(--encre); }
.formats .nom-format { font-weight: 600; display: block; }
.formats .detail { color: var(--encre-2); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 2px; }
.formats .detail .spec { font-weight: 600; }
.champ.prix-input { width: 88px; text-align: right; font-variant-numeric: tabular-nums; }
.panneau-colonne { padding-bottom: 24px; }
.panneau-colonne .tete { background: var(--fond); padding-top: 18px; }
.panneau-colonne .tete h2 { font-size: 32px; }
.panneau-colonne .note { background: var(--carte); border: 1px solid var(--ligne); }

/* ---------- Réglages ---------- */
.groupe-reglages { padding: 4px 16px; }
.reglage { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ligne); min-height: 60px; }
.reglage:last-child { border-bottom: 0; }
.reglage .lib { flex: 1; }
.reglage .lib small { display: block; color: var(--encre-2); font-size: 13px; margin-top: 1px; }
.reglage.colonne { flex-direction: column; align-items: stretch; }
.feuille > div > .reglage, .panneau-colonne .reglage { padding: 4px 0; }
.compteur { display: inline-flex; align-items: center; gap: 4px; }
.compteur output { min-width: 34px; text-align: center; font-weight: 900; font-stretch: 68%; font-size: 22px; }
.segment { display: flex; border: 1.5px solid var(--encre); border-radius: 999px; overflow: hidden; }
.segment button { border: 0; background: transparent; padding: 0 10px; min-height: var(--cible); font-size: 15px; white-space: nowrap; flex: 1; }
.segment button + button { border-left: 1px solid var(--ligne); }
.segment button[aria-pressed="true"] { background: var(--encre); color: #fff; }
@media (max-width: 380px) { .segment button { flex: 1 1 auto; font-size: 14px; padding: 0 8px; } }
.interrupteur { position: relative; width: 52px; height: 32px; border-radius: 999px; border: 0; background: var(--encre-3); padding: 0; flex: none; }
.interrupteur::before { content: ""; position: absolute; inset: -6px -4px; }
.interrupteur::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.interrupteur[aria-checked="true"] { background: var(--encre); }
.interrupteur[aria-checked="true"]::after { transform: translateX(20px); }
.champ { min-height: var(--cible); border: 1.5px solid var(--encre-3); border-radius: 10px; padding: 0 12px; background: var(--carte); width: 100%; }
.champ.court { width: 120px; }
textarea.champ { min-height: 100px; padding: 10px 12px; font-size: 14px; resize: vertical; }
.texte-court { padding: 2px 16px; font-size: 14px; color: var(--encre-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); overflow: hidden;
  animation: toast-in .28s var(--ressort);
  background: var(--encre); color: #fff; padding: 6px 6px 6px 16px; border-radius: 12px; z-index: 30; font-size: 14px;
  width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.18); display: flex; align-items: center; gap: 12px; min-height: 48px;
  pointer-events: none;
}
.toast span { padding: 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.toast-btn { pointer-events: auto; flex: none; }
.toast-btn { border: 0; background: transparent; color: var(--sticker); font-weight: 800; padding: 0 12px; min-height: var(--cible); border-radius: 8px; }
.toast-btn:only-child { display: none; }
.vide { text-align: center; padding: 36px 16px; color: var(--encre-2); }
.vide b { display: block; font-size: 20px; color: var(--encre); font-stretch: 80%; margin-bottom: 6px; }

/* =================== Bureau =================== */
@media (min-width: 1000px) {
  body { padding-bottom: 32px; }
  .entete { position: sticky; top: 0; z-index: 12; padding: 12px 32px; border-bottom: 1px solid var(--ligne); }
  .entete-ligne { max-width: 1240px; gap: 28px; }
  .marque { font-size: 30px; }
  .onglets { position: static; display: flex; gap: 4px; background: none; border: 0; padding: 0; }
  .onglets button { flex-direction: row; min-height: var(--cible); padding: 0 16px; font-size: 15px; gap: 8px; border-radius: 999px; }
  .onglets button svg { width: 18px; height: 18px; }
  .onglets { position: relative; }
  .onglets button { position: relative; z-index: 1; }
  .onglets button, .onglets button[aria-current="page"] { font-weight: 650; }
  .onglets button { transition: color .1s, background-color .15s; }
  .onglets button[aria-current="page"] { transition: color .12s .16s; }
  .onglets button[aria-current="page"] { background: transparent; color: #fff; }
  .onglets .seulement-mobile { display: none; }
  .lib-mobile { display: none; }
  .lib-bureau { display: inline; }
  .vue { max-width: 1240px; padding: 0 32px 32px; }
  .titre-vue { font-size: 40px; margin-top: 24px; }
  .toast { bottom: 28px; }

  .duo-vues { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); gap: 40px; align-items: start; }
  .duo-vues > .colonne-liste { position: sticky; top: 69px; max-height: calc(100vh - 69px); overflow-y: auto; padding: 0 6px 24px 2px; scrollbar-width: thin; }
  .repas { --h-repas: 142px; }
  .repas .ingr { display: block; }
  .repas .spec-court { display: none; } .repas .spec-long { display: inline; }
  .repas .nom { font-size: 19px; }

  .duo-circ { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 40px; align-items: start; }
  .duo-circ > aside { position: sticky; top: 69px; max-height: calc(100vh - 69px); overflow-y: auto; padding-bottom: 24px; }
  .grille-offres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .grille-offres > * + * { margin-top: 0; }

  .grille-recettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 0; }
  .grille-recettes .ligne-recette:nth-child(-n+2) { border-top: 1px solid var(--ligne); }
  .grille-reglages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; align-items: start; }

  /* tiroir de détail par-dessus la page, sans voile : rien ne se réorganise dessous, et on peut ouvrir un autre élément visible */
  .feuille {
    top: 69px; bottom: 0; left: auto; right: 0; width: 460px; max-width: 460px; max-height: none;
    border-radius: 0; padding: 0 28px 32px; animation-name: glisser; border-left: 1px solid var(--ligne);
    box-shadow: -12px 0 32px rgba(20, 40, 35, .08);
  }
}

/* =================== Mouvement et états ===================
 * Chaque animation répond à une action ou montre un changement. Tout s'éteint avec « réduire les animations ». */

/* --- logo : il se réveille à l'ouverture, il dort pendant la lecture de la circulaire --- */
.marque .z { transform-box: fill-box; transform-origin: 50% 50%; }
.eveil .marque .z { animation: z-pop .5s var(--ressort) both; }
.eveil .marque .z2 { animation-delay: .15s; } .eveil .marque .z3 { animation-delay: .3s; }
.dodo .marque .z { animation: z-dodo 1.8s ease-in-out infinite; }
.dodo .marque .z2 { animation-delay: .3s; } .dodo .marque .z3 { animation-delay: .6s; }
@keyframes z-pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
@keyframes z-dodo { 50% { transform: translate(1px, -3px); opacity: .25; } }

/* --- squelettes pendant le premier chargement --- */
.squelette i { display: block; height: 14px; border-radius: 6px; margin: 6px 0; background: linear-gradient(90deg, var(--ligne) 20%, #E4EBE8 45%, var(--ligne) 70%) 0 0 / 220% 100%; animation: miroiter 1.3s linear infinite; }
.bilan.squelette { align-items: center; min-height: 92px; }

.bilan.squelette { min-height: 102px; }
.repas.squelette .dates i { width: 32px; height: 24px; margin: 14px; }
.repas.squelette .droite { padding: 14px; }
@keyframes miroiter { to { background-position: -220% 0; } }

/* --- appui (tous les écrans) --- */
.btn, .icone-btn, .puce, .segment button, .lien, .minuterie-btn, .onglets button { transition: transform .12s var(--sortie), background-color .15s, border-color .15s, color .15s; }
.btn:active, .icone-btn:active, .puce:active, .segment button:active, .minuterie-btn:active { transform: scale(.95); }
.achat .cocher:active, .repas .corps:active, .ligne-recette:active, .ligne-simple:active, .etape:active, .ingredients.cochables li:active { background-color: rgba(29, 43, 42, .05); }
.achat .cocher:active .case { transform: scale(.88); }
.interrupteur::after { transition: transform .2s var(--ressort), width .15s; }
.interrupteur:active::after { width: 30px; }
.interrupteur[aria-checked="true"]:active::after { transform: translateX(14px); }
.icone-btn[data-action="alternatives"] svg { transition: transform .35s var(--ressort); }
.icone-btn[data-action="alternatives"]:active svg { transform: rotate(180deg); }
.onglets button:active svg { transform: translateY(1px) scale(.92); }
.onglets button svg { transition: transform .2s var(--ressort); }
.onglets button[aria-current="page"] svg { animation: onglet-actif .35s var(--ressort); }
@keyframes onglet-actif { 40% { transform: translateY(-3px); } }

/* --- survol (souris ou trackpad seulement) --- */
@media (hover: hover) {
  .btn:hover { background: #2E4240; border-color: #2E4240; }
  .btn.secondaire:hover { background: rgba(29, 43, 42, .07); border-color: var(--encre); }
  .btn.danger:hover { background: #962A23; border-color: #962A23; }
  .icone-btn:hover { border-color: var(--encre-3); }
  .icone-btn[data-action="alternatives"]:hover svg { transform: rotate(-14deg); }
  .lien:hover { text-decoration-thickness: 2.5px; }
  .puce:hover { border-color: var(--encre); }
  .onglets button:not([aria-current="page"]):hover { color: var(--encre); background: rgba(29, 43, 42, .06); }
  .carte.repas, .carte.offre { transition: transform .2s var(--sortie), box-shadow .2s, border-color .2s; }
  .carte.repas:hover, .carte.offre:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(20, 40, 35, .28); border-color: var(--encre-3); }
  .carte.repas.aujourdhui:hover, .carte.repas.verrouille:hover { border-color: var(--encre); }
  .achat:hover, .ligne-recette:hover, .ligne-simple:hover, .item-circ:hover { background: rgba(255, 255, 255, .6); }
  .offre .etiquette, .achat .etiquette { transition: transform .25s var(--ressort); }
  .offre:hover .etiquette { transform: rotate(1deg) scale(1.07); }
  .achat .prix-btn:hover .etiquette { transform: rotate(0deg) scale(1.05); }
  .prix-btn > svg, .ligne-simple svg { transition: transform .2s var(--sortie); }
  .prix-btn:hover > svg, .ligne-simple:hover svg { transform: translateX(3px); color: var(--encre); }
  .ingredients.cochables li:hover .case-mini { border-color: var(--encre); }
  .minuterie-btn:hover { background: var(--encre); color: #fff; }
}

/* --- focus clavier --- */
.achat .cocher:focus-visible, .prix-btn:focus-visible, .ligne-recette:focus-visible, .ligne-simple:focus-visible, .etape:focus-visible, .repas .corps:focus-visible, .ingredients.cochables li:focus-visible { outline-offset: -3px; }
.carte.offre:focus-visible { outline-offset: 2px; border-radius: var(--r); }

/* --- liste : l'article s'envole dans le sac --- */
.vol {
  position: fixed; z-index: 40; pointer-events: none; padding: 5px 10px; border-radius: 8px;
  background: var(--encre); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; max-width: 60vw; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(20, 40, 35, .25);
}
.duo.recoit { animation: recevoir .45s var(--ressort); }
@keyframes recevoir { 30% { transform: translateY(3px) scale(.94, 1.04); } 65% { transform: translateY(-3px) scale(1.06, .96); } }
@keyframes tracer { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.barre-panier { transition: box-shadow .2s; }
.barre-panier.colle { box-shadow: 0 10px 14px -12px rgba(20, 40, 35, .45); }
@keyframes sacs-pleins { 0% { transform: translateY(8px) scale(.8); opacity: 0; } 60% { transform: translateY(-4px) scale(1.06); opacity: 1; } }
.vide .sac { width: 54px; height: 64px; display: block; margin: 0 auto 10px; }

/* --- semaine : changer un repas, refaire la semaine --- */
.repas.roule .droite { animation: rouler .55s var(--ressort) both; }
.repas.roule { animation: eclat 1.1s ease-out; }
@keyframes rouler { from { transform: translateY(70%); opacity: 0; } }
@keyframes eclat { 0% { box-shadow: 0 0 0 3px var(--encre); } 100% { box-shadow: 0 0 0 0 transparent; } }
.semaine.cascade .repas { animation: arriver .45s var(--sortie) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes arriver { from { transform: translateY(14px); opacity: 0; } }
.total-semaine { position: relative; }
.delta-flottant {
  position: absolute; left: 0; top: -6px; transform: translateY(-100%); white-space: nowrap; pointer-events: none;
  font-size: 18px; font-weight: 900; font-stretch: 72%; animation: flotter 1.8s var(--sortie) forwards;
}
.delta-flottant.moins { color: var(--basilic); }
.delta-flottant.plus { color: var(--encre-2); }
@keyframes flotter { 0% { opacity: 0; transform: translateY(-60%); } 15% { opacity: 1; transform: translateY(-100%); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-160%); } }
.icone-btn.pop { animation: pop .4s var(--ressort); }
@keyframes pop { from { transform: scale(.4); } }

/* --- circulaire : les étiquettes se collent, la barre rétrécit jusqu'au prix du spécial --- */
.jauge .piste i { width: var(--cible); }
.entree-circ .offre:not(.vu) .etiquette { opacity: 0; }
.entree-circ .offre:not(.vu) .jauge i { width: 100%; }
.entree-circ .offre:not(.vu) .pct { opacity: 0; }
.entree-circ .offre.vu .etiquette { animation: coller .55s var(--ressort) both; animation-delay: calc(var(--n, 0) * 70ms + 60ms); }
.entree-circ .offre.vu .jauge i { animation: retrecir 1s var(--sortie) both; animation-delay: calc(var(--n, 0) * 70ms + 380ms); }
.entree-circ .offre.vu .pct { animation: fondu .3s ease-out both; animation-delay: calc(var(--n, 0) * 70ms + 1.1s); }
@keyframes coller { 0% { transform: rotate(-18deg) scale(1.6); opacity: 0; } 55% { transform: rotate(1.5deg) scale(.95); opacity: 1; } 100% { transform: rotate(-3deg) scale(1); } }
@keyframes retrecir { from { width: 100%; } to { width: var(--cible); } }

/* --- panneaux --- */
.panneau-colonne.arrive { animation: glisser .28s var(--sortie); }
/* en-tête et onglets : nommés seulement pendant un changement d'onglet, et montrés « en direct » (la pastille glisse avec sa propre transition) */
html.vt-onglet .entete { view-transition-name: entete; }
html.vt-onglet .onglets { view-transition-name: onglets; }
html.vt-onglet::view-transition-old(entete), html.vt-onglet::view-transition-old(onglets) { display: none; }
html.vt-onglet::view-transition-new(entete), html.vt-onglet::view-transition-new(onglets) { animation: none; }

/* --- toast : le temps qui reste pour annuler --- */
.toast.sort { animation: toast-out .18s ease-in forwards; }
.toast.avec-action::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .45);
  transform-origin: left; animation: decompte var(--duree, 5s) linear forwards;
}
@keyframes toast-in { from { transform: translate(-50%, 16px) scale(.96); opacity: 0; } }
@keyframes toast-out { to { transform: translate(-50%, 10px); opacity: 0; } }
@keyframes decompte { to { transform: scaleX(0); } }
body.avec-minuterie { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 32px + var(--h-minuteries, 0px)); }
body.avec-minuterie .toast { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 22px + var(--h-minuteries, 0px)); }
body.avec-minuterie .feuille { padding-bottom: calc(36px + env(safe-area-inset-bottom) + var(--h-minuteries, 0px)); }
/* feuille ouverte : elle cache la barre d'onglets, les minuteries descendent au bas de l'écran */
body.avec-feuille .minuteries { bottom: calc(env(safe-area-inset-bottom) + 12px); }
body.avec-feuille.avec-minuterie .toast { bottom: calc(env(safe-area-inset-bottom) + 22px + var(--h-minuteries, 0px)); }

/* --- champs : erreur et confirmation --- */
.champ { transition: border-color .2s, box-shadow .2s; }
.champ:focus { border-color: var(--encre); outline: none; box-shadow: 0 0 0 3px rgba(31, 95, 191, .25); }
.champ.erreur { border-color: var(--ketchup); animation: trembler .34s; }
.champ.enregistre { animation: valider 1.4s ease-out; }
@keyframes trembler { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes valider { 0%, 40% { border-color: var(--basilic); box-shadow: 0 0 0 4px rgba(43, 113, 72, .2); } }

/* --- mode cuisine --- */
.case-mini { width: 20px; height: 20px; border: 1.5px solid var(--encre-3); border-radius: 6px; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.case-mini svg { width: 14px; height: 14px; stroke-width: 3; color: #fff; opacity: 0; }
.ingredients li.pret .case-mini { background: var(--basilic); border-color: var(--basilic); }
.ingredients li.pret .case-mini svg { opacity: 1; }
.ingredients li.pret.vient .case-mini svg { stroke-dasharray: 24; animation: tracer .25s var(--sortie) both; }
.ingredients li .nom-ing { background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0% 1.5px; transition: background-size .25s var(--sortie), color .2s; }
.ingredients li.pret .nom-ing { background-size: 100% 1.5px; color: var(--encre-2); }
.ingredients li.pret span:last-child { opacity: .6; }
.etape { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 9px 0; border: 0; background: none; text-align: left; width: 100%; color: inherit; font-size: 15px; line-height: 1.45; border-radius: 8px; }
.num-etape { font-weight: 900; font-stretch: 62%; font-size: 25px; line-height: 1; display: grid; place-items: start; }
.num-etape svg { width: 24px; height: 24px; color: var(--basilic); stroke-width: 3; }
.etapes li.vient .num-etape svg { stroke-dasharray: 24; animation: tracer .3s var(--sortie) both; }
.etapes li.fait .etape > span:last-child { color: var(--encre-2); }
.minuterie-btn {
  margin: 0 8px 10px 38px; display: inline-flex; align-items: center; gap: 6px; min-height: var(--cible); padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--encre); background: transparent; font-weight: 700; font-size: 15px;
}
.minuterie-btn svg { width: 18px; height: 18px; }

/* --- minuteries flottantes --- */
.minuteries {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 25; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 24px)); pointer-events: none;
}
.minuterie {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--encre); color: #fff;
  border-radius: 16px; padding: 6px 6px 6px 10px; box-shadow: 0 10px 28px rgba(20, 40, 35, .3); animation: arriver .3s var(--ressort);
}
.anneau { width: 38px; height: 38px; transform: rotate(-90deg); flex: none; }
.anneau circle { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 3.5; }
.anneau .reste { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.minuterie .info { flex: 1; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.minuterie .info b { font-size: 21px; font-weight: 900; font-stretch: 68%; }
.minuterie .info span { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minuterie .icone-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.minuterie.fini { background: var(--basilic); animation: battre 1.1s ease-in-out infinite; }
.minuterie.fini .anneau .reste { stroke: transparent; }
@keyframes battre { 50% { transform: scale(1.03); box-shadow: 0 12px 32px rgba(43, 113, 72, .45); } }

@media (min-width: 1000px) {
  .feuille.ferme { animation: sortir-droite .17s ease-in forwards; }
  .minuteries, body.avec-feuille .minuteries { left: 24px; right: auto; transform: none; bottom: 24px; width: 360px; }
  body.avec-minuterie { padding-bottom: 32px; }
  body.avec-minuterie .toast, body.avec-feuille.avec-minuterie .toast { bottom: 28px; }
  body.avec-minuterie .vue { padding-bottom: calc(32px + var(--h-minuteries, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .squelette i { animation: none; }
}

/* --- lancement --- */
.lancement {
  position: fixed; inset: 0; z-index: 100; background: var(--fond); display: grid; place-items: center;
  color: var(--encre); transition: background-color .4s ease .1s;
}
.lancement-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.logo-grand { width: 120px; height: 126px; transform-origin: 0 0; will-change: transform; }
.logo-grand .bol { transform-box: fill-box; transform-origin: 50% 100%; animation: bol-arrive .55s var(--ressort) both; }
.logo-grand .z { transform-box: fill-box; transform-origin: 50% 50%; animation: z-monte .6s var(--ressort) both; }
.logo-grand .z1 { animation-delay: .3s; } .logo-grand .z2 { animation-delay: .45s; } .logo-grand .z3 { animation-delay: .6s; }
.lancement-nom { font-size: 46px; font-weight: 900; font-stretch: 62%; letter-spacing: -0.01em; line-height: 1; animation: nom-arrive .5s var(--sortie) .45s both; }
.lancement.part { background-color: transparent; pointer-events: none; }
.lancement.part .lancement-nom { animation: fondu .2s ease-in reverse forwards; }
body.lance { overflow: hidden; }
body.lance .marque .logo { opacity: 0; }
body.lance:not(.lance-fin) .vue, body.lance:not(.lance-fin) .onglets { opacity: 0; transform: translateY(10px); }
body.lance:not(.lance-fin) .marque, body.lance:not(.lance-fin) .etat-circ { opacity: 0; }
.vue, .onglets { transition: opacity .45s var(--sortie), transform .45s var(--sortie); }
.marque, .etat-circ { transition: opacity .45s var(--sortie); }
@keyframes bol-arrive { from { transform: translateY(18px) scale(.7, .5); opacity: 0; } }
@keyframes z-monte { from { transform: translate(-6px, 10px) scale(.2); opacity: 0; } }
@keyframes nom-arrive { from { transform: translateY(10px); opacity: 0; } }

/* --- progression de la lecture de la circulaire --- */
.progres-circ { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none; transition: opacity .3s; }
.progres-circ i { display: block; height: 100%; background: var(--encre); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--sortie); }
.progres-circ.fin { opacity: 0; }

/* --- indicateur d'onglet qui glisse --- */
.indicateur {
  position: absolute; left: 0; top: 0; height: 3px; width: 28px; border-radius: 0 0 3px 3px; background: var(--encre);
  transform: translateX(calc(var(--x, 0px) + var(--w, 28px) / 2 - 14px)); transition: transform .38s var(--ressort);
}
@media (min-width: 1000px) {
  .indicateur { top: 0; height: var(--cible); width: var(--w, 0px); border-radius: 999px; transform: translateX(var(--x, 0px)); transition: transform .3s var(--sortie), width .3s var(--sortie); }
}

/* --- changement de page : ça glisse dans le sens de l'onglet choisi --- */
/* l'ancienne page s'efface d'abord, la nouvelle arrive ensuite : jamais deux pages lisibles en même temps */
html.vt-onglet::view-transition-old(root) { animation: vt-sortie .1s linear both; }
html.vt-onglet::view-transition-new(root) { animation: vt-entree .2s var(--sortie) .1s both; }
html.vt-onglet[data-sens="arriere"]::view-transition-new(root) { animation-name: vt-entree-arriere; }
@keyframes vt-sortie { to { opacity: 0; } }
@keyframes vt-entree { from { opacity: 0; transform: translateX(14px); } }
@keyframes vt-entree-arriere { from { opacity: 0; transform: translateX(-14px); } }
.vue.entree-onglet { animation: vt-entree .28s var(--sortie); }
html[data-sens="arriere"] .vue.entree-onglet { animation-name: vt-entree-arriere; }

/* --- recettes : les lignes arrivent quand on filtre --- */
.grille-recettes.entree-liste .ligne-recette { animation: arriver .35s var(--sortie) both; animation-delay: calc(var(--i, 0) * 28ms); }

/* --- épicerie faite : un tampon --- */
.fait-epicerie { display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 14px; }
.fait-epicerie b { display: block; font-size: 21px; font-weight: 900; font-stretch: 72%; }
.fait-epicerie span:not(.tampon) { display: block; color: var(--encre-2); font-size: 14px; margin-top: 2px; }
.tampon { width: 52px; height: 52px; border-radius: 50%; background: var(--basilic); color: #fff; display: grid; place-items: center; flex: none; }
.tampon svg { width: 28px; height: 28px; stroke-width: 3; }
.fait-epicerie.joue .tampon { animation: tamponner .5s var(--ressort) both; }
.fait-epicerie.joue .tampon svg { stroke-dasharray: 24; animation: tracer .3s var(--sortie) .35s both; }
@keyframes tamponner { 0% { transform: scale(2.2) rotate(-25deg); opacity: 0; } 60% { transform: scale(.9) rotate(4deg); opacity: 1; } }

/* --- invitation à installer --- */
.bandeau.invitation { margin-top: 6px; padding: 8px 6px 8px 14px; }
.bandeau.invitation .icone-btn { border-color: transparent; background: transparent; }
.etapes.simple li { display: grid; grid-template-columns: 30px 1fr; padding: 7px 0; }
.etapes.simple li::before { content: counter(e); }

@media (prefers-reduced-motion: reduce) {
  body.lance .vue, body.lance .onglets, body.lance .marque, body.lance .etat-circ, body.lance .marque .logo { opacity: 1 !important; transform: none !important; }
  .lancement { display: none; }
}

/* changement de circulaire : le bouton choisi s'allume tout de suite, les anciennes offres pâlissent pendant la lecture */
.vue.circ-change .grille-offres, .vue.circ-change .section, .vue.circ-change .offre { opacity: .35; transition: opacity .2s; pointer-events: none; }

/* bouton à deux états : les deux libellés occupent la même case, la largeur ne change jamais */
.lib-stable { display: inline-grid; }
.lib-stable > span { grid-area: 1 / 1; text-align: center; }
.lib-stable > span[aria-hidden="true"] { visibility: hidden; }
.achat.arrive { animation: arriver .3s var(--sortie); }

/* minuterie en cours : le bouton de l'étape devient le compte à rebours ; la toucher encore secoue la pastille au lieu d'en créer une deuxième */
.minuterie-btn .t { min-width: 2.7em; text-align: left; }
.minuterie-btn.en-cours { background: var(--encre); color: #fff; }
.minuterie.rappel { animation: rappel .45s var(--ressort); }
@keyframes rappel { 30% { transform: translateY(-6px) scale(1.03); } 60% { transform: translateY(1px); } }

/* synchro : le code à recopier sur l'autre appareil, et l'état en direct */
.code-sync { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.code-sync code { flex: 1; font-family: inherit; font-weight: 800; font-size: 19px; line-height: 1.2; font-stretch: 85%; letter-spacing: .01em; padding: 10px 12px; border-radius: 10px; background: var(--fond); border: 1.5px dashed var(--encre-3); word-break: break-all; }
#syncPoint { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--encre-3); }
#syncPoint.ok { background: var(--basilic); }
#syncPoint.erreur { background: var(--ketchup); }
#syncPoint.charge { animation: pulse 1s ease-in-out infinite alternate; background: var(--encre-2); }
#syncPoint.hors { background: transparent; border: 2px solid var(--encre-2); }
form[data-form="sync"] { margin-top: 6px; padding-bottom: 0; border-bottom: 0; }

/* code QR de synchro : grand, sur fond blanc, avec sa marge (sinon les appareils photo le lisent mal) */
.qr-boite { display: grid; place-items: center; margin: 6px 0 10px; }
.qr { stroke: none; width: min(260px, 72vw); height: auto; border-radius: 14px; border: 1px solid var(--ligne); background: #fff; }
.qr-code { text-align: center; font-weight: 900; font-stretch: 80%; font-size: 21px; margin: 0 0 14px; letter-spacing: .01em; }
.qr-aide { text-align: center; margin: 0 0 10px; }
.btn .ic { width: 18px; height: 18px; }
/* lecteur de code QR */
.scan { position: relative; aspect-ratio: 1; width: min(100%, 340px); margin: 6px auto 12px; border-radius: 18px; overflow: hidden; background: #1d2b2a; }
.scan video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan .viseur { position: absolute; inset: 18%; border-radius: 14px;
  background:
    linear-gradient(#fff, #fff) top left / 28px 4px no-repeat, linear-gradient(#fff, #fff) top left / 4px 28px no-repeat,
    linear-gradient(#fff, #fff) top right / 28px 4px no-repeat, linear-gradient(#fff, #fff) top right / 4px 28px no-repeat,
    linear-gradient(#fff, #fff) bottom left / 28px 4px no-repeat, linear-gradient(#fff, #fff) bottom left / 4px 28px no-repeat,
    linear-gradient(#fff, #fff) bottom right / 28px 4px no-repeat, linear-gradient(#fff, #fff) bottom right / 4px 28px no-repeat;
  box-shadow: 0 0 0 999px rgba(29, 43, 42, .35); }
#scanAide { text-align: center; }
