/* PC87 Bénévoles — Formulaire public multi-étapes.
 *
 * Charte graphique FNPC 2017 v2.2 :
 *   Bleu   #004080 (CMJN 100/70/0/25)
 *   Orange #F08700 (CMJN 0/55/100/0)
 *   Violet #AB0093 (CMJN 43/95/0/0) — accent rare, non utilisé sur les boutons
 *   Titres en Poppins, texte courant en Arial (1.3.0 : Poppins vient de pc87-polices s'il est actif,
 *   aucune feuille extérieure ; sinon la police de repli de --font-title)
 *   Motif signature : le trait oblique orange qui précède les titres
 *   (1.2.0 : penché comme « \ », −20° autour de son pied, comme les titres du site)
 *   Texte orange sur blanc interdit (2,57:1) : « Étape N » et astérisques en bleu
 *   Maillage triangles/ronds (charte p.21) : bandeau d'en-tête + écran de succès
 *
 * Doctrine héritée de pc87-formations : ZÉRO icon font (coches et flèches
 * dessinées en CSS/SVG data-URI), AUCUN backdrop-filter/flou, ombres teintées
 * bleu marque, pills 999px, animations sobres + prefers-reduced-motion.
 * Mobile-first : breakpoints 720px (grilles → 1 colonne) et 600px (16px
 * anti-zoom iOS, nav sticky en bas), cibles tactiles 48px. */

/* ============ 1. Wrapper + variables ============ */

.pc-ben {
  --brand:        #004080;   /* bleu FNPC */
  --brand-dark:   #002b58;
  --brand-darker: #001838;   /* fond du dégradé hero (formations) */
  --accent:       #F08700;   /* orange FNPC */
  --accent-dark:  #c26a00;   /* hover du CTA orange (valeur formations) */
  --violet:       #AB0093;   /* violet FNPC — accent rare, jamais sur les boutons */
  --violet-dark:  #7e006c;
  --text:         #1f2937;
  --text-soft:    #5c6479;   /* 5,91:1 sur blanc (avant #6b7a90 : 4,36:1, sous 4,5:1) */
  --text-muted:   #98a3b3;
  /* 1.2.0 : textes d'exemple au gris « doux » du site (--pc87-doux), celui des textes d'exemple du
     formulaire DPS : 5,91:1 sur blanc (avant : --text-muted, 2,55:1). */
  --text-placeholder: #5c6479;
  /* 1.2.0 : angle du trait oblique, celui des titres du site (--pc87-trait-angle, 00-tokens.css) :
     négatif, le trait penche comme « \ ». Tourné autour de son pied (transform-origin: 50% 100%). */
  --trait-angle:  -20deg;
  --bg:           #ffffff;
  --bg-soft:      #f5f7fb;
  --bg-tint:      #eef3fb;   /* fond bleuté (consentement, pills) */
  --border:       #d4dbe6;
  --border-soft:  #e3e8f0;
  --success:      #16a34a;
  --success-bg:   #e8f6ee;
  --success-text: #166534;   /* 1.8.0 : texte vert sur --success-bg, 6,5:1 (--success n'y atteint que 2,8:1) */
  --error:        #c0392b;
  --error-bg:     #fdecec;
  --radius-sm:    6px;       /* inputs, choix */
  --radius:       10px;      /* alertes, consentement */
  --radius-lg:    14px;      /* cartes de section, hero, succès */
  --shadow-sm:    0 1px 2px rgba(0,64,128,0.04);
  --shadow:       0 4px 16px rgba(0,64,128,0.08);
  --shadow-lg:    0 8px 30px rgba(0,64,128,0.12);
  --ease:         cubic-bezier(.4, 0, .2, 1);
  --tap:          48px;      /* cible tactile minimale Apple/Google */
  --font-title:   "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-text:    Arial, "Helvetica Neue", Helvetica, sans-serif;

  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: var(--font-text); /* Arial par défaut : Poppins est opt-in (titrage) */
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.pc-ben * { box-sizing: border-box; }
/* Indispensable : des éléments en inline-flex (boutons) ignorent [hidden] sinon. */
.pc-ben [hidden] { display: none !important; }

/* ============ 2. Animations ============ */

@keyframes pcbFadeIn  { from { opacity: 0; transform: translateY(8px);   } to { opacity: 1; transform: translateY(0); } }
@keyframes pcbSlideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pcbSpin    { to { transform: rotate(360deg); } }
@keyframes shakeX {
  0%, 100%                { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80%      { transform: translateX(6px); }
}

/* ============ 3. Accessibilité ============ */

/* Legends sémantiques masqués visuellement, lus par les lecteurs d'écran. */
.pc-ben .pc-ben-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Focus : contour bleu 3px partout (1.4.0 : l'orange sur blanc n'atteint que 2,57:1, sous les 3:1 exigés pour
 * un indicateur de focus), SAUF les champs de saisie (halo, cf. §8). */
.pc-ben *:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.pc-ben input:focus-visible,
.pc-ben textarea:focus-visible,
.pc-ben select:focus-visible { outline: none; }

/* ============ 4. Alerte flash (fallback sans JS) ============ */

.pc-ben .pc-ben-alert {
  position: relative;
  margin: 0 0 20px;
  padding: 14px 18px 14px 20px;
  border-radius: var(--radius);
  font-size: .95em;
  animation: pcbFadeIn .3s var(--ease);
}
.pc-ben .pc-ben-alert p { margin: 4px 0 0; }
.pc-ben .pc-ben-alert-error {
  background: var(--error-bg);
  color: #7f1d1d;
  border: 1px solid #f3c2bd;
}
/* ============ 5. En-tête (titre plat, sans bandeau : Léo, 18/10/2026) ============ */

/* Le titre reprend le H2 du site (Poppins 700 #004080, trait « \ » orange) : voir .pc-ben-section-title. */
.pc-ben .pc-ben-hero { margin: 0 0 18px; }
.pc-ben .pc-ben-hero-title { font-size: 1.7rem; }
@media (max-width: 600px) {
  .pc-ben .pc-ben-hero-title { font-size: 1.35rem; }
}

/* ============ 6. Intro (trait oblique pleine hauteur) ============ */

.pc-ben .pc-ben-intro {
  position: relative;
  margin: 0 0 26px;
  padding-left: 24px;
  color: var(--text-soft);
  font-size: .97em;
}
.pc-ben .pc-ben-intro::before {
  /* Trait oblique orange — signature FNPC. Hauteur bornée : un trait
     pleine hauteur incliné dériverait dans le texte sur les blocs hauts
     (intro de plusieurs lignes sur mobile). 1.2.0 : penché comme les titres
     (« \ », avant « / » à 16°), autour de son pied, qui reste loin du texte. */
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 2px;
  height: 2.4em;
  max-height: calc(100% - 20px);
  background: var(--accent);
  transform: rotate(var(--trait-angle));
  transform-origin: 50% 100%;
}

/* ============ 7. Barre de progression ============
 * 1.7.2 : comme le formulaire DPS (Léo, 04/11/2026). Pastilles numérotées de 48 px (des <button> : retour aux
 * étapes franchies au clavier comme à la souris), puis UNE étiquette pleine largeur « Étape n : nom » sous la barre.
 * Le nom de chaque étape est lu par les lecteurs d'écran dans son bouton. */

.pc-ben .pc-ben-progress {
  display: grid;
  grid-template-columns: repeat(var(--steps, 6), minmax(0, 1fr));
  position: relative;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.pc-ben .pc-ben-progress::before {
  /* Ligne de base, au centre des pastilles. */
  content: "";
  position: absolute;
  top: 23px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--border-soft);
}
.pc-ben .pc-ben-progress-step {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 0 2px;
}
.pc-ben .pc-ben-progress-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  max-width: 100%;
  height: var(--tap);
  margin: 0;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text-soft);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.pc-ben .pc-ben-progress-step.is-active .pc-ben-progress-num {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.pc-ben .pc-ben-progress-step.is-done .pc-ben-progress-num {
  border-color: var(--brand);
  background: var(--bg-tint);
  color: var(--brand);
}
.pc-ben .pc-ben-progress-num:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* Étiquette unique de l'étape en cours, pleine largeur, sous la barre. */
.pc-ben .pc-ben-progress-etiquette {
  margin: 0 0 22px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  color: var(--brand);
}

/* ============ 8. Sections (header hors carte + carte blanche) ============ */

/* La fieldset-étape est un conteneur transparent : le visuel est porté
 * par le header (dehors) et la carte .pc-ben-section-body. */
.pc-ben .pc-ben-section,
.pc-ben .pc-ben-finalize {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 28px;
  min-width: 0; /* les fieldsets ont un min-width intrinsèque qui casse les grilles */
  animation: pcbFadeIn .35s var(--ease);
}

.pc-ben .pc-ben-section-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 4px;
  margin-bottom: 12px;
}
/* 1.7.2 : « Étape N » au-dessus du titre, masqué à l'écran comme sur le formulaire DPS (l'étiquette sous la barre
   le dit déjà) ; lu par les lecteurs d'écran. */
.pc-ben .pc-ben-eyebrow {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  color: var(--brand);
}
/* Titre de section : Poppins 700 bleu, précédé du trait oblique orange (signature FNPC,
 * il remplace les pastilles d'icônes de DPS v3). 1.2.0 : angle, épaisseur et couleur du trait des
 * titres du site, 2 px, −20° autour de son pied, penché comme « \ » (avant : +20°, « / »). Longueur
 * (1,4 em) et position (centré sur le titre) gardées : à la géométrie exacte de .pc87-titre (1,5 em,
 * partant 0,5 em au-dessus), le trait couperait « Étape N ». */
.pc-ben .pc-ben-section-title {
  position: relative;
  margin: 0;
  padding-left: 18px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--brand);
  letter-spacing: -.01em;
  line-height: 1.2;
}
.pc-ben .pc-ben-section-title::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 2px;
  height: 1.4em;
  background: var(--accent);
  transform: translateY(-50%) rotate(var(--trait-angle));
  transform-origin: 50% 100%;
}

.pc-ben .pc-ben-section-intro {
  margin: 0 0 12px;
  padding: 0 4px;
  font-size: .92em;
  color: var(--text-soft);
}

/* Carte blanche : le corps de la section. */
.pc-ben .pc-ben-section-body {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 30px 14px;
  box-shadow: var(--shadow-sm);
}

/* Sous-titre intra-section : même trait oblique, en plus petit. */
.pc-ben .pc-ben-subtitle {
  position: relative;
  margin: 26px 0 10px;
  padding-left: 18px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  color: var(--brand);
}
.pc-ben .pc-ben-subtitle::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 2px;
  height: 1.4em;
  background: var(--accent);
  transform: translateY(-50%) rotate(var(--trait-angle));
  transform-origin: 50% 100%;
}

@media (max-width: 900px) {
  .pc-ben .pc-ben-section-body { padding: 26px 24px 12px; }
}
@media (max-width: 600px) {
  .pc-ben .pc-ben-section,
  .pc-ben .pc-ben-finalize { margin-bottom: 22px; }
  .pc-ben .pc-ben-section-header { margin-bottom: 10px; padding: 0 2px; }
  .pc-ben .pc-ben-section-title { font-size: 1.1rem; }
  .pc-ben .pc-ben-section-body { padding: 22px 18px 8px; border-radius: 12px; }
}

/* ============ 9. Grille de champs ============ */

.pc-ben .pc-ben-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.pc-ben .pc-ben-cols-2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 720px) {
  .pc-ben .pc-ben-cols-2 { grid-template-columns: 1fr; gap: 16px; }
}
/* Garde-fou : un champ conditionnel masqué ne laisse pas de « trou » dans la rangée. */
@media (min-width: 721px) {
  .pc-ben .pc-ben-cols-2:has(> .pc-ben-field[hidden]) { grid-template-columns: 1fr; }
}

/* ============ 10. Champ / label / aide / erreur ============ */

.pc-ben .pc-ben-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: pcbSlideIn .35s var(--ease) both;
}

.pc-ben .pc-ben-label {
  display: block;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: .9rem;
  color: var(--brand);
  margin-bottom: 8px;
  line-height: 1.3;
  padding: 0;
}
/* Astérisque « obligatoire » : bleu, comme le formulaire DPS (1.2.0 ; avant : orange sur blanc, 2,57:1). */
.pc-ben .pc-ben-label abbr[title] {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  margin-left: 2px;
  border: 0;
}

/* Le fieldset des groupes de choix est transparent : la structure est
 * sémantique (legend accessible), pas visuelle. */
.pc-ben .pc-ben-choices-fs {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.pc-ben .pc-ben-help {
  display: block;
  margin-top: 6px;
  font-size: .87em;
  color: var(--text-soft);
  line-height: 1.45;
}
/* 1.3.0 : mention de l'autocomplétion d'adresse (IGN), 13 px, gris lisible (5,91:1). */
.pc-ben .pc-ben-help-ign { font-size: 13px; color: var(--text-placeholder); }

/* Petit texte d'erreur sous le champ (WCAG : l'erreur n'est pas que la couleur). */
.pc-ben .pc-ben-error-msg {
  display: block;
  margin-top: 6px;
  font-size: .87em;
  font-weight: 600;
  color: var(--error);
  line-height: 1.4;
}

/* ============ 11. Inputs / select / textarea (héritage form-v3) ============ */

.pc-ben input[type="text"],
.pc-ben input[type="email"],
.pc-ben input[type="tel"],
.pc-ben input[type="url"],
.pc-ben input[type="number"],
.pc-ben input[type="date"],
.pc-ben input[type="time"],
.pc-ben input[type="search"],
.pc-ben textarea,
.pc-ben select {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font-size: 1rem; /* >= 16px effectif sous 600px : pas de zoom iOS au focus */
  font-family: inherit;
  color: var(--text);
  background-color: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  box-shadow: var(--shadow-sm);
  -webkit-appearance: none;
  appearance: none;
}
.pc-ben textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

/* Select : flèche SVG data-URI bleue (cohérence sans icon font). */
.pc-ben select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%23004080' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}

.pc-ben input:hover,
.pc-ben textarea:hover,
.pc-ben select:hover { border-color: #b6c1d3; }

/* Focus des champs : bordure et halo bleus (1.4.0 : la bordure orange n'atteignait que 2,57:1). */
.pc-ben input:focus,
.pc-ben textarea:focus,
.pc-ben select:focus {
  outline: none;
  border-color: var(--brand);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0,64,128,0.25);
}

.pc-ben .pc-ben-tel { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-ben .pc-ben-tel select { flex: 0 1 8.5rem; min-width: 0; text-overflow: ellipsis; }
.pc-ben .pc-ben-tel input { flex: 1 1 9rem; min-width: 0; }

/* Textes d'exemple : 5,91:1 sur blanc, 5,40:1 sur le rose d'un champ en erreur (1.2.0 ; avant 2,55:1). */
.pc-ben input::placeholder,
.pc-ben textarea::placeholder { color: var(--text-placeholder); opacity: 1; }

/* ============ 12. Choix (radio / checkbox en cartes tactiles) ============ */

.pc-ben .pc-ben-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 2px;
}
/* Deux colonnes seulement quand les options sont nombreuses ET courtes
 * (classe posée par render_field, opt-in). */
@media (min-width: 600px) {
  .pc-ben .pc-ben-choices.pc-ben-choices-grid { grid-template-columns: 1fr 1fr; }
}

.pc-ben .pc-ben-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 40px 13px 16px; /* padding droit : place pour la coche CSS */
  min-height: var(--tap);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 400;
  color: var(--text);
  transition: border-color .2s var(--ease), background .2s var(--ease),
              box-shadow .2s var(--ease), transform .2s var(--ease);
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.pc-ben .pc-ben-choice:hover {
  border-color: var(--accent);
  background: #fffbf4;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(240,135,0,0.10);
}
/* Radio / checkbox natifs VISIBLES (accessibilité + états système). */
.pc-ben .pc-ben-choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.pc-ben .pc-ben-choice:has(input:checked) {
  border-color: var(--accent);
  background: #fff5e7;
  color: var(--brand);
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(240,135,0,0.15);
}
/* Coche d'accent à droite, DESSINÉE EN CSS (border rotée). */
.pc-ben .pc-ben-choice:has(input:checked)::after {
  content: "";
  position: absolute;
  right: 17px;
  top: 50%;
  width: 6px;
  height: 12px;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: translateY(-62%) rotate(45deg);
  animation: pcbFadeIn .25s var(--ease);
}
/* La carte reflète le focus clavier du contrôle natif. */
.pc-ben .pc-ben-choice:has(input:focus-visible) {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.pc-ben .pc-ben-choice-text { flex: 1; min-width: 0; }

/* Case seule (déclaration / engagement) : carte pleine largeur, libellé long
 * aligné en haut de la case. */
.pc-ben .pc-ben-choice-single {
  align-items: flex-start;
  width: 100%;
  line-height: 1.5;
}
.pc-ben .pc-ben-choice-single input { margin-top: 2px; }
.pc-ben .pc-ben-choice-single .pc-ben-choice-text abbr[title] {
  color: var(--brand); /* 1.2.0 : bleu (avant : orange) */
  font-weight: 700;
  text-decoration: none;
  border: 0;
}

/* ============ 13. Autocomplétion adresse (BAN) ============ */

.pc-ben .pc-ben-address-wrap { position: relative; }
/* Dropdown ouvert : le champ passe au-dessus des suivants. */
.pc-ben .pc-ben-field.pc-ben-has-dropdown {
  position: relative;
  z-index: 100;
}
.pc-ben .pc-ben-address-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,64,128,0.18), 0 2px 8px rgba(0,64,128,0.08);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  margin: 0;
  padding: 4px;
  list-style: none;
  animation: pcbFadeIn .15s var(--ease);
}
/* 1.1.0 : chaque suggestion est une cible tactile d'au moins 48 px de haut (--tap),
   séparée de la suivante par 4 px et un filet (WCAG 2.5.8 ; charte : cibles 48 px). */
.pc-ben .pc-ben-address-item {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .92rem;
  color: var(--text);
  transition: background .15s, color .15s;
}
.pc-ben .pc-ben-address-item + .pc-ben-address-item {
  position: relative;
  margin-top: 4px;
}
.pc-ben .pc-ben-address-item + .pc-ben-address-item::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: -3px;
  border-top: 1px solid var(--border);
  pointer-events: none;
}
.pc-ben .pc-ben-address-item:hover,
.pc-ben .pc-ben-address-item.is-active {
  background: #fff5e7;
  color: var(--brand);
}
.pc-ben .pc-ben-address-item span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-ben .pc-ben-address-item small {
  color: var(--text-muted);
  font-size: .82em;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .pc-ben .pc-ben-address-item { font-size: .88rem; padding: 12px 10px; }
  .pc-ben .pc-ben-address-item small { display: none; } /* gain de place */
}

/* ============ 14. Compteur de caractères ============ */

.pc-ben .pc-ben-char-counter {
  margin-top: 6px;
  font-size: .78em;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 500;
  letter-spacing: .2px;
  text-align: right;
  transition: color .2s var(--ease);
}
.pc-ben .pc-ben-char-counter .pc-ben-cc-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.pc-ben .pc-ben-char-counter.is-ok    { color: var(--success); }
.pc-ben .pc-ben-char-counter.is-warn  { color: var(--accent); }
.pc-ben .pc-ben-char-counter.is-error { color: var(--error); font-weight: 600; }
.pc-ben .pc-ben-char-counter .pc-ben-cc-min { color: inherit; opacity: .85; }

/* ============ 15. Récapitulatif (dernière étape) ============ */

.pc-ben .pc-ben-recap { margin-bottom: 20px; }

.pc-ben .pc-ben-recap-group {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 20px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  animation: pcbFadeIn .3s var(--ease);
}
.pc-ben .pc-ben-recap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
/* Titre de groupe : trait oblique, comme partout. */
.pc-ben .pc-ben-recap-head h4 {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  color: var(--brand);
}
.pc-ben .pc-ben-recap-head h4::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 2px;
  height: 1.4em;
  background: var(--accent);
  transform: translateY(-50%) rotate(var(--trait-angle));
  transform-origin: 50% 100%;
}
/* Bouton « Modifier » : ghost pill compact (surcharge de .pc-ben-btn-ghost). */
.pc-ben .pc-ben-recap-edit {
  min-height: var(--tap);
  padding: 6px 16px;
  font-size: .78rem;
  flex-shrink: 0;
}

.pc-ben .pc-ben-recap-group dl {
  display: grid;
  grid-template-columns: minmax(150px, 36%) 1fr;
  gap: 7px 16px;
  margin: 0;
}
.pc-ben .pc-ben-recap-group dt {
  font-size: .85em;
  color: var(--text-soft);
  line-height: 1.45;
}
.pc-ben .pc-ben-recap-group dd {
  margin: 0;
  font-size: .95em;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pc-ben .pc-ben-recap-note,
.pc-ben .pc-ben-recap-noscript {
  margin: 0 0 10px;
  font-size: .85em;
  color: var(--text-soft);
}

@media (max-width: 600px) {
  .pc-ben .pc-ben-recap-group { padding: 14px 16px 12px; }
  /* dt puis dd empilés : plus lisible qu'un tableau serré sur mobile. */
  .pc-ben .pc-ben-recap-group dl { grid-template-columns: 1fr; gap: 2px; }
  .pc-ben .pc-ben-recap-group dd { margin-bottom: 8px; }
}

/* ============ 16. Case « J'ai pris connaissance de l'information sur mes données » (carte teintée, trait orange) ============ */

.pc-ben .pc-ben-consent {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.pc-ben .pc-ben-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: .93em;
  line-height: 1.5;
  color: var(--text);
}
.pc-ben .pc-ben-consent-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.pc-ben .pc-ben-consent-label abbr[title] {
  color: var(--brand); /* 1.2.0 : bleu (avant : orange sur fond bleuté) */
  font-weight: 700;
  text-decoration: none;
  border: 0;
}
.pc-ben .pc-ben-consent .pc-ben-error-msg { margin-left: 32px; }
.pc-ben .pc-ben-consent-label a { color: var(--brand); text-decoration: underline; }

/* 1.3.0 : information sur les données (art. 13 du RGPD), sous le bouton d'envoi ; texte de 13 px au moins,
   gris lisible (5,91:1), intitulés en bleu. */
.pc-ben .pc-ben-info {
  margin-top: 20px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-placeholder);
}
.pc-ben .pc-ben-info-titre {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.pc-ben .pc-ben-info-liste { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.pc-ben .pc-ben-info-liste dt { font-weight: 700; color: var(--brand); }
.pc-ben .pc-ben-info-liste dd { margin: 0; overflow-wrap: anywhere; }
.pc-ben .pc-ben-info-lien { margin: 10px 0 0; }
.pc-ben .pc-ben-info-lien a { color: var(--brand); text-decoration: underline; }
@media (max-width: 600px) {
  .pc-ben .pc-ben-info-liste { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pc-ben .pc-ben-info-liste dd { margin-bottom: 8px; }
}

/* ============ 12 bis. Grille des disponibilités et justificatifs (1.4.0) ============ */

/* 7 jours x 4 créneaux sans défilement horizontal à 375 px : jours abrégés, colonnes égales, cases de 48 px. */
.pc-ben .pc-ben-dispo-grille {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 4px;
  margin: 0 -4px;
  width: calc(100% + 8px);
  border: 0;
}
.pc-ben .pc-ben-dispo-grille thead,
.pc-ben .pc-ben-dispo-grille tbody,
.pc-ben .pc-ben-dispo-grille tr { border: 0; background: transparent; }
.pc-ben .pc-ben-dispo-grille th {
  padding: 0 2px 2px;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--brand);
  text-align: center;
  overflow-wrap: anywhere;
}
.pc-ben .pc-ben-dispo-grille thead td,
.pc-ben .pc-ben-dispo-grille tbody th { width: 3.6em; }
.pc-ben .pc-ben-dispo-grille tbody th { text-align: left; }
.pc-ben .pc-ben-dispo-grille abbr[title] { text-decoration: none; border: 0; cursor: default; }
/* Les tableaux du thème (bordures, fonds alternés) ne s'appliquent pas à la grille : sélecteur plus fort que
   « table thead:first-child tr:first-child th » de Hello Elementor. */
.pc-ben .pc-ben-dispo .pc-ben-dispo-grille th,
.pc-ben .pc-ben-dispo .pc-ben-dispo-grille td { border: 0; background: transparent; vertical-align: middle; }
.pc-ben .pc-ben-dispo-grille td { padding: 0; }
.pc-ben .pc-ben-dispo-case {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.pc-ben .pc-ben-dispo-case input { width: 22px; height: 22px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.pc-ben .pc-ben-dispo-case:has(input:checked) { border-color: var(--brand); background: var(--bg-tint); }
.pc-ben .pc-ben-dispo-case:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; } /* orange sur blanc : 2,57:1, sous 3:1 */
.pc-ben .pc-ben-has-error .pc-ben-dispo-case { border-color: var(--error); }
.pc-ben .pc-ben-dispo-raccourcis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pc-ben .pc-ben-dispo-raccourcis .pc-ben-btn { flex: 1 1 auto; padding: 10px 16px; font-size: .9rem; }
.pc-ben .pc-ben-dispo-compte { margin: 8px 0 0; font-size: 14px; color: var(--text-placeholder); }

.pc-ben .pc-ben-docs { margin: 0 0 20px; }
.pc-ben .pc-ben-docs input[type="file"] { min-height: var(--tap); max-width: 100%; font-size: 1rem; }
.pc-ben .pc-ben-docs-liste { margin: 10px 0 0; padding: 0; list-style: none; }
.pc-ben .pc-ben-docs-liste li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  overflow-wrap: anywhere;
}
.pc-ben .pc-ben-docs-liste .pc-ben-btn { flex: 0 0 auto; padding: 10px 18px; }
.pc-ben .pc-ben-docs-progres { display: block; width: 100%; height: 10px; margin-top: 10px; accent-color: var(--brand); }

/* ============ 17. Boutons (pills FNPC) ============ */

.pc-ben .pc-ben-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 13px 28px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-title);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  text-decoration: none;
  transition: background .25s var(--ease), transform .15s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 4px 14px rgba(0,64,128,0.20); /* ombre teintée de la couleur du bouton */
  -webkit-tap-highlight-color: transparent;
}
.pc-ben .pc-ben-btn:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 20px rgba(0,64,128,0.28);
  transform: translateY(-1px);
}
.pc-ben .pc-ben-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(0,64,128,0.20); }
/* Focus bleu : l'orange sur blanc n'atteint que 2,57:1 (contraste non textuel requis : 3:1). */
.pc-ben .pc-ben-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.pc-ben .pc-ben-btn[disabled] { opacity: .65; cursor: wait; transform: none; }

/* Précédent : ghost. */
.pc-ben .pc-ben-btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.pc-ben .pc-ben-btn-ghost:hover {
  background: var(--bg-tint);
  color: var(--brand);
  border-color: var(--brand);
  box-shadow: none;
}

/* « Envoyer ma candidature » : bleu comme les autres boutons ; blanc sur orange n'atteint que 2,57:1 (charte :
 * l'orange ne porte jamais de texte). */
.pc-ben .pc-ben-btn-cta {
  padding-left: 32px;
  padding-right: 32px;
}

/* Spinner CSS dans le bouton pendant l'envoi (anneau rotatif, zéro icon font). */
.pc-ben .pc-ben-spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pcbSpin .8s linear infinite;
  flex-shrink: 0;
}

/* ============ 18. Navigation ============ */

.pc-ben .pc-ben-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
}
.pc-ben .pc-ben-nav-status {
  flex: 1;
  text-align: center;
  font-size: .9em;
  color: var(--text-soft);
  font-family: var(--font-title);
}
.pc-ben .pc-ben-nav-status strong { color: var(--brand); font-weight: 600; }

/* Mobile : barre sticky en bas — fond quasi-opaque + border-top,
 * volontairement SANS backdrop-filter (le flou est banni de la charte maison). */
@media (max-width: 600px) {
  .pc-ben .pc-ben-nav {
    position: sticky;
    bottom: 0;
    margin-left: -12px;
    margin-right: -12px;
    margin-top: 18px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.97);
    border-top: 1px solid var(--border-soft);
    box-shadow: 0 -4px 20px rgba(0,64,128,0.06);
    z-index: 20;
    flex-wrap: wrap;
  }
  .pc-ben .pc-ben-nav-status {
    order: -1;
    flex-basis: 100%;
    padding-bottom: 4px;
    font-size: .85em;
  }
  .pc-ben .pc-ben-btn { padding: 12px 20px; font-size: .9rem; flex: 1; min-width: 0; white-space: normal; text-align: center; }
  /* Envoi : seul sur sa ligne, jamais rogné (constat V03). */
  .pc-ben .pc-ben-btn-cta { flex-basis: 100%; }
  /* 1.3.0 : « Modifier » du récapitulatif garde sa largeur à côté d'un titre d'étape long (formulaire du site). */
  .pc-ben .pc-ben-recap-head .pc-ben-recap-edit { flex: 0 0 auto; }
}

/* ============ 19. Erreurs ============ */

/* État d'erreur : shake + rouge + petit texte (.pc-ben-error-msg déjà stylé §10). */
.pc-ben .pc-ben-has-error {
  animation: shakeX .55s var(--ease);
}
.pc-ben .pc-ben-has-error input,
.pc-ben .pc-ben-has-error textarea,
.pc-ben .pc-ben-has-error select {
  border-color: var(--error);
  background-color: #fef2f2;
  box-shadow: 0 0 0 4px rgba(192,57,43,0.12);
}
.pc-ben .pc-ben-has-error input:focus,
.pc-ben .pc-ben-has-error textarea:focus,
.pc-ben .pc-ben-has-error select:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(192,57,43,0.22);
}
.pc-ben .pc-ben-has-error .pc-ben-label,
.pc-ben .pc-ben-has-error .pc-ben-label abbr { color: var(--error); }
.pc-ben .pc-ben-has-error .pc-ben-choice {
  border-color: var(--error);
  background: #fef2f2;
}
.pc-ben .pc-ben-has-error .pc-ben-choice input { accent-color: var(--error); }
.pc-ben .pc-ben-consent.pc-ben-has-error {
  background: #fef2f2;
  border-left-color: var(--error);
}

/* Erreur globale (système / réseau) : trait rouge, role="alert". */
.pc-ben .pc-ben-form-error {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--error-bg);
  color: #7f1d1d;
  border: 1px solid #f3c2bd;
  border-radius: var(--radius-sm);
  font-size: .9em;
  animation: pcbFadeIn .3s var(--ease);
}

/* ============ 20. Écran de succès ============ */

.pc-ben .pc-ben-success {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 0 28px 36px;
  text-align: center;
  overflow: hidden;
  animation: pcbFadeIn .4s var(--ease);
}
/* Rond vert pâle chevauchant le bandeau, coche verte dessinée en CSS. */
.pc-ben .pc-ben-success-mark {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 32px auto 18px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.pc-ben .pc-ben-success-check {
  display: block;
  width: 18px;
  height: 34px;
  margin-top: -8px;
  border-right: 4px solid var(--success);
  border-bottom: 4px solid var(--success);
  transform: rotate(45deg);
}
.pc-ben .pc-ben-success h2 {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--brand);
  letter-spacing: -.01em;
}
.pc-ben .pc-ben-success-msg {
  color: var(--text);
  font-size: 1rem;
  margin: 6px auto 18px;
  max-width: 520px;
  line-height: 1.6;
  white-space: pre-line; /* préserve les retours à la ligne du message thank_you */
}
.pc-ben .pc-ben-success-org {
  margin: 0 auto;
  max-width: 520px;
  font-size: .82em;
  color: var(--text-soft);
  line-height: 1.7;
}
.pc-ben .pc-ben-success-org strong {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--brand);
}
.pc-ben .pc-ben-success-org a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
@media (max-width: 600px) {
  .pc-ben .pc-ben-success { padding: 0 18px 28px; }
}

/* ============ 22. Réunion d'information (1.8.0, page du lien personnel) ============
 * Même monde que le formulaire : titre au trait oblique, cartes blanches à filet doux, boutons pills bleus.
 * Une carte pour la réunion choisie, puis une seule carte pour les dates proposées (une ligne par date). */

.pc-ben .pc-ben-alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-bg);
}

.pc-ben.pc-ben-reunion { padding-bottom: 8px; }

/* 1.10.0 : recrutement fermé, le message tient la place du formulaire (même encadré que « aucune réunion prévue »). */
.pc-ben.pc-ben-ferme { padding-bottom: 8px; }
.pc-ben .pc-ben-ferme-texte {
  margin: 0;
  padding: 18px 20px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  color: var(--text);
}

.pc-ben .pc-ben-reunion-intro { margin: 0 0 24px; color: var(--text-soft); }

.pc-ben .pc-ben-reunion-carte {
  margin: 0 0 30px;
  padding: 24px 28px 22px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.pc-ben .pc-ben-reunion-etat {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}
.pc-ben .pc-ben-reunion-etat--reservee { background: var(--success-bg); color: var(--success-text); }
.pc-ben .pc-ben-reunion-etat--attente { background: var(--bg-tint); color: var(--brand); }
.pc-ben .pc-ben-reunion-date {
  margin: 12px 0 6px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--brand);
  letter-spacing: -.01em;
}
.pc-ben .pc-ben-reunion-infos { margin: 0; color: var(--text); line-height: 1.6; }
.pc-ben .pc-ben-reunion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}
.pc-ben .pc-ben-reunion-confirmer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pc-ben .pc-ben-reunion-confirmer p { flex: 1 1 100%; margin: 0 0 4px; }
.pc-ben .pc-ben-reunion-form { display: inline-flex; margin: 0; }

.pc-ben .pc-ben-reunions { margin: 0 0 8px; }
.pc-ben .pc-ben-reunions .pc-ben-subtitle { margin-top: 0; }
.pc-ben .pc-ben-reunions-vide {
  margin: 0;
  padding: 18px 20px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  color: var(--text-soft);
}
.pc-ben .pc-ben-reunions-liste {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pc-ben .pc-ben-reunions-ligne {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 16px 18px;
  margin: 0;
  padding: 18px 22px;
  border-top: 1px solid var(--border-soft);
}
.pc-ben .pc-ben-reunions-ligne:first-child { border-top: 0; }
/* Pavé du jour : chiffre en Poppins bleu, mois en petites capitales. */
.pc-ben .pc-ben-reunion-jour {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--bg-tint);
  border-radius: var(--radius);
  color: var(--brand);
}
.pc-ben .pc-ben-reunion-jour__num { font-family: var(--font-title); font-weight: 700; font-size: 1.45rem; line-height: 1; }
.pc-ben .pc-ben-reunion-jour__mois { margin-top: 3px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pc-ben .pc-ben-reunion-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-ben .pc-ben-reunion-titre { font-family: var(--font-title); font-weight: 600; font-size: 1rem; color: var(--brand); }
.pc-ben .pc-ben-reunion-texte .pc-ben-reunion-infos { color: var(--text-soft); font-size: .95em; }
.pc-ben .pc-ben-reunion-places {
  align-self: flex-start;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.pc-ben .pc-ben-reunion-places--libre { background: var(--success-bg); color: var(--success-text); }
.pc-ben .pc-ben-reunion-places--complet { background: var(--bg-soft); color: var(--text-soft); }

.pc-ben .pc-ben-reunion-contact { margin: 28px 0 0; color: var(--text-soft); font-size: .95em; }
.pc-ben .pc-ben-reunion-contact a[href^="tel:"] { white-space: nowrap; }
.pc-ben .pc-ben-reunion-contact a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .pc-ben .pc-ben-reunion-carte { padding: 20px 18px 18px; border-radius: 12px; }
  .pc-ben .pc-ben-reunion-date { font-size: 1.25rem; }
  .pc-ben .pc-ben-reunion-actions .pc-ben-btn,
  .pc-ben .pc-ben-reunion-confirmer .pc-ben-btn,
  .pc-ben .pc-ben-reunion-confirmer .pc-ben-reunion-form { flex: 1 1 100%; width: 100%; }
  .pc-ben .pc-ben-reunions-ligne { grid-template-columns: 52px 1fr; padding: 16px; gap: 12px 14px; }
  .pc-ben .pc-ben-reunion-jour { width: 52px; height: 52px; }
  .pc-ben .pc-ben-reunions-ligne .pc-ben-reunion-form { grid-column: 1 / -1; }
  .pc-ben .pc-ben-reunions-ligne .pc-ben-btn { width: 100%; }
}

/* ============ 21. Mobile (base) + reduced motion ============ */

@media (max-width: 600px) {
  .pc-ben { padding: 0 12px; font-size: 16px; } /* 16px : iOS ne zoome pas au focus */
}

/* Toute animation neutralisée pour qui préfère un rendu statique. */
@media (prefers-reduced-motion: reduce) {
  .pc-ben *,
  .pc-ben *::before,
  .pc-ben *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
