/* ==========================================================================
   Auto-École Al Amal — Design System v2
   Direction : crème + noir + jaune citron, panneaux arrondis, typo serrée,
   révélations au scroll. Inspiré des thèmes « driving school » modernes.
   --------------------------------------------------------------------------
   1. Tokens          8.  Placeholders photo   15. Planning / agenda
   2. Reset           9.  Marquee              16. Quiz
   3. Layout          10. Formulaires          17. Tarifs
   4. Header          11. Tableaux             18. Témoignages / FAQ / étapes
   5. Boutons         12. Jauges & KPI         19. Footer
   6. Cartes          13. Onglets & app        20. Animations
   7. Hero            14. Auth                 21. RTL & responsive
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
/* Palette officielle AFRA DRIVER (charte v1) :
   Ink Black #0E1116 · Signal Yellow #FFC400 · Deep Amber #E9A800 · Slate Grey #6B7280
   Le jaune est un accent : jamais utilisé pour du petit texte sur fond clair. */
:root {
  /* Marque */
  --brand: #ffc400;          /* Signal Yellow */
  --brand-700: #e9a800;      /* Deep Amber — bordures, survols */
  --brand-100: #fff2cc;      /* fond de badge */
  --brand-050: #fffaeb;      /* fond très léger */

  /* Encres */
  --ink: #0e1116;            /* Ink Black */
  --ink-2: #262d36;
  --ink-3: #5a616b;
  --ink-4: #6b7280;          /* Slate Grey */

  /* Surfaces */
  --bg: #f4f5f7;
  --bg-2: #e9ebee;
  --surface: #ffffff;
  --panel: #0e1116;
  --panel-2: #080a0d;
  --line: #e1e4e8;
  --line-2: #eef0f3;
  --line-dark: rgba(255, 255, 255, .13);

  /* Sémantique */
  --ok: #1f7a43;
  --ok-100: #e3f4e9;
  --warn: #8a5d00;
  --warn-100: #fdf0d2;
  --bad: #a52a2a;
  --bad-100: #fbe5e5;

  /* Typo */
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-ar: "Cairo", "Montserrat", "Segoe UI", system-ui, sans-serif;
  --track-label: .16em;      /* labels en majuscules (charte : +30%) */

  /* Index d'animation (surchargés en ligne par UI.js) */
  --d: 0;
  --wi: 0;

  /* Rythme */
  --gap: 22px;
  --maxw: 1240px;
  --pad: 14px;
  --header-h: 76px;

  /* Formes */
  --r-xs: 10px;
  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-full: 999px;

  /* Ombres */
  --sh-1: 0 1px 2px rgba(14, 17, 22, .05);
  --sh-2: 0 10px 26px -14px rgba(14, 17, 22, .24);
  --sh-3: 0 30px 60px -24px rgba(14, 17, 22, .38);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 1 bis. Polices auto-hébergées (Google Fonts, licence OFL) ---------- */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../assets/fonts/montserrat-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/cairo-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/cairo-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/cairo-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/cairo-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/cairo-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/cairo-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;                 /* charte : Montserrat Medium pour le texte courant */
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
/* Charte : titres en Montserrat ExtraBold, majuscules, tracking −1,2 % */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.06; letter-spacing: -.012em; }
h1, h2 { text-transform: uppercase; }
/* Dans les espaces connectés on garde la casse normale : « Bonjour, Youssef »
   est un message adressé à une personne, pas un titre d'affiche. */
.app h1, .app h2, .app h3 { text-transform: none; letter-spacing: -.02em; }
html[dir="rtl"] h1, html[dir="rtl"] h2 { letter-spacing: 0; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.18rem; letter-spacing: -.01em; line-height: 1.3; }
h4 { font-size: 1rem; }
p { color: var(--ink-3); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
::selection { background: var(--brand); color: var(--ink); }

/* Barre de progression de lecture */
.progress {
  position: fixed; inset-block-start: 0; inset-inline-start: 0; height: 3px; width: 0;
  background: var(--brand); z-index: 200; transition: width .1s linear;
}

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 26px; }
.panel {
  margin-inline: var(--pad); border-radius: var(--r-xl); position: relative; overflow: hidden;
}
.panel--dark { background: var(--panel); color: #fff; }
.panel--dark p { color: #a8a8a2; }
.panel--dark small, .panel--dark .stats div span, .panel--dark .hero__foot small { color: #aeaea7; }
.panel--light { background: var(--surface); }
.panel--bg { background: var(--bg-2); }
.panel + .panel { margin-top: var(--pad); }
.section { padding: clamp(60px, 8vw, 116px) 0; }
.section--tight { padding: clamp(40px, 5vw, 68px) 0; }

/* Texture discrète des panneaux sombres */
.grid-tex::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 20%, transparent 75%);
}
.glow::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-start: -220px; height: 440px;
  pointer-events: none; opacity: .5;
  background: radial-gradient(50% 60% at 50% 50%, rgba(229, 223, 93, .55), transparent 70%);
}

.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 26px; } .mt-4 { margin-top: 42px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Étiquette de section : « • Nos formations » */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); padding: 8px 16px 8px 12px; border-radius: var(--r-full);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-700); flex: none;
}
.panel--dark .eyebrow { background: rgba(255, 255, 255, .07); border-color: var(--line-dark); color: #fff; }
.panel--dark .eyebrow::before { background: var(--brand); }

.section-head { max-width: 720px; margin-bottom: clamp(34px, 4vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 20px; }
.section-head p { margin-top: 18px; font-size: 1.04rem; max-width: 58ch; }
.section-head--center p { margin-inline: auto; }

/* Titre à deux tons + révélation mot à mot */
.reveal-words span { display: inline-block; }
.reveal-words .w[dir="ltr"] { unicode-bidi: isolate; }
.reveal-words .w { color: #7c7c74; transition: color .5s var(--ease); }
.panel--dark .reveal-words .w { color: rgba(255, 255, 255, .46); }
.reveal-words.is-on .w { color: inherit; }
.reveal-words .w { transition-delay: calc(var(--wi) * 38ms); }

/* ---------- 4. Header ---------- */
.header {
  position: sticky; inset-block-start: 0; z-index: 90; padding: 14px var(--pad) 0;
  transition: padding .3s var(--ease);
}
.header.is-stuck { padding-top: 8px; }
.header__inner {
  max-width: var(--maxw); margin-inline: auto; height: 62px; display: flex; align-items: center;
  gap: 16px; padding: 0 12px 0 16px; border-radius: var(--r-full);
  background: rgba(27, 27, 27, .92); color: #fff; backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .09);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.header.is-stuck .header__inner { box-shadow: var(--sh-3); background: rgba(18, 18, 18, .96); }

.logo { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; }
.logo__mark {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand); color: var(--ink); font-weight: 800; font-size: .84rem;
}
.logo small { display: block; font-size: .68rem; font-weight: 500; color: #a8a8a2; letter-spacing: .02em; }
.logo > span { min-width: 0; line-height: 1.2; }

.nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav a {
  font-size: .92rem; font-weight: 500; color: #d8d8d2; padding: 9px 14px;
  border-radius: var(--r-full); white-space: nowrap; transition: color .2s, background .2s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.is-active { color: var(--ink); background: var(--brand); font-weight: 600; }
.only-mobile { display: none !important; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.burger {
  display: none; width: 42px; height: 42px; border-radius: 50%; flex: none;
  border: 1px solid rgba(255, 255, 255, .18);
}
.burger span { display: block; width: 16px; height: 1.6px; background: #fff; margin: 3.4px auto; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Sélecteur de langue */
.lang { position: relative; }
.lang__btn {
  display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, .18); font-size: .82rem; font-weight: 600; color: #fff;
  transition: background .2s;
}
.lang__btn:hover { background: rgba(255, 255, 255, .1); }
.lang__menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 178px; padding: 7px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-3); display: none; z-index: 95;
}
.lang.is-open .lang__menu { display: block; animation: pop .22s var(--ease); }
.lang__menu button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--r-xs); font-size: .9rem; font-weight: 500; text-align: start;
}
.lang__menu button:hover { background: var(--bg); }
.lang__menu button[aria-current="true"] { background: var(--brand-100); font-weight: 700; }

/* ---------- 5. Boutons ---------- */
.btn {
  --btn-bg: var(--brand); --btn-fg: var(--ink);
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 10px 8px 24px;
  background: var(--btn-bg); color: var(--btn-fg); border-radius: var(--r-full);
  font-weight: 600; font-size: .95rem; letter-spacing: -.01em; border: 1px solid transparent;
  transition: background .25s var(--ease), color .25s, border-color .25s, transform .25s var(--ease);
  white-space: nowrap;
}
.btn__ico {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ink); color: var(--brand); overflow: hidden;
}
.btn__ico svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .btn__ico svg { transform: translateX(3px); }
html[dir="rtl"] .btn__ico svg { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .btn__ico svg { transform: scaleX(-1) translateX(3px); }
.btn:active { transform: translateY(0); }

.btn--dark { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn--dark .btn__ico { background: var(--brand); color: var(--ink); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line);
  padding: 11px 22px;
}
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel--dark .btn--ghost, .btn--ghost-light {
  --btn-fg: #fff; border-color: rgba(255, 255, 255, .22);
}
.panel--dark .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--plain { padding: 11px 22px; }
.btn--sm { padding: 7px 8px 7px 18px; font-size: .86rem; }
.btn--sm.btn--plain, .btn--sm.btn--ghost { padding: 8px 16px; }
.btn--sm .btn__ico { width: 28px; height: 28px; }
.btn--sm .btn__ico svg { width: 13px; height: 13px; }
.btn--lg { padding: 10px 12px 10px 30px; font-size: 1.02rem; }
.btn--lg .btn__ico { width: 42px; height: 42px; }
.btn--block { width: 100%; justify-content: space-between; white-space: normal; }
.btn--block > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.btn--block.btn--plain, .btn--block.btn--ghost { justify-content: center; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--danger { --btn-bg: var(--bad-100); --btn-fg: var(--bad); }

/* Bouton « lire la vidéo » */
.play { display: inline-flex; align-items: center; gap: 14px; font-weight: 600; font-size: .95rem; }
.play i {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: var(--ink);
  display: grid; place-items: center; flex: none; position: relative;
}
.play i::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--brand); animation: ping 2.4s infinite;
}
.play svg { width: 14px; height: 14px; }

/* Lien souligné animé */
.link-u { position: relative; font-weight: 600; }
.link-u::after {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-end: -3px; width: 100%; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: inline-start;
  transition: transform .35s var(--ease);
}
.link-u:hover::after { transform: scaleX(1); }

/* Badge circulaire tournant */
.stamp {
  width: 116px; height: 116px; flex: none; position: relative; display: grid; place-items: center;
}
.stamp > svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
/* Chromium ne dessine pas l'arabe le long d'un textPath : on montre alors un
   anneau pointillé tournant, qui garde la même intention graphique. */
.stamp.is-plain svg text { display: none; }
.stamp.is-plain::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  border: 2px dashed var(--brand); opacity: .6; animation: spin 22s linear infinite;
}
.stamp span {
  width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: var(--ink);
  display: grid; place-items: center;
}

/* ---------- 6. Cartes ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; position: relative; color: var(--ink);
}
.card p, .card .quote { color: var(--ink-3); }
/* Surfaces claires posées sur un panneau sombre : on force l'encre foncée */
.panel--dark .card:not(.card--dark), .panel--dark .kpi__card, .panel--dark .table-wrap,
.panel--dark .slot, .panel--dark .week__day, .panel--dark .answer, .panel--dark .quiz-top,
.panel--dark .lang__menu, .panel--dark .field input, .panel--dark .field select { color: var(--ink); }
.panel--dark .card:not(.card--dark) p,
.panel--dark .card:not(.card--dark) small,
.panel--dark .card:not(.card--dark) span { color: var(--ink-3); }
.panel--dark .card:not(.card--dark) b,
.panel--dark .card:not(.card--dark) h1,
.panel--dark .card:not(.card--dark) h2,
.panel--dark .card:not(.card--dark) h3,
.panel--dark .card:not(.card--dark) label { color: var(--ink); }
.panel--dark .card:not(.card--dark) .eyebrow {
  background: var(--bg-2); border-color: var(--line); color: var(--ink-2);
}
.panel--dark .card:not(.card--dark) .eyebrow::before { background: var(--brand-700); }
.panel--dark .card:not(.card--dark) .badge { background: var(--bg-2); color: var(--ink-2); }
.panel--dark .card:not(.card--dark) .badge--brand { background: var(--brand-100); color: #5d5910; }
.panel--dark .card:not(.card--dark) .badge--ok { background: var(--ok-100); color: var(--ok); }
.panel--dark .card:not(.card--dark) .badge--bad { background: var(--bad-100); color: var(--bad); }
.panel--dark .card:not(.card--dark) .badge--warn { background: var(--warn-100); color: var(--warn); }
.panel--dark .card .btn span, .panel--dark .card .btn { color: inherit; }
.panel--dark .card .btn--dark, .panel--dark .card .btn--dark span { color: #fff; }
.panel--dark .card .logo__mark { color: var(--ink); }
.card--pad-sm { padding: 18px; }
.card--bg { background: var(--bg-2); border-color: transparent; }
.card--dark { background: var(--panel); border-color: var(--line-dark); color: #fff; }
.card--dark p, .card--dark .quote { color: #a8a8a2; }
/* Média pleine largeur en tête de carte */
.card__media { margin: -26px -26px 22px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.card--pad-sm .card__media { margin: -18px -18px 16px; }
.card--hover { transition: transform .35s var(--ease), border-color .3s, box-shadow .35s var(--ease); }
.card--hover:hover { transform: translateY(-6px); border-color: var(--brand-700); box-shadow: var(--sh-2); }
.card h3 + p { margin-top: 10px; font-size: .95rem; }

.card__icon {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--ink); font-size: 1.4rem; margin-bottom: 20px;
}
.card__icon svg { width: 24px; height: 24px; }
.card__icon--md { width: 46px; height: 46px; margin: 0; }
.card__icon--md svg { width: 20px; height: 20px; }
.card__icon--sm { width: 40px; height: 40px; margin: 0; }
.card__icon--sm svg { width: 18px; height: 18px; }
.card__icon--outline { background: var(--brand-100); }
.card__icon--dark { background: var(--ink); color: var(--brand); }
.card__icon--accent { background: var(--brand-100); }
.card__icon--ok { background: var(--ok-100); color: var(--ok); }
.card__n {
  position: absolute; inset-block-start: 22px; inset-inline-end: 26px;
  font-size: .82rem; font-weight: 700; color: var(--ink-4);
}
.card__arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.card--hover:hover .card__arrow { background: var(--brand); border-color: var(--brand); transform: rotate(-45deg); }
.card__arrow svg { width: 14px; height: 14px; }
html[dir="rtl"] .card__arrow svg { transform: scaleX(-1); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-full);
  font-size: .76rem; font-weight: 600; background: var(--bg-2); color: var(--ink-2);
}
.badge--ok { background: var(--ok-100); color: var(--ok); }
.badge--warn { background: var(--warn-100); color: var(--warn); }
.badge--bad { background: var(--bad-100); color: var(--bad); }
.badge--brand { background: var(--brand-100); color: #6d6813; }
.badge--accent { background: var(--brand); color: var(--ink); }
.panel--dark .badge { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- 7. Hero ---------- */
.hero { padding: clamp(46px, 6vw, 84px) 0 0; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero h1 { margin-top: 24px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__lead { margin-top: 24px; max-width: 46ch; font-size: 1.06rem; }
.hero__cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 36px; }
.hero__foot {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap; margin-top: 46px;
  padding-top: 26px; border-top: 1px solid var(--line-dark);
}
.hero__media { position: relative; }
.hero__arc {
  position: absolute; z-index: 0; inset-block: 8% 8%; inset-inline-end: -6%;
  width: 62%; border-radius: 50% 12% 50% 12%; background: var(--brand); opacity: .16;
  filter: blur(2px); animation: float-y 9s ease-in-out infinite;
}
.hero__media .ph { position: relative; z-index: 1; }
.hero__mini {
  position: absolute; z-index: 2; max-width: 210px; box-shadow: var(--sh-3);
}
.hero__mini--tr { inset-block-start: 26px; inset-inline-end: -14px; }
.hero__mini--bl { inset-block-end: -22px; inset-inline-start: -16px; max-width: 262px; }
.ph--tall .ph__ico { width: min(46%, 210px); }
.hero__stamp { position: absolute; inset-block-start: -18px; inset-inline-start: -34px; z-index: 3; }

/* Pile d'avatars */
.avatars { display: flex; align-items: center; }
.avatars span {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--panel);
  margin-inline-start: -9px; display: grid; place-items: center; font-size: .64rem; font-weight: 700;
  background: var(--brand); color: var(--ink);
}
.avatars span:first-child { margin-inline-start: 0; }
.avatars span:nth-child(2) { background: var(--brand-100); }
.avatars span:nth-child(3) { background: #fff; }
.avatars span:nth-child(4) { background: var(--ink); color: var(--brand); border-color: var(--brand); }

.pill-note {
  display: inline-flex; align-items: center; gap: 12px; padding: 7px 18px 7px 8px;
  border-radius: var(--r-full); background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line-dark); font-size: .86rem; font-weight: 500; color: #e6e6e0;
}

/* Note Google / étoiles */
.rating { display: flex; align-items: center; gap: 12px; }
.rating b { font-size: 1.5rem; letter-spacing: -.03em; }
.stars { color: var(--brand); letter-spacing: 2px; font-size: .92rem; }
.rating small { display: block; color: var(--ink-4); font-size: .78rem; }

/* Chiffres clés */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stats div strong { display: block; font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 700; letter-spacing: -.04em; }
.stats div span { font-size: .84rem; color: var(--ink-4); }
.panel--dark .stats div strong { color: #fff; }

/* ---------- 8. Placeholders photo ---------- */
/* Pour mettre une vraie photo : glisser un <img> à l'intérieur du .ph,
   l'habillage décoratif disparaît automatiquement. */
.ph {
  position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--bg-2);
  display: grid; place-items: center; isolation: isolate;
}
.ph--dark { background: #232323; }
.ph--1x1 { aspect-ratio: 1 / 1; }
.ph--4x3 { aspect-ratio: 4 / 3; }
.ph--16x9 { aspect-ratio: 16 / 9; }
.ph--3x4 { aspect-ratio: 3 / 4; }
.ph--tall { aspect-ratio: 5 / 6; }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.ph__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph__ico { position: relative; z-index: 1; width: min(38%, 168px); height: auto; opacity: .85; }
.ph__tag {
  position: absolute; z-index: 3; inset-block-end: 12px; inset-inline-start: 12px;
  font-size: .72rem; font-weight: 600; color: var(--ink-3);
  background: rgba(255, 255, 255, .84); border: 1px solid var(--line);
  padding: 4px 11px; border-radius: var(--r-full); backdrop-filter: blur(4px);
}
.ph--dark .ph__tag { background: rgba(0, 0, 0, .4); border-color: var(--line-dark); color: #d9d9d2; }
.ph:has(img) .ph__art, .ph:has(img) .ph__ico, .ph:has(img) .ph__tag { display: none; }
.ph--zoom > img, .ph--zoom .ph__ico { transition: transform .7s var(--ease); }
.card--hover:hover .ph--zoom > img { transform: scale(1.06); }
.card--hover:hover .ph--zoom .ph__ico { transform: scale(1.1) rotate(-3deg); }

/* ---------- 9. Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); background: var(--surface);
  padding: 20px 0; --speed: 34s;
}
.marquee--dark { background: var(--panel); border-color: var(--line-dark); }
.marquee__track { display: flex; width: max-content; animation: slide var(--speed) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track > span {
  display: inline-flex; align-items: center; gap: 26px; padding-inline-end: 26px;
  font-size: clamp(1rem, 1.6vw, 1.35rem); font-weight: 600; letter-spacing: -.02em; white-space: nowrap;
}
.marquee__track > span::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-700); flex: none;
}
.marquee--dark .marquee__track > span { color: #fff; }
.marquee--dark .marquee__track > span::after { background: var(--brand); }
html[dir="rtl"] .marquee__track { animation-name: slide-rtl; }

/* Bande d'arguments */
.strip { padding: 30px 0; }
.strip__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 26px; }
.strip__list div { display: flex; align-items: flex-start; gap: 12px; font-size: .93rem; font-weight: 500; color: var(--ink-2); }
.strip__list span:first-child {
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--ink);
  display: grid; place-items: center; font-size: .72rem; font-weight: 800; flex: none; margin-top: 2px;
}

/* ---------- 10. Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field label .req { color: var(--bad); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--brand-100);
}
.field textarea { min-height: 118px; resize: vertical; }
.field input[readonly] { background: var(--bg-2); color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--ink-4); }
.field .err { display: none; font-size: .78rem; font-weight: 600; color: var(--bad); }
.field.is-error input, .field.is-error select, .field.is-error textarea { border-color: var(--bad); }
.field.is-error .err { display: block; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid > * { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 11px; font-size: .9rem; color: var(--ink-2); }
.check input { width: 19px; height: 19px; margin-top: 3px; flex: none; accent-color: var(--brand-700); }

.choice { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.choice label {
  display: flex; align-items: center; gap: 11px; padding: 15px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-size: .92rem; font-weight: 500; transition: border-color .2s, background .2s;
}
.choice label:hover { border-color: var(--ink-4); }
.choice input { accent-color: var(--ink); }
.choice label:has(input:checked) { border-color: var(--ink); background: var(--brand-050); font-weight: 600; }

.alert {
  display: flex; align-items: flex-start; gap: 11px; padding: 15px 18px;
  border-radius: var(--r-sm); font-size: .92rem; font-weight: 500;
}
.alert--ok { background: var(--ok-100); color: var(--ok); }
.alert--bad { background: var(--bad-100); color: var(--bad); }
.alert--warn { background: var(--warn-100); color: var(--warn); }
.alert--info { background: var(--brand-100); color: #5f5b12; }

/* Newsletter */
.subscribe { position: relative; }
.subscribe input {
  width: 100%; padding: 15px 62px 15px 4px; background: none; border: none;
  border-bottom: 1px solid var(--line-dark); color: #fff;
}
.subscribe input::placeholder { color: #8b8b84; }
.subscribe input:focus { outline: none; border-color: var(--brand); }
.subscribe button {
  position: absolute; inset-inline-end: 0; inset-block-start: 8px; width: 40px; height: 40px;
  border-radius: 50%; background: var(--brand); color: var(--ink); display: grid; place-items: center;
  transition: transform .3s var(--ease);
}
.subscribe button:hover { transform: translateX(3px); }
html[dir="rtl"] .subscribe button svg { transform: scaleX(-1); }

/* ---------- 11. Tableaux ---------- */
.table-wrap {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
thead th {
  text-align: start; padding: 15px 18px; font-size: .74rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
  background: var(--bg-2); white-space: nowrap;
}
tbody td { padding: 15px 18px; border-top: 1px solid var(--line-2); vertical-align: middle; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: var(--brand-050); }
td .who { display: flex; align-items: center; gap: 11px; font-weight: 600; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-100); color: #605c10; font-weight: 700; font-size: .8rem;
}
.avatar--lg { width: 62px; height: 62px; font-size: 1.15rem; }
.avatar--accent { background: var(--ink); color: var(--brand); }
.side .avatar { background: var(--brand); color: var(--ink); }

/* ---------- 12. Jauges & KPI ---------- */
.bar { height: 8px; border-radius: var(--r-full); background: var(--bg-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--r-full); background: var(--ink); transition: width .8s var(--ease); }
.bar > i.ok { background: var(--brand-700); }
.bar > i.warn { background: #d99b2b; }
.bar > i.bad { background: #cf6b5f; }
.panel--dark .bar { background: rgba(255, 255, 255, .12); }
.panel--dark .bar > i { background: var(--brand); }

.ring { --p: 0; width: 112px; height: 112px; flex: none; position: relative; display: grid; place-items: center; }
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--ink) calc(var(--p) * 1%), var(--bg-2) 0);
  mask: radial-gradient(farthest-side, transparent 70%, #000 72%);
  -webkit-mask: radial-gradient(farthest-side, transparent 70%, #000 72%);
}
.ring b { font-size: 1.42rem; letter-spacing: -.03em; }

.kpi { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.kpi__card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; transition: border-color .3s;
}
.kpi__card:hover { border-color: var(--ink-4); }
.kpi__card .k-label { font-size: .7rem; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); }
.kpi__card .k-value { margin-top: 10px; font-size: 1.85rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.kpi__card .k-sub { margin-top: 6px; font-size: .8rem; color: var(--ink-4); }
.k-trend { font-size: .8rem; font-weight: 700; }
.k-trend.up { color: var(--ok); }
.k-trend.down { color: var(--bad); }

/* Graphiques CSS */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 14px; }
.chart__col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 9px; }
.chart__bar {
  width: 100%; max-width: 38px; min-height: 4px; border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, #333 0%, var(--ink) 100%);
  animation: grow .9s var(--ease) both;
}
.chart__bar.alt { background: var(--brand-700); }
.chart__col small { font-size: .72rem; font-weight: 600; color: var(--ink-4); }
.chart__val { font-size: .74rem; font-weight: 700; color: var(--ink-2); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-inline-end: 7px; }

/* ---------- 13. Onglets & espace connecté ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button {
  padding: 12px 16px; font-size: .9rem; font-weight: 600; color: var(--ink-3);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.is-active { color: var(--ink); border-bottom-color: var(--brand-700); }
.tab-panel { display: none; padding-top: 28px; }
.tab-panel.is-active { display: block; animation: fade .4s var(--ease); }

.app {
  display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 24px;
  align-items: start; padding: 26px 0 70px;
}
.app > * { min-width: 0; }
.side {
  background: var(--panel); color: #fff; border-radius: var(--r-lg); padding: 18px;
  position: sticky; top: calc(var(--header-h) + 16px);
}
.side__user { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line-dark); margin-bottom: 14px; }
.side__user b { display: block; font-size: .96rem; }
.side__user span { font-size: .77rem; color: #a3a39c; }
.side nav { display: flex; flex-direction: column; gap: 3px; }
.side nav button, .side nav a {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  padding: 12px 14px; border-radius: var(--r-sm); font-size: .91rem; font-weight: 500; color: #cfcfc9;
  transition: background .2s, color .2s;
}
.side nav button:hover, .side nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side nav button.is-active { background: var(--brand); color: var(--ink); font-weight: 700; }
.side .btn--danger { background: rgba(255, 255, 255, .08); color: #f1b9b1; }
.side .btn--danger:hover { background: rgba(241, 185, 177, .18); }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title h1 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.page-title p { margin-top: 8px; font-size: .95rem; }

/* ---------- 14. Auth ---------- */
.auth-wrap { min-height: calc(100vh - 120px); display: grid; place-items: center; padding: 50px 20px 70px; }
.auth-card { width: 100%; max-width: 452px; }
.demo-accounts { display: grid; gap: 9px; margin-top: 14px; }
.demo-accounts button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: start; font-size: .84rem;
  border: 1px dashed var(--line); border-radius: var(--r-sm); transition: border-color .2s, background .2s;
}
.demo-accounts button:hover { border-color: var(--ink); background: var(--brand-050); }

/* ---------- 15. Planning / agenda ---------- */
.agenda { display: flex; flex-direction: column; gap: 12px; }
.slot {
  display: flex; align-items: center; gap: 18px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  border-inline-start: 4px solid var(--ink); transition: transform .3s var(--ease), box-shadow .3s;
}
.slot:hover { transform: translateX(3px); box-shadow: var(--sh-1); }
html[dir="rtl"] .slot:hover { transform: translateX(-3px); }
.slot--done { border-inline-start-color: var(--brand-700); }
.slot--cancel { border-inline-start-color: #cf6b5f; opacity: .7; }
.slot--exam { border-inline-start-color: var(--ink); background: var(--brand-100); }
.slot__time { min-width: 76px; text-align: center; }
.slot__time b { display: block; font-size: 1.04rem; letter-spacing: -.02em; }
.slot__time span { font-size: .74rem; color: var(--ink-4); }
.slot__body { flex: 1; min-width: 0; }
.slot__body b { font-size: .97rem; }
.slot__body p { font-size: .82rem; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week__day {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px; min-height: 152px;
}
.week__day h4 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
.week__day .d { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -.03em; }
.week__day.is-today { background: var(--ink); border-color: var(--ink); color: #fff; }
.week__day.is-today h4, .week__day.is-today .d { color: #fff; }
.chip {
  display: block; margin-top: 7px; padding: 6px 8px; border-radius: 9px;
  font-size: .7rem; font-weight: 600; background: var(--bg-2); color: var(--ink-2);
}
.chip--accent { background: var(--brand); color: var(--ink); }
.chip--ok { background: var(--ok-100); color: var(--ok); }
.week__day.is-today .chip { background: rgba(255, 255, 255, .14); color: #fff; }
.week__day.is-today .chip--accent { background: var(--brand); color: var(--ink); }

/* ---------- 16. Quiz ---------- */
.quiz-shell { max-width: 880px; margin-inline: auto; }
.quiz-top {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.3rem; letter-spacing: -.03em; }
.timer.is-low { color: var(--bad); }
.q-visual {
  height: 208px; margin-bottom: 24px; border-radius: var(--r); display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
}
.q-visual svg { height: 158px; width: auto; }
.q-text { font-size: 1.2rem; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.answers { display: grid; gap: 11px; margin-top: 22px; }
.answer {
  display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-size: .96rem; transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.answer:hover { border-color: var(--ink-4); }
.answer input { width: 19px; height: 19px; margin-top: 3px; flex: none; accent-color: var(--ink); }
.answer.is-picked { border-color: var(--ink); background: var(--brand-050); }
.answer.is-right { border-color: var(--brand-700); background: var(--brand-100); }
.answer.is-wrong { border-color: #cf6b5f; background: var(--bad-100); }
.answer .mark { margin-inline-start: auto; font-weight: 800; }
.answer .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.tagline {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 9px; border-radius: var(--r-full); background: var(--bg-2); color: var(--ink-2);
  white-space: nowrap;
}
.tagline--ok { background: var(--ink); color: var(--brand); }
.answer.is-mine { box-shadow: inset 3px 0 0 var(--ink); }
html[dir="rtl"] .answer.is-mine { box-shadow: inset -3px 0 0 var(--ink); }
.q-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.q-dots button {
  width: 32px; height: 32px; border-radius: 10px; font-size: .78rem; font-weight: 700;
  background: var(--bg-2); color: var(--ink-3); transition: background .2s, color .2s;
}
.q-dots button.is-answered { background: var(--brand-100); color: #5f5b12; }
.q-dots button.is-current { background: var(--ink); color: var(--brand); }
.explain {
  margin-top: 18px; padding: 16px 18px; border-radius: var(--r-sm);
  background: var(--bg-2); border-inline-start: 3px solid var(--brand-700); font-size: .92rem;
}
.score-hero { text-align: center; padding: 40px 24px; }
.score-hero .big { font-size: clamp(3rem, 7vw, 4.4rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; }

/* ---------- 17. Tarifs ---------- */
/* Cinq formules : 3 sur la première ligne, 2 centrées sur la seconde */
.price-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.price-grid > * { grid-column: span 2; }
.price-grid > *:nth-child(4) { grid-column: 2 / span 2; }
.price-grid > *:nth-child(5) { grid-column: 4 / span 2; }
@media (max-width: 1080px) {
  .price-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .price-grid > *, .price-grid > *:nth-child(4), .price-grid > *:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 720px) {
  .price-grid { grid-template-columns: 1fr; }
  .price-grid > *, .price-grid > *:nth-child(4), .price-grid > *:nth-child(5) { grid-column: auto; }
}
.price { display: flex; flex-direction: column; position: relative; }
.price.is-featured { background: var(--brand); border-color: var(--brand); }
.price.is-featured .price__amount b, .price.is-featured h3 { color: var(--ink); }
.price.is-featured ul li { color: #4a4712; }
.price.is-featured .price__amount span { color: #4a4712; }
.price.is-featured h3 { padding-inline-end: 152px; }
.price.is-featured::before {
  content: attr(data-tag); position: absolute; inset-block-start: 22px; inset-inline-end: 24px;
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--ink); color: var(--brand); padding: 5px 12px; border-radius: var(--r-full);
}
.price__amount { display: flex; align-items: baseline; gap: 7px; margin: 18px 0 6px; }
.price__amount b { font-size: clamp(2.1rem, 3.4vw, 2.8rem); font-weight: 700; letter-spacing: -.05em; }
.price__amount span { font-size: .86rem; font-weight: 600; color: var(--ink-3); }
.price ul { display: flex; flex-direction: column; gap: 12px; margin: 22px 0 26px; font-size: .92rem; }
.price ul li { display: flex; align-items: flex-start; gap: 11px; color: var(--ink-2); }
.price ul li .tick {
  flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 2px;
  background: var(--ink); color: var(--brand); display: grid; place-items: center;
}
.price ul li .tick svg { width: 11px; height: 11px; }
.price ul li.no { color: var(--ink-4); }
.price ul li.no .tick { background: var(--bg-2); color: var(--ink-4); }
.price .btn { margin-top: auto; }

/* ---------- 18. Témoignages / FAQ / étapes ---------- */
.quote { font-size: 1.02rem; color: var(--ink-2); line-height: 1.6; }
.quote::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--brand-700); margin-bottom: 12px; }

.rail { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: 0 0 clamp(280px, 33%, 400px); }
.rail-nav { display: flex; gap: 10px; }
.rail-nav button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; transition: background .25s, color .25s, border-color .25s;
}
.rail-nav button:hover { background: var(--ink); color: var(--brand); border-color: var(--ink); }
.rail-nav svg { width: 15px; height: 15px; }

/* Étapes : route pointillée + numéros en épingle */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; position: relative; }
.steps::before {
  content: ""; position: absolute; inset-inline: 8%; inset-block-start: 27px; height: 2px;
  background-image: linear-gradient(90deg, var(--line-dark) 0 12px, transparent 12px 24px);
  background-size: 24px 2px;
}
.panel--light .steps::before, .panel--bg .steps::before {
  background-image: linear-gradient(90deg, var(--line) 0 12px, transparent 12px 24px);
}
.step { position: relative; text-align: center; }
.step__n {
  width: 54px; height: 54px; margin: 0 auto 22px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg); background: var(--brand); color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; position: relative; z-index: 2;
}
.step__n span { transform: rotate(45deg); }
.step h3 { font-size: 1.06rem; }
.step p { margin-top: 10px; font-size: .9rem; }

.acc { border-bottom: 1px solid var(--line); }
.panel--dark .acc { border-color: var(--line-dark); }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px; font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em;
  cursor: pointer; list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-2) center / 13px 13px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  transition: background-color .25s, transform .35s var(--ease);
}
.acc[open] summary::after { background-color: var(--brand); transform: rotate(180deg); }
.panel--dark .acc summary::after { background-color: rgba(255, 255, 255, .1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E"); }
.acc p { padding: 0 44px 24px 4px; font-size: .96rem; }
html[dir="rtl"] .acc p { padding: 0 4px 24px 44px; }

/* Bandeau CTA */
.cta-band { padding: clamp(44px, 6vw, 82px) 0; text-align: center; position: relative; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band p { margin: 20px auto 0; max-width: 54ch; }

/* ---------- 19. Footer ---------- */
.footer { padding: 0 var(--pad) var(--pad); }
.footer__inner {
  max-width: var(--maxw); margin-inline: auto; background: var(--panel); color: #cfcfc9;
  border-radius: var(--r-xl); padding: clamp(34px, 4vw, 54px); position: relative; overflow: hidden;
}
.footer__top {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  padding: 22px 26px; margin-bottom: 44px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-dark); border-radius: var(--r);
}
.footer__top b { font-size: clamp(1.05rem, 1.8vw, 1.4rem); color: #fff; letter-spacing: -.02em; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-dark);
  display: grid; place-items: center; transition: background .25s, color .25s, border-color .25s;
}
.socials a:hover { background: var(--brand); color: var(--ink); border-color: var(--brand); }
.socials svg { width: 16px; height: 16px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 38px; }
.footer h4 { color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 20px; }
.footer ul { display: flex; flex-direction: column; gap: 12px; }
.footer p, .footer li, .footer__bottom span { color: #a8a8a2; }
.footer .logo, .footer .logo > span:not(.logo__mark) { color: #fff; }
.footer .logo .logo__mark { color: var(--ink); }
.footer a { font-size: .92rem; color: #cfcfc9; transition: color .2s; }
.footer a:hover { color: var(--brand); }
.footer li { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; }
.footer li.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 8px; }
.footer .logo { color: #fff; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: .84rem;
}

/* WhatsApp flottant */
.wa {
  position: fixed; inset-block-end: 24px; inset-inline-end: 24px; z-index: 80;
  width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--sh-3);
  transition: transform .3s var(--ease);
}
.wa:hover { transform: scale(1.08) rotate(6deg); }

/* ---------- 19 bis. Icônes en ligne ---------- */
.alert__ico { flex: none; width: 18px; height: 18px; }
.alert__ico svg { width: 18px; height: 18px; }
.lang__globe, .lang__caret { display: block; flex: none; }
.lang__globe svg { width: 15px; height: 15px; }
.lang__caret svg { width: 13px; height: 13px; opacity: .7; }
.lang__code {
  flex: none; min-width: 30px; padding: 2px 6px; border-radius: 6px; text-align: center;
  background: var(--bg-2); font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.lang__menu button[aria-current="true"] .lang__code { background: var(--ink); color: var(--brand); }
.theme-ico { display: block; width: 26px; height: 26px; color: var(--ink); }
.theme-ico svg { width: 26px; height: 26px; }
.q-visual__ico { display: block; width: 92px; color: var(--ink); }
.q-visual__ico svg { width: 92px; height: 92px; }
.answer .mark svg { width: 16px; height: 16px; }
.answer.is-right .mark { color: var(--ok); }
.answer.is-wrong .mark { color: var(--bad); }
.doc-ico { flex: none; width: 20px; height: 20px; color: var(--ink-4); }
.doc-ico.is-on { color: var(--ok); }
.doc-ico svg { width: 20px; height: 20px; }
.rate, .badge__ico { display: inline-flex; align-items: center; gap: 4px; }
.rate svg, .badge__ico svg { width: 12px; height: 12px; color: #b07f00; }
.k-trend { display: inline-flex; align-items: center; gap: 4px; }
.k-trend svg { width: 11px; height: 11px; }
.stamp span svg { position: static; width: 30px; height: 30px; }

/* ---------- 20. Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes slide-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { height: 0 !important; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
[data-reveal="left"] { transform: translateX(-26px); }
[data-reveal="right"] { transform: translateX(26px); }
[data-reveal="zoom"] { transform: scale(.96); }
[data-reveal].is-in { opacity: 1; transform: none; }
.floaty { animation: float-y 6s ease-in-out infinite; }

/* ---------- 21. RTL & responsive ---------- */
/* Un numéro de téléphone garde toujours l'ordre latin, même en arabe */
/* Suffisant quand l'élément ne contient QUE le numéro. Dès qu'il contient
   aussi du texte arabe, cette règle ne rétablit PAS l'ordre des groupes de
   chiffres (vérifié) : il faut alors isoler le numéro dans le TEXTE avec
   U+2068 … U+2069. Voir tools/content_pages.py -> tel(). */
.tel { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num, .stats strong, .k-value, .price__amount b, .chart__val, .timer,
.slot__time b, .week__day .d, .ring b, .score-hero .big, .rating b, td b { unicode-bidi: isolate; }
html[dir="rtl"] .step__n { border-radius: 50% 50% 4px 50%; }
/* L'arabe ne se lettre-space pas : les lettres se détacheraient */
html[dir="rtl"] .eyebrow, html[dir="rtl"] .k-label, html[dir="rtl"] thead th,
html[dir="rtl"] .footer h4, html[dir="rtl"] .tagline, html[dir="rtl"] .price.is-featured::before { letter-spacing: 0; }
html[dir="rtl"] .steps::before { background-image: linear-gradient(270deg, var(--line) 0 12px, transparent 12px 24px); }
html[dir="rtl"] .quote::before { content: "”"; }

@media (max-width: 1120px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__media { max-width: 620px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps::before { display: none; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side { min-width: 0; }
  .side nav { flex-direction: row; overflow-x: auto; scrollbar-width: thin; }
  .side nav button { white-space: nowrap; flex: none; }
}
@media (max-width: 1024px) {
  .burger { display: block; }
  .only-mobile { display: block !important; }
  .header__actions .btn { display: none; }
  .nav {
    position: absolute; inset-inline: 0; inset-block-start: calc(100% + 10px);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px;
    background: var(--panel); border: 1px solid var(--line-dark); border-radius: var(--r);
    box-shadow: var(--sh-3); display: none; max-height: 72vh; overflow-y: auto;
  }
  .nav.is-open { display: flex; animation: pop .25s var(--ease); }
  .header__inner { position: relative; }
  :root { --r-xl: 30px; }
}
@media (max-width: 860px) {
  .g3, .g2 { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .container { padding-inline: 20px; }
}
@media (max-width: 560px) {
  :root { --pad: 8px; --r-xl: 24px; }
  .logo small { display: none; }
  .logo { font-size: .9rem; }
  .logo__mark { width: 34px; height: 34px; font-size: .76rem; }
  .header__inner { padding-inline: 8px 8px; gap: 10px; }
  .strip__list, .g4, .steps, .footer__grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 20px; }
  .footer__inner { padding: 26px 20px; }
  .hero__foot { gap: 20px; }
  .stamp { width: 88px; height: 88px; }
  .stamp span { width: 44px; height: 44px; font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .reveal-words .w { color: inherit !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .header, .footer, .wa, .side, .btn, .progress, .marquee { display: none !important; }
  .panel { margin: 0; border-radius: 0; }
}

/* ---------- 21. Fil d'Ariane (pages d'atterrissage SEO) ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  font-size: .8rem; color: var(--ink-3); margin-bottom: clamp(20px, 3vw, 34px);
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs > span[aria-hidden] { opacity: .45; }
.crumbs > [aria-current] { color: var(--ink); font-weight: 600; }
.panel--dark .crumbs, .panel--dark .crumbs a { color: rgba(255, 255, 255, .62); }
.panel--dark .crumbs > [aria-current] { color: #fff; }

/* ---------- 22. Liens internes contextuels (« voir aussi ») ---------- */
.taglinks {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: clamp(24px, 3vw, 38px);
}
.taglinks a {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 17px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink);
  font-size: .86rem; font-weight: 600; text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.taglinks a:hover { border-color: var(--ink); background: var(--brand-050); transform: translateY(-2px); }
.taglinks a svg { width: 15px; height: 15px; flex: none; }
.panel--dark .taglinks a {
  background: rgba(255, 255, 255, .06); border-color: var(--line-dark); color: #fff;
}
.panel--dark .taglinks a:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }

/* ---------- 23. Photos réelles dans les cadres ----------
   Les cadres .ph acceptent soit un <img>, soit un <picture> (WebP + repli JPEG).
   Dans les deux cas l'habillage décoratif s'efface de lui-même. */
.ph > picture { position: absolute; inset: 0; z-index: 2; display: block; }
.ph > picture > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph:has(picture) .ph__art, .ph:has(picture) .ph__ico, .ph:has(picture) .ph__tag { display: none; }
.ph--zoom > picture > img { transition: transform .7s var(--ease); }
.card--hover:hover .ph--zoom > picture > img { transform: scale(1.06); }
/* Repli pour les navigateurs sans :has() — l'habillage reste caché grâce à la
   classe posée par app.js au chargement. */
.ph.has-photo .ph__art, .ph.has-photo .ph__ico, .ph.has-photo .ph__tag { display: none; }

/* ── Calculateur de tarif de la page d'accueil ────────────────────────────
   Les trois colonnes étaient déclarées en style inline
   (grid-template-columns:1fr 1.6fr auto), donc hors d'atteinte de toute
   media query : une règle CSS ne peut pas reprendre un style inline.
   Conséquence mesurée à 320, 360, 390 et 414 px — c'est-à-dire sur tous
   les téléphones : la colonne du formulaire tombait à 0 px, les listes
   déroulantes à 34 px (la largeur du seul chevron), et le bouton
   « S'inscrire » se superposait à la liste des heures. Le calculateur
   était donc inutilisable, et une frappe visant la liste pouvait
   atteindre le bouton. D'où le passage par une classe.

   La classe s'appelle « calc-tarif » et non « quote » : « .quote » est déjà
   pris plus haut par le bloc de témoignage, dont le ::before insère un
   guillemet en display:block. Ce pseudo-élément devient un quatrième
   élément de grille, s'installe dans la première colonne et décale les
   trois autres — le résultat passait à la ligne suivante. Vérifier qu'un
   nom de classe est libre AVANT de l'employer. */
.calc-tarif { grid-template-columns: 1fr 1.6fr auto; gap: 26px; align-items: end; }
/* Sans min-width:0, une piste en fr refuse de descendre sous la largeur
   min-content de son contenu et écrase ses voisines au lieu de céder. */
.calc-tarif > * { min-width: 0; }
.calc-tarif__out { text-align: end; }

@media (max-width: 860px) {
  /* Une seule colonne : chaque partie retrouve la largeur du bloc. */
  .calc-tarif { grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; }
  /* Le résultat et l'action tiennent sur une ligne à eux : le prix reste
     lisible à gauche, le bouton redevient une cible tactile à droite. */
  .calc-tarif__out { display: flex; align-items: center; justify-content: space-between;
                gap: 16px; text-align: start; }
  .calc-tarif__out .btn { margin-top: 0; }
}

@media (max-width: 420px) {
  /* Sur les écrans les plus étroits, le bouton prend toute la largeur :
     c'est l'action principale du bloc, elle ne doit pas se disputer la
     ligne avec le montant. */
  .calc-tarif__out { flex-wrap: wrap; }
  .calc-tarif__out .btn { width: 100%; justify-content: center; }
}
