/* Inscription, connexion, invitation — lot « inscription sans rôle » (17/11/2026).
 *
 * Demande de Jérôme : des pages d'inscription « très colorées, comme les pages et onglets actuels,
 * et très intuitives ». Même identité que les pages refaites : bandeau pleine largeur avec la photo
 * de terrain du dépôt, couleurs de la charte (navy, vert, bleu, orange, sarcelle — jamais de violet
 * ni de rose), cartes blanches arrondies, icônes dans des ronds, boutons de 44 px.
 *
 * Une feuille à part, et c'est un choix : l'inscription vit avant toute session et n'a rien à
 * partager avec les styles de l'application authentifiée. `invitation.html` la réutilise.
 *
 * Tenue de 1920 à 320 px, sans défilement horizontal ; focus visible ; animation sobre, coupée par
 * `prefers-reduced-motion`.
 */

:root {
  --navy: #10263f;
  --navy-soft: #1a3857;
  --ink: #152232;
  --muted: #4f5e6d;
  --line: #d6e0e7;
  --surface: #ffffff;
  --surface-soft: #f2f6f8;
  --green: #2e7b59;
  --green-soft: #e7f4ed;
  --blue: #33729b;
  --blue-soft: #e7f1f8;
  --orange: #af561f;
  --orange-soft: #fff0e5;
  --teal: #1d777e;
  --teal-soft: #e4f3f4;
  --amber: #956711;
  --amber-soft: #fdf3e0;
  --red: #b84545;
  --red-soft: #fbeaea;
  --radius: 20px;
  --radius-small: 12px;
  --shadow: 0 14px 36px rgba(16, 38, 63, 0.1);
  --shadow-fort: 0 24px 60px rgba(16, 38, 63, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
}

/* ---------- le bandeau, pleine largeur, photo de terrain ---------- */

.tete {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 30px clamp(16px, 4vw, 56px) 92px;
  color: #fff;
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy-soft) 45%, var(--green) 100%);
}
.tete-visuel {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  z-index: -1;
  background: url("decor-stade-paysage.webp") center 60% / cover no-repeat;
  opacity: 0.38;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #fff 60%);
  mask-image: linear-gradient(90deg, transparent 0%, #fff 60%);
}
.tete-contenu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
}
.tete-contenu { width: 100%; }

.marque {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.tete h1 { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 800; letter-spacing: -0.01em; }
.tete .accroche { margin: 4px 0 0; font-size: 0.98rem; opacity: 0.92; }
.tete .version { margin: 4px 0 0; font-size: 0.78rem; opacity: 0.75; }

/* ---------- la scène ---------- */

main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 clamp(16px, 4vw, 40px) 48px;
  margin-top: -64px;
}

.scene { width: 100%; max-width: 760px; }

.ecran { display: none; }
.ecran[data-actif="oui"] { display: block; animation: apparait 0.28s ease both; }

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

@media (prefers-reduced-motion: reduce) {
  .ecran[data-actif="oui"] { animation: none; }
  .option, .bouton { transition: none !important; }
}

.carte {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-fort);
  padding: clamp(22px, 4vw, 40px);
}
.carte-large { width: min(1080px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); }

.titre {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.titre:focus { outline: none; }
.titre:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 6px; }

.sous-titre { margin: 0 0 24px; color: var(--muted); font-size: 1rem; line-height: 1.5; }

/* ---------- la progression « 2 / 5 » ---------- */

.progression { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.progression .compte {
  flex: none;
  min-width: 56px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
}
.barre { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; border: 1px solid var(--line); }
.barre > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--green));
  transition: width 0.3s ease;
}

/* ---------- les ronds d'icône et les tons ---------- */

.rond {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ton-fond, var(--blue-soft));
  color: var(--ton, var(--blue));
}
.rond svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rond-titre { margin-bottom: 12px; }

[data-ton="bleu"] { --ton: var(--blue); --ton-fond: var(--blue-soft); }
[data-ton="vert"] { --ton: var(--green); --ton-fond: var(--green-soft); }
[data-ton="orange"] { --ton: var(--orange); --ton-fond: var(--orange-soft); }
[data-ton="sarcelle"] { --ton: var(--teal); --ton-fond: var(--teal-soft); }
[data-ton="ambre"] { --ton: var(--amber); --ton-fond: var(--amber-soft); }
[data-ton="navy"] { --ton: var(--navy); --ton-fond: #e6ecf2; }

/* ---------- les grandes cartes à toucher ---------- */

.choix { display: grid; gap: 14px; }
/* Lot du 22/11/2026 : la formule retire des blocs entiers (`hidden`) ; `display: grid` l'emportait
   sur l'attribut, et les catégories restaient affichées pour un pôle. */
.choix[hidden], .champs > [hidden] { display: none; }
.choix-portes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choix-categories { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-bottom: 18px; }
.choix-formules { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choix-clubs { margin-top: 14px; }

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.option:hover { border-color: var(--ton, var(--blue)); box-shadow: var(--shadow); transform: translateY(-2px); }
.option:focus-visible { outline: 3px solid var(--ton, var(--blue)); outline-offset: 3px; }
.option[aria-pressed="true"], .option[aria-checked="true"] {
  border-color: var(--ton, var(--green));
  background: var(--ton-fond, var(--green-soft));
  box-shadow: 0 0 0 1px var(--ton, var(--green));
}
.option[aria-pressed="true"]::after, .option[aria-checked="true"]::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ton, var(--green));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}
.option .nom { font-weight: 750; font-size: 1.08rem; color: var(--navy); }
.option .quoi { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.porte { padding: 22px; border-top: 6px solid var(--ton); }
.porte .rond { margin-bottom: 6px; }

.categorie { align-items: center; text-align: center; padding: 16px 10px; }
.categorie .rond { width: 46px; height: 46px; font-weight: 800; font-size: 0.86rem; }
.categorie .nom { font-size: 1rem; }

.formule { padding: 20px; gap: 10px; border-top: 6px solid var(--ton); }
.formule .prix { font-size: 1.7rem; font-weight: 800; color: var(--ton); line-height: 1.1; }
.formule .prix small { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.formule .saison { font-size: 0.85rem; color: var(--muted); }
.formule ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink); font-size: 0.88rem; line-height: 1.5; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.club { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
.club .rond { width: 44px; height: 44px; }
.club .rond svg { width: 22px; height: 22px; }

/* ---------- les champs ---------- */

.champs { display: grid; gap: 16px; }
.champs.deux { grid-template-columns: 1fr 1fr; }
.champs-encadre { margin-top: 4px; }

label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.facultatif { font-weight: 500; color: var(--muted); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
input:focus-visible, input:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
input[aria-invalid="true"] { border-color: var(--red); }
input[readonly] { background: var(--surface-soft); color: var(--muted); }

.aide { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }

.erreur-champ { margin: 6px 0 0; color: var(--red); font-size: 0.88rem; font-weight: 600; }
.erreur-champ:empty { display: none; }

.regles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.88rem; }
.regles li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.regles li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
}
.regles li[data-ok="oui"] { color: var(--green); font-weight: 650; }
.regles li[data-ok="oui"]::before { content: "✓"; display: grid; place-items: center; border-color: var(--green); background: var(--green); color: #fff; font-size: 0.7rem; font-weight: 800; }

/* ---------- les listes du parcours de configuration ---------- */

.liste { display: grid; gap: 10px; }
.ligne { display: flex; gap: 8px; align-items: center; }
.ligne input { flex: 1; }
.retirer {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
}
.retirer:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.ajouter {
  margin-top: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.ajouter:hover { border-color: var(--green); background: var(--green-soft); }
.groupe { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-small); margin-bottom: 12px; }
.groupe > h3 { margin: 0 0 12px; font-size: 0.98rem; font-weight: 700; }

/* ---------- le récapitulatif ---------- */

.recap { display: grid; gap: 10px; margin-bottom: 8px; }
.recap-ligne {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  border-left: 5px solid var(--ton, var(--teal));
}
.recap-ligne .quoi { color: var(--muted); font-size: 0.92rem; }
.recap-ligne .valeur { font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* ---------- la fin : terrain ---------- */

.carte-fin { text-align: left; }
.terrain { display: block; width: min(320px, 100%); height: auto; margin: 0 0 18px; }
.terrain rect, .terrain line, .terrain circle { fill: none; stroke: var(--green); stroke-width: 2.5; }
.terrain > rect:first-child { fill: var(--green-soft); }
.terrain .point { fill: var(--green); }

.etapes-simples { margin: 0 0 18px; padding-left: 20px; line-height: 1.6; }

/* ---------- les boutons ---------- */

.pied { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; }
.pied .espace { flex: 1; }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 2px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover:not(:disabled) { border-color: var(--navy); }
.bouton:disabled { opacity: 0.5; cursor: not-allowed; }
.bouton:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.bouton-principal {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  min-height: 48px;
}
.bouton-principal:hover:not(:disabled) { background: #256649; border-color: #256649; }
.bouton-large { width: 100%; }
.bouton-discret { border-color: transparent; background: transparent; color: var(--muted); }
.bouton-discret:hover:not(:disabled) { color: var(--navy); background: var(--surface-soft); border-color: transparent; }

.lien-secondaire { margin: 12px 0 0; }
.lien {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  cursor: pointer;
}
.lien:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- les messages ---------- */

.erreur, .succes, .attente {
  margin: 16px 0 0;
  padding: 13px 16px;
  border-radius: var(--radius-small);
  font-size: 0.94rem;
  line-height: 1.5;
}
.erreur { background: var(--red-soft); color: #8d2f2f; border: 1px solid #f0cfcf; }
.succes { background: var(--green-soft); color: #1f5e42; border: 1px solid #c8e6d6; }
.attente { background: var(--blue-soft); color: #255673; border: 1px solid #cfe2ef; }
.erreur:empty, .succes:empty, .attente:empty { display: none; }

/* ---------- les largeurs ---------- */

@media (max-width: 1100px) {
  .choix-formules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .choix-portes { grid-template-columns: 1fr; }
  .porte { flex-direction: row; align-items: center; flex-wrap: wrap; column-gap: 16px; }
  .porte .rond { margin-bottom: 0; }
  .porte .nom { flex: 1; min-width: 140px; }
  .porte .quoi { flex-basis: 100%; }
}

@media (max-width: 560px) {
  .tete { padding: 22px 16px 80px; }
  .tete .accroche { font-size: 0.9rem; }
  .marque { width: 44px; height: 44px; border-radius: 13px; }
  main { padding: 0 12px 32px; margin-top: -56px; }
  .carte { padding: 20px 16px; border-radius: 16px; }
  .carte-large { width: calc(100vw - 24px); }
  .champs.deux { grid-template-columns: 1fr; }
  .choix-formules { grid-template-columns: 1fr; }
  .choix-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pied .bouton-principal { flex: 1 1 100%; order: -1; }
  .pied .espace { display: none; }
  .recap-ligne { flex-direction: column; gap: 4px; }
  .recap-ligne .valeur { text-align: left; }
}

/* ---------- Partie E bis : essai, devise, période, comment payer ---------- */

.badge-essai { background: var(--green-soft); color: var(--green); margin-right: 6px; }
.bascules { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.bascule { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--line); }
.bascule-choix {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.bascule-choix[aria-pressed="true"] { background: var(--navy); color: #fff; }
.bascule-choix:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.info-role { margin-top: 18px; }
.formule .role { font-size: 0.88rem; color: var(--muted); margin-top: -6px; }

.surtitre { margin: 0 0 4px; color: var(--teal); font-weight: 800; letter-spacing: 0.08em; font-size: 0.8rem; }
.suivi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 6px; }
.suivi-pas { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.suivi-pas::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--line); }
.suivi-pas[data-fait="oui"] { color: var(--green); }
.suivi-pas[data-fait="oui"]::before { background: var(--green); }
.suivi-pas[data-en-cours="oui"] { color: var(--orange); }
.suivi-pas[data-en-cours="oui"]::before { background: var(--orange); box-shadow: 0 0 0 5px var(--orange-soft); }
.comment-payer { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-small); }
.comment-payer h3 { margin: 0 0 12px; color: var(--navy); }
.cadenas { margin: 18px 0 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius-small); color: var(--muted); font-size: 0.92rem; }
.formule .prix small { display: block; margin-top: 4px; }
.bascule-pays { margin-bottom: 16px; flex-wrap: wrap; }
