/* ==========================================================================
   Talion Krav Maga — formulaire d'inscription
   Les logos étant des JPEG noir sur fond blanc, ils sont systématiquement
   posés sur une pastille blanche pour éviter les rectangles disgracieux.
   ========================================================================== */

:root {
  --encre: #14110f;
  --encre-douce: #5b524c;
  --encre-tenue: #8c817a;
  --fond: #f4f2ef;
  --surface: #ffffff;
  --trait: #e0dbd5;
  --trait-fort: #c7c0b8;
  --accent: #c8102e;
  --accent-sombre: #9b0c23;
  --accent-voile: #fdf0f2;
  --succes: #1f7a4d;
  --succes-voile: #edf7f1;

  --rayon: 10px;
  --rayon-large: 16px;
  --ombre: 0 1px 2px rgb(20 17 15 / 6%), 0 8px 24px rgb(20 17 15 / 6%);

  --largeur-max: 760px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

abbr {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

/* ---------- En-tête ---------- */

.entete {
  background: var(--encre);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}

.entete__contenu {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 26px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.entete__logo {
  width: 92px;
  height: auto;
  background: #fff;
  border-radius: var(--rayon);
  padding: 8px;
  flex-shrink: 0;
}

.entete h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4.2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.entete__saison {
  margin: 6px 0 0;
  color: #b9b1ab;
  font-size: 0.9rem;
}

/* ---------- Structure ---------- */

.page {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.intro {
  margin: 0 0 18px;
  color: var(--encre-douce);
}

.obligatoire-note {
  margin: 0 0 22px;
  font-size: 0.85rem;
  color: var(--encre-tenue);
}

.bloc {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--rayon-large);
  box-shadow: var(--ombre);
  padding: 22px 22px 24px;
  margin: 0 0 20px;
}

.bloc__titre {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bloc__num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--encre);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.bloc--mineur {
  border-color: var(--trait-fort);
  border-left: 4px solid var(--accent);
}

.sous-titre {
  margin: 24px 0 2px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Champs ---------- */

.champ,
.sous-champ {
  display: block;
  margin: 0 0 18px;
  border: 0;
  padding: 0;
  min-width: 0;
}

.champ:last-child,
.sous-champ:last-child {
  margin-bottom: 0;
}

.champ label,
.sous-champ legend,
.etiquette {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0;
}

.sous-champ legend {
  margin-bottom: 10px;
  line-height: 1.45;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--encre);
  background: var(--surface);
  border: 1px solid var(--trait-fort);
  border-radius: var(--rayon);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
.depot:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(200 16 46 / 18%);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--accent);
  background: var(--accent-voile);
}

.champ--court {
  max-width: 300px;
}

.grille {
  display: grid;
  gap: 0 16px;
}

@media (min-width: 560px) {
  .grille--2 {
    grid-template-columns: 1fr 1fr;
  }
  .grille--cp-ville {
    grid-template-columns: 150px 1fr;
  }
}

.aide {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--encre-tenue);
  line-height: 1.4;
}

.aide--bloc {
  margin-bottom: 12px;
}

.facultatif {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--encre-tenue);
  border: 1px solid var(--trait-fort);
  border-radius: 999px;
  padding: 2px 8px;
}

.erreur {
  display: none;
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
}

.erreur:not(:empty) {
  display: block;
}

.erreur--globale {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--accent-voile);
  border: 1px solid var(--accent);
  border-radius: var(--rayon);
  font-weight: 600;
}

.encart-info {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--accent-voile);
  border-radius: var(--rayon);
  font-size: 0.88rem;
  color: var(--encre-douce);
}

/* ---------- Cases et boutons radio ---------- */

.choix {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choix--colonne {
  flex-direction: column;
  gap: 8px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--trait-fort);
  border-radius: var(--rayon);
  cursor: pointer;
  font-size: 0.94rem;
  transition: border-color 0.15s, background 0.15s;
}

.radio:hover {
  border-color: var(--encre-tenue);
}

.radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-voile);
  font-weight: 600;
}

.radio input {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  margin: 0;
  flex-shrink: 0;
}

.choix--colonne .radio {
  padding: 9px 12px;
}

/* ---------- Contacts d'urgence ---------- */

.contact {
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 16px;
  margin-bottom: 12px;
  background: #fbfaf9;
}

.contact__titre {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--encre-tenue);
}

.contact .champ {
  margin-bottom: 12px;
}

@media (min-width: 620px) {
  .contact__grille {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 12px;
  }
}

/* ---------- Dépôt de fichier ---------- */

.depot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 14px;
  border: 1.5px dashed var(--trait-fort);
  border-radius: var(--rayon);
  background: #fbfaf9;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.depot:hover {
  border-color: var(--accent);
}

.depot--rempli {
  border-style: solid;
  border-color: var(--succes);
  background: var(--succes-voile);
}

.depot input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.depot__intitule {
  padding: 8px 14px;
  background: var(--encre);
  color: #fff;
  border-radius: var(--rayon);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.depot__etat {
  font-size: 0.86rem;
  color: var(--encre-douce);
  overflow-wrap: anywhere;
}

.apercu-photo {
  display: block;
  margin-top: 12px;
  width: 105px;
  height: 135px;
  object-fit: cover;
  border: 1px solid var(--trait-fort);
  border-radius: 6px;
  background: #fff;
}

/* ---------- Envoi ---------- */

.envoi {
  margin-top: 26px;
}

.bouton {
  display: inline-block;
  width: 100%;
  padding: 15px 24px;
  border: 0;
  border-radius: var(--rayon);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.bouton:hover {
  background: var(--accent-sombre);
}

.bouton[disabled] {
  background: var(--encre-tenue);
  cursor: progress;
}

/* Action secondaire : présente sans concurrencer le téléchargement du dossier. */
.bouton--secondaire {
  margin-top: 12px;
  background: transparent;
  color: var(--encre);
  border: 1.5px solid var(--trait-fort);
}

.bouton--secondaire:hover {
  background: var(--fond);
  border-color: var(--encre-tenue);
}

.mention-rgpd {
  margin: 16px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--encre-tenue);
}

/* ---------- Confirmation ---------- */

.succes {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-top: 4px solid var(--succes);
  border-radius: var(--rayon-large);
  box-shadow: var(--ombre);
  padding: 32px 24px;
  text-align: center;
}

.succes__marque {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--succes-voile);
  color: var(--succes);
  font-size: 1.7rem;
  font-weight: 700;
}

.succes h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.succes__intro {
  margin: 0 auto 24px;
  max-width: 46ch;
  color: var(--encre-douce);
}

/* Envoi de courriel en échec : l'inscription tient, mais le PDF ne partira pas. */
.alerte {
  margin: 0 auto 22px;
  max-width: 52ch;
  padding: 14px 16px;
  background: #fff8e6;
  border: 1px solid #d9a300;
  border-radius: var(--rayon);
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b4c00;
  text-align: left;
}

.alerte__detail {
  display: block;
  margin-top: 8px;
  font-weight: 400;
  font-size: 0.82rem;
  opacity: 0.85;
}

.succes__rappel {
  margin-top: 30px;
  padding: 20px 22px;
  background: #fbfaf9;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  text-align: left;
}

.succes__rappel h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.succes__rappel ol {
  margin: 0;
  padding-left: 20px;
  color: var(--encre-douce);
  font-size: 0.92rem;
}

.succes__rappel li + li {
  margin-top: 8px;
}

.succes__consigne {
  margin: 20px 0 0;
  padding: 14px 16px;
  background: var(--accent-voile);
  border-radius: var(--rayon);
  font-weight: 600;
  font-size: 0.92rem;
  text-align: left;
}

/* ---------- Pied de page ---------- */

.pied {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 26px 20px 44px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--trait);
  font-size: 0.82rem;
  color: var(--encre-tenue);
}

.pied img {
  width: 52px;
  height: auto;
  flex-shrink: 0;
  mix-blend-mode: multiply;
}

.pied p {
  margin: 0;
}

.pied a {
  color: var(--encre-douce);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
