/* ==========================================================================
   v3 · écrans (complète app.css)
   ========================================================================== */
.demarrage { display: flex; align-items: center; gap: 10px; justify-content: center; min-height: 60vh; color: var(--ink2); }
#bandeaux { position: sticky; top: 0; z-index: 30; margin: 0 -16px; }
#bandeaux .bandeau { position: static; margin: 0; }
#bandeaux .bandeau + .bandeau { padding-top: 6px; }
.bandeau.attente { background: var(--warn); color: #1a1400; }
.bandeau.attente button { background: rgba(0,0,0,.12); color: inherit; }
.bandeau.test { background: var(--accent); font-weight: 400; font-size: 13px; }
.ligne-icone { width: 40px; height: 40px; border-radius: 10px; background: var(--wash); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.carte-bouton { border: 0; width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.carte-bouton:active { background: var(--wash); }
.entete .centre { flex: 1; text-align: center; }
.fleche-g svg { transform: rotate(180deg); }
.entete .btn-lien { padding: 0; min-height: 28px; }
dl.faits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
dl.faits dt { font-size: 12.5px; color: var(--ink2); }
dl.faits dd { margin: 0; font-family: var(--font-chiffres); font-weight: 700; font-size: 24px; line-height: 1.1; }
dl.faits dd small { font-family: var(--font); font-weight: 400; font-size: 12px; color: var(--muted); }
details > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "›"; margin-left: auto; transform: rotate(90deg); color: var(--muted); font-size: 20px; }
details[open] > summary::after { transform: rotate(-90deg); }
details.carte { gap: 8px; }
ul.plat { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.texte-danger { color: var(--crit); border-color: var(--crit); }
.alerte-texte { color: var(--balise); font-size: 14px; font-weight: 700; }

/* verdict de la grille */
.verdict { border-left: 5px solid var(--good); border-radius: 0 var(--r) var(--r) 0; }
.verdict.orange { border-left-color: var(--warn); }
.verdict.rouge { border-left-color: var(--crit); }
.verdict.attente { border-left-color: var(--muted); }
.verdict-tete { display: flex; align-items: center; gap: 12px; }
.verdict-tete b { font-size: 17px; }
.verdict-pastille { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; flex: none; }
.verdict-consigne { font-size: 16.5px; font-weight: 700; line-height: 1.35; }

/* fil */
button.fil-item { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--grid); background: none; font: inherit; color: inherit; cursor: pointer; }
button.fil-item:first-child { border-top: 0; }
.fil-item.prevu .fil-corps b { color: var(--ink2); font-weight: 400; }
.fil-item.prevu .fil-heure { color: var(--muted); }

/* assiette */
.assiette { display: flex; align-items: center; gap: 16px; }
.assiette-barres { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* check-in */
.checkin .pastilles.grosses button { flex: 1; min-width: 30%; align-items: center; }
.sous-ligne { display: flex; flex-direction: column; gap: 6px; padding-left: 4px; }

/* séance */
.rpe-tete { display: flex; align-items: baseline; gap: 10px; }
.rpe-grille { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rpe-grille button { min-height: 46px; border-radius: 10px; border: 1.5px solid var(--axis); background: var(--surface2); color: var(--ink); font-family: var(--font-chiffres); font-weight: 700; font-size: 20px; cursor: pointer; }
.rpe-grille button.suggere { border-color: var(--accent); border-style: dashed; }
.rpe-grille button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); border-style: solid; }

/* ajout de repas */
.ajout-pied { display: flex; align-items: center; gap: 12px; width: 100%; }
.ajout-pied .btn { flex: 1; }
.pied-total { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pied-total b { font-size: 22px; line-height: 1.1; }
.inp.heure { width: 112px; min-height: 38px; padding: 6px 10px; }
.defile { overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.defile::-webkit-scrollbar { display: none; }
.defile .pastilles { flex-wrap: nowrap; }
.defile .pastilles button { white-space: nowrap; flex: none; }
.plus-rond { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-doux); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.panier-item { background: var(--surface2); border: 1.5px solid var(--accent-doux); gap: 8px; padding: 12px; }
.panier-item .section-tete { align-items: center; }
.panier-item .btn-icone { width: 36px; height: 36px; }
.inp.grammes { width: 100px; }
.apercu img, .photo-repas { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r); }
.totaux { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--surface); border-radius: var(--r); padding: 12px; }
.totaux b { font-size: 22px; display: block; line-height: 1.1; }
.totaux small { color: var(--muted); font-size: 12px; }
label.btn { position: relative; overflow: hidden; }
.interrupteur { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 15px; }
.interrupteur input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--axis); position: relative; flex: none; margin: 0; transition: background .2s; cursor: pointer; }
.interrupteur input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.interrupteur input:checked { background: var(--accent); }
.interrupteur input:checked::after { transform: translateX(20px); }
.interrupteur small { color: var(--muted); }

/* semaine */
.jour-plan { align-items: flex-start; }
.jour-plan.aujourdhui { background: var(--accent-doux); }
.jour-plan.repos .ligne-titre { color: var(--ink2); font-weight: 400; }
.jour-date { width: 74px; flex: none; display: flex; flex-direction: column; }
.jour-date small { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.jour-plan .ligne-titre { white-space: normal; }
.actions-seance, .actions-slot { margin-top: 6px; gap: 6px; }
.creneau { display: flex; gap: 10px; font-size: 14px; padding: 4px 0; border-top: 1px solid var(--grid); }
.creneau b { width: 80px; flex: none; }
.slots { gap: 0; padding: 4px 14px; }
.slot { padding: 12px 0; border-top: 1px solid var(--grid); display: flex; flex-direction: column; gap: 4px; }
.slot:first-child { border-top: 0; }
.slot-tete { display: flex; flex-direction: column; gap: 1px; }
.slot-quand { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.slot.decide .slot-quand::after { content: " · décidé"; color: var(--good); }
.slot.mange { opacity: .6; }
.slot.mange .slot-quand::after { content: " · mangé ✓"; }
.course .case { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--axis); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--accent-ink); }
.course.coche .case { background: var(--accent); border-color: var(--accent); }
.course.coche .ligne-titre { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.course .ligne-titre { font-weight: 400; white-space: normal; }

/* chat */
.fil-chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.bulle { max-width: 88%; padding: 10px 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 6px; }
.bulle.moi { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.bulle.coach { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 4px; }
.bulle.attend { flex-direction: row; align-items: center; gap: 10px; color: var(--ink2); }
.bulle-texte { white-space: pre-wrap; line-height: 1.45; }
.bulle-meta { font-size: 11.5px; opacity: .7; }
.retenir { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--accent-doux); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.saisie-chat { position: sticky; bottom: calc(var(--onglets) + 8px); display: flex; gap: 8px; align-items: flex-end; background: var(--bg); padding: 6px 0; z-index: 5; }
.saisie-chat textarea { flex: 1; min-height: 46px; resize: none; }

/* graphiques */
.graphe-boite { margin: 0; }
.graphe { width: 100%; height: auto; display: block; overflow: visible; }
.graphe .grille { stroke: var(--grid); stroke-width: 1; }
.graphe .axe { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.graphe .bande { fill: var(--accent-doux); }
.graphe .dernier { stroke: var(--surface); stroke-width: 2; }
.legende { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink2); margin-top: 4px; }
.legende-item { display: inline-flex; align-items: center; gap: 6px; }
.legende-item i { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }

/* réglages */
.grille-reglage { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
.grille-reglage .compteur { justify-self: end; }
.ligne-reglage { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--grid); padding-top: 8px; }
.ligne-reglage .interrupteur { flex: 1; min-width: 0; }
.ligne-reglage .interrupteur span { display: flex; flex-direction: column; }

/* conseils repas */
.conseil .verdict-tete h3 { color: var(--ink); font-size: 15.5px; }
.conseil-texte { font-size: 16.5px; font-weight: 700; line-height: 1.38; }

/* mode sport santé */
.bonjour h2 { font-size: 28px; }
.accueil { padding-top: 24px; min-height: 80vh; }
.accueil-progres { display: flex; gap: 6px; }
.accueil-progres i { flex: 1; height: 5px; border-radius: 3px; background: var(--grid); }
.accueil-progres i.fait { background: var(--accent); }
.accueil-pied { display: flex; gap: 10px; margin-top: 8px; }
.accueil-pied .btn { flex: 1; }
.sans-chiffres .barre-tete b, .sans-chiffres dl.faits dd small, .sans-chiffres .anneau-centre, .sans-chiffres .ligne-fin, .sans-chiffres .pied-total b, .sans-chiffres .totaux { display: none; }
