/* Console du cabinet : habillage « verre dépoli vert ». Aucune ressource externe : fond, verre et icônes en CSS et SVG écrits dans le code. */
:root {
  /* accent : un seul jeu de variables à changer pour passer aux couleurs d'un cabinet */
  --menthe: #A8E6B0; --menthe-2: #C6F0CB; --menthe-fonce: #10301A; --menthe-voile: rgba(168,230,176,.14);
  --accent-rgb: 168,230,176;
  /* réussite (« fait », « validé ») : reste verte quand l'accent du cabinet change */
  --succes: #A8E6B0; --succes-rgb: 168,230,176; --succes-voile: rgba(168,230,176,.14);
  /* surfaces : menus flottants, barre du haut, champs, creux des tableaux */
  --panneau: rgba(20,34,25,.92); --entete-1: rgba(12,22,16,.95); --entete-2: rgba(12,22,16,.88); --entete-mobile: rgba(10,19,14,.96);
  --champ: rgba(0,0,0,.22); --creux: rgba(0,0,0,.08); --option: #13241A; --vignette: rgba(0,0,0,.55); --code: rgba(0,0,0,.3); --tiroir: rgba(14,26,19,.94);
  --fond: #07100B; --fenetre: rgba(12,22,16,.50); --verre: rgba(255,255,255,.055); --verre-2: rgba(255,255,255,.085);
  --verre-3: rgba(255,255,255,.12); --bord: rgba(255,255,255,.10); --bord-2: rgba(255,255,255,.16);
  --texte: #EEF3EE; --gris: rgba(222,236,226,.70); --gris-2: rgba(222,236,226,.52);
  /* statuts : jamais noyés dans le vert */
  --corail: #FF8A7A; --corail-voile: rgba(255,138,122,.16); --ambre: #F5C26B; --ambre-voile: rgba(245,194,107,.15);
  --bleu: #8CCBF2; --bleu-voile: rgba(140,203,242,.14);
  /* anciens noms, gardés pour les styles écrits dans console.js */
  --fait: var(--succes); --orange: var(--ambre); --orange-2: var(--ambre); --rouge: var(--corail); --vert: var(--succes);
  --comptable: var(--menthe); --social: var(--bleu); --juridique: var(--ambre);
  --r1: 10px; --r2: 16px; --r3: 20px;
  --police: Geist, "Hanken Grotesk", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ombre: 0 30px 80px rgba(0,0,0,.45), 0 2px 0 rgba(255,255,255,.04) inset;
  --doux: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--fond); }
body { background: transparent; color: var(--texte); font: 14.5px/1.5 var(--police); min-height: 100vh;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* le fond : une « photo » de feuillage très floue, faite de dégradés */
body:not(.papier)::before { content: ""; position: fixed; inset: -12%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 30% at 18% 22%, rgba(140,180,120,.75), transparent 70%),
    radial-gradient(30% 40% at 78% 18%, rgba(185,210,160,.50), transparent 70%),
    radial-gradient(45% 35% at 60% 70%, rgba(46,86,56,.85), transparent 70%),
    radial-gradient(35% 45% at 12% 80%, rgba(30,62,40,.9), transparent 70%),
    radial-gradient(25% 30% at 90% 85%, rgba(110,145,95,.6), transparent 70%),
    radial-gradient(20% 18% at 45% 30%, rgba(215,225,180,.32), transparent 70%),
    linear-gradient(160deg, #24402D 0%, #11231A 55%, #0A150F 100%);
  filter: blur(48px) saturate(115%); }
body:not(.papier)::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 40%, var(--vignette) 100%); }
a { color: var(--menthe); }
h1 { font-size: 34px; line-height: 1.15; font-weight: 600; margin: 0 0 6px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 28px 0 10px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 13px; margin: 0 0 12px; color: var(--gris); font-weight: 600; letter-spacing: .01em; }
.carte > h3:first-child, details > h3:first-child { margin-top: 0; }
p { margin: 6px 0; }
.petit { color: var(--gris); font-size: 12.5px; }
.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.plein { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------ fenêtre de l'application */
.app { display: grid; grid-template-columns: 236px 1fr; height: calc(100vh - 32px); margin: 16px; border-radius: var(--r3);
  background: var(--fenetre); border: 1px solid var(--bord); box-shadow: var(--ombre); overflow: hidden;
  -webkit-backdrop-filter: blur(30px) saturate(140%); backdrop-filter: blur(30px) saturate(140%);
  transition: grid-template-columns .3s var(--doux); }
.app.replie { grid-template-columns: 74px 1fr; }

/* barre latérale */
nav.menu { display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 12px; border-right: 1px solid var(--bord);
  overflow-y: auto; overflow-x: hidden; min-width: 0; background: var(--creux); }
.marque { display: flex; align-items: center; gap: 10px; padding: 2px 4px 16px; min-width: 0; }
.monogramme { width: 34px; height: 34px; border-radius: 10px; background: var(--menthe); color: var(--menthe-fonce);
  display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; box-shadow: 0 6px 18px rgba(var(--accent-rgb),.25); }
.marque .noms { min-width: 0; flex: 1; line-height: 1.2; }
.marque strong { display: block; font-size: 15px; }
.marque .petit { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rond { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; flex: none;
  background: var(--verre); border: 1px solid var(--bord); color: var(--texte); cursor: pointer; text-decoration: none;
  transition: background .2s, transform .2s var(--doux); }
.rond:hover { background: var(--verre-3); }
.rond.menthe { background: var(--menthe); border-color: var(--menthe); color: var(--menthe-fonce); }
.rond.menthe:hover { background: var(--menthe-2); transform: scale(1.05); }
.marque .rond { width: 28px; height: 28px; border-radius: 8px; background: transparent; border-color: transparent; color: var(--gris); }
.marque .rond:hover { background: var(--verre-2); color: var(--texte); }
nav.menu a.entree-menu { display: flex; align-items: center; gap: 11px; color: var(--texte); text-decoration: none; padding: 8px 10px;
  border-radius: 10px; font-size: 13.5px; white-space: nowrap; transition: background .2s, color .2s; }
nav.menu a.entree-menu .libelle { flex: 1; overflow: hidden; text-overflow: ellipsis; }
nav.menu a.entree-menu .ico { color: var(--gris); transition: color .2s; }
nav.menu a.entree-menu:hover { background: var(--verre-2); }
nav.menu a.entree-menu.actif { background: var(--menthe); color: var(--menthe-fonce); font-weight: 600; box-shadow: 0 8px 22px rgba(var(--accent-rgb),.18); }
nav.menu a.entree-menu.actif .ico { color: var(--menthe-fonce); }
.compteur { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--verre-3); color: var(--texte);
  font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.compteur.alerte { background: var(--corail-voile); color: var(--corail); box-shadow: inset 0 0 0 1px rgba(255,138,122,.4); }
a.actif .compteur { background: rgba(16,48,26,.16); color: var(--menthe-fonce); box-shadow: none; }
nav.menu hr { border: 0; border-top: 1px solid var(--bord); margin: 10px 6px; }
/* groupes du menu : un titre discret qui replie ses entrées ; menu replié, seules les icônes restent */
nav.menu .groupe-menu { margin-top: 6px; }
nav.menu .titre-groupe { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px 4px; border: 0; border-radius: 8px;
  background: none; color: var(--gris-2); font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
nav.menu .titre-groupe:hover { color: var(--texte); }
nav.menu .groupe-menu.contient-actif .titre-groupe { color: var(--gris); }
nav.menu .titre-groupe .libelle { flex: 1; text-align: left; }
nav.menu .titre-groupe .chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--doux); }
nav.menu .groupe-menu.ferme .chevron { transform: rotate(-45deg); }
nav.menu .groupe-menu.ferme .sous-groupe { display: none; }
.app.replie nav.menu .titre-groupe { display: none; }
.app.replie nav.menu .groupe-menu.ferme .sous-groupe { display: block; }
.app.replie nav.menu .groupe-menu { margin-top: 0; }
.pousse { flex: 1; min-height: 12px; }
.resume { background: var(--verre); border: 1px solid var(--bord); border-radius: 14px; padding: 12px 12px 10px; margin: 0 0 10px;
  text-decoration: none; color: var(--texte); display: block; transition: background .2s; }
.resume:hover { background: var(--verre-2); }
.resume .petit { font-size: 11.5px; }
.resume .gros { font-size: 24px; font-weight: 600; color: var(--menthe); font-variant-numeric: tabular-nums; line-height: 1.3; }
.resume .gros.alerte { color: var(--corail); }
.compte { display: flex; align-items: center; gap: 10px; padding: 8px 4px 2px; border-top: 1px solid var(--bord); position: relative; min-width: 0; }
.initiales { width: 32px; height: 32px; border-radius: 50%; background: var(--verre-3); border: 1px solid var(--bord-2); color: var(--texte);
  display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; flex: none; text-decoration: none; letter-spacing: .02em; }
.compte .noms { flex: 1; min-width: 0; line-height: 1.25; }
.compte .noms strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compte .noms span { display: block; font-size: 11.5px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compte details { position: static; }
.compte summary { list-style: none; cursor: pointer; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--gris); }
.compte summary::-webkit-details-marker { display: none; }
.compte summary:hover, .compte details[open] summary { background: var(--verre-2); color: var(--texte); }
.compte .sous-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; padding: 6px; border-radius: 12px; z-index: 5;
  background: var(--panneau); border: 1px solid var(--bord-2); box-shadow: 0 18px 40px rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: monte .18s var(--doux); }
.sous-menu a, .sous-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px;
  border-radius: 8px; background: transparent; border: 0; color: var(--texte); text-decoration: none; font-size: 13px; }
.sous-menu a:hover, .sous-menu button:hover { background: var(--verre-2); }
/* menu replié : icônes seules */
.app.replie .marque .noms, .app.replie a.entree-menu .libelle, .app.replie .resume, .app.replie .compte .noms { display: none; }
.app.replie .marque { flex-direction: column; padding-bottom: 12px; }
.app.replie a.entree-menu { justify-content: center; padding: 9px 0; position: relative; }
.app.replie a.entree-menu .compteur { position: absolute; top: 1px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.app.replie .compte { flex-direction: column; }

/* zone de droite */
.zone { overflow-y: auto; overflow-x: hidden; min-width: 0; position: relative; scroll-behavior: smooth; }
header.haut { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 14px 28px 12px;
  background: linear-gradient(to bottom, var(--entete-1), var(--entete-2)); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.haut .tiroir { display: none; }
.recherche { display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 0; margin-left: auto; margin-right: auto;
  background: var(--verre); border: 1px solid var(--bord); border-radius: 999px; padding: 0 6px 0 14px; height: 38px; color: var(--gris);
  transition: border-color .2s, background .2s; }
.recherche:focus-within { border-color: rgba(var(--accent-rgb),.55); background: var(--verre-2); }
.recherche input { border: 0; background: transparent; margin: 0; padding: 0; height: 100%; min-width: 0; flex: 1; outline: none; font-size: 13px; }
.recherche input::placeholder { color: var(--gris-2); }
.recherche kbd { font: 600 10.5px/1 var(--police); color: var(--gris); background: var(--verre-2); border: 1px solid var(--bord);
  border-radius: 6px; padding: 4px 6px; white-space: nowrap; }
.recherche .resultat { font-size: 11.5px; color: var(--gris); white-space: nowrap; }
.haut .droite { display: flex; align-items: center; gap: 8px; flex: none; }
.demo { display: flex; align-items: center; gap: 10px; margin: 2px 28px 0; padding: 8px 14px; border-radius: 999px; font-size: 12.5px;
  background: linear-gradient(var(--ambre-voile), var(--ambre-voile)), var(--panneau); border: 1px solid rgba(245,194,107,.42); color: var(--ambre);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); position: sticky; top: 64px; z-index: 3; }
.demo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ambre); flex: none; box-shadow: 0 0 0 4px rgba(245,194,107,.18); }
main.vue { padding: 22px 28px 96px; max-width: 1320px; width: 100%; }  /* bas : la dernière ligne passe au-dessus de la bulle « Signaler un problème » */
.date-jour { color: var(--gris); font-size: 12.5px; margin: 0 0 4px; }
.entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.entete > div:first-child { min-width: 0; }
.entete .actions { margin-top: 0; }

/* ------------------------------------------------------------ blocs en verre */
.carte { background: var(--verre); border: 1px solid var(--bord); border-radius: var(--r2); padding: 16px 18px; margin-bottom: 14px;
  min-width: 0; transition: background .25s, border-color .25s; }
details.carte > summary { cursor: pointer; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.grille > .carte { margin-bottom: 0; }
.grille > .carte:hover { background: var(--verre-2); border-color: var(--bord-2); }
.carte .petit:first-child { display: flex; align-items: center; gap: 7px; }
/* guide des premiers dossiers (cabinet sans dossier) */
#cle-pennylane, #equipe { scroll-margin-top: 96px; }  /* sous l'en-tête fixe quand le guide y mène */
.guide { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.etape-guide { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 14px;
  background: var(--creux); border: 1px solid var(--bord); border-radius: var(--r1); }
.etape-guide .numero { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600;
  background: rgba(var(--accent-rgb), .14); color: var(--menthe); font-variant-numeric: tabular-nums; }
.etape-guide p { margin: 2px 0 0; }
.etape-guide > button { white-space: nowrap; }
@media (max-width: 640px) {
  .etape-guide { grid-template-columns: auto 1fr; }
  .etape-guide > button { grid-column: 1 / -1; justify-self: start; }
}
.chiffre { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.25; margin: 4px 0 2px; }
.chiffre.alerte { color: var(--corail); }
.chiffre.menthe { color: var(--menthe); }
.tuile-ico { width: 24px; height: 24px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--menthe-voile); color: var(--menthe); }
.tuile-ico.alerte { background: var(--corail-voile); color: var(--corail); }
.tuile-ico.ambre { background: var(--ambre-voile); color: var(--ambre); }
.tuile-ico .ico { width: 14px; height: 14px; }
.barre { height: 6px; background: var(--verre-3); border-radius: 999px; overflow: hidden; min-width: 80px; margin: 6px 0 2px; }
.barre > i { display: block; height: 100%; background: var(--menthe); border-radius: 999px; transform-origin: left center; animation: etire .7s var(--doux) both; }
tr:nth-child(2) .barre > i { animation-delay: .04s; } tr:nth-child(3) .barre > i { animation-delay: .08s; }
tr:nth-child(4) .barre > i { animation-delay: .12s; } tr:nth-child(5) .barre > i { animation-delay: .16s; }
tr:nth-child(n+6) .barre > i { animation-delay: .2s; }
.colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.colonnes > .carte { margin-bottom: 14px; }

/* carte de dossier : dégradé vert, cartes empilées, inclinaison qui suit la souris */
.rangee-dossier { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 18px; align-items: stretch; margin-bottom: 18px; }
.rangee-dossier > .grille { margin-bottom: 0; align-content: start; }
.scene { perspective: 900px; padding: 10px 14px 18px 0; max-width: 420px; }
.rangee-dossier .scene { max-width: none; }
.carte-dossier { position: relative; border-radius: 18px; padding: 18px 20px; min-height: 170px; color: #F2FBF3;
  background: linear-gradient(135deg, rgba(150,210,155,.55), rgba(54,110,70,.72) 45%, rgba(20,54,32,.9));
  border: 1px solid rgba(255,255,255,.22); box-shadow: 0 22px 50px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.25);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .35s var(--doux);
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px; overflow: visible; }
.carte-dossier::before, .carte-dossier::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: linear-gradient(135deg, rgba(120,180,125,.35), rgba(30,70,44,.6)); border: 1px solid rgba(255,255,255,.12); }
.carte-dossier::before { transform: translate(10px, 9px) rotate(2.5deg); opacity: .7; }
.carte-dossier::after { transform: translate(18px, 17px) rotate(5deg); opacity: .4; }
.carte-dossier .reflet { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 60% at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.22), transparent 60%); }
.carte-dossier .haut-carte { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.carte-dossier .code { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; font-weight: 600; }
.carte-dossier .puce { width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #E9D8A6, #B79A5B); opacity: .85; flex: none; }
.carte-dossier .nom-dossier { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.carte-dossier .code-dossier { font-size: 15px; font-weight: 500; opacity: .7; }
.carte-dossier .pied { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.carte-dossier .pied .petit { color: rgba(242,251,243,.78); font-size: 11px; display: block; }
.carte-dossier .pied strong { font-size: 13px; }
.carte-dossier .gros { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }

/* graphiques : barres verticales arrondies */
.graphique { position: relative; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--gris); margin: -4px 0 12px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 8px; height: 8px; border-radius: 50%; background: var(--menthe); }
.legende i.gris { background: rgba(255,255,255,.35); } .legende i.alerte { background: var(--corail); }
.histo { position: relative; display: flex; align-items: stretch; gap: 6px; height: 220px; padding: 8px 0 26px 34px; overflow-x: auto; overflow-y: hidden; }
.histo .axe { position: absolute; left: 0; right: 0; top: 8px; bottom: 26px; pointer-events: none; }
.histo .axe span { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255,255,255,.08); font-size: 10.5px; color: var(--gris-2); }
.histo .axe span b { position: absolute; left: 0; top: -8px; font-weight: 400; background: transparent; }
.colonne { position: relative; flex: 1 0 64px; max-width: 120px; display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  border-radius: 10px; padding: 0 3px; transition: background .2s; outline: none; }
.colonne:hover, .colonne:focus-visible { background: rgba(255,255,255,.05); }
.colonne .b { width: 100%; max-width: 18px; min-height: 3px; height: var(--h); border-radius: 6px 6px 3px 3px; background: var(--menthe);
  transform-origin: bottom; animation: pousse .8s var(--doux) both; animation-delay: calc(var(--i, 0) * 45ms); }
.colonne .b.gris { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.colonne .b.alerte { background: var(--corail); }
.colonne:hover .b:not(.gris) { background: var(--menthe-2); box-shadow: 0 0 18px rgba(var(--accent-rgb),.35); }
.colonne:hover .b.alerte { background: #FFA597; box-shadow: 0 0 18px rgba(255,138,122,.35); }
.colonne .x { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colonne .bulle { position: absolute; bottom: calc(var(--top, 50%) + 8px); left: 50%; transform: translate(-50%, 4px); opacity: 0; pointer-events: none;
  background: var(--panneau); border: 1px solid var(--bord-2); border-radius: 10px; padding: 6px 9px; font-size: 11.5px; white-space: nowrap;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: opacity .18s, transform .18s var(--doux); z-index: 2; line-height: 1.35; }
.colonne .bulle strong { display: block; font-size: 13px; }
.colonne:hover .bulle, .colonne:focus-visible .bulle { opacity: 1; transform: translate(-50%, 0); }
.colonne:first-child .bulle { left: 0; transform: translate(0, 4px); } .colonne:first-child:hover .bulle { transform: none; }
.colonne:last-child .bulle { left: auto; right: 0; transform: translate(0, 4px); } .colonne:last-child:hover .bulle { transform: none; }
details.donnees { margin-top: 10px; }
details.donnees summary { cursor: pointer; color: var(--gris); font-size: 12.5px; }
details.donnees[open] summary { margin-bottom: 10px; }

/* ------------------------------------------------------------ tableaux en verre */
.defile { overflow-x: auto; border: 1px solid var(--bord); border-radius: var(--r2); background: var(--verre); margin-bottom: 14px; }
.carte .defile { background: var(--creux); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; vertical-align: top; }
th { color: var(--gris); font-weight: 500; font-size: 12px; white-space: nowrap; background: rgba(255,255,255,.025); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .18s; }
tbody tr:hover { background: rgba(var(--accent-rgb),.06); }
tr.cliquable { cursor: pointer; }
tr.cliquable:hover td:first-child { box-shadow: inset 2px 0 0 var(--menthe); }
tr.masque { display: none; }

/* ------------------------------------------------------------ statuts (lisibles en toutes circonstances) */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 1.5;
  border: 1px solid var(--bord-2); color: var(--texte); background: var(--verre-2); white-space: nowrap; }
.badge.fait, .badge.complet, .badge.accepte, .badge.envoye, .badge.teletransmise, .badge.depose, .badge.paye,
.badge.valide, .badge.validee, .badge.signee, .badge.hypervise, .badge.supervise, .badge.revise, .badge.production
  { color: var(--succes); border-color: rgba(var(--succes-rgb),.45); background: var(--succes-voile); }
.badge.en_cours, .badge.envoyee, .badge.a_valider, .badge.ag_tenue, .badge.partiel, .badge.entree
  { color: var(--ambre); border-color: rgba(245,194,107,.5); background: var(--ambre-voile); }
.badge.a_reprendre, .badge.rejete, .badge.refuse, .badge.a_corriger, .badge.bloquant, .badge.retard
  { color: var(--corail); border-color: rgba(255,138,122,.55); background: var(--corail-voile); font-weight: 600; }
.badge.attente_client { color: var(--bleu); border-color: rgba(140,203,242,.5); background: var(--bleu-voile); }
.pole { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.pole.comptable { background: var(--comptable); } .pole.social { background: var(--social); } .pole.juridique { background: var(--juridique); }
.pole.entree { background: var(--gris); }
.verrou { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 1px 8px 1px 6px; border-radius: 999px; font-size: 11.5px;
  color: var(--ambre); background: var(--ambre-voile); border: 1px solid rgba(245,194,107,.4); }
.verrou .ico { width: 12px; height: 12px; }
td .petit + .petit, td > .petit { margin-top: 2px; }

/* ------------------------------------------------------------ formulaires et boutons */
label { display: block; margin: 8px 0; color: var(--gris); font-size: 12.5px; }
input, select, textarea, button { font: inherit; color: var(--texte); }
input, select, textarea { display: block; width: 100%; margin-top: 5px; background: var(--champ); border: 1px solid var(--bord);
  border-radius: var(--r1); padding: 8px 11px; transition: border-color .2s, background .2s; }
input:hover, select:hover, textarea:hover { border-color: var(--bord-2); }
select option { background: var(--option); }
select:disabled, input:disabled, textarea:disabled { opacity: .6; }
input[type=checkbox] { display: inline; width: auto; margin: 0 8px 0 0; accent-color: var(--menthe); }
label.case { display: flex; align-items: center; color: var(--texte); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(var(--accent-rgb),.6); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }
button:focus-visible, a:focus-visible, .colonne:focus-visible, summary:focus-visible { outline: 2px solid var(--menthe); outline-offset: 2px; }
button, .bouton { display: inline-flex; align-items: center; gap: 7px; background: var(--verre-2); border: 1px solid var(--bord-2);
  border-radius: 999px; padding: 7px 15px; cursor: pointer; text-decoration: none; color: var(--texte); font-size: 13px;
  transition: background .2s, border-color .2s, transform .15s var(--doux), box-shadow .2s; }
button:hover, .bouton:hover { background: var(--verre-3); }
button:active { transform: scale(.98); }
button.principal { background: var(--menthe); border-color: var(--menthe); color: var(--menthe-fonce); font-weight: 600;
  box-shadow: 0 8px 22px rgba(var(--accent-rgb),.18); }
button.principal:hover { background: var(--menthe-2); border-color: var(--menthe-2); }
button.discret { background: transparent; border-color: transparent; color: var(--menthe); padding: 4px 8px; }
button.discret:hover { background: var(--menthe-voile); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.actions select, .actions input:not([type=checkbox]) { width: auto; margin-top: 0; border-radius: 999px; padding: 7px 14px; }
.actions .chiffre { margin: 0 6px 0 0; }
/* filtres en contrôle segmenté */
.segment { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--verre); border: 1px solid var(--bord); margin: 0 0 16px; }
.segment button { background: transparent; border: 0; padding: 6px 13px; font-size: 12.5px; color: var(--gris); box-shadow: none; }
.segment button:hover { background: var(--verre-2); color: var(--texte); }
.segment button.principal { background: var(--menthe); color: var(--menthe-fonce); }
.date, td .pole + * { white-space: nowrap; }
td:first-child:has(.pole) { white-space: nowrap; }
.ligne-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
fieldset { border: 1px solid var(--bord); border-radius: var(--r2); margin: 0 0 14px; padding: 12px 16px; background: var(--verre); }
legend { padding: 0 6px; font-weight: 600; }
/* onglets soulignés */
.onglets { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--bord); margin-bottom: 18px; }
.onglets button { border: 0; border-radius: 0; background: transparent; color: var(--gris); padding: 9px 12px; position: relative; box-shadow: none; }
.onglets button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--menthe); transform: scaleX(0); transition: transform .3s var(--doux); }
.onglets button:hover { color: var(--texte); background: transparent; }
.onglets button.actif { color: var(--texte); }
.onglets button.actif::after { transform: scaleX(1); }

/* ------------------------------------------------------------ messages et fenêtres */
.ok { color: var(--succes); }
.erreur { color: var(--corail); }
p.erreur { background: var(--corail-voile); border: 1px solid rgba(255,138,122,.45); border-radius: 12px; padding: 9px 12px; font-weight: 500; }
td.erreur { font-weight: 600; }
#message { position: fixed; right: 24px; bottom: 24px; max-width: 420px; padding: 12px 16px; border-radius: 14px; z-index: 20;
  background: var(--panneau); border: 1px solid var(--bord-2); box-shadow: 0 18px 40px rgba(0,0,0,.45); display: none;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
#message.erreur { border-color: rgba(255,138,122,.6); color: var(--texte); box-shadow: inset 3px 0 0 var(--corail), 0 18px 40px rgba(0,0,0,.45); }
#message.visible { display: block; animation: monte .25s var(--doux); }
dialog { background: rgba(16,28,21,.86); color: var(--texte); border: 1px solid var(--bord-2); border-radius: var(--r3); padding: 22px 24px;
  width: min(560px, calc(100vw - 32px)); box-shadow: var(--ombre); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
dialog[open] { animation: net .32s var(--doux); }
dialog::backdrop { background: rgba(3,8,5,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lien-unique { word-break: break-all; background: var(--code); padding: 10px; border-radius: var(--r1); font-family: ui-monospace, monospace; font-size: 13px; }
.vide { color: var(--gris); padding: 18px; text-align: center; }
ul { padding-left: 20px; } li { margin: 3px 0; }

/* ------------------------------------------------------------ connexion et pages client */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.connexion .fenetre-verre { width: min(440px, 100%); padding: 30px 30px 26px; border-radius: 22px; background: var(--fenetre);
  border: 1px solid var(--bord); box-shadow: var(--ombre); -webkit-backdrop-filter: blur(30px) saturate(140%); backdrop-filter: blur(30px) saturate(140%);
  animation: net .5s var(--doux) both; }
.connexion .marque { padding: 0 0 22px; }
.connexion h1 { font-size: 28px; }
.connexion form .actions button { width: 100%; justify-content: center; padding: 10px 15px; }
/* Assistant d'accueil : même verre que la connexion, plus large, une question à la fois */
.accueil .fenetre-verre { width: min(760px, 100%); }
.accueil form .actions button, .accueil .actions button { width: auto; }
.fil-accueil { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: 13px; }
.fil-accueil li { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--bord); color: var(--gris-2); }
.fil-accueil li.fait { color: var(--gris); border-color: var(--bord-2); }
.fil-accueil li.fait button { padding: 0; color: inherit; }
.fil-accueil li.actif { color: var(--menthe-fonce); background: var(--menthe); border-color: var(--menthe); font-weight: 600; }
.bulle { background: var(--verre-2); border: 1px solid var(--bord); border-radius: 18px 18px 18px 6px; padding: 14px 16px; margin: 0 0 18px; }
.bulle strong { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--menthe); margin-bottom: 6px; }
.bulle p { margin: 0 0 6px; }
.bulle p:last-child { margin-bottom: 0; color: var(--gris); }
.cases { display: grid; gap: 6px; margin: 6px 0 12px; }
.liste-societes { max-height: 320px; overflow: auto; padding: 8px; border: 1px solid var(--bord); border-radius: var(--r1); background: var(--creux); }
.acces-role { margin: 4px 0 10px; padding-left: 18px; }
main.etroit { max-width: 560px; margin: 6vh auto; padding: 26px; border-radius: 22px; background: var(--fenetre); border: 1px solid var(--bord);
  box-shadow: var(--ombre); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
body.client button[type=submit] { background: var(--menthe); border-color: var(--menthe); color: var(--menthe-fonce); font-weight: 600; margin-top: 8px; }

/* ------------------------------------------------------------ mouvement */
@keyframes net { from { opacity: 0; filter: blur(14px); transform: translateY(6px) scale(.995); } to { opacity: 1; filter: none; transform: none; } }
@keyframes monte { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes etire { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pousse { from { transform: scaleY(0); } to { transform: scaleY(1); } }
main.vue > .entre { animation: net .42s var(--doux) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .carte-dossier { transform: none !important; }
}

/* ------------------------------------------------------------ petits écrans : menu en tiroir, une colonne */
@media (max-width: 960px) {
  .app, .app.replie { display: block; height: auto; min-height: 100vh; margin: 0; border-radius: 0; border: 0; box-shadow: none; overflow: visible;
    background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }  /* sans flou ici : le tiroir fixe reste à la taille de l'écran */
  nav.menu { position: fixed; inset: 0 auto 0 0; width: min(290px, 84vw); z-index: 30; transform: translateX(-102%);
    transition: transform .3s var(--doux); background: var(--tiroir); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    border-right: 1px solid var(--bord-2); padding-top: 18px; }
  .app.tiroir-ouvert nav.menu { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.5); }
  .voile { position: fixed; inset: 0; z-index: 25; background: rgba(3,8,5,.5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .app.tiroir-ouvert .voile { opacity: 1; pointer-events: auto; }
  .app.replie .marque .noms, .app.replie a.entree-menu .libelle, .app.replie .resume, .app.replie .compte .noms { display: revert; }
  .app.replie a.entree-menu { justify-content: flex-start; padding: 8px 10px; }
  .app.replie nav.menu .titre-groupe { display: flex; }
  .app.replie nav.menu .groupe-menu.ferme .sous-groupe { display: none; }
  .app.replie .marque, .app.replie .compte { flex-direction: row; }
  .marque .replier { display: none; }
  .zone { overflow: visible; }
  header.haut { padding: 10px 14px; background: var(--entete-mobile); gap: 8px; }
  .demo { position: static; margin: 8px 14px 0; border-radius: 14px; }  /* sur téléphone, le bandeau ne recouvre pas l'écran en défilant */
  .haut .tiroir { display: inline-grid; }
  .recherche { flex: 1 1 auto; margin: 0; }
  .recherche kbd, .haut .facultatif { display: none; }
  .demo { margin: 8px 14px 0; top: 58px; border-radius: 14px; align-items: flex-start; }
  .demo::before { margin-top: 5px; }
  main.vue { padding: 16px 16px 88px; }
  h1 { font-size: 27px; }
  .colonnes, .rangee-dossier { grid-template-columns: 1fr; }
  .grille { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .chiffre { font-size: 23px; }
  .entete { align-items: flex-start; }
  #message { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
@media (min-width: 961px) { .voile { display: none; } }
@media (hover: none), (pointer: coarse) { .carte-dossier { transform: none !important; } }

/* pages imprimables : papier blanc */
body.papier { background: #fff; color: #111; max-width: 800px; margin: 32px auto; padding: 0 24px; font-size: 14px; }
body.papier header { display: flex; justify-content: space-between; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 24px; }
body.papier th, body.papier td { border-bottom: 1px solid #ccc; color: #111; background: none; }
body.papier tr.total td { font-weight: 700; border-top: 2px solid #111; }
body.papier .petit { color: #555; }
body.papier h1 { font-size: 24px; }
body.papier h3 { color: #333; }
body.papier .badge { color: #111; background: none; border-color: #999; }
body.papier .defile { background: none; border-color: #ccc; }
@media print { body.papier { margin: 0; } nav, .actions, #message { display: none !important; } }

/* boîte à outils : le module s'affiche comme une feuille, dans un cadre isolé */
iframe.module { display: block; width: 100%; min-height: 72vh; border: 1px solid var(--bord); border-radius: var(--r2); background: #fbfbf9; }
.carte.module h3 a { color: inherit; text-decoration: none; }
.carte.module h3 a:hover { text-decoration: underline; }

/* synthèse du dossier */
.fiche-infos th { text-align: left; font-weight: 500; opacity: .75; width: 42%; padding-right: 12px; }
ul.ecarts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
ul.ecarts li { line-height: 1.45; }

/* ------------------------------------------------------------ signaler un problème (bulle et discussion) */
.signalement { position: fixed; right: 28px; bottom: 28px; z-index: 18; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.signalement.cache { visibility: hidden; }
.bouton-signal { border-radius: 999px; padding: 10px 16px 10px 12px; background: var(--panneau); border-color: var(--bord-2);
  box-shadow: 0 12px 30px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bouton-signal .ico { width: 18px; height: 18px; color: var(--menthe); }
.bouton-signal[aria-expanded="true"] { background: var(--menthe); border-color: var(--menthe); color: var(--menthe-fonce); }
.bouton-signal[aria-expanded="true"] .ico { color: currentColor; }
.panneau-signal { width: min(380px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column;
  border-radius: var(--r2); background: var(--tiroir); border: 1px solid var(--bord-2); box-shadow: var(--ombre); overflow: hidden;
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); animation: monte .25s var(--doux); }
.panneau-signal[hidden] { display: none; }
.panneau-signal [hidden] { display: none; }  /* le style général des champs (display: block) l'emporterait sinon */
.panneau-signal header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 16px;
  border-bottom: 1px solid var(--bord); }
.panneau-signal .fil { flex: 1; min-height: 120px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.panneau-signal .bot, .panneau-signal .moi { max-width: 90%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.panneau-signal .bot { align-self: flex-start; background: var(--verre-2); border: 1px solid var(--bord); border-bottom-left-radius: 4px; }
.panneau-signal .moi { align-self: flex-end; background: var(--menthe-voile); border: 1px solid rgba(var(--accent-rgb), .35); border-bottom-right-radius: 4px; }
.panneau-signal .saisie { display: grid; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--bord); }
.panneau-signal .saisie textarea, .panneau-signal .saisie select { margin-top: 0; }
.panneau-signal .saisie .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; }
.panneau-signal .saisie p { margin: 0; }
.choix-signal { display: grid; gap: 8px; }
.choix-signal button { width: 100%; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; }
.apercu-signal { display: block; width: 100%; margin-top: 8px; border-radius: 10px; border: 1px solid var(--bord); }
.recap-signal { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; }
.recap-signal dt { color: var(--gris); }
.recap-signal dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .signalement { right: 16px; bottom: 16px; }
  .bouton-signal { padding: 12px; }
  .bouton-signal .libelle { display: none; }
}
@media print { .signalement { display: none; } }
