/* ═══ Les Carnets de la Vente juste — langage de Giri Cuisine (marbre lumineux, or, EB Garamond + Lato) ═══ */
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/EBGaramond12-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/EBGaramond12-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('/assets/fonts/Lato-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('/assets/fonts/Lato-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('/assets/fonts/Lato-Semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --marbre: #fdfaf2; --pierre: #fffdf8; --sable: #f4ecda;
  --or: #b8902d; --or-clair: #d4af37; --or-sombre: #7d5a10; --filet: #e2d2a4;
  --encre: #241a10; --encre-douce: #45351f; --encre-pale: #6b5532;
  --gris: #f0ece4; --gris-bord: #b5ab9b; --gris-encre: #4d4537;
  --sauge: #e9efe2; --sauge-bord: #6f8a5b; --sauge-encre: #3d5530;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --barre-h: 66px; --rayon: 18px;
  --ombre: 0 2px 6px rgba(74,48,12,.08), 0 10px 26px rgba(74,48,12,.10);
  --lingot: linear-gradient(135deg, #F4D58A 0%, #E8C078 42%, #C9A253 72%, #A07840 100%);
  --voile: rgba(253,250,242,.86);
  --fond: linear-gradient(rgba(253,250,242,.45), rgba(253,250,242,.6)), url('/assets/img/marbre-doux-portrait.webp') center / cover no-repeat #fdfaf2;
  color-scheme: light;
}
/* La nuit : le marbre de nuit de la maison (bleu nuit, pierre, or) — jamais le brun */
:root[data-theme="nuit"] { --marbre: #0b1426; --pierre: #14203a; --sable: #1b2a48; --filet: #4d4428; --encre: #edf1f8; --encre-douce: #d3dae8; --encre-pale: #a9b4c9; --or-sombre: #e2bf63; --or: #d9b45a;
  --gris: #1a2540; --gris-bord: #6b7896; --gris-encre: #d3dae8; --sauge: #172a2a; --sauge-bord: #8fb07a; --sauge-encre: #cfe3c2; --voile: rgba(11,20,38,.88);
  --ombre: 0 2px 6px rgba(0,0,0,.35), 0 10px 26px rgba(0,0,0,.4); --fond: linear-gradient(rgba(8,14,28,.3), rgba(8,14,28,.5)), url('/assets/img/pierre-nuit-portrait.webp') center / cover no-repeat #0b1426; color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="jour"]) { --marbre: #0b1426; --pierre: #14203a; --sable: #1b2a48; --filet: #4d4428; --encre: #edf1f8; --encre-douce: #d3dae8; --encre-pale: #a9b4c9; --or-sombre: #e2bf63; --or: #d9b45a;
    --gris: #1a2540; --gris-bord: #6b7896; --gris-encre: #d3dae8; --sauge: #172a2a; --sauge-bord: #8fb07a; --sauge-encre: #cfe3c2; --voile: rgba(11,20,38,.88);
    --ombre: 0 2px 6px rgba(0,0,0,.35), 0 10px 26px rgba(0,0,0,.4); --fond: linear-gradient(rgba(8,14,28,.3), rgba(8,14,28,.5)), url('/assets/img/pierre-nuit-portrait.webp') center / cover no-repeat #0b1426; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 100%; overscroll-behavior-x: none; }
html[data-taille="2"] { font-size: 112.5%; } html[data-taille="3"] { font-size: 125%; }
body { margin: 0; font-family: var(--sans); font-size: 1.1875rem; line-height: 1.6; color: var(--encre); background: var(--marbre);
  font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--barre-h) + env(safe-area-inset-bottom)); min-height: 100vh; }
body::before { content: ''; position: fixed; inset: 0; background: var(--fond); pointer-events: none; z-index: 0; }
body.fige { overflow: hidden; }
.entete, .vue, .barre { position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; color: var(--encre); line-height: 1.15; }
h1 { font-size: 2.25rem; } h2 { font-size: 1.75rem; } h3 { font-size: 1.375rem; }
h1:focus, h2:focus { outline: none; }
p { margin: 0 0 12px; }
a { color: var(--or-sombre); }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; color: inherit; }
.saut { position: absolute; left: -999px; top: 0; background: #fff; color: #241a10; padding: 10px 14px; z-index: 60; }
.saut:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--or-clair); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── en-tête ── */
.entete { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--voile); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--filet); }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); min-height: 44px; }
.marque-t { display: flex; flex-direction: column; line-height: 1.05; }
.marque-giri { font-size: .75rem; letter-spacing: 3px; text-transform: uppercase; color: var(--or-sombre); font-weight: 600; }
.marque-titre { font-family: var(--serif); font-size: 1.375rem; }
.boule { width: 30px; height: 30px; flex: none; background: url('/assets/img/boule-or.webp') center / contain no-repeat; filter: drop-shadow(0 2px 3px rgba(125,90,16,.35)); }
.boule.grande { width: 64px; height: 64px; margin: 0 auto 14px; display: block; }
.entete-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--filet); background: var(--pierre); color: var(--or-sombre); display: grid; place-items: center; text-decoration: none; }

/* ── vue ── */
.vue { max-width: 760px; margin: 0 auto; padding: 18px 16px 36px; }
.vue:focus { outline: none; }
.sur-titre { font-size: .8125rem; letter-spacing: 2.2px; text-transform: uppercase; color: var(--or-sombre); font-weight: 600; margin: 0 0 6px; font-family: var(--sans); line-height: 1.35; }
.filet { width: 56px; height: 0; border-top: 1.5px solid var(--or-clair); margin: 14px 0 18px; }
.section { margin-top: 32px; }
.section > h2 { margin-bottom: 14px; }
.intro { font-family: var(--serif); font-size: 1.375rem; line-height: 1.45; color: var(--encre-douce); }
.texte-lu { font-size: 1.1875rem; line-height: 1.7; color: var(--encre); max-width: 34em; }
.note-douce { font-size: 1rem; color: var(--encre-pale); }
.vide { text-align: center; padding: 36px 16px; color: var(--encre-pale); font-family: var(--serif); font-size: 1.25rem; }

/* ── boutons ── */
.lingot { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 14px 26px; border-radius: 16px; border: 1px solid rgba(160,120,64,.55);
  font-family: var(--serif); font-size: 1.25rem; color: #3a2708; text-decoration: none; background: var(--lingot); position: relative; overflow: hidden; text-align: center;
  box-shadow: 0 2px 6px rgba(74,48,12,.12), 0 10px 26px rgba(74,48,12,.18), inset 0 1px 0 rgba(255,255,255,.55); transition: transform .15s, box-shadow .15s; }
.lingot.respire::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 4.5s ease-in-out 1.2s infinite; pointer-events: none; }
@keyframes sheen { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }
.lingot:hover, .lingot:focus-visible { transform: translateY(-2px); }
.lingot:active { transform: translateY(0); }
.lingot.large, .creux.large { width: 100%; }
.creux { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 20px; border-radius: 16px; border: 1px solid rgba(160,120,64,.5);
  background: var(--pierre); color: var(--encre-douce); font-family: var(--sans); font-size: 1.0625rem; text-decoration: none; text-align: center; }
.creux svg, .rond svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.creux.actif, .rond.actif { background: var(--lingot); color: #3a2708; border-color: rgba(160,120,64,.55); }
.rond { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 1px solid rgba(160,120,64,.45); background: var(--pierre); color: var(--or-sombre); display: grid; place-items: center; }
.rond.actif svg { fill: #b5331f; stroke: #b5331f; }
.nu { background: none; border: 0; color: var(--or-sombre); text-decoration: underline; text-underline-offset: 3px; font-size: 1.0625rem; min-height: 44px; padding: 8px 6px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.actions > .lingot { grid-column: 1 / -1; }
.puces { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 10px; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce { flex: none; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(160,120,64,.45); background: var(--pierre); color: var(--encre-douce); font-size: 1rem; white-space: nowrap; }
.puce[aria-pressed="true"] { background: var(--lingot); color: #3a2708; font-weight: 600; }

/* ── cartes ── */
.carte { background: var(--pierre); border: 1px solid var(--filet); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px 18px; }
.carte + .carte { margin-top: 14px; }
.hero { position: relative; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); aspect-ratio: 4 / 3.3; background: var(--sable); }
.hero img { width: 100%; height: 100%; object-fit: cover; animation: ken 22s ease-out forwards; }
@keyframes ken { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero .voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(253,250,242,.97) 0%, rgba(253,250,242,.92) 40%, rgba(253,250,242,.55) 62%, rgba(253,250,242,0) 80%); }
.hero .texte { position: absolute; top: 20px; left: 18px; right: 18px; text-align: center; animation: souffle .6s ease-out .15s both; }
.hero .texte h1 { color: #241a10; font-size: 2.375rem; }
.hero .texte .sur-titre { color: #7d5a10; }
.hero .texte .sous { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: #5b420c; margin-top: 6px; }
.poussiere i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: radial-gradient(circle, #fff6d2 0%, #e8c078 55%, transparent 72%); box-shadow: 0 0 6px 1px rgba(232,192,120,.55); opacity: 0; animation: flotter 9s ease-in-out infinite; pointer-events: none; }
.poussiere i:nth-child(1) { left: 12%; top: 70%; } .poussiere i:nth-child(2) { left: 28%; top: 82%; animation-delay: 1.6s; } .poussiere i:nth-child(3) { left: 47%; top: 76%; animation-delay: 3.1s; }
.poussiere i:nth-child(4) { left: 63%; top: 86%; animation-delay: 4.4s; width: 6px; height: 6px; } .poussiere i:nth-child(5) { left: 78%; top: 72%; animation-delay: 5.8s; } .poussiere i:nth-child(6) { left: 90%; top: 80%; animation-delay: 7.2s; }
@keyframes flotter { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: .9; } 60% { opacity: .5; } 100% { opacity: 0; transform: translateY(-140px) translateX(10px); } }
@keyframes souffle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Aujourd'hui */
.salut { margin: 6px 0 16px; }
.salut h1 { font-size: 2.125rem; }
.salut p { color: var(--encre-pale); margin: 4px 0 0; font-size: 1.0625rem; }
.bilan { display: flex; align-items: center; gap: 16px; }
.bilan .t { flex: 1; min-width: 0; }
.bilan b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; display: block; line-height: 1.2; }
.bilan span { color: var(--encre-pale); font-size: 1rem; }
.serie { display: flex; gap: 6px; margin-top: 10px; }
.serie i { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--filet); display: grid; place-items: center; font-style: normal; font-size: .75rem; color: var(--encre-pale); }
.serie i.fait { background: url('/assets/img/boule-or.webp') center / 100% no-repeat; border-color: transparent; }
.reprendre { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--encre); }
.reprendre img { width: 76px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; }
.reprendre .t { flex: 1; min-width: 0; }
.reprendre h3 { font-size: 1.25rem; }
.fleche { color: var(--or-sombre); font-size: 1.5rem; flex: none; }

/* paire avant / après */
.paire { display: grid; gap: 10px; margin-top: 16px; }
.encadre { border-radius: 14px; padding: 14px 16px 14px 18px; border-left: 4px solid; font-size: 1.1875rem; line-height: 1.55; }
.encadre .etiq { display: block; font-size: .8125rem; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.encadre.avant { background: var(--gris); border-color: var(--gris-bord); color: var(--gris-encre); }
.encadre.avant .etiq { color: var(--gris-encre); }
.encadre.apres { background: linear-gradient(135deg, rgba(244,213,138,.32), rgba(232,192,120,.18)); border-color: var(--or); color: var(--encre); }
:root[data-theme="nuit"] .encadre.apres { background: rgba(217,180,90,.14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="jour"]) .encadre.apres { background: rgba(217,180,90,.14); } }
.encadre.apres .etiq { color: var(--or-sombre); }
.pdj h2 { font-size: 1.625rem; margin: 2px 0 10px; }
.pdj .explication { font-size: 1.1875rem; color: var(--encre-douce); }
.badge-be { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--sauge); color: var(--sauge-encre); border: 1px solid var(--sauge-bord); font-size: .875rem; font-weight: 600; margin-bottom: 10px; }
.badge-be svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* anneau d'or */
.anneau { --p: 0; position: relative; width: 78px; height: 78px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 1.375rem; color: var(--or-sombre);
  background: conic-gradient(#c9a253, #f4d58a calc(var(--p) * 1%), var(--filet) 0); box-shadow: 0 2px 6px rgba(125,90,16,.18); }
.anneau::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--pierre); }
.anneau span { position: relative; }
.anneau.mini { width: 40px; height: 40px; font-size: .8125rem; font-family: var(--sans); font-weight: 600; }
.anneau.mini::before { inset: 4px; }

/* Bibliothèque : couvertures dessinées */
.couvertures { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (min-width: 560px) { .couvertures { grid-template-columns: repeat(3, 1fr); } }
.couv { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--encre); border-radius: 14px; overflow: hidden; background: var(--sable); aspect-ratio: 3 / 4.2;
  box-shadow: 0 2px 4px rgba(74,48,12,.12), 0 14px 30px rgba(74,48,12,.16); border: 0; padding: 0; text-align: left; transition: transform .15s; }
.couv:active { transform: scale(.97); }
.couv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.couv .voile-c { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,14,6,0) 30%, rgba(20,14,6,.55) 62%, rgba(20,14,6,.88) 100%); }
.couv .dos { position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.12), rgba(0,0,0,0)); }
.couv .bas { position: relative; margin-top: auto; padding: 12px 12px 14px; color: #fff8e8; }
.couv .num { font-size: .75rem; letter-spacing: 2.4px; text-transform: uppercase; color: #f4d58a; font-weight: 600; }
.couv h3 { color: #fffaf0; font-size: 1.25rem; line-height: 1.12; margin-top: 3px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.couv .filet-or { width: 34px; border-top: 1.5px solid #e8c078; margin: 8px 0 0; }
.couv .coin { position: absolute; top: 10px; right: 10px; }
.couv .coin .anneau.mini::before { background: rgba(255,253,248,.95); }
.couv .coin .anneau.mini { color: #7d5a10; }
.couv.verrou img { filter: saturate(.55) brightness(.92); }
.couv.verrou .coin { top: 8px; right: 8px; }
.cadenas { width: 34px; height: 41px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.45)); display: block; }

/* Tome */
.tome-tete { position: relative; margin: -18px -16px 0; aspect-ratio: 4 / 4.4; overflow: hidden; background: var(--sable); }
.tome-tete img { width: 100%; height: 100%; object-fit: cover; animation: ken 24s ease-out forwards; }
.tome-tete .voile-c { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,14,6,0) 35%, rgba(20,14,6,.5) 62%, rgba(20,14,6,.9) 100%); }
.tome-tete .t { position: absolute; left: 20px; right: 20px; bottom: 22px; color: #fff8e8; }
.tome-tete .num { font-size: .8125rem; letter-spacing: 2.6px; text-transform: uppercase; color: #f4d58a; font-weight: 600; }
.tome-tete h1 { color: #fffaf0; font-size: 2.375rem; margin: 4px 0 6px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.tome-tete .sous { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: #f8ecd0; line-height: 1.35; }
@media (min-width: 760px) { .tome-tete { margin: 0; border-radius: var(--rayon); aspect-ratio: 16 / 9; box-shadow: var(--ombre); } }
.citation { font-family: var(--serif); font-style: italic; font-size: 1.4375rem; line-height: 1.45; color: var(--encre-douce); border-left: 3px solid var(--or-clair); padding: 4px 0 4px 18px; margin: 24px 0 18px; }
.avance-tome { display: flex; align-items: center; gap: 16px; margin: 18px 0 6px; }
.ligne { display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-decoration: none; color: var(--encre); background: var(--pierre); border: 1px solid var(--filet); border-radius: 14px; width: 100%; text-align: left; min-height: 64px; }
.ligne + .ligne { margin-top: 10px; }
.ligne img { width: 68px; height: 68px; border-radius: 10px; object-fit: cover; flex: none; }
.ligne .t { flex: 1; min-width: 0; }
.ligne h3 { font-size: 1.25rem; line-height: 1.2; }
.ligne .meta { font-size: .8125rem; color: var(--or-sombre); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-top: 3px; }
.ligne .ico { width: 68px; height: 68px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--sable); font-family: var(--serif); font-size: 1.75rem; color: var(--or-sombre); }
.ligne.verrou { opacity: .78; }
.ligne.verrou .cadenas { width: 28px; height: 34px; }

/* pages du tome : phrases, essentiels, gestes */
.groupe-phrases { margin-top: 22px; }
.groupe-phrases h2 { font-size: 1.375rem; margin-bottom: 10px; }
.phrase { font-family: var(--serif); font-size: 1.375rem; line-height: 1.4; padding: 14px 16px; background: var(--pierre); border: 1px solid var(--filet); border-radius: 14px; }
.phrase + .phrase { margin-top: 8px; }
.essentiels { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: e; }
.essentiels li { counter-increment: e; position: relative; padding: 14px 14px 14px 62px; font-family: var(--serif); font-size: 1.375rem; line-height: 1.3; border-bottom: 1px solid var(--filet); }
.essentiels li::before { content: counter(e); position: absolute; left: 6px; top: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--lingot); color: #3a2708; font-size: 1.125rem; font-family: var(--sans); font-weight: 600; }
.gestes { list-style: none; margin: 18px 0 0; padding: 0; }
.geste { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; background: var(--pierre); border: 1px solid var(--filet); border-radius: 14px; padding: 14px 16px; font-size: 1.1875rem; line-height: 1.5; color: var(--encre); }
.gestes li + li { margin-top: 10px; }
.case { width: 30px; height: 30px; flex: none; border-radius: 9px; border: 2px solid var(--or); display: grid; place-items: center; margin-top: 1px; background: var(--pierre); }
.geste[aria-pressed="true"] .case { background: var(--lingot); border-color: #a07840; }
.geste[aria-pressed="true"] .case::after { content: ''; width: 9px; height: 15px; border: solid #3a2708; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -2px); }
.geste[aria-pressed="true"] .gt { color: var(--encre-pale); }

/* ── plein écran (lecture, appel) ── */
.plein { position: fixed; inset: 0; z-index: 40; background: var(--fond); background-color: var(--marbre); display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.plein .haut { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--filet); background: var(--voile); }
.plein .haut .titre { flex: 1; min-width: 0; }
.plein .haut .titre b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.1875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plein .haut .titre span { font-size: .875rem; color: var(--encre-pale); }
.fermer { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--filet); background: var(--pierre); font-size: 1.625rem; line-height: 1; color: var(--encre-douce); display: grid; place-items: center; }
.jauge { height: 4px; background: var(--filet); }
.jauge i { display: block; height: 100%; background: var(--lingot); transition: width .3s ease-out; }
.defile { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.defile::-webkit-scrollbar { display: none; }
.ecran { flex: 0 0 100%; width: 100%; scroll-snap-align: center; scroll-snap-stop: always; overflow-y: auto; padding: 26px 22px 30px; display: flex; flex-direction: column; }
.ecran > .dedans { max-width: 640px; width: 100%; margin: auto; }
.ecran .num-p { font-family: var(--serif); font-size: 1.25rem; color: var(--or-sombre); margin-bottom: 10px; }
.ecran h2 { font-size: clamp(1.75rem, 7vw, 2.5rem); line-height: 1.15; margin-bottom: 14px; }
.ecran .explication { font-size: 1.1875rem; line-height: 1.7; color: var(--encre-douce); }
.ecran.be { background: linear-gradient(180deg, rgba(111,138,91,.10), rgba(111,138,91,0) 40%); }
.ecran .note-perso { margin-top: 16px; padding: 12px 16px; border: 1px dashed var(--or); border-radius: 12px; font-size: 1.0625rem; color: var(--encre-douce); white-space: pre-wrap; }
.ecran .note-perso b { display: block; font-size: .8125rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--or-sombre); }
.fin-partie { text-align: center; position: relative; }
.fin-partie h2 { margin: 6px 0 10px; }
.plein .bas { display: flex; align-items: center; gap: 6px; padding: 10px 10px 12px; background: var(--voile); border-top: 1px solid var(--filet); }
.plein .bas .lingot { flex: 1; min-width: 0; min-height: 56px; font-size: 1.125rem; padding: 8px 10px; white-space: nowrap; }
.plein .bas .rond { width: 48px; height: 48px; }
@media (max-width: 359px) { .plein .bas .lingot { font-size: 1rem; } }
.plein .bas .lingot.fait { background: var(--pierre); color: var(--or-sombre); box-shadow: none; }
.pluie { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 46; }
.pluie i { position: absolute; top: -14px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff6d2 0%, #e8c078 45%, #b8902d 85%); box-shadow: 0 0 6px rgba(232,192,120,.7); opacity: 0; animation: tomber 2.2s ease-in forwards; }
@keyframes tomber { 0% { opacity: 0; transform: translateY(0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translateY(100vh) rotate(300deg); } }

/* entraînement */
.points { display: flex; gap: 6px; justify-content: center; margin: 4px 0 18px; }
.points i { width: 12px; height: 12px; border-radius: 50%; background: var(--filet); }
.points i.juste { background: var(--lingot); } .points i.faux { background: var(--gris-bord); } .points i.ici { outline: 2px solid var(--or); outline-offset: 2px; }
.question h2 { font-size: 1.75rem; margin: 2px 0 10px; }
.question .explication { font-size: 1.1875rem; color: var(--encre-douce); }
.consigne { font-family: var(--serif); font-size: 1.375rem; text-align: center; margin: 20px 0 12px; }
.choix { display: block; width: 100%; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--filet); background: var(--pierre); font-size: 1.1875rem; line-height: 1.5; color: var(--encre); min-height: 64px; box-shadow: var(--ombre); }
.choix + .choix { margin-top: 12px; }
.choix .lettre { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--or); color: var(--or-sombre); font-weight: 600; font-size: .9375rem; margin-right: 10px; vertical-align: -6px; }
.choix .etiq { display: none; font-size: .8125rem; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.revele .choix { box-shadow: none; cursor: default; }
.revele .choix .etiq { display: block; } .revele .choix .lettre { display: none; }
.revele .choix.bon { background: linear-gradient(135deg, rgba(244,213,138,.38), rgba(232,192,120,.2)); border-color: var(--or); border-left-width: 5px; }
.revele .choix.bon .etiq { color: var(--or-sombre); }
.revele .choix.mauvais { background: var(--gris); border-color: var(--gris-bord); border-left-width: 5px; color: var(--gris-encre); }
.verdict { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--pierre); border: 1px solid var(--filet); }
.verdict b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; display: block; }
.verdict p { margin: 6px 0 0; font-size: 1.0625rem; color: var(--encre-douce); }
.score { text-align: center; padding: 10px 0 0; }
.score .anneau { width: 132px; height: 132px; font-size: 2.25rem; margin: 6px auto 16px; }
.score .anneau::before { inset: 10px; }
.boites { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.boites div { text-align: center; padding: 10px 2px; border-radius: 12px; background: var(--pierre); border: 1px solid var(--filet); }
.boites b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.375rem; color: var(--encre); }
.boites span { font-size: .75rem; color: var(--encre-pale); letter-spacing: .4px; }

/* avant mon appel */
.appel .ecran h2 { text-align: center; }
.grande-phrase { font-family: var(--serif); font-size: clamp(2rem, 8.5vw, 3.25rem); line-height: 1.25; text-align: center; color: var(--encre); }
.appel .groupe { text-align: center; font-size: .875rem; letter-spacing: 2px; text-transform: uppercase; color: var(--or-sombre); font-weight: 600; margin-bottom: 18px; }
.esprit-liste { list-style: none; padding: 0; margin: 10px 0 0; }
.esprit-liste li { font-family: var(--serif); font-size: clamp(1.5rem, 6.4vw, 2.25rem); line-height: 1.3; padding: 12px 0 12px 44px; position: relative; border-bottom: 1px solid var(--filet); }
.esprit-liste li::before { content: ''; position: absolute; left: 0; top: 50%; width: 28px; height: 28px; margin-top: -14px; background: url('/assets/img/boule-or.webp') center / contain no-repeat; }
.souffle { display: grid; place-items: center; gap: 22px; text-align: center; }
.orbe { width: 180px; height: 180px; background: url('/assets/img/boule-or-grande.webp') center / contain no-repeat; filter: drop-shadow(0 14px 26px rgba(125,90,16,.35)); transform: scale(.7); }
.orbe.vit { animation: respirer 10s ease-in-out infinite; }
@keyframes respirer { 0% { transform: scale(.7); } 40% { transform: scale(1.08); } 100% { transform: scale(.7); } }
.souffle .consigne-s { font-family: var(--serif); font-size: 1.875rem; min-height: 2.6em; }
.compte { font-size: 1rem; color: var(--encre-pale); }
.choix-tomes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
textarea, input[type="email"], input[type="search"], input[type="text"] { width: 100%; font: inherit; font-size: 1.125rem; color: var(--encre); background: var(--pierre); border: 1.5px solid var(--filet); border-radius: 14px; padding: 14px 16px; }
textarea { min-height: 150px; line-height: 1.55; resize: vertical; }
textarea:focus, input:focus { outline: 3px solid var(--or-clair); outline-offset: 1px; border-color: var(--or); }
label.lab { display: block; font-size: .9375rem; font-weight: 600; color: var(--encre-douce); margin: 0 0 8px; }

/* Moi */
.liste-reglages { display: grid; gap: 14px; }
.reglage h3 { font-family: var(--sans); font-size: .875rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--or-sombre); font-weight: 600; margin-bottom: 8px; }
.grille-moi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tuile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--pierre); border: 1px solid var(--filet); text-decoration: none; color: var(--encre); box-shadow: var(--ombre); min-height: 104px; }
.tuile b { font-family: var(--serif); font-weight: 400; font-size: 1.875rem; line-height: 1; color: var(--or-sombre); }
.tuile span { font-size: 1rem; color: var(--encre-douce); }
.resultat { display: block; padding: 14px 16px; border-radius: 14px; background: var(--pierre); border: 1px solid var(--filet); text-decoration: none; color: var(--encre); width: 100%; text-align: left; font-size: 1.0625rem; }
.resultat + .resultat { margin-top: 10px; }
.resultat .meta { display: block; font-size: .8125rem; color: var(--or-sombre); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.resultat mark { background: rgba(232,192,120,.45); color: inherit; border-radius: 3px; padding: 0 2px; }
.credits { font-size: 1rem; color: var(--encre-douce); line-height: 1.6; }
.credits li { margin-bottom: 6px; }

/* porte */
.porte { text-align: center; max-width: 520px; margin: 0 auto; }
.porte h1 { font-size: 2.25rem; margin-bottom: 8px; }
.porte form { display: grid; gap: 12px; margin: 22px 0 10px; text-align: left; }
.porte .message { padding: 16px 18px; border-radius: 16px; background: var(--pierre); border: 1px solid var(--or-clair); text-align: left; font-size: 1.0625rem; margin: 18px 0; }
.erreur { color: #9a3b1b; font-size: 1rem; min-height: 1.4em; }
:root[data-theme="nuit"] .erreur { color: #f0a090; }

/* barre du bas */
.barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; background: var(--voile); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--filet); padding-bottom: env(safe-area-inset-bottom); }
.barre a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 2px; min-height: var(--barre-h); text-decoration: none; color: var(--encre-pale); font-size: .78rem; font-weight: 600; letter-spacing: .1px; white-space: nowrap; }
.barre a svg { width: 26px; height: 26px; }
.barre a[aria-current="page"] { color: var(--or-sombre); }
.barre a[aria-current="page"]::after { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--lingot); }
.toast { position: fixed; left: 50%; bottom: calc(var(--barre-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #241a10; color: #fff8e6; padding: 12px 20px; border-radius: 14px; font-size: 1rem; box-shadow: var(--ombre); z-index: 60; max-width: calc(100% - 32px); }

/* feuille du bas */
.feuille { position: fixed; inset: 0; z-index: 50; }
.feuille .fond { position: absolute; inset: 0; background: rgba(20,14,6,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.feuille .panneau { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92vh; overflow-y: auto; background: var(--fond); background-color: var(--marbre);
  border-top: 1px solid rgba(212,175,55,.6); border-radius: 22px 22px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; box-shadow: 0 -10px 40px rgba(20,14,6,.3); animation: monter .28s ease-out; }
@keyframes monter { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.feuille .poignee { width: 44px; height: 5px; border-radius: 3px; background: var(--filet); margin: 0 auto 14px; }
.feuille .cadenas { width: 54px; height: 65px; margin: 0 auto 8px; }
.feuille h2 { font-size: 1.625rem; margin-bottom: 8px; }
.feuille p { font-size: 1.0625rem; color: var(--encre-douce); margin-bottom: 16px; }
.feuille .large { margin-bottom: 10px; }
.feuille .couv-mini { width: 120px; aspect-ratio: 3 / 4.2; border-radius: 10px; object-fit: cover; margin: 0 auto 14px; box-shadow: var(--ombre); }
.feuille textarea { text-align: left; }

/* chargement */
.sq { border-radius: var(--rayon); background: linear-gradient(100deg, var(--sable) 35%, var(--pierre) 50%, var(--sable) 65%) 0 0 / 220% 100%; animation: miroiter 1.5s linear infinite; margin: 0 0 16px; }
.sq.hero { aspect-ratio: 4 / 3.3; } .sq.ligne-sq { height: 72px; } .sq.court { width: 70%; }
@keyframes miroiter { to { background-position: -120% 0; } }
#ouverture { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: #fdfaf2 url('/assets/img/marbre-doux.webp') center / cover; pointer-events: none; animation: ouv-sort .5s ease 1.1s forwards; }
#ouverture i { width: 132px; height: 132px; background: url('/assets/img/boule-or-grande.webp') center / contain no-repeat; filter: drop-shadow(0 10px 18px rgba(125,90,16,.38)); animation: ouv-bat 1.1s ease-in-out both; }
@keyframes ouv-bat { 0% { opacity: 0; transform: scale(.82); } 45% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes ouv-sort { to { opacity: 0; visibility: hidden; } }
.vue > * { animation: souffle .35s ease-out both; }

/* tablette : la barre devient un rail */
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: calc(108px + env(safe-area-inset-left)); }
  .barre { top: 0; bottom: 0; right: auto; width: calc(108px + env(safe-area-inset-left)); flex-direction: column; justify-content: center; gap: 6px; border-top: 0; border-right: 1px solid var(--filet); padding: 0 0 0 env(safe-area-inset-left); }
  .barre a { flex: 0 0 auto; min-height: 78px; font-size: .875rem; }
  .barre a[aria-current="page"]::after { top: 18px; bottom: 18px; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .toast { bottom: 24px; }
  .vue { max-width: 1080px; padding: 28px 32px 48px; }
  .deux-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .deux-col > .section:first-child, .deux-col > .carte:first-child { margin-top: 0; }
  .couvertures { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .tome-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  .grille-moi { grid-template-columns: repeat(4, 1fr); }
  .plein { left: 0; }
}
@media (min-width: 1280px) { .couvertures { grid-template-columns: repeat(6, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } #ouverture { display: none; } }
@media (forced-colors: active) { .lingot, .puce[aria-pressed="true"], .creux.actif { border: 2px solid ButtonText; } .jauge i { background: Highlight; } }
@media print { .barre, .entete, .plein, .feuille { display: none !important; } body::before { display: none; } }

/* finitions (après regard des captures du 25/10) */
.plein .bas > * { flex-shrink: 0; }
@media (min-width: 700px) { .plein .bas { justify-content: center; } .plein .bas .lingot { flex: 0 1 340px; } }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.sur-titre.adresse { text-transform: none; letter-spacing: .3px; font-size: .9375rem; word-break: break-all; }
.tuile svg { width: 30px; height: 30px; fill: none; stroke: var(--or-sombre); stroke-width: 2; }
.reprendre .note-douce { white-space: nowrap; }
