/* VAULT Retraite — feuille de style de l'application (design V-Labs, maquettes Figma « Vault Retraite » du 29/10/2026) */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --border: #E6E8EC; --border-strong: #CFD4DC;
  --text: #111827; --text-muted: #6B7280; --text-subtle: #9CA3AF; --navy: #1F2937; --navy-hover: #111827;
  --lime: #DCF25A; --lime-soft: #EEF8B5; --lime-text: #1F2937;
  --rouge: #DC2626; --rouge-bg: #FEE2E2; --orange: #C2410C; --orange-bg: #FFEDD5;
  --jaune: #A16207; --jaune-bg: #FEF9C3; --vert: #15803D; --vert-bg: #DCFCE7;
  --bleu: #2563EB; --bleu-bg: #DBEAFE; --bleu-soft: #EEF2FF; --gris: #4B5563; --gris-bg: #F3F4F6; --highlight-bg: #FFFBEB;
  /* v1.9 : couleur des liens cliquables — indigo adouci (contraste 5,8:1 sur blanc), le bleu vif reste réservé aux badges d'état */
  --lien: #4A5FA5; --lien-hover: #1F2937;
  --radius: 10px; --radius-sm: 7px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 13.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--lien); text-decoration-color: rgba(74, 95, 165, .45); text-underline-offset: 2px; }
a:hover { color: var(--lien-hover); text-decoration-color: currentColor; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

/* ─── Gabarit ─── */
.app { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 22px 14px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .marque { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 22px; font-size: 19px; letter-spacing: -0.02em; color: var(--text); }
.sidebar .marque a { color: inherit; text-decoration: none; }
.sidebar .marque b { font-weight: 800; }
.sidebar .marque .marque-court { display: none; }
.sidebar .marque .chevron { color: var(--text-subtle); font-size: 16px; background: none; border: 0; cursor: pointer; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.sidebar .marque .chevron:hover { background: var(--bg); color: var(--text); }
/* Barre latérale repliée (action A.1) : icônes seules, état mémorisé dans le navigateur */
@media (width > 900px) {
  html.sidebar-replie .app { grid-template-columns: 64px 1fr; }
  html.sidebar-replie .sidebar { padding: 22px 8px 18px; align-items: center; }
  html.sidebar-replie .sidebar .marque { flex-direction: column; gap: 10px; padding: 0 0 18px; }
  html.sidebar-replie .sidebar .marque .marque-texte { display: none; }
  html.sidebar-replie .sidebar .marque .marque-court { display: inline; }
  html.sidebar-replie .sidebar .marque .chevron { transform: rotate(180deg); }
  html.sidebar-replie .sidebar .section, html.sidebar-replie .sidebar .encart, html.sidebar-replie .sidebar .moi .moi-texte { display: none; }
  html.sidebar-replie .sidebar .moi .moi-lien { padding: 0; margin: 0; }
  /* barre repliée : l'étiquette sort à droite du bouton (elle serait coupée par le bord de l'écran au-dessus) */
  html.sidebar-replie .sidebar .moi .deconnexion .lib { right: auto; bottom: auto; left: calc(100% + 8px); top: 50%; transform: translate(-4px, -50%); z-index: 60; }
  html.sidebar-replie .sidebar .moi .deconnexion:hover .lib, html.sidebar-replie .sidebar .moi .deconnexion:focus-visible .lib { transform: translate(0, -50%); }
  html.sidebar-replie .sidebar nav { width: 100%; }
  html.sidebar-replie .sidebar nav a { justify-content: center; padding: 10px 0; }
  html.sidebar-replie .sidebar nav a > span:not(.compte) { display: none; }
  html.sidebar-replie .sidebar nav a .compte { position: absolute; margin: -22px 0 0 22px; font-size: 10px; padding: 0 5px; }
  html.sidebar-replie .sidebar nav a { position: relative; }
  html.sidebar-replie .sidebar .moi { flex-direction: column; gap: 8px; padding: 0; }
  html.sidebar-replie .sidebar .moi form { margin: 0; }
}
.sidebar .section { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); padding: 0 6px 10px; }
.sidebar nav { flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 2px; }
.sidebar nav a:hover { background: var(--bg); }
.sidebar nav a.active { background: var(--lime); color: var(--lime-text); font-weight: 600; }
.sidebar nav a .ico { width: 18px; height: 18px; flex: none; color: inherit; }
.sidebar nav a .compte { margin-left: auto; background: var(--navy); color: white; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.sidebar .encart { background: var(--bg); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.sidebar .encart .lab { font-size: 12px; color: var(--text-muted); }
.sidebar .encart .val { font-size: 22px; font-weight: 700; line-height: 1.2; }
.sidebar .encart .val small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.sidebar .encart .barre { height: 4px; background: var(--border); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.sidebar .encart .barre i { display: block; height: 100%; background: var(--lime); }
.sidebar .moi { display: flex; align-items: center; gap: 6px; padding: 6px 2px 0; }
/* v1.9 : la pastille et le nom ouvrent « Mon compte » */
.sidebar .moi .moi-lien { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; text-decoration: none; padding: 4px; border-radius: 8px; }
.sidebar .moi .moi-lien:hover { background: var(--bg); }
.sidebar .moi .moi-lien:hover .nom { text-decoration: underline; text-decoration-color: var(--text-subtle); text-underline-offset: 2px; }
.sidebar .moi .moi-texte { display: flex; flex-direction: column; min-width: 0; }
.sidebar .moi .nom { font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .moi .role { font-size: 11.5px; color: var(--text-muted); }
.sidebar .moi form { margin-left: auto; flex: none; }
/* v1.9 : la déconnexion se nomme au survol (étiquette au-dessus du bouton, couleur d'alerte) */
.sidebar .moi .deconnexion { position: relative; background: none; border: 0; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: 6px; display: flex; }
.sidebar .moi .deconnexion:hover, .sidebar .moi .deconnexion:focus-visible { background: var(--rouge-bg); color: var(--rouge); outline: none; }
.sidebar .moi .deconnexion .lib { position: absolute; right: 0; bottom: calc(100% + 6px); background: var(--navy); color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.sidebar .moi .deconnexion:hover .lib, .sidebar .moi .deconnexion:focus-visible .lib { opacity: 1; transform: translateY(0); }
.sidebar .moi .ico { width: 18px; height: 18px; }
.avatar { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--bleu-soft); color: #3730A3; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; flex: none; letter-spacing: 0.02em; }
.avatar.grand { width: 36px; height: 36px; font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 30px 36px 48px; max-width: 1240px; width: 100%; }
.mobile-bar { display: none; }

/* ─── En-têtes ─── */
.crumbs { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--text-subtle); }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-header h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-header .sous { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dossier-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.dossier-header h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.dossier-header .subtitle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.dossier-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2.titre-section { font-size: 20px; margin: 4px 0 16px; }

/* ─── Composants ─── */
.btn { padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer; background: var(--surface); color: var(--text); display: inline-flex; align-items: center; gap: 7px; text-decoration: none; line-height: 1.3; white-space: nowrap; }
.btn:hover { background: var(--bg); color: var(--text); } /* v1.14 (G.4) : un bouton-lien ne prend pas la couleur des liens au survol */
.btn .ico { width: 15px; height: 15px; }
.btn-primary { background: var(--navy); color: white; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-hover); color: #fff; border-color: var(--navy-hover); box-shadow: 0 0 0 3px rgba(220, 242, 90, .55); } /* v1.14 (G.4) : texte blanc conservé, halo lime pour que le survol se voie */
.btn-danger { color: var(--rouge); }
/* v1.22 : bouton de confirmation d'un geste sans retour (fenêtre « Archiver le dossier ») */
.btn-danger-plein { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.btn-danger-plein:hover { background: #B91C1C; color: #fff; border-color: #B91C1C; }
.btn[disabled], .btn.off { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--gris-bg); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.badge .pt { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.badge-rouge { background: var(--rouge-bg); color: var(--rouge); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-jaune { background: var(--jaune-bg); color: var(--jaune); }
.badge-vert { background: var(--vert-bg); color: var(--vert); }
.badge-bleu { background: var(--bleu-bg); color: var(--bleu); }
.badge-gris { background: var(--gris-bg); color: var(--gris); }
.badge-lime { background: var(--lime-soft); color: var(--lime-text); }
.badge-info { background: var(--bleu-soft); color: #3730A3; } /* v1.20 (I.4) : information, pas alerte — même bleu que le bandeau des régimes non chiffrés */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-subnote { font-size: 12.5px; color: var(--text-muted); margin-top: -8px; margin-bottom: 14px; }
.empty { color: var(--text-muted); font-size: 13px; padding: 16px 0; }
.card.plat { padding: 0; }
.card.plat .card-title { padding: 16px 20px 0; }

/* Blocs « pièce » (onglet Pièces) */
.piece-bloc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.piece-bloc .tete { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.piece-bloc .tete .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--bleu-soft); color: #3730A3; display: flex; align-items: center; justify-content: center; flex: none; }
.piece-bloc .tete .ic.lime { background: var(--lime-soft); color: #3F6212; }
.piece-bloc .tete .ic.gris { background: var(--gris-bg); color: var(--gris); }
.piece-bloc .tete h3 { font-size: 14.5px; }
.piece-bloc .tete .aide { font-size: 12px; color: var(--text-muted); }
.piece-bloc .corps { padding: 0 20px 18px; }
.drop { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); margin-bottom: 12px; }
.drop .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text); flex: none; }
.drop .txt b { display: block; font-size: 13px; font-weight: 600; }
.drop .txt span { font-size: 12px; color: var(--text-muted); }
.drop .btn { margin-left: auto; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop.glisse { border-color: var(--bleu); background: var(--bleu-soft); }
.drop .choisi { font-size: 12px; color: var(--vert); font-weight: 600; }
.piece-ligne { display: grid; grid-template-columns: minmax(220px, 2fr) 1.2fr 1.2fr minmax(84px, auto); gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13px; } /* v1.13 : plus de colonne « Utilisée pour le calcul » */
.piece-ligne.tete-col { color: var(--text-muted); font-size: 11.5px; padding: 8px 0 6px; border-top: 0; }
.piece-ligne .nomf { display: flex; align-items: center; gap: 10px; min-width: 0; }
.piece-ligne .nomf a { display: block; max-width: 100%; color: var(--text); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* v1.13 (C.5) : en bloc, sinon un nom long déborde sur la date */
.piece-ligne .nomf .sub { white-space: nowrap; }
.piece-ligne .acts { display: flex; gap: 4px; justify-content: flex-end; }
.piece-ligne .acts form { margin: 0; }
.ligne-attendu { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm); margin-top: 8px; font-size: 13px; }
.ligne-attendu.attention { background: var(--highlight-bg); border: 1px solid #FDE68A; }
.ligne-attendu .btn { margin-left: auto; }

/* Onglets du dossier — v1.9 : un picto d'état par onglet (fait · à compléter · à régénérer · en cours · verrouillé) remplace la numérotation */
.etapes-onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.etapes-onglets a, .etapes-onglets > span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 7px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text); text-decoration: none; }
.etapes-onglets a:hover { border-color: var(--border-strong); color: var(--text); }
.etapes-onglets .st { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--gris-bg); color: var(--text-muted); }
.etapes-onglets .st svg { width: 12px; height: 12px; }
.etapes-onglets .ill { display: inline-flex; align-items: center; margin-left: -2px; color: var(--text-muted); } /* v1.13 (B.2/B.3) : picto illustratif de l'onglet */
.etapes-onglets .ill svg { width: 15px; height: 15px; }
.etapes-onglets .active .ill { color: var(--text); }
.etapes-onglets .st.fait { background: var(--vert-bg); color: var(--vert); }
.etapes-onglets .st.a-faire { background: var(--orange-bg); color: var(--orange); }
.etapes-onglets .st.a-regenerer { background: var(--orange-bg); color: var(--orange); }
.etapes-onglets .st.en-cours { background: var(--bleu-bg); color: var(--bleu); }
.etapes-onglets .st.verrou { background: var(--gris-bg); color: var(--text-subtle); }
.etapes-onglets .active { background: var(--lime); border-color: var(--lime); font-weight: 600; }
.etapes-onglets .active .st { box-shadow: 0 0 0 2px var(--lime); }
.etapes-onglets .off { color: var(--text-subtle); }

/* Tuiles de synthèse */
.synthese-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.synthese-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
.synthese-tile:hover { border-color: var(--border-strong); }
.synthese-tile .label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.synthese-tile .value { font-size: 24px; font-weight: 700; line-height: 1.1; }
.synthese-tile .legend { font-size: 12px; color: var(--text-subtle); margin-top: 6px; }
.synthese-tile.alerte { border-color: #FCD34D; background: var(--highlight-bg); }

/* Tableaux */
.table-scroll { overflow: visible; } /* visible par défaut : les menus « ⋯ » (Comptes) s'ouvrent au-dessus du tableau */
.table-scroll.defile { overflow-x: auto; } /* v1.14 (G.1) : un tableau plus large que son cadre défile dedans au lieu d'en sortir (listes de dossiers, sans menu déroulant) */
.table-scroll.defile table thead th, .table-scroll.defile table tbody td { padding-left: 10px; padding-right: 10px; } /* v1.14 (G.1) : listes de dossiers plus compactes */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table thead th { text-align: left; padding: 10px 14px; font-weight: 500; color: var(--text-muted); border-bottom: 1px solid var(--border); font-size: 11.5px; white-space: nowrap; background: var(--surface); }
table tbody td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
table tbody tr:last-child td { border-bottom: 0; }
table tbody tr:hover td { background: #FAFBFC; }
td.num, th.num { text-align: right; }
td.acts { text-align: right; white-space: nowrap; }
.sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--text-muted); }
.cellule-nom { display: flex; align-items: center; gap: 10px; }
.cellule-nom a { color: var(--text); font-weight: 500; text-decoration: none; }
.cellule-nom a:hover { text-decoration: underline; }
.cellule-nom a, .cellule-nom .sub { white-space: nowrap; } /* v1.14 (G.1) : nom et date de naissance sur une ligne */
table td.conseiller { white-space: nowrap; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }
/* v1.18 (retour de Damien du 12/11) — pagination des listes : le compte à gauche ; à droite, le nombre de lignes par page puis les pages */
.pagination { gap: 8px 18px; flex-wrap: wrap; }
.pagination-commandes { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; margin-left: auto; }
.pagination .par-page, .pagination .pages { display: flex; align-items: center; gap: 3px; }
.pagination .par-page .lib { margin-right: 5px; }
.pagination .page { min-width: 26px; height: 26px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--text-muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.pagination a.page:hover { background: var(--bg); color: var(--text); }
.pagination .page.courante { background: var(--navy); color: #fff; font-weight: 600; }
.pagination .par-page .page.courante { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); } /* le choix du nombre de lignes ne se confond pas avec la page courante */
.pagination .saut { padding: 0 3px; color: var(--text-subtle); }
.pagination .pages .btn:first-child { margin-right: 6px; }
.pagination .pages .btn:last-child { margin-left: 6px; }
.card:not(.plat) > .pagination { margin: 12px -20px -18px; padding: 12px 20px; } /* carte à marges (Journal) : le pied va d'un bord à l'autre */
/* v1.20 (retour de Damien du 13/11) — la même barre au-dessus de la liste : un filet de chaque côté, entre les filtres et l'en-tête du tableau */
.pagination.haut { border-bottom: 1px solid var(--border); padding-top: 9px; padding-bottom: 9px; }
.card:not(.plat) > .pagination.haut { margin: 0 -20px; }
.card.plat > .filtres:has(+ .pagination.haut) { margin-bottom: 0; }

/* Recherche */
.recherche { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px; }
.recherche .champ-recherche { position: relative; flex: 0 1 300px; }
.recherche .champ-recherche .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-subtle); }
.recherche .champ-recherche input[type=search] { min-width: 0; width: 100%; padding: 8px 10px 8px 32px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; background: var(--surface); }
.recherche select { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; background: var(--surface); }
.filtres { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filtres input[type=search], .filtres select { padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; }
.filtres input[type=search] { min-width: 260px; }

/* Menu d'actions « ⋯ » */
.menu { position: relative; display: inline-block; }
.menu > button { background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 6px; color: var(--text-muted); }
.menu > button:hover { background: var(--gris-bg); color: var(--text); }
.menu .liste { display: none; position: absolute; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(17,24,39,.10); min-width: 220px; padding: 6px; text-align: left; }
.menu.ouvert .liste { display: block; }
.menu .liste a, .menu .liste button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; font-size: 13px; color: var(--text); border-radius: 6px; cursor: pointer; text-decoration: none; font-family: inherit; }
.menu .liste a:hover, .menu .liste button:hover { background: var(--bg); }
.menu .liste .danger { color: var(--rouge); }
.menu .liste form { margin: 0; }

/* Formulaires */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.form-grid .large { grid-column: 1 / -1; }
.champ label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.champ input[type=text], .champ input[type=email], .champ input[type=password], .champ input[type=date], .champ input[type=tel],
.champ input[type=number], .champ select, .champ textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13.5px; font-family: inherit; color: var(--text); background: var(--surface);
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--lime-soft); border-color: var(--navy); }
.champ textarea { min-height: 80px; resize: vertical; }
.champ .aide { font-size: 11.5px; color: var(--text-subtle); margin-top: 4px; }
.champ .erreur-champ { font-size: 12px; color: var(--rouge); margin-top: 4px; }
.champ input[type=file] { font-size: 12.5px; }
.champ.invalide input, .champ.invalide select { border-color: var(--rouge); }
.coche { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.coche input { margin-top: 3px; }
.actions-form { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.infos-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.infos-grille .lab { font-size: 11.5px; color: var(--text-muted); }
.infos-grille .val { font-size: 13.5px; font-weight: 500; }
/* v1.9 — formulaires : lignes explicites (civilité étroite + prénom + nom ; puis nom de naissance…) au lieu d'une grille auto-remplie */
.form-ligne { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; align-items: start; }
.form-ligne.deux { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form-ligne + .form-ligne { margin-top: 14px; }
.form-ligne .champ { min-width: 0; }
/* Civilité : sélecteur segmenté (deux boutons), pas une liste déroulante large */
.segments { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.segments label { position: relative; cursor: pointer; margin: 0; }
.segments input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segments span { display: inline-block; padding: 9px 14px; font-size: 13px; line-height: 1.3; color: var(--text-muted); border-left: 1px solid var(--border-strong); white-space: nowrap; }
.segments label:first-child span { border-left: 0; }
.segments label:hover span { background: var(--bg); color: var(--text); }
.segments input:checked + span { background: var(--navy); color: #fff; font-weight: 600; }
.segments input:focus-visible + span { outline: 2px solid var(--lime-soft); outline-offset: -2px; }
/* v1.9 — onglet Informations : blocs thématiques (identité · contact · suivi) à deux colonnes libellé / valeur */
.infos-blocs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.infos-bloc { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; }
.infos-bloc h3 { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; }
.infos-bloc .ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 5px 0; border-top: 1px dashed var(--border); font-size: 13px; }
.infos-bloc .ligne:first-of-type { border-top: 0; padding-top: 0; }
.infos-bloc .ligne dt { color: var(--text-muted); flex: none; }
.infos-bloc .ligne dd { font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.infos-bloc .ligne dd .vide { color: var(--text-subtle); font-weight: 400; }
/* v1.18 (retour de Damien du 12/11) — « Nouveau dossier » : les blocs de l'onglet Informations, en saisie — une ligne par champ, le libellé à gauche, la saisie à droite */
.infos-bloc .saisie { display: grid; grid-template-columns: minmax(104px, 36%) minmax(0, 1fr); gap: 3px 14px; align-items: center; padding: 7px 0; border-top: 1px dashed var(--border); }
.infos-bloc .saisie:first-of-type { border-top: 0; padding-top: 0; }
.infos-bloc .saisie > label, .infos-bloc .saisie > .lib { display: block; margin: 0; font-size: 13px; font-weight: 400; color: var(--text-muted); }
.infos-bloc .saisie > .segments { justify-self: start; }
/* v1.19 — nombre d'enfants : une saisie courte, alignée à gauche de sa colonne */
.infos-bloc .saisie > input[type=number] { width: 140px; justify-self: start; }
.infos-bloc .saisie > .aide, .infos-bloc .saisie > .erreur-champ { grid-column: 2; margin-top: 0; }
.infos-bloc .note { margin: 10px 0 0; font-size: 11.5px; color: var(--text-subtle); }
.card-title-note { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.entete-lignes .ref { font-size: inherit; color: var(--text); font-weight: 600; }
@media (max-width: 700px) {
  .infos-bloc .saisie { grid-template-columns: 1fr; }
  .infos-bloc .saisie > .aide, .infos-bloc .saisie > .erreur-champ { grid-column: 1; }
}
.infos-contexte { margin-top: 14px; padding: 12px 14px; background: var(--highlight-bg); border: 1px solid #FDE68A; border-radius: var(--radius-sm); font-size: 13px; }
@media (max-width: 700px) { .form-ligne, .form-ligne.deux { grid-template-columns: 1fr; } }

/* Messages */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 12px; border: 1px solid transparent; word-break: break-word; }
.flash-succes { background: var(--vert-bg); color: #166534; border-color: #BBF7D0; }
.flash-erreur { background: var(--rouge-bg); color: #991B1B; border-color: #FECACA; }
.flash-info { background: var(--bleu-bg); color: #1E40AF; border-color: #BFDBFE; }
/* v1.51 (US-116) : « Génération terminée : le dossier est à jour. » — la page s'est remise à la hauteur où on la lisait : le message
   flotte en haut de l'écran, pas en tête du contenu, et s'efface comme les autres (app.js) */
.flash-flottant { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.lien-a-copier { background: var(--highlight-bg); border: 1px solid #FDE68A; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-size: 13px; }
.lien-a-copier code { display: block; margin-top: 6px; font-size: 12px; word-break: break-all; background: var(--surface); padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); }

/* Onglets d'administration */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; font-size: 13px; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }

/* Étapes (ancienne page d'attente, conservée pour l'administration) */
.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.etape { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-size: 13px; }
.etape .num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--gris-bg); color: var(--gris); font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-right: 8px; }
.etape.faite { background: var(--vert-bg); border-color: #BBF7D0; }
.etape.faite .num { background: var(--vert); color: white; }
.etape.encours { background: var(--highlight-bg); border-color: #FCD34D; }
.etape.encours .num { background: var(--jaune); color: white; }

/* Pages hors connexion (connexion, invitation) */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 34px 32px; }
.login-card .marque { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 4px; }
.login-card .marque b { font-weight: 800; }
.login-card .sous { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.login-card .champ { margin-bottom: 14px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }
.login-pied { text-align: center; font-size: 11.5px; color: var(--text-subtle); margin-top: 18px; }
/* v1.9 : lien discret centré sous le bouton de connexion (mot de passe oublié, retour à la connexion) */
.login-aide { text-align: center; margin-top: 16px; }
.login-aide .lien-discret { margin-top: 0; }
.cgu-texte { font-size: 13px; line-height: 1.6; max-height: 320px; overflow: auto; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 14px; }
.cgu-texte h3 { font-size: 13px; margin: 10px 0 4px; }

/* Page d'erreur */
.erreur-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.erreur-wrap .code { font-size: 48px; font-weight: 700; color: var(--text-subtle); }

/* Bande d'assistance (US-42) — v1.23 : même marque que ce qui est réservé à l'administration (.marque-admin, en fin de fichier), une ligne
   quand la largeur le permet ; elle reste sombre : l'administrateur agit dans la session d'un conseiller, cela doit se voir */
.bandeau-assistance { display: flex; align-items: center; justify-content: flex-start; gap: 6px 12px; flex-wrap: wrap; padding: 7px 36px; background: #1F2937; color: #F9FAFB; font-size: 12.5px; border-bottom: 3px solid var(--lime); }
.bandeau-assistance .btn { background: var(--lime); border-color: var(--lime); color: var(--lime-text); padding: 4px 10px; font-size: 12px; }
.bandeau-assistance form { margin: 0; }
.bandeau-assistance .marque-admin { color: var(--lime); }
.bandeau-assistance .texte { flex: 1 1 320px; min-width: 0; }
/* Bandeau de relecture */
.bandeau { padding: 10px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; background: var(--highlight-bg); border: 1px solid #FDE68A; color: #92400E; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* v1.20 (retour de Damien du 13/11, I.3) : le texte d'un bandeau reste à côté de son picto — il passait dessous, seul sur la ligne
   suivante, dès qu'il était plus long que la ligne (le bandeau s'enroule pour son bouton, pas pour son texte) */
.bandeau > span { flex: 1 1 280px; min-width: 0; }
.bandeau-info { background: var(--bleu-soft); border-color: #C7D2FE; color: #3730A3; align-items: flex-start; line-height: 1.5; }
.bandeau-info a { color: inherit; font-weight: 600; }
/* v1.51 (US-116) : génération finie pendant une saisie — le bandeau reste en haut de l'écran pendant qu'on fait défiler la page */
.bandeau-generation { position: sticky; top: 8px; z-index: 30; align-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
/* v1.20 : rappel d'une génération arrêtée sur les onglets Carrière et Projection — les couleurs de la carte d'arrêt de l'onglet Documents */
.bandeau-arret { background: #FFF5F5; border-color: #FECACA; color: #991B1B; }
.bandeau-arret a { color: inherit; font-weight: 600; }
/* v1.10 : lecture administrateur d'un dossier (US-03) — depuis la v1.23 : .bande-admin, en fin de fichier (v1.29 : en haut de la page) */

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.ouverte { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 50; width: 260px; box-shadow: 4px 0 20px rgba(0,0,0,.08); }
  .mobile-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .mobile-bar .toggle-btn { background: none; border: 1px solid var(--border); padding: 6px 9px; border-radius: 6px; cursor: pointer; }
  .content { padding: 18px 16px 30px; }
  .table-scroll { overflow-x: auto; }
  .piece-ligne { grid-template-columns: 1fr; gap: 4px; }
  .piece-ligne.tete-col { display: none; }
  .piece-ligne .acts { justify-content: flex-start; }
}

/* L attribut hidden doit toujours l emporter sur display:grid/flex des classes */
[hidden] { display: none !important; }

/* Lien discret avec icône (Mon compte → conditions d'utilisation, mire de connexion) — v1.9 : couleur de lien adoucie, soulignement pointillé au survol */
.lien-discret { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--lien); text-decoration: none; border-bottom: 1px dotted transparent; }
.lien-discret:hover { color: var(--lien-hover); border-bottom-color: var(--text-subtle); }
.lien-discret .ico { width: 15px; height: 15px; }
.lien-discret .ico.ext { width: 12px; height: 12px; color: var(--text-subtle); }

/* Pièces retirées / remplacées (US-08) */
.piece-ligne.retiree { opacity: .62; }
.piece-ligne.retiree .nomf a { font-weight: 500; text-decoration: line-through; text-decoration-color: var(--text-subtle); }
/* V2·33 : « … · remplacée le … par … » passe à la ligne dans sa colonne — sur une seule ligne, elle chevauchait la date de dépôt et
   élargissait la page d'un téléphone ; chaque relevé AA remplacé en ajoute une */
.piece-ligne.retiree .nomf .sub { white-space: normal; }

/* ─── Onglet Carrière (lot C — v1.7) ─── */
.kpi-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.kpi .ic { width: 36px; height: 36px; border-radius: 9px; background: var(--lime-soft); display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.kpi .lab { font-size: 12px; color: var(--text-muted); }
.kpi .val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.kpi .sub { font-size: 12px; color: var(--text-subtle); margin-top: 2px; }
.card.carriere { padding: 0; overflow: visible; }
.carriere-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.carriere-outils { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 18px 12px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 3px 11px; font-size: 12px; cursor: pointer; color: var(--text); font-family: inherit; }
.chip.on { background: var(--lime); border-color: var(--lime); font-weight: 600; }
.legende { display: flex; align-items: center; gap: 6px; }
.trim-cases { display: inline-flex; gap: 2px; vertical-align: middle; }
.trim-cases i { width: 7px; height: 12px; border-radius: 2px; background: var(--border); display: inline-block; }
.trim-cases i.on { background: #65A30D; }
.annee { border-bottom: 1px solid var(--border); }
.annee:last-child { border-bottom: 0; }
.annee > .ligne, .annee > summary.ligne { display: grid; grid-template-columns: 64px minmax(0, 1fr) 118px 170px 120px 36px; align-items: center; gap: 10px; padding: 9px 18px; list-style: none; cursor: pointer; font-size: 13px; }
.annee > summary.ligne::-webkit-details-marker { display: none; }
.annee > summary.ligne:hover { background: var(--bg); }
.annee .an { font-weight: 700; font-size: 14px; }
.annee .libs { min-width: 0; display: flex; flex-direction: column; }
.annee .libs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.annee .libs .sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.annee .trims { display: flex; align-items: center; gap: 6px; }
.annee .trims .n { font-size: 12px; color: var(--text-muted); }
.annee .pts, .annee .rev { font-variant-numeric: tabular-nums; font-size: 13px; }
.annee .acts { text-align: right; }
.annee .chevron { color: var(--text-subtle); font-size: 16px; display: inline-block; transition: transform .15s; }
.annee[open] .chevron { transform: rotate(180deg); }
.annee.vide .ligne { cursor: default; color: var(--text-muted); }
/* v1.20 (retour de Damien du 13/11, I.6) : sur une année sans activité, le bouton « ＋ Enregistrement » était rangé dans la colonne
   du chevron (36 px) et débordait du cadre à droite ; il prend la place des colonnes points et revenu, vides sur cette ligne */
.annee.vide > .ligne { grid-template-columns: 64px minmax(0, 1fr) 118px auto; }
.annee.vide > .ligne .pts, .annee.vide > .ligne .rev { display: none; }
.annee.vide > .ligne .acts { white-space: nowrap; }
.annee .vide { color: var(--text-subtle); font-style: italic; }
.annee .contenu { padding: 4px 18px 14px 18px; background: #FAFBFC; border-top: 1px dashed var(--border); }
.etiquette { font-size: 12px; color: #3730A3; background: var(--bleu-soft); border-radius: 7px; padding: 5px 10px; margin: 8px 0 4px; }
.enr { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid #65A30D; border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.enr.ecarte { border-left-color: var(--text-subtle); opacity: .72; }
.enr.a-revoir { border-left-color: var(--orange); }
.enr-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.enr-titre b { font-size: 14px; }
.enr-titre .badge { margin-left: 6px; vertical-align: 1px; }
.enr-titre .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.enr-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.enr-actions form { display: inline; }
.enr-champs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 16px; margin-top: 10px; }
.enr-champs .lab { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-subtle); }
.enr-champs .val { font-size: 13px; font-variant-numeric: tabular-nums; }
.enr-champs .val .sub, .enr-titre .sub b { font-weight: 500; }
.enr-champs .val .sub { font-size: 11.5px; color: var(--text-subtle); }
.enr-champs .vide { color: var(--text-subtle); font-style: italic; font-size: 12px; }
.enr-commentaire { margin-top: 8px; font-size: 12.5px; background: var(--highlight-bg); border-radius: 7px; padding: 6px 10px; }
.origines { margin-top: 8px; font-size: 12px; }
.origines summary { cursor: pointer; color: var(--lien); }
.origines-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; }
.origines-table th, .origines-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.origines-table th { color: var(--text-subtle); font-weight: 500; font-size: 11px; }
.origines-table tr.annulee td { color: var(--text-subtle); text-decoration: line-through; }
.origines-table tr.annulee td:last-child { text-decoration: none; }
.ajout-annee { margin-top: 10px; }
/* Boutons « Tout déplier / Tout replier / Ajouter un enregistrement en … » présentés comme des liens (v1.9 : plus d'écrasement du lien discret des autres pages) */
button.lien-discret { background: none; border: 0; color: var(--lien); cursor: pointer; font: inherit; padding: 0; margin-top: 0; }
button.lien-discret:hover { color: var(--lien-hover); }
.annee.masquee { display: none; }
/* Le « * { margin: 0 } » du haut annule le centrage natif des <dialog> : on le rétablit, et la fenêtre défile si l'écran est bas */
dialog.modal-enr { margin: auto; border: 1px solid var(--border); border-radius: 12px; padding: 0; width: min(760px, 94vw); max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 20px 60px rgba(17, 24, 39, .25); }
dialog.modal-enr.petite { width: min(520px, 94vw); }
dialog.modal-enr::backdrop { background: rgba(17, 24, 39, .45); }
dialog.modal-enr form { padding: 18px 20px 16px; }
.modal-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-tete h3 { font-size: 16px; }
dialog.modal-enr .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
dialog.modal-enr .champ.col2, dialog.modal-enr .col2 { grid-column: 1 / -1; }
dialog.modal-enr .champ { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); }
dialog.modal-enr .champ input, dialog.modal-enr .champ select, dialog.modal-enr .champ textarea { font: inherit; font-size: 13.5px; color: var(--text); padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
dialog.modal-enr .champ .aide { font-size: 11px; color: var(--text-subtle); }
dialog.modal-enr .champ[hidden] { display: none; }
@media (max-width: 900px) {
  .kpi-cards { grid-template-columns: 1fr; }
  .annee > .ligne, .annee > summary.ligne, .annee.vide > .ligne { grid-template-columns: 56px 1fr 100px; }
  .annee .pts, .annee .rev, .annee .acts { display: none; }
  .enr-champs { grid-template-columns: 1fr 1fr; }
  .enr-tete { flex-direction: column; }
  .enr-actions { justify-content: flex-start; }
  dialog.modal-enr .form-grid { grid-template-columns: 1fr; }
  dialog.modal-enr { width: 96vw; max-height: calc(100vh - 16px); }
}
/* En-têtes de page sur écran étroit : titre puis actions, les unes sous les autres, et les onglets défilent */
@media (max-width: 900px) {
  .page-header, .dossier-header { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .page-header h1, .dossier-header h1 { font-size: 21px; }
  .page-header .actions, .dossier-header-actions { justify-content: flex-start; }
  .page-header .actions .btn, .dossier-header-actions .btn { flex: 1 1 auto; justify-content: center; }
  .page-header .actions form, .dossier-header-actions form { flex: 1 1 auto; display: flex; }
  .page-header .actions form .btn, .dossier-header-actions form .btn { width: 100%; }
  .etapes-onglets { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .etapes-onglets a, .etapes-onglets span { white-space: nowrap; flex: none; }
  .bandeau form { margin-left: 0 !important; width: 100%; }
}
/* v1.13.2 : sous 560 px les quatre onglets ne tiennent plus sur une ligne — ils passent sur deux lignes au lieu de défiler (déclaré après le bloc 900 px, qui impose nowrap) */
@media (max-width: 560px) {
  .etapes-onglets { flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; }
}

/* v1.8.1 — version en pied de page et sur la mire de connexion (v1.9 : numéro seul, la date en infobulle) */
.pied-page { margin-top: 28px; padding: 12px 0 4px; border-top: 1px solid var(--border); text-align: center; font-size: 11.5px; color: var(--text-subtle); }
.login-pied .version { display: inline-block; margin-top: 6px; color: var(--text-subtle); opacity: .8; }

/* ─── Onglet Projection (v1.9) : page de l'application au design V-Labs, lue dans les tables scenarios / gains_cumules / fiscalite ─── */
.proj-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.proj-tete .sub { font-size: 12.5px; color: var(--text-muted); }
.proj-panneau[hidden] { display: none; }
#projection .table-scroll { overflow-x: auto; }
.proj-table th, .proj-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.proj-table th:first-child, .proj-table td:first-child { text-align: left; white-space: normal; min-width: 170px; }
.proj-table thead th { vertical-align: bottom; white-space: normal; }
.proj-table tr.total td { font-weight: 700; background: var(--bg); }
.proj-table tr.total td.mens { color: var(--vert); }
.proj-table td.opt { background: var(--lime-soft); font-weight: 600; }
.proj-table .col-hyp { font-weight: 600; color: var(--text); line-height: 1.3; }
.proj-table .col-hyp .badge { display: inline-flex; margin-top: 4px; font-size: 9.5px; padding: 0 6px; line-height: 16px; }
.proj-table td.nc { color: var(--orange); font-style: italic; }
.proj-table td.vide, .proj-table td .vide { color: var(--text-subtle); }
.proj-table td .date-age { color: var(--text-subtle); font-weight: 400; }
.proj-label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); font-weight: 600; margin: 12px 0 4px; }
.formule { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--bg); border-radius: 7px; padding: 8px 10px; margin-top: 6px; overflow-wrap: anywhere; }
.formule strong { color: var(--text); }
.regime-bloc { border: 1px solid var(--border); border-radius: 8px; margin-top: 10px; background: var(--surface); }
.regime-bloc summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 600; font-size: 13.5px; }
.regime-bloc summary::-webkit-details-marker { display: none; }
.regime-bloc summary .montant { color: var(--vert); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.regime-bloc .regime-corps { padding: 0 14px 14px; border-top: 1px dashed var(--border); }
.proj-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.proj-note.alerte { color: var(--orange); }
.proj-note.italique { color: var(--text-subtle); font-style: italic; }
/* v1.20 (retours de Damien du 13/11, I.4) — régimes que VAULT ne calcule pas : une ligne par régime, saisie à la main, total « hors … » */
.proj-note.info { color: #3730A3; }
.proj-table td.explication { text-align: left; white-space: normal; color: var(--text-muted); font-size: 12.5px; }
.proj-table td.explication .btn { margin-left: 8px; vertical-align: 1px; }
.proj-table tr.non-calcule td:first-child, .proj-table tr.saisie-main td:first-child { white-space: nowrap; }
.proj-table tr.non-calcule td { background: #FAFBFF; }
.proj-table tr.total td .sub { font-weight: 400; }
.proj-table .col-hyp .mention-hors, .proj-table .col-hyp .mention-saisie, .proj-table .col-hyp .mention-date-effet { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 500; color: #3730A3; white-space: normal; }
.proj-table .col-hyp .mention-saisie { color: var(--text-muted); }
.regime-bloc.saisie-main summary .badge { margin-left: 8px; }
dialog.modal-enr .modal-intro { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.bandeau.saisie-sans-objet { align-items: flex-start; }
/* v1.39 (US-38, seconde moitié) — pension calculée remplacée à la main : le calcul garde sa ligne, montants barrés, la saisie vient dessous */
.proj-table tr.calcul-remplace td { color: var(--text-muted); }
.proj-table tr.calcul-remplace td.barre { text-decoration: line-through; }
.proj-table tr.calcul-remplace td:first-child { white-space: nowrap; }
.proj-table tr.calcul-remplace td .badge, .proj-table td.explication .badge { margin-left: 4px; text-decoration: none; }
.bandeau.remplacement-a-revoir { align-items: flex-start; line-height: 1.5; }
/* v1.41 (US-45) — dossier hors périmètre : le bandeau de l'alerte ou du forçage, et ses forçages précédents, repliés */
.bandeau-perimetre { align-items: flex-start; line-height: 1.5; }
.bandeau-perimetre .historique-perimetre { margin-top: 6px; font-size: 12.5px; }
.bandeau-perimetre .historique-perimetre summary { cursor: pointer; font-weight: 600; }
.bandeau-perimetre .historique-perimetre ul { margin: 4px 0 0 18px; padding: 0; }
.regime-bloc.remplacee summary .badge { margin-left: 8px; }
.regime-bloc .remplacement-dit { margin-top: 10px; font-size: 13px; }
.regime-bloc .proj-label.calcul-non-retenu { margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--border); }
.regime-bloc .geste-remplacer { margin-top: 12px; }
.regime-bloc .geste-remplacer .btn, .regime-bloc .proj-note > .btn { margin-left: 6px; vertical-align: 1px; }
.regime-bloc .proj-note > .btn:first-child { margin-left: 0; }
dialog.modal-enr .champ .aide strong { color: var(--text-muted); font-weight: 600; }
dialog.modal-enr .modal-intro.alerte { color: #92400E; background: var(--highlight-bg); border: 1px solid #FDE68A; border-radius: var(--radius-sm); padding: 8px 10px; }
.proj-intro { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.proj-capital { margin-top: 10px; padding: 10px 12px; background: var(--bleu-soft); border-radius: 7px; font-size: 12.5px; color: #3730A3; }
@media (max-width: 900px) { .proj-table th, .proj-table td { white-space: normal; } }

/* ─── v1.11 — Administration › Référentiels (lot G) : paramètres, règles, skills du moteur en lecture seule ─── */
.ref-snapshot table.kv th { width: 190px; }
.ref-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ref-colonnes .card { margin-bottom: 0; }
h2.titre-section .sub { display: inline; font-size: 13px; font-weight: 400; margin-left: 4px; }
.ref-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ref-liste li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; }
.ref-liste li:hover { background: var(--bg); }
.ref-liste a { text-decoration: none; color: var(--text); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ref-liste a code { color: var(--lien); font-size: 12.5px; }
.ref-liste a:hover code { color: var(--lien-hover); text-decoration: underline; }
.ref-liste .ref-titre { font-size: 13px; color: var(--text-muted); }
.ref-liste .ref-meta { font-size: 11.5px; color: var(--text-subtle); margin-top: 2px; }
.ref-skills td.texte { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.ref-skills a { color: var(--lien); text-decoration: none; }
.ref-skills a:hover { text-decoration: underline; }
/* Page d'un fichier : sommaire collant à gauche, corps à droite */
.ref-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.ref-sommaire { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; font-size: 12.5px; padding-right: 4px; }
.ref-sommaire-titre { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); font-weight: 600; margin: 0 0 6px; }
.json-sommaire, .md-sommaire { display: flex; flex-direction: column; gap: 1px; }
.json-sommaire a, .md-sommaire a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.json-sommaire a:hover, .md-sommaire a:hover { background: var(--surface); color: var(--lien-hover); }
.json-sommaire a code { font-size: 12px; color: var(--lien); }
.json-sommaire a span { color: var(--text-subtle); font-size: 11px; white-space: nowrap; }
.md-sommaire a.niveau-3 { padding-left: 18px; font-size: 12px; }
.md-sommaire a.niveau-4 { padding-left: 28px; font-size: 11.5px; color: var(--text-muted); }
.ref-corps { min-width: 0; }
.ref-corps .card { margin-bottom: 14px; }
/* Paramètres (JSON) */
table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv th { text-align: left; vertical-align: top; padding: 7px 12px 7px 0; font-weight: 500; color: var(--text-muted); width: 260px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.kv td { padding: 7px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: 0; }
table.kv tr:hover td, table.kv tr:hover th { background: transparent; }
table.kv td.num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; text-align: left; }
table.kv td.texte { line-height: 1.5; color: var(--text); }
table.kv th code { font-size: 12px; color: var(--text); }
.ref-meta-card { background: var(--bleu-soft); border-color: #C7D2FE; }
.ref-meta-card .card-title { color: #3730A3; }
.ref-meta-card table.kv th, .ref-meta-card table.kv td { border-color: #C7D2FE; }
.json-section { padding: 6px 0 10px; }
.json-section.niveau-1 { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 16px; }
.json-section.niveau-1:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.json-section.niveau-2, .json-section.niveau-3, .json-section.niveau-4 { margin-left: 14px; padding-left: 14px; border-left: 2px solid var(--border); }
.json-titre { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-weight: 600; }
h2.json-titre { font-size: 17px; } h3.json-titre { font-size: 15px; } h4.json-titre { font-size: 14px; } h5.json-titre { font-size: 13px; }
.page-header h1 code { font-size: .8em; background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.page-header h1 .h1-libelle { font-weight: 500; color: var(--text-muted); font-size: .72em; }
.json-titre code { font-size: .92em; color: var(--text); background: var(--bg); padding: 1px 6px; border-radius: 5px; }
.json-titre .nature { font-size: 11px; font-weight: 400; color: var(--text-subtle); }
.ancre { color: var(--text-subtle); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; margin-right: 2px; }
.json-titre:hover .ancre, table.kv tr:hover .ancre { opacity: 1; }
:target .json-titre code, tr:target th code { background: var(--lime-soft); outline: 2px solid var(--lime); }
.json-scalaire { font-size: 13.5px; }
.json-vide, .vide { color: var(--text-subtle); font-style: italic; }
.json-liste-courte { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.json-liste-courte .sep, .imbrique .sep { color: var(--text-subtle); }
.json-puces { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.55; }
.json-puces li { margin: 2px 0; }
.json-compte { font-size: 11.5px; color: var(--text-subtle); margin-top: 4px; }
table.serie { font-size: 12.5px; width: auto; min-width: min(100%, 520px); }
table.serie thead th { text-align: right; }
table.serie thead th:first-child, table.serie thead th.texte { text-align: left; }
table.serie th code { font-size: 11.5px; color: var(--text-muted); }
table.serie td { padding: 6px 10px; }
table.serie td.num, table.serie td .nombre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.serie td.rang, table.serie th.rang { color: var(--text-subtle); font-size: 11px; width: 32px; text-align: right; }
table.serie td.imbrique { font-size: 12px; color: var(--text-muted); }
.json-brut { font-size: 11.5px; overflow-wrap: anywhere; }
.nombre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.bool { font-weight: 600; }
.ref-json .table-scroll { overflow-x: auto; margin: 4px 0 6px; }
.ref-brut summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.ref-brut pre { margin: 12px 0 0; font-size: 12px; line-height: 1.5; background: var(--bg); border-radius: 8px; padding: 12px 14px; overflow: auto; max-height: 70vh; }
/* Règles (Markdown) */
.md { font-size: 14px; line-height: 1.6; max-width: 980px; }
.md h2 { font-size: 21px; margin: 4px 0 14px; }
.md h3 { font-size: 17px; margin: 24px 0 10px; }
.md hr + h3 { margin-top: 0; }
.md h4 { font-size: 15px; margin: 18px 0 8px; }
.md h5, .md h6 { font-size: 14px; margin: 14px 0 6px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 24px; }
.md li { margin: 3px 0; }
.md code { font-size: .9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.md pre.md-code { background: #1F2937; color: #F9FAFB; border-radius: 8px; padding: 12px 14px; overflow: auto; font-size: 12.5px; line-height: 1.5; margin: 0 0 12px; }
.md pre.md-code code { background: transparent; color: inherit; padding: 0; }
.md blockquote.md-quote { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--lime); background: var(--highlight-bg); border-radius: 0 8px 8px 0; color: #4B5563; }
.md blockquote.md-quote p:last-child { margin-bottom: 0; }
.md .table-scroll { overflow-x: auto; margin: 0 0 12px; }
.md table.md-table { font-size: 13px; }
.md table.md-table th { white-space: normal; }
.md table.md-table td { padding: 8px 12px; vertical-align: top; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.md a { color: var(--lien); }
.md a.md-ref { text-decoration: none; border-bottom: 1px dotted var(--lien); }
.md a.md-ref:hover { color: var(--lien-hover); border-bottom-style: solid; }
.md a.md-ref code { color: var(--lien); }
.md del { color: var(--text-subtle); }
.ref-fichiers { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.ref-fichiers li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; }
.ref-fichiers li span { color: var(--text-subtle); white-space: nowrap; }
@media (max-width: 1100px) { .ref-page { grid-template-columns: 1fr; } .ref-sommaire { position: static; max-height: none; } }
/* v1.14 (G.1) : sous 1 120 px (fenêtre Safari non agrandie), la colonne « Créé le » de la liste des dossiers s'efface pour que les actions restent visibles */
@media (max-width: 1120px) {
  .table-scroll.defile .col-cree { display: none; }
}

/* ─── v1.23 (retours de Damien du 14/11/2026) ─── */
/* Ce qui est réservé à l'administration porte une même marque (helpers.php, marque_admin) : un petit libellé en capitales et
   son picto. · .bande-admin : la bande de lecture d'un dossier ; elle regroupe « Assister », « Gérer », « Rouvrir » et, depuis la
   v1.23.1, le bouton « Moteur » et son panneau (plus bas). · La bande d'assistance (.bandeau-assistance, plus haut) porte la même
   marque sur fond sombre.
   v1.29 (retour de Damien du 15/11/2026, L.9) : la bande d'administration est en haut de la page, au dessin de la bande
   d'assistance — sombre, sur toute la largeur, soulignée de vert — et plus une ligne en pointillé sous l'en-tête du dossier. Les
   deux bandes ne s'affichent jamais ensemble (en assistance, l'administrateur est dans la session du conseiller). */
.marque-admin { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.marque-admin svg { width: 13px; height: 13px; flex: none; }
.bande-admin { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 7px 36px; background: #1F2937; color: #F9FAFB; font-size: 12.5px; border-bottom: 3px solid var(--lime); }
.bande-admin .marque-admin { color: var(--lime); }
.bande-admin .texte { flex: 1 1 240px; min-width: 0; }
.bande-admin .texte strong { font-weight: 600; }
.bande-admin .texte .badge { vertical-align: middle; }
.bande-admin .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.bande-admin form { margin: 0; }
.bande-admin .btn { background: var(--lime); border-color: var(--lime); color: var(--lime-text); padding: 4px 10px; font-size: 12px; }
/* Onglet Carrière : la ligne de repères qui remplace les trois grandes cartes, et le bouton d'ajout répété en bas.
   Une grille : autant de colonnes que la largeur en permet (cinq sur un écran large, deux sur un téléphone) ; libellés sur une
   rangée, valeurs sur la suivante, alignés d'un repère à l'autre même quand un libellé passe sur deux lignes (sous-grille).
   Le trait qui sépare deux repères est le bord gauche de chacun, décalé d'un pixel : celui de la première colonne sort du cadre. */
.reperes { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 0; margin: 0 0 14px; padding: 5px 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.reperes > div { display: grid; grid-template-rows: subgrid; grid-row: span 2; margin: 5px 0 5px -1px; padding: 0 14px; border-left: 1px solid var(--border); }
.reperes dt { font-size: 11.5px; color: var(--text-muted); }
.reperes dd { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.reperes dd .v { white-space: nowrap; }
/* lot V2·30 : l'âge légal (« 62 ans et 9 mois ») passe à la ligne entre les années et les mois, plutôt que de sortir de son repère */
#repere-age-legal .v { white-space: normal; }
#repere-age-legal .v > bdi { white-space: nowrap; }
.reperes dd .precision { display: block; font-size: 11.5px; font-weight: 400; letter-spacing: 0; line-height: 1.4; color: var(--text-muted); }
.carriere-pied { display: flex; justify-content: flex-end; padding: 14px 18px 16px; border-top: 1px solid var(--border); }
@media (max-width: 900px) {
  .bande-admin .actions { margin-left: 0; }
  .bandeau-assistance, .bande-admin { padding: 7px 16px; }
  .carriere-pied { justify-content: stretch; }
  .carriere-pied .btn { flex: 1 1 auto; justify-content: center; }
  /* Le bouton du haut passe sous le titre : à côté de « Carrière » et de la pastille « À revoir », il sortait de l'écran d'un téléphone */
  .carriere-tete { flex-wrap: wrap; }
  .carriere-tete > .btn { flex: 1 1 auto; justify-content: center; }
}

/* ─── v1.23.1 (retour de Damien du 14/11/2026, 13 h 23) ─── */
/* Ce que la carte « Moteur VAULT » montrait en bas de l'onglet Documents est dans la bande d'administration, sur tous les onglets.
   Peu utilisé, il est replié à l'arrivée : le bouton « Moteur » de la bande (.bascule, app.js data-bascule) ouvre le panneau
   (.panneau-admin), qui prend toute la largeur de la bande, sous sa première ligne. Point rouge : la dernière génération s'est
   arrêtée. */
.bande-admin .bascule { gap: 5px; }
.bande-admin .bascule .chevron { display: inline-block; font-size: 13px; line-height: 1; transition: transform .15s; }
.bande-admin .bascule[aria-expanded="true"] { background: var(--lime-soft); border-color: var(--lime-soft); }
.bande-admin .bascule[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.bande-admin .bascule .pt-alerte { width: 7px; height: 7px; border-radius: 50%; background: var(--rouge); flex: none; }
.panneau-admin { flex: 1 1 100%; min-width: 0; margin: 2px 0; padding: 10px 0 6px; border-top: 1px dashed rgba(249, 250, 251, .32); font-size: 13px; }
.panneau-admin p { margin: 0 0 4px; overflow-wrap: anywhere; }
.panneau-admin .titre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; margin-bottom: 6px; }
.panneau-admin .sub { font-size: 12px; color: #D1D5DB; }
.panneau-admin a:not(.btn) { color: #F9FAFB; text-decoration-color: rgba(249, 250, 251, .5); }
.panneau-admin a:not(.btn):hover { color: var(--lime); }
.panneau-admin .arret { color: #FDBA74; }
.panneau-admin .boutons { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 6px; }

/* ─── v1.24 (liste de Damien du 14/11/2026 ; retours D.1 et D.2 du 11/11) — onglet Carrière : trois vues ─── */
/* .sous-onglets : enregistrements · trimestres · salaire annuel moyen, sous la ligne de repères — des onglets soulignés, plus
   légers que ceux du dossier. · .trimestres : la synthèse (.trim-chiffres), le tableau à une ligne par année (.trim-table, détail
   d'une année au clic, filtres : app.js), ce qu'il y a sous le tableau (.trim-pied). · .sam : les deux tableaux du salaire annuel
   moyen (.sam-table). · .sr : texte réservé aux lecteurs d'écran. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sous-onglets { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.sous-onglets a { padding: 6px 12px 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 13px; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.sous-onglets a:hover { color: var(--text); }
.sous-onglets a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--navy); }
.card.trimestres, .card.sam { padding: 0; overflow: visible; }
.trim-chiffres { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 0; padding: 2px 18px 0; }
.trim-chiffres dt { font-size: 11.5px; color: var(--text-muted); }
.trim-chiffres dd { font-size: 12.5px; color: var(--text-muted); line-height: 1.35; }
.trim-chiffres dd .v { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.trim-chiffres dd .v.nc { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.trim-chiffres .types { flex: 1 1 260px; min-width: 0; }
.trim-chiffres .types dd { display: flex; flex-wrap: wrap; gap: 2px 16px; padding-top: 4px; }
.trim-chiffres .types .type b { font-size: 14px; font-weight: 600; color: var(--text); }
.trim-source { padding: 8px 18px 12px; }
/* (position: relative : les textes .sr des en-têtes, placés en absolu, restent dans le cadre qui défile au lieu d'élargir la page ;
   container-type : le détail d'une année se règle sur la largeur du cadre — unités cqw —, que le tableau défile ou non) */
.trim-defile { position: relative; overflow-x: auto; container-type: inline-size; }
.trim-table, .sam-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
/* Le tableau des trimestres défile dans son cadre quand il est plus large que lui (beaucoup de types de trimestres, écran
   étroit) : l'année reste alors collée à gauche, les trimestres retenus et le cumul à droite — les colonnes de type passent
   dessous. Chaque cellule porte donc son trait et son fond (bordures séparées : avec des bordures fusionnées, une cellule
   collée recouvre le trait de sa ligne). --trim-cumul : largeur de la colonne « Cumul », dont dépend le calage des retenus.
   .deborde, posé par app.js quand le tableau dépasse de son cadre : un filet marque le bord des colonnes collées. */
.trim-table { border-collapse: separate; border-spacing: 0; --trim-cumul: 76px; }
.trim-table th, .trim-table td { padding: 5px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; font-weight: 400; }
.trim-table thead th, .sam-table thead th { font-size: 11.5px; font-weight: 500; color: var(--text-muted); background: #FAFBFC; border-top: 1px solid var(--border); vertical-align: bottom; }
.trim-table thead th.groupe { text-align: center; }
.trim-table thead th.sous { border-top: 0; }
.trim-table .n, .sam-table .n { text-align: right; }
/* colonnes de chiffres serrées à gauche : la colonne des mentions prend la place qui reste */
.trim-table .n { width: 104px; }
.trim-table .ret { width: 168px; }
.trim-table .cumul { width: var(--trim-cumul); min-width: var(--trim-cumul); }
.trim-table th.an, .trim-table .ret, .trim-table .cumul { position: sticky; z-index: 1; background: var(--surface); }
.trim-table th.an { left: 0; }
.trim-table .cumul { right: 0; }
.trim-table .ret { right: var(--trim-cumul); }
.trim-table thead th.an, .trim-table thead th.ret, .trim-table thead th.cumul, .trim-table tfoot th.an, .trim-table tfoot td.ret, .trim-table tfoot td.cumul { background: #FAFBFC; }
.trim-defile.deborde .trim-table th.an { box-shadow: 1px 0 0 var(--border); }
.trim-defile.deborde .trim-table .ret, .trim-defile.deborde .trim-table .aucune + .cumul { box-shadow: -1px 0 0 var(--border); }
.trim-table .mentions { width: auto; }
.trim-table .an { padding-left: 18px; width: 76px; }
.trim-table tbody th.an { font-weight: 700; font-size: 13.5px; }
.trim-table td.ret { white-space: nowrap; }
.trim-table td.ret .trim-cases { margin-right: 8px; }
.trim-table td.ret .r { display: inline-block; min-width: 1.1em; font-weight: 600; }
.trim-table td.cumul { color: var(--text-muted); }
.trim-table td.mentions { white-space: nowrap; }
.trim-table .acts { width: 46px; padding-right: 18px; text-align: right; }
.trim-table td.aucune { color: var(--text-subtle); font-style: italic; }
.trim-table tr.sans-activite th.an { font-weight: 500; color: var(--text-muted); }
.trim-table th .court { display: none; }
.trim-table tr.depliable { cursor: pointer; }
.trim-table tr.depliable:hover > * { background: var(--bg); }
/* (une année sans détail ne se déplie pas : elle ne change pas de fond au survol, contrairement aux lignes des autres tableaux) */
.trim-table tbody tr.an:not(.depliable):hover > td { background: var(--surface); }
.trim-table tr.masquee { display: none; }
.trim-table .chevron { display: inline-block; font-size: 16px; color: var(--text-subtle); transition: transform .15s; }
.trim-table tr.ouverte .chevron { transform: rotate(180deg); }
.trim-table tr.detail > td { padding: 8px 18px 12px 94px; background: #FAFBFC; }
/* le détail d'une année tient dans la largeur du cadre et y reste, même quand le tableau, plus large, défile */
.trim-table tr.detail .cadre { position: sticky; left: 94px; max-width: 100%; }
@supports (width: 1cqw) { .trim-table tr.detail .cadre { width: calc(100cqw - 112px); } }
/* (la règle générale des tableaux retire le trait sous la dernière ligne : ici chaque ligne garde le sien — la dernière peut
   être masquée par un filtre —, et la ligne du total n'en ajoute pas ; pour le salaire annuel moyen, l'en-tête de ligne suit) */
.trim-table tbody tr:last-child > * { border-bottom: 1px solid var(--border); }
.trim-table tfoot th, .trim-table tfoot td { font-weight: 600; background: #FAFBFC; border-bottom: 0; }
.sam-table tbody tr:last-child th { border-bottom: 0; }
.mention { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; line-height: 1.5; }
.mention.m-orange { background: var(--orange-bg); color: var(--orange); }
.mention.m-bleu { background: var(--bleu-bg); color: var(--bleu); }
.mention.m-gris { background: var(--gris-bg); color: var(--gris); }
.trim-detail { list-style: none; margin: 0 0 6px; padding: 0; font-size: 12.5px; }
.trim-detail li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 3px 0; }
.trim-detail li.ecarte { color: var(--text-muted); }
.trim-detail .sub { font-size: 12px; color: var(--text-muted); }
.trim-detail .type-trim { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.vers-carriere { font-size: 12px; }
.trim-pied { display: grid; gap: 6px; margin: 0; padding: 12px 18px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.trim-pied > div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; }
.trim-pied dt { color: var(--text-muted); }
.trim-pied .controle.manque dd { color: var(--orange); }
.trim-pied .controle.concordant dd { color: var(--vert); }
.sam-bloc { padding: 4px 18px 16px; }
.sam-bloc + .sam-bloc { padding-top: 14px; border-top: 1px solid var(--border); }
.sam-bloc h3 { margin-bottom: 8px; font-size: 14px; }
.sam-bloc p { margin: 6px 0 8px; }
.sam-bloc p.sub { font-size: 12px; color: var(--text-muted); }
.sam-bloc p.vide { color: var(--text-muted); font-style: italic; }
.sam-table th, .sam-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-weight: 400; }
/* (les intitulés de colonne passent à la ligne, les montants jamais : sans cela, avec la barre latérale, le montant retenu sortait du cadre) */
.sam-table thead th { white-space: normal; }
.sam-table td.n { white-space: nowrap; }
.sam-table tbody th { font-weight: 600; }
.sam-table tbody th .sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--text-muted); }
.sam-table td.retenu, .sam-table td.total { font-weight: 600; }
.sam-table .an { width: 76px; }
.sam-table .contrat { display: block; }
.sam-table .contrat .regime { color: var(--text-muted); }
.sam-table .contrat .sub { font-size: 12px; color: var(--text-subtle); }
/* (un montant ne se coupe pas au milieu : la ligne passe entre le régime, le montant, son équivalent en euros et les jours) */
.sam-table .contrat .montant, .sam-table .contrat .sub { white-space: nowrap; }
.sam-table .aucune { font-size: 12.5px; font-style: italic; color: var(--text-subtle); }
.sam-table tr.sans-revenu th { font-weight: 500; color: var(--text-muted); }
.sam-notes { margin-top: 10px; font-size: 12.5px; }
.sam-notes summary { cursor: pointer; color: var(--lien); }
.sam-notes ul { margin: 6px 0 0 18px; }
.sam-limite p { max-width: 920px; font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 900px) {
  .sous-onglets { overflow-x: auto; }
  .trim-chiffres { gap: 8px 22px; }
  .trim-table th, .trim-table td { padding: 5px 6px; }
  .trim-table { --trim-cumul: 54px; }
  .trim-table .n, .trim-table .ret { width: auto; }
  .trim-table .cumul { width: var(--trim-cumul); }
  .trim-table thead th { white-space: normal; }
  /* (v1.25) l'intitulé commun « Assimilés » se cale à gauche : centré, il se trouvait sous la colonne collée des retenus tant que
     le tableau n'avait pas défilé */
  .trim-table thead th.groupe { text-align: left; }
  .trim-table .an { padding-left: 12px; width: auto; }
  .trim-table .acts { width: 30px; padding-right: 10px; }
  .trim-table td.ret .trim-cases { display: none; }
  .trim-table th .long { display: none; }
  .trim-table th .court { display: inline; }
  .trim-table td.mentions .mention { margin-left: 0; margin-right: 3px; }
  .trim-table tr.detail > td { padding-left: 12px; }
  /* (sans les unités cqw : la largeur de l'écran, moins les marges de la page et de la carte) */
  .trim-table tr.detail .cadre { left: 12px; width: calc(100vw - 72px); }
  @supports (width: 1cqw) { .trim-table tr.detail .cadre { width: calc(100cqw - 30px); } }
  .trim-detail .type-trim { margin-left: 0; }
  .trim-pied > div { grid-template-columns: 1fr; gap: 0; }
  .sam-table th, .sam-table td { padding: 6px 6px; }
  .sam-table .an { width: auto; }
}
@media (max-width: 600px) {
  /* sur un téléphone, le tableau des hypothèses devient une suite de fiches, chaque montant sous son intitulé (data-libelle) :
     le salaire annuel moyen retenu ne doit pas se trouver hors de l'écran */
  .sam-table.fiches thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sam-table.fiches, .sam-table.fiches tbody, .sam-table.fiches tr, .sam-table.fiches th { display: block; }
  .sam-table.fiches tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .sam-table.fiches tbody tr:last-child { border-bottom: 0; }
  .sam-table.fiches th, .sam-table.fiches td { padding: 2px 0; border: 0; }
  .sam-table.fiches td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; }
  .sam-table.fiches td::before { content: attr(data-libelle); font-weight: 400; color: var(--text-muted); text-align: left; white-space: normal; }
}

/* ─── v1.25 (US-50) — crédits des conseillers ─── */
/* .credits-solde : le solde du conseiller, à côté de « Nouveau dossier » (gris ; orange au seuil d'alerte ; rouge : épuisé).
   .credits-note : le rappel au-dessus du formulaire « Nouveau dossier ». · .credits-epuises : la page sans crédit.
   .credits-admin : administration des crédits (compteurs par conseiller, journal, formulaires). */
.credits-solde { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--gris-bg); color: var(--gris); white-space: nowrap; }
.credits-solde.bas { background: var(--orange-bg); color: var(--orange); }
.credits-solde.epuise { background: var(--rouge-bg); color: var(--rouge); }
.credits-note { margin: -8px 0 14px; font-size: 12.5px; color: var(--text-muted); }
.credits-note.bas { color: var(--orange); }
.card.credits-epuises { max-width: 720px; border-color: #FECACA; }
.card.credits-epuises p { margin: 8px 0; font-size: 13.5px; }
.credits-admin .credits-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.credits-admin .filtres label { font-size: 12.5px; color: var(--text-muted); }
.credits-admin .filtres .paire { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.credits-admin .filtres input[type=date] { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; font-size: 13px; }
.credits-admin table tfoot th, .credits-admin table tfoot td { padding: 11px 14px; font-weight: 600; background: #FAFBFC; border-top: 1px solid var(--border-strong); text-align: left; }
.credits-admin table tfoot td.num { text-align: right; }
.credits-admin table .credits-solde { padding: 2px 10px; font-weight: 600; }
/* v1.29 (retour de Damien du 15/11/2026, L.3) : dans la colonne « Solde », les chiffres tombent sous l'intitulé et au-dessus du
   total — la pastille déborde de sa marge intérieure dans celle de la cellule, au lieu de décaler son nombre vers la gauche */
.credits-admin table td.num .credits-solde { margin-right: -10px; }
.credits-admin table .sub.email, #credits-mouvements td.motif { overflow-wrap: anywhere; }
#credits-mouvements td.mouvement { white-space: nowrap; }
.credits-admin .champ + .champ { margin-top: 12px; }
.credits-formulaires { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.page-header h1 .credits-solde { font-size: 13px; letter-spacing: 0; }
td.credits a.credits-solde { padding: 2px 10px; font-weight: 600; text-decoration: none; }
td.credits a.credits-solde:hover { text-decoration: underline; }
/* Comptes : avec la colonne « Crédits », le tableau se resserre sous 1 120 px pour garder sa place dans son cadre — ce cadre-là ne
   défile pas au-dessus de 900 px (les menus « ⋯ » s'ouvrent par-dessus) : un tableau trop large en sortirait */
@media (max-width: 1120px) {
  .comptes-table thead th, .comptes-table tbody td { padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 900px) {
  .credits-formulaires { grid-template-columns: 1fr; gap: 0; }
  /* le journal défile dans son cadre : le motif et l'auteur gardent une largeur lisible au lieu de se replier mot à mot */
  #credits-mouvements td.motif { min-width: 190px; }
  #credits-mouvements td.par { min-width: 150px; }
}
@media (max-width: 600px) {
  /* sur un téléphone, la liste des conseillers devient une suite de fiches, chaque nombre sous son intitulé (data-libelle) : le
     solde et le bouton « Créditer » ne doivent pas se trouver hors de l'écran */
  .credits-fiches thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .credits-fiches, .credits-fiches tbody, .credits-fiches tfoot, .credits-fiches tr, .credits-fiches th, .credits-fiches td { display: block; }
  .credits-fiches tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .credits-fiches tbody tr:last-child { border-bottom: 0; }
  .credits-fiches tbody td, .credits-admin table.credits-fiches tfoot th, .credits-admin table.credits-fiches tfoot td { padding: 2px 0; border: 0; background: none; }
  .credits-fiches td.num, .credits-admin table.credits-fiches tfoot td.num { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .credits-fiches td.num::before { content: attr(data-libelle); font-weight: 400; color: var(--text-muted); }
  .credits-admin table.credits-fiches td.num .credits-solde { margin-right: 0; }   /* en fiche, la pastille reste dans sa carte */
  .credits-fiches tbody td.acts { padding-top: 8px; }
  .credits-fiches tfoot tr { border-top: 1px solid var(--border-strong); border-bottom: 0; }
  .credits-fiches tfoot td.acts { display: none; }
}

/* ─── v1.27 — Comptes : le nom et l'adresse se replient ─── */
/* Vu en livrant la v1.27 : un nom ou une adresse un peu longs poussaient le tableau hors de son cadre — qui ne défile pas au-dessus
   de 900 px, les menus « ⋯ » s'ouvrant par-dessus — et la page défilait de côté. Le nom se replie entre deux mots, l'adresse là où
   il le faut, et seulement quand la place manque. */
.comptes-table .cellule-nom a { white-space: normal; }
.comptes-table td.email { overflow-wrap: anywhere; }

/* ─── v1.27.1 — Comptes : le tableau garde sa place dans son cadre, quel que soit le contenu de ses colonnes ─── */
/* Mesuré en ligne après la v1.27, sur les comptes réels : avec la ligne de l'administrateur connecté (« vous », « Administrateur »)
   et une invitation expirée, le tableau sortait encore de son cadre entre 901 et 1 009 px de large. La pastille du statut se replie
   entre deux mots ; « vous » suit le nom dans son bloc (.nom-compte) et passe dessous quand la place manque. De 901 à 1 010 px —
   avant que le menu latéral se replie —, les cellules se resserrent et les initiales s'effacent : c'est la place qu'il faut au pire
   contenu de chaque colonne (un mot de douze lettres dans le nom, « Administrateur », « Invitation expirée »), marge comprise
   pour une police plus large. */
.comptes-table .badge { white-space: normal; }
.comptes-table .nom-compte .badge { margin-left: 4px; }
@media (min-width: 901px) and (max-width: 1010px) {
  .comptes-table thead th, .comptes-table tbody td { padding-left: 5px; padding-right: 5px; }
  .comptes-table .avatar { display: none; }
}

/* ─── v1.29 (retours d'écran de Damien du 15/11/2026) ─── */
/* L.6 — l'export du dossier : un seul bouton (v1.48 : en tête de l'onglet « Étude retraite », .etude-tete) ; jusqu'à la v1.46, dans la continuité des onglets (.ligne-onglets : la barre des onglets, puis le menu
   .menu-export, hors de la barre — elle défile sur un écran étroit et couperait la liste). Le bouton a la hauteur d'un onglet ; sa
   liste s'ouvre sous lui, alignée sur son bord droit. Quand la ligne n'a plus la place des onglets et du bouton, le bouton passe
   dessous : jusqu'à 1 060 px de large il se cale à droite — sa liste, alignée à droite, sortirait sinon de la page par la gauche. */
.ligne-onglets { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.ligne-onglets .etapes-onglets { margin-bottom: 0; min-width: 0; }
.menu-export { flex: none; }
.menu-export > .btn { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 12.5px; line-height: 20px; color: var(--text); gap: 6px; }
.menu-export > .btn:hover, .menu-export.ouvert > .btn { background: var(--bg); color: var(--text); }
.menu-export > .btn .chevron { color: var(--text-subtle); font-size: 13px; line-height: 1; transition: transform .15s; }
.menu-export.ouvert > .btn .chevron { transform: rotate(180deg); }
.menu-export .liste { min-width: 190px; margin-top: 4px; }
.menu-export .liste .sub { font-size: 12px; color: var(--text-muted); }
@media (max-width: 1060px) {
  .menu-export { margin-left: auto; }
}

/* ─── v1.30 — Carrière : l'historique des corrections d'un enregistrement dit ce que le calcul des pensions en a fait ─── */
/* Sept colonnes désormais (« Calcul des pensions », avec la raison quand une correction n'est pas reprise). Sur un écran étroit, la
   table poussait la page de côté dès qu'on ouvrait l'historique : elle y garde une largeur lisible et défile dans son cadre. */
/* Les deux avis de l'onglet (carrière changée depuis la génération ; corrections non reprises en entier) : dans les marges de la carte,
   sous les filtres. Celui qui signale ce que le calcul n'a pas repris prend la couleur d'une alerte. */
.carriere-avis { padding: 8px 18px; border-bottom: 1px solid var(--border); }
.carriere-avis .etiquette { margin: 4px 0; }
.etiquette.attention { color: var(--orange); background: var(--orange-bg); }
/* … et, sur l'enregistrement lui-même, la raison en clair : ni survol ni défilement pour la lire */
.enr .calcul-raison { margin: 8px 0 2px; }
@media (max-width: 900px) {
  .origines { overflow-x: auto; }
  .origines-table.corrections-table { min-width: 620px; }
}

/* ─── v1.31 (retours de Damien du 15/11/2026, L.4 et L.5) — crédits du conseiller ─── */
/* Barre latérale : l'entrée « Crédits » porte le solde, dans la pastille des compteurs du menu — sombre comme celle des dossiers,
   orange au seuil d'alerte, rouge à zéro (les couleurs de .credits-solde). Menu replié, elle se pose sur le picto, comme l'autre. */
.sidebar nav a .compte.credits.bas { background: var(--orange-bg); color: var(--orange); }
.sidebar nav a .compte.credits.epuise { background: var(--rouge-bg); color: var(--rouge); }
/* Le solde à côté de « Nouveau dossier » est devenu un lien vers « Mes crédits » : il garde son dessin de pastille */
a.credits-solde { text-decoration: none; }
a.credits-solde:hover { text-decoration: underline; color: var(--gris); }
a.credits-solde.bas:hover { color: var(--orange); }
a.credits-solde.epuise:hover { color: var(--rouge); }
.credits-epuises-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.credits-note.epuise { margin: 0 0 12px; color: var(--rouge); }
/* « Mes crédits » : la demande de crédits à VAULT, puis l'historique. Côté administrateur, la carte de la demande en attente. */
.card.credits-conseiller { max-width: 920px; }
.credits-conseiller .champ + .champ { margin-top: 12px; }
.credits-conseiller .champ input[type=number] { max-width: 140px; }
.credits-conseiller .champ label .facultatif { font-weight: 400; }
.credits-conseiller > .sub, .credits-conseiller > form + .sub, .demande-attente > .sub { margin-top: 12px; font-size: 12.5px; }
.demande-dite { margin: 0 0 8px; font-size: 13.5px; }
.demande-message { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--border-strong); background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 13px; overflow-wrap: anywhere; }
.card.demande-attente { border-color: #FED7AA; }
.demande-marque { margin-top: 5px; }
/* La marque d'une demande en attente ne doit jamais élargir la colonne « Conseiller », qui se resserre sur un écran moyen (v1.25) :
   sinon le tableau sort de sa carte et les boutons « Créditer » avec lui. Elle passe donc à la ligne entre ses mots — chaque ligne
   garde son fond — et, en dernier recours, dans un mot ; elle se passe du point des autres pastilles. */
.demande-marque a.badge { display: inline; white-space: normal; overflow-wrap: anywhere; padding: 3px 7px; line-height: 23px; text-decoration: none;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.demande-marque a.badge .pt { display: none; }
.demande-marque a.badge:hover { text-decoration: underline; color: var(--orange); }
.credits-admin .champ label.coche { display: flex; font-size: 13px; font-weight: 400; color: var(--text); margin-bottom: 0; }
.demandes-precedentes { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.demandes-precedentes .titre { font-weight: 600; margin-bottom: 4px; }
.demandes-precedentes ul { list-style: none; margin: 0; padding: 0; }
.demandes-precedentes li { padding: 2px 0; }
.demandes-precedentes .quand { font-variant-numeric: tabular-nums; }
#mes-credits-mouvements td.date, #mes-credits-mouvements td.mouvement { white-space: nowrap; }
#mes-credits-mouvements td.nombre { font-weight: 600; font-variant-numeric: tabular-nums; }
#mes-credits-mouvements td.nombre.plus { color: #166534; }
#mes-credits-mouvements td.detail, #credits-demandes-table td.motif { overflow-wrap: anywhere; }
#credits-demandes-table td.suite { min-width: 170px; }
@media (max-width: 900px) {
  /* les demandes d'un conseiller défilent dans leur cadre : le message et la suite gardent une largeur lisible */
  #credits-demandes .table-scroll { overflow-x: auto; }
  #credits-demandes-table td.motif { min-width: 190px; }
  #credits-demandes-table td.par { min-width: 140px; }
}
@media (max-width: 600px) {
  /* sur un téléphone, chaque mouvement de « Mes crédits » devient une fiche : la date et le mouvement à gauche, le nombre à droite,
     le solde et le détail dessous — rien ne sort de l'écran, et la page ne défile pas de côté */
  #mes-credits-mouvements thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #mes-credits-mouvements, #mes-credits-mouvements tbody { display: block; }
  #mes-credits-mouvements tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  #mes-credits-mouvements tbody tr:last-child { border-bottom: 0; }
  #mes-credits-mouvements tbody td { display: block; padding: 0; border: 0; background: none; text-align: left; }
  #mes-credits-mouvements td.date { grid-column: 1; grid-row: 1; font-size: 12px; color: var(--text-muted); white-space: normal; }
  #mes-credits-mouvements td.mouvement { grid-column: 1; grid-row: 2; font-weight: 600; white-space: normal; }
  #mes-credits-mouvements td.nombre { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 16px; }
  #mes-credits-mouvements td.solde { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--text-muted); }
  #mes-credits-mouvements td.solde::before { content: attr(data-libelle) "\00a0: "; }
  #mes-credits-mouvements td.detail { grid-column: 1 / -1; grid-row: 4; }
  #mes-credits-mouvements td.detail:empty { display: none; }
}

/* ─── v1.32 (retour de Damien du 15/11/2026, L.7) : statut « Clos » ───
   v1.34 (son retour du même jour, à 20 h 53) : « Archiver » n'est plus un petit bouton gris à la suite du titre ; c'est un bouton
   ordinaire parmi les actions du dossier, à côté de « Clore le dossier » — les règles du bouton discret sont retirées. */
/* ce que « clos » veut dire, en haut de chaque onglet du dossier */
.bandeau-clos .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; }
/* v1.34 — sur un téléphone, les deux changements de statut restent côte à côte : la génération garde sa ligne, « Clore le
   dossier » et « Archiver » se partagent la suivante (sans cette règle : « Régénérer » et « Clore » ensemble, « Archiver » seul
   dessous). Règle d'écran étroit : après le bloc de 900 px qui empile les actions de l'en-tête. */
@media (max-width: 600px) {
  .page-header .actions > .action-generation { flex-basis: 100%; }
}

/* ─── v1.37 : État technique, second tableau (version, base, stockage, sauvegarde, sonde de santé…) ───
   Ses deux colonnes : l'intitulé, et la valeur en caractères à chasse fixe. Sur un téléphone, chaque ligne devient une fiche —
   l'intitulé, puis la valeur dessous, sur toute la largeur — et les longues valeurs d'un seul tenant (l'adresse de la sonde de
   santé, un chemin) passent à la ligne au lieu d'élargir la page (consigne de Damien du 16/11/2026 : sur un téléphone, faire au
   mieux). Règle d'écran étroit : en fin de feuille. */
#etat-infos td.cle { width: 280px; font-weight: 600; }
#etat-infos td.valeur { font-family: ui-monospace, monospace; font-size: 12.5px; }
@media (max-width: 600px) {
  #etat-infos, #etat-infos tbody, #etat-infos tr, #etat-infos td { display: block; }
  #etat-infos tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  #etat-infos tr:first-child { padding-top: 0; }
  #etat-infos tr:last-child { border-bottom: 0; padding-bottom: 0; }
  #etat-infos td { padding: 0; border: 0; background: none; overflow-wrap: anywhere; }
  #etat-infos td.cle { width: auto; margin-bottom: 3px; }
}

/* ─── v1.40 — onglet Carrière, vue « Diagnostic » (US-23, retour D.3 de Damien du 11/11/2026) ───
   Le constat (#diagnostic-table : élément, constat, d'où il vient) et les régimes cotisés reprennent les tableaux du salaire
   annuel moyen (.sam-bloc, .sam-table, fiches sur un téléphone) ; « non établi » se distingue (.nc) ; ce qui n'a pas pu être
   établi est une liste (.diag-manques). Sur un téléphone (consigne du 16/11/2026 : faire au mieux), « D'où il vient » passe
   sous son intitulé, aligné à gauche. Règle d'écran étroit : en fin de feuille. */
.card.diagnostic { padding: 0; overflow: visible; }
.diag-table tbody th[scope="row"] { width: 210px; font-weight: 600; }
.diag-table td.constat { width: 280px; font-weight: 600; }
.diag-table td.source { color: var(--text-muted); font-size: 12.5px; }
.diag-table .nc { color: var(--orange); font-style: italic; font-weight: 500; }
.diag-manques { margin: 6px 0 0; padding-left: 18px; }
.diag-manques li { margin: 3px 0; }
/* Lot V2·13 (US-24) : la section « Carrière longue » du Diagnostic — le constat (pastille et phrase), puis ses conditions */
.cl-constat { margin: 0 0 10px; line-height: 1.5; }
.cl-constat .badge { margin-right: 6px; }
@media (max-width: 600px) {
  .diag-table.fiches tbody th[scope="row"], .diag-table.fiches td.constat { width: auto; }
  .diag-table.fiches td.source { display: block; text-align: left; }
  .diag-table.fiches td.source::before { display: block; margin-bottom: 1px; }
}

/* ─── v1.42 — onglet « Étude retraite » (US-39) : l'étude retraite du dossier à l'écran, le document des exports écrit par ExportHtml ───
   Charte des exports (bleu marine 1E3257, or C9A44A, bleu clair E8EDF4, encadrés d'Export::ENCADRES). Un tableau trop large défile
   dans son cadre au lieu d'élargir la page. Sur un téléphone (consigne du 16/11/2026 : faire au mieux), une fiche passe l'intitulé
   au-dessus de sa valeur. Règle d'écran étroit : en fin de feuille. */
.etude-aide { font-size: 13px; color: var(--text-muted); margin: -8px 0 14px; }
/* US-154 : couverture sur les deux colonnes ; le sommaire suit le défilement jusqu'à la fin des parties.
   L'étude laisse le débordement visible pour permettre ce suivi ; seuls les cadres des tableaux défilent. */
.etude { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 18px; align-items: start; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0 28px 28px; max-width: 980px; color: #1F2937; font-size: 13.5px; line-height: 1.5; }
.etude-parties { min-width: 0; }
.etude .table-scroll { overflow-x: auto; }
.etude-couverture { grid-column: 1 / -1; margin: 0 -28px 20px; padding: 26px 28px 20px; background: #1E3257; color: #fff; border-bottom: 4px solid #C9A44A; border-radius: 11px 11px 0 0; }
.etude-couverture .titre { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.etude-couverture .assure { margin: 6px 0 12px; font-size: 18px; color: #E9D9A8; }
.etude-couverture .lignes { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: #D6DDEA; }
.etude-couverture .lignes li { margin: 2px 0; }
.etude-couverture .pied { margin: 12px 0 0; font-size: 11.5px; color: #B9C3D6; }
.etude-sommaire { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; background: #FAFBFD; }
.etude-sommaire .titre { margin: 0 0 6px; font-weight: 700; color: #1E3257; letter-spacing: .5px; font-size: 12.5px; }
.etude-sommaire ul { list-style: none; margin: 0; padding: 0; }
.etude-sommaire li { margin: 6px 0; }
.etude-sommaire a { color: #1E3257; font-weight: 600; text-decoration: none; }
.etude-sommaire a:hover { text-decoration: underline; }
.etude-sommaire .sous { display: block; font-size: 12px; color: var(--text-muted); }
.etude-t1 { font-size: 18px; color: #1E3257; border-bottom: 2px solid #C9A44A; padding-bottom: 4px; margin: 26px 0 12px; scroll-margin-top: 12px; }
.etude-t2 { font-size: 15px; color: #1E3257; margin: 18px 0 8px; }
.etude-t3 { font-size: 13.5px; color: #1E3257; margin: 14px 0 6px; }
.etude-texte { margin: 6px 0; }
.etude-texte.intro { font-size: 14px; }
.etude-texte.note { font-size: 12.5px; color: #555; font-style: italic; }
.etude-texte.gras { font-weight: 700; }
.etude-liste { margin: 6px 0 10px; padding-left: 20px; }
.etude-liste li { margin: 3px 0; }
.etude-cadre { margin: 8px 0 14px; }
.etude table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.etude table th, .etude table td { border: 1px solid #BFBFBF; padding: 5px 8px; vertical-align: top; text-align: left; }
.etude-fiche th[scope="row"] { width: 34%; background: #1E3257; color: #fff; font-weight: 600; }
.etude-tableau thead th { background: #1E3257; color: #fff; font-weight: 600; text-align: center; }
.etude-tableau .a-c { text-align: center; }
.etude-tableau .a-d { text-align: right; }
.etude-tableau tr.l-total td { background: #E8EDF4; font-weight: 700; }
.etude-tableau tr.l-ecarte td { color: #555; font-style: italic; }
.etude-tableau tr.l-alerte td { color: #C00000; }
.etude-tableau tr.l-bandeau td { background: #C9A44A; color: #fff; font-weight: 700; }
.etude-tableau tr.l-vide td { background: #F2F2F2; color: #555; font-style: italic; }
.etude-tableau tr.l-note td { background: #FFFFE0; color: #333; font-style: italic; }
.etude-encadre { border: 1px solid; border-radius: 6px; padding: 8px 12px; margin: 10px 0 14px; }
.etude-encadre p { margin: 0; }
.etude-encadre .titre { font-weight: 700; margin-bottom: 3px; }
.etude-encadre.attention { background: #FFFFE0; border-color: #C9A44A; }
.etude-encadre.information { background: #FFF3E0; border-color: #E0A458; }
.etude-encadre.alerte { background: #FDECEC; border-color: #D98A8A; }
.etude-encadre.favorable { background: #E8F5E9; border-color: #8DBF8F; }
.etude-formule { border: 1px solid #BFBFBF; margin: 8px 0 14px; }
.etude-formule .titre { margin: 0; background: #1E3257; color: #fff; font-weight: 600; padding: 5px 10px; }
.etude-formule .corps { background: #E8EDF4; padding: 6px 10px; text-align: center; }
.etude-formule .corps p { margin: 4px 0; font-weight: 700; }
.etude-formule .corps p.premiere { font-weight: 400; font-style: italic; }
.etude-manque p { margin: 0 0 6px; font-size: 13.5px; }
/* v1.48 (US-113) — le bouton « Exporter » en tête de l'étude, à droite du titre ; sur un écran étroit il passe dessous, calé à droite
   (sa liste, alignée sur son bord droit, sortirait sinon de la page par la gauche). Le menu garde le dessin .menu-export (v1.29). */
.etude-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; max-width: 980px; margin-bottom: 16px; }
.etude-tete h2.titre-section { margin: 4px 0; }
.etude-tete .menu-export { margin-left: auto; }
@media (max-width: 600px) {
  .etude { padding: 0 14px 18px; border-radius: 8px; font-size: 13px; }
  .etude-couverture { margin: 0 -14px 16px; padding: 18px 14px 14px; }
  .etude-couverture .titre { font-size: 21px; }
  .etude-fiche, .etude-fiche tbody, .etude-fiche tr, .etude-fiche th, .etude-fiche td { display: block; width: auto; }
  .etude-fiche th[scope="row"] { width: auto; border-bottom: 0; }
  .etude-fiche td { overflow-wrap: anywhere; }
  .etude-fiche tr + tr th[scope="row"] { border-top: 0; }
}

/* ─── v1.43 — vue « Salaire annuel moyen » : le détail du calcul, année par année (demande de Damien du 15/11/2026) ───
   Le tableau des revenus (.sam-table.sam-detail) gagne le salaire annuel, le plafond de la sécurité sociale, le salaire
   écrêté, le coefficient de revalorisation, le salaire retenu et la colonne « Dans la moyenne » : une année retenue est
   marquée (ligne .retenue, pastille .sam-marque), une année écartée par la règle porte sa raison (.ecart, .note). Les années
   projetées de chaque hypothèse sont dans un volet (.sam-projection), au même dessin. Sur un téléphone (consigne du
   16/11/2026 : faire au mieux), chaque année devient une fiche, comme le tableau des hypothèses. Règle d'écran étroit : en
   fin de feuille. */
.sam-table.sam-detail tbody tr.retenue > * { background: #F3FBF5; }
.sam-table.sam-detail thead th.n { min-width: 92px; }
.sam-table.sam-detail td.moyenne { min-width: 128px; white-space: normal; }
.sam-table.sam-detail .sam-marque { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--vert-bg); color: var(--vert); font-size: 12px; font-weight: 600; white-space: nowrap; }
.sam-table.sam-detail .ecart { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--orange-bg); color: var(--orange); font-size: 12px; font-weight: 600; white-space: nowrap; }
.sam-table.sam-detail .hors { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.sam-table.sam-detail .note { display: block; max-width: 300px; margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.sam-table.sam-detail tr.ecartee td.retenu { font-weight: 400; color: var(--text-muted); }
.sam-projection { margin-top: 8px; }
.sam-projection .trim-defile { margin-top: 8px; }
.sam-projection .sam-table { border-top: 1px solid var(--border); }

@media (max-width: 600px) {
  /* le détail en fiches : une année par fiche, chaque montant sous son intitulé ; les revenus et la raison d'une année écartée
     reviennent à la ligne sous leur intitulé plutôt que de se serrer à droite */
  .sam-table.fiches.sam-detail td.revenus, .sam-table.fiches.sam-detail td.moyenne { display: block; text-align: left; min-width: 0; }
  .sam-table.fiches.sam-detail td.revenus::before, .sam-table.fiches.sam-detail td.moyenne::before { display: block; margin-bottom: 2px; }
  .sam-table.fiches.sam-detail .note { max-width: none; }
  .sam-table.fiches.sam-detail thead th.n { min-width: 0; }
  .sam-table.fiches.sam-detail tbody tr.retenue { background: #F3FBF5; }
  .sam-table.fiches.sam-detail tbody tr.retenue > * { background: transparent; }
}

/* ─── v1.46 (US-74) — double authentification des administrateurs : le code après le mot de passe, l'activation (QR code et clé),
   les codes de secours (pages au dessin de la connexion), et sa carte dans Mon compte. Le QR code est un SVG composé par
   l'application (QrCode.php) : sa marge blanche est dans l'image. Règle d'écran étroit : en fin de feuille. */
.double-auth .mono, .double-auth-carte .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.login-card.double-auth.large { max-width: 540px; }
.double-auth-titre { font-size: 17px; font-weight: 700; margin: 14px 0 10px; letter-spacing: -0.01em; }
.double-auth-texte { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.double-auth-texte strong { color: var(--text); }
.double-auth-texte.petit { font-size: 12px; margin: 14px 0; }
input.double-auth-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; letter-spacing: 0.12em; }
.double-auth-etapes { list-style: none; margin: 0 0 6px; padding: 0; }
.double-auth-etapes > li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; font-size: 13px; }
.double-auth-etapes > li > div { flex: 1; min-width: 0; }
.double-auth-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.double-auth-qr { margin: 10px 0 8px; }
.double-auth-qr svg.qr { display: block; width: 216px; height: 216px; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.double-auth-cle { margin-top: 6px; padding: 8px 10px; background: var(--gris-bg); border-radius: var(--radius-sm); font-size: 13px; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.double-auth-form { margin-top: 10px; }
.double-auth-form .btn-primary { width: 100%; justify-content: center; }
.double-auth-liens { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.double-auth-secours { list-style: none; margin: 0 0 4px; padding: 12px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; background: var(--gris-bg); border-radius: var(--radius-sm); font-size: 15px; letter-spacing: 0.05em; }
.double-auth-secours li { white-space: nowrap; }
.login-card.double-auth > .btn-primary { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }
.double-auth-carte .double-auth-texte { margin-bottom: 10px; }
.double-auth-peu { color: var(--orange); font-weight: 600; }
.double-auth-details { margin-top: 14px; }
.double-auth-details summary { cursor: pointer; font-size: 13px; color: var(--lien); }
.double-auth-details form { margin-top: 10px; }
@media print {
  .login-wrap { min-height: 0; background: #fff; }
  .login-card.double-auth { border: 0; }
  .login-card.double-auth > .btn-primary, .login-pied { display: none; }
}
@media (max-width: 600px) {
  .login-card.double-auth { padding: 26px 18px; }
  .double-auth-etapes > li { gap: 10px; }
  .double-auth-secours { gap: 8px 12px; font-size: 14px; }
}

/* ─── v1.46 (US-109) — Administration › Référentiels : le mémo des régimes calculés et non calculés (Perimetre::memo) ─── */
.memo-regimes .card-title .badge { font-weight: 500; }
.memo-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.memo-bloc { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.memo-bloc.calcules { background: #F3FBF5; border-color: #BBE5C8; }
.memo-bloc.non-calcules { background: var(--orange-bg); border-color: #F5C9A0; }
.memo-bloc h3 { margin: 0 0 8px; font-size: 13.5px; }
.memo-bloc h3 .sub { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.memo-ligne { display: flex; gap: 10px; font-size: 13px; margin-top: 6px; }
.memo-type { flex: none; width: 118px; color: var(--text-muted); font-size: 12px; padding-top: 1px; }
.memo-liste { flex: 1; min-width: 0; }
.memo-exceptions { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }
.memo-exceptions ul { margin: 4px 0 0; padding-left: 18px; }
.memo-regles { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }
.memo-regles b { color: var(--text); }
@media (max-width: 900px) {
  .memo-grille { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .memo-ligne { flex-direction: column; gap: 2px; }
  .memo-type { width: auto; }
}

/* ─── v1.47 — audit de la carrière (lot C : US-13, US-19 à US-22) ───
   Dans les enregistrements : une anomalie est une étiquette (.anomalie-ligne) posée sur l'année ou sur l'enregistrement qui la
   porte — orange tant qu'elle est ouverte, grise une fois résolue ou écartée —, avec ce qui est demandé (.demande) et le lien
   vers son suivi ; les points Agirc-Arrco attendus et leur écart sont une ligne sous le champ « Complémentaire » (.attendus).
   Dans la vue « Audit » : une fiche par anomalie (.anomalie), son formulaire de suivi (.suivi), puis le tableau des contrôles,
   au dessin de celui du diagnostic. Sur un téléphone (consigne du 16/11/2026 : faire au mieux), le formulaire de suivi passe
   en colonne. Règle d'écran étroit : en fin de feuille. */
.etiquette.anomalie-ligne { line-height: 1.5; }
.etiquette.anomalie-ligne.fermee { color: var(--text-muted); background: var(--gris-bg); }
.etiquette.anomalie-ligne .demande { display: block; color: var(--text-muted); }
.etiquette.anomalie-ligne .suivre { font-weight: 600; white-space: nowrap; }
.etiquette.anomalie-ligne .badge { padding: 1px 7px; }
.annee.vide .libs .etiquette { margin: 6px 0 2px; font-style: normal; }
.enr-champs .complementaire .attendus { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.enr-champs .complementaire .aucun-droit { color: var(--text-muted); }
.enr-champs .complementaire .val { overflow-wrap: anywhere; }
.audit .anomalie { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 10px 0; }
.audit .anomalie.ouverte { border-left-color: var(--orange); }
.audit .anomalie:target { box-shadow: 0 0 0 2px var(--lime-soft); }
.audit .anomalie-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.audit .anomalie-tete > div { min-width: 0; overflow-wrap: anywhere; }
.audit .anomalie p { margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.audit .anomalie .demande .lab { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-subtle); margin-right: 6px; }
/* v1.57 — les cas normaux reconnus par l'audit (gardes), sous la liste des contrôles */
.audit #audit-gardes h4 { font-size: 13.5px; margin: 14px 0 4px; }
.audit .liste-gardes { margin: 6px 0 10px; padding-left: 18px; font-size: 13px; }
.audit .liste-gardes li { margin: 3px 0; overflow-wrap: anywhere; }
.audit .anomalie .suivi { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.audit .anomalie .suivi .champ { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 0; }
.audit .anomalie .suivi .champ.commentaire { flex: 1 1 280px; min-width: 0; }
.audit .anomalie .suivi .champ .sub { font-weight: 400; }
.audit .anomalie .suivi select, .audit .anomalie .suivi input[type=text] { width: 100%; }
.audit .suivi-table td:last-child { overflow-wrap: anywhere; }
.audit #audit-controles-table tbody th[scope="row"] { width: 46%; font-weight: 500; }
.audit #audit-controles-table td.constat { width: 90px; }
@media (max-width: 600px) {
  .audit .anomalie .suivi { flex-direction: column; align-items: stretch; }
  .audit .anomalie .suivi .champ.commentaire { flex: 0 0 auto; }
  .audit #audit-controles-table tbody th[scope="row"], .audit #audit-controles-table td.constat { width: auto; }
}

/* ─── V2·12 — hypothèse de fin de carrière (US-49) ───
   Onglet Projection, sous-onglet « Hypothèse » : la carte de l'hypothèse (.hypothese-fin — sa fiche, ce que VAULT a retenu, les
   notes du moteur) et sa fenêtre (.form-hypothese) : trois situations au choix, puis les seuls champs du type choisi (:has, sans
   JavaScript ; les autres restent dans le formulaire, cachés, et le serveur ne les lit pas). Sur un téléphone (consigne du
   16/11/2026 : faire au mieux), la fiche passe en colonne. Règle d'écran étroit : en fin de feuille. */
.card.hypothese-fin { padding: 0; }
.hypothese-fin .carriere-tete .btn { flex-shrink: 0; }
.hypothese-corps { padding: 0 18px 16px; font-size: 13px; }
.hypothese-corps > p { margin: 0 0 8px; line-height: 1.5; }
.hypothese-fiche { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; }
.hypothese-fiche > div { display: contents; }
.hypothese-fiche dt { color: var(--text-muted); font-size: 12.5px; }
.hypothese-fiche dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.proj-table.hypothese-retenu { width: auto; min-width: 60%; }
.proj-table.hypothese-retenu tbody th[scope="row"] { font-weight: 500; text-align: left; color: var(--text-muted); border-bottom: 1px solid var(--border); padding-right: 24px; }
.proj-table.hypothese-retenu tbody td { text-align: left; }
.hypothese-notes { margin: 10px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 12.5px; line-height: 1.5; }
.sous-onglets .marque-etat { color: var(--orange); margin-left: 4px; }
dialog.modal-enr .form-hypothese .hypothese-types { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; min-width: 0; }
dialog.modal-enr .form-hypothese .hypothese-types legend { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; padding: 0; }
dialog.modal-enr .form-hypothese .hypothese-type { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
dialog.modal-enr .form-hypothese .hypothese-type:has(input:checked) { border-color: var(--navy); background: var(--bleu-soft); }
dialog.modal-enr .form-hypothese .hypothese-type input { margin-top: 3px; }
dialog.modal-enr .form-hypothese .hypothese-type .aide { display: block; font-size: 11.5px; color: var(--text-subtle); }
dialog.modal-enr .form-hypothese .si-baisse, dialog.modal-enr .form-hypothese .si-chomage { display: none; }
dialog.modal-enr .form-hypothese:has(input[name="type"][value="baisse"]:checked) .si-baisse,
dialog.modal-enr .form-hypothese:has(input[name="type"][value="chomage"]:checked) .si-chomage { display: flex; }
/* V2·26 (US-138) : quatre hypothèses ; la date ne se montre que pour les trois du moteur — pas pour la poursuite de l'activité */
dialog.modal-enr .form-hypothese .si-date { display: none; }
dialog.modal-enr .form-hypothese:has(input[name="type"][value="arret"]:checked) .si-date,
dialog.modal-enr .form-hypothese:has(input[name="type"][value="baisse"]:checked) .si-date,
dialog.modal-enr .form-hypothese:has(input[name="type"][value="chomage"]:checked) .si-date { display: flex; }
.etude-manque .etude-choisir { margin: 12px 0 0; }
@media (max-width: 600px) {
  .hypothese-fiche { grid-template-columns: 1fr; gap: 0; }
  .hypothese-fiche dd { margin-bottom: 6px; }
  .hypothese-fin .carriere-tete { flex-direction: column; }
  .proj-table.hypothese-retenu { min-width: 0; width: 100%; }
}

/* Journal : les libellés longs restent dans la carte. */
.filtres-journal select { max-width: 100%; }

/* ─── V2·22 — la zone des messages du dossier (US-135) ───
   Sur la page d'un dossier, les messages (.flash) sont sous la ligne des onglets, avant les alertes (views/dossier_attente.php) :
   au dessin des bandeaux qui les suivent — même largeur, même retrait, même écart —, chacun dans sa couleur. */
.messages-dossier .flash { padding: 10px 16px; margin-bottom: 16px; line-height: 1.5; }

/* US-136 — les trois derniers débordements de l'administration.
   Le cadre des crédits défile sans les espacements de .defile : le tableau et les fiches gardent leurs retraits. */
#credits-conseillers .table-scroll { overflow-x: auto; }
.filtres-dossiers select, #reattribution select { max-width: 100%; }
@media (max-width: 600px) {
  .ref-colonnes { grid-template-columns: minmax(0, 1fr); }
}

/* ─── Lot V2·24 — le départ anticipé pour carrière longue dans la Projection (US-139) ───
   Quatre repères quand il est montré : quatre colonnes sur un écran large, deux en dessous de 1 200 px, une sur un écran étroit
   (déclaré ici, après le bloc de 900 px : la règle de quatre colonnes ne doit pas l'emporter sur lui). Sa mention sous son intitulé,
   dans le comparatif, au dessin des autres mentions. */
.kpi-cards.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.proj-table .col-hyp .mention-anticipe { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 500; color: #3730A3; white-space: normal; }
@media (max-width: 1200px) {
  .kpi-cards.quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kpi-cards.quatre { grid-template-columns: minmax(0, 1fr); }
}

/* US-154 : même passage à une colonne que les pages du référentiel. */
@media (max-width: 1100px) {
  .etude { display: block; }
  .etude-sommaire { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 600px) {
  .etude-couverture { border-radius: 7px 7px 0 0; }
}

/* US-155 : les mêmes repères en tête de Carrière et de Projection. */
.encart-reperes {
  display: flex;
  margin: 0 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.encart-reperes-case {
  flex: 0 0 min(17%, 200px);
  min-width: 0;
  padding: 10px 12px;
}
.encart-reperes-case + .encart-reperes-case { border-left: 1px solid var(--border); }
.encart-reperes-case[data-repere="carriere-longue"] {
  flex-basis: min(13%, 150px);
  background: var(--gris-bg);
}
.encart-reperes-depart { flex: 1 1 0; }
:where(.encart-reperes:not(:has(.encart-reperes-depart))) .encart-reperes-case { flex-grow: 1; }
.encart-reperes-titre {
  display: flex;
  align-items: flex-end;
  min-height: 2lh;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
  text-wrap: balance;
}
.encart-reperes-valeur, .encart-reperes-date { font-size: 16px; font-weight: 600; line-height: 1.25; }
.encart-reperes-valeur > bdi { white-space: nowrap; }
.encart-reperes-date { font-variant-numeric: tabular-nums; }
.encart-reperes-secondaire, .encart-reperes-age, .encart-reperes-trimestres {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
}
.encart-reperes-manquants { color: var(--orange); }
.encart-reperes + .proj-note { margin: -7px 0 14px; }
#mention-hypothese-reperes:has(+ #mention-age-projection) { margin-bottom: 0; }
#mention-hypothese-reperes + #mention-age-projection { margin: 3px 0 14px; }

@media (min-width: 1100px) and (max-width: 1250px) {
  .encart-reperes-case { padding-inline: 8px; }
}
@media (width < 1100px) {
  .encart-reperes { flex-wrap: wrap; }
  .encart-reperes::after { content: ""; flex: 0 0 100%; order: 1; }
  .encart-reperes .encart-reperes-case { flex: 1 1 0; }
  .encart-reperes-depart { order: 2; border-top: 1px solid var(--border); }
  .encart-reperes-case:not(.encart-reperes-depart) + .encart-reperes-depart { border-left: 0; }
}
/* Aux largeurs où quatre dates tiennent juste, préserver deux lignes pour le titre le plus long. */
@media (1100px <= width <= 1250px), (600px < width <= 700px) {
  .encart-reperes-depart[data-repere="taux_plein_auto"] { flex-grow: 1.2; }
}
@media (max-width: 600px) {
  .encart-reperes::after { content: none; }
  .encart-reperes .encart-reperes-case { flex-basis: 50%; flex-grow: 0; order: 0; padding: 8px 10px; }
  .encart-reperes-case:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .encart-reperes-case:nth-child(odd) { border-left: 0; }
  .encart-reperes-case:nth-child(even) { border-left: 1px solid var(--border); }
}
@media (max-width: 360px) {
  .encart-reperes .encart-reperes-case { padding-inline: 7px; }
  .encart-reperes-titre { font-size: 11px; }
}

/* US-163 : les prélèvements sociaux se lisent et se saisissent dans les Informations. */
.infos-prelevements { grid-column: 1 / -1; min-width: 0; }
.infos-prelevements p { margin: 8px 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.infos-prelevements .ligne dt { flex: 1; min-width: 0; }
.infos-prelevements .ligne dd { max-width: 55%; }
#saisie-prelevements { min-width: 0; margin: 18px 0 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
#saisie-prelevements legend { padding: 0 6px; font-size: 13px; font-weight: 600; }
#saisie-prelevements h4 { margin: 18px 0 6px; font-size: 13px; }
#saisie-prelevements > .aide { margin: 8px 0 14px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
#saisie-prelevements .prelevements-motif { margin-top: 14px; }
#saisie-prelevements input, #saisie-prelevements select { width: 100%; min-width: 0; }
@media (max-width: 600px) {
  .infos-prelevements .ligne { flex-direction: column; align-items: flex-start; gap: 3px; }
  .infos-prelevements .ligne dd { max-width: 100%; text-align: left; }
  #saisie-prelevements { padding: 10px; }
}

/* F3·8 — prélèvements sociaux : encart et fenêtre de lecture des montants du moteur. */
.prelevements-resume { margin: 16px 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.prelevements-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prelevements-tete h3 { font-size: 15px; }
.prelevements-phrase, .prelevements-mention { margin: 8px 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.prelevements-mention { color: var(--text-muted); }
.prelevements-montants { margin: 12px 0 0; max-width: 560px; }
.prelevements-montants > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 5px 0; }
.prelevements-montants dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prelevements-montants [data-prelevement="net"], .prelevements-montants [data-prelevement="total"] { border-top: 1px solid var(--border); font-weight: 600; }
dialog.prelevements-detail { width: min(1100px, 94vw); }
.prelevements-contenu { padding: 18px 20px 16px; min-width: 0; }
.prelevements-contenu > p { margin: 8px 0; line-height: 1.6; overflow-wrap: anywhere; }
.prelevements-contenu h4 { margin: 20px 0 8px; font-size: 14px; }
.prelevements-detail .table-scroll { max-width: 100%; overflow-x: auto; }
.prelevements-detail .proj-table { font-size: 12px; }
.prelevements-detail .proj-table th { white-space: normal; min-width: 90px; }
.prelevements-detail .proj-table td { white-space: nowrap; }
.prelevements-detail .proj-table th:first-child { min-width: 150px; }
.prelevements-retenu { background: var(--bleu-soft); }
.prelevements-calcul-remplace { display: block; font-size: 11px; color: var(--text-muted); }
.prelevements-definitions { font-size: 12px; color: var(--text-muted); }
.prelevements-definitions > div { margin: 8px 0; }
.prelevements-definitions dt { font-weight: 600; }
.prelevements-definitions dd { margin: 2px 0; }
@media (max-width: 900px) {
  .prelevements-contenu { padding: 14px; }
  .prelevements-detail .modal-tete { align-items: flex-start; gap: 12px; }
  .prelevements-detail .modal-tete h3 { overflow-wrap: anywhere; }
  .prelevements-resume { padding: 12px; }
  .prelevements-montants { font-size: 12px; }
}
