/* ==========================================================================
   VBPV — Design system inscriptions 2026/2027
   Couleurs du club : bleu marine + jaune (logo)
   ========================================================================== */
:root {
  --bleu: #1b3c8f;
  --bleu-fonce: #122a66;
  --bleu-nuit: #0c1d47;
  --jaune: #ffcc00;
  --jaune-fonce: #e6b400;
  --fond: #f4f6fb;
  --carte: #ffffff;
  --encre: #1a2233;
  --encre-douce: #55607a;
  --ligne: #dde3ef;
  --ok: #1e9e5a;
  --erreur: #d43c3c;
  --rayon: 14px;
  --ombre: 0 6px 24px rgba(18, 42, 102, 0.10);
  --ombre-forte: 0 12px 40px rgba(18, 42, 102, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fond);
  color: var(--encre);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Footer toujours collé en bas, même sur les pages courtes */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; width: 100%; }
main[hidden] { display: none; }

img { max-width: 100%; }

a { color: var(--bleu); }

/* ------------------------------------------------------------------ En-tête */
.entete {
  background: linear-gradient(135deg, var(--bleu-fonce) 0%, var(--bleu) 70%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--ombre);
}

.entete__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.entete__logo { width: 52px; height: 52px; object-fit: contain; }

.entete__titre { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.02em; line-height: 1.25; }
.entete__titre small { display: block; font-weight: 500; color: #c9d4f2; font-size: 0.78rem; }

.entete__nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.entete__lien {
  color: #e8edfa;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s;
}
.entete__lien:hover { background: rgba(255, 255, 255, 0.14); }
.entete__lien--actif { background: var(--jaune); color: var(--bleu-nuit); }
.entete__lien--actif:hover { background: var(--jaune-fonce); }

/* --------------------------------------------------------------------- Héros */
.heros {
  background:
    radial-gradient(1000px 400px at 85% -20%, rgba(255, 204, 0, 0.22), transparent 60%),
    linear-gradient(135deg, var(--bleu-nuit) 0%, var(--bleu) 100%);
  color: #fff;
  padding: 64px 20px 84px;
  text-align: center;
  /* Arrondi du bas via border-radius : contrairement à clip-path, il ne
     provoque pas de bug de rendu quand les boutons s'animent au survol. */
  border-radius: 0 0 50% 50% / 0 0 42px 42px;
}

.heros h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4.5vw, 2.7rem);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.heros__sous {
  max-width: 620px;
  margin: 0 auto 30px;
  color: #d4ddf6;
  font-size: 1.06rem;
}

.heros .btn--jaune { font-size: 1.1rem; padding: 16px 34px; }
.heros__note { margin-top: 14px; font-size: 0.88rem; color: #b9c6ec; }

/* ------------------------------------------------------------------- Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  font-family: inherit;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); }
.btn:active { transform: translateY(0); }

.btn--jaune { background: var(--jaune); color: var(--bleu-nuit); box-shadow: 0 6px 20px rgba(255, 204, 0, 0.35); }
.btn--jaune:hover { background: var(--jaune-fonce); }

.btn--bleu { background: var(--bleu); color: #fff; }
.btn--bleu:hover { background: var(--bleu-fonce); }

.btn--contour {
  background: transparent;
  color: var(--bleu);
  border: 2px solid var(--bleu);
}
.btn--contour:hover { background: var(--bleu); color: #fff; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ----------------------------------------------------------------- Structure */
.conteneur { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.conteneur--etroit { max-width: 860px; }

/* Pages « pleine largeur » (espace admin) : on exploite l'écran à ~94 %
   pour limiter les marges blanches, avec un plafond sur très grands écrans. */
.page-large .entete__inner,
.page-large .conteneur { max-width: min(94%, 1900px); }
@media (max-width: 900px) {
  .page-large .entete__inner,
  .page-large .conteneur { max-width: 100%; }
}

.section { padding: 46px 0; }

.section__titre {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--bleu-fonce);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section__titre::before {
  content: "";
  width: 8px;
  height: 28px;
  border-radius: 4px;
  background: var(--jaune);
  flex: none;
}
.section__sous { color: var(--encre-douce); margin: 0 0 24px; }

.carte {
  background: var(--carte);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 26px 28px;
}

/* ------------------------------------------------------------ Étapes (accueil) */
.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: -46px; position: relative; z-index: 2; }

.etape { text-align: left; }
.etape__num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bleu);
  color: var(--jaune);
  font-weight: 900;
  font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.etape h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--bleu-fonce); }
.etape p { margin: 0; color: var(--encre-douce); font-size: 0.93rem; }

/* ------------------------------------------------------------------ Tarifs */
.tarifs { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tarifs th {
  background: var(--bleu);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
}
.tarifs th:first-child { border-radius: 10px 0 0 0; }
.tarifs th:last-child { border-radius: 0 10px 0 0; }
.tarifs td { padding: 11px 16px; border-bottom: 1px solid var(--ligne); }
.tarifs tr:nth-child(even) td { background: #f8faff; }
.tarifs td:last-child { font-weight: 800; color: var(--bleu-fonce); white-space: nowrap; }

.badge-maillot {
  display: inline-block;
  background: #fff3c4;
  color: #7a6200;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 1px 8px;
  margin-left: 6px;
  white-space: nowrap;
}

/* ------------------------------------------------------------- Listes doc */
.liste-docs { list-style: none; padding: 0; margin: 0; }
.liste-docs li {
  padding: 10px 0 10px 34px;
  position: relative;
  border-bottom: 1px dashed var(--ligne);
}
.liste-docs li:last-child { border-bottom: none; }
.liste-docs li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 9px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #e3f4ea;
  color: var(--ok);
  font-weight: 900;
  font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
}

.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.encart-contact {
  background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu));
  color: #fff;
  border-radius: var(--rayon);
  padding: 26px 28px;
}
.encart-contact h3 { margin: 0 0 10px; }
.encart-contact a { color: var(--jaune); font-weight: 700; text-decoration: none; }

/* -------------------------------------------------------------- Pied de page */
.pied {
  margin-top: auto;
  background: var(--bleu-nuit);
  color: #9fb0d8;
  text-align: center;
  padding: 26px 20px;
  font-size: 0.88rem;
  flex-shrink: 0;
}

/* ==========================================================================
   FORMULAIRE
   ========================================================================== */
.stepper {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 30px auto 26px;
  max-width: 720px;
}
.stepper__etape {
  flex: 1;
  text-align: center;
  position: relative;
  color: var(--encre-douce);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.stepper__etape:hover::before {
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(27, 60, 143, 0.15);
}
.stepper__etape::before {
  content: attr(data-num);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #e6eaf5;
  color: var(--encre-douce);
  font-weight: 800;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.stepper__etape::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 3px;
  border-radius: 2px;
  background: #e6eaf5;
}
.stepper__etape:last-child::after { display: none; }

.stepper__etape--active { color: var(--bleu-fonce); }
.stepper__etape--active::before { background: var(--jaune); color: var(--bleu-nuit); border-color: var(--jaune-fonce); }

.stepper__etape--faite { color: var(--bleu); }
.stepper__etape--faite::before { content: "✓"; background: var(--bleu); color: #fff; }
.stepper__etape--faite::after { background: var(--bleu); }

.form-panneau { display: none; }
.form-panneau--visible { display: block; animation: apparait 0.25s ease; }

@keyframes apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

fieldset { border: none; padding: 0; margin: 0 0 8px; }

legend {
  font-weight: 800;
  color: var(--bleu-fonce);
  font-size: 1.02rem;
  padding: 0;
  margin-bottom: 12px;
}

.champs { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 16px; }

.champ { display: flex; flex-direction: column; gap: 5px; }
.champ--12 { grid-column: span 12; }
.champ--8 { grid-column: span 8; }
.champ--6 { grid-column: span 6; }
.champ--4 { grid-column: span 4; }
.champ--3 { grid-column: span 3; }

.champ label { font-weight: 600; font-size: 0.88rem; color: var(--encre); }
.champ label .req { color: var(--erreur); }
.champ .aide { font-size: 0.78rem; color: var(--encre-douce); }

.champ input, .champ select, .champ textarea {
  font: inherit;
  padding: 11px 13px;
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--encre);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(27, 60, 143, 0.14);
  background: #fff;
}
/* Champ en erreur : bordure rouge + clignotement pour attirer l'œil */
@keyframes clignote-erreur {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 60, 60, 0); }
  20%, 60% { box-shadow: 0 0 0 5px rgba(212, 60, 60, 0.35); }
  40%, 80% { box-shadow: 0 0 0 0 rgba(212, 60, 60, 0); }
}
.invalide,
.champ input.invalide, .champ select.invalide {
  border-color: var(--erreur) !important;
  background: #fff7f7;
  animation: clignote-erreur 1.6s ease 2;
}
.champ .message-erreur { color: var(--erreur); font-size: 0.78rem; display: none; }
.champ input.invalide ~ .message-erreur, .champ select.invalide ~ .message-erreur { display: block; }
.champ .date-triple--invalide ~ .message-erreur { display: block; }

/* --------------------------------------- Sélecteur de date jour / mois / année */
.date-triple {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.2fr;
  gap: 8px;
}
.date-triple select {
  font: inherit;
  padding: 11px 8px;
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--encre);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.date-triple select:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(27, 60, 143, 0.14);
  background: #fff;
}
.date-triple select:hover { border-color: var(--bleu); }

/* Groupe de pastilles radio obligatoire non renseigné */
.choix-cartes--invalide .choix-carte span {
  border-color: var(--erreur);
  background: #fff7f7;
  animation: clignote-erreur 1.6s ease 2;
}

/* Case à cocher obligatoire manquante */
.case--invalide {
  border-color: var(--erreur) !important;
  background: #fff7f7;
  animation: clignote-erreur 1.6s ease 2;
}

.info-bulle--erreur {
  background: #fdecec;
  border-left: 4px solid var(--erreur);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: #8f2323;
  margin: 14px 0;
}

/* ------------------------------------------------- Questionnaire de santé */
.sante-section {
  color: var(--bleu-fonce);
  font-size: 0.98rem;
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--jaune);
}
.question-sante {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.question-sante:nth-child(even) { background: #f6f8fd; }
.question-sante label { font-weight: 500; font-size: 0.9rem; flex: 1; }
.choix-cartes--compact { flex: none; }
.choix-cartes--compact .choix-carte span { padding: 7px 16px; font-size: 0.85rem; }

/* Récapitulatif santé sur la fiche A4 */
.fa4-sante-ligne {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 0.35% 0;
  background-image: repeating-linear-gradient(to right, #ccc 0 2px, transparent 2px 6px);
  background-size: 100% 1px;
  background-position: left bottom;
  background-repeat: no-repeat;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  font-size: 0.82em;
  line-height: 1.35;
}
.fa4-sante-q { flex: 1; }
.fa4-sante-r { font-weight: 800; flex: none; }
.fa4-sante-r--oui { color: #b91c1c; }

/* Cartes radio (type d'inscription, sexe…) */
.choix-cartes { display: flex; gap: 12px; flex-wrap: wrap; }
.choix-carte { position: relative; }
.choix-carte input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix-carte span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 2px solid var(--ligne);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--encre-douce);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.choix-carte input:checked + span {
  border-color: var(--bleu);
  background: var(--bleu);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27, 60, 143, 0.25);
}
.choix-carte input:focus-visible + span { box-shadow: 0 0 0 3px rgba(27, 60, 143, 0.3); }

/* Cases à cocher stylées */
.case {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 16px;
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  background: #fbfcff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 10px;
  font-size: 0.93rem;
}
.case:hover { border-color: var(--bleu); }
.case input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--bleu); flex: none; cursor: pointer; }
.case--cochee { border-color: var(--bleu); background: #eef3ff; }

.info-bulle {
  background: #eef3ff;
  border-left: 4px solid var(--bleu);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--bleu-fonce);
  margin: 14px 0;
}
.info-bulle--jaune { background: #fff8de; border-color: var(--jaune-fonce); color: #6d5900; }

.categorie-detectee {
  background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu));
  border-radius: 12px;
  color: #fff;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.categorie-detectee strong { color: var(--jaune); font-size: 1.2rem; }

.form-boutons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--ligne);
}

.separateur { border: none; border-top: 1px solid var(--ligne); margin: 22px 0; }

/* ==========================================================================
   FICHE A4 (page de confirmation — reproduction du PDF)
   ========================================================================== */
.fiche-a4 {
  background: #fff;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 30px;
  aspect-ratio: 210 / 297;
  box-shadow: var(--ombre-forte);
  border-radius: 4px;
  padding: 4.2% 4.8%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #111;
  font-size: clamp(8px, 1.55vw, 12.5px);
  line-height: 1.45;
  overflow: hidden;
}

.fa4-entete { display: flex; align-items: center; gap: 3%; margin-bottom: 4%; }
/* Hauteur commune : les deux logos (rognés au même calibre) paraissent de taille identique */
.fa4-entete img { height: 5.5em; width: auto; max-width: 16%; object-fit: contain; }
.fa4-entete__titre { flex: 1; text-align: center; font-weight: 800; font-size: 1.55em; line-height: 1.3; }

.fa4-bloc-haut { display: flex; gap: 5%; align-items: flex-start; margin-bottom: 3.5%; }
.fa4-types { flex: none; }
.fa4-identite { flex: 1; font-size: 1.25em; font-weight: 600; }

.fa4-case { display: flex; align-items: baseline; gap: 6px; margin: 2px 0; }
.fa4-case__box {
  display: inline-block;
  width: 0.85em; height: 0.85em;
  border: 1.5px solid #111;
  border-radius: 2px;
  flex: none;
  position: relative;
  top: 1px;
  text-align: center;
  line-height: 0.8em;
  font-size: 0.9em;
  font-weight: 900;
}
.fa4-case__box--cochee::before { content: "✕"; position: relative; top: -0.12em; }

.fa4-ligne { margin: 1.6% 0; display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.fa4-ligne b { font-weight: 700; }

.fa4-valeur {
  flex: 1;
  min-width: 60px;
  /* Ligne pointillée dessinée (identique à l'écran et à l'impression,
     contrairement à border dotted que les navigateurs rendent différemment en PDF) */
  background-image: repeating-linear-gradient(to right, #777 0 2px, transparent 2px 6px);
  background-size: 100% 1.5px;
  background-position: left bottom;
  background-repeat: no-repeat;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  font-weight: 600;
  color: var(--bleu-fonce);
  padding: 0 4px;
  min-height: 1.2em;
}
.fa4-valeur--fixe { flex: none; }

.fa4-titre-section { text-align: center; font-weight: 800; margin: 3.5% 0 2%; }

.fa4-contacts { display: flex; gap: 3%; }
.fa4-contact { flex: 1; border: 1.5px solid #111; padding: 2% 2.5%; }
.fa4-contact__titre { text-align: center; text-decoration: underline; font-weight: 700; margin-bottom: 3%; }

.fa4-note { font-size: 0.78em; margin: 1.5% 0 0; color: #333; }

.fa4-signature { margin-top: 3%; font-style: italic; text-align: center; font-size: 0.92em; }
.fa4-cachet {
  margin: 2% auto 0;
  max-width: 65%;
  border: 2px solid var(--ok);
  color: var(--ok);
  border-radius: 8px;
  text-align: center;
  padding: 1.5% 3%;
  font-weight: 700;
  font-style: normal;
  font-size: 0.9em;
  background: #f2fbf6;
}

/* Page 2 de la fiche : liste des pièces + tableau des cotisations */
.fiche-a4--page2 { font-size: clamp(7px, 1.35vw, 11px); }

.fa4-liste { margin: 1% 0 2%; padding-left: 5%; }
.fa4-liste li { margin: 0.6% 0; }

.fa4-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
  line-height: 1.3;
}
.fa4-table th, .fa4-table td {
  border: 1px solid #111;
  padding: 0.45% 2%;
  text-align: center;
}
.fa4-table th { font-weight: 700; }
.fa4-table__choisie td {
  background: #eef3ff;
  font-weight: 700;
  color: var(--bleu-fonce);
}

/* --------------------------------------------------------- Confirmation page */
.barre-confirmation {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--ligne);
  padding: 14px 20px;
  display: flex;
  justify-content: center;
  gap: 14px;
  z-index: 40;
  box-shadow: 0 -6px 24px rgba(18, 42, 102, 0.10);
}

/* Overlay d'envoi au secrétariat */
.overlay-envoi {
  position: fixed;
  inset: 0;
  background: rgba(12, 29, 71, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.overlay-envoi[hidden] { display: none; }
.overlay-envoi__boite {
  text-align: center;
  color: #fff;
  padding: 30px;
  max-width: 420px;
}
.overlay-envoi__boite h3 { margin: 20px 0 8px; font-size: 1.25rem; }
.overlay-envoi__boite p { margin: 0; color: #c9d4f2; font-size: 0.95rem; }

.spinner {
  width: 66px;
  height: 66px;
  margin: 0 auto;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--jaune);
  animation: tourne 0.9s linear infinite;
  position: relative;
}
.spinner::after {
  content: "🏐";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  animation: tourne 0.9s linear infinite reverse; /* le ballon reste droit */
}
@keyframes tourne { to { transform: rotate(360deg); } }

.ecran-succes { text-align: center; padding: 60px 20px; }
.ecran-succes__icone {
  width: 84px; height: 84px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #e3f4ea;
  color: var(--ok);
  font-size: 2.6rem;
  display: flex; align-items: center; justify-content: center;
}
.ecran-succes h2 { color: var(--bleu-fonce); margin: 0 0 8px; }
.ecran-succes .numero {
  display: inline-block;
  background: var(--bleu);
  color: var(--jaune);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  border-radius: 10px;
  padding: 10px 24px;
  margin: 14px 0 20px;
}

/* --------------------------------------------------- Dépôt de documents */
.dropzone {
  border: 2.5px dashed var(--bleu);
  border-radius: var(--rayon);
  background: #f4f8ff;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.dropzone:hover, .dropzone--survol {
  background: #e8f0ff;
  border-color: var(--jaune-fonce);
  box-shadow: var(--ombre);
}
.dropzone__icone { font-size: 2.6rem; margin-bottom: 8px; }
.dropzone p { margin: 4px 0; color: var(--encre-douce); }
.dropzone strong { color: var(--bleu-fonce); }

.fichier-liste { list-style: none; padding: 0; margin: 16px 0 0; max-width: 100%; }
.fichier-liste li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--carte);
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  max-width: 100%;
  overflow: hidden;
}
/* min-width:0 indispensable : sans lui, le nom long pousse la ligne hors du cadre */
.fichier-liste .fichier-nom { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lignes de dépôt : une par type de pièce */
.piece-ligne {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px dashed var(--ligne);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fbfcff;
  max-width: 100%;
}
.piece-ligne:hover, .piece-ligne--survol { border-color: var(--bleu); background: #eef3ff; }
.piece-ligne--remplie { border-style: solid; border-color: var(--ok); background: #f2fbf6; }
.piece-ligne__icone { font-size: 1.6rem; flex: none; }
.piece-ligne__infos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.piece-ligne__infos small { color: var(--encre-douce); }
.piece-ligne__fichier {
  font-size: 0.85rem; font-weight: 600; color: var(--ok);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.piece-ligne__action { flex: none; display: flex; align-items: center; gap: 8px; }
.piece-ligne .fichier-retirer { background: none; border: none; cursor: pointer; color: var(--erreur); font-size: 1.05rem; }

/* Bloc captcha de la barre de confirmation */
.captcha-bloc {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef3ff;
  border: 1.5px solid var(--ligne);
  border-radius: 999px;
  padding: 6px 8px 6px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bleu-fonce);
}
.captcha-bloc input {
  width: 64px;
  font: inherit;
  padding: 7px 10px;
  border: 1.5px solid var(--ligne);
  border-radius: 999px;
  text-align: center;
  background: #fff;
}
/* Mode reCAPTCHA : le widget Google remplace la question */
.captcha-bloc--recaptcha {
  background: none;
  border: none;
  padding: 0;
  border-radius: 4px;
}
.fichier-liste .fichier-taille { color: var(--encre-douce); font-size: 0.82rem; flex: none; }
.fichier-liste .fichier-retirer {
  background: none; border: none; cursor: pointer;
  color: var(--erreur); font-size: 1.05rem; padding: 2px 6px; flex: none;
}

/* ---------------------------------------------------------------- Admin */
.barre-recherche {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--carte);
  border-radius: 12px;
  box-shadow: var(--ombre);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.barre-recherche input[type="search"] {
  flex: 2;
  min-width: 220px;
  font: inherit;
  padding: 10px 14px;
  border: 1.5px solid var(--ligne);
  border-radius: 999px;
  background: #fbfcff;
}
.barre-recherche input[type="search"]:focus { outline: none; border-color: var(--bleu); }
.barre-recherche select {
  font: inherit;
  font-size: 0.88rem;
  padding: 9px 10px;
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  background: #fbfcff;
  cursor: pointer;
}
.barre-recherche .compteur-resultats { font-size: 0.85rem; color: var(--encre-douce); margin-left: auto; }

.table-admin th[data-tri] { cursor: pointer; user-select: none; white-space: nowrap; }
.table-admin th[data-tri]:hover { background: var(--bleu-fonce); }
.table-admin th .fleche-tri { opacity: 0.5; font-size: 0.75rem; }
.table-admin th.tri-actif .fleche-tri { opacity: 1; color: var(--jaune); }

/* Suivi des règlements (modale, format onglet SUIVI LICENCES) */
.table-reglements { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 12px 0; }
.table-reglements th {
  background: #eef3ff; color: var(--bleu-fonce);
  padding: 8px 10px; text-align: left; font-size: 0.8rem;
}
.table-reglements td { padding: 7px 10px; border-bottom: 1px solid var(--ligne); }
.table-reglements input, .table-reglements select {
  font: inherit; font-size: 0.88rem;
  padding: 7px 9px;
  border: 1.5px solid var(--ligne); border-radius: 8px;
  background: #fbfcff; width: 100%;
}

.recap-paiement {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin: 14px 0;
}
.recap-paiement__bloc {
  flex: 1; min-width: 120px;
  background: #f6f8fd; border-radius: 10px;
  padding: 10px 16px; text-align: center;
}
.recap-paiement__bloc strong { display: block; font-size: 1.25rem; color: var(--bleu-fonce); }
.recap-paiement__bloc small { color: var(--encre-douce); }
.recap-paiement__bloc--ok { background: #e3f4ea; }
.recap-paiement__bloc--ko { background: #fff3c4; }

.table-admin { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table-admin th {
  text-align: left; padding: 12px 14px;
  background: var(--bleu); color: #fff; font-weight: 700;
}
.table-admin td { padding: 11px 14px; border-bottom: 1px solid var(--ligne); }
.table-admin tr:hover td { background: #f2f6ff; }

/* Étiquettes : contraste renforcé + bordure pour rester lisibles partout */
.pastille {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
  border: 1.5px solid transparent;
  white-space: nowrap;
  margin: 1px 0;
}
.pastille--nouveau { background: #ffe27a; color: #4a3a00; border-color: #d9b52e; }
.pastille--traite { background: #b9ecd0; color: #0b5c33; border-color: #35a56b; }
.pastille--mineur { background: #ffc9dd; color: #8f0f4b; border-color: #e26a9d; }
.pastille--majeur { background: #c5d9ff; color: #122a66; border-color: #5b7fd0; }
.pastille--certif { background: #ffd9c2; color: #7a3300; border-color: #e08a4e; }
.pastille--docs { background: #dcd2f7; color: #3c2a80; border-color: #8f78d8; }

.admin-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.admin-stat {
  background: var(--carte);
  border-radius: 12px;
  box-shadow: var(--ombre);
  padding: 14px 22px;
  font-size: 0.9rem;
  color: var(--encre-douce);
}
.admin-stat strong { display: block; font-size: 1.5rem; color: var(--bleu-fonce); }

.btn--mini { padding: 6px 14px; font-size: 0.82rem; }

.lien-invisible {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.lien-discret {
  background: none;
  border: none;
  color: var(--bleu);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  font-family: inherit;
}

/* ------------------------------------------- Éditeur du mail de paiement */
.editeur-mail .champ textarea {
  font: inherit;
  font-size: 0.92rem;
  padding: 12px 14px;
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  background: #fbfcff;
  resize: vertical;
  line-height: 1.5;
}
.editeur-mail .champ textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(27, 60, 143, 0.14);
  background: #fff;
}

.chips-variables { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-var {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bleu-fonce);
  background: #eef3ff;
  border: 1.5px dashed var(--bleu);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip-var:hover { background: var(--bleu); color: #fff; }

.apercu-mail { margin: 16px 0 4px; }
.apercu-mail summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--bleu);
  font-size: 0.9rem;
  user-select: none;
}
.apercu-mail__cadre {
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  background: #fbfcff;
  padding: 16px 18px;
  margin-top: 10px;
}
.apercu-mail__meta { font-size: 0.88rem; color: var(--encre-douce); margin-bottom: 6px; }
.apercu-mail__sujet {
  font-weight: 800;
  color: var(--bleu-fonce);
  border-bottom: 1px solid var(--ligne);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.apercu-mail__corps {
  font-family: inherit;
  font-size: 0.9rem;
  white-space: pre-wrap;
  margin: 0;
  line-height: 1.55;
  color: var(--encre);
}

/* Aperçu des documents dans l'admin */
.doc-carte {
  border: 1.5px solid var(--ligne);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fbfcff;
}
.doc-carte__entete {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.doc-apercu {
  display: block;
  max-width: 100%;
  max-height: 340px;
  border-radius: 8px;
  border: 1px solid var(--ligne);
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
}
.doc-apercu--pdf { width: 100%; height: 380px; }

.modale-fond {
  position: fixed; inset: 0;
  background: rgba(12, 29, 71, 0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  overflow-y: auto;
  z-index: 100;
}
.modale-fond--ouverte { display: flex; }
.modale { max-width: 820px; width: 100%; }
.modale__fermer {
  position: sticky; top: 0;
  margin-left: auto;
  display: flex;
  margin-bottom: 10px;
}

/* -------------------------------------------------------------- Impression
   Seules les pages A4 de la fiche doivent sortir à l'impression / export PDF. */
@media print {
  @page { size: A4 portrait; margin: 8mm; }

  body { background: #fff !important; display: block; min-height: 0; }

  .entete, .pied, .barre-confirmation, .stepper, .no-print,
  .overlay-envoi, .modale-fond, .admin-actions, .form-boutons { display: none !important; }

  main, .conteneur { padding: 0 !important; margin: 0 !important; max-width: none !important; }

  /* Les conteneurs des fiches ne doivent introduire aucun décalage vertical :
     quelques millimètres de trop et la première page déborde, ce qui insère
     une feuille blanche parasite entre les pages. */
  #apercu-fiche, #apercu-fiche-succes, #conteneur-fiche, #modale-contenu {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* La fiche imprimée doit être STRICTEMENT identique à l'affichage écran :
     mêmes tailles de police (valeurs plafond du clamp écran), couleurs et
     fonds conservés, pointillés dessinés à l'identique. */
  .fiche-a4 {
    box-shadow: none !important;
    border-radius: 0;
    max-width: 100% !important;
    width: 100%;
    margin: 0 !important;
    /* Hauteur calée sous la zone imprimable (297mm - 2×8mm de marges = 281mm)
       pour garantir 1 fiche = 1 feuille, sans page blanche de débordement. */
    aspect-ratio: auto;
    height: 271mm;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    font-size: 12.5px;
  }
  .fiche-a4, .fiche-a4 * {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
  .fiche-a4:last-child { page-break-after: auto; }
  .fiche-a4--page2 { font-size: 11px; }
}

/* --------------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .barre-recherche select { flex: 1; min-width: 130px; }
}

@media (max-width: 760px) {
  .etapes { grid-template-columns: 1fr; margin-top: -30px; }
  .grille-2 { grid-template-columns: 1fr; }
  .champ--8, .champ--6, .champ--4, .champ--3 { grid-column: span 12; }

  /* La navigation reste accessible : elle passe sous le titre */
  .entete__inner { flex-wrap: wrap; padding: 8px 14px; }
  .entete__nav { margin-left: 0; width: 100%; justify-content: flex-start; padding-bottom: 4px; }
  .entete__lien { padding: 6px 12px; font-size: 0.82rem; }
  .entete__logo { width: 40px; height: 40px; }
  .entete__titre { font-size: 0.92rem; }

  .heros { padding: 40px 16px 64px; }
  .carte { padding: 20px 16px; }
  .section { padding: 32px 0; }

  .form-boutons { flex-direction: column-reverse; }
  .form-boutons .btn { width: 100%; }
  .stepper { gap: 0; }
  .stepper__etape { font-size: 0.62rem; }
  .stepper__etape::before { width: 30px; height: 30px; }
  .stepper__etape::after { top: 15px; left: calc(50% + 20px); width: calc(100% - 40px); }

  /* Questionnaire de santé : question au-dessus, réponses en dessous */
  .question-sante { flex-direction: column; align-items: flex-start; gap: 8px; }

  .choix-cartes { gap: 8px; }
  .choix-carte span { padding: 10px 16px; font-size: 0.88rem; }

  .barre-confirmation { flex-wrap: wrap; }
  .barre-confirmation .btn { flex: 1; min-width: 150px; }

  .admin-stat { padding: 10px 14px; font-size: 0.8rem; }
  .admin-stat strong { font-size: 1.2rem; }
  .admin-actions .btn { flex: 1; }

  .barre-recherche input[type="search"] { flex-basis: 100%; }

  .recap-paiement { gap: 8px; }
  .recap-paiement__bloc { padding: 8px 10px; min-width: 100px; }
  .table-reglements { font-size: 0.8rem; }
  .table-reglements th, .table-reglements td { padding: 6px 6px; }

  .modale-fond { padding: 14px 8px; }
  .dropzone { padding: 30px 14px; }
  .ecran-succes { padding: 40px 14px; }
  .overlay-envoi__boite { padding: 20px; }
}

@media (max-width: 420px) {
  .heros h1 { font-size: 1.45rem; }
  .tarifs { font-size: 0.82rem; }
  .tarifs th, .tarifs td { padding: 8px 8px; }
  .fichier-liste li { flex-wrap: wrap; }
}
