/* ============================================================
   AFSM Sponsoring — feuille de style
   Palette bleus & verts. DM Sans. Énergie sportive :
   diagonales, dégradés bleu→vert, lignes de vitesse.
   ============================================================ */

:root {
  --blue-1:  #1e40af;
  --blue-2:  #0369a1;
  --blue-3:  #0ea5e9;
  --green-1: #059669;
  --green-2: #10b981;
  --green-d: #047857;

  --navy:    #0b1b33;
  --navy-2:  #12294a;
  --navy-3:  #1c3a63;

  --paper:   #ffffff;
  --paper-2: #f1f5f9;
  --paper-3: #e2e8f0;

  --text:    #17263d;
  --muted:   #52657f;

  --line-l:  #dbe4ee;
  --line-d:  rgba(255, 255, 255, .14);

  --grad:    linear-gradient(90deg, var(--blue-1), var(--blue-3) 55%, var(--green-2));

  --max:     1180px;
  --gut:     clamp(20px, 5vw, 60px);
  --r:       10px;

  --f: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Typographie : titres volontairement contenus ---------- */

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); line-height: 1.12; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.95rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.012em; }
h4 { font-size: .98rem; letter-spacing: -0.008em; }

p { margin: 0 0 1.05em; max-width: 68ch; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); }
.narrow { max-width: 760px; }

.lead {
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--muted);
  max-width: 58ch;
}
.dark .lead, .band-dark .lead { color: #cbdcf0; }

/* ---------- Sections ---------- */

section { padding-block: clamp(52px, 6vw, 88px); position: relative; }
section.tight { padding-block: clamp(40px, 4vw, 60px); }

.light { background: var(--paper); }
.band  { background: var(--paper-2); }

.dark {
  background:
    radial-gradient(1100px 480px at 88% -8%, rgba(14,165,233,.24), transparent 62%),
    radial-gradient(760px 420px at 6% 108%, rgba(5,150,105,.22), transparent 60%),
    var(--navy);
  color: #eaf2fb;
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }
.dark p { color: #b9cee5; }

.band-dark {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #eaf2fb;
}
.band-dark h2, .band-dark h3, .band-dark h4 { color: #fff; }
.band-dark p { color: #b9cee5; }

.section-head { margin-bottom: clamp(28px, 3vw, 48px); }
.section-head p { margin-top: .85rem; }

.dark::after, .band-dark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--grad);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center;
  padding: 13px 26px;
  background: var(--green-1);
  color: #fff;
  font-weight: 600; font-size: .97rem;
  text-decoration: none;
  border: 2px solid var(--green-1);
  border-radius: 999px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--green-d); border-color: var(--green-d); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; transform: none; }
.light .btn-ghost, .band .btn-ghost { color: var(--blue-1); border-color: var(--blue-1); }
.light .btn-ghost:hover, .band .btn-ghost:hover { background: rgba(30,64,175,.07); }

.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue-3); outline-offset: 3px;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,27,51,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-d);
}
.nav.nav-light {
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line-l);
}
.nav-in {
  max-width: var(--max); margin: 0 auto;
  padding: 14px var(--gut);
  display: flex; align-items: center; gap: 26px;
}
.brand {
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em;
  text-decoration: none; color: #fff; white-space: nowrap;
}
.nav-light .brand { color: var(--navy); }
.brand span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-links { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: .9rem; font-weight: 500;
  color: #b9cee5; padding: 5px 0; border-bottom: 2px solid transparent;
}
.nav-light .nav-links a { color: var(--muted); }
.nav-links a:hover { color: #fff; border-bottom-color: var(--green-2); }
.nav-light .nav-links a:hover { color: var(--blue-1); border-bottom-color: var(--blue-3); }
.nav-links a.cta {
  background: var(--green-1); color: #fff;
  padding: 8px 18px; border-radius: 999px; border-bottom: 0;
}
.nav-light .nav-links a.cta { color: #fff; }
.nav-links a.cta:hover { background: var(--green-d); border-bottom-color: transparent; color: #fff; }

@media (max-width: 900px) {
  .nav-in { flex-wrap: wrap; gap: 10px; }
  .nav-links { margin-left: 0; width: 100%; gap: 14px; overflow-x: auto; padding-bottom: 2px; }
  .nav-links a { font-size: .84rem; white-space: nowrap; }
}

/* ---------- Portail d'accueil ---------- */
/* Un seul fond dégradé bleu. Les deux entrées sont des boîtes posées dessus. */

.gate {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: clamp(18px, 2.2vw, 30px);
  padding: clamp(96px, 13vh, 150px) var(--gut) clamp(84px, 12vh, 130px);
  background:
    radial-gradient(900px 520px at 82% 12%, rgba(16,185,129,.30), transparent 62%),
    linear-gradient(145deg, #1e40af 0%, #0369a1 52%, #0ea5e9 100%);
  overflow: hidden;
}
.gate::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("lines.svg");
  background-size: cover; background-position: center;
  opacity: .55;
}
.gate::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11,27,51,.42) 0%, rgba(11,27,51,.05) 38%, rgba(11,27,51,.55) 100%);
}

.gate-mark {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; padding: 26px 20px 30px;
}
.gate-brand {
  display: inline-block; text-align: center;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -0.025em;
  color: #fff; text-decoration: none; pointer-events: auto;
}
.gate-brand span { color: #a7f3d0; }
.gate-sig {
  color: #e0f2fe; font-size: .95rem; font-weight: 500;
  text-align: center; margin: 0; max-width: 34ch;
}

/* Les boîtes */
.door {
  position: relative; z-index: 2;
  flex: 0 1 360px; max-width: 380px;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(24px, 2.4vw, 32px);
  text-decoration: none; color: #fff;
  background: rgba(11, 27, 51, .34);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 44px rgba(8, 24, 48, .3);
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}
.door:hover, .door:focus-visible {
  transform: translateY(-4px);
  background: rgba(11, 27, 51, .48);
  border-color: rgba(255, 255, 255, .55);
}
.door-bg { display: none; }
.door::after { content: none; }

.door-kicker {
  display: inline-block;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: 5px 13px; border-radius: 999px; margin-bottom: 14px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
}
.door-a .door-kicker { background: rgba(14, 165, 233, .32); border-color: rgba(125, 211, 252, .6); }
.door-b .door-kicker { background: rgba(16, 185, 129, .32); border-color: rgba(110, 231, 183, .6); }

.door-t {
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.25;
  margin: 0 0 10px;
}
.door-p {
  color: #dbeafe; font-size: .94rem; line-height: 1.55;
  margin: 0 0 20px;
}
.door-go {
  display: inline-block; font-weight: 600; font-size: .92rem; color: #fff;
  padding: 11px 22px; border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1.5px solid rgba(255, 255, 255, .5);
}
.door-a:hover .door-go { background: #fff; color: var(--blue-1); border-color: #fff; }
.door-b:hover .door-go { background: #fff; color: var(--green-d); border-color: #fff; }

@media (max-width: 820px) {
  .gate {
    min-height: auto;
    padding: clamp(84px, 16vh, 120px) var(--gut) clamp(72px, 12vh, 100px);
  }
  .door { flex: 1 1 100%; max-width: 460px; }
  .gate-mark { padding: 20px 18px 24px; }
  .gate-sig { font-size: .88rem; }
}

/* ---------- Baseline sous le logo ---------- */

.brand-block { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; }
.brand-sub {
  font-size: .68rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: #8aa3bd; white-space: nowrap;
}
.nav-light .brand-sub { color: var(--muted); }
.gate-brand-sub {
  display: block; margin-top: 4px;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #cfe3f7; text-align: center;
}
.foot .brand-sub { color: #8aa3bd; }
@media (max-width: 480px) { .brand-sub { display: none; } }

/* ---------- Grilles ---------- */

.grid { display: grid; gap: clamp(16px, 1.8vw, 26px); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1040px) { .g4, .g5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px)  { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px)  { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } }

/* ---------- Cartes ---------- */

.card {
  position: relative;
  padding: clamp(20px, 2vw, 28px);
  background: var(--paper);
  border: 1px solid var(--line-l);
  border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(15,42,77,.04);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 3px;
  background: var(--grad);
}
.dark .card, .band-dark .card {
  background: rgba(255,255,255,.05);
  border-color: var(--line-d);
  box-shadow: none;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: .96rem; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0 0 14px; padding-left: 18px; }
.card li { margin-bottom: 4px; font-size: .95rem; color: var(--muted); }
.dark .card li, .band-dark .card li { color: #b9cee5; }

.outcome {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line-l);
  font-size: .9rem; font-weight: 600; color: var(--green-d);
}
.dark .outcome, .band-dark .outcome {
  border-top-color: var(--line-d); color: var(--green-2);
}

/* ---------- Étapes ---------- */

.steps { counter-reset: s; }
.step {
  counter-increment: s;
  display: grid; grid-template-columns: 56px 1fr;
  gap: clamp(14px, 2vw, 28px);
  padding: clamp(18px, 2vw, 26px) 0;
  border-bottom: 1px solid var(--line-l);
  align-items: start;
}
.dark .step { border-bottom-color: var(--line-d); }
.step::before {
  content: counter(s);
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 1.05rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--blue-1), var(--blue-3));
}
.step:nth-child(n+4)::before {
  background: linear-gradient(135deg, var(--green-1), var(--green-2));
}
.step-b h3 { margin-bottom: 8px; }
.step-b p { font-size: .97rem; }
.step-b p:last-child { margin-bottom: 0; }
.step.key {
  background: rgba(16,185,129,.1);
  border-radius: var(--r);
  padding-inline: clamp(14px, 1.6vw, 22px);
  border-bottom-color: transparent;
}

@media (max-width: 600px) {
  .step { grid-template-columns: 42px 1fr; gap: 14px; }
}

/* ---------- Cas type ---------- */

.scenario {
  background: var(--paper);
  border: 1px solid var(--line-l);
  border-radius: var(--r);
  overflow: hidden;
}
.dark .scenario { background: rgba(255,255,255,.05); border-color: var(--line-d); }
.scenario-flag {
  padding: 12px clamp(18px, 1.8vw, 26px);
  background: linear-gradient(90deg, rgba(30,64,175,.1), rgba(16,185,129,.12));
  border-bottom: 1px solid var(--line-l);
  font-size: .84rem; line-height: 1.45; font-weight: 600;
  color: var(--blue-1);
}
.dark .scenario-flag {
  color: #cfe6ff; border-bottom-color: var(--line-d);
  background: linear-gradient(90deg, rgba(14,165,233,.2), rgba(16,185,129,.2));
}
.scenario-body { padding: clamp(18px, 2vw, 26px); }
.scenario-body h3 { margin-bottom: 12px; }
.scenario dl { margin: 0; }
.scenario dt {
  font-weight: 700; font-size: .78rem; color: var(--blue-2);
  padding-top: 12px;
}
.dark .scenario dt { color: var(--blue-3); }
.scenario dd {
  margin: 3px 0 0; padding-bottom: 12px;
  border-bottom: 1px solid var(--line-l);
  color: var(--muted); font-size: .93rem;
}
.dark .scenario dd { color: #b9cee5; border-bottom-color: var(--line-d); }
.scenario dd:last-child { border-bottom: 0; }

/* ---------- Encadré ---------- */

.notice {
  border: 1px solid var(--line-l);
  border-left: 5px solid var(--green-1);
  background: var(--paper);
  padding: clamp(20px, 2.2vw, 30px);
  border-radius: var(--r);
}
.dark .notice, .band-dark .notice {
  background: rgba(255,255,255,.05); border-color: var(--line-d);
  border-left-color: var(--green-2);
}
.notice h3 { margin-bottom: 12px; }
.notice .fine { font-size: .86rem; color: var(--muted); margin-bottom: 0; }
.dark .notice .fine { color: #97b2cf; }

/* ---------- FAQ ---------- */

.faq { max-width: 840px; }
.faq details {
  border: 1px solid var(--line-l);
  border-radius: var(--r);
  margin-bottom: 10px;
  background: var(--paper);
}
.dark .faq details { background: rgba(255,255,255,.05); border-color: var(--line-d); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 16px 48px 16px 20px; position: relative;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 500; color: var(--green-1); line-height: 1;
}
.dark .faq summary::after { color: var(--green-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; margin: 0; font-size: .96rem; }

/* ---------- Formulaire ---------- */

.form { max-width: 700px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: .86rem; font-weight: 600;
  margin-bottom: 6px; color: #fff;
}
.light .field label, .band .field label { color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  font-family: var(--f); font-size: .97rem;
  background: #fff; color: var(--text);
  border: 1px solid var(--line-l); border-radius: 8px;
}
.form button { margin-top: 6px; cursor: pointer; font-family: var(--f); }

/* ---------- Terrains ---------- */

.terrain {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 14px; padding: 18px 0;
  border-bottom: 1px solid var(--line-l);
  align-items: baseline;
}
.dark .terrain { border-bottom-color: var(--line-d); }
.terrain strong { font-size: 1rem; letter-spacing: -0.015em; }
.terrain span { font-size: .92rem; color: var(--muted); }
.dark .terrain span { color: #b9cee5; }
@media (max-width: 760px) { .terrain { grid-template-columns: 1fr 1fr; } }

.todo {
  display: inline-block; padding: 2px 9px; border-radius: 5px;
  background: #fef3c7; color: #92400e;
  font-size: .78rem; font-weight: 700;
}

/* ---------- Puces d'audience ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips a {
  padding: 11px 20px; text-decoration: none; border-radius: 999px;
  border: 1px solid var(--line-l); background: var(--paper);
  font-weight: 600; font-size: .95rem; color: var(--blue-1);
}
.chips a:hover { border-color: var(--green-1); color: var(--green-d); background: rgba(16,185,129,.06); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(56px, 7vw, 104px) clamp(46px, 5vw, 76px); overflow: hidden; }
.hero-in { position: relative; z-index: 2; }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-top: 20px; }

.pitch-lines {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("lines.svg");
  background-size: cover; background-position: center right;
  opacity: .9;
}

/* ---------- Pied de page ---------- */

.foot {
  background: var(--navy); color: #a8bdd6;
  padding-block: 48px 34px;
  border-top: 4px solid transparent;
  border-image: var(--grad) 1;
}
.foot a { color: #dbeafe; }
.foot-top {
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: space-between; align-items: flex-start;
  padding-bottom: 26px; border-bottom: 1px solid var(--line-d);
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-nav a { font-size: .9rem; text-decoration: none; }
.foot-nav a:hover { color: var(--green-2); }
.foot-bot {
  margin-top: 22px; display: flex; flex-wrap: wrap;
  gap: 14px; justify-content: space-between; font-size: .84rem;
}
.switch { font-size: .9rem; }
.switch a { color: var(--green-2); text-decoration: none; font-weight: 600; }
.switch a:hover { text-decoration: underline; }

.hr { height: 1px; background: var(--line-l); border: 0; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
}
