/* Serviz : le bleu de travail des artisans et le jaune du mètre ruban. */
:root {
  --bleu: #1D3FC4;
  --nuit: #0C1A4B;
  --jaune: #FFD21F;
  --fond: #F3F5FA;
  --blanc: #FFFFFF;
  --gris: #5B6685;
  --ligne: #DDE2EE;
  --vert: #12805C;
  --rouge: #C8321E;
  --large: 1120px;
  --marge: clamp(20px, 5vw, 48px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--nuit);
  font: 400 18px/1.55 "Bricolage Grotesque", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.6vw, 52px); max-width: 18ch; }
h3 { font-size: 24px; letter-spacing: -0.01em; }
p { margin: 0; max-width: 62ch; }
a { color: var(--bleu); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 6px; }
.petit { font-size: 15px; color: var(--gris); }
.saut { position: absolute; left: -999px; top: 8px; background: var(--nuit); color: var(--blanc); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.saut:focus { left: 8px; }

.marque { font-weight: 800; font-size: 30px; letter-spacing: -0.05em; color: var(--bleu); text-decoration: none; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 14px; border: 0;
  font: 600 17px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
}
.bouton-nuit { background: var(--nuit); color: var(--blanc); }
.bouton-jaune { background: var(--jaune); color: var(--nuit); }
.bouton:hover { filter: brightness(1.08); }

/* ───── En-tête ───── */
.haut {
  max-width: var(--large); margin: 0 auto; padding: 20px var(--marge);
  display: flex; align-items: center; gap: 28px;
}
.haut nav { display: flex; gap: 24px; margin-left: auto; }
.haut nav a { color: var(--nuit); text-decoration: none; font-weight: 600; font-size: 16px; }
.haut nav a:hover { color: var(--bleu); }
.haut .bouton { min-height: 44px; padding: 0 18px; font-size: 16px; }

main > section { max-width: var(--large); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--marge) 0; }

/* ───── Hero : le mètre ruban ───── */
.hero { padding-top: clamp(24px, 5vw, 56px) !important; }
.hero h1 { font-size: clamp(56px, 12.5vw, 168px); line-height: 0.9; letter-spacing: -0.055em; color: var(--nuit); }
.chapo { font-size: clamp(19px, 2.2vw, 24px); margin-top: 24px; max-width: 34ch; line-height: 1.35; }

.metre {
  position: relative; margin-top: clamp(28px, 4vw, 48px);
  background: var(--jaune); border-radius: 28px;
  padding: clamp(22px, 4vw, 44px) clamp(20px, 4vw, 44px) 64px;
  overflow: hidden;
}
.metre label { display: block; font-weight: 600; font-size: 17px; margin-bottom: 10px; }
.essai input {
  width: 100%; height: clamp(60px, 7vw, 76px); padding: 0 22px;
  border: 3px solid var(--nuit); border-radius: 18px; background: var(--blanc);
  font: 600 clamp(18px, 2.4vw, 26px)/1 "Bricolage Grotesque", system-ui, sans-serif; color: var(--nuit);
}
.essai input::placeholder { color: #8A93AD; font-weight: 400; }
.essai input:focus { outline: none; box-shadow: 0 0 0 4px rgba(29, 63, 196, .35); }
.reponse { margin-top: 16px; min-height: 2.6em; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.3; max-width: none; }
.reponse strong { background: var(--nuit); color: var(--jaune); padding: 2px 12px 4px; border-radius: 10px; font-weight: 800; white-space: nowrap; display: inline-block; margin: 2px 2px 2px 0; }
.reponse .autre { font-size: 16px; display: block; margin-top: 6px; }
.exemples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.exemples button {
  border: 2px solid var(--nuit); background: transparent; color: var(--nuit);
  border-radius: 999px; padding: 8px 14px; font: 600 15px/1.1 inherit; font-family: inherit; cursor: pointer;
}
.exemples button:hover { background: var(--nuit); color: var(--jaune); }
/* Graduations : un trait tous les 8 px, un grand tous les 40 px, comme sur un mètre. */
.graduations {
  position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background:
    repeating-linear-gradient(90deg, var(--nuit) 0 3px, transparent 3px 40px) 20px 100% / 100% 26px no-repeat,
    repeating-linear-gradient(90deg, rgba(12, 26, 75, .6) 0 2px, transparent 2px 8px) 20px 100% / 100% 13px no-repeat;
}
.bientot { margin-top: 18px; font-size: 16px; color: var(--gris); max-width: none; }

/* ───── Étapes : posées sur une règle ───── */
.regle {
  list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 4px solid var(--nuit);
  background: repeating-linear-gradient(90deg, var(--nuit) 0 2px, transparent 2px 16px) 0 0 / 100% 12px no-repeat;
}
.regle li { padding: 34px 28px 0 0; position: relative; }
.regle li::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 28px; background: var(--nuit); }
.cm { display: block; font-weight: 800; font-size: 64px; line-height: 1; color: var(--bleu); letter-spacing: -0.04em; padding-left: 14px; }
.regle h3 { margin: 10px 0 8px; }
.regle p { font-size: 17px; }

/* ───── Vérification : le dossier ───── */
.verification { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.verif-texte p { margin-top: 20px; }
.dossier {
  list-style: none; margin: 0; padding: 8px 28px; background: var(--nuit); color: var(--blanc);
  border-radius: 24px; transform: rotate(-1deg);
}
.dossier li { display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.dossier li:last-child { border-bottom: 0; }
.dossier li::before {
  content: ""; grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%; margin-top: 2px;
  background: var(--jaune) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230C1A4B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.dossier strong { font-weight: 600; font-size: 19px; }
.dossier span { grid-column: 2; color: #B9C3E6; font-size: 16px; }

/* ───── Métiers ───── */
.familles { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; columns: 3 260px; column-gap: 40px; }
.familles li { break-inside: avoid; padding: 14px 0; border-top: 2px solid var(--nuit); }
.familles strong { display: block; font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.familles span { display: block; color: var(--gris); font-size: 16px; line-height: 1.4; margin-top: 2px; }

/* ───── Pros ───── */
.pros { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.pros > div > p { margin-top: 20px; }
.points { margin: 20px 0 28px; padding: 0; list-style: none; }
.points li { padding: 8px 0 8px 22px; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: 18px; width: 10px; height: 4px; background: var(--bleu); }
.commission { background: var(--blanc); border: 2px solid var(--nuit); border-radius: 24px; padding: 28px; }
.commission-titre { font-weight: 600; margin-bottom: 8px; }
.commission dl { margin: 0 0 16px; }
.commission dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.commission dt { color: var(--gris); }
.commission dd { margin: 0; font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.commission .total { border-bottom: 0; }
.commission .total dt { color: var(--nuit); font-weight: 600; }
.commission .total dd { font-size: 44px; color: var(--bleu); letter-spacing: -0.03em; }

/* ───── Questions ───── */
.questions h2 { margin-bottom: clamp(20px, 3vw, 36px); }
.questions details { border-top: 2px solid var(--nuit); max-width: 820px; }
.questions details:last-of-type { border-bottom: 2px solid var(--nuit); }
.questions summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-weight: 600; font-size: 21px; position: relative; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-weight: 400; font-size: 34px; color: var(--bleu); }
.questions details[open] summary::after { content: "–"; }
.questions details p { padding: 0 0 22px; }

/* ───── Lancement ───── */
.lancement { padding-bottom: clamp(56px, 9vw, 112px) !important; }
.lancement > p { margin-top: 14px; }
.lancement form { margin-top: 28px; max-width: 640px; }
.piege { position: absolute; left: -9999px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choix { position: relative; }
.choix input { position: absolute; opacity: 0; inset: 0; }
.choix span { display: inline-block; padding: 12px 18px; border: 2px solid var(--nuit); border-radius: 999px; font-weight: 600; cursor: pointer; }
.choix input:checked + span { background: var(--nuit); color: var(--jaune); }
.choix input:focus-visible + span { outline: 3px solid var(--bleu); outline-offset: 3px; }
.champs { display: grid; grid-template-columns: 1fr 160px; gap: 14px; margin-bottom: 18px; }
.champs label { font-weight: 600; font-size: 16px; }
.champs input {
  display: block; width: 100%; height: 56px; margin-top: 6px; padding: 0 16px;
  border: 2px solid var(--nuit); border-radius: 14px; background: var(--blanc); font: 400 18px/1 inherit; font-family: inherit; color: var(--nuit);
}
.lancement .petit { margin-top: 14px; }
.retour { margin-top: 14px; font-weight: 600; min-height: 1.5em; }
.retour.ok { color: var(--vert); }
.retour.erreur { color: var(--rouge); }

/* ───── Pied ───── */
.bas { background: var(--nuit); color: #B9C3E6; }
.bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 40px max(var(--marge), calc((100vw - var(--large)) / 2 + var(--marge))); }
.bas .marque { color: var(--jaune); }
.bas p { font-size: 15px; margin-top: 4px; }
.bas nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; max-width: 560px; }
.bas a { color: var(--blanc); font-size: 16px; }

@media (max-width: 860px) {
  .haut nav { display: none; }
  .haut .bouton { margin-left: auto; }
  .regle { grid-template-columns: 1fr; background: none; border-top: 0; }
  .regle li { border-top: 4px solid var(--nuit); padding: 22px 0 28px; }
  .regle li::before { display: none; }
  .cm { padding-left: 0; }
  .verification, .pros { grid-template-columns: 1fr; }
  .dossier { transform: none; }
}
@media (max-width: 520px) {
  .haut .bouton { font-size: 14px; padding: 0 12px; }
  .marque { font-size: 26px; }
  .champs { grid-template-columns: 1fr; }
  .commission .total dd { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
