/* Sijilo — site vitrine.
   Racines communes avec l'application (papier, marine, vert) mais une palette
   plus vive et une page qui bouge : dégradés, révélations au défilement,
   bandeau défilant, compteurs, survols. Tout mouvement s'éteint sous
   `prefers-reduced-motion`. Propriétés logiques uniquement (I18N-01). */

/* ═══ Tokens ═══════════════════════════════════════════════════════ */
:root {
  color-scheme: light;
  --paper:      #F4F8F5;
  --surface:    #FFFFFF;
  --surface-2:  #EEF5F0;
  --sheet:      #FFFFFF;

  --ink:        #0F2438;
  --ink-2:      #4B5D70;
  --ink-3:      #7F91A3;

  --rule:       #CBD9D0;
  --rule-soft:  #E2ECE5;

  /* Émeraude vive : action, validé, dégradés. */
  --seal:       #0E9F6E;
  --seal-deep:  #0A6B4A;
  --seal-bright:#22C88A;
  --seal-ink:   #FFFFFF;
  --seal-wash:  #DDF5EA;

  /* Or et corail : accents chauds, tuiles d'icônes, chiffres. */
  --gold:       #F2B532;
  --gold-wash:  #FFF1CC;
  --coral:      #F26B4E;
  --coral-wash: #FFE2DA;
  --violet:     #5B6CFF;
  --violet-wash:#E4E7FF;

  --wait:       var(--gold);
  --stamp:      #C9482B;

  /* La feuille est un objet physique : ses couleurs ne suivent pas le thème. */
  --sheet-ink:   #12283F;
  --sheet-ink-2: #56687C;
  --sheet-grid:  rgba(14, 159, 110, .13);
  --sheet-line:  rgba(18, 40, 63, .55);
  --sheet-hatch: rgba(201, 72, 43, .24);
  --sheet-mark:  rgba(18, 40, 63, .07);

  --shadow-sm: 0 1px 2px rgba(15,36,56,.06), 0 4px 12px -4px rgba(15,36,56,.10);
  --shadow-md: 0 2px 4px rgba(15,36,56,.05), 0 16px 40px -12px rgba(15,36,56,.22);
  --shadow-sheet: 0 2px 4px rgba(15,36,56,.08), 0 30px 70px -20px rgba(10,107,74,.45);
  --glow: 0 10px 30px -10px rgba(14,159,110,.55);
  --brand-ar: var(--seal-deep);   /* سجيلو sous le mot latin */

  --grad-seal: linear-gradient(135deg, var(--seal-bright), var(--seal-deep));
  --grad-warm: linear-gradient(135deg, var(--gold), var(--coral));
  --grad-text: linear-gradient(90deg, var(--seal-deep), var(--seal-bright), var(--gold), var(--coral), var(--seal-deep));

  --r-sm: 6px;  --r-md: 10px;  --r-lg: 16px;  --r-xl: 24px;

  --sans:  "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --arab:  "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --kufi:  "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif; /* graphie arabe de la marque uniquement */
  --serif: "IBM Plex Serif", Georgia, serif;

  --dur: 220ms;
  --ease: cubic-bezier(.2,.7,.3,1);
  --spring: cubic-bezier(.34,1.56,.64,1);

  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 48px);
  --ar-scale: 1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:      #0D1512;
    --surface:    #141D19;
    --surface-2:  #1A2520;
    --sheet:      #F7F8F5;
    --ink:        #E6EEE8;
    --ink-2:      #A3B4AA;
    --ink-3:      #73867A;
    --rule:       #2A3A31;
    --rule-soft:  #1F2C26;
    --seal:       #2DD48F;
    --seal-deep:  #0E9F6E;
    --seal-bright:#5EEBB4;
    --seal-ink:   #06130D;
    --seal-wash:  #12352A;
    --gold:       #F7C65A;
    --gold-wash:  #33290F;
    --coral:      #FF8A6E;
    --coral-wash: #3A2019;
    --violet:     #8B97FF;
    --violet-wash:#1F2350;
    --stamp:      #FF8A6E;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px -4px rgba(0,0,0,.5);
    --shadow-md: 0 2px 4px rgba(0,0,0,.4), 0 16px 40px -12px rgba(0,0,0,.7);
    --shadow-sheet: 0 2px 4px rgba(0,0,0,.4), 0 30px 70px -20px rgba(45,212,143,.35);
    --glow: 0 10px 30px -10px rgba(45,212,143,.5);
    --brand-ar: var(--seal);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:      #0D1512;
  --surface:    #141D19;
  --surface-2:  #1A2520;
  --sheet:      #F7F8F5;
  --ink:        #E6EEE8;
  --ink-2:      #A3B4AA;
  --ink-3:      #73867A;
  --rule:       #2A3A31;
  --rule-soft:  #1F2C26;
  --seal:       #2DD48F;
  --seal-deep:  #0E9F6E;
  --seal-bright:#5EEBB4;
  --seal-ink:   #06130D;
  --seal-wash:  #12352A;
  --gold:       #F7C65A;
  --gold-wash:  #33290F;
  --coral:      #FF8A6E;
  --coral-wash: #3A2019;
  --violet:     #8B97FF;
  --violet-wash:#1F2350;
  --stamp:      #FF8A6E;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px -4px rgba(0,0,0,.5);
  --shadow-md: 0 2px 4px rgba(0,0,0,.4), 0 16px 40px -12px rgba(0,0,0,.7);
  --shadow-sheet: 0 2px 4px rgba(0,0,0,.4), 0 30px 70px -20px rgba(45,212,143,.35);
  --glow: 0 10px 30px -10px rgba(45,212,143,.5);
  --brand-ar: var(--seal);
}

/* ═══ Base ═════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-block-start: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: calc(1.0625rem * var(--ar-scale));
  line-height: 1.6;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[lang="ar"] { --ar-scale: 1.08; }
html[lang="ar"] body { font-family: var(--arab); }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .18em; transition: text-decoration-color var(--dur) var(--ease); }
a:hover { text-decoration-color: var(--seal); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
strong { font-weight: 600; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; border-radius: var(--r-sm); }

.visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; inset-block-start: -100%; inset-inline-start: var(--gutter);
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 0 0 var(--r-md) var(--r-md); z-index: 100;
}
.skip:focus { inset-block-start: 0; }

.wrap { max-inline-size: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-inline-size: var(--measure); }
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); }
.small { font-size: .9375rem; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.chip, .plans td, .plans .price, .s-amount-box, .stat-n { unicode-bidi: plaintext; }

/* Pastille de section : un point coloré, un mot. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm);
  color: var(--ink-2); font-size: .875rem; font-weight: 500; margin-block-end: 14px;
}
.eyebrow::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--seal); box-shadow: 0 0 0 4px var(--seal-wash); }
.eyebrow.gold::before { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-wash); }
.eyebrow.coral::before { background: var(--coral); box-shadow: 0 0 0 4px var(--coral-wash); }
.eyebrow.violet::before { background: var(--violet); box-shadow: 0 0 0 4px var(--violet-wash); }

/* Texte en dégradé animé : un seul par page, sur le titre. */
.grad {
  background: var(--grad-text); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hue 9s linear infinite;
}
@keyframes hue { to { background-position: 300% 0; } }

/* ═══ Boutons ══════════════════════════════════════════════════════ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-block-size: 48px; padding-inline: 22px; border-radius: 999px; overflow: hidden;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { inline-size: 18px; block-size: 18px; flex: none; transition: transform var(--dur) var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
html[dir="rtl"] .btn svg.arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover svg.arrow { transform: scaleX(-1) translateX(3px); }
.btn-primary { background: var(--grad-seal); color: var(--seal-ink); box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 16px 36px -10px rgba(14,159,110,.6); }
/* Reflet qui balaie le bouton au survol. */
.btn-primary::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { border: 1.5px solid var(--rule); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--seal); color: var(--seal-deep); box-shadow: var(--shadow-sm); }
.btn-warm { background: var(--grad-warm); color: #1F1400; box-shadow: 0 10px 30px -10px rgba(242,107,78,.55); }
.btn-warm:hover { box-shadow: 0 16px 36px -10px rgba(242,107,78,.65); }

/* ═══ En-tête ══════════════════════════════════════════════════════ */
.site-head {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-block-end: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-head.scrolled { border-block-end-color: var(--rule-soft); box-shadow: 0 8px 30px -18px rgba(15,36,56,.25); background: color-mix(in srgb, var(--paper) 86%, transparent); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-block-size: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { inline-size: 34px; block-size: 34px; border-radius: 10px; background: var(--grad-seal); display: grid; place-items: center; box-shadow: var(--glow); transition: transform var(--dur) var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-mark svg { inline-size: 20px; block-size: 20px; }
/* Lockup bilingue empilé : Sijilo dessus, سجيلو dessous en vert sceau, alignés
   au bord de départ. En arabe, l'ordre s'inverse et l'arabe prend la taille du
   mot principal ; le sens de lecture place déjà la tuile à droite (design/brand). */
.brand-word { display: grid; gap: 4px; line-height: 1; }
.brand-word b, .brand-word strong { font-weight: 600; font-size: 1.125rem; letter-spacing: -.015em; color: var(--ink); }
.brand-word .ar { font-family: var(--kufi); font-weight: 700; font-size: .6875rem; color: var(--brand-ar); }
html[lang="ar"] .brand-word b, html[lang="ar"] .brand-word strong { order: 2; font-size: .6875rem; letter-spacing: .05em; color: var(--ink-3); }
html[lang="ar"] .brand-word .ar { font-size: 1.125rem; color: var(--ink); }
.site-nav { display: none; gap: 4px; margin-inline-start: auto; }
.site-nav a {
  position: relative; padding: 8px 10px; white-space: nowrap; text-decoration: none; color: var(--ink-2); font-weight: 500; border-radius: 999px;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; inset-inline: 10px; inset-block-end: 4px; block-size: 2px; border-radius: 2px;
  background: var(--grad-seal); transform: scaleX(0); transform-origin: start; transition: transform var(--dur) var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.head-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.site-nav ~ .head-actions { margin-inline-start: 0; }
.lang {
  display: inline-flex; align-items: center; gap: 6px; min-block-size: 42px; padding-inline: 12px;
  border: 1.5px solid var(--rule); border-radius: 999px; font-weight: 600; font-size: .9375rem; background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--spring);
}
.lang:hover { border-color: var(--seal); transform: translateY(-1px); }
.lang .ar { font-family: var(--arab); color: var(--seal-deep); }
@media (min-width: 900px) { .site-nav { display: flex; } }
@media (max-width: 480px) { .head-actions .btn-primary { display: none; } }
@media (min-width: 900px) and (max-width: 1099px) { .site-head .wrap { gap: 14px; } .head-actions .btn-primary { display: none; } }
@media (min-width: 900px) and (max-width: 1199px) { .lang > :not(.ar) { display: none; } }

/* ═══ Hero ═════════════════════════════════════════════════════════ */
.hero { position: relative; padding-block: clamp(48px, 7vw, 104px) clamp(48px, 6vw, 88px); overflow: clip; isolation: isolate; }
/* Trois taches de couleur floues qui dérivent lentement derrière le contenu. */
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; pointer-events: none; will-change: transform; }
.blob-1 { inline-size: 520px; block-size: 520px; background: var(--seal-bright); inset-block-start: -180px; inset-inline-start: -160px; animation: drift 18s ease-in-out infinite alternate; }
.blob-2 { inline-size: 420px; block-size: 420px; background: var(--gold); inset-block-start: 30%; inset-inline-end: -140px; animation: drift 22s ease-in-out infinite alternate-reverse; }
.blob-3 { inline-size: 360px; block-size: 360px; background: var(--coral); inset-block-end: -200px; inset-inline-start: 38%; animation: drift 26s ease-in-out infinite alternate; opacity: .38; }
:root:not([data-theme="light"]) .blob { opacity: .22; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .blob { opacity: .55; } :root:not([data-theme="dark"]) .blob-3 { opacity: .38; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }

.hero .wrap { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 1024px) { .hero .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.hero-copy { display: grid; gap: 24px; min-inline-size: 0; }
.hero-copy > * { opacity: 0; animation: rise .7s var(--ease) forwards; }
.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .18s; }
.hero-copy > :nth-child(3) { animation-delay: .30s; }
.hero-copy > :nth-child(4) { animation-delay: .42s; }
.hero-copy > :nth-child(5) { animation-delay: .54s; }
.hero h1 {
  font-size: clamp(2.5rem, 4.8vw, 4.25rem); line-height: 1.02; font-weight: 600; letter-spacing: -.025em; text-wrap: balance;
}
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.25; }
.hero .lead { max-inline-size: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { color: var(--ink-3); font-size: .9375rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm); color: var(--ink-2);
}
.badge svg { inline-size: 14px; block-size: 14px; }
.badge.seal svg { color: var(--seal); } .badge.gold svg { color: var(--gold); } .badge.coral svg { color: var(--coral); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* La feuille : un chèque à l'échelle, 175 × 80 mm, jamais mis en miroir. */
.demo { display: grid; gap: 18px; min-inline-size: 0; }
.sheet-wrap { container-type: inline-size; direction: ltr; perspective: 1400px; opacity: 0; animation: sheet-in 1s var(--ease) .2s forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(30px) rotateX(8deg); } to { opacity: 1; transform: none; } }
.sheet {
  position: relative; aspect-ratio: 175 / 80; inline-size: 100%;
  background-color: var(--sheet);
  background-image:
    repeating-linear-gradient(to right, var(--sheet-grid) 0 1px, transparent 1px calc(100% / 35)),
    repeating-linear-gradient(to bottom, var(--sheet-grid) 0 1px, transparent 1px calc(100% / 16)),
    repeating-linear-gradient(58deg, var(--sheet-mark) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-58deg, var(--sheet-mark) 0 1px, transparent 1px 7px);
  border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: var(--shadow-sheet);
  color: var(--sheet-ink); font-family: var(--sans);
  overflow: hidden; transform: rotate(-1deg);
  transition: transform .6s var(--spring), box-shadow .6s var(--ease);
}
.demo:hover .sheet { transform: rotate(0deg) translateY(-4px); }
.sheet > * { position: absolute; }
.s-label { font-size: 1.75cqw; line-height: 1.2; color: var(--sheet-ink-2); letter-spacing: .01em; }
.s-label .ar { font-family: var(--arab); display: block; }
.s-line { border-block-end: 1px solid var(--sheet-line); }
.s-value { font-size: 2.6cqw; line-height: 1.15; font-weight: 500; white-space: nowrap; }
.s-title { inset-block-start: 6%; inset-inline-start: 4%; }
.s-title .fr { font-size: 2.1cqw; font-weight: 600; color: var(--sheet-ink); }
.s-amount-box {
  inset-block-start: 6%; inset-inline-end: 4%; inline-size: 26%; block-size: 14%;
  border: 1px solid var(--sheet-line); border-radius: 3px;
  display: flex; align-items: center; justify-content: flex-end; padding-inline: 3%;
  font-size: 3.1cqw; font-weight: 600; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--sheet) 60%, transparent);
}
.s-amount-box small { font-size: 1.6cqw; font-weight: 500; margin-inline-start: .6em; color: var(--sheet-ink-2); }
.s-payee { inset-block-start: 27%; inset-inline-start: 4%; inline-size: 62%; }
.s-words { inset-block-start: 43%; inset-inline-start: 4%; inline-size: 92%; }
.s-field { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 2%; }
.s-field .s-value { padding-inline-start: 1%; padding-block-end: .4cqw; min-block-size: 3.4cqw; }
.s-words .s-field { align-items: start; }
.s-words .s-label { line-height: 5.2cqw; }
.s-words .s-value {
  --lh: 5.2cqw;
  font-family: var(--serif); font-weight: 400; font-size: 2.55cqw; line-height: var(--lh); white-space: normal;
  min-block-size: calc(2 * var(--lh)); padding-block-end: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--lh) - 1px), var(--sheet-line) calc(var(--lh) - 1px) var(--lh));
}
html[lang="ar"] .s-words .s-value { font-family: var(--arab); direction: rtl; text-align: start; font-size: 2.7cqw; }
.s-words .s-value .caret { display: inline-block; inline-size: 1px; block-size: .9em; background: var(--sheet-ink); vertical-align: -.12em; margin-inline-start: 1px; animation: caret 1s steps(2) infinite; }
.s-place { inset-block-start: 70%; inset-inline-start: 4%; inline-size: 44%; }
.s-place .s-field { grid-template-columns: auto 1fr auto 1fr; }
.s-sign {
  inset-block-start: 66%; inset-inline-end: 4%; inline-size: 26%; block-size: 17%;
  border: 1px dashed var(--sheet-hatch);
  background: repeating-linear-gradient(45deg, var(--sheet-hatch) 0 2px, transparent 2px 8px);
  display: grid; place-items: center; text-align: center; padding: 2%;
  font-size: 1.5cqw; line-height: 1.25; color: var(--stamp);
}
.s-micr {
  inset-block-end: 0; inset-inline: 0; block-size: 9%;
  background: repeating-linear-gradient(90deg, var(--sheet-hatch) 0 2px, transparent 2px 7px);
  border-block-start: 1px dashed var(--sheet-hatch);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5cqw; color: var(--stamp); letter-spacing: .06em;
}
.s-specimen {
  inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 11cqw; font-weight: 600; letter-spacing: .3em; color: var(--sheet-ink); opacity: .045; transform: rotate(-14deg);
}
.s-seal {
  inset-block-start: 60%; inset-inline-start: 51%;
  inline-size: 13%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid #0E9F6E; color: #0A6B4A;
  display: grid; place-items: center; text-align: center;
  font-size: 1.55cqw; font-weight: 600; line-height: 1.15; letter-spacing: .02em;
  transform: rotate(-9deg) scale(1); opacity: 0; mix-blend-mode: multiply;
}
.s-seal::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1px solid #0E9F6E; opacity: .6; }
.s-seal.on { animation: stamp .42s cubic-bezier(.2,.9,.3,1.2) forwards; }
.sheet .ink { opacity: 0; }
.sheet.ready .ink { animation: ink .5s var(--ease) forwards; }
.sheet.ready .s-amount-box.ink { animation-delay: .35s; }
.sheet.ready .s-payee .ink { animation-delay: .65s; }
.sheet.ready .s-place .ink { animation-delay: .95s; }
.sheet.ready .s-words .ink { animation-delay: 1.15s; }
@keyframes ink { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes caret { to { opacity: 0; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-9deg) scale(1.35); } to { opacity: .92; transform: rotate(-9deg) scale(1); } }

.amounts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.amounts .small { margin-inline-end: 4px; }
.amounts .chip { opacity: 0; animation: rise .5s var(--ease) forwards; }
.amounts .chip:nth-of-type(1) { animation-delay: .9s; } .amounts .chip:nth-of-type(2) { animation-delay: 1s; }
.amounts .chip:nth-of-type(3) { animation-delay: 1.1s; } .amounts .chip:nth-of-type(4) { animation-delay: 1.2s; }
.chip {
  min-block-size: 42px; padding-inline: 16px; border-radius: 999px; background: var(--surface);
  border: 1.5px solid var(--rule); color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.chip:hover { border-color: var(--seal); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.chip[aria-pressed="true"] { background: var(--grad-seal); border-color: transparent; color: var(--seal-ink); box-shadow: var(--glow); }

/* ═══ Bandeau défilant ═════════════════════════════════════════════ */
/* Le bandeau est incliné ; son enveloppe rogne ce qui dépasse pour que la
   page ne s'élargisse jamais (le débordement est mesuré, RSP-18). */
.marquee-band { overflow: hidden; padding-block: 14px; margin-block: 8px 0; }
.marquee {
  --speed: 38s;
  position: relative; overflow: hidden; padding-block: 16px; color: var(--seal-ink);
  background: var(--grad-seal); transform: rotate(-1.2deg) scale(1.03);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track { display: flex; gap: 0; inline-size: max-content; animation: marquee var(--speed) linear infinite; direction: ltr; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; align-items: center; gap: 36px; padding-inline-end: 36px; white-space: nowrap; font-weight: 600; font-size: 1.0625rem; letter-spacing: .01em; }
.marquee li { display: inline-flex; align-items: center; gap: 12px; }
.marquee li::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.marquee .ar { font-family: var(--arab); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ═══ Révélation au défilement ═════════════════════════════════════ */
/* Le glissement latéral suit le sens de lecture : avant révélation, l'élément
   dépasse du côté NON défilable (à gauche en LTR, à droite en RTL), sinon il
   élargirait la page (RSP-18). */
html { --dir: 1; }
html[dir="rtl"] { --dir: -1; }
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal="left"] { transform: translateX(calc(-30px * var(--dir))); }
[data-reveal="right"] { transform: translateX(calc(30px * var(--dir))); }
[data-reveal="zoom"] { transform: scale(.94); }
[data-reveal].in { opacity: 1; transform: none; }
/* Décalage automatique des enfants d'une liste. */
[data-stagger] > * { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-stagger].in > * { opacity: 1; transform: none; }
[data-stagger].in > :nth-child(1) { transition-delay: .05s; } [data-stagger].in > :nth-child(2) { transition-delay: .15s; }
[data-stagger].in > :nth-child(3) { transition-delay: .25s; } [data-stagger].in > :nth-child(4) { transition-delay: .35s; }
[data-stagger].in > :nth-child(5) { transition-delay: .45s; } [data-stagger].in > :nth-child(6) { transition-delay: .55s; }

/* ═══ Sections ═════════════════════════════════════════════════════ */
/* `clip` rogne sans créer de conteneur de défilement : les colonnes figées
   du tableau des tarifs continuent de fonctionner. */
.section { position: relative; padding-block: clamp(64px, 8vw, 120px); overflow-x: clip; }
.section-head { display: grid; gap: 16px 48px; margin-block-end: clamp(32px, 5vw, 56px); }
@media (min-width: 900px) { .section-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; } }
.section h2 { font-size: clamp(1.875rem, 3.2vw, 2.75rem); line-height: 1.12; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
html[lang="ar"] .section h2 { letter-spacing: 0; line-height: 1.35; }
.section h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; }
.section.alt { background: var(--surface); }
.section.tint { background: linear-gradient(180deg, var(--paper), var(--surface-2) 50%, var(--paper)); }

/* Le paragraphe d'introduction suit le titre d'un temps. */
.section-head > .lead[data-reveal] { --d: 120ms; }

/* Chiffres clés : quatre compteurs. */
.stats-section { padding-block-start: 48px; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block-start: -28px; position: relative; z-index: 2; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--r-lg); padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm); display: grid; gap: 4px; position: relative; overflow: hidden;
  transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 4px; background: var(--grad-seal); }
.stat:nth-child(2)::before { background: var(--grad-warm); }
.stat:nth-child(3)::before { background: linear-gradient(135deg, var(--violet), var(--seal-bright)); }
.stat:nth-child(4)::before { background: linear-gradient(135deg, var(--coral), var(--gold)); }
.stat-n { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat-n small { font-size: .55em; font-weight: 600; color: var(--ink-2); margin-inline-start: 4px; }
.stat-l { color: var(--ink-2); font-size: .9375rem; }

/* Le montant en lettres, en grand. */
.words-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .words-grid { grid-template-columns: 1fr 1fr; } }
.words-cell {
  padding: 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm); min-inline-size: 0;
  position: relative; overflow: hidden; transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.words-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.words-cell::after { content: ""; position: absolute; inset-inline-end: -40px; inset-block-start: -40px; inline-size: 140px; block-size: 140px; border-radius: 50%; background: var(--seal-wash); opacity: .8; z-index: 0; }
.words-cell:last-child::after { background: var(--gold-wash); }
.words-cell > * { position: relative; z-index: 1; }
.words-cell .cell-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 18px; color: var(--ink-2); font-size: .9375rem; font-weight: 500; }
.words-cell .cell-head code { font-family: var(--sans); color: var(--seal-deep); background: var(--seal-wash); padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600; }
.words-cell:last-child .cell-head code { color: #7A5300; background: var(--gold-wash); }
:root:not([data-theme="light"]) .words-cell:last-child .cell-head code { color: var(--gold); }
.words-fr { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.35; }
.words-ar { font-family: var(--arab); font-size: clamp(1.625rem, 2.8vw, 2.25rem); line-height: 1.7; direction: rtl; text-align: start; }
.words-foot { margin-block-start: 24px; max-inline-size: var(--measure); }

/* Les étapes : une vraie séquence, reliée par un fil. */
.steps { display: grid; gap: 20px; counter-reset: step; position: relative; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step {
  position: relative; padding: 28px 26px 26px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm);
  display: grid; gap: 10px; align-content: start; transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--seal-wash); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  inline-size: 52px; block-size: 52px; border-radius: 16px; display: grid; place-items: center;
  font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; color: var(--seal-ink); background: var(--grad-seal); box-shadow: var(--glow);
  transition: transform var(--dur) var(--spring);
}
.step:nth-child(2)::before { background: var(--grad-warm); color: #1F1400; box-shadow: 0 10px 30px -10px rgba(242,107,78,.55); }
.step:nth-child(3)::before { background: linear-gradient(135deg, var(--violet), var(--seal-bright)); box-shadow: 0 10px 30px -10px rgba(91,108,255,.55); }
.step:hover::before { transform: rotate(-8deg) scale(1.08); }
.step h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.step p { color: var(--ink-2); }
.step .where { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .875rem; font-weight: 500; }
.step .where svg { inline-size: 14px; block-size: 14px; }
@media (min-width: 900px) {
  .steps::before { content: ""; position: absolute; inset-block-start: 54px; inset-inline: 10%; block-size: 2px; background: repeating-linear-gradient(90deg, var(--rule) 0 8px, transparent 8px 16px); z-index: 0; }
  .step { z-index: 1; }
}

/* Deux modules et le lien. */
.modules { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 900px) { .modules { grid-template-columns: 1fr minmax(240px, 300px) 1fr; } }
.module {
  padding: 32px clamp(20px, 3vw, 36px); min-inline-size: 0; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.module:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.module-head { display: flex; align-items: center; gap: 14px; margin-block-end: 6px; }
.tile { inline-size: 48px; block-size: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--seal-ink); background: var(--grad-seal); box-shadow: var(--glow); }
.tile svg { inline-size: 24px; block-size: 24px; }
.tile.warm { background: var(--grad-warm); color: #1F1400; box-shadow: 0 10px 30px -10px rgba(242,107,78,.55); }
.module .ar { font-family: var(--arab); color: var(--ink-2); font-weight: 500; display: block; font-size: 1rem; }
.module .small { margin-block-end: 20px; display: block; }
.module li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-block: 11px; border-block-start: 1px solid var(--rule-soft); transition: transform var(--dur) var(--ease); }
.module li:hover { transform: translateX(4px); }
html[dir="rtl"] .module li:hover { transform: translateX(-4px); }
.module li svg { inline-size: 22px; block-size: 22px; color: var(--seal); background: var(--seal-wash); border-radius: 50%; padding: 4px; margin-block-start: .1em; }
.module.b li svg { color: #7A5300; background: var(--gold-wash); }
:root:not([data-theme="light"]) .module.b li svg { color: var(--gold); }
/* La colonne centrale : liseré en dégradé qui tourne. */
.link-col { position: relative; border-radius: var(--r-xl); padding: 2px; background: conic-gradient(from var(--a, 0deg), var(--seal-bright), var(--gold), var(--coral), var(--violet), var(--seal-bright)); animation: spin-border 8s linear infinite; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin-border { to { --a: 360deg; } }
.link-inner { border-radius: calc(var(--r-xl) - 2px); background: var(--surface); block-size: 100%; padding: 32px 24px; display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; }
.link-col .glyph { inline-size: 72px; block-size: 72px; color: var(--seal); animation: pulse 3s ease-in-out infinite; }
.link-col h3 { font-size: 1.375rem; }
.link-col p { color: var(--ink-2); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* Précision : un réglet, et trois faits. */
.precision-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .precision-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.ruler { direction: ltr; padding: 24px; min-inline-size: 0; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm); }
.ruler svg { inline-size: 100%; block-size: auto; overflow: visible; }
.ruler .ink-stroke { stroke: var(--ink); }
.ruler .soft-stroke { stroke: var(--ink-3); }
.ruler .seal-stroke { stroke: var(--seal); }
.ruler .stamp-fill { fill: var(--coral); }
.ruler .crosshair { transform-origin: 280px 80px; animation: breathe 4s ease-in-out infinite; }
.ruler .dot { animation: blink 2s ease-in-out infinite; }
.ruler text { fill: var(--ink-2); font-family: var(--sans); font-size: 11px; font-variant-numeric: tabular-nums; }
.ruler .big { fill: var(--ink); font-size: 44px; font-weight: 700; letter-spacing: -.02em; }
.ruler .unit { fill: var(--ink-2); font-size: 14px; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.facts { display: grid; gap: 14px; }
.facts li {
  padding: 20px 22px; display: grid; grid-template-columns: 44px 1fr; gap: 6px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.facts li:hover { transform: translateX(6px); box-shadow: var(--shadow-md); }
html[dir="rtl"] .facts li:hover { transform: translateX(-6px); }
.facts li .tile { inline-size: 44px; block-size: 44px; border-radius: 12px; grid-row: span 2; }
.facts li .tile svg { inline-size: 22px; block-size: 22px; }
.facts li .tile.violet { background: linear-gradient(135deg, var(--violet), var(--seal-bright)); box-shadow: 0 10px 30px -10px rgba(91,108,255,.55); }
.facts li p { color: var(--ink-2); grid-column: 2; }

/* Pour qui. */
.who { display: grid; gap: 20px; }
@media (min-width: 900px) { .who { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.who li {
  padding: 28px 26px; border-radius: var(--r-xl); display: grid; gap: 10px; align-content: start; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.who li:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.who li::before { content: ""; position: absolute; inset-inline-end: -30px; inset-block-end: -30px; inline-size: 120px; block-size: 120px; border-radius: 50%; background: var(--seal-wash); transition: transform .5s var(--ease); }
.who li:nth-child(2)::before { background: var(--gold-wash); } .who li:nth-child(3)::before { background: var(--coral-wash); }
.who li:hover::before { transform: scale(1.6); }
.who li > * { position: relative; }
.who p { color: var(--ink-2); }

/* Tarifs : un tableau de comparaison se lit en défilant, première colonne
   figée — l'empiler détruirait la comparaison (RSP-12). */
.plans-scroll { overflow-x: auto; border: 1px solid var(--rule-soft); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-md); -webkit-overflow-scrolling: touch; }
.plans { inline-size: 100%; min-inline-size: 900px; border-collapse: separate; border-spacing: 0; font-size: .9375rem; }
.plans th, .plans td { padding: 14px 18px; text-align: start; border-block-end: 1px solid var(--rule-soft); vertical-align: top; }
.plans thead th { border-block-end: 1px solid var(--rule); vertical-align: bottom; padding-block: 24px 18px; }
.plans tbody tr { transition: background-color var(--dur) var(--ease); }
.plans tbody tr:not(.group):hover td, .plans tbody tr:not(.group):hover th { background: var(--surface-2); }
.plans tbody tr:last-child td, .plans tbody tr:last-child th { border-block-end: 0; }
.plans th:first-child, .plans td:first-child {
  position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1;
  min-inline-size: 210px; font-weight: 500; color: var(--ink); box-shadow: 1px 0 0 var(--rule-soft);
}
html[dir="rtl"] .plans th:first-child, html[dir="rtl"] .plans td:first-child { box-shadow: -1px 0 0 var(--rule-soft); }
.plans .plan-name { font-size: 1.0625rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.plans .pop { font-size: .6875rem; font-weight: 700; text-transform: none; padding: 3px 9px; border-radius: 999px; background: var(--grad-warm); color: #1F1400; letter-spacing: .01em; }
.plans .price { display: block; font-size: 1.625rem; font-weight: 700; letter-spacing: -.02em; margin-block-start: 6px; font-variant-numeric: tabular-nums; }
.plans .price small { font-size: .8125rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.plans .ttc { display: block; color: var(--ink-3); font-size: .8125rem; font-weight: 400; margin-block-start: 2px; }
.plans .group th { padding-block: 20px 6px; color: var(--ink-3); font-weight: 600; font-size: .875rem; border-block-end: 0; }
.plans td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.plans td .yes { inline-size: 22px; block-size: 22px; color: var(--seal); background: var(--seal-wash); border-radius: 50%; padding: 4px; }
.plans td .no { color: var(--ink-3); }
.plans .hl { background: var(--seal-wash); }
.plans thead .hl { background: var(--seal-wash); }
.plans tbody tr:not(.group):hover td.hl { background: color-mix(in srgb, var(--seal-wash) 70%, var(--surface)); }
.plans-note { margin-block-start: 16px; }

/* Sous 900 px, les cinq colonnes ne tiennent pas : derrière le défilement
   horizontal, les quatre plans payants — c'est-à-dire tout le prix — sont
   hors de l'écran, et rien ne dit qu'il faut faire glisser. Le tableau reste
   la seule source (un contenu, une traduction) mais on n'en montre qu'une
   colonne à la fois, choisie dans une barre d'onglets : comparer, c'est
   changer d'onglet. Sans JavaScript, la barre n'existe pas et le tableau
   défile comme avant — la lecture reste possible (RSP-12). */
.plan-tabs, .plan-hero { display: none; }

@media (max-width: 899px) {
  /* La barre reste visible pendant qu'on descend la liste : sinon on oublie
     quel plan on lit. Elle enveloppe plutôt qu'elle ne défile — un onglet
     hors écran est un onglet que personne ne trouve. */
  .plan-tabs {
    display: flex; flex-wrap: wrap; gap: 5px;
    position: sticky; inset-block-start: 68px; z-index: 20;
    margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  }
  .plan-tab {
    flex: 0 1 auto; min-block-size: 44px; padding-inline: 10px; border-radius: 999px;
    border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink-2);
    font-weight: 600; font-size: .875rem; white-space: nowrap;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  }
  .plan-tab[aria-pressed="true"] { background: var(--grad-seal); border-color: transparent; color: #fff; box-shadow: var(--glow); }

  /* Le prix, en grand, avant la liste : c'est la question qu'on se pose. */
  .plan-hero {
    display: grid; gap: 4px; justify-items: start; margin-block: 16px 14px; padding: 24px 22px 22px;
    border: 1px solid var(--rule-soft); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-sm);
  }
  .plan-hero .plan-name { font-size: 1.375rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
  .plan-hero .price { font-size: 2.25rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .plan-hero .price small { font-size: .875rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
  .plan-hero .ttc { color: var(--ink-3); font-size: .875rem; }
  .plan-hero .btn { margin-block-start: 16px; }
  .plan-hero .pop { font-size: .6875rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--grad-warm); color: #1F1400; }

  /* Le tableau devient une fiche : le libellé, la valeur, plus rien à glisser. */
  .plans-scroll { overflow-x: visible; }
  .plans { min-inline-size: 0; }
  .plans thead { display: none; }
  .plans th, .plans td { padding: 13px 16px; }
  /* La colonne figée n'a plus rien à figer : elle reprend le flux, et le
     filet qui marquait le bord du défilement disparaît, en RTL aussi. */
  .plans th:first-child, .plans td:first-child,
  html[dir="rtl"] .plans th:first-child, html[dir="rtl"] .plans td:first-child {
    position: static; box-shadow: none; min-inline-size: 0;
  }
  .plans tbody td { text-align: end; inline-size: 1%; white-space: nowrap; color: var(--ink); font-weight: 500; }
  .plans[data-plan] tbody td { display: none; }
  .plans[data-plan="1"] tbody td:nth-child(2),
  .plans[data-plan="2"] tbody td:nth-child(3),
  .plans[data-plan="3"] tbody td:nth-child(4),
  .plans[data-plan="4"] tbody td:nth-child(5),
  .plans[data-plan="5"] tbody td:nth-child(6) { display: table-cell; }
  /* Une colonne seule : la teinte du plan mis en avant ne distingue plus rien. */
  .plans td.hl, .plans tbody tr:not(.group):hover td.hl { background: none; }
}

/* Ce que Sijilo ne fait pas. */
.nots { display: grid; gap: 16px; }
@media (min-width: 900px) { .nots { grid-template-columns: 1fr 1fr; } }
.nots li {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 20px 22px; color: var(--ink-2); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.nots li:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.nots li .tile { inline-size: 40px; block-size: 40px; border-radius: 12px; background: var(--coral-wash); color: var(--coral); box-shadow: none; }
.nots li .tile svg { inline-size: 20px; block-size: 20px; }
.nots li strong { color: var(--ink); display: block; margin-block-end: 2px; }

/* ═══ Questions fréquentes ═════════════════════════════════════════ */
/* Un <details> par question : le pli et le dépli sont natifs, donc ils
   marchent sans JavaScript, se cherchent au clavier et s'annoncent seuls aux
   lecteurs d'écran. Une colonne unique, et non deux : déplier une réponse
   dans une grille à deux colonnes fait sauter la ligne entière. */
.faq { display: grid; gap: 10px; max-inline-size: 860px; }
.faq-item {
  border: 1px solid var(--rule-soft); border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.faq-item:hover { border-color: var(--rule); }
.faq-item[open] { border-color: var(--seal); box-shadow: var(--shadow-md); }
.faq-item summary {
  display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 16px; align-items: center;
  padding: 18px 22px; cursor: pointer; font-weight: 600; list-style: none;
  /* Cible tactile confortable même sur une question d'une seule ligne (RSP-15). */
  min-block-size: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
/* Le signe est dessiné en CSS : deux traits qui deviennent un, jamais une
   image ni une police d'icônes — le site ne charge rien d'ailleurs. */
.faq-item summary::after {
  content: ""; inline-size: 24px; block-size: 24px; border-radius: 50%;
  background:
    linear-gradient(var(--seal), var(--seal)) center / 11px 2px no-repeat,
    linear-gradient(var(--seal), var(--seal)) center / 2px 11px no-repeat,
    var(--seal-wash);
  transition: transform var(--dur) var(--spring), background-size var(--dur) var(--ease);
}
/* Le quart de tour emporte la barre verticale, qui arrive à l'horizontale :
   le « + » devient un « − » d'un seul geste. Effacer la mauvaise des deux
   laisserait un trait debout. */
.faq-item[open] summary::after {
  transform: rotate(90deg);
  background:
    linear-gradient(var(--seal), var(--seal)) center / 0 2px no-repeat,
    linear-gradient(var(--seal), var(--seal)) center / 2px 11px no-repeat,
    var(--seal-wash);
}
.faq-item summary:focus-visible { outline: 3px solid var(--seal); outline-offset: -3px; }
.faq-item p { padding: 0 22px 20px; color: var(--ink-2); max-inline-size: 66ch; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] p { animation: faq-open .28s var(--ease); }
}
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }

/* ═══ Contact ══════════════════════════════════════════════════════ */
/* Le formulaire ne transmet rien : la CSP du site interdit toute sortie
   (`connect-src 'none'`, `form-action 'none'`). Il compose le message et le
   confie au logiciel de messagerie du visiteur ; l'adresse écrite en clair à
   côté reste le chemin qui marche partout, y compris sans JavaScript — c'est
   pourquoi le formulaire naît `hidden` et n'apparaît que si le script tourne. */
.contact-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; } }

.contact-form {
  display: grid; gap: 16px; padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--rule-soft); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-sm);
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9375rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  /* 16 px au minimum : en dessous, iOS zoome au focus et casse la page (RSP-15). */
  font-size: 1rem; min-block-size: 46px; padding: 11px 14px;
  border: 1.5px solid var(--rule); border-radius: var(--r-md); inline-size: 100%;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.field textarea { min-block-size: 132px; resize: vertical; line-height: 1.55; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  /* Le chevron est dessiné dans la feuille : aucune image, aucune origine tierce. */
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-inline-end: 40px;
}
/* `background-position` reste physique : en RTL, seule la place du chevron
   change de bord, ses deux moitiés gardent leur ordre gauche-droite — les
   intervertir dessinerait la flèche à l'envers. */
html[dir="rtl"] .field select {
  background-position: 14px calc(50% + 2px), 20px calc(50% + 2px);
  padding-inline-end: 14px; padding-inline-start: 40px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { background: var(--surface); }
/* Le rouge n'apparaît qu'après une tentative d'envoi, jamais pendant la frappe. */
.contact-form.checked :invalid { border-color: var(--stamp); }
.field-hint { color: var(--ink-3); font-size: .8125rem; justify-self: end; }
.form-error { color: var(--stamp); font-size: .9375rem; font-weight: 500; }
/* L'accusé d'envoi. Il porte un fond, contrairement à l'erreur : c'est la
   seule preuve que le message est parti, et une ligne de texte de plus se
   confondrait avec la mention qui la suit. */
.form-ok {
  color: var(--seal-deep); font-size: .9375rem; font-weight: 600;
  padding: 12px 14px; border: 1px solid var(--seal); border-radius: var(--r-md);
  background: var(--seal-wash);
}
:root:not([data-theme="light"]) .form-ok { color: var(--seal); }
/* L'appât : hors de l'écran, jamais `display: none` — certains robots
   sautent ce que le CSS efface, et l'appât ne servirait plus à rien. */
.decoy {
  position: absolute; inline-size: 1px; block-size: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.contact-form .btn { justify-self: start; }

.contact-card {
  display: grid; gap: 14px; align-content: start; padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--rule-soft); border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
  background: linear-gradient(160deg, var(--violet-wash), var(--surface) 60%);
}
.contact-card .eyebrow { justify-self: start; margin-block-end: 0; }
.contact-mail { font-size: clamp(1.125rem, 3.4vw, 1.5rem); font-weight: 700; letter-spacing: -.01em; }
/* `user-select: all` : un seul clic sélectionne l'adresse ENTIÈRE. Sans lui,
   un double-clic s'arrête au « @ » et on repart avec la moitié.
   `unicode-bidi: plaintext` la garde en lecture gauche-droite même quand la
   page passe en RTL — une adresse retournée n'est plus une adresse. */
.contact-mail span {
  color: var(--seal-deep); overflow-wrap: anywhere; unicode-bidi: plaintext;
  user-select: all; -webkit-user-select: all;
}
:root:not([data-theme="light"]) .contact-mail span { color: var(--seal); }
/* Le bouton de copie. Discret : l'adresse est la donnée, la copie n'est
   qu'une commodité — et elle ne doit pas peser autant que « Envoyer ». */
.copy {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  min-block-size: 40px; padding-inline: 14px; border-radius: 999px;
  font-size: .875rem; font-weight: 600; color: var(--ink-2);
  border: 1.5px solid var(--rule); background: var(--surface);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.copy svg { inline-size: 16px; block-size: 16px; flex: none; }
.copy:hover { border-color: var(--seal); color: var(--seal-deep); }
:root:not([data-theme="light"]) .copy:hover { color: var(--seal); }
.copied { color: var(--seal-deep); font-size: .875rem; font-weight: 600; }
:root:not([data-theme="light"]) .copied { color: var(--seal); }
.contact-facts { display: grid; gap: 12px; color: var(--ink-2); }
.contact-facts li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.contact-facts .tile { inline-size: 32px; block-size: 32px; border-radius: 10px; background: var(--surface); color: var(--seal); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.contact-facts .tile svg { inline-size: 17px; block-size: 17px; }

/* Appel final. */
.cta { position: relative; overflow: clip; isolation: isolate; background: var(--grad-seal); color: #fff; border-radius: var(--r-xl); margin-inline: var(--gutter); padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px); }
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; filter: blur(40px); z-index: -1; opacity: .7; }
.cta::before { inline-size: 380px; block-size: 380px; background: var(--gold); inset-inline-end: -120px; inset-block-start: -160px; animation: drift 14s ease-in-out infinite alternate; }
.cta::after { inline-size: 300px; block-size: 300px; background: var(--coral); inset-inline-start: -100px; inset-block-end: -160px; animation: drift 18s ease-in-out infinite alternate-reverse; }
.cta-wrap { max-inline-size: 1200px; margin-inline: auto; display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .cta-wrap { grid-template-columns: minmax(0, 7fr) auto; } }
.cta h2 { font-size: clamp(1.875rem, 3.2vw, 2.75rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
.cta p { opacity: .9; margin-block-start: 10px; max-inline-size: var(--measure); font-size: 1.125rem; }
.cta .btn-primary { background: #fff; color: var(--seal-deep); box-shadow: 0 16px 40px -12px rgba(0,0,0,.35); }
.cta .btn-primary::after { background: linear-gradient(115deg, transparent 30%, rgba(14,159,110,.18) 50%, transparent 70%); }

/* Pied de page et mentions obligatoires (§2.7). */
.site-foot { padding-block: 56px 40px; color: var(--ink-2); font-size: .9375rem; }
.site-foot .wrap { display: grid; gap: 24px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin: 0; flex-wrap: wrap; }
.foot-brand .brand-word { gap: 3px; }
.foot-brand .brand-word strong { font-size: .9375rem; }
.foot-brand .brand-word .ar { font-size: .5625rem; }
html[lang="ar"] .foot-brand .brand-word strong { font-size: .5625rem; }
html[lang="ar"] .foot-brand .brand-word .ar { font-size: .9375rem; }
.brand-mark--sm { inline-size: 24px; block-size: 24px; border-radius: 7px; box-shadow: none; }
.brand-mark--sm svg { inline-size: 14px; block-size: 14px; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-row nav a { text-decoration: none; padding-block: 4px; border-block-end: 1px solid transparent; transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.foot-row nav a:hover, .foot-row nav a[aria-current="page"] { color: var(--ink); border-block-end-color: var(--seal); }
.legal { max-inline-size: 80ch; font-size: .875rem; line-height: 1.6; color: var(--ink-3); }
.legal strong { color: var(--ink-2); }

.link-btn { color: inherit; font: inherit; padding-block: 4px; border-block-end: 1px solid transparent; transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.link-btn:hover { color: var(--ink); border-block-end-color: var(--seal); }

/* ═══ Bandeau de consentement ══════════════════════════════════════ */
.consent {
  position: fixed; inset-block-end: max(16px, env(safe-area-inset-bottom)); inset-inline: 16px; z-index: 90;
  max-inline-size: 520px; margin-inline-start: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule-soft); border-radius: var(--r-xl);
  box-shadow: var(--shadow-md), 0 30px 80px -30px rgba(15,36,56,.35);
  padding: 22px 22px 20px; display: grid; gap: 12px;
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .35s var(--ease), transform .45s var(--spring);
  /* Sur un écran bas, le panneau déplié défile en interne au lieu de sortir de l'écran. */
  max-block-size: calc(100dvh - 32px); overflow-y: auto; overflow-x: hidden;
}
.consent::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 4px; background: var(--grad-seal); }
.consent.on { opacity: 1; transform: none; }
@media (min-width: 640px) { .consent { inset-inline: auto 24px; inset-block-end: 24px; } html[dir="rtl"] .consent { inset-inline: 24px auto; } }
.consent-head { display: flex; align-items: center; gap: 12px; }
.consent-icon { inline-size: 40px; block-size: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--seal-ink); background: var(--grad-seal); box-shadow: var(--glow); }
.consent-icon svg { inline-size: 22px; block-size: 22px; }
.consent h2 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; flex: 1; }
.consent-close { inline-size: 36px; block-size: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.consent-close:hover { background: var(--surface-2); color: var(--ink); }
.consent-close svg { inline-size: 16px; block-size: 16px; }
.consent > p { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.consent-more { font-size: .875rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-actions .btn { min-block-size: 42px; padding-inline: 16px; font-size: .9375rem; }
.consent-details { display: grid; gap: 10px; padding-block-start: 6px; border-block-start: 1px solid var(--rule-soft); }
.consent-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; padding-block: 8px; }
.consent-row p { color: var(--ink-3); font-size: .8125rem; line-height: 1.5; margin-block-start: 2px; }
.consent-name { font-weight: 600; font-size: .9375rem; }
.consent-switch { display: grid; justify-items: end; gap: 4px; }
.consent-always { font-size: .75rem; color: var(--ink-3); white-space: nowrap; }
/* Interrupteur accessible : un vrai <input type="checkbox" role="switch">. */
.switch { appearance: none; -webkit-appearance: none; margin: 0; inline-size: 46px; block-size: 26px; border-radius: 999px; background: var(--rule); position: relative; cursor: pointer; transition: background-color var(--dur) var(--ease); flex: none; }
.switch::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 20px; block-size: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--dur) var(--spring); }
.switch:checked { background: var(--seal); }
.switch:checked::after { transform: translateX(20px); }
html[dir="rtl"] .switch:checked::after { transform: translateX(-20px); }
.switch:disabled { opacity: .55; cursor: not-allowed; }
.switch:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; }

/* ═══ Pages légales ════════════════════════════════════════════════ */
.doc-hero { padding-block: clamp(40px, 6vw, 72px) 24px; position: relative; overflow: clip; isolation: isolate; }
.doc-hero h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.doc-hero .lead { margin-block-start: 14px; max-inline-size: 60ch; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 20px; }
.doc-layout { display: grid; gap: 40px; padding-block: 24px clamp(56px, 8vw, 104px); }
@media (min-width: 1024px) { .doc-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
.doc-toc { position: sticky; inset-block-start: 88px; display: none; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm); }
@media (min-width: 1024px) { .doc-toc { display: block; } }
.doc-toc p { font-weight: 600; font-size: .875rem; color: var(--ink-3); margin-block-end: 10px; }
.doc-toc a { display: block; padding: 6px 0 6px 12px; border-inline-start: 2px solid var(--rule-soft); text-decoration: none; color: var(--ink-2); font-size: .9375rem; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.doc-toc a:hover, .doc-toc a[aria-current="true"] { color: var(--ink); border-inline-start-color: var(--seal); }
.doc { min-inline-size: 0; display: grid; gap: 12px; }
.doc section { padding: 28px clamp(20px, 3vw, 36px); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--rule-soft); box-shadow: var(--shadow-sm); scroll-margin-block-start: 88px; }
.doc h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.01em; margin-block-end: 12px; display: flex; align-items: baseline; gap: 12px; }
.doc h2 .n { font-size: .875rem; font-weight: 700; color: var(--seal-deep); background: var(--seal-wash); padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; flex: none; }
.doc h3 { font-size: 1.0625rem; font-weight: 600; margin-block: 16px 6px; }
.doc p, .doc li { color: var(--ink-2); max-inline-size: 78ch; }
.doc p + p { margin-block-start: 10px; }
.doc ul { display: grid; gap: 6px; margin-block-start: 8px; }
.doc ul li { padding-inline-start: 22px; position: relative; }
.doc ul li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .62em; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--seal); }
.doc table { inline-size: 100%; border-collapse: collapse; margin-block-start: 12px; font-size: .9375rem; }
.doc th, .doc td { text-align: start; padding: 10px 12px; border-block-end: 1px solid var(--rule-soft); vertical-align: top; color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 600; }
.doc .table-scroll { overflow-x: auto; }
.doc .fill { color: #7A5300; background: var(--gold-wash); padding: 1px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
:root:not([data-theme="light"]) .doc .fill { color: var(--gold); }
.doc .callout { padding: 16px 18px; border-radius: var(--r-md); background: var(--seal-wash); color: var(--ink); border-inline-start: 4px solid var(--seal); }
.doc .callout p { color: var(--ink); }
.doc .callout.warm { background: var(--gold-wash); border-inline-start-color: var(--gold); }
.doc-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 12px; }
.doc-nav a { text-decoration: none; }
.notfound { min-block-size: 60vh; display: grid; place-content: center; text-align: center; gap: 16px; padding-block: 80px; }
.notfound .code { font-size: clamp(4rem, 12vw, 9rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; }

/* ═══ Mouvement réduit ═════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero-copy > *, .sheet-wrap, .sheet .ink, .amounts .chip { opacity: 1; }
  .s-seal.on { opacity: .92; }
  [data-reveal], [data-stagger] > * { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .consent { opacity: 1; transform: none; }
  .blob, .cta::before, .cta::after { animation: none; }
  .grad { animation: none; }
}

/* ── « Prochainement » ────────────────────────────────────────────────
   Annoncer un module qui n'existe pas encore serait malhonnête ; le taire
   alors que la grille le facture le serait aussi. La pastille dit les deux
   en trois mots, et ne crie pas : c'est une réserve, pas une réclame. */
.soon {
  display: inline-block; margin-inline-start: .5rem;
  padding: 3px 9px; border-radius: 999px;
  font-size: .6875rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  background: rgba(140, 96, 9, .14); color: #7A5308;
}
.module .soon { margin-inline-start: auto; align-self: center; }
.soon-note { margin: .35rem 0 0; font-size: .8125rem; line-height: 1.5; color: var(--muted, #5A6B62); }
