/* ===========================================================================
   SYSTÈME DE DESIGN — direction A « Le Dossier »            (NAT - Design)
   ---------------------------------------------------------------------------
   Deux couleurs font 90 % du site : l'encre bleu nuit et le papier ivoire.
   Le safran (10 %) est réservé à ce qui doit attirer le doigt : boutons,
   question en cours, progression, score, tampons réussis.
   Tout le site passe par ces variables : ne jamais écrire une couleur en dur.
   =========================================================================== */

:root {
  /* --- Couleurs --------------------------------------------------------- */
  --encre: #16223F;          /* texte, bandeaux, fonds sombres            */
  --papier: #F4EEDF;         /* fond principal                            */
  --safran: #F0A21A;         /* accent : 10 % au plus                     */

  /* nuances tirées des deux couleurs (jamais une 4e teinte) */
  --encre-2: #4A5470;        /* texte secondaire sur papier (7,0:1)        */
  --encre-3: rgba(22, 34, 63, .55);
  --filet: rgba(22, 34, 63, .16);
  --filet-fort: rgba(22, 34, 63, .38);
  --papier-2: #EAE2CF;       /* papier plus foncé : encarts, survol        */
  --papier-3: #FBF8F0;       /* papier plus clair : champs, feuille        */
  --papier-sur-encre: rgba(244, 238, 223, .72);
  --filet-sur-encre: rgba(244, 238, 223, .24);
  --safran-pale: rgba(240, 162, 26, .22);

  /* --- Polices ---------------------------------------------------------- */
  --titre: "Young Serif", "Noto Naskh Arabic", Georgia, "Times New Roman", serif;
  --texte: "Atkinson Hyperlegible", "Noto Naskh Arabic", "Segoe UI", Arial, sans-serif;
  --frappe: "Courier Prime", "Noto Naskh Arabic", "Courier New", monospace;

  /* --- Tailles de texte (16 px minimum pour lire) ----------------------- */
  /* v2 (18/11) : « pas assez gros » → tout monte d'un cran, titres très grands */
  --t-petit: .9375rem;       /* 15 px : étiquettes, mentions             */
  --t-base: 1.125rem;        /* 18 px : texte courant                    */
  --t-grand: 1.375rem;       /* 22 px                                    */
  --t-titre-3: 1.5rem;       /* 24 px : question, sous-titres            */
  --t-titre-2: clamp(2rem, 6vw, 3.5rem);
  --t-titre-1: clamp(2.5rem, 10vw, 5.75rem);

  /* --- Espacements (base 4 px) ----------------------------------------- */
  --e-1: 4px;  --e-2: 8px;  --e-3: 12px; --e-4: 16px; --e-5: 24px;
  --e-6: 32px; --e-7: 48px; --e-8: 64px; --e-9: 96px;
  --gouttiere: 16px;
  --largeur: 1320px;
  --largeur-texte: 68ch;

  /* --- Formes ----------------------------------------------------------- */
  --ligne: 32px;             /* le rythme unique des lignes de la feuille */
  --ligne-couleur: rgba(22, 34, 63, .2);
  --rayon: 8px;
  --rayon-petit: 5px;
  --cible: 48px;             /* hauteur minimale d'une zone tactile       */
  --ombre-feuille: 0 1px 0 rgba(22, 34, 63, .06), 0 18px 40px -28px rgba(22, 34, 63, .45);

  /* --- Animations ------------------------------------------------------- */
  --d-rapide: 160ms;         /* survol, case cochée                       */
  --d-moyen: 280ms;          /* note qui monte, transition de question    */
  --d-tampon: 300ms;         /* un tampon qui s'abat                      */
  --d-lent: 600ms;           /* compteur de score                         */
  --courbe: cubic-bezier(.2, .8, .2, 1);
  --courbe-tampon: cubic-bezier(.3, 1.5, .5, 1);

  color-scheme: light;
}
@media (min-width: 720px) { :root { --gouttiere: 32px; } }
@media (min-width: 1100px) { :root { --gouttiere: 48px; --ligne: 38px; --t-titre-3: 1.875rem; } }

/* =========================================================================
   BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--papier); color: var(--encre);
  font: 400 var(--t-base)/1.55 var(--texte);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
:lang(ar) body, body:lang(ar) { font-size: 1.125rem; line-height: 1.75; }
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
/* Titres en arabe seulement : une question d'examen en français garde sa graisse, même sur une page en arabe */
h1:lang(ar), h2:lang(ar), h3:lang(ar) { font-weight: 700; line-height: 1.45; }
p { margin: 0; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: var(--safran); color: var(--encre); }
:focus-visible { outline: 3px solid var(--safran); outline-offset: 2px; border-radius: 3px; }
.sur-encre :focus-visible { outline-color: var(--safran); }

.lien-saut { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50; padding: 10px 14px;
  background: var(--safran); color: var(--encre); font-weight: 700; border-radius: var(--rayon-petit); }
.lien-saut:focus { top: 8px; }
.invisible { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.cadre { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere); }
.texte-long { max-width: var(--largeur-texte); }

/* Texte en français à l'intérieur d'une page en arabe (questions de l'examen) */
.fr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .fr { text-align: right; }

/* =========================================================================
   ÉTIQUETTES « MACHINE À ÉCRIRE »
   ========================================================================= */
.frappe {
  font: 700 .75rem/1.25 var(--frappe); letter-spacing: .08em; text-transform: uppercase;
}
:lang(ar) .frappe { letter-spacing: 0; font-size: .875rem; font-weight: 700; }
.puce::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-inline-end: .55em;
  border-radius: 50%; background: var(--safran); vertical-align: .05em; }

/* =========================================================================
   EN-TÊTE ET PIED (injectés par site.js)
   ========================================================================= */
.haut { background: var(--encre); color: var(--papier); position: relative; z-index: 10; }
.haut .indep {
  border-bottom: 1px dashed var(--filet-sur-encre); color: var(--papier-sur-encre);
  font: 400 .6875rem/1.3 var(--frappe); letter-spacing: .06em; text-transform: uppercase;
  padding-block: 8px 7px;
}
:lang(ar) .haut .indep { letter-spacing: 0; font-size: .8125rem; }
.haut .barre { display: flex; align-items: center; gap: var(--e-3); min-height: 64px; }
@media (min-width: 1100px) { .haut .barre { min-height: 76px; } .marque { font-size: 1.625rem; } .marque svg { width: 42px; height: 42px; } .haut .nav-liens a { font-size: 1rem; } }
.marque { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
  font: 400 1.3125rem/1 var(--titre); white-space: nowrap; }
.marque:hover { text-decoration: none; }
.marque svg { width: 34px; height: 34px; flex: none; }
.sur-encre .marque svg circle { stroke: var(--safran); }
.haut nav { margin-inline-start: auto; display: flex; align-items: center; gap: var(--e-2); }
.haut .nav-liens { display: none; gap: var(--e-5); margin-inline-end: var(--e-4); }
.haut .nav-liens a { text-decoration: none; font-size: var(--t-petit); color: var(--papier-sur-encre); }
.haut .nav-liens a:hover, .haut .nav-liens a[aria-current="page"] { color: var(--papier); text-decoration: underline; }
@media (min-width: 860px) { .haut .nav-liens { display: flex; } }

.langues { display: inline-flex; border: 1px solid var(--filet-sur-encre); border-radius: var(--rayon-petit); overflow: hidden; }
.langues button { min-width: 42px; min-height: 40px; padding: 0 9px; background: none; border: 0;
  border-inline-start: 1px solid var(--filet-sur-encre); color: var(--papier);
  font: 700 .8125rem/1 var(--frappe); }
.langues button:first-child { border-inline-start: 0; }
.langues button[aria-pressed="true"] { background: var(--papier); color: var(--encre); }
.langues button:lang(ar) { font: 700 1rem/1 "Noto Naskh Arabic", serif; }

.compte-lien { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--papier-sur-encre); border-radius: var(--rayon-petit); text-decoration: none;
  font-size: var(--t-petit); font-weight: 700; color: var(--papier); white-space: nowrap; }
.compte-lien:hover { background: rgba(244, 238, 223, .1); text-decoration: none; }
@media (max-width: 380px) { .compte-lien .long { display: none; } .marque { font-size: 1.125rem; } }

.pied { background: var(--encre); color: var(--papier-sur-encre); font-size: var(--t-petit); margin-top: var(--e-8); }
.pied .cadre { padding-block: var(--e-7) var(--e-6); display: grid; gap: var(--e-5); }
.pied .marque { color: var(--papier); }
.pied .mention { border: 1px dashed var(--filet-sur-encre); border-radius: var(--rayon); padding: var(--e-4);
  color: var(--papier); line-height: 1.55; }
.pied .mention strong { color: var(--safran); font-family: var(--frappe); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; display: block; margin-bottom: 4px; }
:lang(ar) .pied .mention strong { letter-spacing: 0; font-size: .875rem; }
.pied ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); }
.pied a { color: var(--papier); }
.pied .bas { border-top: 1px solid var(--filet-sur-encre); padding-top: var(--e-4); display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); justify-content: space-between; }
@media (min-width: 860px) { .pied .cadre { grid-template-columns: 1fr 2fr; align-items: start; } .pied .bas { grid-column: 1 / -1; } }

/* =========================================================================
   BOUTONS
   ========================================================================= */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 62px; padding: 14px 26px; border: 0; border-radius: var(--rayon);
  background: var(--safran); color: var(--encre); text-decoration: none; text-align: center;
  font: 700 1.1875rem/1.2 var(--texte);
  box-shadow: inset 0 -4px 0 rgba(22, 34, 63, .2);
  transition: transform var(--d-rapide) var(--courbe), box-shadow var(--d-rapide) var(--courbe);
}
.bouton:hover { text-decoration: none; box-shadow: inset 0 -3px 0 rgba(22, 34, 63, .28); }
.bouton:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(22, 34, 63, .28); }
.bouton[disabled], .bouton[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.bouton.large { width: 100%; }
.bouton .fl { transition: transform var(--d-rapide) var(--courbe); }
.bouton:hover .fl { transform: translateX(3px); }
[dir="rtl"] .fl { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .bouton:hover .fl { transform: scaleX(-1) translateX(3px); }

.bouton-second {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 20px; border: 2px solid var(--encre); border-radius: var(--rayon);
  background: transparent; color: var(--encre); text-decoration: none; font: 700 1rem/1.2 var(--texte);
}
.bouton-second:hover { background: var(--papier-2); text-decoration: none; }
.sur-encre .bouton-second { border-color: var(--papier); color: var(--papier); }
.sur-encre .bouton-second:hover { background: rgba(244, 238, 223, .1); }
.lien-simple { background: none; border: 0; padding: 10px 0; min-height: 44px; text-decoration: underline;
  text-underline-offset: .18em; font-size: var(--t-petit); color: inherit; }

/* Bouton Google (sobre, sans copier la charte de Google) */
.bouton-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  min-height: 54px; padding: 10px 18px; border: 2px solid var(--encre); border-radius: var(--rayon);
  background: var(--papier-3); color: var(--encre); font: 700 1.0625rem/1.2 var(--texte); }
.bouton-google:hover { background: #fff; }
.bouton-google svg { width: 22px; height: 22px; flex: none; }

/* =========================================================================
   LA FEUILLE (papier ligné) ET LE DOSSIER
   ========================================================================= */
.feuille {
  position: relative; background-color: var(--papier-3); color: var(--encre);
  border: 1px solid var(--filet); border-radius: var(--rayon); box-shadow: var(--ombre-feuille);
}
.onglets { display: flex; gap: 6px; align-items: flex-end; padding-inline: var(--e-3); }
.onglet { font: 700 .6875rem/1 var(--frappe); text-transform: uppercase; letter-spacing: .04em;
  padding: 11px 10px 10px; border-radius: 7px 7px 0 0; border: 1px solid var(--filet-sur-encre); border-bottom: 0;
  color: var(--papier-sur-encre); white-space: nowrap; }
:lang(ar) .onglet { letter-spacing: 0; font-size: .8125rem; }
.onglet.actif { background: var(--papier-3); color: var(--encre); border-color: var(--papier-3); padding-top: 14px; }
.onglet .num { color: var(--safran); }
.onglet.actif .num { color: var(--encre); }

/* =========================================================================
   QCM : choix, cases, note d'explication
   ========================================================================= */
.qcm-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); flex-wrap: wrap; }
.question { font: 400 var(--t-titre-3)/1.28 var(--titre); margin: var(--e-3) 0 var(--e-2); text-wrap: pretty; }
.officielle { display: inline-flex; align-items: center; gap: 6px; color: var(--encre-2); }
.officielle::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--papier-3), inset 0 0 0 5px currentColor; }

.choix { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 2px;
  background: none; border: 0; border-top: 1px dashed var(--filet-fort); text-align: start; font-size: var(--t-base);
  line-height: 1.35; transition: background var(--d-rapide); border-radius: 0; }
.choix:first-child { border-top-color: transparent; }
.choix:hover:not(:disabled) { background: var(--safran-pale); }

/* ---- La réglure : un seul rythme de lignes ; question et choix s'écrivent dessus ----
   Chaque ligne de texte fait exactement var(--ligne) de haut ; une ligne vide sépare les choix.
   site.js (SITE.regler) mesure la ligne de pied de chaque texte et le pose sur le trait,
   quelle que soit la police ou la langue de la page. */
.reglure { position: relative; margin-top: var(--e-3);
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--ligne) - 1px), var(--ligne-couleur) calc(var(--ligne) - 1px) var(--ligne)); }
.reglure .question { position: relative; margin: 0 0 var(--ligne); line-height: var(--ligne); }
.reglure .choix { position: relative; align-items: flex-start; min-height: calc(var(--ligne) * 2); padding: 0 2px var(--ligne);
  border: 0; line-height: var(--ligne); }
.reglure .choix .case { margin-top: calc((var(--ligne) - 28px) / 2); }
.choix:disabled { cursor: default; }
.choix .lib { flex: 1; min-width: 0; }
.case { flex: none; width: 28px; height: 28px; }
.case rect { fill: var(--papier-3); stroke: var(--encre); stroke-width: 2; transition: fill var(--d-rapide); }
.case path { fill: none; stroke: var(--encre); stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--d-rapide) ease-out; }
.choix.coche .case path, .choix.juste .case path, .choix.faux .case path, .choix.bonne .case path { stroke-dashoffset: 0; }
.choix.coche .case rect { fill: var(--safran-pale); }
.choix.bonne .case rect { fill: var(--safran); }
.choix.bonne .lib { font-weight: 700; }
.choix.faux .lib { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--encre-2); }

.note {
  position: relative; background: var(--encre); color: var(--papier); border-radius: var(--rayon);
  border-top: 4px solid var(--safran); padding: var(--e-6) var(--e-4) var(--e-4);
  animation: monte var(--d-moyen) var(--courbe);
}
.note .explication { line-height: 1.55; margin-bottom: var(--e-4); }
.note .source { display: block; font-size: var(--t-petit); color: var(--papier-sur-encre); margin: -6px 0 var(--e-4); }
.note .source a { color: var(--papier); }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   LES TAMPONS
   ========================================================================= */
.tampon {
  display: inline-block; font: 700 1.25rem/1 var(--frappe); letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 13px 8px; border: 3px double currentColor; border-radius: 6px; color: var(--safran);
  transform: rotate(-7deg); filter: url(#encre); background: var(--encre); white-space: nowrap;
}
:lang(ar) .tampon { letter-spacing: 0; font-family: "Noto Naskh Arabic", serif; }
[dir="rtl"] .tampon { transform: rotate(7deg); }
.tampon.rate { color: var(--papier); }
.tampon.sur-papier { background: var(--papier-3); }
.tampon.sur-papier.rate { color: var(--encre); }
.note .tampon { position: absolute; inset-inline-end: 16px; top: -26px; }
.pose { animation: pose var(--d-tampon) var(--courbe-tampon) both; }
@keyframes pose { 0% { opacity: 0; scale: 2.3; } 55% { opacity: 1; scale: .93; } 100% { opacity: 1; scale: 1; } }
.choc { animation: choc 220ms ease-out 140ms; }
@keyframes choc { 35% { transform: translateY(3px); } 100% { transform: none; } }

/* Rangée de cases à tamponner (progression) */
.cases { display: flex; gap: 5px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.cases li { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--filet-fort);
  display: grid; place-items: center; font: 700 .875rem/1 var(--frappe); color: var(--encre-2); }
.cases li.cur { border: 2px solid var(--safran); color: var(--encre); box-shadow: 0 0 0 3px var(--safran-pale); }
.cases li.ok { border: 3px double var(--encre); background: var(--safran); color: var(--encre); transform: rotate(-8deg); filter: url(#encre); }
.cases li.ko { border: 2px solid var(--encre); color: var(--encre); transform: rotate(6deg); filter: url(#encre); }
.cases li.neuf { animation: pose var(--d-tampon) var(--courbe-tampon); }

/* Grand tampon de score */
.grand-tampon { width: 180px; height: 180px; border-radius: 50%; border: 5px double var(--safran); color: var(--safran);
  display: grid; place-content: center; justify-items: center; gap: 8px; transform: rotate(-8deg); filter: url(#encre);
  margin-inline: auto; }
.grand-tampon b { font: 400 4rem/1 var(--titre); color: var(--encre); direction: ltr; }
.grand-tampon > span { font: 700 .75rem/1 var(--frappe); letter-spacing: .14em; text-transform: uppercase; }
:lang(ar) .grand-tampon > span { letter-spacing: 0; font-size: .875rem; }
.grand-tampon.rate { border-color: var(--encre); color: var(--encre); }

/* =========================================================================
   FORMULAIRES
   ========================================================================= */
.champ { display: grid; gap: 6px; }
.champ label { font-weight: 700; font-size: var(--t-petit); }
.champ input, .champ select {
  min-height: 52px; width: 100%; padding: 12px 14px; border: 2px solid var(--encre); border-radius: var(--rayon);
  background: var(--papier-3); font-size: 1.0625rem;
}
.champ input:focus, .champ select:focus { outline: 3px solid var(--safran); outline-offset: 1px; }
.message { padding: 12px 14px; border-radius: var(--rayon); font-size: var(--t-petit); line-height: 1.45; }
.message.erreur { background: var(--papier-2); border-inline-start: 5px solid var(--encre); font-weight: 700; }
.message.ok { background: var(--safran-pale); border-inline-start: 5px solid var(--safran); }
.ou { display: flex; align-items: center; gap: 12px; color: var(--encre-2); font-size: var(--t-petit); }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--filet-fort); }

/* =========================================================================
   SECTIONS DE PAGE
   ========================================================================= */
.section { padding-block: var(--e-8); }
@media (min-width: 1100px) { .section { padding-block: var(--e-9); } }
/* Deux sections de même fond se suivent sans double marge ; après un bloc de couleur, la marge reste (sinon le titre colle au bloc). */
.section:not(.sur-encre):not(.plein) + .section:not(.sur-encre):not(.plein) { padding-top: 0; }
.surtitre { margin-bottom: var(--e-3); }
.section h2 { font-size: var(--t-titre-2); margin-bottom: var(--e-4); }
.chapo { font-size: var(--t-grand); line-height: 1.5; color: var(--encre-2); max-width: 46ch; }
.sur-encre { background: var(--encre); color: var(--papier); }
.sur-encre .chapo { color: var(--papier-sur-encre); }

/* Bordereau : un formulaire administratif, en tableau */
.bordereau { width: 100%; border-collapse: collapse; background: var(--papier-3); border: 2px solid var(--encre); font-size: var(--t-base); }
.bordereau caption { text-align: start; padding-bottom: var(--e-2); }
.bordereau th, .bordereau td { padding: 14px 14px; border-top: 1px dashed var(--filet-fort); text-align: start; vertical-align: top; }
.bordereau thead th { border-top: 0; border-bottom: 2px solid var(--encre); font: 700 .75rem/1.2 var(--frappe); letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .bordereau thead th { letter-spacing: 0; font-size: .875rem; }
.bordereau .niveau { font: 400 1.5rem/1 var(--titre); white-space: nowrap; }

/* Accordéon (FAQ) */
.faq { border-top: 2px solid var(--encre); }
.faq details { border-bottom: 1px dashed var(--filet-fort); }
.faq summary { list-style: none; cursor: pointer; display: flex; gap: var(--e-3); align-items: flex-start;
  padding: 18px 0; font: 400 1.1875rem/1.35 var(--titre); }
:lang(ar) .faq summary { font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-inline-start: auto; font: 700 1.5rem/1 var(--frappe); color: var(--encre-2);
  transition: transform var(--d-rapide) var(--courbe); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 var(--e-5); color: var(--encre-2); max-width: var(--largeur-texte); display: grid; gap: var(--e-3); }

/* Pages de texte (mentions, CGV, confidentialité) */
.page-texte { padding-block: var(--e-7); }
.page-texte h1 { font-size: var(--t-titre-1); margin-bottom: var(--e-3); }
.page-texte h2 { font-size: var(--t-titre-3); margin: var(--e-6) 0 var(--e-3); }
.page-texte p, .page-texte li { max-width: var(--largeur-texte); }
.page-texte p + p { margin-top: var(--e-3); }
.page-texte ul { padding-inline-start: 20px; display: grid; gap: 6px; margin: var(--e-3) 0; }
.encart { background: var(--papier-2); border-radius: var(--rayon); padding: var(--e-4); margin: var(--e-4) 0; max-width: var(--largeur-texte); }
.provisoire { border: 2px dashed var(--encre); border-radius: var(--rayon); padding: var(--e-3) var(--e-4); font-size: var(--t-petit); margin-bottom: var(--e-5); max-width: var(--largeur-texte); }

/* Chargement */
/* Tout « chargement » du site est un tampon OK qui s'abat (v2) */
.charge { display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 240px; padding: var(--e-6) 0; text-align: center;
  font: 700 .8125rem/1.3 var(--frappe); letter-spacing: .08em; text-transform: uppercase; color: var(--encre-2); }
:lang(ar) .charge { letter-spacing: 0; font-size: .9375rem; }
.charge::before { content: ""; width: 76px; height: 76px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Cg%20transform%3D%22rotate%28-8%2032%2032%29%22%20fill%3D%22none%22%20stroke%3D%22%2316223F%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2228%22%20stroke-width%3D%223.6%22/%3E%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2222.5%22%20stroke-width%3D%221.8%22/%3E%3Cellipse%20cx%3D%2224.2%22%20cy%3D%2232%22%20rx%3D%226.4%22%20ry%3D%228.6%22%20stroke-width%3D%224.6%22/%3E%3Cpath%20d%3D%22M36%2023.2%20V40.8%20M45.2%2023.2%20L36.6%2032.6%20L45.8%2040.8%22%20stroke-width%3D%224.6%22/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  animation: frappe-tampon 1.1s var(--courbe-tampon) infinite; transform-origin: 50% 60%; }
@keyframes tourne { to { transform: rotate(360deg); } }

.entre { animation: entre var(--d-moyen) var(--courbe); }
@keyframes entre { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .entre { animation-name: entre-rtl; }
@keyframes entre-rtl { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   MOINS D'ANIMATIONS SI LE TÉLÉPHONE LE DEMANDE
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* L'avertissement « page en français seulement » ne s'affiche qu'en arabe et en anglais */
html[lang="fr"] [data-t="seule_fr"] { display: none; }


/* =========================================================================
   ÉCRANS DE CHARGEMENT (v2) : un tampon « OK » qui s'abat, ou le dossier qui se remplit
   SITE.chargeur(el, texte) · SITE.voile(texte) · SITE.calcul(el, textes)
   ========================================================================= */
.chargeur { display: grid; justify-items: center; align-content: center; gap: var(--e-4); padding: var(--e-7) var(--e-4); text-align: center; min-height: 260px; }
.chargeur p { font: 700 .8125rem/1.3 var(--frappe); letter-spacing: .08em; text-transform: uppercase; color: var(--encre-2); }
:lang(ar) .chargeur p { letter-spacing: 0; font-size: .9375rem; }
.chargeur .coup { position: relative; width: 84px; height: 84px; color: var(--encre); }
.chargeur .coup svg { width: 84px; height: 84px; animation: frappe-tampon 1.1s var(--courbe-tampon) infinite; transform-origin: 50% 60%; }
.chargeur .coup::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 3px solid var(--safran); opacity: 0; animation: encre-onde 1.1s ease-out infinite; }
.sur-encre .chargeur p { color: var(--papier-sur-encre); }
.sur-encre .chargeur .coup { color: var(--papier); }
@keyframes frappe-tampon { 0% { transform: translateY(-22px) scale(1.35) rotate(-14deg); opacity: 0; } 35% { transform: translateY(0) scale(.94) rotate(-8deg); opacity: 1; }
  48% { transform: scale(1) rotate(-8deg); } 80% { transform: scale(1) rotate(-8deg); opacity: 1; } 100% { transform: translateY(-10px) scale(1.1) rotate(-12deg); opacity: 0; } }
@keyframes encre-onde { 0%, 30% { opacity: 0; transform: scale(.7); } 40% { opacity: .9; } 100% { opacity: 0; transform: scale(1.35); } }

.voile-page { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--papier);
  transition: opacity 260ms var(--courbe), visibility 0s linear 260ms; }
.voile-page.parti { opacity: 0; visibility: hidden; }

/* Le dossier qui se remplit : feuilles qui glissent dans la chemise, compteur, phrases */
.calcul { display: grid; justify-items: center; gap: var(--e-5); padding: var(--e-7) var(--e-4); text-align: center; }
.calcul .chemise { position: relative; width: 150px; height: 112px; }
.calcul .chemise .dos { position: absolute; inset: 14px 0 0; background: var(--encre); border-radius: 8px; }
.calcul .chemise .dos::before { content: ""; position: absolute; top: -14px; inset-inline-start: 12px; width: 56px; height: 18px; background: var(--encre); border-radius: 6px 6px 0 0; }
.calcul .chemise i { position: absolute; inset-inline: 14px; height: 74px; top: 22px; background: var(--papier-3); border-radius: 4px;
  box-shadow: 0 1px 0 var(--filet); animation: feuille-entre 1.2s var(--courbe) infinite; }
.calcul .chemise i:nth-child(3) { animation-delay: .4s; } .calcul .chemise i:nth-child(4) { animation-delay: .8s; }
.calcul .chemise .face { position: absolute; inset: 44px 0 0; background: #24325A; border-radius: 6px 6px 8px 8px; z-index: 2; }
.calcul .chemise .face::after { content: ""; position: absolute; inset-inline-end: 12px; top: 10px; width: 34px; height: 34px; border-radius: 50%;
  border: 3px double var(--safran); transform: rotate(-8deg); }
@keyframes feuille-entre { 0% { transform: translateY(-70px); opacity: 0; } 30% { opacity: 1; } 70%, 100% { transform: translateY(0); opacity: 1; } }
.calcul .pourcent { font: 400 3rem/1 var(--titre); direction: ltr; }
.calcul p { font: 700 .875rem/1.3 var(--frappe); letter-spacing: .06em; text-transform: uppercase; color: var(--encre-2); min-height: 1.3em; }
:lang(ar) .calcul p { letter-spacing: 0; font-size: 1rem; }

/* Passage d'une question à l'autre : la feuille tourne vite */
.tourne { animation: tourne-page 300ms var(--courbe); }
@keyframes tourne-page { 0% { opacity: 0; transform: translateX(28px) rotate(.6deg); } 100% { opacity: 1; transform: none; } }
[dir="rtl"] .tourne { animation-name: tourne-page-rtl; }
@keyframes tourne-page-rtl { 0% { opacity: 0; transform: translateX(-28px) rotate(-.6deg); } 100% { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .chargeur .coup svg, .chargeur .coup::after, .calcul .chemise i { animation: none !important; opacity: 1; transform: rotate(-8deg); }
  .voile-page { transition: none; }
}
/* Filet de sécurité : si le script ne tourne pas, le voile d'entrée part seul après 3 s */
.voile-page { animation: voile-secours 0s linear 3s forwards; }
@keyframes voile-secours { to { opacity: 0; visibility: hidden; } }

/* =========================================================================
   v2 (18/11) — BOUTONS DE COULEUR ET TEST DE POSITIONNEMENT
   ========================================================================= */
.bouton-encre { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 62px; padding: 14px 26px;
  border: 0; border-radius: var(--rayon); background: var(--encre); color: var(--papier); text-decoration: none; text-align: center;
  font: 700 1.1875rem/1.2 var(--texte); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35); }
.bouton-encre:hover { text-decoration: none; background: #1F2E52; }
.bouton-encre:active { transform: translateY(2px); }

.po-barre { display: flex; gap: 4px; list-style: none; margin: 12px 0 0; padding: 0; }
.po-barre li { flex: 1; height: 9px; border-radius: 5px; background: var(--papier-2); border: 1px solid var(--filet); transition: background var(--d-rapide); }
.po-barre li.fait { background: var(--encre); border-color: var(--encre); }
.po-barre li.cur { background: var(--safran); border-color: var(--safran); }
.po-bas { display: flex; justify-content: space-between; align-items: center; min-height: 52px; margin-top: 4px; }
.po-note { font-size: 1rem; padding: 7px 11px 5px; }
.po-res { display: grid; gap: 14px; text-align: center; justify-items: center; padding: 8px 0; }
.po-note-grande { display: flex; align-items: baseline; gap: 6px; margin: 0; font: 400 6.5rem/.9 var(--titre); direction: ltr; }
.po-note-grande span { font-size: 2.5rem; color: var(--encre-2); }
.po-marge { font-size: var(--t-grand); color: var(--encre-2); }
.po-jauge { position: relative; width: 100%; height: 18px; border-radius: 9px; background: var(--papier-2); border: 1px solid var(--filet-fort); margin: 34px 0 6px; }
.po-jauge .plage { position: absolute; top: 0; bottom: 0; background: var(--safran-pale); border-inline: 3px solid var(--safran); }
.po-jauge .point { position: absolute; top: -7px; width: 8px; height: 30px; margin-inline-start: -4px; background: var(--encre); border-radius: 4px; }
.po-jauge .seuil { position: absolute; top: -10px; bottom: -10px; width: 0; border-inline-start: 3px solid var(--encre); }
.po-jauge .seuil span { position: absolute; top: -28px; transform: translateX(-50%); font: 700 .8125rem/1 var(--frappe); white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
[dir="rtl"] .po-jauge .seuil span { transform: translateX(50%); }
.po-verdict { font-size: var(--t-titre-3); max-width: 26ch; }
.po-themes { width: 100%; text-align: start; background: var(--papier-2); border-radius: var(--rayon); padding: 14px 16px; display: grid; gap: 8px; }
.po-themes h3 { font-size: .8125rem; margin-bottom: 2px; }
.po-theme { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.po-theme b { font: 700 1rem/1.4 var(--frappe); white-space: nowrap; }
.po-sous { font-size: var(--t-petit); color: var(--encre-2); margin-top: -6px; }
.po-liens { display: flex; gap: 6px 22px; flex-wrap: wrap; justify-content: center; }
.po-avert { font-size: var(--t-petit); color: var(--encre-2); max-width: 46ch; }
.po-corrections { width: 100%; text-align: start; display: grid; margin-top: 8px; }
.po-corr { border-top: 1px solid var(--filet-fort); padding: 16px 0; display: grid; gap: 6px; }
.po-corr .q { font: 400 1.25rem/1.35 var(--titre); }
.po-corr .lbl { font-size: var(--t-petit); color: var(--encre-2); }
.po-corr .barre-txt { text-decoration: line-through; color: var(--encre-2); }
.po-corr .exp { background: var(--papier-2); border-radius: 8px; padding: 10px 12px; line-height: 1.55; }
@media (min-width: 1100px) { .po-note-grande { font-size: 8.5rem; } .po-note-grande span { font-size: 3rem; } }

/* Résultat du positionnement : le bloc Pass Français (pièce 2) et la partie français */
.po-pass { position: relative; width: 100%; text-align: start; background: var(--encre); color: var(--papier); border-radius: 12px; padding: var(--e-6) var(--e-4) var(--e-5);
  display: grid; gap: var(--e-3); margin-top: var(--e-4); }
.po-pass .tampon { position: absolute; inset-inline-end: 14px; top: -20px; font-size: 1rem; }
.po-pass h3 { font-size: var(--t-titre-3); line-height: 1.25; }
.po-pass .bouton-second { justify-self: start; }
.po-pass-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--papier-sur-encre); }
.po-pass-liste li { display: flex; gap: 10px; align-items: baseline; }
.po-pass-liste li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--safran); transform: translateY(-1px); }
.po-titres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.po-titres button { display: grid; gap: 4px; justify-items: center; min-height: 72px; padding: 10px 6px; border-radius: var(--rayon); border: 2px solid var(--papier-sur-encre);
  background: none; color: var(--papier); font-size: var(--t-petit); line-height: 1.2; }
.po-titres button b { font: 400 1.75rem/1 var(--titre); color: var(--safran); }
.po-titres button:hover { background: rgba(244, 238, 223, .1); }
.po-fr-res { font-size: var(--t-grand); }
.po-fr-res b { color: var(--safran); }
.po-doc { background: var(--papier-2); border-radius: var(--rayon); padding: var(--e-4); margin-top: var(--e-3); display: grid; gap: 8px; line-height: 1.6; }
.po-doc .frappe { color: var(--encre-2); }
.po-audio { width: 100%; margin-top: var(--e-3); }
