/* Page d'attente lune-azur.fr */
:root {
  --bg-top: #14172b;
  --bg-mid: #141a35;
  --bg-bottom: #1a2049;
  --text: #e9e9ed;
  --text-muted: #b2b6ca;
  --accent: #aaccff;
  --accent-strong: #2a7fff;
  --divider: rgba(233, 233, 237, 0.16);
  --cloud-a: #262a60;
  --cloud-b: #353b80;
  --cloud-c: #423a6a;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(185deg, var(--bg-top) 0%, var(--bg-mid) 40%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--cloud-c); }

/* Ciel : nuages flous + étoiles */
.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.cloud--a {
  top: -15%; left: -20%; width: 80%; height: 70%; opacity: .6;
  background: radial-gradient(circle, var(--cloud-a) 0%, transparent 68%);
  animation: cloud-a 64s ease-in-out infinite;
}
.cloud--b {
  top: 25%; right: -25%; width: 85%; height: 75%; opacity: .55; filter: blur(100px);
  background: radial-gradient(circle, var(--cloud-b) 0%, transparent 66%);
  animation: cloud-b 82s ease-in-out infinite;
}
.cloud--c {
  bottom: -25%; left: 10%; width: 75%; height: 70%; opacity: .4; filter: blur(110px);
  background: radial-gradient(circle, var(--cloud-c) 0%, transparent 70%);
  animation: cloud-a 96s ease-in-out infinite reverse;
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Contenu */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 3rem 1.25rem 2rem;
  text-align: center;
}

.logo {
  position: relative;
  width: min(280px, 62vw);
  aspect-ratio: 1;
}
.logo::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 127, 255, .28) 0%, transparent 70%);
  filter: blur(30px);
  animation: glow 9s ease-in-out infinite;
}
.logo img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  animation: drift 9s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 .75rem;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: .01em;
}

.rule {
  width: 64px;
  height: 1px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.message {
  max-width: 34rem;
  margin: 0 auto;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 300;
  color: var(--text);
}
.message em {
  display: block;
  margin-top: .5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.35em;
  color: var(--text-muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2rem;
  padding: .55rem 1.1rem;
  border: 1px solid var(--divider);
  border-radius: 999px;
  background: rgba(16, 23, 49, .55);
  backdrop-filter: blur(8px);
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 0 rgba(42, 127, 255, .6);
  animation: pulse 2.4s ease-out infinite;
}

footer {
  margin-top: auto;
  padding-top: 2rem;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: .7;
}

@keyframes cloud-a { 0%, 100% { transform: translate3d(-6%, 0, 0) scale(1.05) } 50% { transform: translate3d(6%, -3%, 0) scale(1.15) } }
@keyframes cloud-b { 0%, 100% { transform: translate3d(5%, 2%, 0) scale(1.1) } 50% { transform: translate3d(-5%, -2%, 0) scale(1) } }
@keyframes drift { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
@keyframes glow { 0%, 100% { opacity: .7; transform: scale(1) } 50% { opacity: 1; transform: scale(1.08) } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(42, 127, 255, .6) } 70%, 100% { box-shadow: 0 0 0 10px rgba(42, 127, 255, 0) } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* ─── Compte à rebours ─────────────────────────────────────────────────────── */

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

.compte-a-rebours {
  /* baseline : les deux-points se posent sur la même ligne d'écriture que les chiffres */
  display: flex; align-items: baseline; justify-content: center;
  gap: clamp(.4rem, 2vw, 1.4rem);
  margin: 2rem 0 1rem;
}
.compte-a-rebours[hidden] { display: none; }

.compte-a-rebours__case { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 0; }

.compte-a-rebours__nombre {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(3rem, 13vw, 6.5rem);
  line-height: .95;
  /* Chiffres de largeur fixe : les secondes ne font plus sautiller la ligne */
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-shadow: 0 0 40px rgba(42, 127, 255, .35);
}

.compte-a-rebours__unite {
  font-size: clamp(.6rem, 1.7vw, .72rem);
  font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted);
}

.compte-a-rebours__deux-points {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.1;
  color: var(--accent);
  opacity: .5;
}

.date-ouverture {
  margin: 0;
  font-size: clamp(.95rem, 2.4vw, 1.1rem);
  color: var(--text-muted);
  /* La première lettre est mise en majuscule par le script (« Samedi 19 septembre… ») */
}

/* ─── Accès : verrouillés jusqu'à l'ouverture ──────────────────────────────── */

.acces { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }

.acces__bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; min-width: 150px; padding: .65rem 1.5rem;
  font-size: .95rem; font-weight: 500; letter-spacing: .04em; text-decoration: none;
  color: #14172b; background: var(--accent);
  border: 1px solid transparent; border-radius: 10px;
  transition: background-color .15s ease, color .15s ease, opacity .3s ease;
}
.acces__bouton:hover { background: #cbe0ff; }
.acces__bouton:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Verrouillé : sans href, donc ni cliquable ni focalisable — le style le dit aussi */
.acces__bouton--verrouille {
  color: var(--text-muted);
  background: rgba(233, 233, 237, .07);
  border-color: var(--divider);
  cursor: not-allowed;
}
.acces__bouton--verrouille:hover { background: rgba(233, 233, 237, .07); }

.statut-ouvert { color: #c9f5de; border-color: rgba(159, 224, 192, .4); }
.statut-ouvert .status__dot { background: #6ddc9c; box-shadow: none; animation: none; }

@media (max-width: 380px) {
  .compte-a-rebours__deux-points { display: none; }
  .compte-a-rebours { gap: .9rem; flex-wrap: wrap; }
}

/* Formulaire « Être prévenu de l'ouverture » */
.lancement { width: min(460px, 100%); display: grid; gap: .6rem; text-align: left; }
.lancement label { font-size: .8rem; letter-spacing: .08em; color: var(--text-muted); }
.lancement__ligne { display: flex; gap: .5rem; flex-wrap: wrap; }
.lancement input {
  flex: 1 1 220px; min-height: 44px; padding: .6rem .9rem; font: inherit; font-size: .95rem; color: var(--text);
  background: rgba(16, 23, 49, .6); border: 1px solid var(--divider); border-radius: 8px;
}
.lancement input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lancement button {
  min-height: 44px; padding: .6rem 1.2rem; font: inherit; font-weight: 500; color: #14172b;
  background: var(--accent); border: 0; border-radius: 8px; cursor: pointer;
}
.lancement button:disabled { opacity: .5; cursor: wait; }
.lancement__statut { margin: 0; min-height: 1.2em; font-size: .85rem; color: var(--text-muted); }
.lancement__statut--erreur { color: #ff9b9b; }
.lancement__legal { margin: 0; font-size: .72rem; color: var(--text-muted); opacity: .8; }
.lancement__merci { margin: 0; padding: .9rem 1rem; border-radius: 8px; background: rgba(159, 224, 192, .12); color: #c9f5de; }
.lancement__turnstile:empty { display: none; }
/* Page /newsletter/confirmee/ — atterrissage du lien de double opt-in.
   Elle vit sur le site d'attente tant que la bibliothèque n'est pas ouverte. */
.confirmation__coche {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; margin-bottom: 1.25rem;
  color: #6ddc9c; border-radius: 50%;
  background: rgba(159, 224, 192, .12); border: 1px solid rgba(159, 224, 192, .4);
}
.confirmation__coche + .eyebrow { color: #c9f5de; }
.message + .lancement__legal { margin-top: .9rem; }

footer p { margin: .2rem 0; }
.liens-legaux { text-transform: none; letter-spacing: .02em; }
.liens-legaux a { color: var(--text-muted); }
.liens-legaux .lien-cookies { color: var(--text-muted); font-size: inherit; letter-spacing: inherit; }

/* ─── Mode maintenance (drapeau en base, voile général) ───────────────────── */
html.en-maintenance, html.en-maintenance body { overflow: hidden; }
.maintenance {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  padding: 24px; background: rgba(12, 14, 26, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.maintenance__carte {
  display: grid; gap: 14px; max-width: 34rem; text-align: center; padding: clamp(24px, 5vw, 40px);
  border-radius: 14px; border: 1px solid #4c5397; background: #232532;
  box-shadow: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, .65); color: #e9e9ed;
}
.maintenance__titre { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(26px, 4vw, 34px); }
.maintenance__texte { margin: 0; font-size: 16px; line-height: 1.6; color: #e4e7f5; }
.maintenance__pied { margin: 0; font-size: 13px; color: #b2b6ca; }
