/* ============================================================
   pildiup-v2.css : refonte graphique de pildiUP (octobre 2026).
   Maquette de reference : canevas « Refonte pildiUP », version B.
   Charge par templates/pildiup/_base.html, APRES labup.css et
   modules.css, sur les seules pages pildiUP. Tout vit sous .pv ou
   .pv-barre-module : aucune regle globale, aucune collision avec
   .btn, .card ou .container de labup.css.
   Couleurs : charte LabUP Studio, teinte du module pildiUP (jaune).
   ============================================================ */

.pv, .pv-barre-module {
  --pv-encre: #191716;
  --pv-encre-2: #4A4541;
  --pv-gris: #6B6560;
  --pv-trait: #E7E2DC;
  --pv-trait-2: #D9D4CE;
  --pv-fond: #F9F7F5;
  --pv-piste: #ECE7E1;
  --pv-jaune: #FFB330;
  --pv-jaune-dk: #7c5119;
  --pv-jaune-lt: #FFEED0;
  --pv-jaune-xlt: #FFF8EA;
  --pv-vert: #00CE75;
  --pv-vert-dk: #06512b;
  --pv-vert-lt: #E3FBEF;
  --pv-bleu-dk: #1d6c70;
  --pv-bleu-lt: #EAFDFF;
  --pv-violet-dk: #523e84;
  --pv-violet-lt: #EEEBFE;
  --pv-rouge-dk: #A3201A;
  --pv-rouge-lt: #FFE6E4;
  --pv-rayon: 16px;
  font-family: 'Sora', sans-serif;
  color: var(--pv-encre);
}

/* ---------- La barre du module (remplace les onglets) ---------- */
.pv-barre-module {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  margin: 1.25rem 0 0; padding: 10px 14px 10px 18px;
  background: #fff; border: 1px solid var(--pv-trait); border-radius: 14px;
  font-size: 14px;
}
.pv-barre-module__marque {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 18px; letter-spacing: -.01em;
  color: var(--pv-encre); text-decoration: none;
}
.pv-barre-module__marque img { width: 26px; height: 26px; }
.pv-barre-module__marque img.pv-barre-module__logo { width: auto; height: 22px; }

/* ---------- L'accueil : recherche et aide posées sur le bandeau ---------- */
.pv-hero { position: relative; margin-top: 1.25rem; }
.pv-hero .ub { margin: 0; }
.pv-hero__recherche {
  position: absolute; z-index: 3; left: 136px; bottom: 18px;
  width: min(480px, 46%); display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--pv-trait); border-radius: 12px;
  padding: 0 14px; min-height: 50px; color: var(--pv-gris);
  box-shadow: 0 2px 10px rgba(25, 23, 22, .06);
}
.pv-hero__recherche:focus-within { border-color: var(--pv-encre); }
.pv-hero__recherche svg { width: 18px; height: 18px; flex-shrink: 0; }
.pv-hero__recherche input {
  flex-grow: 1; border: none; outline: none; background: transparent;
  font: inherit; font-size: 15px; color: var(--pv-encre); min-height: 46px; padding: 0; min-width: 0;
}
.pv-hero__aide {
  position: absolute; z-index: 3; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--pv-trait);
  color: var(--pv-encre); font-weight: 700; font-size: 17px; text-decoration: none;
}
.pv .pv-hero__aide:hover, .pv-hero__aide:hover { background: #fff; color: var(--pv-jaune-dk); border-color: var(--pv-jaune); }
@media (max-width: 760px) {
  .pv-hero__recherche { position: static; width: 100%; margin-top: 12px; }
  .pv-hero__aide { top: 10px; right: 10px; width: 32px; height: 32px; }
}
.pv-barre-module__recherche {
  flex: 1 1 260px; max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--pv-fond); border: 1.5px solid var(--pv-trait); border-radius: 10px;
  padding: 0 12px; min-height: 42px; color: var(--pv-gris);
}
.pv-barre-module__recherche:focus-within { border-color: var(--pv-encre); }
.pv-barre-module__recherche input {
  flex-grow: 1; border: none; outline: none; background: transparent;
  font: inherit; font-size: 14px; color: var(--pv-encre); min-height: 38px; padding: 0;
}
.pv-barre-module__liens { display: flex; gap: 6px; }
.pv-barre-module__liens a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  border-radius: 10px; color: var(--pv-encre); font-weight: 600; text-decoration: none;
}
.pv-barre-module__liens a:hover { background: var(--pv-fond); color: var(--pv-encre); }
.pv-barre-module__liens a[aria-current="page"] { background: var(--pv-jaune-lt); color: var(--pv-jaune-dk); }

/* ---------- Le cadre de page ---------- */
.pv {
  font-size: 15px; line-height: 1.5;
  padding: 28px 0 64px;
  display: flex; flex-direction: column; gap: 28px;
}
.pv *, .pv *::before, .pv *::after { box-sizing: border-box; }
.pv h1, .pv h2, .pv h3, .pv h4 { margin: 0; color: var(--pv-encre); }
.pv p { margin: 0; }
.pv a { color: var(--pv-encre); }
.pv a:hover { color: var(--pv-jaune-dk); }
.pv [hidden] { display: none !important; }
.pv-masque, .pv .pv-masque { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pv ul, .pv ol { margin: 0; }

/* ---------- Titres ---------- */
.pv-retour { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 14px; font-weight: 600; text-decoration: none; }
.pv-surtitre { font-size: 13px; font-weight: 600; color: var(--pv-jaune-dk); text-transform: uppercase; letter-spacing: .06em; }
.pv-surtitre--violet { color: var(--pv-violet-dk); }
.pv-titre { margin-top: 4px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.pv-titre--grand { font-size: 36px; }
.pv-titre--moyen { font-size: 24px; letter-spacing: -.01em; line-height: 1.25; }
.pv-intro { margin-top: 6px; color: var(--pv-gris); max-width: 720px; }
.pv-h2 { font-size: 20px; font-weight: 700; }
.pv-h3 { font-size: 17px; font-weight: 700; }
.pv-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.pv-entete__texte { display: flex; flex-direction: column; gap: 4px; }
.pv-section { display: flex; flex-direction: column; gap: 14px; }
.pv-section__tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 12px; }
.pv-section__tete a { font-size: 14px; font-weight: 600; }
.pv-petit { font-size: 13px; color: var(--pv-gris); }
.pv-gras { font-weight: 600; }

/* ---------- Boutons ---------- */
.pv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: none;
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer; text-align: center;
}
.pv-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.pv-btn--noir, .pv a.pv-btn--noir { background: var(--pv-encre); color: #fff; }
.pv-btn--noir:hover, .pv a.pv-btn--noir:hover { background: #2C2826; color: #fff; }
.pv-btn--jaune, .pv a.pv-btn--jaune { background: var(--pv-jaune); color: var(--pv-encre); }
.pv-btn--jaune:hover { background: #F0A41E; color: var(--pv-encre); }
.pv-btn--clair { background: #fff; color: var(--pv-encre); border: 1.5px solid var(--pv-trait-2); }
.pv-btn--clair:hover { border-color: var(--pv-encre); color: var(--pv-encre); }
.pv-btn--danger { background: #fff; color: var(--pv-rouge-dk); border: 1.5px solid #FFB3AD; }
.pv-btn--danger:hover { background: var(--pv-rouge-lt); color: var(--pv-rouge-dk); }
.pv-btn--petit { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.pv-btn--grand { min-height: 52px; padding: 0 26px; font-size: 16px; }
.pv-btn[disabled] { background: var(--pv-fond); color: #8A847F; border: 1.5px solid var(--pv-trait); cursor: not-allowed; }
.pv-lien { background: none; border: none; padding: 0; font: inherit; font-weight: 600; font-size: 14px; color: var(--pv-encre); text-decoration: underline; cursor: pointer; min-height: 32px; }
.pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding-top: 20px; border-top: 1px solid #F0ECE7; }
.pv-actions--sans-trait { padding-top: 0; border-top: none; }
.pv-actions__note { flex-basis: 100%; font-size: 13px; color: var(--pv-gris); }
.pv form.pv-en-ligne { display: inline-flex; margin: 0; }

/* ---------- Cartes et grilles ---------- */
.pv-carte { background: #fff; border: 1px solid var(--pv-trait); border-radius: var(--pv-rayon); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pv-carte--large { border-radius: 20px; padding: 28px 30px; gap: 22px; }
.pv-carte--alerte { border: 2px solid #FFB3AD; }
.pv-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pv-grille--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pv-grille--etroite { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pv-deux-col { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.pv-deux-col__cote { flex: 1 1 300px; max-width: 370px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pv-deux-col__main { flex: 1 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pv-icone { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pv-icone svg { width: 22px; height: 22px; }
.pv-icone--jaune { background: var(--pv-jaune-lt); color: var(--pv-jaune-dk); }
.pv-icone--vert { background: var(--pv-vert-lt); color: var(--pv-vert-dk); }
.pv-icone--bleu { background: var(--pv-bleu-lt); color: var(--pv-bleu-dk); }
.pv-icone--violet { background: var(--pv-violet-lt); color: var(--pv-violet-dk); }
.pv-icone--rouge { background: var(--pv-rouge-lt); color: var(--pv-rouge-dk); }
.pv-carte__tete { display: flex; align-items: center; gap: 12px; }

/* Grandes tuiles de l'accueil (« Que voulez-vous faire ? ») */
.pv-tuile {
  display: flex; flex-direction: column; gap: 12px; padding: 24px; min-height: 176px;
  border-radius: 18px; background: #fff; border: 1.5px solid var(--pv-trait);
  color: var(--pv-encre); text-decoration: none;
}
.pv-tuile:hover { border-color: var(--pv-encre); color: var(--pv-encre); }
.pv-tuile--jaune { background: var(--pv-jaune); border-color: var(--pv-jaune); }
.pv-tuile--jaune:hover { border-color: var(--pv-encre); }
.pv-tuile .pv-icone { width: 48px; height: 48px; border-radius: 14px; }
.pv-tuile .pv-icone svg { width: 24px; height: 24px; }
.pv-tuile--jaune .pv-icone { background: #fff; color: var(--pv-encre); }
.pv-tuile__titre { font-size: 20px; font-weight: 700; line-height: 1.25; }
.pv-tuile__bas { margin-top: auto; font-size: 14px; }
.pv-tuile__bas--fort { color: var(--pv-jaune-dk); font-weight: 600; }
.pv-tuile--jaune .pv-tuile__bas { color: var(--pv-encre); }

/* ---------- Pastilles ---------- */
.pv-pilule { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.3; }
.pv-pilule--ok { background: var(--pv-vert-lt); color: var(--pv-vert-dk); }
.pv-pilule--afaire { background: var(--pv-jaune-lt); color: var(--pv-jaune-dk); }
.pv-pilule--alerte { background: var(--pv-rouge-lt); color: var(--pv-rouge-dk); }
.pv-pilule--neutre { background: #F1EDE8; color: var(--pv-gris); }
.pv-pilule--info { background: var(--pv-bleu-lt); color: var(--pv-bleu-dk); }
.pv-pilule--violet { background: var(--pv-violet-lt); color: var(--pv-violet-dk); }
.pv-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-puce { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--pv-trait); padding: 4px 12px; border-radius: 999px; font-size: 13px; }
.pv-code { font-weight: 700; letter-spacing: .03em; white-space: nowrap; }

/* ---------- Progression ---------- */
.pv-barre { height: 10px; border-radius: 5px; background: var(--pv-piste); overflow: hidden; }
.pv-barre > span { display: block; height: 100%; background: var(--pv-jaune); border-radius: 5px; }
.pv-barre--fini > span { background: var(--pv-vert); }
.pv-barre--grande { height: 12px; border-radius: 6px; }
.pv-segments { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.pv-segments > span { height: 8px; border-radius: 4px; background: var(--pv-piste); }
.pv-segments > span.fait { background: var(--pv-jaune); }
.pv-segments > span.encours { background: linear-gradient(90deg, var(--pv-jaune) 45%, var(--pv-piste) 45%); }
.pv-segments--fini > span { background: var(--pv-vert) !important; }
.pv-avancement { display: flex; flex-direction: column; gap: 10px; }
.pv-avancement__tete { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.pv-avancement__pct { font-size: 22px; font-weight: 700; color: var(--pv-jaune-dk); }
.pv-avancement--fini .pv-avancement__pct { color: var(--pv-vert-dk); }

/* Parcours vertical des cinq etapes */
.pv-parcours { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pv-parcours li { display: flex; gap: 14px; }
.pv-parcours__axe { display: flex; flex-direction: column; align-items: center; }
.pv-parcours__rond {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  background: #fff; color: var(--pv-gris); border: 2px solid var(--pv-trait-2);
}
.pv-parcours__trait { width: 2px; flex-grow: 1; min-height: 18px; background: var(--pv-piste); }
.pv-parcours__texte { padding: 3px 12px 16px; margin-bottom: 6px; border-radius: 12px; flex-grow: 1; }
.pv-parcours__nom { font-weight: 600; }
.pv-parcours__detail { font-size: 13px; color: var(--pv-gris); }
/* Session 9 (E39) : les papiers de l'etape, en petits pictogrammes. */
.pv-parcours__papiers { display: flex; gap: 6px; margin-top: 6px; }
.pv-parcours__picto { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--pv-piste); color: var(--pv-gris); }
.pv-parcours__picto svg { width: 16px; height: 16px; }
.pv-parcours__picto--fait { background: var(--pv-vert-lt); color: var(--pv-vert-dk); }
.pv-parcours li.fait .pv-parcours__rond { background: var(--pv-vert); color: var(--pv-encre); border: none; }
.pv-parcours li.fait .pv-parcours__trait { background: var(--pv-vert); }
.pv-parcours li.encours .pv-parcours__rond { background: var(--pv-jaune); color: var(--pv-encre); border: none; }
.pv-parcours li.encours .pv-parcours__texte { background: var(--pv-jaune-lt); }
.pv-parcours li:last-child .pv-parcours__trait { background: transparent; }

/* ---------- A faire maintenant ---------- */
.pv-afaire { background: var(--pv-jaune-lt); border-radius: 18px; padding: 24px 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; }
.pv-afaire--attente { background: #fff; border: 1px solid var(--pv-trait); }
.pv-afaire__texte { flex: 1 1 380px; display: flex; flex-direction: column; gap: 6px; }
.pv-afaire__titre { font-size: 22px; font-weight: 700; line-height: 1.25; }
.pv-afaire__aide { color: #4A3412; max-width: 620px; }
.pv-afaire--attente .pv-afaire__aide { color: var(--pv-encre-2); }

/* ---------- Listes en lignes ---------- */
.pv-lignes { background: #fff; border: 1px solid var(--pv-trait); border-radius: var(--pv-rayon); overflow: hidden; }
.pv-ligne {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 150px; gap: 10px 24px; align-items: center;
  padding: 16px 22px; border-top: 1px solid #F0ECE7; text-decoration: none; color: var(--pv-encre);
}
.pv-ligne:first-child { border-top: none; }
a.pv-ligne:hover { background: var(--pv-fond); color: var(--pv-encre); }
.pv-ligne__nom { font-weight: 600; font-size: 16px; }
.pv-ligne__sous { font-size: 13px; color: var(--pv-gris); margin-top: 2px; }
.pv-ligne__etape { display: flex; flex-direction: column; gap: 6px; }
.pv-ligne__droite { font-size: 13px; color: var(--pv-gris); text-align: right; }
.pv-ligne--objet { grid-template-columns: 170px minmax(0, 1.3fr) minmax(0, 1.1fr) 110px 150px; }
.pv-entete-lignes { font-size: 12px; font-weight: 600; color: var(--pv-gris); text-transform: uppercase; letter-spacing: .04em; background: var(--pv-fond); }
.pv-vide { padding: 22px; color: var(--pv-gris); }
@media (max-width: 760px) {
  .pv-ligne, .pv-ligne--objet { grid-template-columns: 1fr; }
  .pv-ligne__droite { text-align: left; }
  .pv-entete-lignes { display: none; }
}

/* Lignes simples (cle / valeur, historique) */
.pv-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 28px; margin: 0; font-size: 14px; }
.pv-infos dt { color: var(--pv-gris); }
.pv-infos dd { margin: 2px 0 0; font-weight: 600; }
.pv-infos .pv-pilule { white-space: normal; text-align: left; }
.pv-infos--col { grid-template-columns: auto 1fr; gap: 10px 16px; }
.pv-infos--col dd { margin: 0; font-weight: 400; }
.pv-histoire { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.pv-histoire li { display: grid; grid-template-columns: 96px 14px 1fr; gap: 12px; padding-bottom: 14px; }
.pv-histoire__date { font-size: 13px; color: var(--pv-gris); }
.pv-histoire__point { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: var(--pv-vert); }
.pv-histoire__point--alerte { background: #FF4845; }
.pv-histoire__point--neutre { background: var(--pv-trait-2); }

/* Papiers du dossier */
.pv-papiers { display: flex; flex-direction: column; gap: 8px; }
.pv-papier { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--pv-trait); background: #fff; }
.pv-papier--afaire { background: var(--pv-jaune-xlt); border-color: #FFDDA0; }
.pv-papier__corps { flex: 1 1 220px; min-width: 0; }
.pv-papier__nom { font-weight: 600; }
.pv-papier__officiel { font-size: 12px; color: var(--pv-gris); }
.pv-papier__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pv-papier details summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.pv-papier details[open] { flex-basis: 100%; }

/* ---------- Filtres et recherche ---------- */
.pv-filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pv-filtre {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--pv-trait-2); background: #fff; color: var(--pv-encre);
  font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
}
.pv-filtre:hover { border-color: var(--pv-encre); color: var(--pv-encre); }
.pv-filtre[aria-current="true"] { background: var(--pv-encre); border-color: var(--pv-encre); color: #fff; }
.pv-recherche-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pv-recherche {
  display: flex; align-items: center; gap: 10px; flex: 1 1 280px; max-width: 460px;
  background: #fff; border: 1.5px solid var(--pv-trait-2); border-radius: 10px; padding: 0 14px; min-height: 46px; color: var(--pv-gris);
}
.pv-recherche input { flex-grow: 1; border: none; outline: none; background: transparent; font: inherit; color: var(--pv-encre); min-height: 42px; padding: 0; }
.pv-recherche-form select { min-height: 46px; border: 1.5px solid var(--pv-trait-2); border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; color: var(--pv-encre); }
.pv-pagination { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.pv-pagination a { font-weight: 600; }

/* ---------- Formulaires ---------- */
.pv-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; }
.pv-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-champ > label, .pv-legende { font-weight: 600; font-size: 14px; padding: 0; color: var(--pv-encre); }
.pv-champ input[type="text"], .pv-champ input[type="date"], .pv-champ input[type="number"],
.pv-champ input[type="email"], .pv-champ input[type="url"], .pv-champ input[type="search"],
.pv-champ input[type="tel"], .pv-champ select, .pv-champ textarea {
  min-height: 46px; border: 1.5px solid var(--pv-trait-2); border-radius: 10px; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--pv-encre); background: #fff; width: 100%; max-width: 100%;
}
.pv-champ select[multiple] { min-height: 120px; padding: 8px; }
.pv-champ textarea { padding: 12px 14px; resize: vertical; min-height: 84px; line-height: 1.5; }
.pv-champ input:focus, .pv-champ select:focus, .pv-champ textarea:focus { outline: 2px solid var(--pv-jaune); outline-offset: 1px; border-color: var(--pv-encre); }
.pv-champ input[type="file"] { font: inherit; font-size: 14px; }
.pv-champ--erreur input, .pv-champ--erreur select, .pv-champ--erreur textarea { border-color: var(--pv-rouge-dk); }
.pv-requis { color: var(--pv-rouge-dk); }
.pv-aide { font-size: 13px; color: var(--pv-gris); }
.pv-erreur { font-size: 13px; color: var(--pv-rouge-dk); font-weight: 600; }
.pv .errorlist { list-style: none; padding: 0; margin: 0; color: var(--pv-rouge-dk); font-size: 13px; font-weight: 600; }
.pv fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.pv-coche { display: flex; gap: 12px; align-items: flex-start; min-height: 40px; font-size: 15px; font-weight: 400; cursor: pointer; }
.pv-coche input { width: 22px; height: 22px; flex-shrink: 0; margin: 1px 0 0; accent-color: var(--pv-encre); }
.pv-coche--attestation { padding: 14px 16px; border-radius: 12px; background: var(--pv-jaune-lt); font-size: 14px; }
.pv-groupe { display: flex; flex-direction: column; gap: 16px; }
.pv-groupe__titre { font-size: 17px; font-weight: 700; }

/* Choix en pastilles (radio, cases multiples) */
.pv-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-radios label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1.5px solid var(--pv-trait-2); background: #fff;
  font-weight: 600; font-size: 15px; cursor: pointer;
}
.pv-radios input { accent-color: var(--pv-encre); width: 18px; height: 18px; margin: 0; }
.pv-radios label:has(input:checked) { border-color: var(--pv-encre); background: var(--pv-fond); }
/* Oui / Non des questions : boutons pleins */
.pv-ouinon { display: flex; gap: 8px; }
.pv-ouinon label {
  min-width: 80px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1.5px solid var(--pv-trait-2); font-weight: 600; cursor: pointer; background: #fff; position: relative;
}
.pv-ouinon input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pv-ouinon label:has(input:checked) { background: var(--pv-encre); border-color: var(--pv-encre); color: #fff; }
.pv-ouinon label:has(input:focus-visible) { outline: 2px solid var(--pv-jaune); outline-offset: 2px; }
.pv-question { background: #fff; border: 1px solid var(--pv-trait); border-radius: var(--pv-rayon); padding: 20px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.pv-question__texte { flex: 1 1 340px; display: flex; flex-direction: column; gap: 4px; }
.pv-question__titre { font-weight: 600; font-size: 16px; line-height: 1.4; }
.pv-question__aide { font-size: 13px; color: var(--pv-gris); }
.pv-question--rare { background: var(--pv-fond); }

/* Choix en grandes cartes */
.pv-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* Lignes repetables (formsets) */
.pv-ligne-saisie { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; align-items: end; padding: 6px 0; border-top: 1px solid #F0ECE7; }
.pv-ligne-saisie:first-of-type { border-top: none; }
.pv-ligne-saisie__titre { font-size: 13px; font-weight: 600; color: var(--pv-gris); padding-bottom: 14px; text-align: center; }
.pv-ligne-saisie > .pv-erreur { grid-column: 2; }
.pv-ligne-saisie .pv-champs { gap: 8px 14px; }
/* Les libellés ne se répètent pas d'une ligne à l'autre (ils restent lus par les lecteurs d'écran). */
.pv-ligne-saisie ~ .pv-ligne-saisie .pv-champ > label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Encarts ---------- */
.pv-encart { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14px; }
.pv-encart > svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.pv-encart__corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-encart ul { padding-left: 18px; }
.pv-encart--ok { background: var(--pv-vert-lt); color: var(--pv-vert-dk); }
.pv-encart--info { background: var(--pv-bleu-lt); color: #0E3F42; }
.pv-encart--jaune { background: var(--pv-jaune-lt); color: #4A3412; }
.pv-encart--alerte { background: var(--pv-rouge-lt); color: #5E1410; }
.pv-encart--neutre { background: var(--pv-fond); color: var(--pv-encre-2); }
.pv-encart--violet { background: var(--pv-violet-lt); color: var(--pv-violet-dk); }
.pv-encart a { color: inherit; font-weight: 600; }

/* Code beneficiaire mis en avant */
.pv-codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 18px 20px; border-radius: 14px; background: var(--pv-encre); color: #fff; }
.pv-codebox__valeur { font-size: 24px; font-weight: 700; letter-spacing: .04em; }
.pv-codebox__aide { font-size: 13px; color: #D9D4CE; }

/* Chiffres */
.pv-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.pv-chiffre__val { font-size: 32px; font-weight: 700; line-height: 1; }
.pv-chiffre__lib { font-size: 13px; color: var(--pv-gris); margin-top: 4px; }

/* Tableau (cas rares : historique long) */
.pv-tableau { background: #fff; border: 1px solid var(--pv-trait); border-radius: var(--pv-rayon); overflow-x: auto; }
.pv-tableau table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pv-tableau th { text-align: left; font-size: 12px; font-weight: 600; color: var(--pv-gris); text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; background: var(--pv-fond); }
.pv-tableau td { padding: 12px 16px; border-top: 1px solid #F0ECE7; vertical-align: top; }

/* Icones dans les champs de recherche et le lien retour */
.pv-recherche svg, .pv-barre-module__recherche svg { width: 18px; height: 18px; flex-shrink: 0; }
.pv-retour svg { width: 16px; height: 16px; }

/* Lignes : machines et bobines */
.pv-ligne--machine { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 150px; }
.pv-ligne--bobine { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 190px; }
@media (max-width: 760px) { .pv-ligne--machine, .pv-ligne--bobine { grid-template-columns: 1fr; } }

.pv-papier--archive { opacity: .72; }

/* Liste a puces simple dans une carte */
.pv-liste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Repli (details) */
.pv-repli { background: #fff; border: 1px solid var(--pv-trait); border-radius: 14px; padding: 14px 18px; }
.pv-repli > summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.pv-repli[open] > summary { margin-bottom: 12px; }
/* Session 9 (E43) : l'historique du dossier. */
.pv-historique { list-style: none; margin: 0; padding: 0; }
.pv-historique li { display: grid; grid-template-columns: 140px 1fr auto; gap: 2px 14px; padding: 8px 0; border-top: 1px solid var(--pv-trait); font-size: 14px; }
.pv-historique__quand, .pv-historique__qui { color: var(--pv-gris); font-size: 13px; }
@media (max-width: 760px) { .pv-historique li { grid-template-columns: 1fr; } }

/* Pied de page du module */
.pv-pied { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 18px; border-top: 1px solid var(--pv-trait); font-size: 14px; }
.pv-pied a { font-weight: 600; }
.pv-pied__note { flex-basis: 100%; color: var(--pv-gris); }

/* Aide : cartes des types d'objets */
.pv-type { padding: 18px; border-radius: 16px; display: flex; flex-direction: column; gap: 6px; }
.pv-type--courant { background: var(--pv-vert-lt); }
.pv-type--courant .pv-type__nom { color: var(--pv-vert-dk); }
.pv-type--mesure { background: var(--pv-jaune); }
.pv-type--place { background: var(--pv-bleu-lt); }
.pv-type--place .pv-type__nom { color: var(--pv-bleu-dk); }
.pv-type--acheter { background: var(--pv-rouge-lt); }
.pv-type--acheter .pv-type__nom { color: var(--pv-rouge-dk); }
.pv-type__nom { font-weight: 700; }
.pv-type__texte { font-size: 14px; }
/* Session 9 (E11) : ce qu'il faut, par type d'objet, coche quand c'est fait. */
.pv-prerequis { list-style: none; margin: 4px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.pv-prerequis li { display: flex; gap: 8px; align-items: flex-start; }
.pv-prerequis svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; opacity: .5; }
.pv-prerequis li.fait svg { opacity: 1; color: var(--pv-vert-dk); }
.pv-noir { padding: 22px 24px; border-radius: 18px; background: var(--pv-encre); color: #fff; display: flex; flex-direction: column; gap: 10px; }
.pv-noir h2 { color: #fff; }
.pv-noir p { color: #E7E2DC; }

@media (max-width: 720px) {
  .pv { padding: 20px 0 48px; gap: 24px; }
  .pv-titre { font-size: 26px; }
  .pv-titre--grand { font-size: 28px; }
  .pv-carte--large { padding: 20px; }
  .pv-barre-module__recherche { order: 3; flex-basis: 100%; max-width: none; }
  /* Sur téléphone, le parcours se résume aux noms d'étapes : « À faire maintenant » remonte. */
  .pv-parcours__detail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pv *, .pv-barre-module * { transition: none !important; animation: none !important; }
}


/* ---------- Charte des formulaires (session 10, 7 octobre 2026) ----------
   La meme que l'analyse des risques et l'entretien : les questions
   ressortent, la reponse choisie se colore, les questions empilees sont
   separees d'un trait. Classe pv-etapes sur un formulaire : ses parties
   (section > .pv-h2, ou fieldset > .pv-groupe__titre) se numerotent seules
   en rond jaune. */
.pv-champ > label, .pv-legende { font-size: 16px; font-weight: 700; }
.pv-ligne-saisie .pv-champ > label { font-size: 13px; font-weight: 600; color: var(--pv-gris); }
.pv-radios label { font-weight: 400; color: var(--pv-encre-2); }
.pv-radios label:has(input:checked) { background: var(--pv-jaune-lt); border-color: var(--pv-encre); color: var(--pv-encre); font-weight: 600; }
.pv-champ--checkbox > .pv-coche { padding: 12px 16px; border: 1.5px solid var(--pv-trait); border-radius: 12px; background: #fff; align-items: center; min-height: 50px; }
.pv-champ--checkbox > .pv-coche input { margin: 0; accent-color: var(--pv-vert-dk); }
.pv-champ--checkbox > .pv-coche:has(input:checked) { background: var(--pv-vert-lt); border-color: var(--pv-vert); font-weight: 600; }
.pv-encart--alerte .pv-champ--checkbox > .pv-coche input { accent-color: var(--pv-rouge-dk); }
.pv-encart--alerte .pv-champ--checkbox > .pv-coche:has(input:checked) { background: #fff; border-color: var(--pv-rouge-dk); }
:is(.pv-carte, .pv-groupe) > :is(.pv-champ, .pv-champs) + :is(.pv-champ, .pv-champs):not(fieldset) { padding-top: 18px; border-top: 1px solid #F0ECE7; }
.pv-question__titre { font-weight: 700; }
.pv-ouinon label:has(input:checked) { background: var(--pv-jaune); border-color: var(--pv-encre); color: var(--pv-encre); }
.pv-question:has(input:checked) { border-color: var(--pv-jaune); }
.pv-etapes { counter-reset: pv-etape; }
.pv-etapes > fieldset.pv-groupe { margin-top: 8px; }
.pv-etapes > fieldset.pv-groupe > .pv-groupe__titre,
.pv-etapes > section.pv-carte > .pv-h2,
.pv-etapes > section.pv-carte > div > .pv-h2 { display: flex; align-items: center; gap: 12px; }
.pv-etapes > fieldset.pv-groupe > .pv-groupe__titre::before,
.pv-etapes > section.pv-carte > .pv-h2::before,
.pv-etapes > section.pv-carte > div > .pv-h2::before {
  counter-increment: pv-etape; content: counter(pv-etape); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--pv-jaune); color: var(--pv-encre); font-size: 16px; font-weight: 700;
}

/* Session 15 : les longues zones de texte du cahier des charges sur toute la largeur. */
.pv-champs > .pv-champ:has(textarea.pv-large) { grid-column: 1 / -1; }

/* Qualification en direct (28 octobre 2026, variante B) : le grand cadre
   « Votre résultat » avec le code, et les quatre types en cases compactes. */
.pv-resultat { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--pv-rayon); border: 2px solid transparent; transition: background-color .2s, border-color .2s; }
.pv-resultat__vif { display: flex; flex-direction: column; gap: 6px; }
.pv-resultat__surtitre { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pv-resultat__code { font-size: 88px; font-weight: 800; letter-spacing: -.045em; line-height: .95; overflow-wrap: anywhere; }
.pv-resultat__titre { font-size: 22px; font-weight: 800; }
.pv-resultat__nom { font-size: 14px; font-weight: 600; color: var(--pv-encre); }
.pv-resultat__texte { margin: 2px 0 0; font-size: 15px; color: var(--pv-encre); }
.pv-resultat__pourquoi { font-size: 14px; color: var(--pv-encre); }
.pv-resultat__pourquoi summary { cursor: pointer; font-weight: 700; }
.pv-resultat__pourquoi p { margin: 6px 0 0; }
.pv-resultat__restants { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--pv-gris); }
.pv-resultat__restants[hidden] { display: none; }
.pv-resultat__restants [data-champ="puces"] { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pv-resultat--attente { background: #fff; border: 2px dashed #CFC8BF; }
.pv-resultat--attente .pv-resultat__code { color: var(--pv-gris); }
.pv-resultat--courant { background: var(--pv-vert-lt); border-color: var(--pv-vert-lt); }
.pv-resultat--courant :is(.pv-resultat__surtitre, .pv-resultat__code, .pv-resultat__titre) { color: var(--pv-vert-dk); }
.pv-resultat--mesure { background: var(--pv-jaune); border-color: var(--pv-jaune); }
.pv-resultat--mesure :is(.pv-resultat__surtitre, .pv-resultat__code, .pv-resultat__titre) { color: var(--pv-encre); }
.pv-resultat--place { background: var(--pv-bleu-lt); border-color: var(--pv-bleu-lt); }
.pv-resultat--place :is(.pv-resultat__surtitre, .pv-resultat__code, .pv-resultat__titre) { color: var(--pv-bleu-dk); }
.pv-resultat--acheter { background: var(--pv-rouge-lt); border-color: var(--pv-rouge-lt); }
.pv-resultat--acheter :is(.pv-resultat__surtitre, .pv-resultat__code, .pv-resultat__titre) { color: var(--pv-rouge-dk); }
.pv-puce-code { font-size: 13px; font-weight: 800; padding: 5px 9px; border-radius: 8px; }
.pv-puce-code--courant { background: var(--pv-vert-dk); color: #fff; }
.pv-puce-code--mesure { background: var(--pv-jaune); color: var(--pv-encre); }
.pv-puce-code--place { background: var(--pv-bleu-dk); color: #fff; }
.pv-puce-code--acheter { background: var(--pv-rouge-dk); color: #fff; }
.pv-type--compact { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; transition: opacity .2s, box-shadow .2s; }
.pv-type__code { flex: 0 0 64px; text-align: center; font-size: 16px; font-weight: 800; padding: 9px 0; border-radius: 10px; }
.pv-type--courant .pv-type__code { background: var(--pv-vert-dk); color: #fff; }
.pv-type--mesure .pv-type__code { background: var(--pv-encre); color: #fff; }
.pv-type--place .pv-type__code { background: var(--pv-bleu-dk); color: #fff; }
.pv-type--acheter .pv-type__code { background: var(--pv-rouge-dk); color: #fff; }
.pv-type__corps { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-type--ecarte { opacity: .4; }
.pv-type--retenu { box-shadow: 0 0 0 3px var(--pv-encre); }
.pv-question--inutile { opacity: .55; }
.pv-question--inutile .pv-question__texte::after { content: "Sans effet : le résultat est déjà connu."; display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--pv-gris); }
@media (max-width: 760px) { .pv-resultat__code { font-size: 64px; } }
