/* =====================================================================
   L'AFSC 2026 – Formulaire d'accréditation Pro & Presse
   Charte : affiche officielle de la 8e édition (sable, noir, blanc)
   Préfixe .afsc- pour cohabiter avec n'importe quel thème WordPress
   ===================================================================== */

.afsc-wrap {
  --afsc-sand: #f3cba7;        /* fond de l'affiche (haut)            */
  --afsc-sand-deep: #d5a984;   /* fond de l'affiche (bas) → bordures  */
  --afsc-sand-tint: #fff8f1;   /* teinte des champs                   */
  --afsc-sand-line: #e6c9ad;   /* lignes fines                        */
  --afsc-paper: #ffffff;
  --afsc-ink: #000000;         /* les pastilles noires de l'affiche   */
  --afsc-ink-soft: #6b4a36;    /* texte secondaire (ombres du visage) */
  --afsc-error: #b5321e;
  --afsc-error-tint: #fdeeeb;
  --afsc-ok: #1e6a3b;
  --afsc-radius: 18px;
  --afsc-radius-sm: 12px;
  --afsc-font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --afsc-ring: 0 0 0 4px rgba(0, 0, 0, .14);

  container-type: inline-size;
  container-name: afsc;
  color-scheme: light;
  font-family: var(--afsc-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--afsc-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.afsc-wrap :where(h1, h2, h3, p, ul, dl, dd, fieldset, legend) {
  margin: 0; padding: 0;
}

.afsc-wrap :where(fieldset) { border: 0; min-width: 0; }

.afsc-wrap [hidden] { display: none !important; }

.afsc-wrap :focus-visible {
  outline: 3px solid var(--afsc-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Structure : affiche + colonne formulaire ---------------- */

.afsc-accred {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--afsc-sand);
  min-height: 100%;
}

.afsc-accred--embed {
  border-radius: 28px;
  overflow: clip;
}

/* Affiche paysage en tête (disposition par défaut) */
.afsc-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--afsc-sand);
  overflow: hidden;
}

.afsc-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.afsc-col {
  padding: clamp(20px, 3.5cqw, 40px) clamp(18px, 4.5cqw, 56px) clamp(40px, 6cqw, 64px);
}

.afsc-inner {
  max-width: 880px;
  margin: 0 auto;
}

/* Variante [afsc_accreditation layout="side"] : l'affiche portrait en colonne à partir
   de 900 px, l'affiche paysage en bandeau en dessous. Choix fait par conteneur (pas par
   fenêtre) ; seule l'image utile est chargée. */
.afsc-poster--side {
  aspect-ratio: auto;
  height: clamp(220px, 56cqw, 360px);
  background-image: var(--afsc-banner);
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

.afsc-accred--side .afsc-inner { max-width: 780px; }

@container afsc (min-width: 900px) {
  .afsc-accred--side {
    grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
    align-items: start;
  }
  .afsc-poster--side {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
    height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
    background-image: var(--afsc-poster);
    background-position: 50% 35%;
  }
  .afsc-accred--side .afsc-inner { margin: 0; }
  .afsc-accred--side .afsc-col { padding-top: clamp(22px, 4.5cqw, 56px); }
}

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

.afsc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.afsc-heading { flex: 1 1 auto; min-width: 0; }

.afsc-title {
  font-size: clamp(20px, 2.6cqw, 28px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.afsc-sub {
  font-size: 14.5px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--afsc-ink-soft);
}

/* Sélecteur de langue */
.afsc-lang {
  flex: 0 0 auto;
  display: inline-flex;
  padding: 3px;
  border: 1.5px solid var(--afsc-ink);
  border-radius: 999px;
  background: transparent;
}

.afsc-lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--afsc-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}

.afsc-lang button[aria-pressed="true"] {
  background: var(--afsc-ink);
  color: #fff;
}

/* ---------- Étapes (accordéon) --------------------------------------- */

.afsc-steps { display: grid; gap: 14px; }

.afsc-step {
  background: var(--afsc-paper);
  border: 1px solid var(--afsc-sand-deep);
  border-radius: var(--afsc-radius);
}

.afsc-step-head { font-size: inherit; }

.afsc-step-toggle {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border: 0;
  background: transparent;
  color: var(--afsc-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--afsc-radius);
}

.afsc-step-toggle[aria-disabled="true"] { cursor: default; }

.afsc-step-num {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--afsc-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.afsc-step-num svg { width: 16px; height: 16px; display: none; }

.afsc-step.is-done .afsc-step-num span { display: none; }
.afsc-step.is-done .afsc-step-num svg { display: block; }

.afsc-step.is-locked .afsc-step-num {
  background: transparent;
  color: var(--afsc-ink-soft);
  border: 1.5px solid var(--afsc-sand-deep);
}

.afsc-step-title {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.afsc-step.is-locked .afsc-step-title { color: var(--afsc-ink-soft); }

.afsc-step-edit {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: none;
}

.afsc-step.is-done:not(.is-open) .afsc-step-edit { display: inline; }
.afsc-step .afsc-step-toggle[aria-disabled="true"] .afsc-step-edit { display: none; }

/* Ouverture / fermeture animées (grid-template-rows 0fr → 1fr) */
.afsc-step-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s ease;
}

.afsc-step.is-open .afsc-step-panel { grid-template-rows: 1fr; }

.afsc-step-panel > div {
  overflow: hidden;
  min-height: 0;
}

.afsc-step-body {
  padding: 4px 22px 26px;
  border-top: 1px solid var(--afsc-sand-line);
  margin-top: 0;
}

.afsc-step.is-open .afsc-step-body { padding-top: 22px; }

.afsc-step-intro {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--afsc-ink);
  margin: 0 0 22px;
  max-width: 62ch;
}

.afsc-step-intro strong { font-weight: 800; }

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

.afsc-grid { display: grid; gap: 18px; }

.afsc-row { display: grid; gap: 18px; }

@container afsc (min-width: 640px) {
  .afsc-row--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .afsc-row--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
}

.afsc-field { display: grid; gap: 7px; }

.afsc-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.afsc-optional {
  font-weight: 500;
  color: var(--afsc-ink-soft);
}

.afsc-wrap legend.afsc-label { margin-bottom: 9px; }

.afsc-hint--under { margin-bottom: 10px; }

.afsc-hint {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--afsc-ink-soft);
  line-height: 1.45;
}

.afsc-input,
.afsc-select,
.afsc-textarea {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--afsc-sand-line);
  border-radius: var(--afsc-radius-sm);
  background: var(--afsc-sand-tint);
  color: var(--afsc-ink);
  font: inherit;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.afsc-input::placeholder,
.afsc-textarea::placeholder { color: #a08a79; font-weight: 500; }

.afsc-input:hover,
.afsc-select:hover,
.afsc-textarea:hover { border-color: var(--afsc-sand-deep); }

.afsc-input:focus,
.afsc-select:focus,
.afsc-textarea:focus {
  outline: none;
  border-color: var(--afsc-ink);
  background: #fff;
  box-shadow: var(--afsc-ring);
}

.afsc-textarea { min-height: 112px; resize: vertical; }

.afsc-select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

.afsc-field.is-invalid .afsc-input,
.afsc-field.is-invalid .afsc-select,
.afsc-field.is-invalid .afsc-textarea,
.afsc-field.is-invalid .afsc-drop,
.afsc-field.is-invalid .afsc-photo-box {
  border-color: var(--afsc-error);
  background: var(--afsc-error-tint);
}

.afsc-error {
  display: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--afsc-error);
}

.afsc-field.is-invalid .afsc-error { display: block; }

/* Téléphone : indicatif + numéro */
.afsc-phone {
  display: grid;
  grid-template-columns: minmax(118px, 150px) 1fr;
}

.afsc-phone .afsc-select {
  border-right: 0;
  border-radius: var(--afsc-radius-sm) 0 0 var(--afsc-radius-sm);
  padding-right: 36px;
  padding-left: 12px;
  font-variant-numeric: tabular-nums;
}

.afsc-phone .afsc-input {
  border-radius: 0 var(--afsc-radius-sm) var(--afsc-radius-sm) 0;
}

.afsc-phone .afsc-select:focus {
  position: relative;
  z-index: 1;
  border-right: 1.5px solid var(--afsc-ink);
}

/* Choix du type d'accréditation : trois cartes radio (Presse, Pro, École) */
.afsc-choice {
  display: grid;
  gap: 12px;
}

@container afsc (min-width: 560px) and (max-width: 759.98px) {
  .afsc-choice { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .afsc-choice label:nth-child(3) { grid-column: 1 / -1; }
}

@container afsc (min-width: 760px) {
  .afsc-choice { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .afsc-choice label { align-content: start; }
}

.afsc-choice label {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 18px 16px 52px;
  border: 1.5px solid var(--afsc-sand-line);
  border-radius: 16px;
  background: var(--afsc-sand-tint);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.afsc-choice label:hover { border-color: var(--afsc-sand-deep); }

.afsc-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.afsc-choice-mark {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1.5px solid var(--afsc-sand-deep);
  background: #fff;
  display: grid;
  place-items: center;
}

.afsc-choice-mark svg { width: 13px; height: 13px; opacity: 0; }

.afsc-choice-title { font-size: 14.5px; font-weight: 800; }
.afsc-choice-desc { font-size: 12.5px; font-weight: 500; color: var(--afsc-ink-soft); }

.afsc-choice input:checked + .afsc-choice-mark {
  background: var(--afsc-ink);
  border-color: var(--afsc-ink);
}

.afsc-choice input:checked + .afsc-choice-mark svg { opacity: 1; }

.afsc-choice label:has(input:checked) {
  border-color: var(--afsc-ink);
  background: #fff;
}

.afsc-choice input:focus-visible ~ .afsc-choice-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Films présentés et équipes (catégorie Professionnel) */
.afsc-films { display: grid; gap: 14px; }

.afsc-films:not(:empty) { margin-bottom: 6px; }

.afsc-film {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1.5px solid var(--afsc-sand-deep);
  border-radius: 16px;
  background: var(--afsc-paper);
}

.afsc-film-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.afsc-film-num {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--afsc-ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
}

.afsc-team {
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
  border: 1.5px solid var(--afsc-sand-line);
  border-radius: var(--afsc-radius-sm);
  background: var(--afsc-sand-tint);
}

.afsc-team .afsc-input { background: #fff; }
.afsc-team .afsc-btn--add { min-height: 42px; }

.afsc-team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.afsc-members { display: grid; gap: 14px; }

.afsc-members:empty { display: none; }

.afsc-member {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--afsc-sand-deep);
}

.afsc-member:first-child { padding-top: 0; border-top: 0; }

.afsc-member-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.afsc-member-num {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--afsc-ink-soft);
}

.afsc-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--afsc-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.afsc-link:hover { color: var(--afsc-error); }

.afsc-btn--add {
  width: 100%;
  border-style: dashed;
  min-height: 46px;
}

.afsc-btn--add:hover { border-style: solid; }

/* Mention obligatoire sous le titulaire du billet cérémonies */
.afsc-holder-note {
  padding: 10px 14px;
  border-left: 3px solid var(--afsc-ink);
  border-radius: 0 var(--afsc-radius-sm) var(--afsc-radius-sm) 0;
  background: var(--afsc-sand-tint);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}

/* Photo */
.afsc-photo {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
}

.afsc-photo-box {
  position: relative;
  width: 112px;
  height: 112px;
  border: 1.5px dashed var(--afsc-sand-deep);
  border-radius: 16px;
  background: var(--afsc-sand-tint);
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.afsc-photo-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.afsc-photo-box.has-file { border-style: solid; }
.afsc-photo-box.has-file img { display: block; }
.afsc-photo-box.has-file .afsc-photo-plus { display: none; }

.afsc-photo-plus { font-size: 28px; font-weight: 300; color: var(--afsc-ink-soft); line-height: 1; }

.afsc-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Zone de dépôt (justificatif) */
.afsc-drop {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 26px 18px;
  border: 1.5px dashed var(--afsc-sand-deep);
  border-radius: 16px;
  background: var(--afsc-sand-tint);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.afsc-drop:hover, .afsc-drop.is-over {
  border-color: var(--afsc-ink);
  background: #fff;
}

.afsc-drop svg { width: 28px; height: 28px; }

.afsc-drop-text { font-size: 13.5px; font-weight: 600; }
.afsc-drop-text u { text-decoration: underline; text-underline-offset: 3px; font-weight: 800; }
.afsc-drop-sub { font-size: 12px; font-weight: 500; color: var(--afsc-ink-soft); }

.afsc-drop.has-file { display: none; }

.afsc-file-chip {
  display: none;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--afsc-ink);
  border-radius: var(--afsc-radius-sm);
  background: #fff;
}

.afsc-file-chip.is-visible { display: grid; }

.afsc-file-chip svg { width: 22px; height: 22px; }
.afsc-file-name { font-size: 13.5px; font-weight: 700; word-break: break-all; }
.afsc-file-size { font-size: 12px; font-weight: 500; color: var(--afsc-ink-soft); }

.afsc-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Jours de présence : puces à cocher */
.afsc-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.afsc-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1.5px solid var(--afsc-sand-deep);
  border-radius: 999px;
  background: var(--afsc-sand-tint);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.afsc-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }

.afsc-chip:has(input:checked) {
  background: var(--afsc-ink);
  border-color: var(--afsc-ink);
  color: #fff;
}

.afsc-chip:has(input:focus-visible) { outline: 3px solid var(--afsc-ink); outline-offset: 3px; }

/* Case de consentement */
.afsc-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.afsc-consent input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  border: 1.5px solid var(--afsc-sand-deep);
  border-radius: 7px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.afsc-consent input::after {
  content: "";
  width: 12px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L19 7'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0;
}

.afsc-consent input:checked { background: var(--afsc-ink); border-color: var(--afsc-ink); }
.afsc-consent input:checked::after { opacity: 1; }

.afsc-consent a { color: inherit; font-weight: 700; text-underline-offset: 3px; }

/* ---------- Boutons -------------------------------------------------- */

.afsc-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 26px;
  border: 1.5px solid var(--afsc-ink);
  border-radius: 999px;
  background: var(--afsc-ink);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}

.afsc-btn:hover { background: #2b1a10; border-color: #2b1a10; }
.afsc-btn:active { transform: translateY(1px); }
.afsc-btn[disabled] { opacity: .55; cursor: wait; }

.afsc-btn--ghost {
  background: transparent;
  color: var(--afsc-ink);
  min-height: 38px;
  padding: 8px 16px;
  font-size: 11.5px;
}

.afsc-btn--ghost:hover { background: var(--afsc-ink); color: #fff; }

.afsc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.afsc-legal {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--afsc-ink-soft);
}

.afsc-legal a { color: inherit; font-weight: 700; text-underline-offset: 3px; }

.afsc-spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 999px;
  display: none !important;
}

.afsc-btn.is-busy .afsc-spinner {
  display: inline-block !important;
  animation: afsc-spin .8s linear infinite;
}

@keyframes afsc-spin { to { transform: rotate(360deg); } }

/* ---------- Messages ------------------------------------------------- */

.afsc-alert {
  display: none;
  padding: 14px 16px;
  border-radius: var(--afsc-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid var(--afsc-error);
  background: var(--afsc-error-tint);
  color: var(--afsc-error);
}

.afsc-alert.is-visible { display: block; }

.afsc-notice {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px 10px 16px;
  margin-bottom: 14px;
  border: 1.5px solid var(--afsc-ink);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
}

.afsc-notice.is-visible { display: flex; }

.afsc-notice button {
  appearance: none; border: 0; background: transparent;
  font: inherit; font-size: 12px; font-weight: 800;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; color: inherit; padding: 2px 4px;
}

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

.afsc-done { display: grid; gap: 18px; }

.afsc-done-badge {
  display: inline-grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 999px;
  background: var(--afsc-ink);
  color: #fff;
}

.afsc-done-badge svg { width: 26px; height: 26px; }

.afsc-done-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
}

.afsc-done p { font-size: 14.5px; font-weight: 500; max-width: 62ch; }
.afsc-done p strong { font-weight: 800; }

.afsc-summary {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--afsc-radius-sm);
  background: var(--afsc-sand-tint);
  border: 1.5px solid var(--afsc-sand-line);
  font-size: 14px;
}

.afsc-summary div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.afsc-summary dt { font-weight: 500; color: var(--afsc-ink-soft); }
.afsc-summary dd { margin: 0; font-weight: 700; word-break: break-word; }

.afsc-ref {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--afsc-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.afsc-ref strong { font-weight: 800; letter-spacing: .12em; font-size: 14px; }

/* Formulaire fermé */
.afsc-closed {
  padding: 26px 24px;
  background: var(--afsc-paper);
  border: 1px solid var(--afsc-sand-deep);
  border-radius: var(--afsc-radius);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Pied ----------------------------------------------------- */

.afsc-foot {
  margin-top: 34px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--afsc-ink-soft);
}

.afsc-foot a { color: inherit; font-weight: 700; text-underline-offset: 3px; }

/* ---------- Pot de miel (anti-spam) ---------------------------------- */

.afsc-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mouvement réduit ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .afsc-wrap * { transition: none !important; animation-duration: .01ms !important; }
}

@media print {
  .afsc-poster, .afsc-lang, .afsc-actions { display: none !important; }
  .afsc-accred { background: #fff; }
}
/* ==========================================================================
   Correction définitive de l'état sélectionné des dates
   ========================================================================== */
/* 1. Bouton / Label entier lorsque la date est cochée */
input[name="days[]"]:checked + *,
input[name="days[]"]:checked ~ *,
label:has(input[name="days[]"]:checked),
.afsc-day-pill:has(input:checked),
.afsc-days label:has(input:checked),
.afsc-days-grid label:has(input:checked),
.afsc-days-list label:has(input:checked) {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

/* 2. Textes et éléments à l'intérieur du bouton coché */
label:has(input[name="days[]"]:checked) span,
label:has(input[name="days[]"]:checked) strong,
label:has(input[name="days[]"]:checked) div,
.afsc-day-pill:has(input:checked) span,
.afsc-days label:has(input:checked) span {
    color: #ffffff !important;
}