/*
 * BAM ! — Mise en page
 * Toutes les valeurs visuelles viennent de tokens.css.
 * Principe de la DA : le fond bleu tramé (le « chaos » de la foire)
 * et des cartouches blancs nets par-dessus (la réalité claire).
 */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }   /* aucun défilement horizontal, même si un élément déborde */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--trame-bg);
  background-image: var(--trame-motif);
  background-size: var(--trame-size);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-synthesis: none;   /* jamais de faux gras : Bacalar n'a qu'une graisse */
  font-size: var(--text-md);
  line-height: var(--line-height-body);
}

/* Grain : bruit léger posé sur toute la page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.card :focus-visible, .form :focus-visible, .site-footer :focus-visible { outline-color: var(--color-focus-on-light); }
.card--dark :focus-visible { outline-color: var(--color-focus); }

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-weight: var(--font-weight-bold);
}
.skip-link:focus { top: var(--space-4); }

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

/* ---------- Éléments communs ---------- */

.label {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--color-chip);
  color: var(--color-chip-text);
  font-family: var(--font-display-sub);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  letter-spacing: var(--letter-spacing-label);
  line-height: 1.5;
  text-transform: uppercase;
}

.section { padding: var(--space-section) 0 0; scroll-margin-top: 72px; }
main > .section:last-child { padding-bottom: var(--space-section); }

.card {
  padding: var(--space-6) var(--space-4);   /* téléphone : marges réduites ; dès 768 px, celles du grand écran */
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-impact);
}
.card--dark { background: var(--color-chip); color: var(--color-text-on-dark); }

@media (min-width: 768px) { .card { padding: var(--space-8) var(--space-7); } }

.section__head { max-width: 48rem; margin-bottom: var(--space-6); }
.section__title {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-display);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.section__intro { margin-top: var(--space-4); color: var(--color-text-muted); }
.card__cta { margin-top: var(--space-6); text-align: center; }
.section--on-blue .section__head .section__title { color: var(--color-text-on-dark); }

.highlight {
  padding: 0 0.2em;
  background: var(--color-highlight);
  color: var(--color-highlight-text);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  min-height: 52px;
  padding: var(--space-3) var(--space-6);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  /* Trois bandes côte à côte (jaune | bleu foncé | jaune) dont on ne voit qu'une : au repos, celle de droite. */
  background: linear-gradient(to right, var(--color-accent) 33.34%, var(--color-accent-hover) 33.34% 66.67%, var(--color-accent) 66.67%) right / 300% 100% no-repeat;
  color: var(--color-accent-text);
  font-family: var(--font-display-sub);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-display);
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition);
}
/* Au survol, le bleu entre par la gauche et pousse le jaune, puis, aussitôt après, le jaune entre à son tour par la gauche
   et pousse le bleu, même si le pointeur reste dessus. Les bandes défilent toujours dans le même sens, sans retour en arrière. */
@media (prefers-reduced-motion: no-preference) {
  .button:not([disabled]):hover, .button:not([disabled]):focus-visible { animation: button-push var(--duration-button) cubic-bezier(0.65, 0, 0.35, 1) both; }
}
@keyframes button-push {
  0% { background-position: right; color: var(--color-accent-text); }
  /* le texte est blanc seulement quand le bleu couvre le bouton (milieu du parcours) */
  41% { color: var(--color-accent-text); }
  45%, 55% { color: var(--color-accent-hover-text); }
  59% { color: var(--color-accent-text); }
  100% { background-position: left; color: var(--color-accent-text); }
}
.button[disabled] { opacity: 0.6; cursor: progress; }
.button--small { min-height: 40px; padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
@media (prefers-reduced-motion: reduce) { .button, .button:hover { transition: none; } .button:not([disabled]):hover { filter: brightness(0.94); } }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-chip);
  color: var(--color-text-on-dark);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; }
.wordmark { display: inline-flex; color: inherit; text-decoration: none; }
.wordmark { align-items: flex-end; gap: var(--space-2); }
.wordmark svg { display: block; width: auto; height: 26px; }
/* « La conférence » : rectangle blanc juste après « BAM ! », comme l'étiquette du logo */
.wordmark__tag {
  padding: 0.2em 0.55em;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-display-sub);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav { display: none; gap: var(--space-6); font-size: var(--text-sm); font-weight: var(--font-weight-bold); }
.site-nav a { text-decoration: none; }
.site-nav a { padding-block: var(--space-1); border-bottom: 2px solid transparent; transition: color var(--transition), border-color var(--transition); }
.site-nav a:hover { color: var(--color-accent); }
/* Section en cours de lecture (posé par interactions.js) */
.site-nav a[aria-current="true"] { color: var(--color-accent); border-bottom-color: var(--color-accent); }
/* Fine barre de progression de lecture sous l'en-tête */
.progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--color-accent); transform: scaleX(var(--progress, 0)); transform-origin: left; pointer-events: none; }
@media (min-width: 900px) { .site-nav { display: flex; } }
/* Téléphone : « BAM ! La conférence » et le bouton restent sur une seule ligne, quelle que soit la largeur de la police
   (Adobe, plus large que la police de secours) : tailles proportionnelles à l'écran et marges latérales réduites à 16 px. */
.site-header .button--small { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 479px) {
  .site-header__inner { gap: var(--space-2); padding-inline: var(--space-4); }
  .wordmark { gap: 1.6vw; min-width: 0; }
  .wordmark svg { height: 5.3vw; }
  .wordmark__tag { padding: 0.2em 0.4em; font-size: 2.7vw; letter-spacing: 0; }
  .site-header .button--small { padding: var(--space-2) 2.7vw; font-size: 2.9vw; min-height: 36px; }
}

/* ---------- Hero : vidéo + cartouche ---------- */
/* La vidéo (chamboule-tout) n'a plus de titre : « BAM! La conférence » est un bloc blanc en HTML posé par-dessus,
   comme une affiche collée. Il (et le cartouche) apparaît d'un coup, sans fondu. Le h1 reste dans le HTML pour les
   lecteurs d'écran. Le cartouche blanc ne garde que la question et le bouton. */

.hero { position: relative; overflow-x: clip; --gutter: 10.2%; }   /* la vidéo n'est pas plafonnée : le cartouche suit le cadre du titre, à 10,2 % de la largeur de l'écran */
.hero__media { position: relative; }
.hero__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--trame-bg);
}
/* Bloc titre : logo à l'identique (BAM! + étiquette), signature sur toute la largeur du logo */
.hero__title {
  position: absolute;
  left: var(--title-x);
  top: var(--title-y);
  width: var(--title-w);
  height: var(--title-h);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 calc(var(--title-w) * 0.054) 0 calc(var(--title-w) * 0.063);   /* marges du cadre incrusté dans la vidéo, en % de sa largeur */
  background: var(--color-surface);
  border-radius: 1vw;
}
.hero__logo { width: 100%; height: auto; }
/* La signature (SVG) a la largeur exacte du logo, sans point final : le texte est étiré à 837 unités, la largeur du logo */
.hero__tagline { display: block; width: 100%; height: auto; margin-top: 2.4%; overflow: hidden; }
.hero__tagline text { fill: var(--color-text); font-family: var(--font-body); font-weight: var(--font-weight-light); font-size: 50px; }
/* Sur ordinateur, le titre attend que celui de la vidéo se pose (attribut posé par hero-video.js) */
.hero[data-title="waiting"] .hero__title { visibility: hidden; }

/* ---------- Bandeau défilant : séparation nette entre la vidéo et la trame ---------- */
.ticker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: var(--ticker-height);
  overflow: hidden;
  background: var(--color-chip);
  color: var(--color-chip-text);
  font-family: var(--font-display-sub);
  font-size: var(--text-md);
  font-weight: var(--font-weight-display);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  white-space: nowrap;
}
.ticker__track { display: flex; width: max-content; animation: ticker var(--ticker-duration) linear infinite; }
.ticker__group { display: flex; flex-shrink: 0; align-items: center; margin: 0; }
.ticker__group > span { display: inline-flex; align-items: center; }
.ticker__group > span::after { content: "!"; margin: 0 var(--space-5); color: var(--color-accent); }
@keyframes ticker { to { transform: translateX(-50%); } }
/* Interactif : le bandeau s'arrête sous le pointeur (ou au toucher), pour lire tranquillement */
.ticker:hover .ticker__track, .ticker:active .ticker__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }
.hero__toggle {
  position: absolute;
  right: 10.2%;   /* même marge que --gutter */
  bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: var(--border-width) solid var(--color-surface);
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  color: var(--color-chip-text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.hero__toggle[hidden] { display: none; }   /* sur mobile, pas de vidéo donc pas de bouton */
.hero__toggle:hover { background: var(--color-accent); color: var(--color-accent-text); }
.hero__toggle svg { width: 18px; height: 18px; fill: currentColor; }
.hero__toggle .icon-play,
.hero__toggle[data-state="paused"] .icon-pause { display: none; }
.hero__toggle[data-state="paused"] .icon-play { display: block; }

/* Le bandeau est toujours collé au bas de la vidéo (demande customR 28/10). Dès 900 px, le cartouche est posé sur la vidéo,
   sous le cadre du titre, sur toute la largeur du contenu (laptop compris : plus il est large, moins il est haut) ; il tient
   sur la vidéo. Sous 900 px, la vidéo est trop basse pour le contenir : il passe sous le bandeau. */
.hero { container-type: inline-size; }
.hero__inner {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--space-4) - var(--hero-ratio) * (1 - var(--title-bottom)) * 100cqw);
  min-height: calc(var(--hero-ratio) * (1 - var(--title-bottom)) * 100cqw - var(--space-4));   /* au moins jusqu'au bas de la vidéo */
  padding-bottom: var(--space-5);
}
.hero__inner .cartouche { max-width: none; }
.hero__toggle { top: var(--space-4); bottom: auto; }   /* en haut à droite : le cartouche occupe le bas de la vidéo */
@media (max-width: 899px) {
  .hero { display: flex; flex-direction: column; }
  .hero__media { order: 0; }
  .ticker { order: 1; }
  .hero__inner { order: 2; margin-top: 0; min-height: 0; padding-top: var(--space-4); padding-bottom: var(--space-5); }
}
/* De 900 à 1199 px, le cartouche est large : le texte à gauche, le bouton à droite, pour rester bas et tenir sur la vidéo */
@media (min-width: 900px) and (max-width: 1199px) {
  .hero__inner { padding-bottom: 0; }
  .hero__body { grid-template-columns: 1fr auto; column-gap: var(--space-6); align-items: center; justify-items: stretch; }
  .hero__body > p { grid-column: 1; }
  .hero__body .button { grid-column: 2; grid-row: 1 / span 2; }
}
/* Sur laptop (dès 1200 px), il est plus étroit, aligné sur le bord gauche du cadre du titre, et il ne couvre pas toute la vidéo */
@media (min-width: 1200px) {
  .hero__inner { padding-bottom: 0; }
  .hero__inner .cartouche { max-width: 26rem; }
}

.cartouche {
  position: relative;
  isolation: isolate;
  max-width: 26rem;
  padding: var(--space-5);
}
/* Fond blanc du cartouche */
.cartouche::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}
.hero__body { display: grid; gap: var(--space-4); justify-items: center; }
.hero__body > p { justify-self: stretch; }
/* Le cartouche attend que le bloc titre se pose sur la vidéo (vers 1,5 s) (attribut posé par hero-video.js ;
   sans JavaScript, il est visible d'emblée). La place reste réservée : rien ne bouge à l'apparition. */
.hero[data-cartouche="waiting"] .cartouche { visibility: hidden; }
.hero__question { font-size: var(--text-md); font-weight: var(--font-weight-bold); line-height: 1.5; }
.hero__date { font-size: var(--text-sm); line-height: 1.5; }
.hero .button { min-height: 46px; padding: var(--space-2) var(--space-5); }

/* ---------- Manifeste ---------- */

.manifesto { display: grid; gap: var(--space-5); }
.manifesto .section__title { margin-top: 0; line-height: 1.3; }
/* Titre et intro à gauche, suite du texte à droite ; une seule colonne sur téléphone et tablette */
.manifesto__cols { display: grid; gap: var(--space-6); }
@media (min-width: 1000px) { .manifesto__cols { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.manifesto__col { display: grid; gap: var(--space-4); align-content: start; color: var(--color-text-muted); }
.manifesto__col .section__title { color: var(--color-text); }
.manifesto__punch { font-family: var(--font-display-sub); font-size: var(--text-lg); text-transform: uppercase; font-weight: var(--font-weight-display); line-height: 1.6; color: var(--color-text); }

/* ---------- Programme ---------- */

.agenda { list-style: none; margin: 0; padding: 0; border-top: var(--border-width) solid var(--color-border); }
.agenda__item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border-soft);
}
.agenda__item { transition: background-color var(--transition), box-shadow var(--transition); }
.agenda__time { transition: background-color var(--transition), color var(--transition); }
.agenda__item:hover { background-color: #F6F6F6; box-shadow: -1rem 0 0 #F6F6F6, 1rem 0 0 #F6F6F6; }
.agenda__item:hover .agenda__time { background: var(--color-accent); color: var(--color-accent-text); }
.agenda__item:last-child { border-bottom: var(--border-width) solid var(--color-border); }
@media (min-width: 768px) { .agenda__item { grid-template-columns: 8rem 1fr; gap: var(--space-6); align-items: baseline; } }
.agenda__time {
  justify-self: start;
  padding: var(--space-1) var(--space-3);
  background: var(--color-chip);
  color: var(--color-chip-text);
  font-family: var(--font-display-sub);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-display);
}
.agenda__content { display: grid; gap: var(--space-2); }
.agenda__title { font-family: var(--font-display-sub); font-size: var(--text-lg); text-transform: uppercase; font-weight: var(--font-weight-display); line-height: 1.3; }
.agenda__kind {
  display: inline-block;
  margin-right: var(--space-2);
  padding: 0 var(--space-2);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-size: var(--text-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  vertical-align: 0.2em;
}
.agenda__speaker { font-weight: var(--font-weight-bold); color: var(--color-text-muted); }
.agenda__summary { max-width: 46rem; font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- Intervenants ---------- */

.speakers { display: grid; gap: var(--space-6); }
@media (min-width: 600px) { .speakers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .speakers { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); } }

.speaker {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.speaker__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: var(--image-filter); }
.speaker__media { overflow: hidden; border-bottom: var(--border-width) solid var(--color-border); }
.speaker__body { display: grid; gap: var(--space-3); padding: var(--space-5); flex: 1; align-content: start; justify-items: start; }
.speaker__num {
  padding: var(--space-1) var(--space-3);
  background: var(--color-chip);
  color: var(--color-chip-text);
  font-family: var(--font-display-sub);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
}
.speaker__name { font-family: var(--font-display-sub); font-size: var(--text-lg); text-transform: uppercase; font-weight: var(--font-weight-display); line-height: 1.2; }
@media (min-width: 1000px) { .speaker__name { font-size: var(--text-md); } }
.speaker__role { margin-top: var(--space-1); font-size: var(--text-sm); color: var(--color-text-muted); }
.speaker__talk { font-weight: var(--font-weight-bold); line-height: 1.4; }
.speaker__talk::before { content: "« "; }
.speaker__talk::after { content: " »"; }
.speaker__bio { font-size: var(--text-sm); color: var(--color-text-muted); }
.speaker__logo {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 var(--space-5);
  border-top: 1px solid var(--color-border-soft);
}
/* Logos à taille visuelle égale : même surface, hauteur ajustée à la forme de chaque logo */
.logo { width: auto; height: var(--logo-h); filter: var(--logo-filter); transition: opacity var(--transition); }
/* Le PNG d'Elao est corail : en niveaux de gris il reste trop clair, on l'assombrit pour l'aligner sur les autres */
.logo--elao { --logo-h: 34px; filter: var(--logo-filter) brightness(0.35); }
.logo--little-bird { --logo-h: 34px; }
.logo--novius { --logo-h: 30px; }
.logo--customr { --logo-h: 23px; }
.logo--rix { --logo-h: 38px; }
a.speaker__logo:hover img, .partners a:hover img { opacity: 0.7; }
/* Toute la carte est cliquable : le lien du logo s'étend sur l'ensemble du profil */
.speaker { cursor: pointer; }
.speaker__logo::after { content: ""; position: absolute; inset: 0; }
.speaker__logo:focus-visible { outline: none; }
.speaker:has(.speaker__logo:focus-visible), .speaker:has(.speaker__logo-link:first-child:focus-visible) { outline: 3px solid var(--color-focus-on-light); outline-offset: 3px; }
/* Deux logos (Elao et Rix) : le premier étend son lien sur la carte, le second reste cliquable par-dessus */
.speaker__logo--duo { flex-wrap: wrap; gap: var(--space-2) var(--space-3); height: auto; min-height: 64px; padding: var(--space-3) var(--space-4); }
.speaker__logo--duo .logo--elao { --logo-h: 25px; }
.speaker__logo--duo .logo--rix { --logo-h: 28px; }
.speaker__logo--duo::after { content: none; }
.speaker__logo-link { flex: none; }
.speaker__logo-link:first-child::after { content: ""; position: absolute; inset: 0; }
.speaker__logo-link:first-child:focus-visible { outline: none; }
.speaker__logo-link--rix { position: relative; z-index: 1; }
.speaker__logo-link:hover img { opacity: 0.7; }

/* ---------- Infos pratiques (bloc noir) ---------- */

.card--dark .label { background: transparent; padding: 0; color: var(--color-label-on-dark); }
.card--dark .section__title { margin-top: 0; color: var(--color-label-on-dark); }
.practical { display: grid; gap: var(--space-6); }
.practical__item { display: grid; gap: var(--space-1); align-content: start; }
.practical__value { font-family: var(--font-display-sub); font-size: var(--text-xl); text-transform: uppercase; font-weight: var(--font-weight-display); line-height: 1.3; }
.practical__detail { font-size: var(--text-sm); }
.access { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .access { grid-template-columns: repeat(3, 1fr); } }
.access__item { display: grid; gap: var(--space-3); align-content: start; }
.access__title {
  font-family: var(--font-display-sub);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-display);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-label-on-dark);
}
.access__list { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-1); }

/* ---------- Inscription ---------- */

.register { display: grid; gap: var(--space-6); }
/* Deux colonnes dès la tablette (768 px) ; sur tablette, le formulaire est étroit : marges réduites et champs l'un sous l'autre */
@media (min-width: 768px) { .register { grid-template-columns: 5fr 7fr; gap: var(--space-6); align-items: start; } }
@media (min-width: 1000px) { .register { gap: var(--space-8); } }
.register__aside { display: grid; gap: var(--space-4); align-content: start; justify-items: start; }
.register__aside .section__title { margin-top: 0; }
.register__aside > p:not(.label) { font-size: var(--text-lg); }

.notice {
  padding: var(--space-4) var(--space-5);
  background: var(--color-accent);
  color: var(--color-accent-text);
  border: var(--border-width) solid var(--color-border);
  font-size: var(--text-sm);
}
.notice[hidden] { display: none; }

.form {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);   /* le formulaire se détache de la carte blanche qui le contient */
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-impact);
}
@media (min-width: 768px) { .form { padding: var(--space-5); } }
@media (min-width: 1000px) { .form { padding: var(--space-7); } }
.form[hidden] { display: none; }

.form__row { display: grid; gap: var(--space-5); }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) and (max-width: 999px) { .form__row { grid-template-columns: 1fr; } }

.field { display: grid; gap: var(--space-2); align-content: start; }
.field label, .field legend { font-size: var(--text-sm); font-weight: var(--font-weight-bold); }
.required { color: var(--color-error); }
.form__required-note { font-size: var(--text-xs); color: var(--color-text-muted); }
.form__required-note span { color: var(--color-error); font-weight: var(--font-weight-bold); }
.field .optional { font-weight: var(--font-weight-regular); color: var(--color-text-muted); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  min-height: 50px;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}
@media (max-width: 767px) { .field input[type="text"], .field input[type="email"], .field input[type="tel"] { font-size: 16px; } }
.field input:focus-visible { outline: 3px solid var(--color-focus-on-light); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--color-error); }
.field__error { font-size: var(--text-xs); font-weight: var(--font-weight-bold); color: var(--color-error); }
.field__error:empty { display: none; }

.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-sm); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--color-chip); }

.form .button { justify-self: center; }
.form__legal { font-size: var(--text-xs); color: var(--color-text-muted); }
.form__status { font-size: var(--text-sm); }
.form__status:empty { display: none; }
.form__status--error { color: var(--color-error); font-weight: var(--font-weight-bold); }

.honeypot { position: absolute; left: -5000px; }

.success { display: grid; gap: var(--space-4); }
.success[hidden] { display: none; }
.success__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-display);
  line-height: var(--line-height-tight);
  text-transform: uppercase;
}

.share {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-text);
}
.share__title { font-weight: var(--font-weight-bold); }
.share .button { justify-self: start; }

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

.site-footer { padding: var(--space-7) 0 var(--space-6); background: var(--color-surface); }
.partners { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) var(--space-7); margin-top: var(--space-5); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Lueur qui suit le pointeur sur la trame : elle éclaire les « ! » comme un écran LED. Souris uniquement.
   Posée sous le contenu (les cartouches restent nets), invisible tant que le pointeur n'a pas bougé. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle var(--glow-size) at var(--mx, 50%) var(--my, 50%), var(--glow-color), transparent 70%);
    mix-blend-mode: screen;
    transition: opacity 600ms ease;
  }
  .has-pointer body::before { opacity: 1; }
  main, .site-footer { position: relative; z-index: 1; }
}

/* ---------- Animations ---------- */
/* Désactivées si le visiteur a demandé moins d'animations. Les apparitions au
   défilement n'existent qu'avec JavaScript (classe .js sur <html>) : sans lui,
   tout le contenu reste visible. */

@media (prefers-reduced-motion: no-preference) {

  /* Hero : « coup de tampon » comme dans l'ancienne vidéo (mesuré image par image) : le bloc blanc arrive en gros plan
     (~×3,5, ancré vers le bas droit du bloc), descend vite, puis se pose avec un très léger rebond (transition continue : le pas
     à pas de l'image unique de la vidéo faisait « robotique » dans le navigateur).
     Le titre s'anime dès qu'il est révélé ; le cartouche aussi (dès 900 px, là où il est posé sur la vidéo), à une échelle
     plus faible (il est plus petit : ×3,5 couvrirait la vidéo). Pas de fondu. */
  @media (min-width: 768px) {
    .hero:not([data-title="waiting"]) .hero__title { animation: bam-stamp var(--duration-stamp) var(--ease-stamp) both; }
  }
  @media (min-width: 900px) {
    .hero:not([data-cartouche="waiting"]) .cartouche { animation: bam-stamp var(--duration-stamp) var(--ease-stamp) both; }
  }
  @keyframes bam-stamp {
    from { transform: scale(var(--stamp-scale)); }
    80% { transform: scale(0.975); animation-timing-function: ease-out; }   /* léger rebond en se posant, vif : dernier cinquième seulement */
    to { transform: none; }
  }
  .hero__title, .cartouche { transform-origin: 82% 96%; }
  .cartouche { --stamp-scale: var(--stamp-scale-cartouche); }

  /* Apparition au défilement */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }

  /* Le surlignage bleu foncé (« Et Bam, », la date du programme) se déroule à l'apparition */
  .js .highlight {
    background-image: linear-gradient(var(--color-highlight), var(--color-highlight));
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: 0% 100%;
    color: var(--color-text);
    transition: background-size 700ms var(--ease-out) 350ms, color 200ms ease 550ms;
  }
  .js .is-visible .highlight { background-size: 100% 100%; color: var(--color-highlight-text); }

  /* Cartes intervenants : elles se soulèvent au survol */
  .speaker { transition: transform var(--transition), box-shadow var(--transition); }
  .speaker:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-impact); }
  .speaker__photo { transition: transform 400ms var(--ease-out); }
  .speaker:hover .speaker__photo { transform: scale(1.04); }

  /* Les boutons se soulèvent très légèrement au survol */
  .button:hover:not([disabled]) { transform: translateY(-2px); }
}

/* ---------- Page légale ---------- */

.legal { max-width: 46rem; display: grid; gap: var(--space-5); }
.legal h2 { font-size: var(--text-lg); margin-top: var(--space-5); }
.legal p, .legal li { color: var(--color-text-muted); }
.todo { background: var(--color-accent); padding: 0 var(--space-1); }
