:root {
  --fond: #f7f4ec; --carte: #fffdf8; --encre: #2b3128; --doux: #6b7066; --ligne: #e6e1d3;
  --accent: #6f8f70; --accent-fonce: #4f6e52; --accent-pale: #e5eee2; --rose: #c98f7f; --rose-pale: #f6e6e0;
  --alerte: #a8641c; --alerte-pale: #fbefdc; --rayon: 20px; --ombre: 0 6px 24px rgba(60, 70, 50, .08);
  --tabs-h: 64px;
}
[data-ton="terre"] { --accent: #b86f58; --accent-fonce: #92503c; --accent-pale: #f6e4dc; }
[data-ton="or"] { --accent: #b48a3a; --accent-fonce: #8c6a24; --accent-pale: #f6ecd6; }
[data-ton="sauge"] { --accent: #6f8f70; --accent-fonce: #4f6e52; --accent-pale: #e5eee2; }
[data-ton="mer"] { --accent: #4f8a89; --accent-fonce: #366b6a; --accent-pale: #dcecea; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16.5px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
a { color: var(--accent-fonce); }
button { font: inherit; cursor: pointer; color: inherit; }
img { max-width: 100%; }
.app { max-width: 720px; margin: 0 auto; padding: 0 16px calc(var(--tabs-h) + 40px + env(safe-area-inset-bottom)); min-height: 100vh; }
.app.sans-tabs { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

/* barre */
.barre { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; position: sticky; top: 0; background: var(--fond); z-index: 5; }
.barre .marque { font-family: Fraunces, serif; font-weight: 600; font-size: 18px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.barre .marque img { width: 28px; height: 28px; border-radius: 8px; }
.retour, .lien { background: none; border: 0; color: var(--accent-fonce); font-weight: 600; padding: 8px 0; font-size: 15px; }
.retour::before { content: "‹"; font-size: 22px; line-height: 0; margin-right: 6px; position: relative; top: 2px; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; background: rgba(255, 253, 248, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--ligne); padding-bottom: env(safe-area-inset-bottom); }
.tabs[hidden] { display: none; }
.tabs button { flex: 1; max-width: 144px; height: var(--tabs-h); border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--doux); }
.tabs button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--accent-fonce); }
.tabs button.on svg { stroke-width: 2.2; }

/* login */
.entree { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 0; }
.entree .sceau { width: 72px; height: 72px; border-radius: 22px; margin-bottom: 22px; box-shadow: var(--ombre); }
.entree h1 { font-size: 32px; margin-bottom: 10px; }
.entree .sous { color: var(--doux); margin-bottom: 26px; }
.champ { display: block; width: 100%; padding: 15px 16px; border: 1.5px solid var(--ligne); border-radius: 14px; background: #fff; font: inherit; color: inherit; }
.champ:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-pale); }
.bouton { display: block; width: 100%; padding: 15px 18px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; text-align: center; text-decoration: none; margin-top: 12px; }
.bouton:active { background: var(--accent-fonce); }
.bouton[disabled] { opacity: .55; }
.bouton.clair { background: var(--accent-pale); color: var(--accent-fonce); }
.bouton.petit-b { display: inline-block; width: auto; padding: 10px 16px; font-size: 14.5px; margin: 8px 8px 0 0; }
.message { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--alerte-pale); color: #6b3f0e; font-size: 15px; }
.message.ok { background: var(--accent-pale); color: var(--accent-fonce); }
.petit { font-size: 13px; color: var(--doux); line-height: 1.5; }

/* hello */
.salut { padding: 6px 0 16px; }
.salut h1 { font-size: 29px; margin-bottom: 4px; }
.salut p { color: var(--doux); margin: 0; }
.carte { border: 1px solid var(--ligne); border-radius: var(--rayon); background: var(--carte); padding: 18px; margin: 0 0 16px; box-shadow: var(--ombre); }
.carte h3 { font-size: 19px; margin-bottom: 6px; }
.carte .sur { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-fonce); margin-bottom: 6px; display: block; }
.carte.vert { background: linear-gradient(135deg, #6f8f70, #557658); color: #fff; border: 0; }
.carte.vert .sur, .carte.vert .petit { color: rgba(255, 255, 255, .85); }
.rangee { display: flex; align-items: center; gap: 12px; }
.chiffre { font-family: Fraunces, serif; font-size: 34px; font-weight: 600; line-height: 1; }
.pastille { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--accent-pale); color: var(--accent-fonce); }
.section-titre { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); margin: 26px 0 10px; }

/* checks */
.coche { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 11px 0; border-top: 1px solid var(--ligne); }
.coche:first-of-type { border-top: 0; }
.coche .case { flex: 0 0 26px; height: 26px; border-radius: 9px; border: 2px solid var(--accent); margin-top: 1px; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700; }
.coche.on .case { background: var(--accent); }
.coche.on .case::before { content: "✓"; }
.coche.on span:last-child { color: var(--doux); }
.coche small { display: block; color: var(--doux); font-size: 13px; }
.big-check { display: flex; align-items: center; gap: 14px; width: 100%; border: 2px solid var(--accent); background: #fff; border-radius: 18px; padding: 14px 16px; text-align: left; margin-top: 10px; }
.big-check .case { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 700; }
.big-check.on { background: var(--accent); color: #fff; }
.big-check.on .case { background: #fff; color: var(--accent-fonce); border-color: #fff; }
.big-check.on .case::before { content: "✓"; }
.big-check b { display: block; font-size: 16px; }
.big-check span.t small { display: block; font-size: 13px; opacity: .8; }

/* week strip */
.semaine { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.semaine div { text-align: center; font-size: 11.5px; color: var(--doux); }
.semaine i { display: block; margin: 4px auto 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-pale); line-height: 28px; font-style: normal; font-weight: 600; color: var(--accent-fonce); font-size: 13px; }
.semaine i.on { background: var(--accent); color: #fff; }
.semaine i.auj { box-shadow: 0 0 0 2px var(--accent); }

/* shower log */
.niveaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.niveaux button { border: 1.5px solid var(--ligne); background: #fff; border-radius: 14px; padding: 12px 6px; font-weight: 600; font-size: 14.5px; }
.niveaux button small { display: block; font-weight: 400; font-size: 12px; color: var(--doux); }
.niveaux button.on[data-n="1"] { background: #e2efe3; border-color: #6f8f70; color: #3f5e42; }
.niveaux button.on[data-n="2"] { background: #f7ecd2; border-color: #c49a3e; color: #7a5a14; }
.niveaux button.on[data-n="3"] { background: #f6e0d9; border-color: #c27560; color: #8a4330; }
.graf { display: flex; align-items: flex-end; gap: 3px; height: 74px; margin: 14px 0 6px; padding: 0 2px; border-bottom: 1px solid var(--ligne); }
.graf i { flex: 1; border-radius: 4px 4px 0 0; min-width: 4px; background: var(--ligne); }
.graf i[data-n="1"] { height: 33%; background: #8fb191; }
.graf i[data-n="2"] { height: 66%; background: #d6b56a; }
.graf i[data-n="3"] { height: 100%; background: #d08a76; }
.graf i[data-n="0"] { height: 4px; }

/* quiz */
.quiz { min-height: 100vh; display: flex; flex-direction: column; padding: 18px 0 32px; }
.quiz .prog-q { height: 6px; border-radius: 99px; background: var(--accent-pale); overflow: hidden; margin: 6px 0 26px; }
.quiz .prog-q i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.quiz h1 { font-size: 27px; margin-bottom: 8px; }
.quiz .sous { color: var(--doux); margin-bottom: 20px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid var(--ligne); background: #fff; border-radius: 16px; padding: 15px 16px; font-size: 16px; }
.opt small { display: block; color: var(--doux); font-size: 13px; }
.opt.on { border-color: var(--accent); background: var(--accent-pale); }
.opt .rond { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--accent); }
.opt.on .rond { background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }
.opt.multi .rond { border-radius: 7px; }
.quiz .actions { margin-top: auto; padding-top: 24px; display: flex; gap: 10px; }
.quiz .actions .bouton { margin: 0; }
.quiz .actions .retour-q { flex: 0 0 auto; width: auto; padding: 15px 18px; }
.age-champ { font-size: 28px; text-align: center; font-family: Fraunces, serif; }

/* recipe */
.hero { border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); margin-bottom: 18px; background: var(--accent-pale); }
.hero img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mug { border: 1.5px solid var(--accent); border-radius: var(--rayon); background: #fff; padding: 18px; margin: 0 0 16px; }
.mug h2 { font-size: 23px; margin-bottom: 4px; }
.mug .version { display: inline-block; margin-bottom: 12px; }
.ingr { list-style: none; padding: 0; margin: 6px 0 14px; }
.ingr li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px dashed var(--ligne); }
.ingr li:first-child { border-top: 0; }
.ingr .qte { flex: 0 0 auto; min-width: 104px; font-weight: 600; color: var(--accent-fonce); }
.ingr .nom small { display: block; color: var(--doux); font-size: 13px; }
.etapes { list-style: none; padding: 0; margin: 0 0 18px; }
.etapes li { position: relative; padding: 0 0 16px 30px; margin: 0 0 0 8px; border-left: 2px solid var(--accent-pale); }
.etapes li:last-child { border-left-color: transparent; padding-bottom: 0; }
.etapes li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--fond); }
.etapes b { display: block; margin-bottom: 2px; }
.astuce, .attention { border-radius: 16px; padding: 14px 16px; margin: 16px 0; font-size: 15px; }
.astuce { background: var(--accent-pale); }
.attention { background: var(--alerte-pale); color: #5e3a0f; }
.astuce b:first-child, .attention b:first-child { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.profil-resume { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 14px; }

/* programs */
.programmes { display: grid; gap: 16px; }
.prog { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 0; border: 1px solid var(--ligne); border-radius: var(--rayon); background: var(--carte); overflow: hidden; box-shadow: var(--ombre); }
.prog img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--accent-pale); }
.prog .corps { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.prog .etiquette { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-fonce); margin-bottom: 4px; }
.prog h2 { font-size: 20px; margin-bottom: 6px; }
.prog p { color: var(--doux); font-size: 14.5px; margin-bottom: 12px; }
.prog .jauge { margin-top: auto; }
.jauge { height: 8px; border-radius: 99px; background: var(--accent-pale); overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.jauge-texte { display: flex; justify-content: space-between; font-size: 13px; color: var(--doux); margin-top: 7px; }
.liens { display: grid; gap: 10px; }
.lien-carte { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--ligne); background: var(--carte); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: inherit; }
.lien-carte .ic { flex: 0 0 44px; height: 44px; border-radius: 14px; background: var(--accent-pale); display: grid; place-items: center; font-size: 21px; }
.lien-carte b { display: block; }
.lien-carte span.t { flex: 1; min-width: 0; }
.lien-carte span.t small { display: block; color: var(--doux); font-size: 13.5px; line-height: 1.4; }
.titre-prog h1 { font-size: 28px; margin-bottom: 4px; }
.titre-prog .sous { color: var(--accent-fonce); font-weight: 600; font-size: 14px; letter-spacing: .04em; margin-bottom: 10px; }
.titre-prog p { color: var(--doux); }
.bloc { border: 1px solid var(--ligne); border-radius: var(--rayon); background: var(--carte); padding: 18px; margin: 18px 0; }
.bloc h3 { font-size: 19px; margin-bottom: 10px; }
.serie { font-size: 13px; color: var(--doux); margin-top: 10px; }
.module { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--ligne); background: var(--carte); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.module .num { flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--accent-pale); color: var(--accent-fonce); font-weight: 600; display: grid; place-items: center; font-family: Fraunces, serif; }
.module.fait .num { background: var(--accent); color: #fff; }
.module .txt { flex: 1; min-width: 0; }
.module .txt b { display: block; font-weight: 600; line-height: 1.3; }
.module .txt span { display: block; font-size: 14px; color: var(--doux); line-height: 1.4; margin-top: 2px; }
.module .duree { font-size: 12px; color: var(--doux); white-space: nowrap; }

/* lesson */
.lecon h1 { font-size: 28px; margin: 6px 0 8px; }
.lecon .chapo { color: var(--doux); margin-bottom: 22px; }
.lecon h2 { font-size: 21px; margin: 28px 0 12px; }
.lecon ul { padding-left: 20px; margin: 0 0 16px; }
.lecon li { margin-bottom: 8px; }
.lecon li::marker { color: var(--accent); }
.recette { border: 1.5px solid var(--accent); border-radius: var(--rayon); background: #fff; padding: 18px; margin: 20px 0; }
.recette h3 { font-size: 20px; margin-bottom: 10px; color: var(--accent-fonce); }
.recette h4 { font: 600 12px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); margin: 14px 0 8px; }
.recette ol { padding-left: 20px; margin: 0; }
.recette .note { font-size: 14px; color: var(--doux); margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--ligne); }
.table { overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px; }
table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 14.5px; background: var(--carte); border-radius: 14px; overflow: hidden; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--ligne); vertical-align: top; line-height: 1.45; }
th { background: var(--accent-pale); color: var(--accent-fonce); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }
.pied-lecon { margin-top: 30px; }

/* roadmap */
.mois { display: flex; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--ligne); background: var(--carte); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; }
.mois .n { flex: 0 0 42px; height: 42px; border-radius: 50%; background: var(--accent-pale); color: var(--accent-fonce); display: grid; place-items: center; font: 600 17px/1 Fraunces, serif; }
.mois.passe .n { background: var(--accent); color: #fff; }
.mois.actuel { border: 2px solid var(--accent); }
.mois .txt { flex: 1; min-width: 0; }
.mois .txt b { display: block; }
.mois .txt span { display: block; font-size: 14px; color: var(--doux); }
.semaines { display: grid; gap: 10px; }
.sem { border: 1px solid var(--ligne); border-radius: 16px; padding: 14px 16px; background: #fff; }
.sem.actuel { border: 2px solid var(--accent); }
.sem h4 { margin: 0 0 6px; font: 600 15px/1.3 Inter, sans-serif; }
.sem ul { margin: 0; padding-left: 18px; font-size: 14.5px; }

/* tracker */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.slot { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; border: 1.5px dashed var(--accent); background: #fff; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12.5px; color: var(--accent-fonce); font-weight: 600; padding: 6px; text-align: center; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .lab { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 99px; }
.slot.plein { border-style: solid; border-color: var(--ligne); }
.slot .plus { font-size: 26px; line-height: 1; font-weight: 400; }
.slot.suggere { border-width: 2px; border-style: solid; background: var(--accent-pale); }
.compare { position: relative; border-radius: 18px; overflow: hidden; background: #111; aspect-ratio: 3 / 4; max-height: 70vh; margin: 12px auto 8px; touch-action: none; user-select: none; -webkit-user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .apres { clip-path: inset(0 0 0 50%); }
.compare .ligne { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .4); pointer-events: none; }
.compare .ligne::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--accent-fonce); display: grid; place-items: center; font-size: 18px; }
.compare .tag { position: absolute; top: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.compare .tag.g { left: 10px; } .compare .tag.d { right: 10px; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.selects select { padding: 11px 12px; }
.visor { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.visor img { max-height: 76vh; border-radius: 12px; }
.visor .acts { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.visor .acts button { width: auto; margin: 0; padding: 11px 16px; }

.pied { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--ligne); }
.pied p { margin-bottom: 8px; }
.admin { background: #2b3128; color: #f7f4ec; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin button { background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; }
.demo-band { background: #b48a3a; color: #fff; text-align: center; font-size: 12.5px; padding: 6px; border-radius: 0 0 12px 12px; margin: 0 -16px 6px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #2b3128; color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 14px; z-index: 60; box-shadow: var(--ombre); max-width: 90vw; text-align: center; }
.fade { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 620px) { .programmes { grid-template-columns: 1fr 1fr; } .salut h1 { font-size: 34px; } }
