/* Madin.IA — Black Friday 2026 */
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-bold.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }

:root {
  --nuit: #0A121B;
  --ardoise: #303743;
  --jaune: #EED076;
  --jaune-fonce: #D9B84F;
  --blanc: #FFFFFF;
  --fond: #F4F5F7;
  --gris: #6B7280;
  --bord: #DDE0E5;
  --vert: #1F9D6B;
  --rouge: #C8453B;
  --r: 14px;
  --ombre: 0 10px 30px rgba(10, 18, 27, .08);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--ardoise); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { color: var(--nuit); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.1rem; }
.muted { color: var(--gris); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* ---------- barre du haut ---------- */
.topbar { background: var(--nuit); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.logo { font-weight: 800; font-size: 1.35rem; color: var(--jaune); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: #fff; font-weight: 500; font-size: .8rem; margin-left: 8px; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a { color: #C9CDD3; text-decoration: none; font-size: .9rem; margin-left: 18px; }
.topbar nav a:hover { color: var(--jaune); }

/* ---------- bandeau d'état ---------- */
.etat { background: var(--jaune); color: var(--nuit); text-align: center; font-weight: 600; font-size: .92rem; padding: 9px 16px; }
.etat.test { background: repeating-linear-gradient(45deg, #EED076, #EED076 12px, #F4DE97 12px, #F4DE97 24px); }
.etat.termine { background: var(--ardoise); color: #fff; }
.etat .chrono { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(238, 208, 118, .18), transparent 60%), var(--nuit); color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: 'BLACK FRIDAY'; position: absolute; right: -20px; bottom: -34px; font-size: clamp(4rem, 13vw, 9.5rem); font-weight: 800; color: rgba(255,255,255,.04); letter-spacing: -.04em; white-space: nowrap; pointer-events: none; }
.hero .badge { display: inline-block; background: var(--jaune); color: var(--nuit); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.5vw, 3.4rem); margin: 18px 0 12px; letter-spacing: -.02em; max-width: 18ch; }
.hero p.lead { color: #C9CDD3; font-size: 1.1rem; max-width: 56ch; margin: 0 0 26px; }
.prix { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.prix .montant { font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 800; color: var(--jaune); line-height: 1; }
.prix .unite { color: #fff; font-weight: 500; }
.prix .barre { color: #8D939C; text-decoration: line-through; font-size: 1.2rem; }
.prix .remise { background: var(--rouge); color: #fff; font-weight: 700; padding: 3px 10px; border-radius: 8px; font-size: .95rem; }
.puces { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; padding: 0; list-style: none; }
.puces li { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: #E6E8EB; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 600; text-decoration: none; border-radius: 10px; padding: 14px 24px; transition: transform .1s, background .2s, opacity .2s; }
.btn:active { transform: translateY(1px); }
.btn-jaune { background: var(--jaune); color: var(--nuit); }
.btn-jaune:hover { background: var(--jaune-fonce); }
.btn-nuit { background: var(--nuit); color: #fff; }
.btn-nuit:hover { background: var(--ardoise); }
.btn-ligne { background: transparent; color: var(--nuit); border: 1.5px solid var(--bord); }
.btn-ligne:hover { border-color: var(--nuit); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-bloc { width: 100%; }

/* ---------- sections ---------- */
section.bloc { padding: 56px 0; }
section.bloc.blanc { background: #fff; }
.grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.carte { background: #fff; border: 1px solid var(--bord); border-radius: var(--r); padding: 22px; box-shadow: var(--ombre); }
.carte h3 { margin-bottom: .3em; }
.kicker { color: var(--jaune-fonce); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: 6px; }

.programme { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); }
.programme th, .programme td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--bord); }
.programme th { background: var(--nuit); color: #fff; font-weight: 500; font-size: .9rem; }
.programme td:last-child, .programme th:last-child { text-align: right; white-space: nowrap; }
.programme tr:last-child td { font-weight: 700; background: #FBF6E4; border-bottom: 0; }

.etapes { counter-reset: e; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.etapes > div { counter-increment: e; background: #fff; border-radius: var(--r); padding: 22px; border: 1px solid var(--bord); position: relative; }
.etapes > div::before { content: counter(e); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--nuit); color: var(--jaune); font-weight: 700; margin-bottom: 10px; }
.etapes .somme { font-size: 1.6rem; font-weight: 800; color: var(--nuit); }

.info { background: #FBF6E4; border: 1px solid #F0E1AC; border-left: 4px solid var(--jaune); padding: 16px 18px; border-radius: 10px; }
.alerte { background: #FDECEA; border: 1px solid #F5C6C1; border-left: 4px solid var(--rouge); padding: 14px 18px; border-radius: 10px; color: #7A2620; }
.succes { background: #E7F6EF; border: 1px solid #BFE6D3; border-left: 4px solid var(--vert); padding: 16px 18px; border-radius: 10px; }

details { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; color: var(--nuit); }

/* ---------- formulaire ---------- */
.parcours { background: #fff; border-radius: 20px; box-shadow: var(--ombre); padding: clamp(20px, 4vw, 40px); border: 1px solid var(--bord); }
.stepper { display: flex; gap: 8px; margin-bottom: 26px; list-style: none; padding: 0; }
.stepper li { flex: 1; text-align: center; font-size: .78rem; color: var(--gris); padding-top: 10px; border-top: 4px solid var(--bord); }
.stepper li.actif { color: var(--nuit); font-weight: 600; border-color: var(--jaune); }
.stepper li.fait { color: var(--nuit); border-color: var(--nuit); }

.champs { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, 1fr); }
.champs .plein { grid-column: 1 / -1; }
@media (max-width: 620px) { .champs { grid-template-columns: 1fr; } }
label { display: block; font-size: .87rem; font-weight: 500; color: var(--nuit); margin-bottom: 5px; }
label .opt { color: var(--gris); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--bord); background: #fff; color: var(--nuit);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--nuit); box-shadow: 0 0 0 3px rgba(238, 208, 118, .45); }
textarea { min-height: 90px; resize: vertical; }
.piege { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.coche { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--bord); border-radius: 10px; margin-bottom: 10px; cursor: pointer; font-weight: 400; font-size: .92rem; color: var(--ardoise); }
.coche input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--nuit); flex: none; }
.coche:has(input:checked) { border-color: var(--nuit); background: #FBFBFC; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.actions .btn { flex: 1 1 200px; }
.erreur { margin-top: 14px; }

/* ---------- document à lire ---------- */
.document { border: 1px solid var(--bord); border-radius: 12px; max-height: 60vh; overflow-y: auto; padding: 22px; background: #FCFCFD; font-size: .9rem; }
.document .doc-titre { background: var(--nuit); color: #fff; margin: -22px -22px 18px; padding: 18px 22px; border-radius: 12px 12px 0 0; }
.document .doc-titre strong { color: var(--jaune); font-size: 1.05rem; display: block; }
.document h4 { color: var(--nuit); margin: 18px 0 6px; font-size: .95rem; border-bottom: 2px solid var(--jaune); display: inline-block; padding-bottom: 2px; }
.document p { margin: 0 0 8px; text-align: justify; }
.document ul { margin: 0 0 8px; padding-left: 20px; }
.document dl { display: grid; grid-template-columns: minmax(120px, 32%) 1fr; gap: 4px 12px; margin: 0 0 10px; }
.document dt { font-weight: 600; color: var(--nuit); }
.document dd { margin: 0; }
.document table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: .85rem; }
.document th { background: var(--nuit); color: #fff; font-weight: 500; text-align: left; padding: 6px 8px; }
.document td { border-bottom: 1px solid var(--bord); padding: 6px 8px; vertical-align: top; }
.document .sig-place { border: 2px dashed var(--bord); border-radius: 10px; padding: 14px; text-align: center; color: var(--gris); margin: 16px 0; }
.lu { font-size: .85rem; color: var(--gris); margin: 8px 0 18px; }

/* ---------- signature ---------- */
.signature { position: relative; border: 2px dashed var(--ardoise); border-radius: 12px; background: #fff; touch-action: none; }
.signature canvas { display: block; width: 100%; height: 190px; cursor: crosshair; }
.signature .aide { position: absolute; inset: 0; display: grid; place-items: center; color: #B0B5BD; pointer-events: none; font-size: .95rem; }
.signature-barre { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: .85rem; }
.lien { background: none; border: 0; color: var(--ardoise); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }

/* ---------- simulateur ---------- */
.simu { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: var(--nuit); color: #fff; border-radius: var(--r); padding: 22px 26px; }
.simu .total { font-size: 2rem; font-weight: 800; color: var(--jaune); text-align: right; line-height: 1.1; }
.simu .total small { display: block; font-size: .85rem; font-weight: 400; color: #C9CDD3; }
.compteur { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; overflow: hidden; }
.compteur button { background: transparent; color: #fff; border: 0; width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer; }
.compteur button:hover { background: rgba(255,255,255,.08); }
.compteur output { min-width: 46px; text-align: center; font-weight: 700; font-size: 1.2rem; }
@media (max-width: 560px) { .simu { grid-template-columns: 1fr; } .simu .total { text-align: left; } }

/* ---------- accueil ---------- */
.offres { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: -40px; position: relative; z-index: 2; }
.offre { background: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 18px 40px rgba(10,18,27,.14); display: flex; flex-direction: column; gap: 10px; border-top: 6px solid var(--jaune); }
.offre .p { font-size: 2.6rem; font-weight: 800; color: var(--nuit); line-height: 1; }
.offre .p small { font-size: 1rem; font-weight: 500; color: var(--gris); }
.offre ul { padding-left: 18px; margin: 4px 0 14px; }
.offre .btn { margin-top: auto; }

/* ---------- chargement ---------- */
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .7s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- pied ---------- */
footer { background: var(--nuit); color: #9AA0A8; padding: 34px 0; font-size: .85rem; margin-top: 40px; }
footer a { color: #C9CDD3; margin-right: 16px; }
footer .logo { font-size: 1.1rem; }

/* ---------- pages légales ---------- */
.legal { background: #fff; border-radius: var(--r); padding: clamp(20px, 4vw, 44px); margin: 36px auto; box-shadow: var(--ombre); }
.legal h1 { font-size: 1.8rem; }
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }
.a-completer { background: #FFF3C4; padding: 0 4px; border-radius: 4px; }

/* ---------- ajustements mobile ---------- */
.logo span { white-space: nowrap; }
[id] { scroll-margin-top: 76px; }
@media (max-width: 640px) {
  .topbar nav { display: none; }
  .logo span { font-size: .7rem; }
}

.logo { display: inline-flex; align-items: center; }
.logo-img { height: 34px; width: auto; display: block; }
footer .logo-img { height: 26px; }

/* ---------- icônes (SVG au trait) ---------- */
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; display: inline-block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.succes h3 .ico { color: var(--vert); }
.etat .ico { margin-right: 4px; }
