/* =============================================================
   äidou — feuille de style du site
   Charte graphique : Niels Barrier, 2026 (voir identite_visuelle/)
   ============================================================= */

/* ---------- Polices auto-hébergées (licence OFL) ---------- */
@font-face { font-family: "Michroma"; src: url("../fonts/michroma-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo-2-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo-2-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo-2-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("../fonts/exo-2-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* ---------- Jetons ---------- */
:root {
  /* Couleurs du dégradé de la charte (RVB) */
  --indigo: #353cef;
  --bleu: #3575ef;
  --violet: #bf87e2;
  --corail: #f8b8a2;
  --sable: #ffd69e;
  --rose: #ff8089;
  --or: #f9cd00;
  --gris: #333333;

  /* Le dégradé « horizon » de la couverture de la charte */
  --horizon: linear-gradient(180deg, var(--bleu) 0%, var(--violet) 28%, var(--corail) 43%, var(--sable) 50%, var(--corail) 57%, var(--violet) 72%, var(--bleu) 88%, var(--indigo) 100%);
  /* Le dégradé des pages intercalaires */
  --ciel: linear-gradient(170deg, var(--violet) -15%, var(--bleu) 50%, var(--indigo) 100%);

  --font-titre: "Michroma", "Eurostile", "Segoe UI", sans-serif;
  --font-texte: "Exo 2", "Segoe UI", system-ui, sans-serif;

  --header-h: 4rem;
  --radius: 1.25rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* Thème jour */
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f8f5fd;
  --border: rgb(191 135 226 / 0.35);
  --text: var(--gris);
  --text-soft: #5a5670;
  --title: var(--indigo);
  --subtitle: var(--violet);
  --accent: var(--bleu);
  --header-bg: rgb(255 255 255 / 0.86);
  --focus: var(--bleu);
  --success: #2350c8;
  --error: #b3263b;
}

/* Thème nuit : fond noir (applat de la charte), titres blancs, sous-titres sable */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0d0e2b;
  --border: rgb(191 135 226 / 0.28);
  --text: #ecebf5;
  --text-soft: #b9b6d0;
  --title: #ffffff;
  --subtitle: var(--sable);
  --accent: var(--violet);
  --header-bg: rgb(0 0 0 / 0.78);
  --focus: var(--sable);
  --success: var(--sable);
  --error: var(--rose);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.container { width: min(100% - 2 * var(--gutter), 70rem); margin-inline: auto; }

/* ---------- Typographie (charte, page 10) ---------- */
.title {
  margin: 0 0 0.6rem;
  font-family: var(--font-titre);
  font-weight: 400;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--title);
  text-wrap: balance;
}

.subtitle {
  margin: 0 0 2.5rem;
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  line-height: 1.35;
  color: var(--subtitle);
}

.lead {
  max-width: 46rem;
  margin: 0 0 3rem;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
}

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section-head { text-align: center; }
.section-head .lead { margin-inline: auto; }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding-inline: var(--gutter);
  color: var(--text);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.site-header[data-state="over-hero"] {
  --focus: var(--sable);
  color: #fff;
  background: transparent;
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  text-decoration: none;
}
.brand-mark { width: 2rem; height: auto; }
.brand-name {
  font-family: var(--font-titre);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-header[data-state="solid"] .brand-name { color: var(--title); }

.brand-mark--couleur { display: none; }
:root[data-theme="light"] .site-header[data-state="solid"] .brand-mark--couleur { display: block; }
:root[data-theme="light"] .site-header[data-state="solid"] .brand-mark--blanc { display: none; }

.site-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
.site-nav a {
  padding-block: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  background: linear-gradient(currentColor 0 0) 0 100% / 0 2px no-repeat;
  transition: background-size 0.25s ease;
}
.site-nav a:hover { background-size: 100% 2px; }

.site-nav .nav-cta {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  transition: background-color 0.2s ease;
}
.site-header[data-state="over-hero"] .nav-cta {
  background: rgb(255 255 255 / 0.18);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.55);
}
.site-nav .nav-cta:hover { background: var(--bleu); }

.toggles { display: flex; gap: 0.4rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 700 0.85rem/1 var(--font-texte);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.icon-btn:hover { background: rgb(191 135 226 / 0.18); }
.site-header[data-state="over-hero"] .icon-btn { border-color: rgb(255 255 255 / 0.5); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }

.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 420px) {
  .brand-name { display: none; }
}

/* ---------- Accueil : le dégradé horizon ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(1.5rem, 4vh, 2.5rem);
  padding: calc(var(--header-h) + 2rem) var(--gutter) 6rem;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: var(--horizon);
  background-size: 100% 116%;
  background-position: 50% 50%;
  animation: houle 16s ease-in-out infinite alternate;
}

/* Léger mouvement de l'horizon, sans amener la bande sable derrière le slogan */
@keyframes houle {
  from { background-position: 50% 25%; }
  to   { background-position: 50% 75%; }
}

/* Nuit : le même horizon, au crépuscule */
:root[data-theme="dark"] .hero {
  background-image: linear-gradient(180deg, #000000 0%, #0d0e2b 22%, var(--indigo) 58%, var(--violet) 84%, var(--corail) 100%);
}

.hero-title {
  --logo-w: min(68vw, 26rem, 50svh);
  margin: 0;
  display: grid;
  justify-items: center;
  gap: calc(var(--logo-w) * 0.035);
  font-weight: 400;
}

.hero-logo {
  width: var(--logo-w);
  height: auto;
  aspect-ratio: 146 / 132;
  overflow: visible;
  filter: drop-shadow(0 0.5rem 2rem rgb(53 60 239 / 0.25));
}

/* Le slogan reprend la place et la couleur qu'il a dans le logo */
.tagline {
  font-style: italic;
  font-size: calc(var(--logo-w) * 0.056);
  line-height: 1.2;
  color: var(--sable);
  text-shadow: 0 1px 0.75rem rgb(53 60 239 / 0.45);
  white-space: nowrap;
}

.voice {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3rem;
  margin: 0;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-style: italic;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
}

.voice-text { min-width: 13ch; text-align: left; }
.voice-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: curseur 1s steps(1) infinite;
}
@keyframes curseur { 50% { opacity: 0; } }

.voice-dot {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--rose);
  animation: micro 1.6s ease-out infinite;
}
@keyframes micro {
  from { box-shadow: 0 0 0 0 rgb(255 128 137 / 0.7); }
  to   { box-shadow: 0 0 0 0.7rem rgb(255 128 137 / 0); }
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  color: #fff;
  animation: flotte 2.8s ease-in-out infinite;
}
.scroll-cue svg { width: 2.6rem; height: auto; aspect-ratio: 33 / 9; }
@keyframes flotte { 50% { transform: translateY(0.45rem); } }

/* ---------- Produit ---------- */
.promises {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise {
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-style: italic;
  font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
  line-height: 1.35;
}
.promise strong { font-weight: 700; color: var(--title); }
.promise-icon { width: 2.4rem; height: auto; aspect-ratio: 51 / 61; margin-bottom: 1.1rem; color: var(--accent); }

/* ---------- Comment ça marche ---------- */
.section--surface { background: var(--surface); }

.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 1.75rem 1.75rem 1.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.step-num {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-titre);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--indigo);
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root[data-theme="dark"] .step-num { background-image: linear-gradient(90deg, var(--violet), var(--sable)); }

/* « EXO 2 regular pour d'autres titres » */
.step h3 {
  margin: 0 0 0.5rem;
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--accent);
}
.step p { margin: 0; color: var(--text-soft); }

/* ---------- Bandeau des engagements ---------- */
.band {
  --focus: var(--sable);
  padding-block: clamp(4rem, 9vw, 6.5rem);
  color: #fff;
  text-align: center;
  background: var(--ciel);
}
:root[data-theme="dark"] .band { background: linear-gradient(rgb(0 0 0 / 0.35), rgb(0 0 0 / 0.35)), var(--ciel); }

.pillars {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.pillar {
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28);
}
.pillar h3 {
  margin: 0 0 0.4rem;
  font-weight: 700;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
  color: var(--sable);
}
.pillar p { margin: 0; color: rgb(255 255 255 / 0.92); }

/* ---------- Où en est le projet ---------- */
.projet {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  align-items: start;
}

.projet-texte p {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
}

.partenaires {
  --focus: var(--sable);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  color: #fff;
  background: var(--ciel);
}
.partenaires h3 {
  margin: 0 0 0.5rem;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem);
  color: var(--sable);
}
.partenaires p { margin: 0 0 1.5rem; color: rgb(255 255 255 / 0.94); }
.partenaires .button { background: #fff; color: var(--indigo); }
.partenaires .button:hover { background: var(--sable); }

.jalons {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}

.jalon {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--border);
}
.jalon::before {
  content: "";
  position: absolute;
  top: calc(-0.45rem - 1px);
  left: 0;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--violet);
}
/* L'étape en cours reprend le trait or → rose de la voile */
.jalon--actuel { border-image: linear-gradient(90deg, var(--or), var(--rose)) 1; }
.jalon--actuel::before { background: var(--rose); box-shadow: 0 0 0 0.35rem rgb(255 128 137 / 0.25); }

.jalon-date {
  font-family: var(--font-titre);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.jalon-titre { font-weight: 700; font-size: 1.15rem; }

.note {
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
  text-align: center;
  font-style: italic;
  color: var(--text-soft);
}
.note strong { font-style: normal; color: var(--text); }

/* ---------- Liste « Ça m'intéresse » ---------- */
.form-card {
  position: relative;
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.3);
  background: var(--bg);
  box-shadow: 0 1.5rem 4rem -2rem rgb(53 60 239 / 0.35);
}
.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--indigo), var(--bleu), var(--violet), var(--corail), var(--sable));
}

.form-grid {
  display: grid;
  gap: 1.1rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.field { display: grid; gap: 0.4rem; }
.field--wide { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.92rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 0.8rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(53 117 239 / 0.2);
}
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: var(--error); }

/* Champ piège pour les robots, invisible pour les humains */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.8rem 1.9rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo), var(--bleu), var(--indigo));
  background-size: 200% 100%;
  color: #fff;
  font: 400 0.85rem/1 var(--font-titre);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-position 0.4s ease, transform 0.15s ease, opacity 0.2s ease;
}
.button:hover { background-position: 100% 0; }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: 0.6; cursor: progress; }

.form-status { margin: 0; font-weight: 700; }
.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--error); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.2rem 0 0;
  accent-color: var(--indigo);
}

.form-note { margin: 1.5rem 0 0; font-size: 0.85rem; color: var(--text-soft); }

/* ---------- Données personnelles ---------- */
.section--compact { padding-block: clamp(3rem, 7vw, 5rem); }
.donnees { max-width: 48rem; }
.title--small { margin-bottom: 1.5rem; font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); }

.donnees-liste {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.donnees-liste strong { color: var(--text); }
.donnees-liste a,
.form-note a { color: var(--accent); text-underline-offset: 0.2em; }

/* ---------- Page de confirmation d'inscription (confirmer.php) ---------- */
.page-confirmation main { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; }
.confirmation { text-align: center; }
.confirmation-logo { width: 3rem; height: auto; margin: 0 auto 1.5rem; }
.confirmation .subtitle { margin-bottom: 2rem; }

/* ---------- Pied de page (dos de la charte) ---------- */
.site-footer {
  --focus: var(--sable);
  padding: 3.5rem var(--gutter) 2.5rem;
  color: rgb(255 255 255 / 0.92);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.7;
  background: linear-gradient(180deg, var(--bleu), var(--indigo));
}
:root[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, var(--surface), #000);
  border-top: 1px solid var(--border);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--sable); text-underline-offset: 0.2em; }
.footer-waves { width: 3.5rem; height: auto; aspect-ratio: 33 / 9; margin: 0 auto 1.25rem; color: #fff; }
.footer-site { margin-bottom: 0.75rem !important; font-weight: 700; font-size: 1.2rem; color: var(--sable); }

/* ---------- Apparition au défilement ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.delai-1 { --delay: 0.1s; }
.delai-2 { --delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
