/* ==========================================================================
   Alibi — Desktop (référence 1440 px) · Guide d’intégration V3
   ========================================================================== */

:root {
  /* couleurs */
  --color-navy:       #2A1F5E;
  --color-accent:     #F853AA;
  --color-violet:     #712C9B;
  --color-lilac:      #F3EDFB;
  --color-text:       #F5F0FA;
  --color-ink-muted:  #5E5390;
  --color-label:      #D6CEF5;
  --color-line-light: #E2D8F5;
  --color-legal:      #E3E6FA;
  --color-text-muted: #A79BB8;
  --color-counter-end:#5B2A86;
  --color-white:      #FFFFFF;

  /* dégradés */
  --gradient-cta: linear-gradient(90deg, #2D44C6 0%, #C253B3 55%, #F853AA 100%);

  /* typo */
  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --text-display-xxl: 136px;
  --text-5xl: 80px;
  --text-4xl: 56px;
  --text-2xl: 32px;
  --text-xl: 22px;
  --text-lg: 18px;
  --text-base: 16px;
  --text-sm: 14px;
  --text-xs: 13px;

  /* espaces */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 120px;

  /* rayons */
  --radius-xs: 6px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --blur-card: 10px;

  /* alpha utiles */
  --text-a12: rgb(245 240 250 / 0.12);
  --text-a15: rgb(245 240 250 / 0.15);
  --text-a18: rgb(245 240 250 / 0.18);
  --text-a20: rgb(245 240 250 / 0.20);
  --text-a25: rgb(245 240 250 / 0.25);
  --text-a30: rgb(245 240 250 / 0.30);

  --transition: 150ms ease;
}

@supports (background: linear-gradient(90deg in oklab, red, blue)) {
  :root {
    --gradient-cta: linear-gradient(90deg in oklab, #2D44C6 0%, #C253B3 55%, #F853AA 100%);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-lilac);
  color: var(--color-navy);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.accent { color: var(--color-accent); }

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}
.site-header :focus-visible { outline-color: var(--color-navy); }
/* Titres qui reçoivent le focus par script (annonce aux lecteurs d’écran) : pas d’anneau */
[tabindex="-1"]:focus { outline: none; }

/* --------------------------------------------------------------------------
   Typo
   -------------------------------------------------------------------------- */
.h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-5xl);
  line-height: 88px;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-4xl);
  line-height: 64px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-2xl);
  line-height: 40px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.surtitre {
  font-size: var(--text-sm);
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.accroche {
  font-size: var(--text-xl);
  line-height: 30px;
  font-weight: 600;
}
.accroche--chute { font-weight: 700; }

/* --------------------------------------------------------------------------
   Placeholders
   -------------------------------------------------------------------------- */
.img-placeholder {
  position: absolute;
  inset: 0;
  background: var(--color-ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 300ms ease;
}
.img-placeholder span {
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-label);
}

.site-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.site-brand__tagline {
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}
.site-logo {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
}
.site-logo img {
  display: block;
  height: 42px;
  width: auto;
}

.logo-placeholder {
  width: 124px;
  height: 42px;
  border: 1px dashed var(--color-ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  text-decoration: none;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: filter var(--transition), background-color var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn .icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn--primary {
  height: 56px;
  padding: 18px 36px;
  background-color: var(--color-accent);
  background-image: var(--gradient-cta);
  color: var(--color-white);
  font-weight: 700;
}
.btn--primary:hover { filter: brightness(1.08); }
.btn--hero { padding: 18px 32px; }

.btn--secondary {
  height: 58px;
  padding: 18px 28px;
  background: transparent;
  border: 1px solid var(--text-a30);
  color: var(--color-text);
  font-weight: 600;
}
.btn--secondary:hover { background-color: var(--text-a12); }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge-hero {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--color-white);
  border-radius: var(--radius-pill);
  background: rgb(113 44 155 / 0.6);
  color: var(--color-white);
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-date {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  background: var(--color-lilac);
  border: 1px solid var(--color-line-light);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-navy);
}
.badge-date__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* --------------------------------------------------------------------------
   1 · En-tête (90 px)
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--color-white);
  padding: 14px var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
}
.site-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.lang-switch {
  /* Centré sur les cases du compte à rebours (sous l’étiquette) */
  align-self: flex-end;
  margin-bottom: 8px;
  padding: var(--space-1) 0;
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-navy);
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.lang-switch:hover { text-decoration-line: underline; }
.header-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.header-countdown__label {
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

/* Compte à rebours de l’en-tête : composant F du guide, réduit pour tenir dans 90 px */
.countdown--compact .countdown__cell {
  width: auto;
  min-width: 58px;
  padding: 7px 10px;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  /* Sur fond blanc, le violet à 85 % paraît délavé : teinte pleine */
  background: var(--color-violet);
}
.countdown--compact .countdown__num {
  font-size: 24px;
  line-height: 24px;
}
.countdown--compact .countdown__unit {
  font-size: 11px;
  line-height: 12px;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   2 · Hero (704 px)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-navy);
  color: var(--color-text);
  padding: var(--space-9) var(--space-8);
  min-height: 704px;
}
.hero__img {
  position: absolute;
  inset: 0 0 0 320px;
}
.hero__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgb(42 31 94 / 1) 0%,
    rgb(42 31 94 / 1) 22%,
    rgb(42 31 94 / 0.8) 34%,
    rgb(42 31 94 / 0) 58%);
}
.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero__title {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-5xl);
  line-height: 88px;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--color-text);
}
.hero__title span { display: block; }
.hero__lede {
  margin-top: 28px;
  max-width: 480px;
  font-size: var(--text-lg);
  line-height: 22px;
  font-weight: 500;
}
.hero .btn { margin-top: 36px; }
.hero__mention {
  margin-top: 18px;
  font-size: var(--text-sm);
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-label);
}

/* --------------------------------------------------------------------------
   3 · Compte à rebours (759 px)
   -------------------------------------------------------------------------- */
.countdown-section {
  position: relative;
  overflow: hidden;
  background: var(--color-navy);
  color: var(--color-text);
  padding: var(--space-10) var(--space-8) var(--space-9);
}
.countdown-section__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 50% 50%,
      rgb(42 31 94 / 0.8) 0%,
      rgb(42 31 94 / 0.5) 55%,
      rgb(42 31 94 / 0) 100%),
    rgb(42 31 94 / 0.35);
}
.countdown-section__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.countdown-section .h2 { max-width: 760px; }
.countdown-section__text {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.countdown-section__text .accroche--chute { margin-top: -12px; }

.countdown {
  display: flex;
  gap: 3px;
  border-top: 3px solid var(--color-accent);
}
.countdown__cell {
  width: 120px;
  padding: 14px 0 12px;
  background: rgb(113 44 155 / 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0;
}
.countdown__num {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  line-height: 56px;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.countdown__num--accent { color: var(--color-accent); }
.countdown__unit {
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-label);
}

/* --------------------------------------------------------------------------
   4 · Générateur (780 px)
   -------------------------------------------------------------------------- */
.generator {
  position: relative;
  overflow: hidden;
  background: var(--color-navy);
  color: var(--color-text);
  padding: var(--space-10);
  scroll-margin-top: 0;
}
/* Plus d’air sous la carte avant la section compteur */
.generator { padding-bottom: 200px; }
.generator--result { padding-bottom: var(--space-9); }

/* Images d’étape empilées ; seule .is-active est visible (fondu enchaîné) */
.generator__img {
  position: absolute;
  inset: 0;
  background: var(--color-navy);
}
.generator__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  opacity: 0;
  transition: opacity 600ms ease;
}
.generator__img img.is-active { opacity: 1; }
.generator__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgb(42 31 94 / 1) 0%,
    rgb(42 31 94 / 0.7) 18%,
    rgb(42 31 94 / 0.45) 70%,
    rgb(42 31 94 / 1) 100%);
}
.generator__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.generator__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: var(--space-6);
}

.gen-card {
  width: 600px;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: rgb(42 31 94 / 0.7);
  -webkit-backdrop-filter: blur(var(--blur-card));
  backdrop-filter: blur(var(--blur-card));
  border: 1px solid var(--text-a18);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  transition: opacity 300ms ease;
}
/* Écran résultat : carte large et basse, calée en bas de la section, pour que
   l’image piscine reste plein cadre et que les personnages restent visibles */
.generator--result .generator__content { min-height: 600px; }
.generator--result .gen-card {
  margin-top: auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: var(--space-7);
  align-items: start;
}
.gen-card__main,
.gen-card__side {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.gen-card__side {
  border-left: 1px solid var(--text-a18);
  padding-left: var(--space-7);
}
.gen-card__main .alibi-text { max-width: 720px; }
.gen-card__side .btn { width: 100%; }
.gen-card__side .share { border-top: 0; padding-top: 0; }
/* Hauteur commune aux 4 étapes (= la plus haute, mesurée par app.js) : la page ne
   bouge pas d’une étape à l’autre et les boutons restent au même endroit */
.gen-card:not(.gen-card--result) { min-height: var(--step-min-h, 452px); }
.gen-card:not(.gen-card--result) > .actions {
  margin-top: auto;
  min-height: 58px; /* hauteur du bouton Retour, même s’il est absent (étape 1) */
  align-items: center;
}
.gen-card.is-fading { opacity: 0; }

.gen-card__block { display: flex; flex-direction: column; gap: var(--space-5); }

/* E · Progression */
.progress { display: flex; flex-direction: column; gap: var(--space-3); }
.progress__bar {
  width: 240px;
  display: flex;
  gap: 6px;
}
.progress__seg {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--text-a20);
}
.progress__seg.is-done { background: var(--color-accent); }

/* C · Pastilles de choix */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.choice {
  height: 44px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--text-a15);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition);
}
.choice:hover { background: var(--text-a25); }
.choice[aria-checked="true"] {
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
}

.actions { display: flex; gap: var(--space-3); }

/* G · Texte d’alibi et partage */
.result-meta {
  font-size: var(--text-sm);
  line-height: 20px;
  color: var(--color-label);
}
.alibi-text {
  border-left: 3px solid var(--color-accent);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.alibi-text p {
  font-size: var(--text-lg);
  line-height: 28px;
  font-weight: 400;
}
.share {
  border-top: 1px solid var(--text-a18);
  padding-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.share__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.share__btn {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--text-a12);
  border: 1px solid var(--text-a20);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition);
}
.share__btn:hover { background: var(--text-a20); }
.share__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   5 · Compteur (592 px)
   -------------------------------------------------------------------------- */
.counter-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy) 45%, var(--color-counter-end) 100%);
  color: var(--color-text);
  padding: var(--space-10);
  display: flex;
  justify-content: center;
}
.counter-section__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.counter-section__veil {
  position: absolute;
  inset: 0;
  background:
    /* Fondu depuis la section du dessus : évite la coupure franche */
    linear-gradient(180deg, rgb(42 31 94 / 1) 0%, rgb(42 31 94 / 0) 22%),
    radial-gradient(ellipse 40% 65% at 50% 50%,
      rgb(42 31 94 / 0.95) 0%,
      rgb(42 31 94 / 0.8) 50%,
      rgb(42 31 94 / 0.4) 100%);
}
.counter-section__stack {
  position: relative;
  width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.counter-section__title { max-width: 520px; line-height: 64px; }

.live {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}
.live__indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.live__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-white);
  animation: pulse 1.6s ease-in-out infinite;
}
.live__num {
  font-family: var(--font-display);
  font-size: var(--text-display-xxl);
  line-height: 136px;
  letter-spacing: -0.01em;
  color: var(--color-white);
  font-variant-numeric: tabular-nums;
}
.live__label {
  font-size: var(--text-base);
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --------------------------------------------------------------------------
   6 · Pied de page 
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy);
  border-top: 1px solid var(--text-a12);
  padding: 28px var(--space-8) 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-7);
}
.site-footer__legal {
  max-width: 760px;
  font-size: var(--text-xs);
  line-height: 18px;
  font-weight: 400;
  color: var(--color-legal);
}
.site-footer__heading {
  margin: 0 0 var(--space-1);
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.site-footer__legal p + .site-footer__heading { margin-top: var(--space-4); }
.site-footer__right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.site-footer__idea {
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.footer-logo {
  height: 32px;
  padding: 6px 12px;
  background: var(--color-white);
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}
.footer-logo img {
  display: block;
  height: 20px;
  width: auto;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Portable étroit / tablette paysage */
@media (max-width: 1180px) {
  .site-header { padding-inline: var(--space-7); }
  .hero { padding-inline: var(--space-7); }
  .hero__img { left: 0; }
  .hero__veil {
    background: linear-gradient(90deg,
      rgb(42 31 94 / 1) 0%,
      rgb(42 31 94 / 0.9) 30%,
      rgb(42 31 94 / 0.4) 55%,
      rgb(42 31 94 / 0) 75%);
  }
  .generator { padding-inline: var(--space-7); }
  .generator--result .gen-card { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); }
  .gen-card__side { padding-left: var(--space-6); }
  .counter-section { padding-inline: var(--space-7); }
  .site-footer { padding-inline: var(--space-7); }
}

/* Tablette portrait et mobile : l’image passe en bandeau au-dessus du contenu */
@media (max-width: 900px) {
  .h1 { font-size: clamp(40px, 9vw, 64px); line-height: 1.1; }
  .h2 { font-size: clamp(34px, 7vw, 48px); line-height: 1.15; }
  .h3 { font-size: 26px; line-height: 32px; }

  /* Hero */
  .hero {
    min-height: 0;
    padding: 0 var(--space-6) var(--space-8);
  }
  .hero__img {
    position: relative;
    inset: auto;
    display: block;
    margin-inline: calc(-1 * var(--space-6));
    aspect-ratio: 4 / 3;
    max-height: 560px;
  }
  .hero__img img { object-position: 50% 30%; }
  .hero__veil {
    inset: 0 0 auto 0;
    height: min(75vw, 560px);
    background: linear-gradient(180deg,
      rgb(42 31 94 / 0) 45%,
      rgb(42 31 94 / 1) 100%);
  }
  .hero__content { margin-top: calc(-1 * var(--space-8)); }
  .hero__title {
    margin-top: var(--space-5);
    font-size: clamp(40px, 11vw, 72px);
    line-height: 1.08;
  }
  .hero__lede { margin-top: var(--space-5); font-size: var(--text-base); line-height: 24px; }
  .hero .btn { margin-top: var(--space-6); }

  /* Générateur */
  .generator,
  .generator--result {
    padding: calc(min(56vw, 480px) - 72px) var(--space-6) var(--space-9);
  }
  .generator__img { inset: 0 0 auto 0; height: min(56vw, 480px); }
  .generator__img img,
  .generator__img img[data-gen-img] { object-position: 70% 50%; }
  .generator__veil {
    background: linear-gradient(180deg,
      rgb(42 31 94 / 0.3) 0,
      rgb(42 31 94 / 0) min(15vw, 120px),
      rgb(42 31 94 / 0.6) min(42vw, 360px),
      rgb(42 31 94 / 1) min(56vw, 480px));
  }
  .generator__content { align-items: stretch; }
  .generator--result .generator__content { min-height: 0; }
  .gen-card { width: 100%; max-width: 600px; }
  .generator--result .gen-card {
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }
  .gen-card__side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--text-a18);
    padding-top: var(--space-6);
  }

  /* Compteur */
  .counter-section { padding: var(--space-9) var(--space-6); }
  .counter-section__stack { width: 100%; }
  .counter-section__title { line-height: 1.15; }
  .live__num { font-size: clamp(80px, 20vw, 136px); line-height: 1; }
  .counter-section__veil {
    background:
      linear-gradient(180deg, rgb(42 31 94 / 1) 0%, rgb(42 31 94 / 0) 22%),
      rgb(42 31 94 / 0.55);
  }

  /* Pied de page */
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
    padding: var(--space-6);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .site-header {
    padding: 10px var(--space-4);
    min-height: 64px;
    gap: var(--space-3);
  }
  .site-logo img { height: 28px; }
  .site-brand { gap: 4px; }
  .site-brand__tagline { font-size: 9px; line-height: 11px; letter-spacing: 0.06em; }
  .header-countdown__label { display: none; }
  .site-header__right { align-items: center; gap: var(--space-2); }
  .lang-switch { font-size: 13px; align-self: center; margin-bottom: 0; }
  .countdown--compact { gap: 2px; border-top-width: 2px; }
  .countdown--compact .countdown__cell { min-width: 0; padding: 5px 6px; gap: 2px; }
  .countdown--compact .countdown__num { font-size: 18px; line-height: 18px; }
  .countdown--compact .countdown__unit { font-size: 9px; line-height: 10px; }

  .hero { padding-inline: var(--space-4); }
  .hero__img { margin-inline: calc(-1 * var(--space-4)); }
  .badge-hero { font-size: 11px; padding: 6px 14px; letter-spacing: 0.06em; }
  .hero .btn { align-self: stretch; }
  .hero__mention { font-size: var(--text-xs); }

  .generator,
  .generator--result {
    padding: calc(56vw - 28px) var(--space-4) var(--space-8);
  }
  .gen-card { padding: var(--space-5); border-radius: 20px; gap: var(--space-5); }
  .choice {
    height: auto;
    min-height: 44px;
    padding: 11px 16px;
    font-size: 15px;
    text-align: left;
  }
  /* Bouton principal en premier, pleine largeur ; Retour dessous */
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .gen-card:not(.gen-card--result) > .actions { align-items: stretch; }
  .actions .btn { width: 100%; }
  .btn--primary, .btn--secondary { padding-inline: var(--space-5); }
  .alibi-text { padding-left: var(--space-4); }
  .alibi-text p { font-size: var(--text-base); line-height: 26px; }
  .share__btn { padding: 12px; font-size: 15px; }

  .counter-section { padding: var(--space-8) var(--space-4); }
  .live__label { font-size: var(--text-sm); }

  .site-footer { padding: var(--space-6) var(--space-4) var(--space-7); }
  .site-footer__right { flex-wrap: wrap; gap: var(--space-3); }
}

/* --------------------------------------------------------------------------
   Bandeau de consentement (Loi 25)
   -------------------------------------------------------------------------- */
.consent {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: var(--space-5);
  width: min(1040px, calc(100% - 2 * var(--space-5)));
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: opacity 250ms ease, transform 250ms ease;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: var(--color-white);
  color: var(--color-navy);
  border: 1px solid var(--color-line-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgb(20 12 50 / 0.35);
}
.consent.is-visible { opacity: 1; transform: translate(-50%, 0); }
.consent[hidden] { display: none; }
.consent__body { flex: 1; min-width: 0; }
.consent__titre {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-navy);
}
.consent__texte {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  line-height: 21px;
  color: var(--color-ink-muted);
}
.consent__texte a { color: var(--color-violet); font-weight: 600; }
.consent__actions {
  flex-shrink: 0;
  display: flex;
  gap: var(--space-3);
}
/* Les deux choix ont le même format : refuser est aussi simple qu’accepter */
.consent__btn {
  min-width: 140px;
  height: 48px;
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  background: var(--color-white);
  border: 2px solid var(--color-navy);
  color: var(--color-navy);
  transition: filter var(--transition), background-color var(--transition);
}
.consent__btn--accepter {
  background-color: var(--color-accent);
  background-image: var(--gradient-cta);
  color: var(--color-white);
}
.consent__btn:hover { background-color: var(--color-lilac); }
.consent__btn--accepter { border-color: transparent; }
.consent__btn--accepter:hover { filter: brightness(1.08); }
.consent :focus-visible { outline-color: var(--color-navy); }

/* Liens « Politique de confidentialité » / « Gérer les témoins » du pied de page */
.site-footer__links {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.site-footer__links a,
.site-footer__links button {
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--text-xs);
  line-height: 18px;
  font-weight: 600;
  color: var(--color-legal);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.site-footer__links a:hover,
.site-footer__links button:hover { color: var(--color-white); }

/* --------------------------------------------------------------------------
   Page Politique de confidentialité
   -------------------------------------------------------------------------- */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-9) var(--space-6) var(--space-10);
}
.legal__retour {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-violet);
  text-decoration: none;
}
.legal__retour:hover { text-decoration: underline; }
.legal__maj {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-ink-muted);
}
.legal__intro {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  line-height: 28px;
}
.legal h2 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.legal p,
.legal li { font-size: var(--text-base); line-height: 26px; }
.legal p + p,
.legal p + ul,
.legal ul + p { margin-top: var(--space-3); }
.legal ul { margin: 0; padding-left: 1.25em; }
.legal li + li { margin-top: var(--space-2); }
.legal a { color: var(--color-violet); font-weight: 600; }
.legal table {
  width: 100%;
  margin-top: var(--space-4);
  border-collapse: collapse;
  font-size: var(--text-sm);
  line-height: 21px;
}
.legal th,
.legal td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-line-light);
  text-align: left;
  vertical-align: top;
}
.legal th { font-weight: 700; background: var(--color-white); }
.legal__table-wrap { overflow-x: auto; }
.legal__contact {
  margin-top: var(--space-4);
  padding: var(--space-5);
  background: var(--color-white);
  border: 1px solid var(--color-line-light);
  border-radius: 16px;
}
.legal .btn--primary { margin-top: var(--space-5); }

@media (max-width: 900px) {
  .consent { flex-direction: column; align-items: stretch; gap: var(--space-4); padding: var(--space-5); }
  .consent__actions .consent__btn { flex: 1; }
}
@media (max-width: 640px) {
  .consent {
    bottom: var(--space-3);
    width: calc(100% - 2 * var(--space-3));
    padding: var(--space-4);
    border-radius: 20px;
  }
  .consent__titre { font-size: 20px; line-height: 26px; }
  .consent__texte { font-size: var(--text-xs); line-height: 19px; }
  .consent__btn { min-width: 0; }
  .legal { padding: var(--space-7) var(--space-4) var(--space-9); }
  .legal h2 { margin-top: var(--space-7); }
}

/* --------------------------------------------------------------------------
   Accessibilité
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@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;
  }
}
