/* Repas — module repas : semaine, frise des jours, cartes de repas, courses, recettes, mode cuisine, présences. */

/* ---------------------------------------------------------------- en-tête de semaine */
.heros { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; }
.heros .texte { flex: 1; min-width: 0; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.puce { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--surface); box-shadow: var(--ombre-1); color: var(--doux); }
.anneau { position: relative; width: 84px; height: 84px; flex: none; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.anneau .piste { stroke: color-mix(in srgb, var(--vert) 14%, transparent); }
.anneau .valeur { stroke: url(#degrade-anneau); transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.anneau .chiffre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.anneau .chiffre b { font-family: var(--titre); font-size: 1.5rem; line-height: 1; }
.anneau .chiffre span { font-size: .66rem; font-weight: 700; color: var(--doux); text-transform: uppercase; letter-spacing: .06em; }

/* ---------------------------------------------------------------- frise des jours */
.frise { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 8px; padding: 4px 18px 10px; scroll-snap-type: x proximity; position: sticky; top: calc(52px + var(--haut)); z-index: 10; scroll-padding-inline: 18px; background: var(--verre); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); padding-top: 8px; box-shadow: 0 1px 0 var(--bord); }
.frise::-webkit-scrollbar { display: none; }
.jour-puce { flex: none; scroll-snap-align: start; width: 54px; padding: 8px 0 9px; border-radius: 16px; text-align: center; background: var(--surface); box-shadow: var(--ombre-1); transition: transform .2s, background .2s; }
.jour-puce:active { transform: scale(.94); }
.jour-puce small { display: block; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); }
.jour-puce b { display: block; font-family: var(--titre); font-size: 1.25rem; line-height: 1.2; }
.jour-puce i { display: block; width: 6px; height: 6px; margin: 3px auto 0; border-radius: 3px; background: var(--or); }
.jour-puce.ok i { background: var(--vert-2); }
.jour-puce.vide i { background: var(--tres-doux); opacity: .4; }
.jour-puce.auj { background: var(--vert); color: #fff; }
.jour-puce.auj small { color: rgba(255, 255, 255, .8); }
.jour-puce.auj i { background: #fff; }

/* ---------------------------------------------------------------- jours et repas */
.jour { margin: 14px 0 6px; scroll-margin-top: calc(130px + var(--haut)); }
.jour-titre { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 8px; }
.jour-titre h3 { font-family: var(--titre); font-weight: 700; font-size: 1.12rem; margin: 0; }
.jour-titre .pastille { font-size: .66rem; padding: 3px 8px; }
.repas { position: relative; display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 10px; border-radius: var(--r-2); background: var(--surface); box-shadow: var(--ombre-1); transition: transform .25s, box-shadow .25s, opacity .3s; }
.repas.vide { background: transparent; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--doux) 35%, transparent); }
.repas.vide .bouton:not(.plein) { background: var(--surface); box-shadow: var(--ombre-1); }
.vignette { position: relative; flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-content: center; font-size: 2rem; box-shadow: inset 0 -8px 16px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .5); }
.vignette.grande { width: 100%; height: 190px; border-radius: var(--r-3); font-size: 5.5rem; }
.vignette .coche { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-content: center; background: var(--vert); color: #fff; font-size: .8rem; font-weight: 900; box-shadow: 0 0 0 3px var(--surface); animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(0); }; }
.repas .corps { flex: 1; min-width: 0; }
.moment { display: flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }
.moment .gens { letter-spacing: 0; text-transform: none; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); }
.nom-plat { font-family: var(--titre); font-weight: 600; font-size: 1.08rem; line-height: 1.22; margin: 3px 0 4px; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: .78rem; color: var(--doux); }
.repas .gestes { display: flex; gap: 6px; margin-top: 10px; }
.repas.accepte .gestes { margin-top: 6px; }
.icone-btn { width: 40px; height: 40px; flex: none; border-radius: 14px; display: grid; place-content: center; background: var(--surface-2); color: var(--texte); }
.icone-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.repas.accepte .gestes { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); margin: 0; }
.repas.accepte .corps { padding-right: 46px; }
.repas.accepte.sans-recette .corps { padding-right: 0; }

/* ---------------------------------------------------------------- courses */
.progression { margin: 2px 0 18px; }
.progression .barre { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--vert) 14%, transparent); overflow: hidden; }
.progression .barre i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--vert), #6d9b62, var(--or)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.progression .legende { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--doux); margin-top: 7px; }
.rayon { border-radius: var(--r-2); background: var(--surface); box-shadow: var(--ombre-1); padding: 6px 14px 4px; margin-bottom: 12px; }
.rayon-titre { display: flex; align-items: center; gap: 10px; padding: 8px 0 6px; }
.rayon-titre .emoji { font-size: 1.35rem; }
.rayon-titre h3 { flex: 1; margin: 0; font-size: .95rem; font-weight: 800; }
.rayon-titre span { font-size: .75rem; font-weight: 800; color: var(--doux); }
.article { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--bord); cursor: pointer; transition: opacity .3s; }
.article input { appearance: none; -webkit-appearance: none; flex: none; width: 26px; height: 26px; margin: 0; border-radius: 9px; border: 2px solid color-mix(in srgb, var(--doux) 45%, transparent); display: grid; place-content: center; transition: background .2s, border-color .2s; }
.article input::after { content: ""; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 3px 3px; transform: rotate(-45deg) scale(0); margin-top: -3px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.article input:checked { background: var(--vert); border-color: var(--vert); }
.article input:checked::after { transform: rotate(-45deg) scale(1); }
.article .libelle { flex: 1; min-width: 0; }
.article .libelle b { display: block; font-weight: 700; font-size: .95rem; }
.article .libelle small { display: block; font-size: .74rem; color: var(--tres-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article .qte { font-weight: 800; font-size: .85rem; color: var(--vert); white-space: nowrap; }
.article.coche { opacity: .45; }
.article.coche b { text-decoration: line-through; text-decoration-thickness: 2px; }
.article .retirer { color: var(--tres-doux); font-size: 1.1rem; padding: 4px 6px; }
.rayon > .article:first-child, .rayon > summary + .article { border-top: 0; }
details.rayon summary { list-style: none; cursor: pointer; }
details.rayon summary::-webkit-details-marker { display: none; }
details.rayon summary .fleche { transition: transform .25s; color: var(--doux); }
details.rayon[open] summary .fleche { transform: rotate(90deg); }

/* ---------------------------------------------------------------- recettes */
.galerie { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.carte-recette { display: block; text-decoration: none; border-radius: var(--r-2); background: var(--surface); box-shadow: var(--ombre-1); overflow: hidden; transition: transform .2s; animation: monte .45s both cubic-bezier(.2, .8, .2, 1); }
.carte-recette:active { transform: scale(.97); }
.carte-recette .vignette { width: 100%; height: 108px; border-radius: 0; font-size: 3rem; }
.carte-recette .texte { padding: 10px 12px 12px; }
.carte-recette .nom-plat { font-size: .95rem; -webkit-line-clamp: 2; }
.carte-recette.attente { opacity: .55; }
.retour { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .9rem; color: var(--doux); text-decoration: none; margin: 4px 0 12px; }
.retour svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.recette-heros { position: relative; margin-bottom: 18px; }
.recette-heros .vignette.grande { animation: entree .5s cubic-bezier(.2, .8, .2, 1); }
.portions { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: var(--r-2); background: var(--surface); box-shadow: var(--ombre-1); margin-bottom: 12px; font-weight: 700; }
.portions .mini { display: flex; align-items: center; gap: 12px; }
.portions .mini button { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); font-weight: 800; font-size: 1.1rem; }
.etape { display: flex; gap: 14px; padding: 14px; border-radius: var(--r-2); background: var(--surface); box-shadow: var(--ombre-1); margin-bottom: 10px; }
.etape b { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-content: center; background: var(--terre-pale); color: var(--terre); font-family: var(--titre); }
.etape p { margin: 3px 0 0; line-height: 1.5; }

/* mode cuisine : une étape par écran, l'écran reste allumé */
.cuisine { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; padding: calc(18px + var(--haut)) 22px calc(22px + var(--bas)); background: linear-gradient(160deg, #1e3a2b, #2e5d45 60%, #3f7a5b); color: #fff; animation: entree .35s; }
.cuisine .haut { display: flex; justify-content: space-between; align-items: center; }
.cuisine .points { display: flex; gap: 6px; }
.cuisine .points i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .3); transition: width .3s, background .3s; }
.cuisine .points i.actif { width: 22px; background: #fff; }
.cuisine .numero { font-family: var(--titre); font-size: 5rem; line-height: 1; opacity: .25; margin-top: auto; }
.cuisine .consigne { font-family: var(--titre); font-size: clamp(1.5rem, 6.5vw, 2.1rem); line-height: 1.3; margin: 8px 0 auto; animation: monte .4s; }
.cuisine .bas { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.cuisine .bouton { height: 58px; border-radius: 18px; font-size: 1.05rem; background: rgba(255, 255, 255, .14); color: #fff; }
.cuisine .bouton.plein { background: #fff; color: #23452f; }
.presences { display: grid; grid-template-columns: 1fr 64px 64px; gap: 6px 8px; align-items: center; }
.presences .tete { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); text-align: center; }
.presences .nom { font-weight: 700; text-transform: capitalize; font-size: .92rem; }
.presences button { height: 38px; border-radius: 12px; background: var(--vert-pale); color: var(--vert); font-weight: 800; transition: transform .15s, background .2s; }
.presences button.zero { background: var(--surface-2); color: var(--tres-doux); }
.presences button:active { transform: scale(.92); }
