/* ============================================================
   Formulaires publics — candidature, complément, renouvellement
   Mobile-first. Tap targets ≥ 44px. Inputs 16px (anti-zoom iOS).
   ============================================================ */

/* ------------------------------------------------------------
   Conteneur formulaire
   ------------------------------------------------------------ */
.form-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.form-progress {
  position: sticky;
  top: 0;
  height: 3px;
  background: rgba(136, 153, 170, 0.14);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
  z-index: 5;
}
.form-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transition: width 0.4s var(--easing);
}

/* ------------------------------------------------------------
   Sections repliables
   ------------------------------------------------------------ */
.form-section {
  padding: 1.25rem 1.25rem 1.5rem;
  margin: 0 0 1rem;
  background: rgba(11, 26, 47, 0.7);
  border: 1px solid rgba(136, 153, 170, 0.16);
  border-radius: var(--radius-lg);
}

.form-section > legend {
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.form-section__hint {
  margin: 0.25rem 0 1rem;
  font-size: 0.9rem;
  color: var(--silver-400);
}

/* ------------------------------------------------------------
   Grille de champs
   ------------------------------------------------------------ */
.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .form-grid--2-1 { grid-template-columns: 2fr 1fr; }
  .form-grid--1-2-2 { grid-template-columns: 1fr 2fr 2fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.field--full { grid-column: 1 / -1; }

/* [hidden] doit toujours cacher — sinon display:flex/grid des éléments
   parents écrase l'attribut HTML natif */
[hidden] { display: none !important; }

.field label,
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--silver-100);
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.field label .required,
.form-label .required { color: var(--gold-400); }

/* ------------------------------------------------------------
   Inputs / textareas / selects
   ------------------------------------------------------------ */
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="number"],
.field input[type="date"],
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  font: 500 16px/1.4 'Inter', system-ui, sans-serif;
  color: var(--silver-100);
  background: rgba(6, 13, 24, 0.55);
  border: 1px solid rgba(136, 153, 170, 0.25);
  border-radius: var(--radius-sm);
  transition:
    border-color 0.2s var(--easing),
    background 0.2s var(--easing),
    box-shadow 0.2s var(--easing);
  -webkit-appearance: none;
  appearance: none;
}

/* Champs date : force la palette sombre du popup calendrier natif
   (Chromium et Firefox respectent color-scheme pour le date picker). */
.field input[type="date"] {
  color-scheme: dark;
  padding-right: 2.5rem;
  cursor: pointer;
}
.field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
  filter: invert(72%) sepia(48%) saturate(410%) hue-rotate(2deg) brightness(92%) contrast(88%);
  padding: 0.25rem;
  transition: opacity 0.15s var(--easing);
}
.field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}
.field input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.field input[type="date"]::-webkit-datetime-edit-text,
.field input[type="date"]::-webkit-datetime-edit-year-field,
.field input[type="date"]::-webkit-datetime-edit-month-field,
.field input[type="date"]::-webkit-datetime-edit-day-field {
  color: var(--silver-100);
}
.field input[type="date"]:not(:focus):not(:valid)::-webkit-datetime-edit {
  color: var(--silver-400);
}
.field textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}
.field select {
  padding-right: 2.5rem;
  background-image:
    url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23C4983E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
.field select option { color: var(--silver-100); background: var(--navy-900); }

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: rgba(196, 152, 62, 0.45);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold-400);
  background: rgba(6, 13, 24, 0.75);
  box-shadow: 0 0 0 3px rgba(196, 152, 62, 0.14);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--silver-400); opacity: 0.7; }

.field--error input,
.field--error textarea,
.field--error select {
  border-color: var(--danger);
}
.field__error {
  font-size: 0.8rem;
  color: #F0BABA;
  min-height: 1rem;
}

/* ------------------------------------------------------------
   Radio cards (formule, département)
   ------------------------------------------------------------ */
.radio-cards {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .radio-cards { grid-template-columns: repeat(3, 1fr); }
}

.radio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1rem 0.85rem;
  background: rgba(6, 13, 24, 0.55);
  border: 1px solid rgba(136, 153, 170, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 0.2s var(--easing),
    background 0.2s var(--easing),
    box-shadow 0.2s var(--easing),
    transform 0.2s var(--easing);
  min-height: 92px;
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card__title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--silver-100);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.radio-card__price {
  font-size: 0.85rem;
  color: var(--gold-400);
  font-weight: 500;
}
.radio-card__desc {
  font-size: 0.85rem;
  color: var(--silver-400);
  line-height: 1.4;
}
.radio-card:hover {
  border-color: rgba(196, 152, 62, 0.5);
  background: rgba(11, 26, 47, 0.7);
  transform: translateY(-1px);
}
.radio-card:has(input:checked),
.radio-card.is-checked {
  border-color: var(--gold-400);
  background: rgba(196, 152, 62, 0.10);
  box-shadow: 0 0 0 3px rgba(196, 152, 62, 0.12), var(--gold-glow);
}
.radio-card:has(input:focus-visible) {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

/* Variante département — chaque département a sa couleur (ARP bleu, OSINT vert, IE ocre) */
.radio-card--dept .radio-card__title { color: var(--silver-100); }

.radio-card--arp   { border-color: rgba(78, 123, 192, 0.35); }
.radio-card--arp:hover { border-color: rgba(78, 123, 192, 0.7); }
.radio-card--arp:has(input:checked),
.radio-card--arp.is-checked {
  border-color: var(--arp);
  background: rgba(78, 123, 192, 0.14);
  box-shadow: 0 0 0 3px rgba(78, 123, 192, 0.18);
}
.radio-card--arp:has(input:checked) .radio-card__title,
.radio-card--arp.is-checked .radio-card__title { color: #B7CDF0; }

.radio-card--osint { border-color: rgba(90, 175, 92, 0.35); }
.radio-card--osint:hover { border-color: rgba(90, 175, 92, 0.7); }
.radio-card--osint:has(input:checked),
.radio-card--osint.is-checked {
  border-color: var(--osint);
  background: rgba(61, 90, 62, 0.28);
  box-shadow: 0 0 0 3px rgba(90, 175, 92, 0.22);
}
.radio-card--osint:has(input:checked) .radio-card__title,
.radio-card--osint.is-checked .radio-card__title { color: #B2D8B4; }

.radio-card--ie    { border-color: rgba(139, 105, 20, 0.4); }
.radio-card--ie:hover { border-color: rgba(139, 105, 20, 0.75); }
.radio-card--ie:has(input:checked),
.radio-card--ie.is-checked {
  border-color: var(--ie);
  background: rgba(139, 105, 20, 0.22);
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.25);
}
.radio-card--ie:has(input:checked) .radio-card__title,
.radio-card--ie.is-checked .radio-card__title { color: #E7C77A; }

/* Section département désactivée (formule Correspondant) */
.radio-cards.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.6);
}
.form-section__hint--disabled {
  color: var(--silver-400);
  font-style: italic;
  margin-top: 0.4rem;
}

/* ------------------------------------------------------------
   Feedback validation en temps réel (tous les champs)
   ------------------------------------------------------------
   - Champ avec valeur invalide : bordure ROUGE (persiste jusqu'à correction)
   - Champ avec valeur valide + focus : bordure VERTE (feedback OK temporaire)
   - Au blur : le vert disparaît → retour à la couleur or par défaut
     (les focus:invalid gardent le rouge)
   Concerne email, url, tel, number, date, pattern=..., textarea, select. */

/* Note : .promo-input a son propre système d'états (is-checking / is-invalid /
   is-valid piloté par paiement.js). On l'exclut explicitement des règles
   génériques ci-dessous, sinon le :valid natif (aucun pattern → toujours
   valide) écraserait le rouge de "vérification en cours" avec du vert. */
.field input[placeholder]:not(.promo-input):not(:placeholder-shown):invalid,
.field textarea[placeholder]:not(:placeholder-shown):invalid {
  border-color: var(--danger);
  background-color: rgba(200, 60, 60, 0.06);
}
.field input[placeholder]:not(.promo-input):not(:placeholder-shown):invalid:focus,
.field textarea[placeholder]:not(:placeholder-shown):invalid:focus {
  outline: none;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(200, 60, 60, 0.15);
}

.field input[placeholder]:not(.promo-input):focus:not(:placeholder-shown):valid,
.field textarea[placeholder]:focus:not(:placeholder-shown):valid {
  outline: none;
  border-color: var(--success);
  background: rgba(6, 13, 24, 0.75);
  box-shadow: 0 0 0 3px rgba(107, 159, 138, 0.18);
}

/* Hint sous le champ : neutre par défaut, rouge quand le champ est
   invalide (le combinateur ~ trouve le hint qui suit l'input dans le
   même .field). */
.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--silver-400);
  transition: color 0.15s ease;
}
.field input[placeholder]:not(.promo-input):not(:placeholder-shown):invalid ~ .field-hint {
  color: var(--danger);
  font-weight: 500;
}
.field input[placeholder]:not(.promo-input):not(:placeholder-shown):valid ~ .field-hint {
  color: var(--success);
}

/* Selects (pas de :placeholder-shown : on cible :required + :invalid) */
.field select:required:invalid {
  border-color: rgba(136, 153, 170, 0.25); /* état neutre tant que rien choisi */
}
.field select:required:valid:focus {
  outline: none;
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(107, 159, 138, 0.18);
}

/* Champ obligatoire manquant après tentative submit */
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea,
.field.is-invalid .upload-zone,
.checkbox.is-invalid,
.radio-cards.is-invalid {
  border-color: var(--danger) !important;
  background-color: rgba(200, 60, 60, 0.06);
  box-shadow: 0 0 0 3px rgba(200, 60, 60, 0.12);
}

/* Toast d'erreurs de validation (submit) */
.form-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 900;
  max-width: 380px;
  background: rgba(20, 5, 5, 0.96);
  border: 1px solid var(--danger);
  border-left-width: 4px;
  border-radius: 6px;
  padding: 0.9rem 1rem 0.9rem 1rem;
  color: var(--silver-100);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  animation: form-toast-slide 0.25s ease-out;
}
.form-toast__title {
  color: #F5A9A9;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 0.5rem;
  padding-right: 2.2rem; /* réserve la place de la croix pour éviter le chevauchement */
  font-weight: 600;
}
.form-toast__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.form-toast__list li { margin: 0.15rem 0; }
.form-toast__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 60, 60, 0.14);
  border: 1px solid rgba(200, 60, 60, 0.35);
  border-radius: 4px;
  cursor: pointer;
  color: var(--silver-100);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  transition: background 0.15s var(--easing), border-color 0.15s var(--easing);
}
.form-toast__close:hover,
.form-toast__close:focus-visible {
  background: rgba(200, 60, 60, 0.28);
  border-color: var(--danger);
  color: #FFECEC;
  outline: none;
}

@keyframes form-toast-slide {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 480px) {
  .form-toast {
    left: 0.5rem; right: 0.5rem; top: 0.5rem;
    max-width: none;
  }
}

/* ------------------------------------------------------------
   Autocomplete (adresse BAN)
   ------------------------------------------------------------ */
.autocomplete-field { position: relative; }
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 4px 0 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--navy-800);
  border: 1px solid rgba(196, 152, 62, 0.35);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  color: var(--silver-100);
  cursor: pointer;
  transition: background 0.15s var(--easing), color 0.15s var(--easing);
}
.autocomplete-item:hover,
.autocomplete-item.is-active {
  background: rgba(196, 152, 62, 0.14);
  color: var(--gold-300);
}

/* ------------------------------------------------------------
   Cases à cocher (consentements)
   ------------------------------------------------------------ */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(136, 153, 170, 0.2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s var(--easing), background 0.2s var(--easing);
  min-height: 44px;
}
.checkbox:hover { border-color: rgba(196, 152, 62, 0.4); }
.checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--gold-500);
  cursor: pointer;
}
.checkbox__label {
  font-size: 0.9rem;
  color: var(--silver-100);
  opacity: 0.9;
  line-height: 1.5;
}
.checkbox__label a { font-weight: 500; }

/* ------------------------------------------------------------
   Upload zone (drag-and-drop + fallback input)
   ------------------------------------------------------------ */
.upload-zone {
  position: relative;
  padding: 1.25rem;
  border: 2px dashed rgba(196, 152, 62, 0.35);
  border-radius: var(--radius);
  background: rgba(6, 13, 24, 0.35);
  text-align: center;
  transition: border-color 0.2s var(--easing), background 0.2s var(--easing);
}
.upload-zone.is-dragging {
  border-color: var(--gold-400);
  background: rgba(196, 152, 62, 0.08);
}
.upload-zone__cta {
  font-size: 0.95rem;
  color: var(--silver-100);
  margin-bottom: 0.35rem;
}
.upload-zone__cta button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold-400);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.upload-zone__cta button:hover { color: var(--gold-300); }
.upload-zone__hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--silver-400);
}
.upload-zone__files {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}
.upload-file {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: rgba(11, 26, 47, 0.8);
  border: 1px solid rgba(136, 153, 170, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.upload-file__icon { color: var(--gold-400); flex-shrink: 0; }
.upload-file__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--silver-100);
}
.upload-file__size {
  flex-shrink: 0;
  color: var(--silver-400);
  font-size: 0.8rem;
}
.upload-file__remove {
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 0.25rem;
  color: var(--silver-400);
  cursor: pointer;
  transition: color 0.2s var(--easing), transform 0.2s var(--easing);
}
.upload-file__remove:hover { color: var(--danger); transform: rotate(90deg); }

/* ------------------------------------------------------------
   Actions submit
   ------------------------------------------------------------ */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (min-width: 560px) {
  .form-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }
  .form-actions .btn { min-width: 200px; }
}
.form-actions__hint {
  font-size: 0.8rem;
  color: var(--silver-400);
  margin: 0;
  flex: 1;
}

/* Bouton spinner (submit en cours) */
.btn.is-loading { pointer-events: none; opacity: 0.7; }
.btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 0.5rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner 0.75s linear infinite;
}
@keyframes spinner { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------
   Statuts badges
   ------------------------------------------------------------ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status-nouvelle           { color: #C4D5EE; background: rgba(78,123,192,0.16); }
.status-en_examen          { color: #E7C77A; background: rgba(139,105,20,0.20); }
.status-complement_demande { color: #F0D497; background: rgba(214,162,71,0.16); }
.status-validee            { color: #C7E5D9; background: rgba(107,159,138,0.20); }
.status-paiement_en_cours  { color: #C7E5D9; background: rgba(107,159,138,0.14); }
.status-active             { color: #B2D8B4; background: rgba(90,175,92,0.20); }
.status-refusee            { color: #F0BABA; background: rgba(200,60,60,0.18); }
.status-expiree, .status-anonymisee { color: var(--silver-400); background: rgba(136,153,170,0.14); }

/* ------------------------------------------------------------
   Timeline suivi
   ------------------------------------------------------------ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-400), transparent);
  opacity: 0.4;
}
.timeline li {
  position: relative;
  padding: 0.35rem 0 0.6rem 2rem;
  font-size: 0.9rem;
  color: var(--silver-100);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(196,152,62,0.18);
}
.timeline__date {
  display: block;
  font-size: 0.75rem;
  color: var(--silver-400);
  margin-bottom: 0.15rem;
}

/* ------------------------------------------------------------
   Responsive fin
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .form-section { padding: 1rem 0.9rem 1.15rem; }
  .radio-card   { min-height: 84px; padding: 0.85rem 0.9rem; }
}

/* ------------------------------------------------------------
   Modal (règlement intérieur, RGPD, etc.) — v0.8.5
   ------------------------------------------------------------ */
.modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(6, 13, 24, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modal-fade .2s ease-out;
}
.modal__panel {
  position: relative;
  background: var(--navy-900);
  border: 1px solid rgba(196,152,62,0.35);
  border-radius: 8px;
  width: 100%;
  max-width: 820px;
  max-height: calc(100vh - 2rem);
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 40px rgba(196,152,62,0.08);
  animation: modal-pop .22s cubic-bezier(.2,.9,.3,1.1);
  overflow: hidden;
}
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), transparent);
}
.modal__title {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-400);
  font-weight: 600;
}
.modal__close {
  background: none; border: 1px solid rgba(255,255,255,0.1);
  color: var(--silver-100);
  width: 34px; height: 34px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.modal__close:hover { background: rgba(255,255,255,0.05); border-color: var(--gold-400); color: var(--gold-400); }
.modal__body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
}
.modal__body h1 { font-size: 1.4rem; margin-top: 0; }
.modal__body h2 { font-size: 1rem; margin-top: 1.5rem; text-transform: uppercase; letter-spacing: 0.08em; }
.modal__body p, .modal__body li { font-size: 0.9rem; line-height: 1.55; }
.modal__body .page-close { display: none; }
.modal__footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: flex-end;
  gap: 0.65rem;
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
}
body.modal-open { overflow: hidden; }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop  { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .modal { padding: 0; align-items: stretch; }
  .modal__panel {
    max-height: 100vh;
    border-radius: 0;
    border-left: none; border-right: none;
    max-width: none;
  }
  .modal__body { padding: 1rem; }
  .modal__body h1 { font-size: 1.15rem; }
}

/* Checkbox désactivée : texte grisé par couleur (pas opacity, sinon les
   enfants comme les liens sont eux aussi rendus semi-transparents à cause
   du stacking context créé par opacity). Le lien "règlement intérieur"
   garde sa couleur or vive pour signaler clairement le point d'action. */
.checkbox input:disabled + .checkbox__label {
  color: var(--silver-400);
  cursor: not-allowed;
}
.checkbox input:disabled + .checkbox__label a {
  color: var(--gold-400);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.checkbox input:disabled + .checkbox__label a:hover {
  color: var(--gold-300);
}

/* ------------------------------------------------------------
   Paiement : récapitulatif + promo dynamique + modal don libre
   v0.8.30
   ------------------------------------------------------------ */
.recap-grid {
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
}
.recap-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 1rem;
  align-items: baseline;
}
.recap-row dt {
  margin: 0;
  color: var(--silver-400);
  font-weight: 400;
}
.recap-row dd { margin: 0; }
.recap-row .muted { color: var(--silver-400); font-size: 0.85rem; }
.recap-row--promo dd strong { color: var(--success); }
.recap-row--don   dd strong { color: var(--gold-400); }
@media (max-width: 480px) {
  .recap-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .recap-row dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
}

/* Champ code promo : rouge / vert / gris selon état */
.promo-input {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field .promo-input.is-invalid,
.field .promo-input.is-checking {
  border-color: var(--danger);
  background-color: rgba(200, 60, 60, 0.06);
  box-shadow: 0 0 0 3px rgba(200, 60, 60, 0.12);
}
.field .promo-input.is-valid {
  border-color: var(--success);
  background-color: rgba(107, 159, 138, 0.08);
  box-shadow: 0 0 0 3px rgba(107, 159, 138, 0.14);
}
.field .promo-input.is-valid:focus {
  border-color: var(--success);
}
.promo-status {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  min-height: 1.1em;
  color: var(--silver-400);
  font-weight: 500;
  transition: color 0.15s ease;
}
.promo-status.is-invalid  { color: var(--danger); }
.promo-status.is-valid    { color: var(--success); }
.promo-status.is-checking { color: var(--silver-400); font-style: italic; }

/* Modal "Don libre" : compteur animé + slider + saisie manuelle */
.don-libre-modal {
  position: fixed; inset: 0;
  z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(6, 13, 24, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease-out;
}
.don-libre-modal.is-visible { opacity: 1; }
body.don-libre-open { overflow: hidden; }

.don-libre-modal__panel {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border: 1px solid rgba(196, 152, 62, 0.4);
  border-top: 3px solid var(--gold-500);
  border-radius: 12px;
  padding: 1.75rem 1.75rem 1.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(196, 152, 62, 0.12);
  transform: translateY(10px) scale(0.97);
  transition: transform 0.28s cubic-bezier(.2,.9,.3,1.15);
  text-align: center;
}
.don-libre-modal.is-visible .don-libre-modal__panel {
  transform: none;
}
.don-libre-modal__title {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--gold-400);
}
.don-libre-modal__counter {
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1.05;
  margin: 0.75rem 0 1.35rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(196, 152, 62, 0.25);
}
.don-libre-modal__currency {
  color: var(--gold-400);
  font-size: 0.55em;
  font-weight: 500;
  margin-left: 0.25em;
  letter-spacing: 0;
}
.don-libre-modal__slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(196, 152, 62, 0.2);
  border-radius: 999px;
  outline: none;
  margin: 0.5rem 0 0.35rem;
}
.don-libre-modal__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 3px solid var(--navy-900);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(196, 152, 62, 0.5);
  transition: transform 0.1s ease;
}
.don-libre-modal__slider::-webkit-slider-thumb:hover,
.don-libre-modal__slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}
.don-libre-modal__slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 3px solid var(--navy-900);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(196, 152, 62, 0.5);
}
.don-libre-modal__scale {
  display: flex;
  justify-content: space-between;
  color: var(--silver-400);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  margin: 0 0 1.1rem;
  padding: 0 2px;
}
.don-libre-modal__manual {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  text-align: left;
}
.don-libre-modal__manual label {
  font-size: 0.72rem;
  color: var(--silver-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.don-libre-modal__manual input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: 500 16px/1.4 'Inter', system-ui, sans-serif;
  color: var(--silver-100);
  background: rgba(6, 13, 24, 0.65);
  border: 1px solid rgba(136, 153, 170, 0.28);
  border-radius: 6px;
}
.don-libre-modal__manual input:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(196, 152, 62, 0.14);
}
.don-libre-modal__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(196, 152, 62, 0.15);
}
.don-libre-modal__actions .btn { min-width: 110px; }
@media (max-width: 480px) {
  .don-libre-modal__panel { padding: 1.35rem 1.15rem 1.15rem; }
  .don-libre-modal__actions { flex-direction: column-reverse; }
  .don-libre-modal__actions .btn { width: 100%; }
}

/* ------------------------------------------------------------
   Liste de justificatifs par formule — v0.8.10
   ------------------------------------------------------------ */
.doc-list {
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  background: rgba(196,152,62,0.05);
  border: 1px solid rgba(196,152,62,0.18);
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--silver-100);
}
.doc-list li {
  position: relative;
  padding-left: 1.1rem;
  margin: 0.35rem 0;
}
.doc-list li::before {
  content: "";
  position: absolute;
  left: 0.05rem;
  top: 0.65rem;
  width: 5px;
  height: 5px;
  background: var(--gold-400);
  border-radius: 50%;
}
.doc-list li em {
  color: var(--silver-400);
  font-style: italic;
  font-size: 0.85em;
}

/* Bouton "J'ai lu le règlement" verrouillé tant que pas scrollé au bas du modal */
.btn[disabled], .btn.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
