/* Fitoumi — design de l'appli (même identité que fitoumi.com) */
@font-face { font-family: "Jakarta"; src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; src: url("fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --fond: #060a14;
  --fond-2: #0b1222;
  --surface: rgba(255, 255, 255, .05);
  --surface-2: rgba(255, 255, 255, .085);
  --surface-3: rgba(255, 255, 255, .13);
  --bord: rgba(255, 255, 255, .09);
  --bord-fort: rgba(255, 255, 255, .16);
  --texte: #eef2ff;
  --doux: #9aa6bf;
  --tres-doux: #6b7690;
  --vert: #22c55e;
  --vert-clair: #4ade80;
  --vert-sombre: #052e16;
  --turquoise: #14b8a6;
  --orange: #f59e0b;
  --rouge: #f87171;
  --bleu: #60a5fa;
  --violet: #a78bfa;
  --rose: #f472b6;
  --degrade: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
  --degrade-chaud: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --rayon: 22px;
  --rayon-petit: 14px;
  --ombre: 0 18px 50px rgba(0, 0, 0, .45);
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --nav: 76px;
  --rapide: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--fond); color: var(--texte); }
body {
  font: 16px/1.55 "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
/* Halo de couleur en fond (identité Fitoumi) */
body::before {
  content: ""; position: fixed; inset: -10vh -30vw auto; height: 90vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vw at 10% 0%, rgba(34, 197, 94, .17), transparent 62%),
    radial-gradient(50vw 45vw at 95% 5%, rgba(245, 158, 11, .10), transparent 60%),
    radial-gradient(70vw 50vw at 60% 70%, rgba(59, 130, 246, .06), transparent 65%);
}
main { max-width: 560px; margin: 0 auto; padding: calc(18px + var(--haut)) 18px calc(34px + var(--bas)); }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--vert-clair); }
::selection { background: rgba(34, 197, 94, .35); }

/* Typographie */
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.15; margin: 0; }
h1 { font-size: 1.85rem; font-weight: 800; }
h2 { font-size: 1.12rem; font-weight: 750; margin: 26px 0 12px; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 10px; }
.doux { color: var(--doux); font-size: .93rem; }
.tres-doux { color: var(--tres-doux); font-size: .85rem; }
.centre { text-align: center; }
.degrade-texte { background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sur-titre { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vert-clair); margin-bottom: 6px; }

/* Icônes (sprite SVG) */
.ic { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.grand { width: 28px; height: 28px; }
[dir="rtl"] .ic.sens { transform: scaleX(-1); } /* flèches retournées en arabe */
.pastille-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--vert-clair); }
.pastille-ic.vert { background: rgba(34, 197, 94, .14); color: var(--vert-clair); }
.pastille-ic.orange { background: rgba(245, 158, 11, .14); color: #fbbf24; }
.pastille-ic.bleu { background: rgba(96, 165, 250, .14); color: var(--bleu); }
.pastille-ic.violet { background: rgba(167, 139, 250, .14); color: var(--violet); }
.pastille-ic.rose { background: rgba(244, 114, 182, .14); color: var(--rose); }
.pastille-ic.rouge { background: rgba(248, 113, 113, .14); color: var(--rouge); }

/* Cartes */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px; margin-bottom: 12px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.carte.compacte { padding: 14px; }
.carte.vive { background: linear-gradient(160deg, rgba(34, 197, 94, .2), rgba(20, 184, 166, .06) 60%, rgba(255, 255, 255, .03)); border-color: rgba(74, 222, 128, .28); }
.carte.chaude { background: linear-gradient(160deg, rgba(245, 158, 11, .2), rgba(255, 255, 255, .03) 70%); border-color: rgba(245, 158, 11, .28); }
.carte-titre { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.carte-titre .t { flex: 1; min-width: 0; }
.carte-titre b { display: block; font-size: 1rem; }
.carte-titre span { color: var(--doux); font-size: .86rem; }
button.carte { width: 100%; text-align: start; color: var(--texte); transition: transform .2s var(--rapide), background .2s; }
button.carte:active { transform: scale(.985); background: var(--surface-2); }

/* Boutons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 14px 20px;
  border: 0; border-radius: 18px; background: var(--degrade); color: var(--vert-sombre); font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em;
  box-shadow: 0 10px 30px rgba(34, 197, 94, .28); transition: transform .15s var(--rapide), filter .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.second { background: var(--surface-2); color: var(--texte); font-weight: 700; box-shadow: none; border: 1px solid var(--bord); }
.btn.lien { background: none; color: var(--doux); font-weight: 600; min-height: 44px; box-shadow: none; }
.btn.danger { background: rgba(248, 113, 113, .08); color: var(--rouge); border: 1px solid rgba(248, 113, 113, .3); box-shadow: none; }
.btn.blanc { background: #fff; color: #0b1222; box-shadow: none; }
.btn.petit { min-height: 42px; padding: 8px 16px; font-size: .92rem; border-radius: 14px; width: auto; }
.rangee { display: flex; gap: 10px; margin-top: 18px; }
.rangee .btn { flex: 1; }
.rangee .btn.second { flex: 0 0 34%; }
.icone-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); flex: none; }
.icone-btn.petit { width: 34px; height: 34px; border-radius: 11px; color: var(--doux); }
.icone-btn:active { transform: scale(.94); }
.puce-lien { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); font-size: .86rem; font-weight: 600; }

/* En-tête d'écran */
.entete { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.entete .t { flex: 1; min-width: 0; }
.entete h1 { font-size: 1.6rem; }
.avatar-rond { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); border: 2px solid rgba(74, 222, 128, .5); display: grid; place-items: center; font-weight: 800; color: var(--vert-clair); overflow: hidden; }
.avatar-rond.grand { width: 104px; height: 104px; font-size: 2.2rem; border-width: 3px; }

/* Animations d'écran */
.entree > * { animation: monte .45s var(--rapide) both; }
.entree > *:nth-child(2) { animation-delay: .04s; } .entree > *:nth-child(3) { animation-delay: .08s; }
.entree > *:nth-child(4) { animation-delay: .12s; } .entree > *:nth-child(5) { animation-delay: .16s; }
.entree > *:nth-child(6) { animation-delay: .2s; } .entree > *:nth-child(n+7) { animation-delay: .24s; }
.glisse-gauche { animation: glisseG .38s var(--rapide) both; }
.glisse-droite { animation: glisseD .38s var(--rapide) both; }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }
@keyframes glisseG { from { opacity: 0; transform: translateX(36px); } }
@keyframes glisseD { from { opacity: 0; transform: translateX(-36px); } }
@keyframes respire { 50% { transform: scale(1.05); } }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 100% { box-shadow: 0 0 0 18px rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Formulaires */
.champ { margin-bottom: 16px; }
.champ > label, .champ > .titre { display: block; font-weight: 700; margin-bottom: 8px; font-size: .95rem; }
.champ .aide { color: var(--doux); font-size: .85rem; margin: -4px 0 8px; }
input, select, textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--bord);
  background: var(--surface); color: var(--texte); font: inherit; font-size: 1rem; transition: border-color .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--tres-doux); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(74, 222, 128, .7); background: var(--surface-2); box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--doux) 50%), linear-gradient(135deg, var(--doux) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.erreur-champ { color: var(--rouge); font-size: .86rem; margin-top: 8px; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
input[type="checkbox"][role="switch"] { appearance: none; width: 50px; min-height: 0; height: 30px; padding: 0; border-radius: 99px; background: var(--surface-3); border: 0; position: relative; flex: none; cursor: pointer; transition: background .2s; }
input[type="checkbox"][role="switch"]::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--rapide); }
input[type="checkbox"][role="switch"]:checked { background: var(--vert); }
input[type="checkbox"][role="switch"]:checked::after { transform: translateX(20px); }
[dir="rtl"] input[type="checkbox"][role="switch"]:checked::after { transform: translateX(-20px); }

/* Choix : pastilles, cartes, tuiles */
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 99px; border: 1px solid var(--bord); background: var(--surface); font-size: .95rem; font-weight: 600; transition: all .2s var(--rapide); }
.puce[aria-pressed="true"] { background: rgba(34, 197, 94, .16); border-color: var(--vert); color: #bbf7d0; }
.cartes-choix { display: grid; gap: 10px; }
.carte-choix { display: flex; align-items: center; gap: 14px; text-align: start; min-height: 68px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--bord); background: var(--surface); transition: all .2s var(--rapide); }
.carte-choix .t { flex: 1; }
.carte-choix b { display: block; font-size: 1rem; }
.carte-choix span.s { color: var(--doux); font-size: .87rem; }
.carte-choix .coche { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bord-fort); flex: none; display: grid; place-items: center; transition: all .2s; }
.carte-choix[aria-pressed="true"] { border-color: var(--vert); background: rgba(34, 197, 94, .1); }
.carte-choix .coche .ic { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: all .2s var(--rapide); }
.carte-choix[aria-pressed="true"] .coche { background: var(--vert); border-color: var(--vert); color: var(--vert-sombre); }
.carte-choix[aria-pressed="true"] .coche .ic { opacity: 1; transform: none; }
.carte-choix:active, .tuile:active, .puce:active { transform: scale(.97); }
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tuile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 12px 6px; border-radius: 18px; border: 1.5px solid var(--bord); background: var(--surface); font-size: .84rem; font-weight: 650; text-align: center; line-height: 1.2; transition: all .2s var(--rapide); }
.tuile .em { font-size: 1.8rem; line-height: 1; }
.tuile[aria-pressed="true"] { border-color: var(--vert); background: rgba(34, 197, 94, .12); color: #dcfce7; }

/* Consentement */
.consentement { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--bord); margin-bottom: 10px; cursor: pointer; }
.consentement label { font-size: .93rem; cursor: pointer; }

/* Parcours d'inscription (une question par écran) */
.parcours { min-height: calc(100dvh - 52px - var(--haut) - var(--bas)); display: flex; flex-direction: column; }
.parcours-haut { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.progression { flex: 1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progression div { height: 100%; background: var(--degrade); border-radius: 99px; transition: width .45s var(--rapide); }
.parcours-corps { flex: 1; }
.parcours-corps h1 { font-size: 1.75rem; margin-bottom: 8px; }
.parcours-corps > .doux { margin-bottom: 22px; }
.parcours-bas { position: sticky; bottom: 0; padding: 14px 0 calc(6px + var(--bas)); background: linear-gradient(transparent, var(--fond) 30%); margin-top: 16px; }

/* Règle graduée (taille, poids) */
.regle { position: relative; margin: 20px -18px 6px; }
.regle-valeur { text-align: center; font-size: 3.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.regle-valeur small { font-size: 1.1rem; color: var(--doux); font-weight: 700; margin-inline-start: 4px; }
.regle-piste { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 26px 50% 6px; height: 96px; align-items: flex-end; -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.regle-piste::-webkit-scrollbar { display: none; }
.regle-piste i { flex: none; width: 12px; height: 22px; scroll-snap-align: center; position: relative; }
.regle-piste i::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 100%; background: var(--bord-fort); border-radius: 2px; }
.regle-piste i.moyen::before { height: 34px; }
.regle-piste i.long::before { height: 48px; background: var(--doux); }
.regle-piste i b { position: absolute; bottom: 54px; left: 50%; transform: translateX(-50%); font-size: .75rem; color: var(--doux); font-weight: 600; font-style: normal; }
.regle::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 64px; margin-left: -2px; border-radius: 4px; background: var(--vert); box-shadow: 0 0 18px rgba(34, 197, 94, .7); pointer-events: none; }
.bascule-unite { display: flex; gap: 4px; justify-content: center; margin-top: 14px; }
.bascule-unite button { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--bord); background: var(--surface); font-size: .85rem; font-weight: 700; color: var(--doux); }
.bascule-unite button[aria-pressed="true"] { background: var(--vert); color: var(--vert-sombre); border-color: var(--vert); }

/* Écran de bienvenue */
.bienvenue { min-height: calc(100dvh - 52px - var(--haut) - var(--bas)); display: flex; flex-direction: column; }
.bienvenue-haut { display: flex; justify-content: space-between; align-items: center; }
.bienvenue-haut img { height: 30px; }
.bienvenue-scene { position: relative; flex: 1; min-height: 340px; margin: 6px -18px 0; }
.bienvenue-scene::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, var(--fond)); pointer-events: none; }
.bienvenue h1 { font-size: 2.2rem; line-height: 1.08; }
.bienvenue .points { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.bienvenue .points i { width: 8px; height: 8px; border-radius: 99px; background: var(--surface-3); transition: all .3s; }
.bienvenue .points i.actif { width: 24px; background: var(--vert); }

/* Coach (bulle d'accueil) */
.bulle-coach { display: flex; gap: 12px; align-items: flex-start; }
.bulle-coach .avatar-rond { width: 44px; height: 44px; }
.bulle-coach .bulle { flex: 1; background: var(--surface-2); border: 1px solid var(--bord); border-radius: 6px 20px 20px 20px; padding: 14px 16px; white-space: pre-line; }
.liste-points { margin: 0; padding-inline-start: 20px; }
.liste-points li { margin-bottom: 6px; }
.alerte { border-inline-start: 4px solid var(--orange); }

/* Accueil */
.accueil-entete { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.accueil-entete .t { flex: 1; min-width: 0; }
.accueil-entete h1 { font-size: 1.55rem; }
.carte-coach { position: relative; overflow: hidden; display: flex; gap: 0; padding: 0; min-height: 210px; }
.carte-coach .texte { flex: 1; padding: 20px 4px 18px 20px; display: flex; flex-direction: column; gap: 10px; z-index: 1; }
.carte-coach .texte p { font-size: .97rem; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.carte-coach .portrait { width: 42%; flex: none; position: relative; }
.carte-coach .portrait img { position: absolute; bottom: 0; right: 0; height: 112%; width: auto; max-width: none; object-fit: contain; }
.anneaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.anneau { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; text-align: center; }
.anneau svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.anneau circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.anneau .fond-anneau { stroke: var(--surface-3); }
.anneau b { font-size: 1.05rem; }
.anneau span { color: var(--doux); font-size: .76rem; }
.rangee-defile { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none; }
.rangee-defile::-webkit-scrollbar { display: none; }
.rangee-defile > * { flex: none; scroll-snap-align: start; }
.raccourci { width: 150px; min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; text-align: start; border-radius: var(--rayon); padding: 16px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); }
.raccourci b { display: block; font-size: .98rem; }
.raccourci span.s { color: var(--doux); font-size: .82rem; }

/* Ma journée (frise) */
.journee { padding: 8px; }
.etape-jour { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; background: none; border: 0; padding: 10px; border-radius: 16px; color: var(--texte); position: relative; }
.etape-jour:disabled { cursor: default; }
.etape-jour .h { font-variant-numeric: tabular-nums; color: var(--doux); min-width: 46px; font-size: .86rem; font-weight: 700; }
.etape-jour .t { flex: 1; min-width: 0; }
.etape-jour .t b { font-weight: 650; }
.etape-jour .fleche { color: var(--doux); }
.etape-jour.passee { opacity: .5; }
.etape-jour.suivante { background: rgba(34, 197, 94, .1); outline: 1px solid rgba(74, 222, 128, .4); }

/* Statistiques */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; }
.stat .l { color: var(--doux); font-size: .82rem; }
.mini-graphe { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 10px; }
.mini-graphe i { flex: 1; border-radius: 6px; background: var(--degrade); opacity: .85; min-height: 4px; }

/* Chargement */
.chargement { min-height: 70dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.chargement .anneau-charge { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--vert); animation: tourne 1s linear infinite; }
.chargement img { width: 96px; height: 96px; border-radius: 28px; animation: respire 1.6s ease-in-out infinite; }
.squelette-ligne { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--surface), var(--surface-3), var(--surface)); background-size: 200% 100%; animation: brille 1.4s infinite; margin-bottom: 8px; }
@keyframes brille { to { background-position: -200% 0; } }

/* Notification éphémère */
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav) + 18px + var(--bas)); max-width: 528px; margin: 0 auto; z-index: 30;
  background: rgba(238, 242, 255, .97); color: #0b1222; padding: 14px 18px; border-radius: 16px; font-weight: 600; box-shadow: var(--ombre); animation: monte .3s var(--rapide); }
body:has(#nav[hidden]) #toast { bottom: calc(22px + var(--bas)); }

/* Fenêtre de confirmation / feuille du bas */
.voile { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 23, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: apparait .2s both; }
.feuille { width: 100%; max-width: 560px; background: #111a2e; border: 1px solid var(--bord); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 12px 20px calc(22px + var(--bas)); animation: monteFeuille .35s var(--rapide) both; max-height: 88dvh; overflow-y: auto; }
.feuille::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--surface-3); margin: 0 auto 16px; }
.feuille h2 { margin-top: 0; font-size: 1.25rem; }
@keyframes apparait { from { opacity: 0; } }
@keyframes monteFeuille { from { transform: translateY(100%); } }

/* Navigation du bas (barre flottante) */
body:has(#nav:not([hidden])) main { padding-bottom: calc(var(--nav) + 40px + var(--bas)); }
#nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--bas)); z-index: 20; max-width: 536px; margin: 0 auto; height: var(--nav);
  display: flex; align-items: center; justify-content: space-around; padding: 0 6px; border-radius: 26px;
  background: rgba(13, 20, 36, .82); border: 1px solid var(--bord); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); box-shadow: var(--ombre); }
#nav button { flex: 1; height: 100%; background: none; border: 0; color: var(--tres-doux); font-size: .7rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: color .2s; }
#nav button .ic { width: 23px; height: 23px; }
#nav button[aria-current="true"] { color: var(--vert-clair); }
#nav button.centre-nav { flex: none; width: 66px; }
#nav button.centre-nav .bulle-nav { width: 58px; height: 58px; margin-top: -30px; border-radius: 22px; background: var(--degrade); color: var(--vert-sombre); display: grid; place-items: center; box-shadow: 0 10px 28px rgba(34, 197, 94, .45); border: 4px solid var(--fond); transition: transform .2s var(--rapide); }
#nav button.centre-nav .bulle-nav .ic { width: 26px; height: 26px; stroke-width: 2.4; }
#nav button.centre-nav[aria-current="true"] .bulle-nav { transform: translateY(-2px) scale(1.04); }

/* Profil / fiche */
.profil-tete { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin: 4px 0 20px; }
.profil-tete .photo { position: relative; }
.profil-tete .photo .icone-btn { position: absolute; bottom: -2px; inset-inline-end: -4px; width: 36px; height: 36px; border-radius: 50%; background: var(--vert); color: var(--vert-sombre); border: 3px solid var(--fond); }
.profil-tete h1 { font-size: 1.6rem; }
.ligne-info { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--bord); width: 100%; background: none; border-inline: 0; border-top: 0; color: var(--texte); text-align: start; }
.ligne-info:last-child { border-bottom: 0; }
.ligne-info .t { flex: 1; min-width: 0; }
.ligne-info .t span { display: block; color: var(--doux); font-size: .84rem; }
.ligne-info .v { color: var(--doux); font-size: .92rem; text-align: end; max-width: 50%; }
.fait { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bord); }
.fait:last-child { border-bottom: 0; }
.fait span { flex: 1; }
.reglage { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bord); cursor: pointer; }
.reglage:last-of-type { border-bottom: 0; }
.reglage > span { flex: 1; }

/* Chat : la zone de saisie est dans le flux (rien n'est caché derrière) */
body.mode-chat main { height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(var(--nav) + 18px + var(--bas)); padding-top: 0; }
body.mode-chat::before { opacity: .5; }
.entete-chat { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--haut)) 0 12px; border-bottom: 1px solid var(--bord); flex: none; }
.entete-chat .t { flex: 1; min-width: 0; }
.entete-chat .t span { display: flex; align-items: center; gap: 6px; color: var(--doux); font-size: .83rem; }
.entete-chat .t span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--vert); }
.onglets-chat { display: flex; gap: 6px; padding: 10px 0 4px; flex: none; }
.onglets-chat button { flex: 1; padding: 9px 10px; border-radius: 14px; border: 1px solid var(--bord); background: var(--surface); color: var(--doux); font-size: .85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.onglets-chat button[aria-pressed="true"] { background: rgba(34, 197, 94, .14); border-color: rgba(74, 222, 128, .5); color: #dcfce7; }
.onglets-chat button.confident[aria-pressed="true"] { background: rgba(167, 139, 250, .16); border-color: rgba(167, 139, 250, .55); color: #ede9fe; }
.fil { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 2px 10px; overscroll-behavior: contain; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; animation: monte .3s var(--rapide) both; }
.msg.moi { align-self: flex-end; }
.msg .avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; object-position: 50% 8%; background: var(--surface-2); }
.msg .bulle { padding: 11px 15px; border-radius: 20px; line-height: 1.5; overflow-wrap: anywhere; font-size: .97rem; }
.msg.coach .bulle { background: var(--surface-2); border: 1px solid var(--bord); border-end-start-radius: 6px; }
.msg.moi .bulle { background: linear-gradient(135deg, #16a34a, #0d9488); color: #fff; border-end-end-radius: 6px; }
.mode-confident .msg.moi .bulle { background: linear-gradient(135deg, #7c3aed, #6366f1); }
.msg .bulle img { display: block; max-width: 100%; max-height: 240px; border-radius: 14px; margin-bottom: 6px; }
.msg .heure { font-size: .7rem; color: var(--tres-doux); margin-top: 4px; }
.action { display: flex; gap: 6px; align-items: center; margin-top: 8px; padding: 7px 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); color: #bbf7d0; font-size: .83rem; }
.bulle.ecrit { display: flex; gap: 5px; padding: 16px; }
.bulle.ecrit span { width: 8px; height: 8px; border-radius: 50%; background: var(--doux); animation: saut 1.2s infinite; }
.bulle.ecrit span:nth-child(2) { animation-delay: .2s; }
.bulle.ecrit span:nth-child(3) { animation-delay: .4s; }
@keyframes saut { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }
.zone-saisie { flex: none; padding-top: 8px; }
.suggestions { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.suggestions::-webkit-scrollbar { display: none; }
.suggestions button { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); font-size: .85rem; font-weight: 600; }
.saisie { display: flex; gap: 8px; align-items: flex-end; padding: 6px; border-radius: 26px; background: var(--surface-2); border: 1px solid var(--bord); }
.saisie textarea { flex: 1; min-height: 44px; max-height: 130px; resize: none; border: 0; background: none; padding: 11px 6px; box-shadow: none; }
.saisie textarea:focus { box-shadow: none; background: none; }
.btn-rond { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--degrade); color: var(--vert-sombre); cursor: pointer; }
.btn-rond.second { background: none; color: var(--doux); }
.btn-rond.ecoute { background: var(--rouge); color: #fff; animation: pulse 1.2s infinite; }
.apercu-photo { max-height: 90px; border-radius: 14px; margin-bottom: 8px; cursor: pointer; }

/* Séance live */
body.mode-seance main { padding-top: calc(10px + var(--haut)); }
.seance-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scene { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 56dvh; background: #070d1a; border-radius: 26px; overflow: hidden; margin: 10px 0; border: 1px solid var(--bord); }
.scene video, .scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.demo-grande { position: absolute; inset: 0; background: radial-gradient(circle at 50% 38%, #1a2540 0%, #070d1a 72%); }
.demo-mini { position: absolute; top: 10px; right: 10px; width: 112px; height: 150px; background: radial-gradient(circle at 50% 38%, rgba(26, 37, 64, .94), rgba(7, 13, 26, .94)); border-radius: 18px; border: 2px solid var(--vert); overflow: hidden; z-index: 1; }
.scene .avatar-3d, .avatar-3d { position: absolute; inset: 0; width: 100%; height: 100%; transform: none; touch-action: pan-y; cursor: grab; }
.avatar-chargement { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(34, 197, 94, .25); border-top-color: var(--vert); animation: tourne .9s linear infinite; }
.compteur { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.message-seance { min-height: 3em; text-align: center; font-size: 1.02rem; margin: 4px 0 0; }

/* Entraînement : catalogue */
.vignette-ex { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; border: 1px solid var(--bord); background: var(--surface); width: 100%; text-align: start; color: var(--texte); margin-bottom: 8px; }
.vignette-ex .apercu { width: 64px; height: 64px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #1a2540, #070d1a); flex: none; overflow: hidden; display: grid; place-items: center; font-size: 1.7rem; }
.vignette-ex .apercu img { width: 100%; height: 100%; object-fit: cover; }
.vignette-ex .t { flex: 1; min-width: 0; }
.vignette-ex .t span { color: var(--doux); font-size: .84rem; }
.etiquette { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--doux); }
.etiquette.vert { background: rgba(34, 197, 94, .14); color: var(--vert-clair); }
.etiquette.orange { background: rgba(245, 158, 11, .14); color: #fbbf24; }
.carte-programme { position: relative; overflow: hidden; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; border-radius: 26px; border: 1px solid rgba(74, 222, 128, .25);
  background: radial-gradient(120% 120% at 100% 0%, rgba(20, 184, 166, .35), transparent 55%), linear-gradient(160deg, #10301f, #0b1222); }
.carte-programme .em-fond { position: absolute; inset-inline-end: -10px; top: -14px; font-size: 7rem; opacity: .2; transform: rotate(-12deg); pointer-events: none; }

/* Nutrition */
.recette { overflow: hidden; padding: 0; }
.recette .bandeau { padding: 18px; background: linear-gradient(135deg, rgba(245, 158, 11, .22), rgba(244, 114, 182, .08)); display: flex; gap: 14px; align-items: center; }
.recette .bandeau .em { font-size: 2.6rem; line-height: 1; }
.recette .contenu { padding: 16px 18px 18px; }
.recette ol, .recette ul { margin: 6px 0 10px; padding-inline-start: 20px; }
.recette li { margin-bottom: 5px; }
.macros { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* Scan corporel */
.photo-scan { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.cadre { aspect-ratio: 3 / 4; border-radius: 16px; background: var(--fond-2); display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--bord-fort); }
.cadre img { width: 100%; height: 100%; object-fit: cover; }
.avant-apres img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; }
#photos { margin-bottom: 12px; }

/* Mode Coucher */
body.mode-nuit { background: #020617; }
body.mode-nuit::before { opacity: .25; }
.ecran-centre { min-height: calc(100dvh - 60px - var(--haut)); display: flex; flex-direction: column; justify-content: center; gap: 16px; text-align: center; }
.ecran-centre .mascotte { width: 150px; height: 150px; margin: 0 auto; border-radius: 40px; }
.respiration { width: 180px; height: 180px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; font-weight: 700;
  background: radial-gradient(circle, #312e81, #0f172a); box-shadow: 0 0 60px rgba(129, 140, 248, .35); transform: scale(.75); transition: transform var(--duree, 4s) ease-in-out; }
.respiration.gonfle, .respiration.garde { transform: scale(1.1); }
.respiration.degonfle { transform: scale(.75); }

@media (max-width: 360px) { .grille-2 { grid-template-columns: 1fr; } .tuiles { grid-template-columns: repeat(2, 1fr); } h1 { font-size: 1.6rem; } }

/* Annonce de l'équipe Fitoumi (accueil) */
.annonce-fitoumi { background: linear-gradient(160deg, rgba(34, 197, 94, .18), rgba(57, 135, 229, .12) 75%); border-color: rgba(34, 197, 94, .3); animation: monte .4s ease both; }
.annonce-fitoumi .t span { white-space: pre-wrap; }
.annonce-fitoumi .icone-btn { margin-inline-start: auto; flex: none; }
