/* ============================================================================
 * RaceMotion — Espace client : design & animations.
 * Continuité du parcours réservation (carte rounded-card, champs, recap-gradient,
 * CTA blanc rounded-full, accents brand #E60000). Header/footer gérés à part.
 * ========================================================================== */

:root { --brand: #E60000; --brand-dark: #82181a; }

body { background: #000; }
::selection { background: var(--brand); color: #fff; }

/* ---- Accessibilité : focus clavier TOUJOURS visible (anneau de marque) ---- */
/* Ne s'affiche qu'au clavier (:focus-visible), jamais au clic souris. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="tab"]:focus-visible,
[role="switch"]:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #000, 0 0 0 4px rgba(230, 0, 0, .75);
  border-radius: 10px;
}

/* ---- Halo de marque (fond) ---- */
.brand-halo { position: relative; isolation: isolate; }
.brand-halo::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% -8%, rgba(230,0,0,.20), transparent 62%),
    radial-gradient(40% 30% at 90% 8%, rgba(130,24,26,.18), transparent 70%);
  animation: rmGlow 9s ease-in-out infinite alternate;
}
@keyframes rmGlow { from { opacity: .75; } to { opacity: 1; } }

/* ---- Carte (continuité réservation) ---- */
.rm-card {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 24px;
}
.recap-gradient { background-image: linear-gradient(126deg, #46080a 0%, #000 100%); }

/* ---- Pages d'authentification : fond dégradé + carte « verre liquide » + logo ---- */
.auth-bg { background-color:#000; background-image: linear-gradient(168deg,#4d0a0e 0%,#1c0507 30%,#000 62%); background-attachment: fixed; background-repeat: no-repeat; }
.rm-card.login-glass {
  background: linear-gradient(180deg, rgba(14,14,16,.60), rgba(6,6,8,.70));
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.35), 0 40px 90px -30px rgba(0,0,0,.82);
}
.auth-head { display:flex; flex-direction:column; align-items:center; text-align:center; }

/* ---- Champs ---- */
.field {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10);
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
}
.field:focus {
  outline: none; border-color: rgba(255,255,255,.40); background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 4px rgba(230,0,0,.10);
}
.field::placeholder { color: rgba(255,255,255,.45); }

/* ---- Boutons : fondu rouge CLAIR (gauche) → rouge FONCÉ (droite), sans effet au survol ---- */
.btn-primary, .btn-grad {
  background: #a00000 !important;                                   /* repli solide */
  background-image: linear-gradient(90deg, #e60000 0%, #600000 100%) !important;
  color: #fff !important;
  transition: transform .15s ease;
}
/* Aucune animation au survol (choix produit) — seul le feedback d'appui reste. */
.btn-primary:active, .btn-grad:active { transform: scale(.985); }
.btn-ghost { transition: background .2s ease, border-color .2s ease; }

/* ---- Titres : blanc simple ---- */
.title-grad {
  background: none;
  -webkit-text-fill-color: #fff; color: #fff;
}

/* ---- Animations d'entrée (reveal + stagger) ---- */
@keyframes rmRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rmFade { from { opacity: 0; } to { opacity: 1; } }
.rm-rise { opacity: 0; animation: rmRise .6s cubic-bezier(.16,1,.3,1) forwards; }
.reveal > * { opacity: 0; animation: rmRise .55s cubic-bezier(.16,1,.3,1) forwards; }
.reveal > *:nth-child(1) { animation-delay: .04s; }
.reveal > *:nth-child(2) { animation-delay: .10s; }
.reveal > *:nth-child(3) { animation-delay: .16s; }
.reveal > *:nth-child(4) { animation-delay: .22s; }
.reveal > *:nth-child(5) { animation-delay: .28s; }
.reveal > *:nth-child(6) { animation-delay: .34s; }
.reveal > *:nth-child(7) { animation-delay: .40s; }
.reveal > *:nth-child(8) { animation-delay: .46s; }

/* ---- Spinner + chargement bouton ---- */
@keyframes rmSpin { to { transform: rotate(360deg); } }
.rm-spin { animation: rmSpin .8s linear infinite; }
.is-loading { pointer-events: none; opacity: .75; }

/* ---- Coche de succès (tracé) ---- */
@keyframes rmDraw { to { stroke-dashoffset: 0; } }
@keyframes rmPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.success-ring { animation: rmPop .5s cubic-bezier(.16,1,.3,1) forwards; }
.success-check { stroke-dasharray: 28; stroke-dashoffset: 28; animation: rmDraw .5s .25s ease forwards; }

/* ---- Accessibilité : respect des préférences de mouvement ---- */
@media (prefers-reduced-motion: reduce) {
  .rm-rise, .reveal > *, .success-ring, .success-check, .brand-halo::before { animation: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}
