/* Docuse v2 — fondations du nouveau design, reprises de la landing page v2.
 *
 * Les pages du logiciel migrent une à une vers ce fichier. Il porte les
 * couleurs, la typographie et les composants de base ; chaque page n'ajoute
 * que sa propre mise en page.
 */

:root {
  --v2-noir: #1d1d1f;
  --v2-texte: #424245;
  --v2-gris: #6e6e73;
  --v2-gris-clair: #86868b;
  --v2-bordure: #d2d2d7;
  --v2-trait: #e5e5ea;
  --v2-fond: #f5f5f7;
  --v2-blanc: #ffffff;
  --v2-orange: #f97316;
  --v2-orange-fonce: #ea580c;
  --v2-erreur: #c2410c;
  --v2-police: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --v2-ressort: cubic-bezier(.16, 1, .3, 1);
}

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

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

body.v2 {
  margin: 0;
  background: var(--v2-blanc);
  color: var(--v2-noir);
  font-family: var(--v2-police);
  -webkit-font-smoothing: antialiased;
}

.v2 a { color: var(--v2-noir); text-decoration: none; }
.v2 a:hover { color: var(--v2-orange); }
.v2 ::selection { background: rgba(249, 115, 22, .22); }

/* ── Logo ────────────────────────────────────────────────────────────── */
.v2-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.02em;
}
.v2-logo::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--v2-orange);
}

/* ── Titres ──────────────────────────────────────────────────────────── */
.v2-surtitre {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--v2-gris);
  letter-spacing: -.01em;
}
.v2-gris { color: var(--v2-gris-clair); }
.v2-orange { color: var(--v2-orange); }

/* ── Boutons ─────────────────────────────────────────────────────────── */
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 980px;
  font: 500 17px/1 var(--v2-police);
  cursor: pointer;
  transition: background-color .3s, transform .3s var(--v2-ressort);
}
.v2-btn:active { transform: scale(.98); }
.v2 .v2-btn--orange { background: var(--v2-orange); color: #fff; }
.v2 .v2-btn--orange:hover { background: var(--v2-orange-fonce); color: #fff; }
.v2 .v2-btn--noir { background: var(--v2-noir); color: #fff; }
.v2 .v2-btn--noir:hover { background: #000; color: #fff; }
.v2-btn--plein { width: 100%; }

/* Bouton en cours d'envoi : un rond tourne devant le libellé */
.v2-btn-rond { display: none; width: 18px; height: 18px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: v2Tourne .7s linear infinite; }
.v2-btn.est-en-cours { pointer-events: none; }
.v2-btn.est-en-cours .v2-btn-rond { display: block; }
@keyframes v2Tourne { to { transform: rotate(360deg); } }

/* ── Champs ──────────────────────────────────────────────────────────── */
.v2-champ { display: flex; flex-direction: column; gap: 6px; }
.v2-champ[hidden] { display: none; }
.v2-champ label { font-size: 13px; color: var(--v2-gris); }
.v2-champ-boite { position: relative; }
.v2-champ input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--v2-bordure);
  border-radius: 12px;
  background: var(--v2-blanc);
  color: var(--v2-noir);
  font: 17px var(--v2-police);
  transition: border-color .2s;
}
.v2-champ input::placeholder { color: var(--v2-gris-clair); }
.v2-champ input:focus { outline: none; border-color: var(--v2-noir); }
.v2-champ input[aria-invalid="true"] { border-color: var(--v2-erreur); }
.v2-champ-boite input { padding-right: 52px; }
.v2-oeil {
  position: absolute;
  top: 0;
  right: 4px;
  width: 44px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--v2-gris);
  cursor: pointer;
}
.v2-oeil:hover { color: var(--v2-noir); }
.v2-oeil svg { width: 20px; height: 20px; }
.v2-oeil .v2-oeil-barre { display: none; }
.v2-oeil[aria-pressed="true"] .v2-oeil-barre { display: inline; }
.v2-champ-erreur { margin: 0; font-size: 13px; color: var(--v2-erreur); }

/* ── Messages ────────────────────────────────────────────────────────── */
.v2-messages { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.v2-message {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--v2-fond);
  font-size: 15px;
  line-height: 1.45;
  color: var(--v2-noir);
}
.v2-message.error { background: #fff4ed; color: var(--v2-erreur); }
.v2-message.success { background: var(--v2-fond); }

/* ── Pages d'authentification : panneau + formulaire ─────────────────── */
.v2-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  padding: 12px;
  gap: 12px;
}
.v2-auth-panneau {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px 44px;
  border-radius: 32px;
  background: var(--v2-fond);
  overflow: hidden;
}
.v2-auth-titre {
  margin: 0;
  max-width: 640px;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 600;
  text-wrap: balance;
}
.v2-auth-texte {
  margin: 24px 0 0;
  max-width: 480px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--v2-gris);
  text-wrap: pretty;
}
.v2-auth-pied {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--v2-gris);
}
.v2-auth-pied span { display: inline-flex; align-items: center; gap: 8px; }
.v2-auth-pied span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--v2-gris-clair);
}

.v2-auth-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.v2-auth-formulaire { width: 100%; max-width: 380px; }
.v2-auth-formulaire h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 600;
}
.v2-auth-formulaire .v2-auth-intro {
  margin: 0 0 32px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--v2-gris);
}
.v2-auth-champs { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.v2-auth-lien {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 15px;
  color: var(--v2-texte);
}
.v2-auth .v2-auth-lien:hover { color: var(--v2-orange); }

/* Apparition douce au chargement */
@keyframes v2Monte { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
.v2-apparait { animation: v2Monte 1.1s var(--v2-ressort) both; animation-delay: var(--d, 0ms); }

@media (max-width: 900px) {
  .v2-auth { grid-template-columns: 1fr; padding: 8px; gap: 0; }
  .v2-auth-panneau { padding: 24px 24px 28px; border-radius: 24px; gap: 40px; }
  .v2-auth-titre { font-size: clamp(30px, 8vw, 44px); }
  .v2-auth-texte { font-size: 17px; margin-top: 14px; }
  .v2-auth-pied { display: none; }
  .v2-auth-zone { align-items: flex-start; padding: 32px 16px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-apparait { animation: none; }
  .v2-btn { transition: none; }
}

/* ── Aide « mot de passe oublié » ────────────────────────────────────── */
.v2-etapes-aide { display: flex; flex-direction: column; margin-bottom: 32px; border-top: 1px solid var(--v2-trait); }
.v2-etapes-aide > div { padding: 20px 0; border-bottom: 1px solid var(--v2-trait); }
.v2-etapes-aide h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.v2-etapes-aide p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--v2-gris); }
.v2-etapes-aide a { text-decoration: underline; text-underline-offset: 2px; }

/* ══ Coque des pages connectées ═══════════════════════════════════════ */
.v2-entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.v2-entete-in {
  max-width: 1200px;
  margin: 0 auto;
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.v2-nav { flex: 1; display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.v2-nav::-webkit-scrollbar { display: none; }
.v2 .v2-nav a {
  padding: 6px 12px;
  border-radius: 980px;
  font-size: 13px;
  color: var(--v2-texte);
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.v2 .v2-nav a:hover { color: var(--v2-noir); background: var(--v2-fond); }
.v2 .v2-nav a[aria-current="page"] { color: var(--v2-noir); background: var(--v2-fond); font-weight: 500; }
.v2-entete-droite { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.v2-utilisateur { display: flex; align-items: center; gap: 10px; color: var(--v2-gris); }
.v2-role {
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--v2-fond);
  color: var(--v2-noir);
  font-size: 12px;
  font-weight: 500;
}
.v2 .v2-deconnexion { color: var(--v2-texte); white-space: nowrap; }
.v2 .v2-deconnexion:hover { color: var(--v2-noir); }

.v2-page { max-width: 1200px; margin: 0 auto; padding: 0 24px 120px; }
.v2-page-messages { max-width: 760px; margin: 24px 0 0; }

/* ── En-tête de page ─────────────────────────────────────────────────── */
.v2-titre-page { padding: 72px 0 56px; }
.v2-titre-page h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 600;
  text-wrap: balance;
}
.v2-titre-page p { margin: 18px 0 0; max-width: 640px; font-size: 19px; line-height: 1.45; color: var(--v2-gris); }

/* ── Compteurs de quotas ─────────────────────────────────────────────── */
.v2-quotas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 32px 40px;
  margin-bottom: 72px;
}
.v2-quota { border-top: 1px solid var(--v2-bordure); padding-top: 20px; }
.v2-quota-nom { font-size: 15px; font-weight: 600; color: var(--v2-gris); }
.v2-quota-val {
  margin: 6px 0 14px;
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 200;
  letter-spacing: -.05em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.v2-quota-val small { font-size: 17px; font-weight: 400; letter-spacing: 0; color: var(--v2-gris); }
.v2-quota-barre { height: 4px; border-radius: 4px; background: var(--v2-trait); overflow: hidden; }
.v2-quota-barre span { display: block; height: 100%; border-radius: 4px; background: var(--v2-noir); transform-origin: 0 50%; }
.v2-quota.complet .v2-quota-barre span { background: var(--v2-orange); }
.v2-quota-note { margin: 10px 0 0; font-size: 13px; color: var(--v2-gris); }
.v2-quota.complet .v2-quota-note { color: var(--v2-erreur); }

/* Variante compacte (espace groupe) : une seule ligne de jauges */
.v2-qminis {
  display: flex;
  flex-wrap: wrap;
  margin: -24px 0 48px;
  border: 1px solid var(--v2-trait);
  border-radius: 18px;
}
.v2-qmini {
  flex: 1 1 200px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 8px 12px;
  padding: 14px 20px;
  border-left: 1px solid var(--v2-trait);
}
.v2-qmini:first-child { border-left: 0; }
.v2-qmini-nom { font-size: 13px; font-weight: 500; color: var(--v2-gris); }
.v2-qmini-val { font-size: 13px; color: var(--v2-gris); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-qmini-val b { font-size: 20px; font-weight: 600; color: var(--v2-noir); letter-spacing: -.02em; }
.v2-qmini-barre { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--v2-trait); overflow: hidden; }
.v2-qmini-barre span { display: block; height: 100%; border-radius: 3px; background: var(--v2-noir); }
.v2-qmini.complet .v2-qmini-barre span { background: var(--v2-orange); }
.v2-qmini.complet .v2-qmini-val b { color: var(--v2-orange); }
.v2-qminis-alerte { margin: -36px 0 48px; font-size: 13px; color: var(--v2-erreur); }
@media (max-width: 640px) {
  .v2-qminis { margin-top: -12px; }
  .v2-qmini { flex-basis: 100%; border-left: 0; border-top: 1px solid var(--v2-trait); }
  .v2-qmini:first-child { border-top: 0; }
}

/* ── Bloc gris arrondi ───────────────────────────────────────────────── */
.v2-bloc { background: var(--v2-fond); border-radius: 32px; padding: clamp(24px, 4vw, 48px); }
.v2-bloc-tete {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 32px;
}
.v2-bloc-tete h2 { margin: 0; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.v2-bloc-tete p { margin: 10px 0 0; max-width: 620px; font-size: 17px; line-height: 1.5; color: var(--v2-gris); }

.v2-carte { background: var(--v2-blanc); border-radius: 24px; padding: clamp(20px, 3vw, 32px); }
.v2-carte + .v2-carte { margin-top: 12px; }
.v2-carte h3 { margin: 0 0 20px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.v2-sous-titre { grid-column: 1 / -1; margin: 12px 0 0; font-size: 15px; font-weight: 600; }

.v2-grille-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.v2-champ--large { grid-column: 1 / -1; }
.v2-grille-champs--une { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
/* Règles du mot de passe (liste fournie par les validateurs Django) */
.v2-regles-mdp ul { margin: 2px 0 0; padding-left: 18px; }
.v2-regles-mdp li + li { margin-top: 2px; }
.v2-champ-aide { margin: 0; font-size: 13px; color: var(--v2-gris-clair); }
.v2-facultatif { color: var(--v2-gris-clair); }
.v2-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 28px; }

/* Boutons secondaires */
.v2 .v2-btn--contour { background: var(--v2-blanc); color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2 .v2-btn--contour:hover { color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.v2-btn[disabled], .v2-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.v2 .v2-lien-discret {
  border: 0;
  background: none;
  padding: 0 4px;
  font: 14px var(--v2-police);
  color: var(--v2-gris);
  cursor: pointer;
}
.v2 .v2-lien-discret:hover { color: var(--v2-noir); }
.v2 .v2-lien-discret--danger:hover { color: var(--v2-erreur); }

/* ── Ligne d'une liste ───────────────────────────────────────────────── */
.v2-liste { display: flex; flex-direction: column; gap: 12px; }
.v2-ligne {
  display: grid;
  /* Colonnes fixes à droite : d'une carte à l'autre, tout reste aligné */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) 240px 290px;
  align-items: center;
  gap: 16px 28px;
  padding: 24px 28px;
  background: var(--v2-blanc);
  border-radius: 24px;
}
.v2-ligne.inactive { background: rgba(255, 255, 255, .55); }
.v2-ligne.inactive .v2-ligne-nom { color: var(--v2-gris); }
.v2-ligne-nom { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.v2-ligne-detail { margin: 4px 0 0; font-size: 14px; color: var(--v2-gris); }
.v2-ligne-etiquette { font-size: 12px; color: var(--v2-gris-clair); margin-bottom: 2px; }
.v2-ligne-valeur { font-size: 15px; color: var(--v2-noir); overflow-wrap: anywhere; }
.v2-chiffres { display: flex; gap: 22px; padding-right: 8px; }
.v2-chiffres div { display: flex; flex-direction: column; }
.v2-chiffres b { font-size: 22px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.v2-chiffres span { font-size: 12px; color: var(--v2-gris); }
.v2-ligne-actions { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
.v2-ligne-actions form { margin: 0; }

.v2-pastille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--v2-fond);
  font-size: 12px;
  font-weight: 500;
  color: var(--v2-noir);
  white-space: nowrap;
}
.v2-pastille::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34c759; }
.v2-pastille--off { color: var(--v2-gris); }
.v2-pastille--off::before { background: var(--v2-gris-clair); }
.v2-pastille--ici { background: #fff4ed; color: var(--v2-erreur); }
.v2-pastille--ici::before { background: var(--v2-orange); }
.v2-provisoire { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--v2-erreur); }

.v2-vide { padding: 56px 24px; text-align: center; color: var(--v2-gris); font-size: 17px; background: var(--v2-blanc); border-radius: 24px; }

/* Panneau de création repliable */
details.v2-creation > summary { list-style: none; }
details.v2-creation > summary::-webkit-details-marker { display: none; }
details.v2-creation[open] > summary { display: none; }
details.v2-creation[open] { margin-bottom: 12px; }
.v2-creation-panneau { animation: v2Monte .7s var(--v2-ressort) both; }

.v2-pied-page { margin-top: 40px; font-size: 14px; color: var(--v2-gris); }
.v2 .v2-pied-page a { color: var(--v2-texte); }

@media (max-width: 1140px) {
  .v2-ligne { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .v2-ligne-actions { justify-content: flex-end; }
}
@media (max-width: 720px) {
  /* En-tête sur une ligne : logo + bouton menu (voir « Menu du téléphone ») */
  .v2-entete-in { position: relative; height: 56px; padding: 0 16px; gap: 16px; }
  .v2-entete-droite { margin-left: auto; }
  .v2-utilisateur-nom { display: none; }
  .v2-page { padding: 0 16px 80px; }
  .v2-titre-page { padding: 44px 0 36px; }
  .v2-quotas { margin-bottom: 48px; }
  .v2-grille-champs { grid-template-columns: minmax(0, 1fr); }
  .v2-ligne { grid-template-columns: 1fr; padding: 20px; }
  .v2-ligne-actions { justify-content: flex-start; flex-wrap: wrap; }
  .v2-bloc { border-radius: 24px; margin: 0 -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-creation-panneau { animation: none; }
}

/* ── Cartes « entreprise » de l'espace groupe ────────────────────────── */
.v2-ligne--entreprise { grid-template-columns: minmax(0, 1fr) 300px auto; padding: 22px 24px 22px 28px; }
.v2-ligne--entreprise .v2-ligne-nom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v2-ligne--entreprise .v2-ligne-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Le bouton « Nouvelle entreprise » se place en haut à droite du bloc */
.v2-bloc { position: relative; }
@media (min-width: 721px) {
  details.v2-creation > summary { position: absolute; top: clamp(24px, 4vw, 48px); right: clamp(24px, 4vw, 48px); }
  .v2-bloc--creation .v2-bloc-tete { padding-right: 240px; }
}
@media (max-width: 720px) {
  details.v2-creation > summary { margin-bottom: 24px; }
}

/* ── Menu « ⋯ » ──────────────────────────────────────────────────────── */
details.v2-menu { position: relative; }
details.v2-menu > summary {
  list-style: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--v2-gris);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
details.v2-menu > summary::-webkit-details-marker { display: none; }
details.v2-menu > summary:hover, details.v2-menu[open] > summary { background: var(--v2-fond); color: var(--v2-noir); }
details.v2-menu > summary svg { width: 20px; height: 20px; fill: currentColor; }
.v2-menu-liste {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 220px;
  padding: 6px;
  background: var(--v2-blanc);
  border-radius: 14px;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05);
  animation: v2Menu .25s var(--v2-ressort) both;
}
@keyframes v2Menu { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.v2-menu-liste form { margin: 0; }
.v2 .v2-menu-liste a, .v2-menu-liste button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  font: 15px var(--v2-police);
  color: var(--v2-noir);
  cursor: pointer;
}
.v2 .v2-menu-liste a:hover, .v2-menu-liste button:hover { background: var(--v2-fond); color: var(--v2-noir); }
.v2 .v2-menu-liste .v2-menu-danger { color: var(--v2-erreur); }
.v2 .v2-menu-liste .v2-menu-danger:hover { color: var(--v2-erreur); }

@media (max-width: 900px) {
  .v2-ligne--entreprise { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-ligne--entreprise .v2-chiffres { grid-row: 2; }
}
@media (max-width: 720px) {
  .v2-ligne--entreprise { grid-template-columns: 1fr; }
  .v2-ligne--entreprise .v2-chiffres { grid-row: auto; }
  .v2-ligne--entreprise .v2-ligne-actions { justify-content: space-between; flex-direction: row-reverse; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-menu-liste { animation: none; }
  .v2-barre-enregistrer, .v2-barre-enregistrer .v2-btn { transition: none; }
}

/* ══ Formulaires en sections (fiches) ═════════════════════════════════ */
.v2-sections { display: flex; flex-direction: column; gap: 12px; }
.v2-section {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 24px 48px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--v2-blanc);
  border-radius: 24px;
  scroll-margin-top: 72px;
}
.v2-section-tete h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.v2-section-tete p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--v2-gris); }

/* Listes déroulantes et zones de texte au format des champs */
.v2-champ select, .v2-champ textarea {
  width: 100%;
  border: 1px solid var(--v2-bordure);
  border-radius: 12px;
  background: var(--v2-blanc);
  color: var(--v2-noir);
  font: 17px var(--v2-police);
  transition: border-color .2s;
}
.v2-champ select {
  height: 52px;
  padding: 0 44px 0 16px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  text-overflow: ellipsis;
}
.v2-champ textarea { padding: 14px 16px; min-height: 120px; resize: vertical; }
.v2-champ select:focus, .v2-champ textarea:focus { outline: none; border-color: var(--v2-noir); }

/* Logo : aperçu et choix du fichier */
.v2-logo-champ { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.v2-logo-apercu {
  width: 160px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 16px;
  background: var(--v2-fond);
  transition: opacity .3s;
}
.v2-logo-apercu img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v2-logo-apercu span { font-size: 13px; color: var(--v2-gris-clair); }
.v2-logo-apercu.est-efface { opacity: .25; }
.v2-logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.v2-logo-actions label.v2-btn { cursor: pointer; }
.v2-fichier-cache { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.v2-fichier-cache:focus-visible + .v2-champ-aide { outline: 2px solid var(--v2-noir); }
.v2-case { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--v2-texte); cursor: pointer; }
.v2-case input { width: 16px; height: 16px; accent-color: var(--v2-orange); }

/* Barre d'enregistrement : reste visible pendant le défilement */
.v2-barre-enregistrer {
  position: sticky;
  bottom: 16px;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: fit-content;
  margin: 24px 0 0 auto;
  padding: 10px;
  border-radius: 980px;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .05);
}

/* Pendant le défilement, « Annuler » se replie sous « Enregistrer » :
   la barre devient un seul bouton, puis se déplie à l'arrêt. */
.v2-barre-enregistrer { transition: padding .5s var(--v2-ressort), gap .5s var(--v2-ressort), background-color .4s, box-shadow .4s; }
.v2-barre-enregistrer .v2-btn { transition: background-color .3s, transform .5s var(--v2-ressort), height .5s var(--v2-ressort), padding .5s var(--v2-ressort), font-size .5s var(--v2-ressort), box-shadow .5s; }
.v2-barre-enregistrer .v2-btn--contour {
  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width .55s var(--v2-ressort), padding .55s var(--v2-ressort), opacity .3s, transform .55s var(--v2-ressort), box-shadow .3s;
}
/* Fusionnée : plus de cadre, seulement le bouton orange, plus petit */
.v2-barre-enregistrer.est-fusionne {
  gap: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
.v2-barre-enregistrer.est-fusionne .v2-btn--contour {
  max-width: 0;
  padding: 0;
  opacity: 0;
  transform: translateX(40px) scale(.8);
  box-shadow: none;
}
.v2-barre-enregistrer.est-fusionne .v2-btn--orange {
  height: 40px;
  padding: 0 20px;
  font-size: 15px;
  box-shadow: 0 10px 28px -8px rgba(249, 115, 22, .55);
}

@media (max-width: 900px) {
  .v2-section { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  .v2-barre-enregistrer { width: auto; margin: 20px 0 0; bottom: 12px; }
  .v2-barre-enregistrer .v2-btn { flex: 1; }
  .v2-barre-enregistrer .v2-btn--contour { transition: max-width .55s var(--v2-ressort), flex-grow .55s var(--v2-ressort), padding .55s var(--v2-ressort), opacity .3s, transform .55s var(--v2-ressort); }
  .v2-barre-enregistrer.est-fusionne .v2-btn--contour { flex-grow: 0; }
  /* La barre se resserre en une pastille centrée */
  .v2-barre-enregistrer { max-width: 100%; margin-left: auto; margin-right: auto; transition: max-width .55s var(--v2-ressort), padding .5s var(--v2-ressort), gap .5s var(--v2-ressort), background-color .4s, box-shadow .4s; }
  .v2-barre-enregistrer.est-fusionne { max-width: 140px; }
}

/* ══ Tableaux de bord (indicateurs) ═══════════════════════════════════ */
.v2-kpi-barre {
  position: sticky;
  top: 52px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px 24px;
  margin: 0 -24px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.v2-segments { display: inline-flex; flex-shrink: 0; padding: 3px; border-radius: 980px; background: var(--v2-fond); }
.v2 .v2-segments a { padding: 6px 14px; border-radius: 980px; font-size: 13px; color: var(--v2-texte); white-space: nowrap; transition: background-color .2s, box-shadow .2s; }
.v2 .v2-segments a:hover { color: var(--v2-noir); }
.v2 .v2-segments a[aria-current="true"] { background: var(--v2-blanc); color: var(--v2-noir); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.v2-sommaire { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.v2-sommaire::-webkit-scrollbar { display: none; }
.v2 .v2-sommaire a { padding: 6px 10px; border-radius: 980px; font-size: 13px; color: var(--v2-gris); white-space: nowrap; }
.v2 .v2-sommaire a:hover, .v2 .v2-sommaire a[aria-current="true"] { color: var(--v2-noir); }
.v2 .v2-sommaire a[aria-current="true"] { background: var(--v2-fond); }

.v2-kpi-section { padding-top: 88px; scroll-margin-top: 60px; }
.v2-kpi-tete { margin-bottom: 32px; }
.v2-kpi-tete h2 { margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.06; letter-spacing: -.035em; font-weight: 600; }
.v2-kpi-tete p { margin: 12px 0 0; max-width: 640px; font-size: 17px; line-height: 1.5; color: var(--v2-gris); }

/* L'essentiel : un chiffre héros, quatre tuiles */
.v2-essentiel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px 64px; align-items: end; }
.v2-heros-val { font-size: clamp(96px, 13vw, 176px); font-weight: 600; letter-spacing: -.06em; line-height: .9; }
.v2-heros-lbl { margin-top: 16px; font-size: 21px; line-height: 1.35; letter-spacing: -.01em; }
.v2-tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.v2-tuile { border-top: 1px solid var(--v2-bordure); padding-top: 16px; }
.v2-tuile-lbl { font-size: 15px; font-weight: 600; color: var(--v2-gris); }
.v2-tuile-val { margin-top: 4px; font-size: clamp(40px, 4vw, 56px); font-weight: 300; letter-spacing: -.04em; line-height: 1.1; }
.v2-tuile-val small, .v2-carte-chiffre small { font-size: 17px; font-weight: 400; letter-spacing: 0; color: var(--v2-gris); }
.v2-tuile-aide { margin-top: 6px; font-size: 13px; color: var(--v2-gris); }
.v2-tuile--alerte .v2-tuile-val { color: var(--v2-erreur); }

/* Indices réglementaires : bloc sombre */
.v2-kpi-section.v2-sombre {
  margin-top: 88px;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 32px;
  background: #000;
  color: #f5f5f7;
}
.v2-sombre .v2-kpi-tete p { color: #a1a1a6; }
.v2-indices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.v2-indice { border-top: 1px solid #333336; padding-top: 20px; }
.v2-indice-nom { font-size: 15px; font-weight: 600; color: #a1a1a6; }
.v2-indice-val { margin: 10px 0 12px; font-size: clamp(56px, 6vw, 88px); font-weight: 300; letter-spacing: -.05em; line-height: 1; }
.v2-indice p { margin: 0; font-size: 14px; line-height: 1.5; color: #86868b; }
.v2-indices-vide { margin: 32px 0 0; font-size: 15px; color: #a1a1a6; }

/* Cartes grises des graphiques */
.v2-kpi-section .v2-carte { background: var(--v2-fond); }
.v2-kpi-section .v2-carte + .v2-carte { margin-top: 0; }
.v2-kpi-section .v2-carte h3 { margin: 0 0 20px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.v2-carte-chiffre { margin: -8px 0 20px; font-size: 40px; font-weight: 300; letter-spacing: -.03em; }
.v2-carte--tableau { overflow-x: auto; }
.v2-grille-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-grille-kpi--large { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.v2-grille-kpi--trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-carte--pleine { grid-column: 1 / -1; }
.v2-tuiles--secours { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 40px; }
.v2-vide-graphe { margin: 0; padding: 24px 0; font-size: 15px; color: var(--v2-gris); }

/* Histogramme : colonnes fines, arrondies en haut, carrées sur la ligne de base */
.v2-histo { margin: 0; }
.v2-histo-zone {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 220px;
  padding-top: 26px;
  border-bottom: 1px solid var(--v2-bordure);
}
.v2-histo--bas .v2-histo-zone { height: 150px; }
.v2-histo--serre .v2-histo-zone { gap: 2px; }
.v2-histo-col {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  outline: none;
}
.v2-histo-barre {
  display: block;
  width: min(24px, 72%);
  min-height: 0;
  border-radius: 4px 4px 0 0;
  background: var(--v2-noir);
  transition: opacity .2s, transform .5s var(--v2-ressort);
  transform-origin: 50% 100%;
}
.v2-histo--serre .v2-histo-barre { width: min(14px, 80%); border-radius: 3px 3px 0 0; }
.v2-histo-col.accent .v2-histo-barre { background: var(--v2-orange); }
.v2-histo-val { margin-bottom: 6px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-histo-col:hover .v2-histo-barre, .v2-histo-col:focus-visible .v2-histo-barre { opacity: .72; }
.v2-histo-col:focus-visible { box-shadow: inset 0 0 0 2px var(--v2-orange); border-radius: 6px; }
.v2-histo-col::after {
  content: attr(data-bulle);
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--v2-noir);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(4px);
  transition: opacity .15s, transform .25s var(--v2-ressort);
}
.v2-histo-col:hover::after, .v2-histo-col:focus-visible::after { opacity: 1; transform: translate(-50%, -100%); }
/* Aux extrémités, la bulle s'aligne sur la colonne pour ne pas sortir de l'écran */
.v2-histo-col:first-child::after { left: 0; transform: translate(0, -100%) translateY(4px); }
.v2-histo-col:last-child::after { left: auto; right: 0; transform: translate(0, -100%) translateY(4px); }
.v2-histo-col:first-child:hover::after, .v2-histo-col:first-child:focus-visible::after,
.v2-histo-col:last-child:hover::after, .v2-histo-col:last-child:focus-visible::after { transform: translate(0, -100%); }
.v2-histo-axe {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--v2-gris);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.v2-histo--serre .v2-histo-axe { gap: 2px; }
/* Un libellé peut déborder de sa colonne : ses voisines sont vides ou masquées */
.v2-histo-axe span { display: flex; justify-content: center; white-space: nowrap; overflow: visible; }

/* Tableau des données, replié sous chaque histogramme */
details.v2-donnees { margin-top: 16px; font-size: 13px; }
details.v2-donnees > summary { width: fit-content; color: var(--v2-gris); cursor: pointer; list-style: none; }
details.v2-donnees > summary::-webkit-details-marker { display: none; }
details.v2-donnees > summary::after { content: " +"; }
details.v2-donnees[open] > summary::after { content: " −"; }
details.v2-donnees > summary:hover { color: var(--v2-noir); }
details.v2-donnees table { margin-top: 10px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
details.v2-donnees th, details.v2-donnees td { padding: 3px 16px 3px 0; text-align: left; font-weight: 400; }
details.v2-donnees th { color: var(--v2-gris); }

/* Barres horizontales : libellé, valeur au bout, piste fine */
.v2-barres { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.v2-barres-tete { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 6px; font-size: 15px; }
.v2-barres-tete b { font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-piste { display: block; height: 6px; border-radius: 3px; background: var(--v2-trait); overflow: hidden; }
.v2-piste > span { display: block; height: 100%; border-radius: 3px; background: var(--v2-noir); }

/* Podium des trois premiers : marche à la hauteur de la valeur, le premier en orange */
.v2-podium { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 10px; }
.v2-podium-marche {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center;
  text-align: center; outline: none; transition: opacity .3s;
}
.v2-podium-nom {
  font-size: 15px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.v2-podium-part { margin: 2px 0 10px; font-size: 15px; color: var(--v2-gris); font-variant-numeric: tabular-nums; }
.v2-podium-part b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--v2-noir); }
.v2-podium-socle {
  align-self: stretch; display: flex; justify-content: center; padding-top: 12px;
  border-radius: 14px 14px 4px 4px; background: var(--v2-blanc);
  font-size: 26px; font-weight: 600; color: var(--v2-gris-clair);
  transition: transform .4s var(--v2-ressort), box-shadow .4s var(--v2-ressort);
}
.v2-podium-marche:hover .v2-podium-socle,
.v2-podium-marche:focus .v2-podium-socle { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .3); }
.v2-podium:hover .v2-podium-marche:not(:hover) { opacity: .5; }
.v2-podium-marche:focus-visible .v2-podium-socle { box-shadow: 0 0 0 2px var(--v2-noir); }
.v2-podium-marche.premier .v2-podium-socle { background: var(--v2-orange); color: #fff; }
.v2-podium-suite { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: var(--v2-gris); text-align: center; }
.v2-podium-suivant { position: relative; outline: none; cursor: default; white-space: nowrap; border-bottom: 1px dotted var(--v2-bordure); }

/* Infobulle : détail au survol, ou au focus (clavier, toucher). Toujours lue
   par les lecteurs d'écran : elle est masquée par l'opacité, pas retirée. */
.v2-infobulle {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5;
  display: flex; flex-direction: column; gap: 2px; width: max-content; min-width: 150px; max-width: 240px;
  padding: 10px 12px; border-radius: 12px; background: var(--v2-noir); color: #fff;
  font-size: 13px; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .35);
  opacity: 0; transform: translate(-50%, 6px); pointer-events: none;
  transition: opacity .2s, transform .35s var(--v2-ressort);
}
.v2-infobulle::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--v2-noir); }
span.v2-infobulle > b { font-size: 13px; font-weight: 600; letter-spacing: 0; color: #fff; }
span.v2-infobulle > span { color: rgba(255, 255, 255, .72); }
:hover > .v2-infobulle, :focus > .v2-infobulle { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .v2-infobulle, .v2-podium-socle, .v2-podium-marche { transition: none; }
}

/* Répartition en une seule barre, légende dessous (du plus grand au plus petit) */
.v2-repartie-barre { display: flex; gap: 3px; height: 10px; margin-bottom: 18px; }
.v2-repartie-barre span { border-radius: 5px; min-width: 6px; background: var(--c); }
.v2-repartie-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14px; color: var(--v2-texte); }
.v2-repartie-legende li { position: relative; display: inline-flex; align-items: center; gap: 8px; outline: none; cursor: default; }
.v2-repartie-legende li:focus-visible { box-shadow: 0 0 0 2px var(--v2-noir); border-radius: 6px; }
.v2-repartie-legende li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.v2-repartie-legende b { font-weight: 600; color: var(--v2-noir); font-variant-numeric: tabular-nums; }
.v2-repartie > :nth-child(n) > :nth-child(1) { --c: var(--v2-orange); }
.v2-repartie > :nth-child(n) > :nth-child(2) { --c: var(--v2-noir); }
.v2-repartie > :nth-child(n) > :nth-child(3) { --c: #6e6e73; }
.v2-repartie > :nth-child(n) > :nth-child(4) { --c: #aeaeb2; }
.v2-repartie > :nth-child(n) > :nth-child(n+5) { --c: #d2d2d7; }

/* Partage en parts, chiffres écrits en toutes lettres */
.v2-partage-chiffres { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-bottom: 20px; }
.v2-partage-part b { display: block; font-size: 44px; font-weight: 300; letter-spacing: -.04em; line-height: 1.1; }
.v2-partage-part b small { font-size: 20px; color: var(--v2-gris); letter-spacing: 0; }
.v2-partage-part span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--v2-gris); }
.v2-partage-part span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #aeaeb2; }
.v2-partage-part.premiere span::before { background: var(--v2-orange); }
.v2-partage-barre { display: flex; gap: 2px; height: 8px; }
.v2-partage-barre span { border-radius: 4px; background: #aeaeb2; min-width: 4px; }
.v2-partage-barre span.premiere { background: var(--v2-orange); }

/* Tendance par rapport à la période précédente : flèche + texte, jamais
   la couleur seule. Une hausse d'accidents est rouge, une baisse verte. */
.v2-ecart {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 980px;
  font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: var(--v2-fond); color: var(--v2-gris);
}
.v2-ecart--hausse { background: #fdecec; color: #b42318; }
.v2-ecart--baisse { background: #e7f6ec; color: #1a7f37; }
.v2-sombre .v2-ecart { background: #1d1d1f; color: #a1a1a6; }
.v2-sombre .v2-ecart--hausse { background: rgba(255, 105, 97, .16); color: #ff8a80; }
.v2-sombre .v2-ecart--baisse { background: rgba(48, 209, 88, .14); color: #5fd97f; }

/* L'essentiel : mini-courbe, jauges */
.v2-heros-tendance { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; }
.v2-courbe { display: block; overflow: visible; }
.v2-courbe polyline { fill: none; stroke: var(--v2-gris-clair); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.v2-courbe circle { fill: var(--v2-orange); stroke: var(--v2-blanc); stroke-width: 2; }
.v2-courbe-lbl { font-size: 12px; color: var(--v2-gris); }
.v2-tendance-note { margin: 12px 0 0; font-size: 13px; color: var(--v2-gris-clair); }
.v2-tuile-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.v2-jauge, .v2-segmente { display: flex; gap: 2px; height: 6px; margin-top: 12px; border-radius: 3px; background: var(--v2-trait); overflow: hidden; }
.v2-jauge > span { display: block; height: 100%; border-radius: 3px; background: var(--v2-noir); }
.v2-jauge--orange > span { background: var(--v2-orange); }
.v2-segmente { background: none; }
.v2-segmente > span { border-radius: 3px; background: var(--v2-noir); min-width: 4px; }
.v2-segmente > span.retard { background: var(--v2-erreur); }

/* Indices : définition derrière un « ? » */
.v2-indice-def { position: relative; }
.v2-indice-def > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.v2-indice-def > summary::-webkit-details-marker { display: none; }
.v2-indice-q {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px #48484a; color: #a1a1a6; font-size: 11px; font-weight: 600;
  transition: background-color .2s, color .2s;
}
.v2-indice-def > summary:hover .v2-indice-q, .v2-indice-def[open] .v2-indice-q { background: #f5f5f7; color: #000; }
.v2-indice-def > summary:focus-visible { outline: 2px solid var(--v2-orange); outline-offset: 4px; border-radius: 4px; }
.v2-indice .v2-indice-def p {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 5;
  width: min(260px, 80vw); margin: 0; padding: 12px 14px; border-radius: 12px;
  background: #2c2c2e; color: #f5f5f7; font-size: 13px; line-height: 1.45;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
}
/* Colonnes de droite : la bulle s'ouvre vers la gauche pour rester à l'écran */
.v2-indice:nth-child(even) .v2-indice-def p { left: auto; right: 0; }
.v2-indice-val { margin-bottom: 14px; }
/* Indice pas encore disponible : grisé, avec une pastille à la place de l'évolution */
.v2-indice--a-venir .v2-indice-nom, .v2-indice--a-venir .v2-indice-val { color: #48484a; }
.v2-indice-bientot { display: inline-block; padding: 4px 12px; border-radius: 980px; background: #2c2c2e; color: #a1a1a6; font-size: 13px; font-weight: 500; }

/* Évolution : légende courte */
.v2-kpi-tete .v2-kpi-legende { font-size: 14px; }
.v2-kpi-legende .v2-puce-orange { margin: 0 4px 0 2px; vertical-align: 0; }
.v2-puce-orange, .v2-puce { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--v2-orange); }

/* Carte de chaleur jour × heure : une teinte orange, du clair au foncé */
.v2-chaleur-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.v2-kpi-section .v2-chaleur-tete h3 { margin: 0; }
.v2-chaleur-tete p { margin: 0; font-size: 15px; color: var(--v2-gris); }
.v2-chaleur-tete b { color: var(--v2-noir); font-weight: 600; }
.v2-chaleur { display: grid; grid-template-columns: 40px minmax(0, 1fr) 28px; gap: 4px 12px; align-items: center; }
.v2-chaleur-jour { font-size: 13px; color: var(--v2-gris); }
.v2-chaleur-total { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.v2-chaleur-ligne, .v2-chaleur-heures { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.v2-chaleur-ligne > span { position: relative; height: clamp(18px, 2.6vw, 30px); border-radius: 4px; }
.v2-chaleur-ligne > span:hover { box-shadow: inset 0 0 0 2px var(--v2-noir); }
.v2-chaleur-heures { margin-top: 4px; font-size: 12px; color: var(--v2-gris); font-variant-numeric: tabular-nums; }
.v2-chaleur-heures span { white-space: nowrap; }
.v2-chaleur .n0, .v2-chaleur-echelle .n0 { background: #e8e8ed; }
.v2-chaleur .n1, .v2-chaleur-echelle .n1 { background: #fed7aa; }
.v2-chaleur .n2, .v2-chaleur-echelle .n2 { background: #fdba74; }
.v2-chaleur .n3, .v2-chaleur-echelle .n3 { background: #fb923c; }
.v2-chaleur .n4, .v2-chaleur-echelle .n4 { background: #f97316; }
.v2-chaleur .n5, .v2-chaleur-echelle .n5 { background: #c2410c; }
.v2-chaleur-ligne > span::after {
  content: attr(data-bulle);
  position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 5;
  padding: 6px 10px; border-radius: 8px;
  background: var(--v2-noir); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap;
  pointer-events: none; opacity: 0; transform: translate(-50%, 4px);
  transition: opacity .15s, transform .25s var(--v2-ressort);
}
.v2-chaleur-ligne > span:nth-child(-n+6)::after { left: 0; transform: translate(0, 4px); }
.v2-chaleur-ligne > span:nth-child(n+19)::after { left: auto; right: 0; transform: translate(0, 4px); }
.v2-chaleur-ligne > span:hover::after { opacity: 1; transform: translate(-50%, 0); }
.v2-chaleur-ligne > span:nth-child(-n+6):hover::after, .v2-chaleur-ligne > span:nth-child(n+19):hover::after { transform: none; }
.v2-chaleur-echelle { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 18px; font-size: 12px; color: var(--v2-gris); }
.v2-chaleur-echelle span[class] { width: 16px; height: 10px; border-radius: 3px; }
.v2-chaleur-echelle > span:first-child { margin-right: 5px; }
.v2-chaleur-echelle > span:last-child { margin-left: 5px; }
.v2-donnees-duo { display: flex; flex-wrap: wrap; gap: 8px 48px; }
.v2-donnees-duo caption { padding: 10px 0 4px; text-align: left; font-weight: 600; }

/* Type de contrat : barre empilée, couleur attachée à chaque type */
.v2-empile { display: flex; gap: 2px; height: 12px; margin: 4px 0 20px; }
.v2-empile > span { min-width: 4px; border-radius: 4px; }
.v2-empile-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.v2-empile-legende li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.v2-empile-legende b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-empile-legende small { width: 40px; text-align: right; font-size: 13px; color: var(--v2-gris); font-variant-numeric: tabular-nums; }

/* Secours : demi-jauge et anneaux */
.v2-secours-visuels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.v2-anneau, .v2-demi-jauge { position: relative; margin: 4px auto 0; }
.v2-anneau { width: 132px; }
.v2-demi-jauge { width: 200px; }
.v2-anneau svg { display: block; width: 100%; transform: rotate(-90deg); }
.v2-demi-jauge svg { display: block; width: 100%; }
.v2-anneau-piste, .v2-anneau-val { fill: none; stroke-width: 10; }
.v2-anneau-piste { stroke: var(--v2-trait); }
.v2-anneau-val { stroke: var(--v2-orange); stroke-linecap: round; }
.v2-anneau-texte, .v2-demi-jauge-texte { position: absolute; left: 0; right: 0; display: flex; justify-content: center; align-items: baseline; gap: 3px; }
.v2-anneau-texte { top: 50%; transform: translateY(-50%); }
.v2-demi-jauge-texte { bottom: 22px; }
.v2-anneau-texte b, .v2-demi-jauge-texte b { font-size: 36px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.v2-anneau-texte small, .v2-demi-jauge-texte small { font-size: 15px; color: var(--v2-gris); }
.v2-demi-jauge-bornes { display: flex; justify-content: space-between; margin-top: 2px; font-size: 12px; color: var(--v2-gris); }
.v2-anneau-vide { padding: 40px 0; text-align: center; font-size: 36px; font-weight: 300; }
.v2-carte-note { margin: 14px 0 0; font-size: 13px; color: var(--v2-gris); text-align: center; }

/* Pyramide de Bird : quatre étages en trapèze, découpés dans la même
   silhouette triangulaire. L'étage i (0 au sommet) va d'une largeur i/4 à
   (i+1)/4 de la colonne ; un filet relie chaque étage à sa légende. */
.v2-pyramide { display: flex; flex-direction: column; gap: 5px; padding-block: clamp(28px, 4vw, 44px); }
.v2-pyramide-rang {
  --demi-haut: calc(var(--i) * 12.5%);
  --demi-bas: calc((var(--i) + 1) * 12.5%);
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(170px, 1fr); gap: 0 20px; align-items: stretch;
  transition: opacity .3s var(--v2-ressort);
}
.v2-pyramide-etage { position: relative; min-height: 84px; }
.v2-pyramide-etage > span {
  position: absolute; inset: 0;
  clip-path: polygon(calc(50% - var(--demi-haut)) 0, calc(50% + var(--demi-haut)) 0,
                     calc(50% + var(--demi-bas)) 100%, calc(50% - var(--demi-bas)) 100%);
  transition: transform .5s var(--v2-ressort);
}
/* Filet entre le flanc de l'étage (à mi-hauteur) et la légende */
.v2-pyramide-etage::after {
  content: ""; position: absolute; top: 50%; right: -20px; height: 1px;
  left: calc(50% + (var(--i) + .5) * 12.5% + 10px);
  background: var(--v2-bordure);
}
.v2-pyramide-rang--avec_arret .v2-pyramide-etage > span { background: var(--v2-orange); }
.v2-pyramide-rang--sans_arret .v2-pyramide-etage > span { background: var(--v2-noir); }
.v2-pyramide-rang--presque_accident .v2-pyramide-etage > span { background: #6e6e73; }
.v2-pyramide-rang--situation_risque .v2-pyramide-etage > span { background: #c7c7cc; }
.v2-pyramide-legende { display: flex; flex-direction: column; justify-content: center; padding-left: 16px; min-width: 0; }
.v2-pyramide-legende p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.v2-pyramide-legende b { font-size: 32px; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: normal; }
.v2-pyramide-legende span { font-size: 15px; font-weight: 500; }
.v2-pyramide-legende small { margin-top: 2px; font-size: 13px; color: var(--v2-gris); }
/* Survol : l'étage visé ressort, les autres s'effacent */
.v2-pyramide:hover .v2-pyramide-rang { opacity: .4; }
.v2-pyramide .v2-pyramide-rang:hover { opacity: 1; }
.v2-pyramide-rang:hover .v2-pyramide-etage > span { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .v2-pyramide-rang, .v2-pyramide-etage > span { transition: none; } }

/* Tableaux */
.v2-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.v2-table th, .v2-table td { padding: 14px 12px; border-bottom: 1px solid var(--v2-trait); text-align: left; vertical-align: middle; }
.v2-table thead th { padding-top: 0; font-size: 13px; font-weight: 500; color: var(--v2-gris); white-space: nowrap; }
.v2-table tbody tr:last-child th, .v2-table tbody tr:last-child td { border-bottom: 0; }
.v2-table tbody th { font-weight: 500; min-width: 180px; }
.v2-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-table .v2-piste { max-width: 240px; margin-top: 8px; height: 4px; }
.v2-table--compacte th, .v2-table--compacte td { padding: 10px 8px; font-size: 14px; }
.v2-vide-cellule { color: var(--v2-gris); text-align: center; }

@media (max-width: 1000px) {
  .v2-essentiel { grid-template-columns: 1fr; }
  .v2-indices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-grille-kpi, .v2-grille-kpi--large, .v2-grille-kpi--trois { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* Téléphone : la jauge en entier, les deux anneaux côte à côte dessous */
  .v2-secours-visuels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-secours-visuels > :first-child { grid-column: 1 / -1; }
  .v2-anneau { width: min(132px, 100%); }
  .v2-chaleur { grid-template-columns: 32px minmax(0, 1fr) 22px; gap: 4px 8px; }
  .v2-chaleur-ligne, .v2-chaleur-heures { gap: 1px; }
  .v2-chaleur-ligne > span { border-radius: 2px; }
  .v2-kpi-barre { flex-wrap: wrap; margin: 0 -16px; padding: 8px 16px; top: 56px; }
  .v2-sommaire { flex: 1 1 100%; }
  .v2-kpi-section { padding-top: 64px; scroll-margin-top: 150px; }
  .v2-kpi-section.v2-sombre { margin-top: 64px; border-radius: 24px; margin-left: -8px; margin-right: -8px; }
  .v2-tuiles, .v2-tuiles--secours { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .v2-indices { gap: 28px 20px; }
  .v2-pyramide-rang { grid-template-columns: minmax(0, 1fr) 132px; gap: 0 12px; }
  .v2-pyramide-etage { min-height: 60px; }
  .v2-pyramide-etage::after { right: -12px; left: calc(50% + (var(--i) + .5) * 12.5% + 6px); }
  .v2-pyramide-legende { padding-left: 8px; }
  .v2-pyramide-legende p { gap: 0 6px; }
  .v2-pyramide-legende b { font-size: 24px; }
  .v2-pyramide-legende span { font-size: 14px; line-height: 1.25; }
  .v2-pyramide-legende small { font-size: 12px; }
  /* Un libellé sur deux, en gardant toujours le dernier (le mois en cours) */
  .v2-histo--dense .v2-histo-axe span:nth-last-child(even) { visibility: hidden; }
  .v2-histo--dense .v2-histo-zone, .v2-histo--dense .v2-histo-axe { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-histo-barre, .v2-histo-col::after { transition: none; }
}

/* ══ Menu du compte (en-tête) ═════════════════════════════════════════ */
details.v2-compte > summary {
  width: auto;
  height: auto;
  gap: 10px;
  padding: 5px 8px 5px 12px;
  border-radius: 980px;
  font-size: 13px;
  color: var(--v2-gris);
}
details.v2-compte > summary .v2-role { background: var(--v2-blanc); }
details.v2-compte > summary:hover .v2-role, details.v2-compte[open] > summary .v2-role { background: var(--v2-blanc); }
details.v2-compte > summary svg.v2-compte-chevron { width: 10px; height: 7px; fill: none; transition: transform .3s var(--v2-ressort); }
details.v2-compte[open] .v2-compte-chevron { transform: rotate(180deg); }
.v2-compte .v2-menu-liste { min-width: 240px; }
.v2-menu-entete { padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--v2-trait); }
.v2-menu-entete strong { display: block; font-size: 15px; font-weight: 600; color: var(--v2-noir); }
.v2-menu-entete span { display: block; font-size: 13px; color: var(--v2-gris); overflow-wrap: anywhere; }

/* Compte groupe entré dans une entreprise : bouton de retour dans l'en-tête */
.v2 .v2-retour-groupe {
  order: 2; display: inline-flex; align-items: center; flex-shrink: 0; margin-right: -16px;
  height: 32px; padding: 0 14px; border-radius: 980px;
  background: #fff4ed; color: var(--v2-erreur);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.v2 .v2-retour-groupe:hover { background: var(--v2-orange); color: #fff; }
.v2-retour-groupe:focus-visible { outline: 2px solid var(--v2-noir); outline-offset: 2px; }
.v2-entete-in > .v2-logo { order: 0; }
.v2-entete-in .v2-nav { order: 1; }
.v2-entete-in .v2-entete-droite, .v2-entete-in > .v2-burger { order: 3; }
@media (max-width: 720px) {
  .v2 .v2-retour-groupe { margin: 0 -8px 0 auto; height: 34px; padding: 0 12px; }
  /* Avec le bouton de retour, le menu se réduit à son icône pour tenir sur la ligne */
  .v2-retour-groupe ~ .v2-burger .v2-burger-role { display: none; }
  .v2-entete[data-menu-mobile] .v2-retour-groupe ~ .v2-burger { margin-left: 0; padding: 0 5px; }
}

/* ══ Menu du téléphone ════════════════════════════════════════════════
   Sur ordinateur, .v2-entete-menu s'efface (display: contents) : la
   navigation et le menu du compte restent dans la barre. Sur téléphone
   (compte connecté), un bouton ouvre un panneau sous l'en-tête : les pages
   en grand, puis les liens du compte. */
.v2-entete-menu { display: contents; }
.v2-burger, .v2-menu-mobile-compte { display: none; }
@media (max-width: 720px) {
  .v2-entete[data-menu-mobile] .v2-burger {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
    height: 38px; padding: 0 6px 0 14px; border: 0; border-radius: 980px;
    background: var(--v2-fond); color: var(--v2-noir);
    font: 500 13px var(--v2-police); cursor: pointer;
  }
  .v2-burger-role { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v2-burger-icone { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--v2-blanc); }
  .v2-burger-icone i { position: absolute; left: 8px; width: 12px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .3s var(--v2-ressort), top .3s var(--v2-ressort); }
  .v2-burger-icone i:first-child { top: 10.5px; }
  .v2-burger-icone i:last-child { top: 15.5px; }
  .v2-entete.est-ouvert .v2-burger-icone i:first-child { top: 13px; transform: rotate(45deg); }
  .v2-entete.est-ouvert .v2-burger-icone i:last-child { top: 13px; transform: rotate(-45deg); }
  .v2-entete[data-menu-mobile] .v2-burger:focus-visible { outline: 2px solid var(--v2-noir); outline-offset: 2px; }

  .v2-entete.est-ouvert { background: var(--v2-blanc); }
  .v2-entete[data-menu-mobile] .v2-entete-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 8px;
    max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 12px 16px;
    background: var(--v2-blanc);
    border-bottom: 1px solid var(--v2-trait);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .25);
  }
  .v2-entete.est-ouvert .v2-entete-menu { display: flex; animation: v2Menu .25s var(--v2-ressort) both; }
  .v2-entete[data-menu-mobile] .v2-nav { flex-direction: column; gap: 2px; overflow: visible; }
  .v2-entete[data-menu-mobile] .v2-nav:empty { display: none; }
  .v2 .v2-entete[data-menu-mobile] .v2-nav a { padding: 14px 12px; border-radius: 12px; font-size: 17px; }
  .v2-entete[data-menu-mobile] .v2-entete-droite { margin: 0; flex-wrap: wrap; }
  .v2-entete[data-menu-mobile] .v2-entete-droite:not(:has(> :not(details))) { display: none; }
  .v2-entete[data-menu-mobile] details.v2-compte { display: none; }
  .v2-entete[data-menu-mobile] .v2-menu-mobile-compte { display: block; padding-top: 8px; border-top: 1px solid var(--v2-trait); }
  .v2-menu-mobile-compte .v2-menu-entete { border-bottom: 0; margin: 0; padding: 10px 12px 6px; }
  .v2 .v2-menu-mobile-compte a { display: block; padding: 12px; border-radius: 12px; font-size: 15px; color: var(--v2-noir); }
  .v2 .v2-menu-mobile-compte a:hover { background: var(--v2-fond); color: var(--v2-noir); }
  .v2 .v2-menu-mobile-compte .v2-menu-danger { color: var(--v2-erreur); }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .v2-entete.est-ouvert .v2-entete-menu { animation: none; }
  .v2-burger-icone i { transition: none; }
}

/* ══ Accueil de l'entreprise ══════════════════════════════════════════ */
.v2-accueil-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.v2-accueil-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.v2-accueil-logo {
  flex-shrink: 0;
  width: 180px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 24px;
  background: var(--v2-fond);
}
.v2-accueil-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

.v2-accueil-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.v2 .v2-accueil-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 26px;
  border-radius: 24px;
  background: var(--v2-fond);
  color: var(--v2-noir);
  transition: transform .5s var(--v2-ressort), box-shadow .5s var(--v2-ressort), background-color .3s;
}
.v2 .v2-accueil-carte:hover {
  color: var(--v2-noir);
  background: #efeff2;
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .25);
}
.v2 .v2-accueil-carte:focus-visible { outline: 2px solid var(--v2-noir); outline-offset: 3px; }
.v2-num { font-size: 15px; color: var(--v2-gris-clair); font-variant-numeric: tabular-nums; }
.v2-accueil-carte h2 { margin: 24px 0 0; font-size: 17px; line-height: 1.25; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
.v2-accueil-carte .v2-fleche { top: 20px; right: 20px; }
.v2-fleche {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--v2-blanc);
  font-size: 17px;
  transition: transform .5s var(--v2-ressort), background-color .3s, color .3s;
}
.v2-accueil-carte:hover .v2-fleche { transform: translateX(3px); background: var(--v2-noir); color: #fff; }

/* Dernières déclarations */
.v2 .v2-ligne--accident {
  grid-template-columns: 64px minmax(0, 1fr) auto 36px;
  gap: 16px 24px;
  padding: 18px 20px 18px 24px;
  color: var(--v2-noir);
  transition: transform .4s var(--v2-ressort), box-shadow .4s var(--v2-ressort);
}
.v2 .v2-ligne--accident:hover { color: var(--v2-noir); transform: translateY(-2px); box-shadow: 0 16px 36px -24px rgba(0, 0, 0, .3); }
.v2-ligne--accident .v2-fleche { position: static; background: var(--v2-fond); }
.v2-ligne--accident:hover .v2-fleche { background: var(--v2-noir); color: #fff; }
.v2-date { text-align: center; line-height: 1.1; }
.v2-date b { display: block; font-size: 28px; font-weight: 300; letter-spacing: -.03em; }
.v2-date span, .v2-date small { display: block; font-size: 12px; color: var(--v2-gris); }
.v2-date small { font-size: 11px; color: var(--v2-gris-clair); }
.v2-accident-etat { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.v2-type { padding: 3px 10px; border-radius: 980px; font-size: 12px; font-weight: 500; background: var(--v2-fond); color: var(--v2-noir); white-space: nowrap; }
.v2-type--avec_arret { background: #fff4ed; color: var(--v2-erreur); }
.v2-type--deces { background: var(--v2-noir); color: #fff; }
.v2 .v2-vide a { color: var(--v2-noir); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
  details.v2-compte > summary .v2-utilisateur-nom { display: none; }
  .v2-accueil-tete { flex-direction: column-reverse; gap: 20px; }
  .v2-accueil-logo { width: 120px; height: 80px; padding: 12px; border-radius: 18px; }
  .v2 .v2-accueil-carte { min-height: 0; padding: 22px; }
  .v2-accueil-carte h2 { margin-top: 16px; }
  .v2 .v2-ligne--accident { grid-template-columns: 52px minmax(0, 1fr); padding: 16px; }
  .v2-ligne--accident .v2-accident-etat { grid-column: 2; justify-content: flex-start; }
  .v2-ligne--accident .v2-fleche { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .v2 .v2-accueil-carte, .v2 .v2-ligne--accident, .v2-fleche { transition: none; }
  .v2 .v2-accueil-carte:hover, .v2 .v2-ligne--accident:hover { transform: none; }
}

/* Indicateurs d'une entreprise : saisie de l'effectif dans le bloc sombre */
details.v2-reglage { margin-top: 18px; }
details.v2-reglage > summary {
  width: fit-content;
  list-style: none;
  font-size: 15px;
  color: #f5f5f7;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #6e6e73;
}
details.v2-reglage > summary::-webkit-details-marker { display: none; }
details.v2-reglage > summary:hover { text-decoration-color: #f5f5f7; }
.v2-reglage-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 16px; }
.v2-reglage-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #a1a1a6; }
.v2-reglage-form input {
  width: 220px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #424245;
  border-radius: 12px;
  background: #1d1d1f;
  color: #f5f5f7;
  font: 16px var(--v2-police);
}
.v2-reglage-form input::placeholder { color: #6e6e73; }
.v2-reglage-form input:focus { outline: none; border-color: #f5f5f7; }
.v2-reglage-form .v2-btn--sm { height: 44px; }
.v2-reglage-aide { flex-basis: 100%; margin: 0; font-size: 13px; color: #86868b; }
.v2-reglage-message { flex-basis: 100%; margin: 0; font-size: 13px; color: #a1a1a6; }
.v2-reglage-message:empty { display: none; }

/* Tuile cliquable (vers le plan d'action) */
.v2 a.v2-tuile--lien { color: var(--v2-noir); transition: opacity .2s; }
.v2 a.v2-tuile--lien:hover { color: var(--v2-noir); opacity: .72; }
.v2 a.v2-tuile--lien.v2-tuile--alerte .v2-tuile-val { color: var(--v2-erreur); }
@media (max-width: 720px) { .v2-reglage-form input { width: 100%; } .v2-reglage-form label { flex: 1 1 100%; } }

/* ══ Registre des accidents ═══════════════════════════════════════════ */
.v2-visuellement-cache {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.v2-registre-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.v2-registre-boutons { display: flex; gap: 10px; flex-wrap: wrap; }

/* Barre de filtres (reprend la barre collante des indicateurs) */
.v2-filtres { flex-wrap: wrap; margin-bottom: 32px; }
.v2-recherche { position: relative; flex: 1 1 260px; max-width: 380px; }
.v2-recherche svg {
  position: absolute; left: 14px; top: 50%;
  width: 16px; height: 16px; margin-top: -8px;
  fill: none; stroke: var(--v2-gris); stroke-width: 2; stroke-linecap: round;
}
.v2-recherche input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 0;
  border-radius: 980px;
  background: var(--v2-fond);
  color: var(--v2-noir);
  font: 14px var(--v2-police);
}
.v2-recherche input::placeholder { color: var(--v2-gris-clair); }
.v2-recherche input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--v2-noir); background: var(--v2-blanc); }
fieldset.v2-segments--radio { margin: 0; border: 0; }
.v2-segments--radio label { position: relative; cursor: pointer; }
.v2-segments--radio input { position: absolute; opacity: 0; pointer-events: none; }
.v2-segments--radio span {
  display: block;
  padding: 6px 14px;
  border-radius: 980px;
  font-size: 13px;
  color: var(--v2-texte);
  white-space: nowrap;
  transition: background-color .2s, box-shadow .2s;
}
.v2-segments--radio label:hover span { color: var(--v2-noir); }
.v2-segments--radio input:checked + span { background: var(--v2-blanc); color: var(--v2-noir); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.v2-segments--radio input:focus-visible + span { outline: 2px solid var(--v2-noir); outline-offset: 1px; }
.v2-select select {
  height: 38px;
  padding: 0 34px 0 14px;
  border: 0;
  border-radius: 980px;
  background: var(--v2-fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--v2-noir);
  font: 13px var(--v2-police);
  cursor: pointer;
}
.v2-select select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-registre-compte { margin: 0 0 16px; font-size: 15px; color: var(--v2-gris); }

/* Une carte par accident ; le nom ouvre le dossier, toute la carte est cliquable */
.v2-ligne--registre {
  position: relative;
  grid-template-columns: 64px minmax(0, 1fr) auto auto 36px;
  gap: 16px 24px;
  padding: 18px 20px 18px 24px;
  background: var(--v2-fond);
  transition: background-color .25s, transform .4s var(--v2-ressort);
}
.v2-ligne--registre:hover { background: #efeff2; }
.v2-ligne--registre:hover .v2-fleche { background: var(--v2-noir); color: #fff; transform: translateX(2px); }
.v2-ligne--registre .v2-fleche { position: static; background: var(--v2-blanc); }
.v2 .v2-lien-etendu { color: var(--v2-noir); }
.v2 .v2-lien-etendu:hover { color: var(--v2-noir); }
.v2-lien-etendu::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.v2-lien-etendu:focus-visible { outline: none; }
.v2-lien-etendu:focus-visible::after { box-shadow: 0 0 0 2px var(--v2-noir); border-radius: 24px; }
.v2-registre-victime { min-width: 0; }
/* Sur la carte grise, les pastilles passent sur fond blanc pour rester lisibles */
.v2-ligne--registre .v2-type { background: var(--v2-blanc); }
.v2-ligne--registre .v2-type--avec_arret { background: #fff4ed; }
.v2-ligne--registre .v2-type--deces { background: var(--v2-noir); }
.v2-registre-victime .v2-ligne-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avancement du dossier : pastilles cliquables au-dessus du lien de la carte */
.v2-parcours { position: relative; z-index: 2; display: flex; gap: 6px; }
.v2 .v2-parcours a {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 980px;
  background: var(--v2-blanc);
  font-size: 12px;
  color: var(--v2-gris);
  white-space: nowrap;
  transition: box-shadow .2s, color .2s;
}
.v2 .v2-parcours a.fait { color: var(--v2-noir); }
.v2 .v2-parcours a:hover { color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-noir); }

/* Pagination */
.v2-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 32px; }
.v2-pagination-pages { display: flex; gap: 4px; }
.v2 .v2-pagination-pages a, .v2-pagination-pages span {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--v2-texte);
  font-variant-numeric: tabular-nums;
}
.v2 .v2-pagination-pages a:hover { background: var(--v2-fond); color: var(--v2-noir); }
.v2-pagination-pages span[aria-current] { background: var(--v2-noir); color: #fff; font-weight: 500; }
.v2-pagination .v2-btn[aria-disabled="true"] { pointer-events: none; }

.v2-vide--grand { padding: 72px 24px; background: var(--v2-fond); }
.v2-vide--grand h2 { margin: 0 0 8px; font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--v2-noir); }
.v2-vide--grand p { margin: 0 0 24px; }

@media (max-width: 1000px) {
  .v2-ligne--registre { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .v2-ligne--registre .v2-accident-etat { grid-column: 3; grid-row: 1; }
  .v2-ligne--registre .v2-parcours { grid-column: 2 / span 2; }
  .v2-ligne--registre .v2-fleche { display: none; }
}
@media (max-width: 720px) {
  .v2-registre-tete .v2-btn { width: 100%; }
  .v2-registre-boutons { width: 100%; flex-direction: column; }
  /* Sur trois lignes, une barre collante mangerait l'écran : elle défile */
  .v2-filtres { position: static; }
  .v2-recherche { flex-basis: 100%; max-width: none; }
  /* Six filtres de type : ils passent à la ligne plutôt que d'élargir la page */
  .v2-filtres .v2-segments { flex-shrink: 1; flex-wrap: wrap; min-width: 0; max-width: 100%; border-radius: 20px; }
  .v2-ligne--registre { grid-template-columns: 52px minmax(0, 1fr); padding: 16px; }
  .v2-ligne--registre .v2-accident-etat { grid-column: 2; grid-row: auto; justify-content: flex-start; }
  .v2-ligne--registre .v2-parcours { grid-column: 2; flex-wrap: wrap; }
  .v2-pagination-pages a:not([aria-current]) { display: none; }
}

/* ══ Plan d'action ════════════════════════════════════════════════════ */
.v2-actions-tuiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.4fr);
  gap: 12px;
  margin-bottom: 40px;
}
.v2-filtre-tuile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 20px 20px;
  border: 0;
  border-radius: 20px;
  background: var(--v2-fond);
  color: var(--v2-noir);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .25s, box-shadow .25s, transform .4s var(--v2-ressort);
}
button.v2-filtre-tuile:hover { background: #efeff2; }
button.v2-filtre-tuile:active { transform: scale(.98); }
button.v2-filtre-tuile[aria-pressed="true"] { background: var(--v2-noir); color: #fff; }
button.v2-filtre-tuile[aria-pressed="true"] .v2-tuile-lbl { color: #a1a1a6; }
button.v2-filtre-tuile:focus-visible { outline: 2px solid var(--v2-orange); outline-offset: 2px; }
.v2-filtre-tuile .v2-tuile-val { margin: 0; font-size: 40px; }
.v2-filtre-tuile--retard .v2-tuile-val { color: var(--v2-erreur); }
.v2-filtre-tuile--retard[aria-pressed="true"] .v2-tuile-val { color: #ff9f6b; }
.v2-cout-tuile { cursor: default; }
.v2-cout-tuile .v2-tuile-val small { font-size: 20px; }
.v2-select--petit select { height: 32px; margin-top: 4px; background-color: var(--v2-blanc); font-size: 12px; }

.v2-actions-bloc { padding: clamp(12px, 2vw, 24px); }
.v2-actions-carte { padding: 8px 8px 16px; background: var(--v2-blanc); }
.v2-table--actions { table-layout: fixed; }
.v2-table--actions thead th { padding: 16px 10px 10px; }
.v2-table--actions td { padding: 6px 4px; vertical-align: top; border-bottom: 1px solid var(--v2-trait); }
.v2-table--actions .col-date { width: 96px; padding-left: 12px; padding-top: 16px; font-size: 13px; color: var(--v2-gris); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-table--actions thead .col-date { padding-top: 16px; }
.v2-table--actions .col-resp { width: 17%; }
.v2-table--actions .col-entreprise { width: 14%; padding-top: 16px; font-size: 13px; font-weight: 500; }
.v2-table--actions .col-echeance { width: 150px; }
.v2-table--actions .col-cout { width: 110px; }
.v2-table--actions .col-statut { width: 138px; }
.v2-table--actions .col-outils { width: 84px; white-space: nowrap; text-align: right; padding-right: 8px; }
.v2-table--actions tr[hidden] { display: none; }

/* Cellules éditables : discrètes, elles ne montrent leur cadre qu'au survol et à l'édition */
.v2-cellule {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--v2-noir);
  font: 15px/1.4 var(--v2-police);
  transition: border-color .2s, background-color .2s;
}
.v2-cellule::placeholder { color: var(--v2-gris-clair); }
.v2-cellule:hover { background: var(--v2-fond); }
.v2-cellule:focus { outline: none; border-color: var(--v2-noir); background: var(--v2-blanc); }
.v2-cellule--texte { resize: none; overflow: hidden; }
.v2-cellule[type="date"] { font-size: 14px; font-variant-numeric: tabular-nums; }
.v2-cellule[type="date"]::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }

/* Statut : une pastille, orange si en retard, verte si clôturée */
.v2-statut {
  width: 100%;
  height: 34px;
  margin-top: 3px;
  padding: 0 28px 0 12px;
  border: 0;
  border-radius: 980px;
  background: var(--v2-fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--v2-noir);
  font: 500 13px var(--v2-police);
  cursor: pointer;
}
.v2-statut:focus-visible { outline: 2px solid var(--v2-noir); outline-offset: 1px; }
.v2-statut.est-en-retard { background-color: #fff4ed; color: var(--v2-erreur); }
.v2-statut.est-cloturee { background-color: #eaf6ec; color: #1e7a3a; }

.v2 .v2-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-top: 3px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--v2-gris);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.v2 .v2-icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.v2 .v2-icone:hover { background: var(--v2-fond); color: var(--v2-noir); }
.v2 .v2-icone--danger:hover { background: #fff4ed; color: var(--v2-erreur); }

.v2-ajouter-ligne {
  display: block;
  width: calc(100% - 16px);
  margin: 12px 8px 0;
  padding: 14px;
  border: 1px dashed var(--v2-bordure);
  border-radius: 14px;
  background: none;
  color: var(--v2-gris);
  font: 15px var(--v2-police);
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.v2-ajouter-ligne:hover { border-color: var(--v2-noir); color: var(--v2-noir); background: var(--v2-fond); }
.v2-vide-filtre { margin: 0; padding: 32px 16px 8px; text-align: center; font-size: 15px; color: var(--v2-gris); }

/* Confirmation discrète des enregistrements */
.v2-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  padding: 10px 18px;
  border-radius: 980px;
  background: var(--v2-noir);
  color: #fff;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .25s, transform .4s var(--v2-ressort);
}
.v2-toast.est-visible { opacity: 1; transform: translate(-50%, 0); }
.v2-toast.est-erreur { background: var(--v2-erreur); }

@media (max-width: 1100px) {
  .v2-actions-tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-cout-tuile { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
  .v2-cout-tuile .v2-select--petit { margin-left: auto; }
}
@media (max-width: 820px) {
  /* Chaque action devient une carte ; les libellés viennent des en-têtes */
  .v2-actions-tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-table--actions, .v2-table--actions tbody, .v2-table--actions tr, .v2-table--actions td { display: block; width: auto; }
  .v2-table--actions thead { display: none; }
  .v2-table--actions tr { position: relative; padding: 12px 8px 12px; border-bottom: 1px solid var(--v2-trait); }
  .v2-table--actions td { border: 0; padding: 2px 4px; }
  .v2-table--actions td[data-label]:not(.col-date)::before { content: attr(data-label); display: block; padding: 6px 10px 0; font-size: 12px; color: var(--v2-gris); }
  .v2-table--actions .col-date { padding: 4px 14px 0; width: auto; }
  .v2-table--actions .col-date::before { content: "Ajoutée le "; }
  .v2-table--actions .col-resp, .v2-table--actions .col-echeance, .v2-table--actions .col-cout, .v2-table--actions .col-statut { display: inline-block; width: 49%; vertical-align: top; }
  .v2-table--actions .col-statut { padding-top: 8px; }
  .v2-table--actions .col-outils { position: absolute; top: 8px; right: 8px; width: auto; }
}

/* ══ Dossier d'un accident ════════════════════════════════════════════
   Habillage v2 des éléments d'origine (css/dossier-base.css). Seule
   l'apparence change : les règles d'affichage pilotées par le JavaScript
   (.active, .open, .show) restent celles d'origine. */

/* En-tête */
.v2 .v2-retour {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--v2-gris);
}
.v2 .v2-retour:hover { color: var(--v2-noir); }
.v2-retour svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v2-dossier-tete { padding-bottom: 36px; }
.v2-dossier-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; font-size: 17px; color: var(--v2-gris); }
.v2-dossier-meta > span:not(.v2-type):not(.v2-pastille) + span:not(.v2-type):not(.v2-pastille)::before { content: "·"; margin-right: 12px; }

/* Onglets : segments collés sous l'en-tête */
.v2-dossier .v2-dossier-onglets { margin-bottom: 32px; }
.v2-dossier .tabs-nav {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 980px;
  background: var(--v2-fond);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.v2-dossier .tabs-nav::-webkit-scrollbar { display: none; }
.v2-dossier .tab-link {
  padding: 7px 16px;
  border-radius: 980px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 400;
  color: var(--v2-texte);
  white-space: nowrap;
  transition: background-color .2s, box-shadow .2s, color .2s;
}
.v2-dossier .tab-link::after { display: none; }
.v2-dossier .tab-link:hover { color: var(--v2-noir); background: none; }
.v2-dossier .tab-link.active { background: var(--v2-blanc); color: var(--v2-noir); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* Conteneur : la coque v2 fixe déjà largeur et marges */
.v2-dossier .main-container { max-width: none; margin: 0; padding: 0 0 40px; }
.v2-dossier .section-header { align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; padding: 0; border: 0; }
.v2-dossier .section-header h3 { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; color: var(--v2-noir); }
.v2-dossier .section-header p { margin-top: 8px; font-size: 16px; color: var(--v2-gris); }

/* Boutons : pilules */
.v2-dossier .btn,
.v2-dossier .doc-btn,
.v2-dossier .btn-save,
.v2-dossier .btn-cancel,
.v2-dossier .create-button-modern,
.v2-dossier .create-button-secondary,
.v2-dossier .validate-actions-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 980px;
  box-shadow: inset 0 0 0 1px var(--v2-bordure);
  background: var(--v2-blanc);
  color: var(--v2-noir);
  font: 500 14px var(--v2-police);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s, color .2s, transform .3s var(--v2-ressort);
}
.v2-dossier .btn:hover, .v2-dossier .doc-btn:hover,
.v2-dossier .btn-cancel:hover, .v2-dossier .create-button-secondary:hover {
  box-shadow: inset 0 0 0 1px var(--v2-noir); background: var(--v2-blanc); color: var(--v2-noir); transform: none;
}
.v2-dossier .btn:active, .v2-dossier .doc-btn:active, .v2-dossier .btn-save:active { transform: scale(.98); }
.v2-dossier .btn-orange, .v2-dossier .btn-save, .v2-dossier .doc-btn.primary,
.v2-dossier .create-button-modern, .v2-dossier .validate-actions-btn {
  box-shadow: none; background: var(--v2-orange); color: #fff;
}
.v2-dossier .btn-orange:hover, .v2-dossier .btn-save:hover, .v2-dossier .doc-btn.primary:hover,
.v2-dossier .create-button-modern:hover, .v2-dossier .validate-actions-btn:hover {
  box-shadow: none; background: var(--v2-orange-fonce); color: #fff; transform: none;
}
.v2-dossier .validate-actions-btn { min-height: 48px; padding: 0 28px; font-size: 16px; }
.v2-dossier .predat-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cartes récapitulatives de la pré-DAT */
.v2-dossier .recap-grid { gap: 12px; }
.v2-dossier .recap-card {
  padding: 24px 26px 26px;
  border: 0;
  border-radius: 24px;
  background: var(--v2-fond);
  box-shadow: none;
  transition: background-color .25s, transform .4s var(--v2-ressort), box-shadow .4s var(--v2-ressort);
}
.v2-dossier .recap-card:hover { border: 0; background: #efeff2; transform: translateY(-2px); box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .3); }
.v2-dossier .recap-card-header { gap: 10px; padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--v2-trait); }
.v2-dossier .recap-step-number {
  width: auto;
  height: auto;
  min-width: 0;
  background: none;
  color: var(--v2-gris-clair);
  font-size: 14px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.v2-dossier .recap-step-number i { font-size: 16px; }
.v2-dossier .recap-step-title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--v2-noir); }
.v2-dossier .recap-card-content { font-size: 15px; line-height: 1.55; color: var(--v2-gris); }
.v2-dossier .recap-line { color: var(--v2-gris); }
.v2-dossier .recap-line strong { color: var(--v2-noir); font-weight: 600; }
.v2-dossier .recap-line a { color: var(--v2-noir) !important; text-decoration: underline !important; text-underline-offset: 3px; }

/* Fenêtre d'édition (ajoutée par le script en fin de page) */
.v2-dossier .edit-modal { background: rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.v2-dossier .modal-content { border-radius: 28px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45); }
.v2-dossier .modal-header { padding: 22px 28px; border-bottom: 1px solid var(--v2-trait); }
.v2-dossier .modal-header h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.v2-dossier .modal-step-number { width: auto; height: auto; background: none; color: var(--v2-gris-clair); font-size: 15px; font-weight: 400; }
.v2-dossier .modal-close { background: var(--v2-fond); color: var(--v2-gris); font-size: 20px; }
.v2-dossier .modal-close:hover { background: var(--v2-trait); color: var(--v2-noir); }
.v2-dossier .modal-body { padding: 24px 28px; }
.v2-dossier .modal-footer { padding: 16px 28px; border-top: 1px solid var(--v2-trait); gap: 10px; }
.v2-dossier .form-group { margin-bottom: 18px; }
.v2-dossier .form-group label { font-size: 13px; font-weight: 400; color: var(--v2-gris); margin-bottom: 6px; }
.v2-dossier .form-group input,
.v2-dossier .form-group select,
.v2-dossier .form-group textarea,
.v2-dossier .list-editor-field input,
.v2-dossier .list-editor-field select,
.v2-dossier .docs-input input,
.v2-dossier .annexes-body textarea {
  border: 1px solid var(--v2-bordure);
  border-radius: 12px;
  font: 16px var(--v2-police);
  font-weight: 400;
  color: var(--v2-noir);
}
.v2-dossier .form-group input, .v2-dossier .form-group select { min-height: 48px; }
.v2-dossier .form-group input:focus,
.v2-dossier .form-group select:focus,
.v2-dossier .form-group textarea:focus,
.v2-dossier .list-editor-field input:focus,
.v2-dossier .list-editor-field select:focus,
.v2-dossier .docs-input input:focus,
.v2-dossier .annexes-body textarea:focus { border-color: var(--v2-noir); outline: none; }
.v2-dossier .modal-dropdown-trigger { border: 1px solid var(--v2-bordure); border-radius: 12px; min-height: 48px; }
.v2-dossier .modal-dropdown-trigger.open, .v2-dossier .modal-dropdown-trigger:hover { border-color: var(--v2-noir); }
.v2-dossier .modal-dropdown-menu { border: 0; border-radius: 14px; box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05); }
.v2-dossier .modal-dropdown-option.selected { background: var(--v2-fond); color: var(--v2-noir); }
.v2-dossier .list-editor-card { border: 0; border-radius: 16px; background: var(--v2-fond); }
.v2-dossier .list-editor-field label { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; }
.v2-dossier .list-editor-add { border-radius: 14px; border-style: dashed; }

/* Fenêtres « Annexes » et « Déclarer » */
.v2-dossier .annexes-modal, .v2-dossier .declare-modal { background: rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.v2-dossier .annexes-dialog, .v2-dossier .declare-dialog { border-radius: 28px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45); }
.v2-dossier .annexes-dialog header, .v2-dossier .annexes-dialog footer, .v2-dossier .declare-dialog header { padding: 20px 26px; }
.v2-dossier .annexes-dialog header h4, .v2-dossier .declare-dialog header h4 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.v2-dossier .annexes-dropzone { border-radius: 16px; background: var(--v2-fond); }
.v2-dossier .declare-link { border-radius: 16px; background: var(--v2-fond); border: 0; }
.v2-dossier .declare-video { border-radius: 16px; }
.v2-dossier .doc-icon-btn { border-radius: 50%; }

/* Onglet Documents */
.v2-dossier .docs-layout { gap: 12px; }
.v2-dossier .docs-card { padding: 28px; border: 0; border-radius: 24px; background: var(--v2-fond); }
.v2-dossier .docs-card h4 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.v2-dossier .docs-hint { font-size: 14px; color: var(--v2-gris); }
.v2-dossier .doc-row { border: 0; border-radius: 16px; background: var(--v2-blanc); }
.v2-dossier .doc-icon { border-radius: 12px; background: var(--v2-fond); color: var(--v2-noir); }
.v2-dossier .doc-label { font-weight: 600; }
.v2-dossier .docs-progress { border-radius: 980px; background: var(--v2-fond); color: var(--v2-noir); font-weight: 500; }
.v2-dossier .docs-input { border-radius: 12px; }
.v2-dossier .docs-field-aide { font-size: 13px; color: var(--v2-gris); }
.v2-dossier .recap-actions { gap: 10px; }

/* Plan d'action de l'accident */
.v2-dossier .actions-table-container { border: 0; border-radius: 24px; background: var(--v2-fond); padding: 8px; }
.v2-dossier .actions-table { border-radius: 18px; overflow: hidden; background: var(--v2-blanc); }
.v2-dossier .actions-table th { background: var(--v2-blanc); font-size: 13px; font-weight: 500; color: var(--v2-gris); text-transform: none; letter-spacing: 0; }
.v2-dossier .status-dropdown { border: 0; border-radius: 980px; background-color: var(--v2-fond); font: 500 13px var(--v2-police); }
.v2-dossier .status-dropdown.status-late { background-color: #fff4ed; color: var(--v2-erreur); }
.v2-dossier .add-action-minimal { border-radius: 50%; }

/* États vides (analyse, contestation) */
.v2-dossier .empty-state-modern, .v2-dossier .empty-state { border: 0; border-radius: 28px; background: var(--v2-fond); }
.v2-dossier .feature-card { border: 0; border-radius: 18px; background: var(--v2-blanc); }
.v2-dossier .feature-icon, .v2-dossier .empty-state-icon { color: var(--v2-noir); }

/* Aperçu de l'analyse 5 Pourquoi (onglet Analyse des causes) */
.v2-dossier .v2-5p-apercu { display: block; padding: 28px; border-radius: 28px; background: var(--v2-fond); color: var(--v2-noir); text-decoration: none; transition: box-shadow .2s; }
.v2-dossier .v2-changer-methode { display: flex; justify-content: center; margin-top: 16px; }
.v2-dossier .v2-changer-methode .v2-btn--sm { padding: 0 16px; }
.v2-dossier .v2-5p-apercu:hover { box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-dossier .v2-5p-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.v2-dossier .v2-5p-methode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.v2-dossier .v2-5p-complete { padding: 2px 10px; border-radius: 980px; background: #ecfdf5; color: #047857; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.v2-dossier .v2-5p-meta { display: block; margin-top: 4px; font-size: 14px; color: var(--v2-gris); }
.v2-dossier .v2-5p-ouvrir { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 14px; font-weight: 500; color: var(--v2-orange-fonce); }
.v2-dossier .v2-5p-ouvrir i { transition: transform .3s var(--v2-ressort); }
.v2-dossier .v2-5p-apercu:hover .v2-5p-ouvrir i { transform: translateX(3px); }
.v2-dossier .v2-5p-chaine { display: flex; flex-direction: column; align-items: center; max-width: 560px; margin: 0 auto; }
/* Plusieurs situations finales : une chaîne par colonne */
.v2-dossier .v2-5p-chaines { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; align-items: start; }
.v2-dossier .v2-5p-chaines .v2-5p-chaine { max-width: none; margin: 0; }
.v2-dossier .v2-5p-carte { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px 12px 20px; border-radius: 16px; background: var(--v2-blanc); overflow: hidden; }
.v2-dossier .v2-5p-carte::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--step-color, var(--v2-orange)); }
.v2-dossier .v2-5p-num { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--step-color, var(--v2-orange)); color: #fff; font-size: 13px; font-weight: 700; }
.v2-dossier .v2-5p-num--sf { font-size: 16px; font-weight: 400; }
.v2-dossier .v2-5p-texte { display: flex; flex-direction: column; min-width: 0; }
.v2-dossier .v2-5p-titre { font-size: 12px; font-weight: 600; color: var(--v2-gris); }
.v2-dossier .v2-5p-reponse { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; color: var(--v2-noir); }
.v2-dossier .v2-5p-reponse em { font-style: normal; color: var(--v2-gris-clair); }
.v2-dossier .v2-5p-lien { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; font-size: 11px; font-weight: 500; color: var(--v2-gris); }
.v2-dossier .v2-5p-lien::before, .v2-dossier .v2-5p-lien::after { content: ""; width: 1px; height: 10px; background: var(--v2-bordure); }
.v2-dossier .v2-5p-vide { width: 100%; padding: 14px 16px; border: 1px dashed var(--v2-bordure); border-radius: 16px; text-align: center; font-size: 14px; color: var(--v2-gris); }
@media (max-width: 720px) {
  .v2-dossier .v2-5p-apercu { padding: 20px; }
  .v2-dossier .v2-5p-tete { flex-direction: column; gap: 10px; }
}

/* Notification */
.v2-dossier .docs-toast { border-radius: 980px; background: var(--v2-noir); color: #fff; font-size: 14px; }

@media (max-width: 720px) {
  .v2-dossier .v2-dossier-onglets { margin-bottom: 20px; }
  .v2-dossier .predat-header-actions { width: 100%; }
  .v2-dossier .predat-header-actions .btn { flex: 1 1 100%; }
  .v2-dossier .recap-card { padding: 20px; }
}
.v2-dossier .recap-grid, .v2-dossier .tab-content { padding-left: 0; padding-right: 0; }

/* Récapitulatif (icône au-dessus du libellé) : petites cartes blanches */
.v2-dossier .recap-action { border: 0; border-radius: 18px; background: var(--v2-blanc); color: var(--v2-noir); font-family: var(--v2-police); font-weight: 500; box-shadow: none; transition: box-shadow .2s, transform .3s var(--v2-ressort); }
.v2-dossier .recap-action:hover { background: var(--v2-blanc); color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-noir); transform: none; }
.v2-dossier .recap-action i { background: var(--v2-fond); color: var(--v2-noir); }

/* ══ Comptes utilisateurs ═════════════════════════════════════════════ */
.v2-ligne--compte { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) 260px 150px; }
.v2-ligne--compte .v2-accident-etat { justify-content: flex-start; }
.v2-sans-nom { color: var(--v2-gris); font-weight: 500; }
.v2-ligne--compte .v2-ligne-actions { justify-content: flex-end; }
.v2-vous { margin-left: 6px; padding: 2px 8px; border-radius: 980px; background: var(--v2-fond); font-size: 12px; font-weight: 500; color: var(--v2-gris); vertical-align: middle; }
.v2-type--compte { background: var(--v2-noir); color: #fff; }
.v2-type--editeur { background: #fff4ed; color: var(--v2-erreur); }
.v2-type--responsable { background: var(--v2-fond); color: var(--v2-noir); }
.v2-ligne--compte .v2-type--responsable { box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-quota-alerte { margin-bottom: 24px; }

/* Choix du type de compte : une carte par rôle */
.v2-roles-choix { margin: 0 0 8px; padding: 0; border: 0; }
.v2-roles-choix legend { margin-bottom: 8px; font-size: 13px; color: var(--v2-gris); }
.v2-roles-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.v2-role-carte { position: relative; cursor: pointer; }
.v2-role-carte input { position: absolute; opacity: 0; pointer-events: none; }
.v2-role-carte-corps {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--v2-bordure);
  transition: box-shadow .2s, background-color .2s;
}
.v2-role-carte-corps b { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 600; color: var(--v2-noir); }
.v2-role-carte-corps span { font-size: 14px; line-height: 1.45; color: var(--v2-gris); }
.v2-role-carte:hover .v2-role-carte-corps { box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-role-carte input:checked + .v2-role-carte-corps { box-shadow: inset 0 0 0 2px var(--v2-orange); background: #fffaf6; }
.v2-role-carte input:focus-visible + .v2-role-carte-corps { outline: 2px solid var(--v2-noir); outline-offset: 2px; }

/* Formulaire seul sur sa page */
.v2-formulaire-page { max-width: 760px; }
.v2-carte--formulaire { background: var(--v2-fond); }
.v2-carte-texte { margin: 0 0 20px; font-size: 15px; color: var(--v2-gris); }

@media (max-width: 1000px) {
  .v2-ligne--compte { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-ligne--compte .v2-ligne-valeur { grid-column: 1; }
  .v2-ligne--compte .v2-accident-etat { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .v2-ligne--compte .v2-ligne-actions { grid-column: 2; grid-row: 2; }
}
@media (max-width: 720px) {
  .v2-ligne--compte { grid-template-columns: 1fr; }
  .v2-ligne--compte .v2-accident-etat, .v2-ligne--compte .v2-ligne-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .v2-ligne--compte .v2-ligne-actions { flex-direction: row-reverse; justify-content: space-between; }
}
.v2-ligne-actions:empty { display: none; }

/* ══ Espaces de travail plein écran (5 pourquoi) ══════════════════════
   Habillage v2 des éléments d'origine (css/cinq-pourquoi-base.css). */
.v2-atelier .v2-page { max-width: none; padding: 0; }
.v2-atelier .v2-page-messages { margin: 12px 24px; }
.v2-atelier #toolbar { height: 60px; padding: 0 24px; background: rgba(255, 255, 255, .82); border-bottom: 1px solid rgba(0, 0, 0, .06); }
.v2-atelier .tb-sep { background: var(--v2-trait); }
.v2-atelier .v2-atelier-titre { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-left: 4px; line-height: 1.2; }
.v2-atelier .v2-atelier-titre b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--v2-noir); }
.v2-atelier .v2-atelier-titre span { font-size: 12px; font-weight: 400; color: var(--v2-gris); }
.v2-atelier-contenu .btn {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 980px;
  box-shadow: inset 0 0 0 1px var(--v2-bordure);
  background: var(--v2-blanc);
  font: 500 13px var(--v2-police);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.v2-atelier-contenu .btn:hover:not(:disabled) { transform: none; background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-atelier-contenu .btn.orange { background: var(--v2-orange); color: #fff; box-shadow: none; }
.v2-atelier-contenu .btn.orange:hover:not(:disabled) { background: var(--v2-orange-fonce); box-shadow: none; }
.v2-atelier-contenu .btn.primary { background: var(--v2-noir); color: #fff; box-shadow: none; }
.v2-atelier-contenu .btn.primary:hover:not(:disabled) { background: #000; box-shadow: none; }
.v2-atelier-contenu .btn.ico { width: 36px; padding: 0; border-radius: 50%; box-shadow: none; background: transparent; color: var(--v2-gris); }
.v2-atelier-contenu .btn.ico:hover:not(:disabled) { background: var(--v2-fond); color: var(--v2-noir); box-shadow: none; }
.v2-atelier-contenu .btn.ico.active { background: var(--v2-noir); color: #fff; }
.v2-atelier-contenu .overlay { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.v2-atelier-contenu .mbox { border-radius: 28px; border: 0; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45); }
.v2-atelier-contenu .m-h { font-weight: 600; letter-spacing: -.02em; }
.v2-atelier-contenu textarea.m-ta { border-radius: 12px; border-color: var(--v2-bordure); font-family: var(--v2-police); }
.v2-atelier-contenu textarea.m-ta:focus { border-color: var(--v2-noir); box-shadow: none; }
/* Arbre des causes : l'application React occupe la place sous l'en-tête.
   « contain: layout » fait de la zone le repère de ses fenêtres fixes
   (placées en dur depuis le haut) : elles s'ouvrent sous l'en-tête v2. */
.v2-arbre { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.v2-arbre .v2-entete { flex-shrink: 0; }
.v2-arbre .v2-page { flex: 1; width: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.v2-arbre-contenu { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; contain: layout; font-family: 'Inter', sans-serif; }
.v2-arbre-contenu *, .v2-arbre-contenu *::before, .v2-arbre-contenu *::after { margin: 0; padding: 0; box-sizing: border-box; }
.v2-arbre-contenu .v2-arbre-ico:hover, .v2-arbre-contenu .v2-arbre-zoom button:hover { background: rgba(0, 0, 0, .06) !important; }
.v2-arbre-contenu .v2-arbre-reset:hover { box-shadow: inset 0 0 0 1px var(--v2-noir); }
@media (max-width: 720px) {
  .v2-arbre .v2-arbre-barre { padding: 0 10px !important; gap: 2px !important; overflow-x: auto; scrollbar-width: none; }
  .v2-arbre .v2-arbre-barre > * { flex-shrink: 0; }
  .v2-arbre .v2-arbre-titre, .v2-arbre .v2-arbre-sep, .v2-arbre .v2-arbre-reset { display: none !important; }
  .v2-atelier #app { height: calc(100vh - 57px); height: calc(100dvh - 57px); }
  /* La barre d'outils tient sur un téléphone : titre masqué (il est dans
     l'onglet), « Nouvelle analyse » réduit à son icône, défilement en dernier recours. */
  .v2-atelier #toolbar { gap: 2px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
  .v2-atelier #toolbar::-webkit-scrollbar { display: none; }
  .v2-atelier #toolbar > * { flex-shrink: 0; }
  .v2-atelier #toolbar .tb-sep,
  .v2-atelier .v2-atelier-titre,
  .v2-atelier #btn-zoom-reset { display: none; }
  .v2-atelier-contenu #btn-new { width: 36px; padding: 0; gap: 0; font-size: 0; justify-content: center; }
  .v2-atelier-contenu #btn-new svg { width: 14px; height: 14px; }
}

/* ══ Pré-déclaration en étapes ═══════════════════════════════════════ */
.v2-etape-tete { padding: 48px 0 32px; }
.v2-requis { color: var(--v2-orange); }
.v2-champ-libelle { font-size: 13px; color: var(--v2-gris); }
.v2-anciennete { align-self: flex-start; margin: 2px 0 0; padding: 4px 12px; border-radius: 980px; background: #fff4ed; color: var(--v2-erreur); font-size: 13px; font-weight: 500; }
.v2-anciennete[hidden] { display: none; }

/* Stepper : 9 pastilles reliées ; étapes faites cliquables, étape en cours en orange */
.v2-etapes { display: flex; margin: 0 0 32px; padding: 0; list-style: none; }
.v2-etapes li { position: relative; flex: 1 1 0; min-width: 0; }
.v2-etapes li + li::before {
  content: "";
  position: absolute;
  top: 14px;
  right: calc(50% + 20px);
  left: calc(-50% + 20px);
  height: 2px;
  border-radius: 2px;
  background: var(--v2-trait);
}
.v2-etapes li.fait::before, .v2-etapes li.actif::before { background: var(--v2-noir); }
.v2 .v2-etape-lien { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--v2-gris); }
.v2-etape-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--v2-fond);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .2s, box-shadow .2s;
}
.v2-etape-nom { font-size: 12px; line-height: 1.3; }
.v2-etapes .fait .v2-etape-num { background: var(--v2-noir); color: #fff; }
.v2-etapes .fait .v2-etape-nom { color: var(--v2-texte); }
.v2 .v2-etapes a.v2-etape-lien:hover .v2-etape-num { background: var(--v2-orange); }
.v2 .v2-etapes a.v2-etape-lien:hover { color: var(--v2-noir); }
.v2-etapes .actif .v2-etape-num { background: var(--v2-orange); color: #fff; box-shadow: 0 0 0 4px rgba(249, 115, 22, .18); }
.v2-etapes .actif .v2-etape-nom { color: var(--v2-noir); font-weight: 500; }

/* Choix exclusifs (ex. Homme / Femme) : deux grands boutons */
.v2-choix { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 10px; }
.v2-choix label { position: relative; cursor: pointer; }
.v2-choix input { position: absolute; opacity: 0; pointer-events: none; }
.v2-choix span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--v2-bordure);
  background: var(--v2-blanc);
  font-size: 17px;
  color: var(--v2-texte);
  transition: box-shadow .2s, background-color .2s, color .2s;
}
.v2-choix label:hover span { box-shadow: inset 0 0 0 1px var(--v2-noir); color: var(--v2-noir); }
.v2-choix input:checked + span { background: var(--v2-noir); box-shadow: none; color: #fff; font-weight: 500; }
.v2-choix input:focus-visible + span { outline: 2px solid var(--v2-orange); outline-offset: 2px; }
.v2-choix[hidden] { display: none; }
/* Grille de choix (3 par ligne, ou 4 avec --4) : pour la météo et les choix multiples */
.v2-choix--grille { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-choix--grille.v2-choix--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.v2-choix--grille span { height: auto; min-height: 52px; padding: 10px 12px; text-align: center; font-size: 15px; line-height: 1.3; }
@media (max-width: 720px) {
  .v2-choix--grille, .v2-choix--grille.v2-choix--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Libellés de plusieurs mots (constat de l'accident) : le bouton s'agrandit sur deux lignes */
.v2-choix--texte span { height: auto; min-height: 52px; padding: 8px 12px; text-align: center; line-height: 1.25; }
@media (max-width: 720px) {
  .v2-choix--texte span { font-size: 15px; }
}

@media (max-width: 720px) {
  .v2-etape-tete { padding: 28px 0 24px; }
  /* Sur téléphone : seules les pastilles, le libellé de l'étape en cours est dans le titre */
  .v2-etape-nom { display: none; }
  .v2-etapes li + li::before { right: calc(50% + 17px); left: calc(-50% + 17px); }
  .v2-etape-num { width: 28px; height: 28px; font-size: 12px; }
}

/* Horaires de travail (étape 3) : une ligne par période, activable */
.v2-horaires { display: flex; flex-direction: column; gap: 10px; }
.v2-horaire {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: end;
  gap: 8px 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--v2-fond);
  transition: background-color .2s, box-shadow .2s;
}
.v2-horaire.est-actif { background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-horaire .v2-interrupteur { align-self: center; }
.v2-horaire-heures { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; transition: opacity .2s; }
.v2-horaire:not(.est-actif) .v2-horaire-heures { opacity: .4; }
.v2-horaire-fleche { padding-bottom: 15px; color: var(--v2-gris); }
.v2-horaire .v2-champ-erreur { grid-column: 1 / -1; }
.v2-horaire-nom { font-size: 15px; font-weight: 500; color: var(--v2-noir); }

/* Interrupteur (case à cocher en forme de glissière) */
.v2-interrupteur { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.v2-interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-interrupteur-piste { position: relative; flex-shrink: 0; width: 44px; height: 26px; border-radius: 980px; background: var(--v2-bordure); transition: background-color .25s; }
.v2-interrupteur-piste::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .3s var(--v2-ressort);
}
.v2-interrupteur input:checked + .v2-interrupteur-piste { background: var(--v2-orange); }
.v2-interrupteur input:checked + .v2-interrupteur-piste::after { transform: translateX(18px); }
.v2-interrupteur input:focus-visible + .v2-interrupteur-piste { outline: 2px solid var(--v2-noir); outline-offset: 2px; }

@media (max-width: 720px) {
  .v2-horaire { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .v2-horaire-heures { gap: 6px; }
  .v2-horaire-heures input { padding: 0 10px; font-size: 16px; }
}

/* ══ Visualiseur 3D des lésions ═══════════════════════════════════════
   Habillage v2 des éléments d'origine (css/body-viewer-base.css).
   L'application occupe la place laissée sous l'en-tête. */
/* ══ Lésions : saisie par listes (téléphone) ══════════════════════════
   body_viewer_v2.html bascule le corps de page en .v2-lesions-liste sous
   720 px : la 3D est masquée (et pas chargée), la saisie par listes s'affiche. */
.v2-ls-page { display: none; }
.v2-lesions-liste .v2-ls-page { display: block; }
.v2-lesions-liste .v2-corps-contenu { display: none; }
.v2-ls { padding-bottom: 8px; }

/* Silhouettes de face et de dos, pastilles numérotées comme la liste */
.v2-ls-corps { display: flex; justify-content: center; gap: 8px; padding: 18px 12px 12px; border-radius: 24px; background: var(--v2-fond); }
.v2-ls-fig { flex: 1 1 0; max-width: 170px; margin: 0; text-align: center; }
.v2-ls-fig svg { display: block; width: 100%; height: auto; aspect-ratio: 387 / 640; }
.v2-ls-fig figcaption { margin-top: 6px; font-size: 12px; color: var(--v2-gris); }
.v2-ls-point circle { stroke: #fff; }
.v2-ls-point text { font-family: var(--v2-police); font-weight: 600; fill: #fff; text-anchor: middle; }
.v2-ls-point.est-choisi circle { filter: drop-shadow(0 0 4px rgba(249, 115, 22, .7)); }
.v2-ls-fig--zoom svg { border-radius: 16px; background: var(--v2-fond); }

/* Liste des lésions */
.v2-ls-liste-tete { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.v2-ls-liste-tete h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.v2-ls-liste-tete span { font-size: 15px; color: var(--v2-gris); }
.v2-ls-liste { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v2-ls-liste:empty { display: none; }
.v2-ls-lesion { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: 18px; background: var(--v2-fond); }
.v2-ls-num { display: flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 600; }
.v2-ls-lesion-texte { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.v2-ls-lesion-texte strong { font-size: 16px; font-weight: 600; }
.v2-ls-lesion-texte span { font-size: 14px; line-height: 1.4; color: var(--v2-gris); overflow-wrap: anywhere; }
.v2-ls-suppr { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--v2-blanc); color: var(--v2-gris); font-size: 20px; line-height: 1; cursor: pointer; }
.v2-ls-vide { margin: 0; padding: 18px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--v2-bordure); text-align: center; font-size: 15px; color: var(--v2-gris); }
.v2-ls-vide[hidden] { display: none; }
.v2-ls-ajouter { width: 100%; height: 52px; margin-top: 12px; gap: 8px; }
.v2-ls-ajouter[hidden] { display: none; }
.v2-ls-ajouter svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Ajout : une question à la fois */
.v2-ls-ajout { margin-top: 12px; padding: 16px 16px 20px; border-radius: 24px; background: var(--v2-blanc); box-shadow: 0 0 0 1px var(--v2-bordure), 0 24px 50px -32px rgba(0, 0, 0, .3); scroll-margin-top: 72px; }
.v2-ls-ajout[hidden] { display: none; }
.v2-ls-ajout-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.v2-ls-precedent { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--v2-fond); color: var(--v2-noir); cursor: pointer; }
.v2-ls-precedent svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.v2-ls-fil { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: 13px; color: var(--v2-gris); text-overflow: ellipsis; white-space: nowrap; }
.v2-ls-annuler { flex: none; padding: 10px 4px; border: 0; background: none; font-family: var(--v2-police); font-size: 14px; color: var(--v2-gris); cursor: pointer; }
.v2-ls-ajout h3 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; outline: none; }
.v2-ls-aide { margin: 6px 0 0; font-size: 14px; color: var(--v2-gris); }
.v2-ls-options { display: grid; gap: 8px; margin-top: 16px; }
.v2-ls-options--grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-ls-option {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 14px;
  border: 0; border-radius: 16px; background: var(--v2-fond); color: var(--v2-noir);
  font-family: var(--v2-police); text-align: left; cursor: pointer;
  transition: transform .2s var(--v2-ressort), box-shadow .2s;
}
.v2-ls-option:active { transform: scale(.98); }
.v2-ls-option.est-actif { box-shadow: inset 0 0 0 2px var(--v2-noir); }
.v2-ls-pastille { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.v2-ls-option-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-ls-option-texte b { font-size: 16px; font-weight: 600; }
.v2-ls-option-texte small { font-size: 13px; line-height: 1.35; color: var(--v2-gris); }
.v2-ls-puces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.v2-ls-puce {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 980px;
  background: var(--v2-fond); color: var(--v2-noir);
  font-family: var(--v2-police); font-size: 15px; font-weight: 500; cursor: pointer;
}
.v2-ls-puce.est-actif { background: var(--v2-noir); color: #fff; }
.v2-ls-cote { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 16px; }
.v2-ls-cote .v2-ls-fig, .v2-ls-precision .v2-ls-fig { max-width: none; }
.v2-ls-cote-choix { display: grid; gap: 8px; }
.v2-ls-precision { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 16px; }
.v2-ls-precision .v2-ls-puces { margin-top: 0; }
.v2-ls-precision .v2-champ { margin-top: 14px; }
.v2-ls-precision .v2-ls-puces + .v2-champ label { font-size: 13px; }
.v2-ls-confirmer { width: 100%; height: 52px; margin-top: 18px; }
.v2-ls-3d {
  display: block; margin: 20px auto 0; padding: 10px; border: 0; background: none;
  font-family: var(--v2-police); font-size: 14px; font-weight: 500; color: var(--v2-gris);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.v2-ls-barre .v2-btn { white-space: nowrap; }
.v2-ls-barre .v2-btn--contour { flex: 0 0 auto; padding: 0 20px; }
@media (max-width: 380px) {
  .v2-ls-options--grille { grid-template-columns: minmax(0, 1fr); }
  .v2-ls-cote, .v2-ls-precision { grid-template-columns: 88px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .v2-ls-option { transition: none; } }

.v2-corps { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.v2-corps .v2-entete { flex-shrink: 0; }
.v2-corps .v2-page { flex: 1; width: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.v2-corps-contenu { position: relative; flex: 1; min-height: 0; font-family: var(--v2-police); color: var(--v2-noir); -webkit-font-smoothing: antialiased; }
.v2-corps .v2-corps-contenu button { font-family: var(--v2-police); }
.v2-corps .v2-corps-contenu .toolbar .sel-tag { background: var(--v2-fond); font-size: 13px; color: var(--v2-noir); }

/* Panneaux latéraux */
.v2-corps .v2-corps-contenu .panel-left { width: 280px; border-right: 0; background: var(--v2-fond); }
.v2-corps .v2-corps-contenu .panel-left-header { padding: 22px 20px 16px; border-bottom: 0; }
.v2-corps .v2-corps-contenu h1 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 4px; }
.v2-corps .v2-corps-contenu .subtitle { font-size: 13px; color: var(--v2-gris); }
.v2-corps .v2-corps-contenu .section-title { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--v2-gris); }
.v2-corps .v2-corps-contenu .panel-left-scroll { padding: 6px 14px 20px; }
.v2-corps .v2-corps-contenu .cat { margin-bottom: 8px; border: 0; border-radius: 16px; background: var(--v2-blanc); }
.v2-corps .v2-corps-contenu .cat-header { padding: 12px 14px; }
.v2-corps .v2-corps-contenu .cat-header:hover { background: transparent; }
.v2-corps .v2-corps-contenu .cat-name { font-size: 14px; font-weight: 500; color: var(--v2-noir); }
.v2-corps .v2-corps-contenu .cat-desc { font-size: 12px; color: var(--v2-gris); }
.v2-corps .v2-corps-contenu .sub-btn { padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--v2-texte); }
.v2-corps .v2-corps-contenu .sub-btn:hover { background: var(--v2-fond); }
.v2-corps .v2-corps-contenu .sub-btn.active { background: var(--v2-fond); color: var(--v2-noir); font-weight: 500; }
.v2-corps .v2-corps-contenu .panel-left > div:last-child { border-top: 0 !important; }
.v2-corps .v2-corps-contenu .back-btn { height: 44px; padding: 0 16px; border: 0; border-radius: 980px; background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-bordure); color: var(--v2-noir); font-size: 15px; font-weight: 500; }
.v2-corps .v2-corps-contenu .back-btn:hover { background: var(--v2-blanc); color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-noir); }

.v2-corps .v2-corps-contenu .panel-right { width: 300px; padding: 22px 18px; border-left: 0; background: var(--v2-fond); }
.v2-corps .v2-corps-contenu .lesion-card { margin-bottom: 8px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--v2-blanc); }
.v2-corps .v2-corps-contenu .lesion-card .type { font-size: 14px; font-weight: 500; }
.v2-corps .v2-corps-contenu .lesion-card .part { font-size: 13px; color: var(--v2-gris); }
/* Précision facultative de la zone : champ effacé tant qu'on ne s'en sert pas */
.v2-corps .v2-corps-contenu .lesion-precision {
  display: block;
  width: calc(100% - 7px);
  margin: 4px 0 0 7px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: 13px/1.3 var(--v2-police);
  color: var(--v2-noir);
  transition: background-color .2s;
}
.v2-corps .v2-corps-contenu .lesion-precision::placeholder { color: var(--v2-gris-clair); }
.v2-corps .v2-corps-contenu .lesion-precision:hover { background: var(--v2-fond); }
.v2-corps .v2-corps-contenu .lesion-precision:focus { outline: 0; background: var(--v2-fond); box-shadow: inset 0 0 0 1px var(--v2-orange); }
.v2-corps .v2-corps-contenu .lesion-precision::-webkit-calendar-picker-indicator { opacity: 0; }
.v2-corps .v2-corps-contenu .remove-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--v2-fond); color: var(--v2-gris); }
.v2-corps .v2-corps-contenu .remove-btn:hover { background: #fff4ed; color: var(--v2-erreur); }
.v2-corps .v2-corps-contenu .clear-btn { padding: 5px 12px; border-radius: 980px; background: #fff4ed; color: var(--v2-erreur); font-size: 12px; }
.v2-corps .v2-corps-contenu .summary { padding: 14px; border: 0; border-radius: 14px; background: var(--v2-blanc); }
.v2-corps .v2-corps-contenu .summary .stitle { color: var(--v2-noir); font-size: 13px; }
.v2-corps .v2-corps-contenu .summary .count, .v2-corps .v2-corps-contenu .summary .zones { font-size: 13px; color: var(--v2-gris); }
.v2-corps .v2-corps-contenu .empty p:first-of-type { font-size: 14px !important; color: var(--v2-gris) !important; }
.v2-corps .v2-corps-contenu .empty p + p { font-size: 13px !important; color: var(--v2-gris-clair); }
.v2-corps .v2-corps-contenu .validate-btn { width: 100%; height: 48px; border-radius: 980px; background: var(--v2-orange); box-shadow: none; font-size: 16px; font-weight: 500; }
.v2-corps .v2-corps-contenu .validate-btn:hover { background: var(--v2-orange-fonce); }

/* Zone 3D et commandes de vue */
.v2-corps .v2-corps-contenu .toolbar { padding: 12px 16px 16px; border-top: 0; }
.v2-corps .v2-corps-contenu .view-controls { padding: 3px; border-radius: 980px; background: var(--v2-fond); }
.v2-corps .v2-corps-contenu .tbtn { padding: 7px 18px; border-radius: 980px; font-size: 13px; color: var(--v2-texte); }
.v2-corps .v2-corps-contenu .tbtn.active { color: var(--v2-noir); }
.v2-corps .v2-corps-contenu .info-btn { top: 16px; right: 16px; padding: 6px 14px; border-radius: 980px; background: var(--v2-fond); color: var(--v2-noir); font-size: 13px; font-weight: 500; }
.v2-corps .v2-corps-contenu .info-btn:hover { background: var(--v2-trait); color: var(--v2-noir); }
.v2-corps .v2-corps-contenu .hover-tag { border-radius: 980px; background: var(--v2-noir); font-size: 13px; }

/* Fenêtre « Comment utiliser le visualiseur 3D » */
.v2-corps .v2-corps-contenu .info-modal { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.v2-corps .v2-corps-contenu .info-modal-content { border-radius: 28px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45); }
.v2-corps .v2-corps-contenu .info-modal-header { padding: 22px 26px; border-bottom: 0; }
.v2-corps .v2-corps-contenu .info-modal-title { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.v2-corps .v2-corps-contenu .info-modal-close { border-radius: 50%; background: var(--v2-fond); font-size: 20px; }
.v2-corps .v2-corps-contenu .info-modal-body { padding: 4px 26px 26px; }
.v2-corps .v2-corps-contenu .info-section-title { font-size: 15px; }
.v2-corps .v2-corps-contenu .info-list li { font-size: 14px; color: var(--v2-texte); }

/* Champ suivi d'un bouton (ex. objet + « Aucun ») */
.v2-champ-avec-bouton { display: flex; gap: 10px; }
.v2-champ-avec-bouton input { flex: 1; min-width: 0; }
.v2-champ-avec-bouton .v2-btn { flex-shrink: 0; height: 52px; }

/* Fichier joint (certificat médical) */
.v2-fichier { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.v2-champ .v2-fichier-cache { width: 1px; height: 1px; padding: 0; border: 0; }
.v2-fichier label.v2-btn { cursor: pointer; }
.v2-fichier-charge { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--v2-fond); }
.v2-fichier-icone { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--v2-noir); color: #fff; }
.v2-fichier-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.v2-fichier-infos { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.v2-fichier-infos strong { font-size: 15px; font-weight: 600; }
.v2-fichier-infos span { overflow: hidden; font-size: 13px; color: var(--v2-gris); text-overflow: ellipsis; white-space: nowrap; }

/* Aperçu du fichier choisi, avant l'envoi (accidents/_fichier_v2.html) */
.v2-fichier[hidden], .v2-fichier-charge[hidden] { display: none; }
.v2-fichier-zone + .v2-champ-aide, .v2-fichier-charge + .v2-champ-aide { margin-top: -2px; }
.v2-fichier-apercu { flex-wrap: wrap; background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-fichier-miniature {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--v2-fond);
}
.v2-fichier-miniature img { width: 100%; height: 100%; object-fit: cover; }
.v2-fichier-ext { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--v2-erreur); }
.v2-fichier-note { color: var(--v2-erreur) !important; white-space: normal !important; }
.v2-fichier-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.v2 .v2-btn--retirer { color: var(--v2-erreur); }
.v2 .v2-btn--retirer:hover { color: var(--v2-erreur); box-shadow: inset 0 0 0 1px var(--v2-erreur); }
@media (max-width: 720px) {
  .v2-fichier-charge { flex-wrap: wrap; }
  .v2-fichier-charge > .v2-btn { width: 100%; }
  .v2-fichier-actions { width: 100%; }
  .v2-fichier-actions .v2-btn { flex: 1; }
}

/* Étape 7 : questions Oui / Non, sous-formulaires et listes d'ajouts */
.v2-choix--court { max-width: 340px; }
.v2-sous-formulaire { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; border-radius: 18px; background: var(--v2-fond); }
.v2-sous-formulaire[hidden] { display: none; }
.v2-sous-formulaire > .v2-grille-champs, .v2-sous-formulaire > .v2-champ { width: 100%; }
.v2-liste-ajouts-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.v2-liste-ajouts-tete h3 { margin: 0; font-size: 15px; font-weight: 600; }
.v2-liste-ajouts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v2-liste-ajouts li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-liste-ajouts li > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.v2-liste-ajouts strong { font-size: 15px; font-weight: 600; }
.v2-liste-ajouts span:not(.v2-type) { font-size: 13px; color: var(--v2-gris); overflow-wrap: anywhere; }
.v2-liste-ajouts .v2-type { margin-top: 4px; background: #fff4ed; color: var(--v2-erreur); }
.v2-retirer { flex-shrink: 0; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--v2-fond); color: var(--v2-gris); font-size: 16px; line-height: 1; cursor: pointer; }
.v2-retirer:hover { background: #fff4ed; color: var(--v2-erreur); }

/* Étape 8 : annexes déjà enregistrées */
.v2-annexes { display: flex; flex-direction: column; gap: 8px; margin: 0 0 6px; padding: 0; list-style: none; }
.v2-annexe-ajout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.v2-annexe-ajout[hidden] { display: none; }
.v2-etape-tete h1 + p { margin-top: 14px; }

/* Étape 9 : cartes du récapitulatif (cliquables pour modifier) */
.v2-recap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2 .v2-recap-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 18px 58px;
  border-radius: 18px;
  background: var(--v2-fond);
  color: var(--v2-texte);
  font-size: 14px;
  line-height: 1.4;
  transition: box-shadow .2s;
}
.v2 .v2-recap-carte:hover { color: var(--v2-texte); box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-recap-num { position: absolute; top: 16px; left: 16px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--v2-noir); color: #fff; font-size: 13px; font-weight: 600; }
.v2-recap-titre { margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--v2-gris); }
.v2-recap-carte strong { font-weight: 600; color: var(--v2-noir); overflow-wrap: anywhere; }
.v2-recap-carte > span { overflow-wrap: anywhere; }
.v2-recap-normal { font-weight: 400; color: var(--v2-texte); }
.v2-recap-pastille { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }

/* Fenêtres (élément <dialog>) */
.v2-fenetre {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 22px 28px 28px;
  border: 0;
  border-radius: 28px;
  background: var(--v2-blanc);
  color: var(--v2-noir);
  text-align: center;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45);
}
.v2-fenetre::backdrop { background: rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.v2-fenetre-haut { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.v2-fenetre-retour { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: 14px var(--v2-police); color: var(--v2-gris); cursor: pointer; }
.v2-fenetre-retour:hover { color: var(--v2-noir); }
.v2-fenetre-retour svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v2-fenetre-fermer { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--v2-fond); color: var(--v2-gris); font-size: 20px; line-height: 1; cursor: pointer; }
.v2-fenetre-fermer:hover { color: var(--v2-noir); }
.v2-fenetre-icone { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 4px auto 16px; border-radius: 50%; background: var(--v2-orange); color: #fff; box-shadow: 0 0 16px rgba(249, 115, 22, .45); }
.v2-fenetre-icone svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.v2-fenetre h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.v2-fenetre > p { margin: 6px 0 22px; font-size: 15px; color: var(--v2-gris); }
.v2-fenetre-choix { display: flex; flex-direction: column; gap: 10px; }
.v2-fenetre-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--v2-fond);
  color: var(--v2-noir);
  font: 15px var(--v2-police);
  text-align: left;
  cursor: pointer;
  transition: box-shadow .2s, background-color .2s;
}
.v2-fenetre-option strong { font-weight: 600; }
.v2-fenetre-option span { font-size: 13px; color: var(--v2-gris); }
.v2-fenetre-option:hover { box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-fenetre-option--orange { background: var(--v2-orange); color: #fff; }
.v2-fenetre-option--orange span { color: rgba(255, 255, 255, .8); }
.v2-fenetre-option--orange:hover { background: var(--v2-orange-fonce); box-shadow: none; }
.v2-fenetre-option:disabled, .v2-fenetre-lien:disabled, .v2-fenetre-retour:disabled { opacity: .5; cursor: progress; }
.v2-fenetre-lien { width: 100%; margin-top: 12px; padding: 14px; border: 0; border-radius: 16px; background: none; box-shadow: inset 0 0 0 1px var(--v2-bordure); font: 500 14px var(--v2-police); color: var(--v2-gris); cursor: pointer; }
.v2-fenetre-lien:hover { color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-noir); }
@media (max-width: 720px) {
  .v2-recap { grid-template-columns: minmax(0, 1fr); }
}

/* ══ Confirmation de souscription ═════════════════════════════════════ */
.v2-confirmation { max-width: 620px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 0 64px; }
.v2-confirmation-tete { text-align: center; margin-bottom: 36px; }
.v2-confirmation-tete .v2-fenetre-icone { width: 64px; height: 64px; margin-bottom: 22px; }
.v2-confirmation-tete h1 { margin: 0; font-size: clamp(34px, 5vw, 48px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.v2-confirmation-tete p { margin: 16px auto 0; max-width: 520px; font-size: 17px; line-height: 1.5; color: var(--v2-gris); }
.v2-confirmation-tete strong { color: var(--v2-noir); font-weight: 600; }
.v2-confirmation-bloc { margin-bottom: 12px; padding: clamp(22px, 4vw, 32px); border-radius: 28px; background: var(--v2-fond); }
.v2-confirmation-bloc h2 { margin: 0 0 14px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.v2-confirmation-alerte { margin: 0 0 18px; padding: 12px 16px; border-radius: 14px; background: #fff4ed; color: var(--v2-erreur); font-size: 14px; line-height: 1.45; }
.v2-identifiant { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin-bottom: 10px; padding: 14px 16px; border-radius: 16px; background: var(--v2-blanc); }
.v2-identifiant-lbl { grid-column: 1 / -1; font-size: 12px; color: var(--v2-gris); }
.v2-identifiant code, .v2-confirmation-recap code { font: 500 16px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--v2-noir); overflow-wrap: anywhere; }
.v2-identifiant-mdp { letter-spacing: .04em; }
.v2 .v2-identifiant .est-copie { background: var(--v2-noir); color: #fff; box-shadow: none; }
.v2-confirmation-bloc .v2-btn--plein { margin-top: 12px; }
.v2-confirmation-recap { margin: 0; }
.v2-confirmation-recap > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--v2-trait); font-size: 15px; }
.v2-confirmation-recap dt { color: var(--v2-gris); }
.v2-confirmation-recap dd { margin: 0; text-align: right; font-weight: 500; }
.v2-confirmation-recap code { font-size: 14px; }
.v2-confirmation-total { border-bottom: 0 !important; font-size: 17px !important; }
.v2-confirmation-total dt { color: var(--v2-noir) !important; font-weight: 600; }
.v2-confirmation-total dd { font-weight: 600 !important; }
.v2-confirmation-total span { font-weight: 400; color: var(--v2-gris); }
.v2-confirmation-note { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--v2-gris); }
.v2-confirmation-aide { margin: 24px 0 0; text-align: center; font-size: 14px; color: var(--v2-gris); }
.v2 .v2-confirmation-aide a { color: var(--v2-noir); text-decoration: underline; text-underline-offset: 3px; }
.v2-insecable { white-space: nowrap; }

/* ══ Configuration du groupe (première connexion) ═════════════════════
   Panneau de la page de connexion : la configuration et ses 6 étapes. */
.v2-config .v2-surtitre { margin-bottom: 14px; }
.v2-config-titre { margin: 0; max-width: 560px; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; }
.v2-config .v2-auth-texte { max-width: 520px; }
.v2-config-etapes { display: flex; flex-direction: column; gap: 4px; margin: 32px 0 0; padding: 0; list-style: none; }
.v2-config-etapes li { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; transition: background-color .2s; }
.v2-config-etapes li.actif { background: var(--v2-blanc); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.v2-config-num { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--v2-blanc); color: var(--v2-gris); font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-config-num svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.v2-config-etapes li.fait .v2-config-num { background: var(--v2-noir); color: #fff; box-shadow: none; }
.v2-config-etapes li.actif .v2-config-num { background: var(--v2-orange); color: #fff; box-shadow: 0 0 0 4px rgba(249, 115, 22, .18); }
.v2-config-texte { display: flex; flex-direction: column; min-width: 0; }
.v2-config-texte strong { font-size: 15px; font-weight: 600; color: var(--v2-noir); }
.v2-config-texte span { font-size: 13px; color: var(--v2-gris); }
.v2-config-etapes li:not(.actif):not(.fait) strong { color: var(--v2-gris); font-weight: 500; }
.v2-config-progression p { margin: 10px 0 0; font-size: 13px; color: var(--v2-gris); }
.v2-config-barre { height: 6px; border-radius: 980px; background: var(--v2-trait); overflow: hidden; }
.v2-config-barre span { display: block; height: 100%; border-radius: inherit; background: var(--v2-orange); transition: width .6s var(--v2-ressort); }
.v2-config-etape { margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--v2-orange-fonce); }
.v2-auth-formulaire .v2-config-etape + h2 { margin-bottom: 28px; }
.v2-config-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-config-actions .v2-btn--orange { min-width: 160px; }
@media (max-width: 900px) {
  /* Sur téléphone : seulement l'étape en cours et la progression */
  .v2-config-titre, .v2-config .v2-auth-texte { display: none; }
  .v2-config-etapes { margin-top: 0; }
  .v2-config-etapes li:not(.actif) { display: none; }
  .v2-config .v2-surtitre { margin-bottom: 8px; }
  .v2-auth:has(.v2-config) { grid-template-rows: auto 1fr; }
  .v2-auth-panneau:has(.v2-config) { gap: 20px; }
  .v2-config-progression p { display: none; }
}
.v2-grille-champs--cp { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 440px) { .v2-grille-champs--cp { grid-template-columns: minmax(0, 1fr); } }

/* Étiquettes (ex. codes risque de la configuration du groupe) */
.v2-etiquettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.v2-etiquettes:empty { display: none; }
.v2-etiquettes li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 980px; background: var(--v2-fond); font: 500 14px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--v2-noir); }
.v2-etiquettes .v2-retirer { width: 24px; height: 24px; font-size: 14px; background: var(--v2-blanc); }
.v2-champ-aide[hidden] { display: none; }

/* Configuration du groupe, étape 6 : récapitulatif */
.v2-config-recap { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.v2-config-recap section { padding: 16px 18px; border-radius: 18px; background: var(--v2-fond); }
.v2-config-recap header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.v2-config-recap h3 { margin: 0; font-size: 15px; font-weight: 600; }
.v2-config-recap dl { margin: 0; }
.v2-config-recap dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 14px; }
.v2-config-recap dt { flex-shrink: 0; color: var(--v2-gris); }
.v2-config-recap dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; color: var(--v2-noir); }
.v2-config-recap-logo { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--v2-gris); }
.v2-config-recap-logo img { max-width: 96px; max-height: 44px; border-radius: 8px; background: var(--v2-blanc); object-fit: contain; }
.v2-config-actions .v2-btn { white-space: nowrap; }

/* Arbre des causes : fenêtre « Méthodologie et définitions » (bouton « ? ») */
.v2-arbre-contenu .v2-arbre-fenetre-fond {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: v2Fondu .25s ease both;
}
.v2-arbre-contenu .v2-arbre-fenetre {
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 26px 28px 28px;
  border-radius: 28px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45);
  animation: v2Monte .5s var(--v2-ressort) both;
}
.v2-arbre-contenu .v2-arbre-aide:hover { box-shadow: inset 0 0 0 1px var(--v2-noir); }
@keyframes v2Fondu { from { opacity: 0; } to { opacity: 1; } }
/* Arbre des causes : fenêtre des actions correctives d'une cause */
.v2-arbre-contenu .v2-arbre-fenetre.v2-arbre-actions { display: flex; flex-direction: column; width: min(980px, 100%); padding: 0; overflow: hidden; }
.v2-arbre-contenu .v2-arbre-actions-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 18px; }
.v2-arbre-contenu .v2-arbre-actions-surtitre { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--v2-orange); }
.v2-arbre-contenu .v2-arbre-actions-tete h3 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.v2-arbre-contenu .v2-arbre-fermer { width: 34px; height: 34px; flex-shrink: 0; border: 0; border-radius: 50%; background: #f5f5f7; color: var(--v2-gris); font-size: 20px; line-height: 1; cursor: pointer; }
.v2-arbre-contenu .v2-arbre-fermer:hover { color: var(--v2-noir); }
.v2-arbre-contenu .v2-arbre-actions-corps { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 20px; padding: 4px 28px 24px; }
.v2-arbre-contenu .v2-arbre-criteres { position: sticky; top: 0; padding: 16px 18px; border-radius: 18px; background: #f5f5f7; font-size: 13px; line-height: 1.5; }
.v2-arbre-contenu .v2-arbre-criteres summary { font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.v2-arbre-contenu .v2-arbre-criteres summary::-webkit-details-marker { display: none; }
.v2-arbre-contenu .v2-arbre-criteres summary::after { content: "+"; float: right; color: var(--v2-gris); }
.v2-arbre-contenu .v2-arbre-criteres[open] summary::after { content: "–"; }
.v2-arbre-contenu .v2-arbre-criteres p { margin: 10px 0 8px; color: var(--v2-gris); }
.v2-arbre-contenu .v2-arbre-criteres ol { margin: 0; padding-left: 18px; }
.v2-arbre-contenu .v2-arbre-criteres li { padding: 3px 0; }
.v2-arbre-contenu .v2-arbre-criteres li::marker { color: var(--v2-gris-clair); font-weight: 600; }
.v2-arbre-contenu .v2-arbre-actions-liste { display: flex; flex-direction: column; gap: 12px; }
.v2-arbre-contenu .v2-arbre-action { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; border-radius: 20px; background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-trait); }
.v2-arbre-contenu .v2-arbre-action-haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-arbre-contenu .v2-arbre-action-num { font-size: 13px; font-weight: 600; color: var(--v2-gris); }
.v2-arbre-contenu .v2-arbre-action-retirer { padding: 4px 10px; border: 0; border-radius: 980px; background: none; font: 500 13px var(--v2-police); color: var(--v2-erreur); cursor: pointer; }
.v2-arbre-contenu .v2-arbre-action-retirer:hover { background: #fff4ed; }
.v2-arbre-contenu .v2-arbre-action-grille { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.v2-arbre-contenu .v2-arbre-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v2-arbre-contenu .v2-arbre-champ > span { font-size: 13px; color: var(--v2-gris); }
.v2-arbre-contenu .v2-arbre-champ textarea, .v2-arbre-contenu .v2-arbre-champ input {
  width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid var(--v2-bordure); border-radius: 12px;
  font: 15px/1.45 var(--v2-police); resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.v2-arbre-contenu .v2-arbre-champ textarea { min-height: 44px; }
.v2-arbre-contenu .v2-arbre-champ textarea[rows="3"] { min-height: 90px; }
.v2-arbre-contenu .v2-arbre-champ textarea:focus, .v2-arbre-contenu .v2-arbre-champ input:focus { outline: none; border-color: var(--v2-noir); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
.v2-arbre-contenu .v2-arbre-action-ajouter { align-self: flex-start; height: 40px; padding: 0 18px; border: 0; border-radius: 980px; background: #f5f5f7; font: 500 14px var(--v2-police); color: var(--v2-noir); cursor: pointer; transition: box-shadow .2s; }
.v2-arbre-contenu .v2-arbre-action-ajouter:hover { box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-arbre-contenu .v2-arbre-actions-pied { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px; border-top: 1px solid var(--v2-trait); }
.v2-arbre-contenu .v2-arbre-btn { height: 44px; padding: 0 24px; border: 0; border-radius: 980px; font: 500 15px var(--v2-police); cursor: pointer; transition: box-shadow .2s, transform .2s; }
.v2-arbre-contenu .v2-arbre-btn--contour { background: var(--v2-blanc); color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-arbre-contenu .v2-arbre-btn--contour:hover { box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-arbre-contenu .v2-arbre-btn--orange { background: var(--v2-orange); color: #fff; }
.v2-arbre-contenu .v2-arbre-btn--orange:hover { box-shadow: 0 0 16px rgba(249, 115, 22, .45); }
/* Arbre des causes : pièces jointes et commentaire d'un fait (même habillage que les actions) */
.v2-arbre-contenu .v2-arbre-fenetre.v2-arbre-pj { width: min(640px, 100%); }
.v2-arbre-contenu .v2-arbre-pj-corps { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; padding: 4px 28px 24px; }
.v2-arbre-contenu .v2-arbre-pj-fichiers { display: flex; flex-direction: column; gap: 10px; }
.v2-arbre-contenu .v2-arbre-pj-fichiers-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.v2-arbre-contenu .v2-arbre-pj-fichiers-tete > span { font-size: 13px; color: var(--v2-gris); }
.v2-arbre-contenu .v2-arbre-pj-vide {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 26px 16px;
  border: 1.5px dashed var(--v2-bordure); border-radius: 18px; background: none; font-family: var(--v2-police); color: inherit; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.v2-arbre-contenu .v2-arbre-pj-vide:hover { border-color: var(--v2-noir); background: #fafafa; }
.v2-arbre-contenu .v2-arbre-pj-vide strong { font-size: 15px; font-weight: 500; }
.v2-arbre-contenu .v2-arbre-pj-vide span { font-size: 13px; color: var(--v2-gris-clair); }
.v2-arbre-contenu .v2-arbre-pj-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.v2-arbre-contenu .v2-arbre-pj-fichier { overflow: hidden; border-radius: 16px; background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-trait); }
.v2-arbre-contenu .v2-arbre-pj-apercu { display: flex; align-items: center; justify-content: center; width: 100%; height: 100px; border: 0; background: #f5f5f7; cursor: zoom-in; }
.v2-arbre-contenu .v2-arbre-pj-apercu img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-arbre-contenu .v2-arbre-pj-apercu--doc { cursor: pointer; }
.v2-arbre-contenu .v2-arbre-pj-apercu--doc span { padding: 4px 10px; border-radius: 8px; background: var(--v2-blanc); font: 700 12px var(--v2-police); color: var(--v2-erreur); }
.v2-arbre-contenu .v2-arbre-pj-nom { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; }
.v2-arbre-contenu .v2-arbre-pj-nom span { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.v2-arbre-contenu .v2-arbre-pj-nom button { width: 26px; height: 26px; flex-shrink: 0; border: 0; border-radius: 50%; background: none; font-size: 17px; line-height: 1; color: var(--v2-gris); cursor: pointer; }
.v2-arbre-contenu .v2-arbre-pj-nom button:hover { background: #fff4ed; color: var(--v2-erreur); }
.v2-arbre-contenu .v2-arbre-pj.est-sombre .v2-arbre-pj-fichier { background: #262626; box-shadow: inset 0 0 0 1px #424242; }
.v2-arbre-contenu .v2-arbre-pj.est-sombre .v2-arbre-pj-apercu { background: #3a3a3a; }
.v2-arbre-contenu .v2-arbre-pj.est-sombre .v2-arbre-pj-apercu--doc span { background: #262626; }
.v2-arbre-contenu .v2-arbre-pj.est-sombre .v2-arbre-pj-vide { border-color: #5f5f5f; }
.v2-arbre-contenu .v2-arbre-pj.est-sombre .v2-arbre-pj-vide:hover { border-color: #ececec; background: #262626; }
.v2-arbre-contenu .v2-arbre-pj.est-sombre .v2-arbre-pj-fichiers-tete > span { color: #b4b4b4; }
/* Mode sombre de l'arbre */
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-fermer,
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-criteres,
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-action-ajouter { background: #3a3a3a; color: #ececec; }
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-action { background: #262626; box-shadow: inset 0 0 0 1px #424242; }
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-champ textarea, .v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-champ input { border-color: #4a4a4a; }
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-champ textarea:focus, .v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-champ input:focus { border-color: #ececec; }
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-actions-pied { border-color: #424242; }
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-btn--contour { background: transparent; color: #ececec; box-shadow: inset 0 0 0 1px #5f5f5f; }
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-criteres p,
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-champ > span,
.v2-arbre-contenu .v2-arbre-actions.est-sombre .v2-arbre-action-num { color: #b4b4b4; }
@media (max-width: 820px) {
  .v2-arbre-contenu .v2-arbre-actions-corps { grid-template-columns: minmax(0, 1fr); }
  .v2-arbre-contenu .v2-arbre-criteres { position: static; }
  .v2-arbre-contenu .v2-arbre-action-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .v2-arbre-contenu .v2-arbre-action-grille > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .v2-arbre-contenu .v2-arbre-fenetre-fond { padding: 12px; }
  .v2-arbre-contenu .v2-arbre-fenetre.v2-arbre-actions { border-radius: 24px; }
  .v2-arbre-contenu .v2-arbre-actions-tete { padding: 20px 20px 14px; }
  .v2-arbre-contenu .v2-arbre-actions-tete h3 { font-size: 20px; }
  .v2-arbre-contenu .v2-arbre-actions-corps { padding: 4px 16px 20px; gap: 14px; }
  .v2-arbre-contenu .v2-arbre-pj-corps { padding: 4px 16px 20px; }
  .v2-arbre-contenu .v2-arbre-pj-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-arbre-contenu .v2-arbre-action { padding: 14px; }
  .v2-arbre-contenu .v2-arbre-action-grille { grid-template-columns: minmax(0, 1fr); }
  .v2-arbre-contenu .v2-arbre-actions-pied { padding: 12px 16px; }
  .v2-arbre-contenu .v2-arbre-btn { flex: 1; }
}

@media (max-width: 720px) {
  .v2-arbre .v2-arbre-aide-libelle, .v2-arbre .v2-arbre-methode-libelle { display: none; }
  .v2-arbre .v2-arbre-aide { padding: 0 8px !important; }
  .v2-arbre .v2-arbre-methode { padding: 0 11px !important; }
}

/* ══ Remontées du terrain ═════════════════════════════════════════════ */
.v2-type--situation_risque { background: #fef9c3; color: #854d0e; }
.v2-type--presque_accident { background: #fff4ed; color: var(--v2-erreur); }
.v2-type--accident { background: var(--v2-fond); color: var(--v2-noir); }
.v2-nouveau { padding: 3px 10px; border-radius: 980px; background: var(--v2-orange); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.v2-ligne-auteur { margin: 4px 0 0; font-size: 13px; color: var(--v2-gris-clair); }
.v2-vide-court { margin: 0; font-size: 15px; color: var(--v2-gris-clair); }
.v2-remontee-texte { margin: 0; font-size: 16px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }

/* Accueil du responsable : trois grandes cartes de choix */
.v2-remontee-tete h1 { max-width: 880px; }
.v2-choix-evenement { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 72px; }
.v2-carte-evenement {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 30px 30px 28px;
  border-radius: 28px;
  background: var(--v2-fond);
  transition: transform .5s var(--v2-ressort), box-shadow .3s, background-color .3s;
}
.v2-carte-evenement:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .25); }
.v2-carte-evenement:focus-within { box-shadow: 0 0 0 2px var(--v2-noir); }
.v2-carte-evenement--accident { background: var(--v2-noir); color: #fff; }
.v2-carte-evenement--accident .v2-num, .v2-carte-evenement--accident p { color: rgba(255, 255, 255, .7); }
.v2 .v2-carte-evenement--accident .v2-lien-etendu, .v2 .v2-carte-evenement--accident .v2-lien-etendu:hover { color: #fff; }
.v2-carte-evenement-haut { display: flex; align-items: center; justify-content: space-between; }
.v2-carte-evenement h2 { margin: 56px 0 8px; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.v2-carte-evenement p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--v2-gris); }
.v2-carte-evenement-action { margin-top: auto; padding-top: 28px; font-size: 15px; font-weight: 500; color: var(--v2-orange-fonce); }
.v2-carte-evenement--accident .v2-carte-evenement-action { color: var(--v2-orange); }

/* Bulle d'aide « ? » : au survol, au clavier ou au toucher (au-dessus du lien de la carte) */
.v2-aide { position: relative; z-index: 2; }
.v2-aide-bouton {
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--v2-blanc); color: var(--v2-noir);
  font: 600 14px var(--v2-police); cursor: help;
  box-shadow: inset 0 0 0 1px var(--v2-bordure);
  transition: box-shadow .2s, background-color .2s;
}
.v2-aide-bouton:hover, .v2-aide.est-ouverte .v2-aide-bouton { box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-carte-evenement--accident .v2-aide-bouton { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.v2-aide-bulle {
  position: absolute; top: calc(100% + 10px); right: -6px;
  width: min(330px, 78vw); padding: 14px 16px; border-radius: 14px;
  background: var(--v2-noir); color: #fff;
  font-size: 13px; line-height: 1.45; font-weight: 400;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .2s, transform .3s var(--v2-ressort), visibility .2s;
  pointer-events: none;
}
.v2-aide-bulle::before { content: ""; position: absolute; top: -5px; right: 16px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.v2-carte-evenement--accident .v2-aide-bulle { background: #fff; color: var(--v2-noir); }
.v2-aide:hover .v2-aide-bulle, .v2-aide:focus-within .v2-aide-bulle, .v2-aide.est-ouverte .v2-aide-bulle { opacity: 1; visibility: visible; transform: none; }

/* Formulaire court : plusieurs photos et fichiers */
.v2-multi-liste { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.v2-multi-liste:empty { display: none; }
.v2-multi-liste li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-multi-vignette { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; overflow: hidden; border-radius: 10px; background: var(--v2-fond); font-size: 11px; font-weight: 700; color: var(--v2-erreur); }
.v2-multi-vignette img { width: 100%; height: 100%; object-fit: cover; }
.v2-multi-infos { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.v2-multi-infos strong { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.v2-multi-infos span { font-size: 12px; color: var(--v2-gris); }

/* Fiche d'une remontée */
.v2-remontee-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.v2-remontee-photos a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: var(--v2-fond); }
.v2-remontee-photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--v2-ressort); }
.v2-remontee-photos a:hover img { transform: scale(1.04); }

@media (max-width: 900px) {
  .v2-choix-evenement { grid-template-columns: minmax(0, 1fr); }
  .v2-carte-evenement { min-height: 0; padding: 24px; }
  .v2-carte-evenement h2 { margin-top: 24px; font-size: 26px; }
}

/* Remontée sur téléphone : on la fait souvent sur le terrain, d'une main.
   Moins de cadres imbriqués pour laisser la largeur aux champs, date et heure
   côte à côte, cibles tactiles d'au moins 44 px, bouton d'envoi sur une ligne. */
@media (max-width: 720px) {
  .v2-remontee-tete h1 { font-size: 32px; line-height: 1.1; letter-spacing: -.035em; }
  .v2-remontee-tete p { font-size: 17px; }
  .v2-choix-evenement { gap: 10px; margin-bottom: 40px; }
  .v2-carte-evenement { padding: 20px 20px 18px; border-radius: 22px; }
  .v2-carte-evenement:hover { transform: none; box-shadow: none; }
  .v2-carte-evenement h2 { margin: 14px 0 6px; font-size: 24px; }
  .v2-carte-evenement p { font-size: 15px; }
  .v2-carte-evenement-action { padding-top: 16px; }
  .v2-aide-bouton { width: 36px; height: 36px; font-size: 15px; }
  .v2-aide-bulle { width: min(330px, calc(100vw - 72px)); font-size: 14px; }

  .v2-remontee-champs.v2-bloc { padding: 8px; }
  .v2-remontee-champs .v2-section { padding: 20px 18px; gap: 16px; border-radius: 18px; }
  .v2-remontee-champs .v2-section-tete h2 { font-size: 19px; }
  .v2-remontee-champs .v2-section-tete p { margin-top: 4px; font-size: 14px; }
  /* La date a besoin de plus de place que l'heure */
  .v2-remontee-champs .v2-grille-champs { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px 10px; }
  .v2-remontee-champs .v2-grille-champs > .v2-champ { grid-column: 1 / -1; }
  .v2-remontee-champs .v2-champ:has(> #id_date_evenement),
  .v2-remontee-champs .v2-champ:has(> #id_heure_evenement) { grid-column: auto; }
  /* Sélecteurs natifs de date et d'heure (iOS) : même hauteur, texte à gauche */
  .v2-remontee-champs input[type="date"], .v2-remontee-champs input[type="time"] {
    -webkit-appearance: none; appearance: none; min-width: 0; padding: 0 10px 0 12px; text-align: left;
  }
  .v2-remontee-champs input::-webkit-date-and-time-value { text-align: left; }
  .v2-remontee-champs .v2-champ textarea { min-height: 140px; }
  .v2-remontee-champs .v2-fichier label.v2-btn { width: 100%; height: 48px; font-size: 15px; }
  .v2-remontee-champs .v2-retirer { width: 36px; height: 36px; font-size: 18px; }

  .v2-remontee-form .v2-barre-enregistrer .v2-btn { white-space: nowrap; }
  .v2-remontee-form .v2-barre-enregistrer .v2-btn--contour { flex: 0 0 auto; padding: 0 20px; }
}
@media (max-width: 380px) {
  .v2-remontee-form .v2-barre-enregistrer { gap: 6px; padding: 6px; }
  .v2-remontee-form .v2-barre-enregistrer .v2-btn { padding: 0 16px; font-size: 15px; }
}

/* ══ Réserves motivées ════════════════════════════════════════════════ */
.v2-reserves-chargement { margin: 0; padding: 96px 0; text-align: center; font-size: 15px; color: var(--v2-gris); }

/* Onglet « Réserves » du dossier : délai, statut, accès au module */
.v2-dossier .v2-reserves-resume {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px 32px; align-items: center;
  padding: 28px; border-radius: 24px; background: var(--v2-fond);
}
.v2-dossier .v2-reserves-delai { display: flex; flex-direction: column; gap: 4px; padding-left: 16px; border-left: 3px solid var(--v2-bordure); }
.v2-dossier .v2-reserves-delai b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.v2-dossier .v2-reserves-delai span, .v2-dossier .v2-reserves-etat { font-size: 14px; color: var(--v2-gris); }
.v2-dossier .v2-reserves-delai.est-urgent { border-left-color: var(--v2-orange); }
.v2-dossier .v2-reserves-delai.est-urgent b { color: var(--v2-erreur); }
.v2-dossier .v2-reserves-delai.est-expire { border-left-color: var(--v2-erreur); }
.v2-dossier .v2-reserves-delai.est-expire b { color: var(--v2-erreur); }
.v2-dossier .v2-reserves-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.v2-dossier .v2-reserves-statut { padding: 4px 12px; border-radius: 980px; background: var(--v2-blanc); color: var(--v2-noir); font-size: 13px; font-weight: 600; }
.v2-dossier .v2-reserves-statut--genere { background: #fff4ed; color: var(--v2-erreur); }
.v2-dossier .v2-reserves-statut--envoye { background: #e7f6ec; color: #1a7f37; }
.v2-dossier .v2-reserves-delai.est-envoye { border-left-color: #1a7f37; }
/* Les styles d'origine du dossier annulent le rembourrage des liens des onglets */
.v2-dossier .v2-reserves-resume .v2-btn { padding: 0 20px; white-space: nowrap; }
@media (max-width: 900px) { .v2-dossier .v2-reserves-resume { grid-template-columns: 1fr; } }

/* Accueil : réserves encore possibles */
.v2-accueil-reserves { margin-top: 12px; }
.v2-delai-reserves {
  display: inline-block; padding: 4px 12px; border-radius: 980px; white-space: nowrap;
  background: var(--v2-blanc); color: var(--v2-noir); font-size: 13px; font-weight: 600;
}
.v2-delai-reserves.est-urgent { background: #fff4ed; color: var(--v2-erreur); }

/* ══ Module « Réserves motivées » (js/reserves/reserves-module.jsx) ═══
   Le composant utilise les composants v2 des étapes de la pré-déclaration
   (en-tête de page, stepper, sections, choix, barre flottante) ; ne sont
   définis ici que ses éléments propres, préfixés v2-rm-. */
.v2-rm-tete { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px 56px; align-items: end; }
.v2 .v2-rm-retour { padding: 0; border: 0; background: none; font: inherit; font-size: 15px; cursor: pointer; }
.v2-titre-page .v2-rm-ref { margin-top: 10px; font-size: 14px; color: var(--v2-gris-clair); }

.v2-rm-delai { display: flex; flex-direction: column; gap: 4px; padding: 24px; border-radius: 24px; background: var(--v2-fond); }
.v2-titre-page .v2-rm-delai p { margin: 0; max-width: none; font-size: 14px; }
.v2-titre-page .v2-rm-delai .v2-rm-delai-titre { font-size: 13px; font-weight: 600; color: var(--v2-gris); }
.v2-rm-delai-valeur { font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.v2-rm-delai.est-urgent .v2-rm-delai-valeur { color: var(--v2-orange); }
.v2-rm-delai.est-expire .v2-rm-delai-valeur { color: var(--v2-erreur); }
.v2-rm-delai > span { font-size: 14px; color: var(--v2-gris); }
.v2 .v2-rm-lien {
  align-self: flex-start; margin-top: 2px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 13px var(--v2-police); color: var(--v2-gris); text-align: left; text-decoration: underline; text-underline-offset: 3px;
}
.v2 .v2-rm-lien:hover { color: var(--v2-noir); }
.v2-titre-page .v2-rm-delai .v2-rm-delai-pied {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--v2-bordure); font-size: 13px;
}
.v2-rm-delai-pied .est-erreur { color: var(--v2-erreur); }
.v2-rm-dat { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.v2-rm-dat .v2-champ input { height: 44px; font-size: 15px; }
.v2-rm-dat-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Stepper : les étapes sont des boutons (navigation dans le composant) */
.v2 .v2-rm-etapes button.v2-etape-lien { width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--v2-gris); cursor: pointer; }
.v2 .v2-rm-etapes button.v2-etape-lien:not(:disabled):hover { color: var(--v2-noir); }
.v2 .v2-rm-etapes button.v2-etape-lien:not(:disabled):hover .v2-etape-num { background: var(--v2-orange); color: #fff; }
.v2 .v2-rm-etapes button.v2-etape-lien:disabled { cursor: not-allowed; opacity: .5; }

.v2-rm-alerte { margin: 0 0 16px; padding: 14px 18px; border-radius: 16px; background: #fdecec; color: #b42318; font-size: 15px; font-weight: 500; line-height: 1.5; }
.v2-rm-aide { margin: 0 0 20px; max-width: 760px; font-size: 15px; line-height: 1.55; color: var(--v2-gris); }
.v2-rm-aide strong { color: var(--v2-noir); font-weight: 600; }

/* Une carte par question : la question à gauche, la réponse à droite */
.v2-rm-question { transition: box-shadow .2s; }
.v2-rm-question.est-oui { box-shadow: inset 0 0 0 2px var(--v2-orange); }
.v2-rm-question .v2-section-tete h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.015em; }
.v2-section-tete .v2-rm-source {
  display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding: 10px 12px;
  border-radius: 12px; background: var(--v2-fond); font-size: 14px; color: var(--v2-noir);
}
.v2-rm-source span { font-size: 12px; font-weight: 600; color: var(--v2-gris); }
.v2-rm-cadre { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #fff4ed; }
.v2-rm-cadre b { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--v2-erreur); }
.v2-section-tete .v2-rm-cadre p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--v2-texte); }
.v2-rm-reponse { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Mini-formulaire d'un motif */
.v2-rm-motif { display: flex; flex-direction: column; gap: 18px; padding-top: 22px; border-top: 1px solid var(--v2-trait); }
.v2-rm-motif-titre { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; font-size: 15px; font-weight: 600; }
.v2-rm-motif-titre > span { font-size: 13px; font-weight: 400; color: var(--v2-gris); }
.v2-rm-groupe { min-width: 0; margin: 0; padding: 0; border: 0; }
.v2-rm-groupe legend { margin-bottom: 6px; padding: 0; font-size: 13px; color: var(--v2-gris); }
.v2-rm-choix span { height: 44px; font-size: 15px; }
.v2-rm-choix.v2-choix--grille span { height: auto; min-height: 44px; font-size: 14px; }

/* Pièces jointes */
.v2-rm-pieces { display: flex; flex-direction: column; gap: 8px; }
.v2-rm-depot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 16px;
  border: 1px dashed var(--v2-bordure); border-radius: 16px; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.v2-rm-depot:hover, .v2-rm-depot.est-survol { border-color: var(--v2-orange); background: #fff4ed; }
.v2-rm-depot:focus-visible { outline: 2px solid var(--v2-orange); outline-offset: 2px; }
.v2-rm-depot .v2-champ-aide { margin: 0; }
.v2-rm-extension { font-size: 11px; font-weight: 700; }

/* Synthèse */
.v2-rm-encart { margin: 0; padding: 14px 16px; border-radius: 14px; background: #fff4ed; font-size: 15px; line-height: 1.5; }
.v2-rm-encart strong { color: var(--v2-erreur); font-weight: 600; }
.v2-rm-encart.est-ok { background: #e7f6ec; }
.v2-rm-encart.est-ok strong { color: #1a7f37; }
.v2-rm-motifs-titre { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--v2-gris); }
.v2-rm-motifs ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v2-rm-motifs li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--v2-fond); font-size: 15px; }
.v2-rm-statut { flex: none; padding: 4px 12px; border-radius: 980px; background: var(--v2-blanc); font-size: 12px; font-weight: 600; white-space: nowrap; cursor: help; }
.v2-rm-statut--complet, .v2-rm-statut.est-ok { background: #e7f6ec; color: #1a7f37; }
.v2-rm-statut--incomplet, .v2-rm-statut.est-attention { background: #fff4ed; color: var(--v2-erreur); }
.v2-rm-statut--vide, .v2-rm-statut.est-critique { background: #fdecec; color: #b42318; }
.v2-rm-point { padding: 14px 16px; border-radius: 14px; background: #fff4ed; }
.v2-rm-point b { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; color: var(--v2-erreur); }
.v2-rm-point p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--v2-texte); }
.v2-rm-point.est-critique { background: #fdecec; }
.v2-rm-point.est-critique b { color: #b42318; }
.v2-rm-texte { margin: 0; font-size: 15px; line-height: 1.55; color: var(--v2-texte); }

/* Réserves déjà rédigées */
.v2-rm-historique { margin-top: 48px; }
.v2 .v2-rm-ligne { grid-template-columns: minmax(0, 1fr) auto; }

@media (max-width: 900px) {
  .v2-rm-tete { grid-template-columns: 1fr; align-items: start; }
}

/* ══ Qualification d'une remontée (ou d'un accident remonté) ══════════
   Le type déclaré est validé ou reclassé ; tant que ce n'est pas fait,
   l'événement reste dans « Dernières remontées » de l'accueil. */
.v2-qualif { margin-bottom: 24px; }
.v2-qualif.est-attente { box-shadow: inset 0 0 0 2px var(--v2-orange); }
details.v2-qualif { padding: 18px 24px; }
details.v2-qualif > summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  font-size: 15px; color: var(--v2-gris); cursor: pointer; list-style: none;
}
details.v2-qualif > summary::-webkit-details-marker { display: none; }
details.v2-qualif > summary b { color: var(--v2-noir); font-weight: 600; }
.v2-qualif-lien { font-size: 14px; color: var(--v2-noir); text-decoration: underline; text-underline-offset: 3px; }
details.v2-qualif[open] > summary { margin-bottom: 20px; }
details.v2-qualif[open] .v2-qualif-lien { display: none; }
.v2-qualif-choix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v2-qualif-option { position: relative; cursor: pointer; }
.v2-qualif-option input { position: absolute; opacity: 0; pointer-events: none; }
.v2-qualif-option > span {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px;
  border-radius: 18px; background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-bordure);
  transition: box-shadow .2s, background-color .2s;
}
.v2-qualif-option b { font-size: 17px; font-weight: 600; }
.v2-qualif-option em { margin-left: 6px; padding: 2px 8px; border-radius: 980px; background: var(--v2-fond); font-size: 11px; font-weight: 600; font-style: normal; color: var(--v2-gris); vertical-align: 2px; }
.v2-qualif-option small { font-size: 13px; line-height: 1.45; color: var(--v2-gris); }
.v2-qualif-option:hover > span { box-shadow: inset 0 0 0 1px var(--v2-noir); }
.v2-qualif-option input:checked + span { box-shadow: inset 0 0 0 2px var(--v2-orange); background: #fff4ed; }
.v2-qualif-option input:focus-visible + span { outline: 2px solid var(--v2-orange); outline-offset: 2px; }
.v2-qualif-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 24px; margin-top: 18px; }
.v2-qualif-note { flex: 1 1 320px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--v2-erreur); }
@media (max-width: 900px) { .v2-qualif-choix { grid-template-columns: 1fr; } }
/* Dossier d'une remontée : petit lien « Reclasser » dans l'en-tête, qui ouvre la fenêtre des choix */
.v2-reclasser { display: inline-flex; align-items: center; gap: 10px; }
.v2-surtitre .v2-reclasser { margin-left: 14px; }
.v2-reclasser em { font-size: 13px; font-weight: 600; font-style: normal; color: var(--v2-orange); }
.v2-reclasser-ligne { margin: 6px 0 14px; }
/* Menu « Reclasser » : pastille du type actuel, menu au style de celui du compte */
details.v2-reclasser-menu > summary {
  width: auto; height: 34px; gap: 8px; padding: 0 12px 0 14px; border-radius: 980px;
  background: var(--v2-fond); color: var(--v2-noir); font-size: 13px; font-weight: 500;
}
details.v2-reclasser-menu > summary:hover, details.v2-reclasser-menu[open] > summary { background: var(--v2-trait); }
details.v2-reclasser-menu > summary svg { width: 10px; height: 7px; fill: none; transition: transform .3s var(--v2-ressort); }
details.v2-reclasser-menu[open] > summary svg { transform: rotate(180deg); }
details.v2-reclasser-menu .v2-menu-liste { left: 0; right: auto; min-width: min(340px, calc(100vw - 32px)); }
/* Au-dessus des blocs qui suivent l'en-tête (l'apparition animée crée un empilement) */
.v2-reclasser-ligne { position: relative; z-index: 30; }
/* Menu ouvert : devant la barre d'onglets collante du dossier (z-index 40) */
.v2-reclasser-ligne:has(details[open]) { z-index: 45; }
.v2 .v2-reclasser-menu .v2-reclasser-titre { margin: 6px 12px 4px; font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--v2-gris-clair); }
.v2 .v2-reclasser-menu .v2-menu-liste button {
  display: grid; grid-template-columns: minmax(0, 1fr) 16px; column-gap: 12px; align-items: center;
}
.v2-reclasser-nom { font-size: 15px; font-weight: 500; }
.v2-reclasser-menu .v2-menu-liste small { grid-column: 1; margin-top: 2px; font-size: 12.5px; color: var(--v2-gris); }
.v2-reclasser-menu .v2-menu-liste button svg { grid-column: 2; grid-row: 1 / span 2; width: 16px; height: 16px; color: var(--v2-orange); }
.v2 .v2-reclasser-menu .v2-menu-liste button.est-actuel { cursor: default; }
.v2 .v2-reclasser-menu .v2-menu-liste button.est-actuel:hover { background: none; }
button.v2-qualif-lien { padding: 0; border: 0; background: none; font-family: var(--v2-police); cursor: pointer; }
button.v2-qualif-lien:hover { color: var(--v2-orange); }
.v2-fenetre--qualif { width: min(640px, calc(100vw - 32px)); text-align: left; }
.v2-fenetre--qualif .v2-qualif-choix { grid-template-columns: 1fr; }
/* Pièces déjà jointes, dans le formulaire prérempli */
.v2-multi-existants a { color: inherit; text-decoration: none; }
.v2-multi-existants a.v2-multi-infos:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.v2-multi-existants li.est-retire .v2-multi-vignette, .v2-multi-existants li.est-retire .v2-multi-infos { opacity: .4; }
.v2-multi-existants li.est-retire strong { text-decoration: line-through; }

/* ══ Dossier d'une remontée : onglets, analyse, plan d'action, rapport ══ */
.v2-remontee-onglets { margin-bottom: 24px; }
.v2-remontee-analyse { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; }
.v2-remontee-apercu { display: block; width: 100%; overflow: hidden; border-radius: 16px; background: var(--v2-fond); }
.v2-remontee-apercu img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.v2-remontee-chaine { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; }
.v2-remontee-chaine li { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--v2-fond); font-size: 15px; }
.v2-remontee-chaine li span { font-size: 12px; font-weight: 600; color: var(--v2-gris); }
.v2-remontee-situation { margin: 0; font-size: 15px; line-height: 1.5; }
.v2-remontee-situation b { display: block; font-size: 12px; font-weight: 600; color: var(--v2-orange-fonce); }
.v2-remontee-actions { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.v2-remontee-actions li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 18px; background: var(--v2-blanc); }
.v2-remontee-actions h3 { margin: 2px 0; font-size: 17px; font-weight: 600; }
.v2-remontee-fait, .v2-remontee-detail { margin: 0; font-size: 13px; color: var(--v2-gris); }
.v2-remontee-statut { flex: none; padding: 4px 12px; border-radius: 980px; background: var(--v2-fond); font-size: 12px; font-weight: 600; }
.v2-remontee-statut.est-clos { background: #e7f6ec; color: #1a7f37; }
.v2-remontee-statut.est-retard { background: #fff4ed; color: var(--v2-erreur); }

/* Ajout d'une action depuis un dossier (onglet Actions) */
.v2 .v2-ajout-action { margin-top: 20px; }
/* Préfixe .v2 : l'emporte sur la remise à zéro de dossier-base.css (chargée après) */
.v2 .v2-ajout-action [hidden] { display: none !important; }
.v2 .v2-ajout-action .v2-btn--sm { padding: 0 16px; }
.v2 .v2-ajout-action-form { padding: 24px; border-radius: 24px; background: var(--v2-fond); }
.v2 .v2-bloc .v2-ajout-action-form { background: var(--v2-blanc); }
.v2-ajout-action-form h3 { margin: 0 0 18px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.v2-ajout-action-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.v2 .v2-ajout-action-form .v2-champ-erreur { margin-top: 12px; }
.v2 .v2-ajout-action-boutons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
/* Onglet Actions d'un dossier (accident ou remontée) : bloc « Plan d'action » et tableau modifiable.
   Préfixes .v2-dossier / .v2 : l'emportent sur dossier-base.css, chargée après sur la page d'un accident
   (remise à zéro des marges, ancien style du tableau). La page d'une remontée ne la charge pas : le
   tableau est donc entièrement décrit ici, pour être identique sur les deux pages. */
.v2-dossier .v2-plan-dossier { padding: clamp(24px, 4vw, 48px); }
.v2-dossier .v2-plan-dossier .v2-bloc-tete { margin-bottom: 32px; }
.v2-dossier .v2-plan-dossier .v2-bloc-tete p { margin-top: 10px; }
.v2-dossier .v2-plan-dossier .v2-bloc-tete .v2-btn--sm { padding: 0 16px; }
.v2-dossier .v2-plan-dossier .v2-vide { padding: 56px 24px; }
.v2-dossier .v2-plan-dossier .empty-state-modern { background: var(--v2-blanc); }
.v2-dossier .v2-plan-dossier .empty-state-modern .feature-card { background: var(--v2-fond); }
.v2 .v2-plan-dossier .actions-table-container { margin: 0; padding: 0; border: 0; border-radius: 18px; background: none; overflow-x: auto; }
.v2 .v2-plan-dossier .actions-table { width: 100%; border-collapse: collapse; border-radius: 18px; overflow: hidden; background: var(--v2-blanc); }
.v2 .v2-plan-dossier .actions-table th { padding: 14px 16px; border-bottom: 1px solid var(--v2-trait); background: var(--v2-blanc); text-align: left; font: 500 13px var(--v2-police); color: var(--v2-gris); text-transform: none; letter-spacing: 0; }
.v2 .v2-plan-dossier .actions-table td { padding: 16px; border-bottom: 1px solid var(--v2-fond); font-size: 14px; color: var(--v2-noir); vertical-align: middle; }
.v2 .v2-plan-dossier .actions-table tbody tr:last-child td { border-bottom: 0; }
.v2 .v2-plan-dossier .actions-table tbody tr:hover { background: #fafafa; }
.v2 .v2-plan-dossier .actions-table .non-editable { color: var(--v2-gris); }
.v2 .v2-plan-dossier .actions-table .editable-cell { cursor: text; }
.v2 .v2-plan-dossier .actions-table .editable-cell:focus { outline: none; box-shadow: inset 0 -2px 0 var(--v2-orange); }
.v2 .v2-plan-dossier .actions-table .editable-cell:empty::before { content: "—"; color: var(--v2-bordure); }
.v2 .v2-plan-dossier .status-dropdown {
  width: 100%; height: 40px; padding: 0 40px 0 16px;
  border: 0; border-radius: 980px; box-shadow: none; transform: none;
  -webkit-appearance: none; appearance: none;
  background: var(--v2-fond) url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  font: 500 13px var(--v2-police); color: var(--v2-noir);
  cursor: pointer; transition: box-shadow .2s;
}
.v2 .v2-plan-dossier .status-dropdown:hover { box-shadow: inset 0 0 0 1px var(--v2-bordure); transform: none; }
.v2 .v2-plan-dossier .status-dropdown:focus { outline: none; box-shadow: 0 0 0 3px rgba(249, 115, 22, .25); transform: none; }
.v2 .v2-plan-dossier .status-dropdown[data-status="inprogress"] { background-color: #fffbeb; color: #92400e; }
.v2 .v2-plan-dossier .status-dropdown[data-status="done"] { background-color: #ecfdf5; color: #047857; }
.v2 .v2-plan-dossier .status-dropdown.status-late { border: 0; background-color: #fff4ed; color: var(--v2-erreur); font-weight: 600; }
/* Séparation entre les actions de l'analyse et celles ajoutées au dossier (même tableau) */
.v2 .v2-plan-dossier .actions-table tr.actions-separateur td { height: 36px; padding: 14px 16px 6px; border-top: 1px solid var(--v2-trait); border-bottom: 0; background: var(--v2-fond); font-size: 12px; font-weight: 500; color: var(--v2-gris); vertical-align: bottom; }
.v2 .v2-plan-dossier .actions-table tr.actions-separateur:hover { background: none; }
@media (max-width: 720px) {
  .v2 .v2-plan-dossier .actions-table { min-width: 720px; }
}
@media (max-width: 720px) {
  .v2-ajout-action-grille { grid-template-columns: 1fr; }
  .v2 .v2-ajout-action-form { padding: 20px 16px; }
}
.v2-remontee-rapport-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ══ Rapports santé-sécurité pour la direction ═════════════════════════ */
/* Liste : mensuels, annuels, ponctuels */
.v2-rapports-annee { margin: 32px 0 12px; font-size: 15px; font-weight: 600; color: var(--v2-gris); }
.v2-registre-compte + .v2-rapports-annee { margin-top: 0; }
.v2-date--periode b { font-size: 22px; font-weight: 400; }
/* Colonne d'état de largeur fixe : les chiffres restent alignés d'un mois à l'autre */
.v2-ligne--rapport-periode { grid-template-columns: 64px minmax(0, 1fr) auto 84px 36px; }
.v2-ligne--rapport-periode.est-en-cours { background: var(--v2-blanc); box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-ligne--rapport-periode.est-en-cours .v2-fleche, .v2-ligne--rapport-periode.est-en-cours .v2-type { background: var(--v2-fond); }
.v2-rapport-chiffres { padding-right: 0; }
.v2-rapport-chiffres b { font-size: 20px; }
.v2-ligne--rapport { grid-template-columns: 64px minmax(0, 1fr) auto auto; }
.v2-rapport-outils { position: relative; z-index: 2; display: flex; gap: 8px; }
.v2-rapports-filtres { display: contents; }

/* Rapport : barre d'outils, en-tête, sections */
.v2-rapport-barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 32px; }
.v2-rapport-barre .v2-retour { margin-bottom: 0; }
.v2-rapport-barre-droite, .v2-rapport-periodes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v2-rapport-tete { padding: 40px 0 16px; }
.v2-rapport-tete h1 { text-transform: none; }
.v2-rapport-provisoire { color: var(--v2-erreur); font-weight: 600; }
.v2-rapport-section { padding-top: 56px; break-inside: auto; }
.v2-rapport-section > h2 { margin: 0 0 20px; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.v2-rapport-intro { margin: -8px 0 20px; max-width: 720px; font-size: 15px; line-height: 1.5; color: var(--v2-gris); }
.v2-rapport-sous-titre { margin: 32px 0 12px; font-size: 17px; font-weight: 600; }
.v2-rapport-carte { background: var(--v2-fond); }
.v2-rapport-carte + .v2-rapport-carte { margin-top: 12px; }
.v2-rapport-tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 32px; }
.v2-rapport-tuiles .v2-tuile-val, .v2-rapport-indices .v2-tuile-val { font-size: clamp(36px, 3.4vw, 48px); }
.v2-rapport-indices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 40px; }
.v2-rapport-histo .v2-donnees { display: none; }

/* L'essentiel : une phrase par point, les alertes en orange */
.v2-rapport-points { margin: 0; padding: 8px 0 0; list-style: none; display: grid; gap: 14px; max-width: 820px; }
.v2-rapport-points li { position: relative; padding-left: 26px; font-size: 19px; line-height: 1.45; letter-spacing: -.01em; }
.v2-rapport-points li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--v2-gris-clair); }
.v2-rapport-points li.est-alerte::before { background: var(--v2-orange); }

/* Tableaux */
.v2-table tr.est-courant th, .v2-table tr.est-courant td { font-weight: 600; }
.v2-table tr.est-cumul th, .v2-table tr.est-cumul td { border-top: 2px solid var(--v2-bordure); }
.v2-table tfoot th, .v2-table tfoot td { border-top: 2px solid var(--v2-bordure); border-bottom: 0; font-weight: 600; }
.v2-table tbody th a { color: var(--v2-noir); }
.v2-rapport-actions td { vertical-align: top; }
.v2-rapport-actions td b { font-weight: 500; }
.v2-rapport-a-faire { color: var(--v2-erreur); font-weight: 500; }

/* Événements */
.v2-ligne--rapport-evenement { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 300px) 36px; align-items: start; }
.v2-rapport-note { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--v2-texte); overflow-wrap: anywhere; }
.v2-rapport-evenement-etat { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.v2-rapport-evenement-etat p { margin: 0; font-size: 13px; color: var(--v2-gris); }
.v2 .v2-rapport-lien-pdf { position: relative; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--v2-blanc); color: var(--v2-noir); }
.v2 .v2-rapport-lien-pdf:hover { background: var(--v2-noir); color: #fff; }
.v2-rapport-lien-pdf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Analyses des causes */
.v2-rapport-analyses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-rapport-analyses .v2-rapport-carte + .v2-rapport-carte { margin-top: 0; }
.v2-rapport-analyse-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; font-size: 13px; color: var(--v2-gris); }
.v2-rapport-analyse h3 { margin: 0 0 12px; font-size: 19px; }
.v2-rapport-analyse h3 a { color: var(--v2-noir); }
.v2-rapport-analyse-lbl { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--v2-gris); }
.v2-rapport-analyse ul, .v2-rapport-a-mener ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.5; }
.v2-rapport-a-mener { margin-top: 24px; padding: 20px 24px; border-radius: 20px; background: #fff4ed; }
.v2-rapport-a-mener h3 { margin: 0 0 8px; font-size: 16px; color: var(--v2-erreur); }
.v2-rapport-a-mener a { color: var(--v2-noir); font-weight: 500; }

.v2-rapport-pied { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--v2-bordure); font-size: 13px; line-height: 1.5; color: var(--v2-gris); }

@media (max-width: 1000px) {
  .v2-ligne--rapport-periode { grid-template-columns: 64px minmax(0, 1fr) 84px 36px; }
  .v2-ligne--rapport-periode .v2-rapport-chiffres { grid-column: 2 / -1; grid-row: 2; }
  .v2-ligne--rapport-periode .v2-accident-etat { grid-column: 3; grid-row: 1; }
  .v2-ligne--rapport-periode .v2-fleche { grid-column: 4; grid-row: 1; }
  .v2-rapport-tuiles, .v2-rapport-indices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .v2-ligne--rapport { grid-template-columns: 52px minmax(0, 1fr); }
  .v2-ligne--rapport .v2-type, .v2-ligne--rapport .v2-rapport-outils { grid-column: 2; justify-self: start; }
  .v2-ligne--rapport-periode { grid-template-columns: 52px minmax(0, 1fr) 36px; }
  .v2-ligne--rapport-periode .v2-accident-etat { grid-column: 2; grid-row: 3; justify-content: flex-start; }
  .v2-ligne--rapport-periode .v2-accident-etat:empty { display: none; }
  .v2-ligne--rapport-periode .v2-fleche { grid-column: 3; grid-row: 1; }
  .v2-rapport-chiffres { flex-wrap: wrap; gap: 12px 18px; }
  .v2-ligne--rapport-evenement { grid-template-columns: 52px minmax(0, 1fr) 36px; }
  .v2-ligne--rapport-evenement .v2-rapport-evenement-etat { grid-column: 2; grid-row: 2; align-items: flex-start; text-align: left; }
  .v2-ligne--rapport-evenement .v2-rapport-lien-pdf { grid-column: 3; grid-row: 1; }
  .v2-rapport-analyses { grid-template-columns: minmax(0, 1fr); }
  .v2-rapport-points li { font-size: 17px; }
  .v2-rapport-barre-droite { width: 100%; }
}

/* Impression / PDF : le rapport seul, sans navigation ni boutons */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  .v2-rapport-page { background: #fff; }
  .v2-rapport-page .v2-entete, .v2-rapport-page .v2-rapport-barre, .v2-rapport-page .v2-page-messages,
  .v2-rapport-page .v2-rapport-lien-pdf { display: none !important; }
  .v2-rapport-page .v2-page { max-width: none; padding: 0; }
  .v2-rapport-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .v2-rapport-page .v2-rapport-tete { padding: 0 0 8px; }
  .v2-rapport-page .v2-rapport-tete h1 { font-size: 40px; }
  .v2-rapport-page .v2-rapport-section { padding-top: 28px; }
  .v2-rapport-page .v2-rapport-section > h2 { font-size: 22px; break-after: avoid; }
  .v2-rapport-page .v2-rapport-points li { font-size: 14px; }
  .v2-rapport-page .v2-tuile-val { font-size: 30px !important; }
  .v2-rapport-page .v2-carte, .v2-rapport-page .v2-ligne { border: 1px solid #e5e5e5; padding: 12px 14px; background: #fff; }
  .v2-rapport-page .v2-ligne, .v2-rapport-page .v2-tuile, .v2-rapport-page tr, .v2-rapport-page .v2-rapport-analyse,
  .v2-rapport-page .v2-rapport-a-mener { break-inside: avoid; }
  .v2-rapport-page .v2-liste { gap: 6px; }
  .v2-rapport-page .v2-ligne--rapport-evenement { grid-template-columns: 52px minmax(0, 1fr) minmax(0, 240px); }
  .v2-rapport-page .v2-table { font-size: 12px; }
  .v2-rapport-page a { color: inherit; text-decoration: none; }
  .v2-rapport-page .v2-apparait { opacity: 1 !important; transform: none !important; }
}

/* ══ Pied de page des pages connectées ════════════════════════════════ */
.v2-pied { padding: 0 24px 40px; font-size: 12px; color: var(--v2-gris); }
.v2-pied-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; max-width: 1152px; margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--v2-bordure); }
.v2-pied nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.v2 .v2-pied a { color: var(--v2-texte); }
.v2 .v2-pied a:hover { color: var(--v2-orange); }
.v2 .v2-pied [data-guide-ouvrir] { font-weight: 500; color: var(--v2-noir); }
/* Espaces plein écran (arbre, 5 pourquoi, lésions) et rapport imprimé : pas de pied */
.v2-atelier .v2-pied, .v2-rapport-page .v2-pied { display: none; }
@media (max-width: 720px) {
  .v2-pied { padding: 0 16px 32px; }
}

/* ══ Guide d'utilisation (fenêtre à pages) ════════════════════════════ */
.v2-guide {
  width: min(780px, calc(100vw - 32px));
  padding: 0;
  text-align: left;
  overflow: hidden;
}
.v2-guide[open] { display: flex; flex-direction: column; }
.v2-guide-haut { display: flex; align-items: center; justify-content: space-between; padding: 24px 40px 0; }
.v2-guide-compteur { font-size: 13px; color: var(--v2-gris-clair); font-variant-numeric: tabular-nums; }
.v2-guide-compteur b { font-weight: 600; color: var(--v2-noir); }
.v2-guide-fermer { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: none; font: 500 14px var(--v2-police); color: var(--v2-gris); cursor: pointer; }
.v2-guide-fermer:hover { color: var(--v2-noir); }
.v2-guide-fermer svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* Toutes les pages occupent la même case : la fenêtre prend la hauteur de la plus longue et ne saute pas */
.v2-guide-pages { display: grid; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 40px 28px; }
.v2-guide-page { grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateX(12px); transition: opacity .35s, transform .5s var(--v2-ressort), visibility 0s .35s; }
.v2-guide-page.est-active { visibility: visible; opacity: 1; transform: none; transition: opacity .35s, transform .5s var(--v2-ressort), visibility 0s; }
.v2-guide-surtitre { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--v2-orange); }
.v2-guide h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.v2-guide-intro { margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: var(--v2-texte); }
.v2-guide-etapes { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: guide; display: flex; flex-direction: column; gap: 18px; }
.v2-guide-etapes li { position: relative; padding-left: 40px; counter-increment: guide; }
.v2-guide-etapes li::before {
  content: counter(guide);
  position: absolute; top: -1px; left: 0;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--v2-noir); color: #fff; font-size: 13px; font-weight: 600;
}
.v2-guide-etapes strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.5; }
.v2-guide-etapes p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--v2-gris); }
.v2-guide-note { margin: 22px 0 0; padding: 12px 16px; border-left: 3px solid var(--v2-orange); border-radius: 0 12px 12px 0; background: #fff8f3; font-size: 14px; line-height: 1.5; color: var(--v2-texte); }
/* Éléments d'interface reproduits en petit, pour les reconnaître à l'écran */
.v2-guide-ui { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 980px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; vertical-align: 1px; }
.v2-guide-ui--orange { background: var(--v2-orange); color: #fff; }
.v2-guide-ui--noir { background: var(--v2-noir); color: #fff; }
.v2-guide-ui--contour { background: var(--v2-blanc); color: var(--v2-noir); box-shadow: inset 0 0 0 1px var(--v2-bordure); }
.v2-guide-ui--retour { background: #fff4ed; color: var(--v2-erreur); }
.v2-guide-pied { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 40px 22px; border-top: 1px solid var(--v2-trait); }
.v2-guide-points { display: flex; gap: 6px; }
.v2-guide-points button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 980px; background: var(--v2-bordure); cursor: pointer; transition: width .4s var(--v2-ressort), background-color .2s; }
.v2-guide-points button:hover { background: var(--v2-gris-clair); }
.v2-guide-points button[aria-current] { width: 22px; background: var(--v2-orange); }
.v2-guide-boutons { display: flex; gap: 10px; }
.v2-guide-boutons [hidden] { display: none; }
@media (max-width: 720px) {
  .v2-guide-haut { padding: 16px 20px 0; }
  .v2-guide-pages { padding: 8px 20px 20px; }
  .v2-guide h2 { font-size: 22px; }
  .v2-guide-pied { padding: 12px 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-guide-page, .v2-guide-page.est-active { transform: none; transition: none; }
}

/* ══ Liste déroulante avec recherche (js/liste-recherche.js) ══════════ */
/* Le <select> d'origine reste dans le formulaire, masqué. Sélecteurs préfixés
   par .liste-recherche : ils passent devant les remises à zéro des pages (dossier) */
select[data-recherche-active] { display: none !important; }
.liste-recherche { position: relative; }
.liste-recherche .liste-recherche-saisie {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--v2-bordure);
  border-radius: 12px;
  background: var(--v2-blanc) 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='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--v2-noir);
  font: 17px var(--v2-police);
  text-overflow: ellipsis;
  transition: border-color .2s;
}
.liste-recherche .liste-recherche-saisie::placeholder { color: var(--v2-gris-clair); }
.liste-recherche .liste-recherche-saisie:focus { outline: none; border-color: var(--v2-noir); }
.liste-recherche .liste-recherche-saisie[aria-invalid="true"] { border-color: var(--v2-erreur); }
.liste-recherche.a-une-valeur .liste-recherche-saisie { background-image: none; }
.liste-recherche .liste-recherche-effacer {
  position: absolute; top: 0; right: 4px;
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 52px; padding: 0;
  border: 0; background: none; color: var(--v2-gris); cursor: pointer;
}
.liste-recherche.a-une-valeur .liste-recherche-effacer { display: flex; }
.liste-recherche .liste-recherche-effacer:hover { color: var(--v2-noir); }
.liste-recherche .liste-recherche-effacer svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.liste-recherche .liste-recherche-liste {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  max-height: min(340px, 50vh);
  margin: 0; padding: 6px;
  overflow-y: auto; overscroll-behavior: contain;
  list-style: none;
  border: 1px solid var(--v2-trait);
  border-radius: 14px;
  background: var(--v2-blanc);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}
.liste-recherche .liste-recherche-liste[hidden] { display: none; }
.liste-recherche .liste-recherche-choix {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px; line-height: 1.35; color: var(--v2-texte);
  cursor: pointer;
}
.liste-recherche .liste-recherche-choix:hover, .liste-recherche .liste-recherche-choix.est-active { background: var(--v2-fond); color: var(--v2-noir); }
.liste-recherche .liste-recherche-choix[aria-selected="true"] { color: var(--v2-noir); font-weight: 600; }
.liste-recherche .liste-recherche-choix mark { background: none; color: var(--v2-orange-fonce); font-weight: 600; }
.liste-recherche .liste-recherche-indice { grid-column: 1; font-size: 13px; color: var(--v2-gris-clair); }
.liste-recherche .liste-recherche-indice::before { content: "ex. "; }
.liste-recherche .liste-recherche-code { grid-column: 2; grid-row: 1; font-size: 13px; color: var(--v2-gris-clair); font-variant-numeric: tabular-nums; }
.liste-recherche .liste-recherche-vide { padding: 12px; font-size: 15px; color: var(--v2-gris); }
.liste-recherche .liste-recherche-statut { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Menu des listes de statut (js/menu-statut.js) : même habillage que la liste avec recherche */
.menu-statut {
  position: fixed; z-index: 1000;
  margin: 0; padding: 6px;
  list-style: none;
  border: 1px solid var(--v2-trait);
  border-radius: 14px;
  background: var(--v2-blanc);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  font-family: var(--v2-police);
  transform-origin: top center;
  animation: v2Menu .25s var(--v2-ressort) both;
}
.menu-statut.vers-le-haut { transform-origin: bottom center; }
.menu-statut-choix {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px; line-height: 1.35; color: var(--v2-texte);
  white-space: nowrap;
  cursor: pointer;
}
.menu-statut-choix.est-active { background: var(--v2-fond); color: var(--v2-noir); }
.menu-statut-choix[aria-selected="true"] { color: var(--v2-noir); font-weight: 600; }
.menu-statut-pastille { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--v2-gris-clair); }
.menu-statut-choix[data-statut="inprogress"] .menu-statut-pastille { background: var(--v2-orange); }
.menu-statut-choix[data-statut="done"] .menu-statut-pastille { background: #10b981; }
.menu-statut-libelle { flex: 1; }
.menu-statut-coche { flex: none; width: 16px; height: 16px; margin-left: 12px; fill: none; stroke: var(--v2-noir); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.menu-statut-choix[aria-selected="true"] .menu-statut-coche { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .menu-statut { animation: none; } }

/* Compteur de caractères (textes limités par la déclaration en ligne) */
.v2-compteur { margin: 0; font-size: 13px; color: var(--v2-gris-clair); text-align: right; font-variant-numeric: tabular-nums; }
.v2-compteur.est-proche { color: var(--v2-erreur); }

/* Import de CERFA par lots (registre) */
.v2-import { width: min(560px, calc(100vw - 32px)); }
.v2-import-zone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 20px; border: 2px dashed var(--v2-bordure); border-radius: 20px; background: var(--v2-fond); cursor: pointer; transition: border-color .2s, background .2s; }
.v2-import-zone strong { font-size: 16px; font-weight: 600; color: var(--v2-noir); }
.v2-import-zone span { font-size: 14px; color: var(--v2-gris); }
.v2-import-zone:hover, .v2-import-zone.est-survolee, .v2-import-zone:focus-within { border-color: var(--v2-orange); background: #fff7ed; }
.v2-import-zone[hidden], .v2-import-suivi[hidden] { display: none; }
.v2-import-suivi { text-align: left; }
.v2-import-avancement { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.v2-import-avancement span:last-child { color: var(--v2-gris); font-variant-numeric: tabular-nums; }
.v2-import-suivi progress { width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: var(--v2-trait); -webkit-appearance: none; appearance: none; }
.v2-import-suivi progress::-webkit-progress-bar { background: var(--v2-trait); }
.v2-import-suivi progress::-webkit-progress-value { background: var(--v2-orange); border-radius: 99px; transition: width .3s var(--v2-ressort); }
.v2-import-suivi progress::-moz-progress-bar { background: var(--v2-orange); border-radius: 99px; }
.v2-import-resultats { list-style: none; margin: 16px 0 0; padding: 0; max-height: min(46dvh, 360px); overflow-y: auto; border-top: 1px solid var(--v2-trait); }
.v2-import-resultats li { display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--v2-trait); font-size: 14px; }
.v2-import-resultats li::before { content: ""; grid-row: 1 / span 3; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--v2-bordure); }
.v2-import-resultats li.est-en-cours::before { background: var(--v2-orange); animation: v2-import-pulse 1s infinite alternate; }
.v2-import-resultats li.est-ok::before { background: #16a34a; }
.v2-import-resultats li.est-a-verifier::before { background: var(--v2-orange); }
.v2-import-resultats li.est-erreur::before { background: var(--v2-erreur); }
.v2-import-resultats strong { font-weight: 600; overflow-wrap: anywhere; }
.v2-import-resultats span { color: var(--v2-gris); }
.v2-import-resultats li.est-erreur span { color: var(--v2-erreur); }
.v2-import-resultats a { color: var(--v2-noir); text-decoration: underline; text-underline-offset: 2px; }
.v2-import-resultats small { margin-top: 2px; font-size: 13px; color: var(--v2-orange-fonce); }
.v2-import-suivi .v2-btn { width: 100%; margin-top: 18px; }
.v2-import-suivi .v2-btn[hidden] { display: none; }
@keyframes v2-import-pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .v2-import-resultats li.est-en-cours::before { animation: none; } }
