/* Couleurs relevées sur la maquette */
:root {
  --bg: #ecf0fb;
  --title: #3d44a8;
  --text: #4a5170;
  --muted: #535a78;
  --btn-text: #14205a;
  --accent: #1d5fae;
  --shadow-dark: rgba(163, 177, 214, 0.55);
  --shadow-light: rgba(255, 255, 255, 0.95);
}

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

html, body { margin: 0; min-height: 100%; }

body {
  background: #ecf0fb;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.page {
  min-height: 100vh;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 32px;
  padding: max(48px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
           max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

h1 {
  color: var(--title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 10px;
}

.message {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  max-width: 32ch;
}

/* Spinner : visible uniquement pendant la redirection */
.spinner {
  display: none;
  width: 34px;
  height: 34px;
  margin: 44px 0 0;
  border-radius: 50%;
  border: 3px solid #d3dbf2;
  border-top-color: var(--accent);
  border-left-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.is-redirecting .spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }

/* Boutons de secours, poussés en bas de l'écran */
.fallback {
  width: 100%;
  margin-top: auto;
  padding-top: 48px;
}

.hint {
  display: none;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}
.is-redirecting .hint { display: block; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin: 0 0 14px;
  padding: 10px 16px;
  border-radius: 23px;
  background: var(--bg);
  color: var(--btn-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light); }
.btn:focus-visible { outline: 2px solid var(--title); outline-offset: 3px; }

.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
