/* =====================================================================
   VERBUM — Base : reset, typographie, utilitaires, révélations
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-texte);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body.is-loading { overflow: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: rgba(201, 168, 76, .35); color: #fff; }

/* Grain de parchemin global (SVG inline, aucun fichier externe) */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2;
  opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Barre de défilement */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--noir-profond); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--or-sombre), var(--or-sacre)); border-radius: 10px; border: 2px solid var(--noir-profond); }

/* — Typographie — */
h1, h2, h3, h4 { font-family: var(--f-titre); font-weight: 500; line-height: 1.1; letter-spacing: .01em; }
.epi { font-family: var(--f-epi); letter-spacing: .06em; }
.cap { font-family: var(--f-cap); letter-spacing: .28em; text-transform: uppercase; }
.ui { font-family: var(--f-ui); }
.kicker {
  display: inline-flex; align-items: center; gap: .9em;
  font-family: var(--f-cap); font-size: var(--t-xs); letter-spacing: .38em; text-transform: uppercase;
  color: var(--or-sacre);
}
.kicker::before { content: ""; width: 2.6em; height: 1px; background: currentColor; opacity: .7; }
.h-section { font-size: var(--t-2xl); font-weight: 400; margin: .4em 0 .5em; }
.h-section em { font-style: italic; color: var(--or-clair); }
.lead { font-size: var(--t-lg); color: var(--text-dim); line-height: 1.55; font-family: var(--f-titre); }
.or-text {
  background: var(--grad-or); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: -200% center; } }

/* Textes sacrés en langue originale */
.heb { font-family: var(--f-hebreu); direction: rtl; unicode-bidi: isolate; font-size: 1.35em; line-height: 1.9; }
.grc { font-family: var(--f-grec); font-style: normal; unicode-bidi: isolate; }
.ref { font-family: var(--f-cap); font-size: var(--t-xs); letter-spacing: .25em; color: var(--or-sacre); text-transform: uppercase; }
.tetragramme { color: var(--or-clair); font-weight: 600; }

/* — Mise en page — */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, var(--container-narrow)); margin-inline: auto; }
.section { position: relative; padding: var(--s-9) 0; z-index: var(--z-content); }
.center { text-align: center; }
.center .kicker { justify-content: center; }
.center .kicker::after { content: ""; width: 2.6em; height: 1px; background: currentColor; opacity: .7; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 200; padding: .7rem 1rem; background: var(--or-sacre); color: #111; font-family: var(--f-ui); border-radius: 8px; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 3px; border-radius: 4px; }

/* Séparateur ornemental (losange, jamais de croix) */
.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--or-sacre); margin: var(--s-6) auto; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: min(18vw, 160px); background: linear-gradient(90deg, transparent, var(--or-sacre)); }
.ornament::after { transform: scaleX(-1); }
.ornament i { width: 9px; height: 9px; border: 1px solid currentColor; transform: rotate(45deg); }

/* — Révélations au défilement — */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out); filter: blur(6px); }
[data-reveal="left"] { transform: translateX(-50px); }
[data-reveal="right"] { transform: translateX(50px); }
[data-reveal="zoom"] { transform: scale(.94); }
[data-reveal].is-visible { opacity: 1; transform: none; filter: none; }
/* petits écrans : les apparitions latérales deviennent verticales (aucun débordement horizontal) */
@media (max-width: 900px) { [data-reveal="left"]:not(.is-visible), [data-reveal="right"]:not(.is-visible) { transform: translateY(40px); } }

/* Curseur personnalisé — plume de scribe */
@media (hover: hover) and (pointer: fine) {
  body.has-quill, body.has-quill a, body.has-quill button { cursor: none; }
}
.quill { position: fixed; left: 0; top: 0; z-index: var(--z-cursor); pointer-events: none; width: 34px; height: 34px; transform: translate3d(-100px, -100px, 0); transition: opacity .3s; will-change: transform; }
.quill svg { width: 100%; height: 100%; transform-origin: 2px 32px; transition: transform .35s var(--ease-spring); filter: drop-shadow(0 0 6px rgba(201, 168, 76, .55)); }
.quill.is-hover svg { transform: rotate(-14deg) scale(1.25); }
.quill-ink { position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--or-clair); pointer-events: none; z-index: var(--z-cursor); opacity: .9; box-shadow: 0 0 10px var(--or-sacre); transform: translate3d(-100px, -100px, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
}
[hidden] { display: none !important; }
