/* Comparateur de budget France / Maroc · Business Hijra
   Mobile d'abord. Polices système : rien n'est chargé depuis un service tiers.
   Couleurs de la charte en haut. Animations coupées si la personne a demandé moins de mouvement. */
:root {
  --bordeaux: #641C24;
  --bordeaux-2: #82283A;   /* bordeaux éclairci (dégradés, survol) */
  --bordeaux-f: #4A141B;   /* bordeaux foncé */
  --creme: #F2E6D3;
  --creme-2: #F8F1E6;      /* fond des sections claires */
  --nuit: #14213D;
  --nuit-2: #1E2F55;
  --carte: #FFFDF9;
  --texte-2: #4A5168;      /* texte secondaire, contraste > 7:1 sur crème clair */
  --trait: #E4D6BF;
  --champ: #8A8F9E;
  --or: #C9A36B;           /* accent doré discret, tiré du crème */
  --rayon: 18px;
  --ombre: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px -8px rgba(20, 33, 61, .18);
  --ombre-forte: 0 2px 4px rgba(20, 33, 61, .08), 0 24px 48px -16px rgba(20, 33, 61, .35);
  --titres: "Segoe UI Variable Display", "SF Pro Display", -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; color: var(--nuit); overflow-x: hidden;
  background-color: var(--creme-2);
  background-image: linear-gradient(rgba(100, 28, 36, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 28, 36, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.conteneur { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
.large { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
h1, h2, h3 { font-family: var(--titres); line-height: 1.15; color: var(--nuit); letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 7vw, 3.9rem); font-weight: 800; margin: .9rem 0 1rem; }
h2 { font-size: 1.45rem; font-weight: 800; margin: 0 0 .75rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 .5rem; }
p { margin: 0 0 .75rem; }
a { color: var(--bordeaux); }
.discret { color: var(--texte-2); font-size: .9rem; }
.centre { text-align: center; }
:focus-visible { outline: 3px solid var(--nuit); outline-offset: 3px; border-radius: 4px; }
h2:focus { outline: none; }

.evitement { position: absolute; left: -999px; top: 0; z-index: 60; padding: .6rem 1rem; background: var(--nuit); color: #fff; }
.evitement:focus { left: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête fixe ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 241, 230, .82); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.entete.defile { border-bottom-color: var(--trait); box-shadow: 0 6px 20px -12px rgba(20, 33, 61, .35); }
.entete-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.marque { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-family: var(--titres); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; color: var(--nuit); text-decoration: none; }
.marque b { font-weight: 800; color: var(--bordeaux); }
.logo-img { display: block; width: 2.6rem; height: 2.6rem; flex: none; border-radius: 50%; box-shadow: 0 4px 12px -4px rgba(100, 28, 36, .55); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.marque:hover .logo-img { transform: rotate(-12deg) scale(1.05); }
.entete .btn-entete { flex: 0 0 auto; min-height: 42px; padding: .5rem 1rem; font-size: .92rem; border-radius: 999px; }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; padding: 2.5rem 0 2rem; }
.hero-motif {
  position: absolute; inset: -10% -20% auto auto; width: 38rem; height: 38rem; pointer-events: none; opacity: .35;
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 163, 107, .35), transparent 60%),
    conic-gradient(from 22.5deg, transparent 0 12.5%, rgba(100, 28, 36, .07) 0 25%, transparent 0 37.5%, rgba(100, 28, 36, .07) 0 50%, transparent 0 62.5%, rgba(100, 28, 36, .07) 0 75%, transparent 0 87.5%, rgba(100, 28, 36, .07) 0);
  border-radius: 50%; animation: tourne 80s linear infinite;
}
.hero-in { position: relative; display: grid; gap: 2.5rem; align-items: center; }
.pastille {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .35rem .85rem .35rem .6rem;
  font-size: .85rem; font-weight: 600; color: var(--nuit); background: #fff; border: 1px solid var(--trait); border-radius: 999px; box-shadow: var(--ombre);
}
.pastille-point { width: .55rem; height: .55rem; border-radius: 50%; background: var(--bordeaux); box-shadow: 0 0 0 0 rgba(100, 28, 36, .5); animation: pulse 2.2s infinite; }
h1 em { font-style: normal; color: var(--bordeaux); }
.surligne { position: relative; white-space: nowrap; z-index: 0; }
.surligne::after {
  content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .06em; height: .32em; z-index: -1;
  background: var(--or); opacity: .45; border-radius: 4px; transform-origin: left; transform: scaleX(0); animation: trace 1s .7s cubic-bezier(.2, .8, .2, 1) forwards;
}
.revele .surligne::after, .titre-section .surligne::after { animation: none; transform: scaleX(0); transition: transform .9s .25s cubic-bezier(.2, .8, .2, 1); }
.revele.vu .surligne::after, .titre-section.vu .surligne::after { transform: scaleX(1); }
.hero-sous { max-width: 34rem; font-size: 1.12rem; color: var(--texte-2); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; }
.hero-note { margin: 0; font-size: .88rem; color: var(--texte-2); }
.hero .btn-grand { flex: 0 0 auto; min-height: 56px; padding: .9rem 1.6rem; font-size: 1.05rem; border-radius: 999px; box-shadow: 0 12px 28px -10px rgba(100, 28, 36, .7); }
.fleche { display: inline-block; margin-left: .35rem; transition: transform .25s; }
.btn:hover .fleche { transform: translateX(4px); }

/* Visuel : arche marocaine + cartes flottantes */
.hero-visuel { position: relative; max-width: 26rem; width: 100%; margin: 0 auto; aspect-ratio: 4 / 5; }
.arche {
  position: absolute; inset: 0 8%; padding: 10px; border-radius: 999px 999px 26px 26px;
  background: linear-gradient(160deg, var(--bordeaux-2), var(--bordeaux) 55%, var(--bordeaux-f)); box-shadow: var(--ombre-forte);
}
.arche::before { /* liseré doré */
  content: ""; position: absolute; inset: 6px; border-radius: inherit; border: 1.5px solid rgba(242, 230, 211, .45); pointer-events: none;
}
.arche-ciel {
  position: relative; height: 100%; overflow: hidden; border-radius: 999px 999px 18px 18px;
  background:
    radial-gradient(120% 70% at 50% 100%, #E9B27A 0%, transparent 60%),
    linear-gradient(180deg, var(--nuit) 0%, var(--nuit-2) 45%, #7A3A44 78%, #D98E6A 100%);
}
.arche-ciel::before { /* étoiles */
  content: ""; position: absolute; inset: 0 0 45% 0; opacity: .8;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 12%, #fff, transparent), radial-gradient(1px 1px at 85% 40%, #fff, transparent), radial-gradient(1px 1px at 12% 55%, #fff, transparent), radial-gradient(1.2px 1.2px at 58% 45%, #fff, transparent);
  animation: scintille 4s ease-in-out infinite alternate;
}
.arche-ciel::after { /* dunes / toits */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -2px; height: 30%;
  background:
    radial-gradient(60% 100% at 25% 100%, var(--bordeaux-f) 98%, transparent 100%),
    radial-gradient(70% 90% at 80% 100%, #3A0F15 98%, transparent 100%);
}
.soleil {
  position: absolute; left: 50%; bottom: 22%; width: 34%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle, #FBE3B8 0%, #F2C38A 55%, rgba(242, 195, 138, 0) 72%);
  animation: leve 3.5s cubic-bezier(.2, .8, .2, 1) both;
}
.palmier {
  position: absolute; right: 16%; bottom: 20%; width: 26%; aspect-ratio: 1 / 1.6; z-index: 1;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 96'%3E%3Cpath d='M31 40 C30 60 28 78 26 96 L31 96 C32 78 33 60 33 40Z' fill='%231a0a0d'/%3E%3Cg fill='%231a0a0d'%3E%3Cpath d='M32 40 C22 30 10 30 1 38 C12 32 22 34 32 42Z'/%3E%3Cpath d='M32 40 C42 28 54 28 60 36 C50 32 42 34 32 42Z'/%3E%3Cpath d='M32 40 C26 26 26 14 32 4 C30 16 32 28 34 40Z'/%3E%3Cpath d='M32 40 C20 38 12 46 8 56 C16 46 24 42 32 42Z'/%3E%3Cpath d='M32 40 C44 38 52 46 56 56 C48 46 40 42 32 42Z'/%3E%3C/g%3E%3C/svg%3E");
  transform-origin: 50% 100%; animation: balance 6s ease-in-out infinite alternate;
}
.flottant {
  position: absolute; display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem .6rem .6rem;
  background: rgba(255, 253, 249, .96); border: 1px solid var(--trait); border-radius: 14px; box-shadow: var(--ombre-forte);
  font-size: .85rem; line-height: 1.25; animation: flotte 6s ease-in-out infinite;
}
.flottant b { display: block; font-size: .95rem; }
.flottant small { color: var(--texte-2); }
.flottant .ico { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; font-size: 1.15rem; background: var(--creme); border-radius: 10px; }
.f1 { left: -2%; top: 14%; }
.f2 { right: -4%; top: 44%; animation-delay: -2s; }
.f3 { left: 2%; bottom: 8%; animation-delay: -4s; }

/* Chiffres clés */
.chiffres-cles { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 2.5rem auto 0; padding: 0 1rem; }
.chiffres-cles li { padding: 1rem 1.1rem; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); }
.chiffres-cles b { display: block; font-family: var(--titres); font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: var(--bordeaux); }
.chiffres-cles span { font-size: .88rem; color: var(--texte-2); }

/* ---------- Comment ça marche (section sombre) ---------- */
.etapes-info { position: relative; margin-top: 3rem; padding: 3.5rem 0; color: var(--creme); background: var(--nuit); overflow: hidden; }
.etapes-info::before {
  content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23F2E6D3' stroke-width='1'%3E%3Crect x='11' y='11' width='18' height='18'/%3E%3Crect x='11' y='11' width='18' height='18' transform='rotate(45 20 20)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 56px;
}
.etapes-info .large { position: relative; }
.etapes-info h2, .etapes-info h3 { color: var(--creme); }
.surtitre { display: inline-block; margin: 0 0 .6rem; padding: .2rem .7rem; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bordeaux); background: rgba(100, 28, 36, .08); border-radius: 999px; }
.etapes-info .surtitre { color: var(--creme); background: rgba(242, 230, 211, .12); }
.titre-section { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: 1.5rem; }
.cartes-etapes { list-style: none; display: grid; gap: 1rem; margin: 0; padding: 0; }
.carte-etape { position: relative; padding: 1.4rem 1.3rem; background: rgba(242, 230, 211, .06); border: 1px solid rgba(242, 230, 211, .16); border-radius: var(--rayon); transition: transform .3s, background .3s, border-color .3s; }
.carte-etape:hover { transform: translateY(-4px); background: rgba(242, 230, 211, .1); border-color: rgba(201, 163, 107, .55); }
.carte-etape h3 { margin: .9rem 0 .35rem; }
.carte-etape p { margin: 0; color: rgba(242, 230, 211, .8); }
.num { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; font-family: var(--titres); font-weight: 800; color: var(--creme); background: linear-gradient(150deg, var(--bordeaux-2), var(--bordeaux)); border-radius: 12px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .6); }

/* ---------- Zone calculateur ---------- */
.zone-calcul { padding: 3.5rem 0 2rem; text-align: left; }
.zone-calcul > .conteneur > .surtitre, .zone-calcul > .conteneur > .titre-section { display: block; text-align: center; }
.zone-calcul > .conteneur > .surtitre { width: max-content; margin-left: auto; margin-right: auto; }
.zone-calcul .titre-section { margin-bottom: .5rem; }

/* Progression : étapes numérotées + barre */
.progression { position: sticky; top: 4rem; z-index: 20; margin: 1.5rem -1rem 1.25rem; padding: .75rem 1rem .6rem; background: rgba(248, 241, 230, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 .55rem; padding: 0; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; color: var(--texte-2); text-align: center; }
.stepper span {
  display: grid; place-items: center; width: 2rem; height: 2rem; font-weight: 800; font-size: .9rem;
  color: var(--texte-2); background: #fff; border: 2px solid var(--trait); border-radius: 50%; transition: all .35s cubic-bezier(.2, .8, .2, 1);
}
.stepper .fait span { color: var(--creme); background: var(--nuit); border-color: var(--nuit); }
.stepper .actif span { color: var(--creme); background: var(--bordeaux); border-color: var(--bordeaux); transform: scale(1.12); box-shadow: 0 0 0 5px rgba(100, 28, 36, .14); }
.stepper .actif { color: var(--bordeaux); }
.barre { height: 6px; background: var(--trait); border-radius: 99px; overflow: hidden; }
.barre span { display: block; width: 25%; height: 100%; background: linear-gradient(90deg, var(--bordeaux), var(--bordeaux-2), var(--or)); border-radius: inherit; transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* Étapes et questions */
.etape { margin-bottom: 1.5rem; padding: 1.5rem 1.1rem; background: var(--carte); border: 1px solid var(--trait); border-radius: 24px; box-shadow: var(--ombre); }
.etape.entre { animation: entre .5s cubic-bezier(.2, .8, .2, 1); }
.etape > h2 { font-size: 1.55rem; }
.q { min-width: 0; margin: 0 0 1.4rem; padding: 0; border: 0; }
legend, .q > label, .duo label, .champ > label { display: block; margin-bottom: .5rem; padding: 0; font-weight: 700; }
.aide { margin: -.2rem 0 .55rem; font-size: .9rem; color: var(--texte-2); }
.consigne { padding: .8rem 1rem; font-size: .95rem; background: var(--creme-2); border: 1px solid var(--trait); border-left: 4px solid var(--bordeaux); border-radius: 12px; }
.choix { display: grid; gap: .55rem; }
.choix-ligne { grid-template-columns: 1fr 1fr; }
.choix label {
  position: relative; display: flex; align-items: center; gap: .7rem; min-height: 52px; padding: .65rem .9rem;
  background: #fff; border: 1.5px solid var(--trait); border-radius: 14px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s, background .2s;
}
.choix label:hover { border-color: var(--bordeaux-2); transform: translateY(-1px); box-shadow: var(--ombre); }
.choix label:has(input:checked) { border-color: var(--bordeaux); background: #FFF7F3; box-shadow: 0 0 0 3px rgba(100, 28, 36, .12); font-weight: 700; }
.choix label:has(input:focus-visible) { outline: 3px solid var(--nuit); outline-offset: 2px; }
input[type=radio], input[type=checkbox] { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--bordeaux); }
select, input[type=text], input[type=email] {
  width: 100%; min-height: 52px; padding: .65rem .9rem; font: inherit; color: var(--nuit);
  background: #fff; border: 1.5px solid var(--trait); border-radius: 14px; transition: border-color .2s, box-shadow .2s;
}
select:hover, input[type=text]:hover { border-color: var(--champ); }
select:focus, input[type=text]:focus { outline: none; border-color: var(--bordeaux); box-shadow: 0 0 0 4px rgba(100, 28, 36, .14); }
input:disabled { background: #F1EBE1; color: var(--texte-2); }
input[aria-invalid="true"], select[aria-invalid="true"] { border: 2px solid var(--bordeaux); background: #FFF5F3; }
.saisie { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; }
.saisie input[type=text] { flex: 0 1 9.5rem; min-width: 6.5rem; text-align: right; font-weight: 600; }
.unite { font-size: .95rem; color: var(--texte-2); white-space: nowrap; }
.groupe { min-width: 0; margin: 0 0 1.25rem; padding: 1rem 1rem .25rem; border: 1px solid var(--trait); border-radius: 18px; background: #fff; }
.groupe > legend { float: left; width: 100%; margin: 0 0 .25rem; padding: 0; font-family: var(--titres); font-size: 1.1rem; font-weight: 800; color: var(--bordeaux); }
.groupe > legend + * { clear: both; }
.champ { padding: .8rem 0; border-top: 1px solid var(--trait); }
.groupe > legend + .champ { border-top: 0; }
.nsp { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-size: .92rem; color: var(--texte-2); cursor: pointer; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .75rem; }
.grille label { display: block; margin-bottom: .3rem; font-size: .95rem; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: end; }
.err { margin: .45rem 0 0; font-size: .9rem; font-weight: 700; color: var(--bordeaux); }
.err:empty { display: none; }
.total-saisi { padding: 1rem 1.1rem; font-weight: 700; color: var(--creme); background: linear-gradient(135deg, var(--nuit), var(--nuit-2)); border-radius: 16px; box-shadow: var(--ombre); }
.total-saisi:empty { display: none; }

/* Boutons */
.nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  flex: 1 1 auto; min-height: 52px; padding: .75rem 1.4rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  color: var(--creme); background: linear-gradient(150deg, var(--bordeaux-2), var(--bordeaux) 60%); border: 0; border-radius: 14px;
  box-shadow: 0 10px 22px -12px rgba(100, 28, 36, .9); transition: transform .2s, box-shadow .2s, filter .2s; overflow: hidden;
}
.btn::after { /* reflet qui passe au survol */
  content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(100, 28, 36, .9); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }
.btn-sec { flex: 0 1 auto; color: var(--nuit); background: #fff; border: 1.5px solid var(--nuit); box-shadow: none; }
.btn-sec:hover { background: var(--creme-2); box-shadow: var(--ombre); }
.btn:disabled { opacity: .6; cursor: default; }
.alerte { padding: .9rem 1.1rem; font-weight: 600; color: var(--bordeaux); background: #FFF7F3; border: 1.5px solid var(--bordeaux); border-radius: 14px; }
.alerte p { margin: 0 0 .6rem; }
.alerte p:focus { outline: none; }
.alerte .btn { width: 100%; }

/* ---------- Résultat ---------- */
.resume { display: inline-block; padding: .3rem .8rem; font-size: .9rem; font-weight: 600; color: var(--bordeaux); background: rgba(100, 28, 36, .08); border-radius: 999px; }
.chiffres { display: grid; gap: .9rem; margin: 1rem 0; }
.chiffre { position: relative; overflow: hidden; padding: 1.25rem 1.2rem; color: var(--creme); background: linear-gradient(145deg, var(--nuit-2), var(--nuit)); border-radius: 20px; box-shadow: var(--ombre-forte); }
.chiffre:nth-child(2) { background: linear-gradient(145deg, var(--bordeaux-2), var(--bordeaux) 60%, var(--bordeaux-f)); }
.chiffre::after { content: ""; position: absolute; right: -2.5rem; top: -2.5rem; width: 8rem; height: 8rem; border-radius: 50%; border: 18px solid rgba(242, 230, 211, .07); }
.chiffre h3 { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(242, 230, 211, .8); }
.chiffre .valeur { margin: 0 0 .35rem; font-family: var(--titres); font-size: 1.7rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.chiffre .sous { margin: 0; font-size: .88rem; color: rgba(242, 230, 211, .8); }
.chiffre .badge { color: var(--nuit); background: var(--creme); }
.badge { display: inline-block; margin-top: .6rem; padding: .15rem .65rem; font-size: .78rem; font-weight: 700; color: var(--creme); background: var(--nuit); border-radius: 99px; }
.avertissement { padding: .85rem 1.1rem; font-size: .93rem; background: var(--creme-2); border: 1px solid var(--trait); border-left: 4px solid var(--bordeaux); border-radius: 12px; }

/* Barres France / Maroc */
.duel { margin: 1.25rem 0; padding: 1.2rem 1.1rem; background: #fff; border: 1px solid var(--trait); border-radius: 20px; box-shadow: var(--ombre); }
.duel h3 { margin: 0 0 1rem; }
.duel-ligne { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .35rem .75rem; margin-bottom: 1rem; }
.duel-nom { font-weight: 700; font-size: .92rem; }
.duel-piste { grid-column: 1 / -1; position: relative; height: 1.5rem; background: var(--creme-2); border-radius: 10px; overflow: hidden; }
.duel-barre { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 10px; transition: width 1.3s cubic-bezier(.2, .8, .2, 1); }
.duel-fr .duel-barre { background: linear-gradient(90deg, var(--nuit), var(--nuit-2)); }
.duel-ma .duel-barre { background: linear-gradient(90deg, var(--bordeaux), var(--bordeaux-2)); }
.duel-ma .duel-marge { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(100, 28, 36, .35) 0 6px, rgba(100, 28, 36, .18) 6px 12px); border-radius: 0 10px 10px 0; opacity: 0; transition: opacity .6s 1.1s; }
.duel.vu .duel-marge { opacity: 1; }
.duel-valeur { font-family: var(--titres); font-size: 1.05rem; font-weight: 800; color: var(--nuit); white-space: nowrap; }
.duel-ma .duel-valeur { color: var(--bordeaux); }
.duel-legende { margin: .75rem 0 0; font-size: .82rem; color: var(--texte-2); }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tableau { background: #fff; border-radius: 16px; }
caption { padding: .5rem 0; font-weight: 700; text-align: left; }
th, td { padding: .6rem .45rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--trait); }
thead th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-2); border-bottom: 2px solid var(--nuit); }
th[scope=row] { width: 38%; font-weight: 600; }
td, thead th + th { text-align: right; }
tbody tr { transition: background .2s; }
tbody tr:not(.grp):hover { background: #FFF9F2; }
.grp th { padding: .5rem .5rem; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bordeaux); background: var(--creme-2); }
tfoot th, tfoot td { font-weight: 800; border-top: 2px solid var(--nuit); border-bottom: 0; }
.note { display: block; margin-top: .15rem; font-size: .78rem; font-weight: 400; color: var(--texte-2); }
.mad { display: block; font-size: .78rem; color: var(--texte-2); }
.etat { font-style: italic; color: var(--texte-2); }
.nb { white-space: nowrap; font-variant-numeric: tabular-nums; }
.liste { padding-left: 1.2rem; }
.liste li { margin-bottom: .45rem; }
.liste li::marker { color: var(--bordeaux); }
details { margin: 1rem 0; padding: .25rem 1rem; background: #fff; border: 1px solid var(--trait); border-radius: 14px; }
summary { padding: .6rem 0; font-weight: 700; cursor: pointer; }
#resultat > h3, .sources > h3 { font-size: 1.3rem; margin-top: 2.25rem; }

/* Appel à l'action */
.cta {
  position: relative; overflow: hidden; margin-top: 2.5rem; padding: 1.75rem 1.3rem; color: var(--creme); text-align: center;
  background: radial-gradient(120% 90% at 100% 0%, var(--bordeaux-2), transparent 60%), linear-gradient(150deg, var(--nuit-2), var(--nuit));
  border-radius: 26px; box-shadow: var(--ombre-forte);
}
.cta::before {
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23F2E6D3' stroke-width='1'%3E%3Crect x='11' y='11' width='18' height='18'/%3E%3Crect x='11' y='11' width='18' height='18' transform='rotate(45 20 20)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 48px 48px;
}
.cta > * { position: relative; }
.cta h3 { margin-top: 0; font-size: clamp(1.4rem, 4.5vw, 1.9rem); color: #fff; }
.cta p { color: rgba(242, 230, 211, .88); }
.cta .discret { color: rgba(242, 230, 211, .7); }
.cta .btn-lien { display: flex; width: 100%; max-width: 22rem; margin: 1.1rem auto .9rem; min-height: 56px; font-size: 1.05rem; color: var(--nuit); background: var(--creme); border-radius: 999px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .6); }
.cta .btn-lien:hover { background: #fff; }
.reseaux { margin: 1rem 0 0; font-size: .9rem; text-align: center; color: var(--texte-2); }
.reseaux a { color: var(--bordeaux); font-weight: 600; text-decoration: underline; text-decoration-color: #641C24; text-underline-offset: 3px; }
.reseaux a:hover { text-decoration-thickness: 2px; }
.reseaux-liens { display: flex; justify-content: center; align-items: center; gap: .9rem; margin-top: .2rem; white-space: nowrap; font-size: 1rem; }
.reseaux a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; }
.ico-reseau { width: 1.7rem; height: 1.7rem; flex: none; color: var(--bordeaux); transition: transform .2s; }
.reseaux a:hover .ico-reseau { transform: scale(1.12); }

.pied { margin-top: 3rem; padding: 2rem 0 2.5rem; font-size: .88rem; color: rgba(242, 230, 211, .75); background: var(--nuit); }
.pied-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.pied p { margin: 0; }
.marque-pied { color: var(--creme); }
.marque-pied b { color: var(--or); }
.marque-pied .logo-img { width: 3rem; height: 3rem; box-shadow: 0 0 0 2px rgba(242, 230, 211, .25); }

/* Saisies composées, badges de fiabilité, blocs du résultat */
.titre-champ { margin: 0 0 .5rem; font-weight: 700; }
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.q .cases label.case {
  display: flex; align-items: center; gap: .55rem; min-height: 46px; margin: 0; padding: .4rem .7rem; font-weight: 500; font-size: .93rem; cursor: pointer;
  background: #fff; border: 1.5px solid var(--trait); border-radius: 12px; transition: border-color .2s, background .2s;
}
.q .cases label.case:has(input:checked) { border-color: var(--bordeaux); background: #FFF7F3; font-weight: 700; }
@media (min-width: 40rem) { .cases { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.champ > label.nsp { display: inline-flex; margin: 0; font-weight: 400; }
.sous-champ { margin-bottom: .55rem; }
.sous-champ label { display: block; margin-bottom: .25rem; font-size: .95rem; }
.sous-champ select { max-width: 13rem; }
.sous-bloc { padding: .5rem 0 .25rem; }
.sous-titre { display: flex; align-items: center; gap: .6rem; margin: 2rem 0 .9rem; font-size: 1.15rem; color: var(--bordeaux); }
.sous-titre::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.fiab { display: inline-block; padding: .05rem .55rem; font-size: .72rem; font-weight: 700; color: var(--nuit); background: var(--creme); border: 1px solid var(--trait); border-radius: 99px; }
.alerte-info { margin: 1rem 0; padding: .9rem 1.1rem; background: #fff; border: 1.5px solid var(--nuit); border-radius: 14px; }
.alerte-info p { margin-bottom: .4rem; }
.alerte-info .liste { margin: 0; }
.exemples li { margin-bottom: .8rem; }
.reperes { margin-top: 2rem; padding: 1.3rem 1.2rem; background: #fff; border: 1px solid var(--trait); border-radius: 22px; box-shadow: var(--ombre); }
.reperes h3 { margin-top: 0; font-size: 1.3rem; }
.sources:focus { outline: none; }
.repere { font-weight: 700; }
.niveaux { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .7rem; }
.niveau { position: relative; padding: .95rem 1rem .95rem 1.15rem; background: var(--creme-2); border: 1.5px solid var(--trait); border-radius: 16px; overflow: hidden; transition: transform .25s; }
.niveau::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--trait); }
.niveaux .niveau:nth-child(1)::before { background: #2F6B4F; }
.niveaux .niveau:nth-child(2)::before { background: var(--or); }
.niveaux .niveau:nth-child(3)::before { background: var(--bordeaux); }
.niveau-toi { background: #fff; border: 2px solid var(--bordeaux); box-shadow: 0 0 0 4px rgba(100, 28, 36, .1), var(--ombre); }
.niveau:hover { transform: translateX(3px); }
.niveau-titre { display: block; font-weight: 800; }
.niveau-badge { display: inline-block; margin-left: .35rem; padding: .05rem .55rem; font-size: .75rem; font-weight: 700; color: var(--creme); background: var(--bordeaux); border-radius: 999px; vertical-align: middle; animation: pulse 2.2s infinite; }
.niveau-montant { display: block; font-family: var(--titres); font-size: 1.15rem; font-weight: 700; }
.niveau .mad { display: block; color: var(--texte-2); font-size: .88rem; }
.niveau-detail { display: block; color: var(--texte-2); font-size: .9rem; margin-top: .2rem; }
.ex-ligne { display: block; font-size: .92rem; }

/* ---------- Apparitions ---------- */
.apparait { animation: monte .9s cubic-bezier(.2, .8, .2, 1) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .25s; } .d3 { animation-delay: .4s; }
.js .revele { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .revele.vu { opacity: 1; transform: none; }
.js .cartes-etapes .revele:nth-child(2), .js .chiffres-cles .revele:nth-child(2) { transition-delay: .12s; }
.js .cartes-etapes .revele:nth-child(3), .js .chiffres-cles .revele:nth-child(3) { transition-delay: .24s; }
.js .chiffres-cles .revele:nth-child(4) { transition-delay: .36s; }

@keyframes monte { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes entre { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes trace { to { transform: scaleX(1); } }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(100, 28, 36, .45); } 70% { box-shadow: 0 0 0 9px rgba(100, 28, 36, 0); } 100% { box-shadow: 0 0 0 0 rgba(100, 28, 36, 0); } }
@keyframes leve { from { bottom: 4%; opacity: .2; } to { bottom: 22%; opacity: 1; } }
@keyframes scintille { from { opacity: .45; } to { opacity: .95; } }
@keyframes balance { from { transform: rotate(-2deg); } to { transform: rotate(2.5deg); } }

/* Tableau sur téléphone : chaque poste devient un bloc (libellé, puis France | Maroc). */
@media (max-width: 39.99rem) {
  .tableau, .tableau tbody, .tableau tfoot { display: block; }
  .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: .75rem; padding: .7rem .2rem; border-bottom: 1px solid var(--trait); }
  .tableau tr.grp { display: block; padding: 0; border: 0; }
  .tableau th, .tableau td { display: block; width: auto; padding: 0; border: 0; }
  .tableau tr > th[scope=row] { grid-column: 1 / -1; margin-bottom: .35rem; }
  .tableau .grp th { margin-top: .9rem; padding: .45rem .6rem; border-radius: 8px; }
  .tableau td { text-align: left; }
  .tableau td + td { text-align: right; }
  .tableau td::before {
    content: attr(data-col); content: attr(data-col) / "";
    display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-2);
  }
  .tableau tfoot tr { margin-top: .25rem; border-top: 2px solid var(--nuit); border-bottom: 0; }
  .entete .btn-entete { padding: .45rem .85rem; font-size: .85rem; }
  .flottant { font-size: .78rem; }
  .hero-visuel { max-width: 19rem; }
  .flottant .ico { width: 2rem; height: 2rem; font-size: 1rem; }
}

@media (min-width: 40rem) {
  .etape { padding: 2rem 2rem; }
  .chiffres { grid-template-columns: 1fr 1fr; }
  .chiffres-cles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cartes-etapes { grid-template-columns: repeat(3, 1fr); }
  table { font-size: .95rem; }
  th, td { padding: .65rem .6rem; }
  .cta { padding: 2.5rem 2rem; }
  .progression { margin-left: 0; margin-right: 0; border-radius: 16px; }
  .stepper li { font-size: .8rem; }
}
@media (min-width: 60rem) {
  .hero { padding: 4rem 0 2.5rem; }
  .hero-in { grid-template-columns: 1.15fr .85fr; }
  .hero-visuel { max-width: 24rem; }
}

/* Moins de mouvement demandé : tout s'affiche directement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .revele { opacity: 1; transform: none; }
}
