/* ============================================================
   Plateforme d'inscription 2027 — styles partagés
   (inscription2027, confirmation2027, dossier2027, admin2027)
   Reprend la charte du site : bleu nuit, accents bleu clair / or.
   Mobile-first, sans framework externe.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-gradient: linear-gradient(135deg, #071C3B 0%, #0F2A5A 100%);
  --bg-solid: #0A2040;
  --bg-card: rgba(58, 155, 216, 0.1);
  --primary: #3A9BD8;
  --primary-light: #5BB4E8;
  --primary-dark: #2D8BBE;
  --txt: #FFFFFF;
  --txt-muted: #B8D4F0;
  --accent-gold: #F3B41B;
  --accent-red: #FF4444;
  --txt-erreur: #FF9A9A;              /* texte d'erreur sur fond bleu nuit */
  --accent-green: #34C77B;
  /* Fonds de boutons à texte blanc : contraste ≥ 4,5:1 (WCAG AA) */
  --bouton-primaire: #1F6FA8;        /* 5,39:1 */
  --bouton-primaire-survol: #195D8E; /* 7,01:1 */
  --bouton-danger: #C53030;          /* 5,47:1 */
  --bouton-danger-survol: #B82D2D;   /* 6,08:1 */
  --bouton-succes: #177A46;          /* 5,37:1 */
  --bouton-succes-survol: #136137;   /* 7,52:1 */
  --border: rgba(58, 155, 216, 0.3);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--txt);
  background: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
h1 { font-size: 2.4rem; font-weight: 900; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* ---------- Header / nav (repris du site) ---------- */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(10, 32, 64, 0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1.5rem; max-width: 1400px; margin: 0 auto; }
.nav__logo img { height: 44px; width: auto; }
.nav__menu { display: flex; gap: 1.25rem; list-style: none; }
.nav__link { color: var(--txt); font-weight: 500; padding: .4rem .8rem; border-radius: 8px; }
.nav__link:hover, .nav__link.active { background: var(--bg-card); color: var(--primary); }

.page-hero { padding: 7rem 1rem 2.5rem; text-align: center; }
.page-hero h1 { margin-bottom: .25rem; }
.page-hero p { color: var(--txt-muted); }

/* ---------- Footer ---------- */
.footer { background: rgba(7, 28, 59, 0.95); padding: 2rem 0 1rem; border-top: 1px solid var(--border); margin-top: 4rem; }
.footer__bottom { text-align: center; color: var(--txt-muted); font-size: .85rem; }

/* ---------- Cartes / sections ---------- */
.carte {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.carte--accent { border-color: var(--accent-gold); background: rgba(243, 180, 27, 0.08); }
.carte--erreur { border-color: var(--accent-red); background: rgba(255, 68, 68, 0.08); }
.carte--ok { border-color: var(--accent-green); background: rgba(52, 199, 123, 0.08); }

/* ---------- Étapes (wizard) ---------- */
.etapes { display: flex; justify-content: center; gap: .5rem; margin: 0 auto 2rem; flex-wrap: wrap; }
.etape {
  display: flex; align-items: center; gap: .5rem;
  color: var(--txt-muted); font-size: .85rem; font-weight: 600;
  padding: .35rem .8rem; border-radius: 999px; border: 1px solid transparent;
}
.etape__num {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(184, 212, 240, .15); display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.etape.active { color: var(--txt); border-color: var(--primary); background: var(--bg-card); }
.etape.active .etape__num { background: var(--primary); color: #fff; }
.etape.faite { color: var(--accent-green); }
.etape.faite .etape__num { background: var(--accent-green); color: #06281a; }
/* Petits écrans : seul le libellé de l'étape en cours reste affiché (les trois tiennent sur une ligne) */
@media (max-width: 480px) { .etape:not(.active) .etape__libelle { display: none; } }

/* ---------- Formulaires ---------- */
.champ { margin-bottom: 1rem; }
.champ label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.champ .aide { font-size: .8rem; color: var(--txt-muted); margin-top: .25rem; }
.champ input[type="text"], .champ input[type="email"], .champ input[type="tel"],
.champ input[type="date"], .champ input[type="number"], .champ input[type="password"],
.champ select, .champ textarea {
  width: 100%; padding: .65rem .8rem;
  background: rgba(7, 28, 59, 0.6);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--txt); font: inherit; font-size: .95rem;
  transition: border-color .2s ease;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 155, 216, .2);
}
.champ input.invalide, .champ select.invalide { border-color: var(--accent-red); }
.champ select option { background: var(--bg-solid); color: var(--txt); }
.case.invalide { color: var(--txt-erreur); }
.zone-fichier.invalide + .erreur-champ, .case + .erreur-champ { margin: -.4rem 0 .8rem; }
/* Message d'erreur sous le champ concerné (rouge éclairci : lisible sur le fond bleu nuit) */
.erreur-champ { color: var(--txt-erreur); font-size: .82rem; font-weight: 600; margin-top: .3rem; }
/* Date en trois cases JJ / MM / AAAA (clavier numérique sur mobile) */
.date-3 { display: flex; align-items: center; gap: .4rem; }
.date-3 span { color: var(--txt-muted); }
.champ .date-3 input[type="text"] { width: 3.6rem; text-align: center; padding-left: .4rem; padding-right: .4rem; }
.champ .date-3 input[id$="-a"] { width: 5rem; }
.date-3.invalide input { border-color: var(--accent-red); }
/* Lien discret (ex. « J'ai un code club ou partenaire ») : n'attire pas l'œil de ceux qui n'en ont pas */
.lien-discret {
  background: none; border: none; padding: 0; margin: .2rem 0 1rem; cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--primary-light); text-decoration: underline;
}

.grille-2 { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .grille-2 { grid-template-columns: 1fr 1fr; } }

.case { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .7rem; font-size: .9rem; cursor: pointer; }
.case input[type="checkbox"] { width: 18px; height: 18px; margin-top: .25rem; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.case a { text-decoration: underline; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.5rem; border-radius: 10px; border: none; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .95rem;
  background: var(--bouton-primaire); color: #fff;
  transition: background .2s ease, transform .1s ease;
}
.btn:hover { background: var(--bouton-primaire-survol); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--secondaire { background: transparent; border: 1px solid var(--border); color: var(--txt); }
.btn--secondaire:hover { background: var(--bg-card); }
.btn--danger { background: var(--bouton-danger); }
.btn--danger:hover { background: var(--bouton-danger-survol); }
.btn--succes { background: var(--bouton-succes); }
.btn--succes:hover { background: var(--bouton-succes-survol); }
.btn--or { background: var(--accent-gold); color: #2a1f00; }
.btn--or:hover { background: #dda414; }
.btn--petit { padding: .35rem .8rem; font-size: .82rem; border-radius: 8px; }
.btn .icone { width: 18px; height: 18px; }

/* ---------- Badges de statut ---------- */
.badge {
  display: inline-block; padding: .15rem .6rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.badge--complet, .badge--valide { background: rgba(52,199,123,.18); color: var(--accent-green); }
.badge--incomplet, .badge--manquant, .badge--en_attente, .badge--panier_cree { background: rgba(243,180,27,.18); color: var(--accent-gold); }
.badge--a_verifier { background: rgba(91,180,232,.18); color: var(--primary-light); }
.badge--annule, .badge--rejete, .badge--expire, .badge--echoue { background: rgba(255,68,68,.18); color: var(--accent-red); }
.badge--non_requis, .badge--non_attribue { background: rgba(184,212,240,.12); color: var(--txt-muted); }
.badge--attribue, .badge--retire { background: rgba(58,155,216,.18); color: var(--primary-light); }

/* ---------- Panier ---------- */
.panier-item {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: .75rem; background: rgba(7, 28, 59, 0.4);
}
.panier-item__infos strong { display: block; }
.panier-item__infos span { font-size: .85rem; color: var(--txt-muted); }
.panier-item__actions { display: flex; gap: .4rem; flex-shrink: 0; }

.total-ligne { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .95rem; }
.total-ligne.total { border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .7rem; font-weight: 800; font-size: 1.1rem; }
.total-ligne .reduc { color: var(--accent-green); }
.total-ligne span:last-child { white-space: nowrap; padding-left: .8rem; }

/* ---------- Messages ---------- */
.message { padding: .85rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; display: none; }
.message.visible { display: block; }
.message--erreur { background: rgba(255,68,68,.12); border: 1px solid var(--accent-red); }
.message--ok { background: rgba(52,199,123,.12); border: 1px solid var(--accent-green); }
.message--info { background: rgba(58,155,216,.12); border: 1px solid var(--border); }

/* ---------- Upload ---------- */
.zone-fichier {
  display: block; margin: 0 0 1rem;
  border: 2px dashed var(--border); border-radius: 12px; padding: 1.2rem;
  text-align: center; cursor: pointer; transition: border-color .2s ease; font-size: .9rem;
}
.zone-fichier:hover { border-color: var(--primary); }
.zone-fichier.ok { border-color: var(--accent-green); }
.zone-fichier.invalide { border-color: var(--accent-red); }
.zone-fichier input[type="file"] { display: none; }

/* ---------- File de vérification des justificatifs ---------- */
.verif-viewer {
  background: #fff; border-radius: 12px; border: 1px solid var(--border);
  height: 62vh; min-height: 380px; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center;
}
.verif-viewer img { max-width: 100%; height: auto; margin: auto; }
.verif-viewer iframe { width: 100%; height: 100%; border: none; }
.verif-viewer .spinner { align-self: center; }
.verif-actions {
  display: flex; gap: .8rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap;
}
.verif-actions .btn { min-width: 160px; font-size: 1.05rem; padding: .85rem 1.5rem; }
.verif-actions kbd {
  background: rgba(0,0,0,.25); border-radius: 5px; padding: 0 .45rem;
  font-family: inherit; font-size: .8rem; margin-left: .35rem;
}

/* ---------- Don (boutons de montants) ---------- */
.don-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.don-chip {
  padding: .55rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(7, 28, 59, 0.4);
  color: var(--txt); font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.don-chip:hover { border-color: var(--accent-gold); }
.don-chip:active { transform: scale(.96); }
.don-chip.active { background: var(--accent-gold); border-color: var(--accent-gold); color: #2a1f00; }

/* ---------- Spinner ---------- */
.spinner {
  width: 34px; height: 34px; margin: 1.2rem auto;
  border: 3px solid rgba(91,180,232,.25); border-top-color: var(--primary);
  border-radius: 50%; animation: rotation .8s linear infinite;
}
@keyframes rotation { to { transform: rotate(360deg); } }

/* ---------- Tableaux (back-office) ---------- */
.tableau-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.tableau { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 760px; }
.tableau th, .tableau td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid rgba(58,155,216,.15); }
.tableau th { background: rgba(7,28,59,.7); font-weight: 700; position: sticky; top: 0; white-space: nowrap; }
.tableau tbody tr { cursor: pointer; }
.tableau tbody tr:hover { background: rgba(58,155,216,.08); }

.filtres { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: end; }
.filtres .champ { margin-bottom: 0; min-width: 150px; flex: 1; }
.filtres .champ--large { min-width: 220px; flex: 2; }

/* ---------- Onglets back-office ---------- */
.onglets { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.onglet {
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--txt-muted); cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600;
}
.onglet.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Panneau détail (back-office) ---------- */
.panneau {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--bg-solid); border-left: 1px solid var(--border);
  box-shadow: var(--shadow); z-index: 1100; padding: 1.5rem;
  overflow-y: auto; transform: translateX(105%); transition: transform .25s ease;
}
.panneau.ouvert { transform: translateX(0); }
.panneau__fermer { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--txt); cursor: pointer; }
.panneau h2 { padding-right: 2.5rem; }
.panneau .ligne-detail { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .9rem; border-bottom: 1px dashed rgba(58,155,216,.12); }
.panneau .ligne-detail span:first-child { color: var(--txt-muted); }
.panneau .ligne-detail span:last-child { text-align: right; word-break: break-word; }

.voile { position: fixed; inset: 0; background: rgba(4,14,30,.6); z-index: 1050; display: none; }
.voile.visible { display: block; }

/* ---------- Stats ---------- */
.stats-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.stat-carte { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; }
.stat-carte strong { font-size: 1.5rem; display: block; font-family: 'Poppins', sans-serif; }
.stat-carte span { font-size: .8rem; color: var(--txt-muted); }
.jauge { height: 6px; background: rgba(184,212,240,.15); border-radius: 999px; margin-top: .5rem; overflow: hidden; }
.jauge > div { height: 100%; background: var(--primary); border-radius: 999px; }
.jauge > div.pleine { background: var(--accent-red); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav__menu { display: none; }
  h1 { font-size: 1.8rem; }
  .page-hero { padding-top: 6rem; }
  .panier-item { flex-direction: column; align-items: flex-start; }
}

/* ---------- Barre de total fixe (étape paiement) ---------- */
.barre-total {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .8rem;
  padding: .55rem 1rem;
  background: rgba(10, 32, 64, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.barre-total span { color: var(--txt-muted); font-size: .9rem; }
.barre-total strong { color: var(--accent-gold); font-size: 1.15rem; }
/* de l'air sous la page pour que la barre ne masque pas les derniers boutons */
#section-paiement { margin-bottom: 4rem; }

/* Informations sous la case du règlement (récapitulatif d'inscription) */
.infos-inscription { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .88rem; color: var(--txt-muted); line-height: 1.6; }
.infos-inscription li { margin-bottom: .35rem; }
