/* Baromatch — feuille de style du site */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2-variations"),
       url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --nuit: #0A0B10;
  --nuit-releve: #151722;
  --ambre: #FFB13D;
  --ambre-fonce: #D97A0C;
  --goutte: #FFF3DA;
  --texte: #F7F7F9;
  --texte-doux: rgba(247, 247, 249, 0.74);
  --texte-discret: rgba(247, 247, 249, 0.56);
  --trait: rgba(255, 255, 255, 0.10);
  --page: 1120px;
  --gouttiere: 16px;
  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gouttiere: 32px; }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte);
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "opsz" 16;
  overflow-x: hidden;
}

@media (min-width: 720px) {
  body { font-size: 1.125rem; }
}

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

a { color: var(--ambre); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--goutte); }

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

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

.lien-evitement {
  position: absolute;
  left: var(--gouttiere);
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ambre);
  color: var(--nuit);
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}
.lien-evitement:focus { top: 12px; color: var(--nuit); }

.page {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

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

.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.entete__logo { display: block; width: 132px; }
@media (min-width: 720px) { .entete__logo { width: 156px; } }
.entete__logo svg { width: 100%; height: auto; }

.entete__lien {
  color: var(--texte);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 177, 61, 0.55);
}
.entete__lien:hover { color: var(--ambre); }

/* ---------- Ouverture (hero) ---------- */

.ouverture {
  position: relative;
  overflow-x: clip;
  text-align: center;
  padding-top: 24px;
  padding-bottom: 96px;
}
@media (min-width: 720px) { .ouverture { padding-top: 40px; padding-bottom: 140px; } }

.verre {
  position: relative;
  width: 176px;
  height: 176px;
  margin: 0 auto 28px;
}
@media (min-width: 720px) { .verre { width: 232px; height: 232px; margin-bottom: 36px; } }

.verre__halo {
  position: absolute;
  left: 50%; top: 56%;
  width: 260%; height: 260%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 177, 61, 0.42), rgba(255, 177, 61, 0.12) 40%, rgba(255, 177, 61, 0) 68%);
  pointer-events: none;
}

.verre svg { position: relative; width: 100%; height: 100%; overflow: visible; }

.ouverture__titre {
  margin: 0;
  font-weight: 800;
  font-stretch: 84%;
  font-variation-settings: "opsz" 96;
  font-size: clamp(3.4rem, 15vw, 8.25rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
}
.ouverture__titre span { display: block; }

.ouverture__texte {
  max-width: 34rem;
  text-wrap: balance;
  margin: 28px auto 0;
  color: var(--texte-doux);
  font-size: 1.125rem;
}
@media (min-width: 720px) { .ouverture__texte { font-size: 1.25rem; margin-top: 34px; } }

/* Liste d'attente */

.attente {
  max-width: 34rem;
  margin: 36px auto 0;
  text-align: left;
}

.attente__etiquette {
  display: block;
  margin: 0 0 10px 4px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--texte);
}

.attente__ligne {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attente__champ,
.attente__bouton {
  height: 58px;
  font: inherit;
  font-size: 1.0625rem;
  border-radius: 16px;
}

.attente__champ {
  width: 100%;
  min-width: 0;
  padding: 0 18px;
  color: var(--texte);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.20);
}
.attente__champ::placeholder { color: var(--texte-discret); }
.attente__champ:focus-visible { outline-offset: 2px; }

.attente__bouton {
  padding: 0 26px;
  border: 0;
  background: var(--ambre);
  color: var(--nuit);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.attente__bouton:hover { background: #FFC163; }
.attente__bouton[disabled] { opacity: 0.7; cursor: progress; }

@media (min-width: 560px) {
  .attente__ligne {
    flex-direction: row;
    gap: 0;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.20);
  }
  .attente__ligne:focus-within { border-color: rgba(255, 177, 61, 0.7); }
  .attente__champ {
    height: 52px;
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
  }
  .attente__champ:focus-visible { outline: none; }
  .attente__bouton { height: 52px; border-radius: 999px; }
}

.attente__note {
  margin: 12px 4px 0;
  font-size: 0.875rem;
  color: var(--texte-discret);
}
.attente__note a { color: var(--texte-doux); }

.attente__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.attente__retour {
  margin: 14px 4px 0;
  font-weight: 600;
  font-size: 1rem;
}
.attente__retour:empty { display: none; }
.attente__retour--ok { color: var(--goutte); }
.attente__retour--erreur { color: #FF9C8A; }

/* ---------- La soirée, étape par étape ---------- */

.soiree {
  padding-top: 88px;
  padding-bottom: 104px;
  border-top: 1px solid var(--trait);
}
@media (min-width: 720px) { .soiree { padding-top: 120px; padding-bottom: 136px; } }

.titre-section {
  margin: 0;
  text-wrap: balance;
  max-width: 18ch;
  font-weight: 800;
  font-stretch: 88%;
  font-variation-settings: "opsz" 72;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.etapes {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  gap: 36px;
}

.etape {
  display: grid;
  align-content: start;
  grid-template-columns: 64px 1fr;
  gap: 4px 20px;
  align-items: start;
}

.etape__jauge { width: 64px; height: 64px; grid-row: span 2; }

.etape__titre {
  margin: 4px 0 0;
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.2;
}

.etape__texte {
  margin: 0;
  color: var(--texte-doux);
  font-size: 1rem;
  max-width: 34ch;
}

@media (min-width: 960px) {
  .etapes {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
    margin-top: 72px;
  }
  .etape { grid-template-columns: 1fr; gap: 0; }
  .etape__jauge { width: 76px; height: 76px; grid-row: auto; margin-bottom: 22px; }
  .etape__titre { margin: 0 0 8px; }
}

/* ---------- Bars partenaires ---------- */

.bars {
  background: var(--ambre);
  color: var(--nuit);
}

.bars__contenu {
  display: grid;
  gap: 32px;
  padding-top: 72px;
  padding-bottom: 80px;
}
@media (min-width: 820px) {
  .bars__contenu {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 64px;
    padding-top: 112px;
    padding-bottom: 120px;
  }
}

.bars__verre { width: 112px; order: -1; }
@media (min-width: 820px) { .bars__verre { width: 220px; order: 0; } }

.bars .titre-section { max-width: 16ch; }

.bars__texte {
  max-width: 36rem;
  margin: 24px 0 0;
  font-size: 1.125rem;
  color: rgba(10, 11, 16, 0.86);
}

.bars__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 32px;
}

.bouton-nuit {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--nuit);
  color: var(--ambre);
  font-weight: 700;
  text-decoration: none;
}
.bouton-nuit:hover { color: var(--goutte); }

.bars a:not(.bouton-nuit) { color: var(--nuit); font-weight: 600; }
.bars a:not(.bouton-nuit):hover { color: rgba(10, 11, 16, 0.7); }
.bars :focus-visible { outline-color: var(--nuit); }

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

.pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding-top: 36px;
  padding-bottom: 44px;
  font-size: 0.9375rem;
  color: var(--texte-discret);
}

.pied__marque { display: flex; align-items: center; gap: 12px; }
.pied__marque svg { width: 30px; height: 30px; }

.pied__liens {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pied__liens a { color: var(--texte-doux); text-decoration: none; }
.pied__liens a:hover { color: var(--ambre); text-decoration: underline; }

/* ---------- Pages de texte (mentions, confidentialité, 404) ---------- */

.document {
  max-width: 42rem;
  padding-top: 40px;
  padding-bottom: 96px;
}

.document h1 {
  margin: 0 0 12px;
  font-weight: 800;
  font-stretch: 88%;
  font-variation-settings: "opsz" 72;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.document__date { margin: 0 0 40px; color: var(--texte-discret); font-size: 0.9375rem; }

.document h2 {
  margin: 44px 0 10px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

.document h2[id] { scroll-margin-top: 24px; }

.document h3 {
  margin: 28px 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.document p, .document li { color: var(--texte-doux); }
.document strong { color: var(--texte); font-weight: 600; }
.document ul { padding-left: 1.2em; }
.document li { margin: 6px 0; }

.perdu { text-align: center; padding-top: 48px; padding-bottom: 120px; }
.perdu .verre { width: 140px; height: 140px; }
.perdu h1 { font-size: clamp(2.5rem, 9vw, 4rem); }
.perdu p { margin: 16px auto 32px; color: var(--texte-doux); max-width: 28rem; }

/* ---------- L'ouverture animée : la goutte tombe dans le verre ---------- */

@keyframes bm-tracer { to { stroke-dashoffset: 0; } }
@keyframes bm-chute {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(134px); opacity: 1; }
}
@keyframes bm-eclat {
  0% { transform: translateY(134px) scale(1); opacity: 1; }
  100% { transform: translateY(134px) scale(0.1); opacity: 0; }
}
@keyframes bm-onde { 0% { transform: scale(0.3); opacity: 0.9; } 100% { transform: scale(4); opacity: 0; } }
@keyframes bm-monter { from { transform: translateY(150px); } to { transform: translateY(0); } }
@keyframes bm-vague { to { transform: translateX(-140px); } }
@keyframes bm-apparaitre { to { opacity: 1; } }
@keyframes bm-eclore { from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes bm-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes bm-verser { to { clip-path: inset(-10% 0 -20% 0); transform: translateY(0); } }
@keyframes bm-lever { to { opacity: 1; transform: translateY(0); } }

.anime .bm-anneau { stroke-dasharray: 214; stroke-dashoffset: 214; animation: bm-tracer 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
.anime .bm-goutte-chute { transform-box: fill-box; transform-origin: center; opacity: 0; animation: bm-chute 0.7s cubic-bezier(0.55, 0, 1, 0.45) 0.3s both, bm-eclat 0.25s ease-out 1s forwards; }
.anime .bm-onde { transform-box: fill-box; transform-origin: center; opacity: 0; animation: bm-onde 0.7s ease-out 1s both; }
.anime .bm-niveau { animation: bm-monter 0.8s cubic-bezier(0.22, 1.3, 0.42, 1) 1s both; }
.anime .bm-reflet { opacity: 0; animation: bm-apparaitre 0.4s ease-out 1.55s both; }
.anime .bm-goutte { transform-box: fill-box; transform-origin: center; animation: bm-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 1.6s both; }
.anime .verre__halo { animation: bm-eclore 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 1s both; }
.anime .ouverture__titre span { clip-path: inset(100% 0 -20% 0); transform: translateY(18px); animation: bm-verser 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anime .ouverture__titre span:nth-child(1) { animation-delay: 1.35s; }
.anime .ouverture__titre span:nth-child(2) { animation-delay: 1.47s; }
.anime .ouverture__titre span:nth-child(3) { animation-delay: 1.59s; }
.anime .ouverture__suite { opacity: 0; transform: translateY(10px); animation: bm-lever 0.6s ease-out 1.85s both; }

.bm-vague { animation: bm-vague 3.2s linear infinite; }
.bm-goutte-chute, .bm-onde { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .anime *, .anime .verre__halo, .bm-vague { animation: none !important; }
  .anime .bm-anneau { stroke-dashoffset: 0; }
  .anime .bm-goutte-chute, .anime .bm-onde { opacity: 0; }
  .anime .bm-reflet, .anime .ouverture__suite { opacity: 1; transform: none; }
  .anime .ouverture__titre span { clip-path: none; transform: none; }
  .anime .verre__halo { opacity: 1; }
}
