/*
 * Page statique de mise en ligne — TAKAROTSY, Région Anosy.
 * Charte : bleu marine #0a2a78, vert #1b7a2e, jaune #f5b800.
 */

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

html,
body {
  margin: 0;
  background: #ffffff;
}

.page {
  --navy: #0a2a78;
  --navy-2: #143a96;
  --green: #1b7a2e;
  --yellow: #f5b800;
  --muted: #5b6480;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  color: var(--navy);
  font-family: "Montserrat", system-ui, sans-serif;
}

/* Fond blanc travaillé : halo très léger et trame de points qui s'efface vers les bords. */
.backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 55%, rgba(20, 58, 150, 0.06), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(10, 42, 120, 0.09) 1px, transparent 0) 0 0 / 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 85%);
}

/* ---- Bandeau haut ---- */
.top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 16px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fadeIn 0.8s ease-out both;
}

.top-logo {
  height: 40px;
  width: auto;
}

.top-label {
  color: var(--navy);
}

.top-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--yellow);
}

.top-date {
  text-transform: capitalize;
  letter-spacing: 0.04em;
}

/* ---- Contenu central ---- */
.content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

.subtitle {
  max-width: 620px;
  text-wrap: balance;
  margin: 18px 0 0;
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
  animation: fadeUp 0.7s ease-out 0.45s both;
}

/* ---- Bouton de mise en ligne ---- */
.action-zone {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: clamp(40px, 7vh, 72px);
  animation: fadeUp 0.7s ease-out 0.6s both;
}

/* Deux anneaux qui pulsent autour du bouton pour inviter au clic. */
.ring {
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  border: 1.5px solid rgba(20, 58, 150, 0.35);
  animation: pulse 2.8s ease-out infinite;
  pointer-events: none;
}

.ring-delayed {
  animation-delay: 1.4s;
}

.launch-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 0 40px 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy) 100%);
  color: #ffffff;
  font: inherit;
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 14px 30px -8px rgba(10, 42, 120, 0.5),
    0 4px 10px rgba(10, 42, 120, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Reflet qui balaie le bouton. */
.launch-button::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  animation: shine 4.5s ease-in-out 1.5s infinite;
  pointer-events: none;
}

.launch-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 20px 36px -10px rgba(10, 42, 120, 0.55),
    0 6px 14px rgba(10, 42, 120, 0.2);
}

.launch-button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.launch-button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 6px;
}

.launch-button:disabled {
  cursor: default;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--green);
  transition: transform 0.4s ease;
}

.launch-button:hover:not(:disabled) .button-icon {
  transform: rotate(-12deg);
}

/* ---- Pied ---- */
.bottom {
  position: relative;
  padding: 0 16px 28px;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  font-weight: 600;
  color: var(--navy-2);
  animation: fadeIn 0.8s ease-out 0.9s both;
}

/* ---- Transition au clic ---- */
.is-launching .ring {
  animation: none;
  opacity: 0;
}

.is-launching .launch-button {
  background: linear-gradient(135deg, #1f8f37 0%, var(--green) 100%);
  transform: scale(1.04);
}

.is-launching .button-icon {
  animation: spin 0.9s cubic-bezier(0.6, 0, 0.4, 1) both;
}

.is-launching .content > :not(.action-zone),
.is-launching .top,
.is-launching .bottom {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Voile blanc qui s'étend depuis le bouton et recouvre l'écran. */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: #ffffff;
  clip-path: circle(0 at var(--wipe-x, 50%) var(--wipe-y, 50%));
}

.is-launching .wipe {
  animation: wipe 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.45s forwards;
}

@keyframes wipe {
  to { clip-path: circle(150vmax at var(--wipe-x, 50%) var(--wipe-y, 50%)); }
}
@keyframes pulse {
  0% { transform: scale(0.96); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes shine {
  0%, 65% { left: -60%; }
  100% { left: 130%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
}

@media (max-width: 560px) {
  .top-dot,
  .top-date {
    display: none;
  }
  .launch-button {
    min-height: 64px;
    padding-right: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page *,
  .page *::after {
    animation: none !important;
    transition: none !important;
  }
  .is-launching .wipe {
    clip-path: none;
  }
}

.nowrap {
  white-space: nowrap;
}
