/* Optima Labs — gateway 21+ : même univers que le site (clair, anthracite, or désaturé).
   Typographies : Anton (titres) + Inter, importées par tokens.css. */
.gateway-page {
  --gw-bg: #fafafb;
  --gw-ink: #26242b;
  --gw-text: #55525c;
  --gw-soft: #6b6773;
  --gw-gold: #85702f;       /* bouton : 4,8:1 avec texte blanc */
  --gw-gold-dark: #6e5b28;  /* liens et survol */
  --gw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #fafafb; }

.gateway-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow-x: hidden;
  background: transparent; /* le fond est porté par html : l'image reste visible */
  color: var(--gw-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
.gateway-page a { color: inherit; text-decoration: none; }
.gateway-page svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

/* ----- Arrière-plan : les flacons du site sous un voile blanc ----- */
.gateway__backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--gw-bg);
}
.gateway__backdrop picture,
.gateway__backdrop img { display: block; width: 100%; height: 100%; }
.gateway__backdrop img {
  object-fit: cover;
  object-position: 50% 45%;
  animation: gw-drift 30s var(--gw-ease) both;
}
.gateway__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 48% 62% at 50% 50%, rgba(250, 250, 251, 0.94) 0%, rgba(250, 250, 251, 0.86) 55%, rgba(250, 250, 251, 0.5) 100%);
}

/* ----- Contenu, sans cadre ----- */
.gateway {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 16px;
}
.gateway__panel {
  width: min(620px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: gw-rise 700ms var(--gw-ease) both;
}

.gateway__logo {
  display: block;
  width: 250px;
  height: auto;
  margin-bottom: 40px;
}

.gateway h1 {
  margin: 0 0 18px;
  color: var(--gw-ink);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.05;
  text-transform: uppercase;
  text-wrap: balance;
}
.gateway__sep { color: var(--gw-gold); }

.gateway__intro {
  max-width: 52ch;
  margin: 0 0 32px;
  color: var(--gw-text);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.gateway__enter {
  min-width: 260px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 34px;
  border-radius: 999px;
  background: var(--gw-gold);
  box-shadow: 0 8px 22px rgba(110, 91, 40, 0.22);
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 200ms var(--gw-ease), box-shadow 200ms var(--gw-ease);
}
.gateway-page .gateway__enter { color: #fff; }
.gateway__enter:hover { background: var(--gw-gold-dark); box-shadow: 0 10px 26px rgba(110, 91, 40, 0.3); }

.gateway__redirect {
  margin: 14px 0 0;
  color: var(--gw-soft);
  font-size: 0.875rem;
  line-height: 1.4;
  text-wrap: balance;
}

/* Liens de confiance : texte + icône, sans cartes. */
.gateway__trust { margin-top: 36px; }
/* Ligne 1 : Analyses | Communauté — ligne 2, centrée : Cadre d'utilisation. */
.gateway__trust ul {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  column-gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gateway__trust li:nth-child(3) { grid-column: 1 / -1; justify-content: center; }
.gateway__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gateway__trust li,
.gateway__legal li { display: flex; align-items: center; }
.gateway__trust a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--gw-gold-dark);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}
.gateway__trust a svg { width: 18px; height: 18px; flex: none; }
.gateway__trust a span { text-decoration: underline; text-decoration-color: rgba(110, 91, 40, 0.3); text-underline-offset: 5px; transition: text-decoration-color 200ms var(--gw-ease); }
.gateway__trust a:hover span { text-decoration-color: currentColor; }

/* ----- Pied légal ----- */
.gateway__footer { padding: 0 16px 12px; }
.gateway__legal li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a9a5b0;
}
.gateway__legal a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--gw-soft);
  font-size: 0.875rem;
  transition: color 180ms ease;
}
.gateway__legal a:hover { color: var(--gw-ink); }

/* ----- Focus & accessibilité ----- */
.gateway-page :focus-visible { outline: 2px solid var(--gw-gold-dark); outline-offset: 3px; border-radius: 4px; }
.gateway-page .gateway__enter:focus-visible { border-radius: 999px; outline-offset: 4px; }
.gateway-page .skip-link { top: -80px; min-height: 44px; display: inline-flex; align-items: center; background: var(--gw-ink); color: #fff; font-weight: 600; }
.gateway-page .skip-link:focus { top: 16px; color: #fff; }

/* ----- Animations ----- */
@keyframes gw-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes gw-drift {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

/* ----- Mobile ----- */
@media (max-width: 760px) {
  .gateway { padding: 48px 20px 8px; }
  .gateway__backdrop::after { background: linear-gradient(180deg, rgba(250, 250, 251, 0.8) 0%, rgba(250, 250, 251, 0.9) 30%, rgba(250, 250, 251, 0.9) 100%); }
  .gateway__logo { width: 190px; margin-bottom: 32px; }
  .gateway h1 { font-size: 2.1rem; }
  .gateway__intro { margin-bottom: 28px; font-size: 0.9375rem; line-height: 1.6; }
  .gateway__enter { width: 100%; min-width: 0; }
  .gateway__trust { margin-top: 24px; }
  .gateway__trust ul { column-gap: 0; }
  .gateway__trust a { gap: 6px; padding: 0 6px; font-size: 0.875rem; }
  .gateway__legal a { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .gateway__panel,
  .gateway__backdrop img { animation: none; }
  .gateway-page *,
  .gateway-page *::before,
  .gateway-page *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ----- Sélecteur de langue : un seul menu déroulant natif ----- */
.gateway__lang {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
}
.gateway__lang svg {
  position: absolute;
  z-index: 1; /* au-dessus du fond du menu */
  pointer-events: none;
  color: var(--gw-soft);
}
.gateway__lang-globe { left: 14px; width: 16px; height: 16px; }
.gateway__lang-chevron { right: 12px; width: 14px; height: 14px; stroke-width: 2; }
.gateway__lang select {
  min-height: 44px;
  padding: 0 34px 0 38px;
  border: 1px solid rgba(38, 36, 43, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--gw-ink);
  font: 500 0.875rem/1 var(--font-sans);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.gateway__lang select:hover { border-color: rgba(110, 91, 40, 0.45); background: #fff; }
.gateway__lang select:focus-visible { outline: 2px solid var(--gw-gold-dark); outline-offset: 2px; border-radius: 999px; }
@media (max-width: 760px) {
  .gateway__lang { top: 12px; right: 12px; }
}
