/* Mise en page de Faim Maison (téléphone d'abord, s'élargit sur tablette). */

html, body { height: 100%; }

.ecran {
    min-height: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
}

.vue {
    flex: 1;
    padding: 24px 16px 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entete-app { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.marque { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--romarin); }
.vue h1 { margin: 4px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.sous-titre { margin: 0; font-size: 15px; color: var(--texte-doux); line-height: 1.45; }
.sans-barre .vue { padding-bottom: 0; }
.vide { padding: 22px; line-height: 1.5; color: var(--texte-doux); margin: 0; }
.chargement { color: var(--texte-doux); text-align: center; margin-top: 40vh; }

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--carte);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.bouton.plein { width: 100%; height: 56px; font-size: 16px; }

/* Connexion */
.conseil { margin: 0; padding: 14px 16px; border-radius: 18px; background: var(--romarin-pale); font-size: 14px; line-height: 1.45; }
.connexion { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.prenoms { border: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prenoms legend { font-weight: 700; margin-bottom: 10px; }
.prenom {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 12px;
    border: 1.5px solid var(--trait);
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
}
.prenom input { position: absolute; opacity: 0; pointer-events: none; }
.prenom:has(input:checked) { border-color: var(--romarin); background: var(--romarin-pale); }
.prenom .avatar { width: 32px; height: 32px; font-size: 13px; }
.champ { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.champ input {
    height: 56px;
    border: 1.5px solid var(--trait);
    border-radius: 16px;
    padding: 0 16px;
    font: 800 24px var(--police);
    letter-spacing: 0.2em;
    text-align: center;
}
.erreur { margin: 0; color: #9A2E24; font-weight: 600; }

/* Semaine */
.jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 4px 0; }
.jours button {
    height: 64px;
    border-radius: 16px;
    border: 1px solid #DDE1D8;
    background: var(--carte);
    color: var(--texte);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: inherit;
    cursor: pointer;
}
.jours button span { font-size: 12px; font-weight: 600; color: var(--texte-doux); }
.jours button strong { font-size: 19px; }
.jours button[aria-pressed="true"] { background: var(--romarin); border-color: var(--romarin); color: #FFFFFF; }
.jours button[aria-pressed="true"] span { color: #FFFFFF; }
.titre-jour { margin: 4px 4px 0; font-size: 17px; font-weight: 700; }

.repas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    color: var(--texte);
    text-decoration: none;
}
.repas:hover { color: var(--texte); }
.repas .pastille { align-self: flex-start; }
.pastille.dessert { background: #F7DCE8; color: #8A2353; }
.repas h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.etiquettes:empty { display: none; }
.etiquette { padding: 3px 9px; border-radius: var(--rayon-pilule); background: var(--fond); color: #3F4A41; font-size: 12px; font-weight: 700; }
.etiquette.thermomix { background: var(--ocre-pale); color: var(--ocre-texte); }
.etiquette.veille { background: #E6EDF5; color: #2B4F7A; }
.pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--trait-leger); padding-top: 10px; font-size: 13px; color: var(--texte-doux); }
.groupe { display: flex; }
.groupe .avatar + .avatar { margin-left: -8px; }
.saquette { margin: 0 4px; font-size: 14px; color: var(--texte-doux); }

/* Fiche recette */
.entete-fiche { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--texte-doux); }
.rond { width: 44px; height: 44px; border-radius: 50%; background: var(--carte); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rond svg { width: 20px; height: 20px; fill: none; stroke: var(--texte); stroke-width: 2; stroke-linecap: round; }
.titre-recette { margin: 6px 4px 0 !important; font-size: 26px !important; line-height: 1.2; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces span { background: var(--carte); padding: 6px 10px; border-radius: var(--rayon-pilule); font-size: 13px; font-weight: 600; }
.bascule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #E4E7DF; border-radius: var(--rayon-pilule); padding: 4px; }
.bascule button { height: 40px; border: none; border-radius: var(--rayon-pilule); background: transparent; color: var(--texte-doux); font: 700 14px var(--police); cursor: pointer; }
.bascule button[aria-pressed="true"] { background: var(--carte); color: var(--romarin-fonce); }
.note { margin: 0 4px; font-size: 13px; color: var(--texte-doux); }
.ingredients { padding: 4px 16px; }
.titre-section { width: 100%; height: 50px; border: none; background: transparent; display: flex; justify-content: space-between; align-items: center; padding: 0; font: 700 16px var(--police); color: var(--texte); cursor: pointer; }
.titre-section span { font-size: 13px; color: var(--texte-doux); }
.ingredients ul { list-style: none; margin: 0; padding: 0; }
.ingredients li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--trait-leger); font-size: 15px; }
.ingredients li span:last-child { color: var(--texte-doux); text-align: right; }
.ingredients li small { display: block; font-size: 13px; color: var(--texte-doux); }
.etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.etapes li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; padding: 14px 16px; }
.etapes .numero { width: 30px; height: 30px; border-radius: 50%; background: var(--romarin); color: #FFFFFF; font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.etapes p { margin: 4px 0 8px; font-size: 15px; line-height: 1.45; }
.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastilles span { font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: var(--rayon-pilule); background: var(--romarin-pale); color: var(--romarin-fonce); }
.pastilles.tm span { background: var(--ocre-pale); color: var(--ocre-texte); }

/* Courses */
.ligne-titre { display: flex; justify-content: space-between; align-items: center; }
.ajouter { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--romarin); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ajouter svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.progression { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.progression div { flex: 1; height: 10px; border-radius: var(--rayon-pilule); background: var(--trait); overflow: hidden; }
.progression span { display: block; height: 100%; border-radius: var(--rayon-pilule); background: var(--romarin); transition: width 0.3s; }
.progression strong { font-size: 14px; }
.ajout { display: flex; gap: 8px; padding: 10px; }
.ajout[hidden] { display: none; }
.ajout input { flex: 1; min-width: 0; height: 44px; border: 1.5px solid var(--trait); border-radius: 14px; padding: 0 12px; font: 500 15px var(--police); }
.ajout .bouton { height: 44px; }
.rayon { padding: 6px 16px; }
.rayon h2, .rayon summary { margin: 10px 0 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--romarin); }
.rayon summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; margin-bottom: 10px; }
.rayon summary::-webkit-details-marker { display: none; }
.rayon ul { list-style: none; margin: 0; padding: 0; }
.rayon.info p { margin: 0 0 12px; font-size: 14px; color: #3F4A55; line-height: 1.45; }
.rayon.info { background: #E6EDF5; }
.article {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto auto;
    align-items: center;
    min-height: 54px;
    border-top: 1px solid var(--trait-leger);
}
.case-cocher { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid #B9C2B5; background: var(--carte); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.case-cocher svg { width: 16px; height: 16px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.article.coche .case-cocher { background: var(--romarin); border-color: var(--romarin); }
.article.coche .case-cocher svg { stroke: #FFFFFF; }
.article .nom { padding: 8px 10px 8px 12px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.article.coche .nom { color: #8A938B; text-decoration: line-through; }
/* Séparations légères entre le nom, la quantité et les recettes. */
.article .detail, .article .recettes { align-self: stretch; display: flex; align-items: center; border-left: 1px solid rgba(30, 36, 32, 0.08); }
.article .detail { padding: 0 10px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.article.coche .detail { color: var(--texte-doux); font-weight: 500; }
.article .recettes { padding: 0 0 0 10px; border-top: none; border-right: none; border-bottom: none; background: none; cursor: pointer; }
.article .recettes span { width: 34px; height: 34px; border-radius: 50%; background: var(--fond); color: var(--romarin-fonce); display: inline-flex; align-items: center; justify-content: center; gap: 1px; font: 800 14px var(--police); }
.article .recettes svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.frais { display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: var(--rayon-pilule); background: #E6EDF5; color: #2B4F7A; font-size: 11px; font-weight: 700; }
.article .nom .frais { display: block; width: fit-content; }

/* Feuille des recettes, qui monte du bas de l'écran. */
.voile { position: fixed; inset: 0; z-index: 10; background: rgba(30, 36, 32, 0.35); display: flex; align-items: flex-end; justify-content: center; }
.feuille {
    width: 100%;
    max-width: 720px;
    background: var(--carte);
    border-radius: 28px 28px 0 0;
    padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: monter 0.2s ease-out;
}
@keyframes monter { from { transform: translateY(40px); opacity: 0; } }
.poignee { align-self: center; width: 40px; height: 5px; border-radius: var(--rayon-pilule); background: var(--trait); margin-bottom: 10px; }
.feuille-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.feuille h2 { margin: 0; font-size: 22px; font-weight: 800; }
.feuille-titre strong { font-size: 17px; color: var(--romarin); white-space: nowrap; }
.feuille p { margin: 0 0 6px; font-size: 14px; color: var(--texte-doux); }
.feuille ul { list-style: none; margin: 0; padding: 0; }
.feuille li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--trait-leger); }
.feuille li strong { display: block; font-size: 17px; }
.feuille li small { font-size: 14px; color: var(--texte-doux); }
.feuille li b { font-size: 17px; font-weight: 800; white-space: nowrap; }
.feuille .bouton { margin-top: 8px; }

/* Bouton « Mode cuisine » en bas de la fiche. */
.pied-fiche { position: sticky; bottom: 0; padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--fond) 30%); }
.bouton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Mode cuisine */
.entete-cuisine { display: flex; flex-direction: column; gap: 14px; }
.entete-cuisine > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.allume { font-size: 13px; font-weight: 600; color: var(--romarin-fonce); background: var(--romarin-pale); padding: 7px 12px; border-radius: var(--rayon-pilule); }
.avancement { display: flex; gap: 4px; }
.avancement span { flex: 1; height: 6px; border-radius: var(--rayon-pilule); background: var(--trait); }
.avancement span.fait { background: var(--romarin); }
.etape-titre { margin: 8px 4px 0; font-size: 14px; font-weight: 700; color: var(--romarin); }
.etape-texte { margin: 0 4px; font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.pastilles.grandes span { font-size: 17px; padding: 9px 14px; }
.minuterie { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.minuterie > svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--romarin); stroke-width: 2; stroke-linecap: round; }
.minuterie div { flex: 1; display: flex; flex-direction: column; }
.minuterie strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.minuterie div span { margin-top: 4px; font-size: 13px; color: var(--texte-doux); }
.minuterie .bouton { height: 44px; padding: 0 16px; }
.pour-etape h2 { margin: 6px 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-doux); }
.pour-etape ul { list-style: none; margin: 0 4px; padding: 0; }
.pour-etape li { display: flex; justify-content: space-between; font-size: 17px; padding: 8px 0; border-bottom: 1px solid #E0E4DA; }
.pour-etape li span:last-child { color: var(--texte-doux); }
.pied-cuisine { position: sticky; bottom: 0; margin-top: auto; display: flex; gap: 10px; padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); background: var(--fond); }
.pied-cuisine .bouton { height: 60px; font-size: 17px; flex: 1; }
.rond-large { width: 64px; height: 60px; flex: none; border-radius: var(--rayon-pilule); border: 1.5px solid #B9C2B5; background: var(--carte); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rond-large:disabled { opacity: 0.4; cursor: default; }
.rond-large svg { width: 22px; height: 22px; fill: none; stroke: var(--texte); stroke-width: 2; stroke-linecap: round; }

/* Noter un repas */
.donut { align-self: center; width: 150px; height: 150px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.donut > div { width: 122px; height: 122px; border-radius: 50%; background: var(--fond); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut strong { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.donut span { font-size: 13px; color: var(--texte-doux); }
.notation { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.critere { display: flex; flex-direction: column; gap: 8px; }
.critere > div:first-child { display: flex; justify-content: space-between; }
.critere h2 { margin: 0; font-size: 16px; font-weight: 700; }
.critere span, .critere small { font-size: 14px; color: var(--texte-doux); }
.etoiles { display: flex; gap: 8px; }
.etoile { width: 52px; height: 52px; border-radius: 16px; border: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.etoile svg { width: 28px; height: 28px; stroke-width: 1.6; stroke-linejoin: round; fill: none; }
.etoile.gout { background: var(--ocre-pale); } .etoile.gout svg { stroke: #B88A4A; }
.etoile.gout.pleine svg { fill: #C9822B; stroke: #C9822B; }
.etoile.prep { background: var(--romarin-pale); } .etoile.prep svg { stroke: #6E8F72; }
.etoile.prep.pleine svg { fill: var(--romarin); stroke: var(--romarin); }
.champ-texte { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.champ-texte textarea { border: 1px solid var(--trait); border-radius: 14px; padding: 12px; font: 400 15px var(--police); resize: none; }

/* Tickets : viseur sombre */
.ecran.sombre { background: var(--texte); color: #FFFFFF; }
body:has(.ecran.sombre) { background: var(--texte); }
.entete-app.clair h1 { color: #FFFFFF; font-size: 24px; }
.viseur { position: relative; align-self: center; width: min(250px, 66vw); aspect-ratio: 5 / 8; margin: 8px 0; display: flex; align-items: center; justify-content: center; }
.viseur video { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.ticket-fictif { width: 78%; height: 90%; border-radius: 4px; background: repeating-linear-gradient(#F4F2EC 0 14px, #CDD0C9 14px 16px); opacity: 0.85; }
.coin { position: absolute; width: 36px; height: 36px; border: 0 solid #FFFFFF; }
.coin.hg { top: 0; left: 0; border-width: 4px 0 0 4px; border-top-left-radius: 14px; }
.coin.hd { top: 0; right: 0; border-width: 4px 4px 0 0; border-top-right-radius: 14px; }
.coin.bg { bottom: 0; left: 0; border-width: 0 0 4px 4px; border-bottom-left-radius: 14px; }
.coin.bd { bottom: 0; right: 0; border-width: 0 4px 4px 0; border-bottom-right-radius: 14px; }
.consigne { margin: 0; text-align: center; font-size: 14px; line-height: 1.45; color: #CFD6CC; }
.commandes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; padding: 4px 12px; }
.commandes > span:first-child { font-size: 13px; font-weight: 600; color: #CFD6CC; }
.declencheur { justify-self: center; width: 76px; height: 76px; border-radius: 50%; border: 4px solid #FFFFFF; background: transparent; padding: 4px; cursor: pointer; }
.declencheur span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #FFFFFF; }
.bouton.envoyer { justify-self: end; height: 44px; padding: 0 16px; background: var(--romarin-pale); color: var(--romarin-fonce); }
.statut { margin: 0; text-align: center; font-size: 12px; color: #A9B3A8; }

/* Tablette : la fiche recette passe en deux colonnes. */
@media (min-width: 900px) {
    .ecran { max-width: 1180px; }
}

/* Barre de navigation : pilule flottante, l'onglet actif en pastille blanche pleine hauteur. */
.barre {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    max-width: 688px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: var(--romarin-fonce);
    border-radius: var(--rayon-pilule);
}
.barre[hidden] { display: none; }
.barre a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--romarin-clair);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}
.barre a span { display: none; }
.barre a[aria-current="page"] {
    flex: none;
    padding: 0 22px;
    background: #FFFFFF;
    color: var(--romarin-fonce);
    border-radius: var(--rayon-pilule);
}
.barre a[aria-current="page"] span { display: inline; }
.barre svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Notes */
.titre-liste { margin: 6px 4px 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--romarin); }
.a-noter { text-decoration: none; color: var(--texte); background: var(--carte); border-radius: 20px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.a-noter > span:first-child, .notee > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-noter small, .notee small { font-size: 13px; color: var(--texte-doux); }
.a-noter strong { font-size: 17px; line-height: 1.25; }
.bouton-noter { flex: none; height: 40px; padding: 0 16px; border-radius: var(--rayon-pilule); background: var(--romarin-fonce); color: #FFFFFF; display: inline-flex; align-items: center; font-size: 14px; font-weight: 700; }
.liste-notes { padding: 4px 16px; }
.notee { text-decoration: none; color: var(--texte); display: flex; align-items: center; gap: 12px; min-height: 64px; }
.notee + .notee { border-top: 1px solid var(--trait-leger); }
.notee strong { font-size: 15px; font-weight: 600; }
.anneau { flex: none; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.anneau span { width: 36px; height: 36px; border-radius: 50%; background: var(--carte); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
