/* Composants au standard shadcn/ui (mesures, anneau de focus, états), aux couleurs de la charte WEEPO. */
:root {
  --background: #F6F4F0; --foreground: #141414; --card: #FFFFFF; --muted: #F0EDE7; --muted-foreground: #5B5D66; --border: #E4E0D8; --input: #D5D0C6;
  --primary: #FED0A0; --primary-foreground: #141414; --secondary: #EDEEFD; --secondary-foreground: #2F3A9E; --accent: #F3F0EA; --destructive: #C0271C; --ring: #7B88FF;
  --pervenche: #7B88FF; --bleu-clair: #B0D5FF; --lien: #4A56D6; --lien-survol: #2F3A9E;
  --nuit: #0F0F14; --indigo: #1D183E; --indigo-clair: #2A2456; --trait-nuit: #3A3470; --texte-nuit: #F1F1F6; --discret-nuit: #B4B3D7;
  --vert-f: #E3F2EC; --vert: #0B6B4A; --ambre-f: #FBF0DF; --ambre: #8A4B05; --rouge-f: #FBE9E7; --rouge: #A21D13; --bleu-f: #E6EEF8; --bleu: #1A5296; --gris-f: #EEEDE8; --gris: #4B5260;
  --radius: 10px; --radius-md: 8px; --radius-sm: 6px; --ombre-xs: 0 1px 2px rgba(20, 20, 20, .05); --ombre-lg: 0 10px 32px rgba(20, 20, 20, .14);
  --anneau: 0 0 0 3px rgba(123, 136, 255, .35); --anneau-erreur: 0 0 0 3px rgba(192, 39, 28, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--background); color: var(--foreground); font: 14px/1.5 Onest, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1 { font: 600 30px/1.15 Newsreader, Georgia, serif; letter-spacing: -0.01em; margin: 0; }
h2 { font: 600 16px/1.3 Onest, system-ui, sans-serif; letter-spacing: -0.01em; margin: 0; }
h3 { font: 600 14px/1.3 Onest, system-ui, sans-serif; margin: 0; }
a { color: var(--lien); text-decoration: none; text-underline-offset: 3px; } a:hover { color: var(--lien-survol); text-decoration: underline; }
p { margin: 0 0 10px; } small, .discret { color: var(--muted-foreground); font-size: 13px; }
.nombre { font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }
.maj { display: inline-block; } .maj::first-letter { text-transform: uppercase; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--anneau); border-radius: var(--radius-sm); }

/* Structure */
.cadre { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.barre { background: var(--nuit); color: var(--texte-nuit); padding: 20px 12px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; font: 700 22px Onest, sans-serif; letter-spacing: -0.03em; color: #fff; }
.logo small { display: block; font: 500 11px Onest, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--discret-nuit); }
.role { margin: 0 4px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--indigo); border: 1px solid var(--trait-nuit); font-size: 12px; color: var(--discret-nuit); }
.role b { color: #fff; display: block; font-size: 13px; }
.barre nav { display: flex; flex-direction: column; gap: 1px; }
.barre nav a { color: var(--discret-nuit); padding: 7px 10px; border-radius: var(--radius-md); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.barre nav a:hover { background: var(--indigo); color: #fff; text-decoration: none; }
.barre nav a.actif { background: var(--indigo-clair); color: #fff; }
.pastille { background: var(--primary); color: var(--foreground); border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; }
.pied { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #2D2D36; font-size: 13px; color: var(--discret-nuit); display: grid; gap: 8px; }
.utilisateur { position: relative; }
.user-bouton { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px; border: 0; border-radius: var(--radius-md); background: none; color: var(--texte-nuit); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.user-bouton:hover, .user-bouton[aria-expanded=true] { background: var(--indigo); }
.user-bouton:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--muted); color: var(--foreground); display: grid; place-items: center; font: 500 12px Onest, sans-serif; }
.user-bouton .avatar { background: var(--indigo-clair); color: var(--texte-nuit); filter: grayscale(1); }
.user-texte { flex: 1; min-width: 0; display: grid; line-height: 1.3; text-align: left; }
.user-texte b { font-weight: 500; font-size: 14px; } .user-texte small { font-size: 12px; color: var(--muted-foreground); }
.user-texte b, .user-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-bouton .user-texte b { color: var(--texte-nuit); } .user-bouton .user-texte small { color: var(--discret-nuit); }
.user-bouton > svg { flex: none; margin-left: auto; color: var(--discret-nuit); }
.menu-user { position: fixed; z-index: 50; min-width: 224px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--foreground); box-shadow: 0 4px 6px -1px rgba(20, 20, 20, .1), 0 2px 4px -2px rgba(20, 20, 20, .1); font-size: 14px; }
.menu-user[hidden] { display: none; }
.menu-entete { display: flex; align-items: center; gap: 8px; padding: 6px 4px; }
.menu-user a, .menu-user > button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--foreground); font: inherit; text-align: left; cursor: pointer; }
.menu-user a:hover, .menu-user > button:hover, .menu-user a:focus-visible, .menu-user > button:focus-visible { background: var(--accent); text-decoration: none; outline: none; }
.menu-user svg { flex: none; color: var(--muted-foreground); }
.menu-sep { height: 1px; margin: 4px -4px; background: var(--border); }
.menu-langue .langues { display: flex; width: 100%; } .menu-langue .langues button { flex: 1; padding: 3px 4px; white-space: nowrap; }
.menu-langue { display: grid; gap: 6px; padding: 4px 8px; } .menu-langue small { color: var(--muted-foreground); font-size: 12px; }
.langues { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-md); background: var(--indigo); width: fit-content; }
.langues button { background: transparent; border: 0; color: var(--discret-nuit); border-radius: var(--radius-sm); padding: 3px 10px; font: 500 12px Onest, sans-serif; cursor: pointer; }
.langues button.actif { background: var(--pervenche); color: #fff; }
.langues.clair { background: var(--muted); } .langues.clair button { color: var(--muted-foreground); } .langues.clair button.actif { background: #fff; color: var(--foreground); box-shadow: var(--ombre-xs); }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--discret-nuit); font: inherit; cursor: pointer; text-align: left; } .lien-bouton:hover { color: #fff; }
/* Barre du haut et repli de la barre latérale */
.contenu { min-width: 0; }
.site-entete { position: sticky; top: 0; z-index: 10; height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--background); }
.icone-bouton { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -4px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--foreground); cursor: pointer; }
.icone-bouton:hover { background: var(--accent); } .icone-bouton:focus-visible { box-shadow: var(--anneau); }
.separateur-v { width: 1px; height: 16px; margin: 0 4px; background: var(--border); }
.fil-ariane { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; } .fil-ariane svg { width: 14px; height: 14px; color: var(--muted-foreground); flex: none; } .fil-espace { color: var(--muted-foreground); white-space: nowrap; }
.site-titre { font: 500 14px Onest, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1051px) {
  /* Barre repliée : un rail d'icônes (sidebar-07). */
  .cadre.replie { grid-template-columns: 56px minmax(0, 1fr); }
  .cadre.replie .barre { padding: 12px 8px; overflow-x: hidden; align-items: stretch; }
  .cadre.replie .nav-txt, .cadre.replie .role, .cadre.replie .logo > div, .cadre.replie .user-texte, .cadre.replie .user-bouton > svg:last-child { display: none; }
  .cadre.replie .logo { justify-content: center; }
  .cadre.replie .barre nav a { justify-content: center; padding: 8px; position: relative; }
  .cadre.replie .pastille { position: absolute; top: 3px; right: 3px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
  .cadre.replie .nav-groupe { height: 1px; margin: 6px 6px; padding: 0; background: #2D2D36; } .cadre.replie .nav-groupe span { display: none; }
  .cadre.replie .user-bouton { justify-content: center; padding: 4px; }
}
.nav-lib { display: flex; align-items: center; gap: 10px; min-width: 0; } .nav-lib svg { flex: none; opacity: .85; }
main { padding: 32px 40px 64px; max-width: 1280px; width: 100%; }
.entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.entete p { color: var(--muted-foreground); margin: 6px 0 0; max-width: 720px; font-size: 15px; }
.grille { display: grid; gap: 16px; } .grille > * { min-width: 0; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1050px) { .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; } .cadre { grid-template-columns: 1fr; } main { padding: 22px 16px; } .site-entete { padding: 0 16px; }
  /* Écran étroit : la barre latérale devient un tiroir ouvert par le bouton de la barre du haut. */
  .barre { position: fixed; top: 0; left: 0; z-index: 40; width: 280px; max-width: 86vw; height: 100vh; transform: translateX(-102%); transition: transform .2s ease; box-shadow: none; }
  .cadre.ouvert .barre { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .45); }
  .cadre.ouvert::after { content: ''; position: fixed; inset: 0; z-index: 30; background: rgba(15, 15, 20, .45); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .tbl-recherche { width: 100%; } .tbl-outils { width: 100%; } }

/* Carte */
.carte { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--ombre-xs); }
.carte > h2 { margin-bottom: 4px; } .carte > h2 + p.discret { margin-bottom: 14px; } .carte > h2:not(:has(+ p.discret)) { margin-bottom: 14px; } .carte h3 { margin: 18px 0 10px; }
.carte.sombre { background: var(--indigo); border-color: var(--trait-nuit); color: var(--texte-nuit); } .carte.sombre small, .carte.sombre .discret { color: var(--discret-nuit); } .carte.sombre a { color: var(--bleu-clair); }
.carte.accent { background: var(--secondary); border-color: #D9DBFA; }
.tuile { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: block; color: inherit; box-shadow: var(--ombre-xs); }
a.tuile:hover { border-color: var(--ring); text-decoration: none; color: inherit; }
.tuile { background: linear-gradient(to top, rgba(20, 20, 20, .02), var(--card)); }
.tuile-tete { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.tuile-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tuile-badge.rouge { color: var(--rouge); border-color: #F0C9C5; background: var(--rouge-f); }
.tuile-pied { display: grid; gap: 2px; margin-top: 14px; font-size: 13px; } .tuile-pied b { font-weight: 500; } .tuile-pied span { color: var(--muted-foreground); }
.tuile .valeur { font: 600 26px/1.15 Onest, sans-serif; letter-spacing: -0.02em; margin-top: 4px; } .tuile .libelle { color: var(--muted-foreground); font-size: 13px; }

/* Tableau */
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted-foreground); font-size: 13px; height: 40px; padding: 0 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; } tbody tr:last-child td { border-bottom: 0; } tbody tr:hover { background: rgba(240, 237, 231, .5); }
td.droite, th.droite { text-align: right; }
.vide { color: var(--muted-foreground); padding: 8px 0; margin: 0; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.b-vert { background: var(--vert-f); color: var(--vert); } .b-ambre { background: var(--ambre-f); color: var(--ambre); } .b-rouge { background: var(--rouge-f); color: var(--rouge); } .b-bleu { background: var(--bleu-f); color: var(--bleu); } .b-gris { background: var(--gris-f); color: var(--gris); }
.b-contour { border-color: var(--border); color: var(--foreground); background: #fff; }

/* Champs */
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--foreground); align-content: start; }
label .aide, .aide { font-weight: 400; font-size: 13px; color: var(--muted-foreground); line-height: 1.4; }
.erreur { font-weight: 400; font-size: 13px; color: var(--destructive); }
/* Champ obligatoire : astérisque ; champ en erreur : libellé en rouge */
.erreur.muet { position: absolute !important; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.requis { color: var(--destructive); font-weight: 600; }
label:has([aria-invalid=true]), .champ:has([aria-invalid=true]) > .libelle { color: var(--destructive); }
/* Dans une grille de champs, le message se loge dans l'espace entre deux rangées : rien ne bouge quand il apparaît ou disparaît */
.champs > label, .champs > .champ { position: relative; }
.champs > label > .erreur, .champs > .champ > .erreur { position: absolute; top: 100%; left: 0; margin-top: 1px; font-size: 12px; line-height: 1; white-space: nowrap; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea, .declencheur {
  height: 36px; width: 100%; min-width: 0; border: 1px solid var(--input); border-radius: var(--radius-md); background: #fff; padding: 0 12px; color: var(--foreground);
  font: 400 14px Onest, system-ui, sans-serif; box-shadow: var(--ombre-xs); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 80px; padding: 8px 12px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); opacity: .8; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .declencheur:focus-visible { border-color: var(--ring); box-shadow: var(--anneau); border-radius: var(--radius-md); }
input:disabled, select:disabled, .declencheur:disabled { opacity: .5; cursor: not-allowed; background: var(--muted); }
[aria-invalid=true], .groupe:has([aria-invalid=true]), .depot:has([aria-invalid=true]) { border-color: var(--destructive) !important; box-shadow: var(--anneau-erreur) !important; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B5D66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.declencheur { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; }
.declencheur span { overflow: hidden; text-overflow: ellipsis; } .declencheur .vide-texte { color: var(--muted-foreground); } .declencheur svg { flex: none; color: var(--muted-foreground); }
td input:not([type=checkbox]):not([type=radio]):not([type=file]), td select, td .declencheur, td .groupe { height: 32px; }
/* Champ avec unité (groupe de saisie) */
.groupe { display: flex; height: 36px; border: 1px solid var(--input); border-radius: var(--radius-md); background: #fff; box-shadow: var(--ombre-xs); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.groupe:focus-within { border-color: var(--ring); box-shadow: var(--anneau); }
.groupe input:not([type=checkbox]):not([type=radio]):not([type=file]) { border: 0; box-shadow: none; height: 100%; border-radius: 0; flex: 1; text-align: right; font-variant-numeric: tabular-nums; }
.groupe .unite { display: grid; place-items: center; padding: 0 10px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); background: var(--muted); border-left: 1px solid var(--border); white-space: nowrap; }
input[type=number] { -moz-appearance: textfield; } input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Interrupteur */
.interrupteur { display: inline-flex; grid-auto-flow: column; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; height: 36px; }
.interrupteur input { position: absolute; opacity: 0; width: 32px; height: 18px; margin: 0; cursor: pointer; }
.interrupteur .piste { width: 32px; height: 18px; border-radius: 999px; background: var(--input); position: relative; transition: background .15s; flex: none; box-shadow: var(--ombre-xs); }
.interrupteur .piste::after { content: ""; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.interrupteur input:checked + .piste { background: var(--foreground); } .interrupteur input:checked + .piste::after { transform: translateX(14px); }
.interrupteur input:focus-visible + .piste { box-shadow: var(--anneau); }
/* Cartes de choix (boutons radio) */
.choix { display: grid; gap: 10px; align-content: start; padding: 14px 16px; border: 1px solid var(--input); border-radius: var(--radius); background: #fff; box-shadow: var(--ombre-xs); }
.choix:has(.titre input:checked) { border-color: var(--ring); background: #F8F8FF; }
.choix .titre { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.choix .titre input[type=radio] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid var(--input); border-radius: 50%; background: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.choix .titre input[type=radio]:checked { border-color: var(--foreground); } .choix .titre input[type=radio]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--foreground); }
.choix .titre input[type=radio]:focus-visible { box-shadow: var(--anneau); border-radius: 50%; }
.champ { display: grid; gap: 6px; align-content: start; } .champ > .libelle { font-weight: 500; line-height: 1.2; }
.selecteur { display: block; min-width: 0; }
/* Dépôt de fichier */
.depot { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border: 1px dashed var(--input); border-radius: var(--radius); background: #fff; cursor: pointer; position: relative; font-weight: 400; transition: border-color .15s, background .15s; }
.depot:hover, .depot.survol { border-color: var(--ring); background: #F8F8FF; } .depot:focus-within { border-color: var(--ring); box-shadow: var(--anneau); }
.depot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.depot .icone { width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--muted); display: grid; place-items: center; flex: none; color: var(--muted-foreground); }
.depot b { display: block; font-weight: 500; } .depot.rempli { border-style: solid; border-color: var(--vert); background: #F6FBF8; } .depot.rempli .icone { background: var(--vert-f); color: var(--vert); }
.depot.compact { min-height: 32px; padding: 4px 10px; gap: 8px; display: inline-flex; } .depot.compact .icone { width: 22px; height: 22px; background: none; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 12px; align-items: end; }
.champs .large { grid-column: span 2; } @media (max-width: 700px) { .champs .large { grid-column: auto; } }
.ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Bouton */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid transparent; background: var(--primary); color: var(--primary-foreground);
  font: 500 14px Onest, system-ui, sans-serif; cursor: pointer; white-space: nowrap; box-shadow: var(--ombre-xs); transition: background .15s, border-color .15s, opacity .15s; text-decoration: none; }
.bouton:hover { background: #FBC48B; text-decoration: none; color: var(--primary-foreground); } .bouton:focus-visible { box-shadow: var(--anneau); border-radius: var(--radius-md); }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton.second { background: #fff; border-color: var(--input); color: var(--foreground); } .bouton.second:hover { background: var(--accent); }
.bouton.fantome { background: transparent; box-shadow: none; } .bouton.fantome:hover { background: var(--accent); }
.bouton.sombre { background: var(--foreground); color: #fff; } .bouton.sombre:hover { background: #2B2B2B; color: #fff; }
.bouton.danger { background: #fff; border-color: #E9BDB8; color: var(--destructive); } .bouton.danger:hover { background: var(--rouge-f); }
.bouton.petit { height: 32px; padding: 0 12px; font-size: 13px; } .bouton.icone { width: 32px; height: 32px; padding: 0; }

/* Onglets */
.onglets { display: inline-flex; gap: 2px; flex-wrap: wrap; padding: 3px; border-radius: var(--radius); background: var(--muted); margin-bottom: 16px; }
.onglets a { padding: 5px 12px; border-radius: var(--radius-sm); color: var(--muted-foreground); font-weight: 500; }
.onglets a.actif { background: #fff; color: var(--foreground); box-shadow: var(--ombre-xs); } .onglets a:hover { text-decoration: none; color: var(--foreground); }
.note { background: var(--secondary); border: 1px solid #DDDFFB; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; } .note.alerte { background: var(--ambre-f); border-color: #F2DDB8; color: var(--ambre); }
.note.refus { background: var(--rouge-f); border-color: #F2CBC6; color: var(--rouge); }
.etapes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; } .etape { border-left: 3px solid var(--pervenche); padding: 2px 0 2px 10px; font-size: 13px; } .etape b { display: block; font: 600 18px Onest, sans-serif; }
@media (max-width: 1050px) { .etapes { grid-template-columns: repeat(3, 1fr); } }
.total-piece { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); } .total-piece b { font-size: 1.15rem; }
.definitions { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; } .definitions dt { color: var(--muted-foreground); } .definitions dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* Info-bulle */
.info { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid currentColor; font: 600 10px/1 Georgia, serif; font-style: italic; cursor: help; position: relative; vertical-align: middle; opacity: .75; }
.info:hover::after, .info:focus::after { content: attr(data-bulle); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 280px; white-space: normal; text-align: left;
  background: var(--foreground); color: #fff; padding: 6px 10px; border-radius: var(--radius-sm); font: 400 12px/1.4 Onest, sans-serif; z-index: 60; box-shadow: var(--ombre-lg); }

/* Couche flottante : calendrier, liste avec recherche */
.flottant { position: absolute; z-index: 50; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--ombre-lg); padding: 12px; }
.cal-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 500; text-transform: capitalize; }
.cal-grille { display: grid; grid-template-columns: repeat(7, 32px); gap: 2px; } .cal-grille .tete { font-size: 12px; color: var(--muted-foreground); text-align: center; height: 28px; line-height: 28px; }
.cal-jour { width: 32px; height: 32px; border: 0; background: none; border-radius: var(--radius-sm); font: 400 13px Onest, sans-serif; cursor: pointer; position: relative; color: var(--foreground); }
.cal-jour:hover:not(:disabled) { background: var(--accent); } .cal-jour.aujourdhui { background: var(--accent); font-weight: 600; } .cal-jour.choisi { background: var(--foreground); color: #fff; }
.cal-jour:disabled { color: #C9C5BC; cursor: default; } .cal-jour.repos { color: var(--muted-foreground); }
.cal-jour.ferie::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--ambre); }
.cal-legende { margin-top: 8px; font-size: 12px; color: var(--muted-foreground); max-width: 236px; }
.cal-mois { display: grid; grid-template-columns: repeat(3, 76px); gap: 4px; } .cal-mois button { height: 34px; width: auto; text-transform: capitalize; }
.liste-recherche { padding: 0; width: 320px; max-width: 90vw; overflow: hidden; }
.liste-recherche input { border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; box-shadow: none !important; height: 40px !important; }
.liste-recherche ul { list-style: none; margin: 0; padding: 4px; max-height: 260px; overflow-y: auto; }
.liste-recherche li button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: var(--radius-sm); font: 400 14px Onest, sans-serif; cursor: pointer; color: var(--foreground); }
.liste-recherche li button:hover, .liste-recherche li button:focus-visible { background: var(--accent); box-shadow: none; } .liste-recherche li small { display: block; }
.liste-recherche .rien { padding: 14px; text-align: center; color: var(--muted-foreground); }

/* Fenêtre de dialogue */
.voile { position: fixed; inset: 0; background: rgba(15, 15, 20, .5); z-index: 80; display: grid; place-items: center; padding: 16px; }
.dialogue { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--ombre-lg); padding: 24px; width: 100%; max-width: 480px; display: grid; gap: 14px; }
.primes-prevues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: min(48vh, 380px); overflow: auto; } .saisie { white-space: nowrap; } .primes-prevues li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); font-size: 14px; } .primes-prevues li > span:first-child { display: flex; align-items: center; gap: 8px; } .primes-prevues small { color: var(--muted-foreground); }
.dialogue h2 { font-size: 18px; } .dialogue p { margin: 0; color: var(--muted-foreground); } .dialogue .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* CRA : deux lignes, une colonne par jour */
.cra { border-collapse: separate; border-spacing: 2px; table-layout: fixed; width: 100%; min-width: 880px; }
.cra th, .cra td { border: 0; padding: 0; height: auto; text-align: center; } .cra tbody tr:hover { background: none; }
.cra thead th { font-size: 11px; font-weight: 500; color: var(--muted-foreground); line-height: 1.25; padding-bottom: 4px; } .cra thead th b { display: block; font-size: 13px; color: var(--foreground); font-weight: 600; }
.cra .intitule { text-align: left; padding-right: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; width: 150px; } .cra .intitule small { display: block; font-weight: 400; }
.cra .total { padding-left: 8px; font-weight: 600; white-space: nowrap; text-align: right; width: 64px; }
.case { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; font: 500 12px Onest, sans-serif; color: var(--foreground); display: grid; place-items: center; padding: 0; }
button.case { cursor: pointer; } button.case:hover:not(:disabled) { border-color: var(--ring); } button.case:disabled { cursor: default; }
.case.plein { background: #DCE0FF; border-color: #B9C0FF; color: #232B86; } .case.demi { background: linear-gradient(135deg, #DCE0FF 50%, #fff 50%); border-color: #B9C0FF; color: #232B86; }
.case.repos { background: var(--muted); border-color: transparent; color: var(--muted-foreground); } .case.ferie { background: var(--ambre-f); border-color: transparent; color: var(--ambre); }
.case.a-paye { background: var(--vert-f); border-color: #B9DFCF; color: var(--vert); } .case.a-sans_solde { background: var(--gris-f); border-color: #D2D0C8; color: var(--gris); }
.case.a-maladie { background: var(--rouge-f); border-color: #EFC4BF; color: var(--rouge); } .case.a-exceptionnelle { background: var(--bleu-f); border-color: #BDD2EC; color: var(--bleu); }
.case.attente { border-style: dashed; border-width: 1.5px; } .case.hors { background: transparent; border-color: transparent; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted-foreground); } .legende span { display: inline-flex; align-items: center; gap: 6px; } .legende .case { width: 18px; min-width: 18px; height: 18px; font-size: 0; }
.historique { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .historique li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; font-size: 13px; overflow-wrap: anywhere; } @media (max-width: 640px) { .historique li { grid-template-columns: 1fr; gap: 2px; } } .historique time { color: var(--muted-foreground); }

/* Connexion et page de validation publique */
.connexion { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
/* Panneau de gauche : photo de Paris au coucher du soleil sous un voile sombre, pour que le logo et le slogan restent lisibles */
.connexion .vitrine { background: linear-gradient(180deg, rgba(13, 13, 20, .78) 0%, rgba(13, 13, 20, .42) 30%, rgba(13, 13, 20, .58) 62%, rgba(13, 13, 20, .88) 100%), url('/vitrine.jpg') center / cover no-repeat var(--nuit); color: var(--texte-nuit); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.connexion .vitrine h1, .connexion .vitrine p, .connexion .vitrine small, .connexion .vitrine .logo { text-shadow: 0 1px 14px rgba(0, 0, 0, .55); }
.connexion .vitrine h1 { font-size: 40px; color: #fff; max-width: 440px; } .connexion .vitrine p { color: #EDEDF5; max-width: 420px; font-size: 15px; }
.connexion .formulaire { display: grid; place-items: center; padding: 32px; } .connexion form { width: 100%; max-width: 360px; display: grid; gap: 16px; } .connexion form h2 { font-size: 22px; }
@media (max-width: 900px) { .connexion { grid-template-columns: 1fr; } .connexion .vitrine { padding: 28px; } }
.connexion .pile-public { width: 100%; max-width: 360px; display: grid; gap: 14px; } .connexion .pile-public h2 { font-size: 22px; } .connexion .pile-public .bouton { justify-self: start; }
.connexion form > p { margin: -6px 0 0; }
.ligne-libelle { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .ligne-libelle a { font-weight: 400; font-size: 13px; }
.champ-code { font: 600 26px/1 ui-monospace, "SF Mono", Menlo, monospace !important; letter-spacing: 0.45em; text-align: center; height: 52px !important; }
.alerte-test { padding: 10px 12px; border-radius: var(--radius-md); background: var(--ambre-f); color: var(--ambre); font-size: 13px; } .alerte-test b { font: 700 15px ui-monospace, Menlo, monospace; letter-spacing: 0.15em; }
.exoneration { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); } .exoneration label { max-width: 320px; }
.simulation { padding: 12px 14px; border-radius: var(--radius-md); background: var(--card); border: 1px dashed var(--input); font-size: 13px; color: var(--muted-foreground); display: grid; gap: 4px; }
.sim-ligne { display: flex; justify-content: space-between; gap: 12px; color: var(--foreground); } .sim-ligne span { color: var(--muted-foreground); } .sim-ligne.total { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 2px; font-size: 14px; }
small.ambre { color: var(--ambre); }
/* Ligne entière cliquable quand sa première cellule mène à une fiche */
tbody tr:has(> td:first-child a[href^="#/"]) { cursor: pointer; }
.filtres { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; } .filtres label { min-width: 170px; } .filtres .bouton { margin-bottom: 1px; }
.barre-part { height: 4px; border-radius: 2px; background: var(--muted); margin-top: 6px; max-width: 220px; } .barre-part i { display: block; height: 100%; border-radius: 2px; background: var(--pervenche); }
tfoot td { font-weight: 600; border-top: 2px solid var(--border); border-bottom: 0; padding: 10px 8px; }
.erreur-bloc { padding: 10px 12px; border-radius: var(--radius-md); background: var(--rouge-f); color: var(--rouge); font-size: 13px; }
.lien-bouton.sombre { color: var(--lien); } .lien-bouton.sombre:hover { color: var(--lien-survol); text-decoration: underline; } .ligne.entre { justify-content: space-between; }
/* Aperçu d'un e-mail dans l'administration */
.apercu-courriel { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: #F6F4F0; }
.etat-envoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.etat-envoi div { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); } .etat-envoi small { display: block; } .etat-envoi b { word-break: break-all; }
.publique { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; } .publique .bandeau { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; } .publique .logo { color: var(--foreground); padding: 0; } .publique .logo small { color: var(--muted-foreground); }

/* Notifications */
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 90; }
.toast { background: #fff; color: var(--foreground); border: 1px solid var(--border); padding: 12px 16px; border-radius: var(--radius); max-width: 420px; box-shadow: var(--ombre-lg); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.toast::before { content: "✓"; width: 18px; height: 18px; border-radius: 50%; background: var(--vert); color: #fff; font-size: 11px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.toast.erreur::before { content: "!"; background: var(--destructive); font-weight: 700; }

/* Support : liste cliquable et fil de la demande */
table.cliquable tbody tr { cursor: pointer; } table.cliquable tr.non-lu td { font-weight: 600; } table.cliquable tr.non-lu small { font-weight: 400; }
.point { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pervenche); vertical-align: middle; margin-left: 4px; }
.onglets small { font-weight: 500; opacity: .7; margin-left: 2px; }
textarea.grande { min-height: 200px; }
.pile { display: grid; gap: 16px; }
.rang-2 { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 12px; align-items: end; }
.rang-fin { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; } .rang-fin .champ { flex: 1; min-width: 280px; max-width: 520px; }
@media (max-width: 700px) { .rang-2 { grid-template-columns: 1fr; } }
.fil { display: grid; gap: 12px; margin-bottom: 16px; }
.message { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; max-width: 860px; box-shadow: var(--ombre-xs); }
.message.weepo { background: var(--secondary); border-color: #DDDFFB; margin-left: auto; width: 100%; }
.message header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .message header time { margin-left: auto; color: var(--muted-foreground); font-size: 13px; }
.message p { margin: 0; line-height: 1.6; overflow-wrap: anywhere; } .message footer { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted-foreground); }

/* Fil d'Ariane */
.fil-ariane { font-size: 13px; color: var(--muted-foreground); min-width: 0; flex: 1; overflow: hidden; }
.fil-ariane ol { list-style: none; display: flex; flex-wrap: nowrap; overflow: hidden; align-items: center; gap: 4px; margin: 0; padding: 0; }
.fil-ariane li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.fil-ariane li + li::before { content: "›"; color: var(--input); font-size: 14px; padding: 0 2px; }
.fil-ariane a { color: var(--muted-foreground); } .fil-ariane a:hover { color: var(--foreground); }
.fil-ariane [aria-current] { color: var(--foreground); font-weight: 500; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Équipe client : droits à cocher */
fieldset.droits { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 16px; margin: 16px 0 0; }
fieldset.droits legend { float: left; padding: 0; font-weight: 600; font-size: 14px; }
.grille-droits { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; clear: both; }
.droit { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; background: var(--card); }
.droit .interrupteur { align-items: flex-start; height: auto; display: flex; } .droit .interrupteur .piste { margin-top: 2px; } .droit .interrupteur b { display: block; font-weight: 600; } .droit .interrupteur small { display: block; color: var(--muted-foreground); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.droit.proprietaire { margin-top: 10px; background: var(--muted); }
.droits-badges { display: flex; flex-wrap: wrap; gap: 4px; }
/* Graphique en aires et tableau de données (dashboard-01) */
.graphique { padding-bottom: 12px; }
.graph-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; } .graph-tete p { margin: 2px 0 0; }
.graph-outils { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.graph-legende { display: inline-flex; gap: 12px; font-size: 13px; color: var(--muted-foreground); } .graph-legende span { display: inline-flex; align-items: center; gap: 6px; }
.graph-legende i, .graph-bulle i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.onglets button { padding: 5px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted-foreground); font: 500 14px Onest, sans-serif; cursor: pointer; }
.onglets button:hover { color: var(--foreground); } .onglets button.actif { background: #fff; color: var(--foreground); box-shadow: var(--ombre-xs); }
.groupe-bascule { margin-bottom: 0; }
.graph-zone { position: relative; } .graph-zone svg { width: 100%; height: auto; display: block; }
.graph-grille { stroke: var(--border); stroke-dasharray: 3 3; } .graph-axe { fill: var(--muted-foreground); font: 12px Onest, sans-serif; }
.graph-guide { stroke: var(--muted-foreground); stroke-dasharray: 4 3; } .graph-guide[hidden] { display: none; }
.zone { fill: transparent; }
.graph-bulle { position: absolute; top: 8px; min-width: 150px; padding: 8px 10px; display: grid; gap: 4px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); box-shadow: var(--ombre-lg); font-size: 12.5px; pointer-events: none; }
.graph-bulle span { display: flex; align-items: center; gap: 6px; } .graph-bulle em { font-style: normal; font-weight: 500; margin-left: auto; padding-left: 12px; }
.tbl-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; } .tbl-barre .onglets { margin-bottom: 0; }
.tbl-outils { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tbl-nu .tbl-outils { margin-top: 2px; }
.tbl-filtres { display: contents; }
.tbl-recherche { height: 34px; width: 220px; padding: 0 10px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--card); font: inherit; font-size: 14px; }
.tbl-recherche:focus-visible { outline: none; box-shadow: var(--anneau); border-color: var(--ring); }
.facette, .bouton-colonnes { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: var(--radius-md); background: var(--card); color: var(--foreground); font: 500 13.5px Onest, sans-serif; cursor: pointer; }
.facette { border: 1px dashed var(--input); } .facette.actif { border-style: solid; background: var(--accent); }
.bouton-colonnes { margin-left: auto; border: 1px solid var(--input); }
.facette:hover, .bouton-colonnes:hover { background: var(--accent); } .facette svg, .bouton-colonnes svg { width: 15px; height: 15px; color: var(--muted-foreground); }
.facette:focus-visible, .bouton-colonnes:focus-visible, .reinit:focus-visible { outline: none; box-shadow: var(--anneau); }
.filtre-sep { width: 1px; height: 16px; background: var(--input); margin: 0 2px; }
.filtre-badge { padding: 0 6px; border-radius: var(--radius-sm); background: var(--muted); font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap; }
.reinit { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-md); background: none; color: var(--foreground); font: 500 13.5px Onest, sans-serif; cursor: pointer; } .reinit:hover { background: var(--accent); } .reinit svg { width: 15px; height: 15px; }
.popover-tbl { position: fixed; z-index: 60; min-width: 200px; max-width: 280px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: 0 4px 6px -1px rgba(20, 20, 20, .1), 0 2px 4px -2px rgba(20, 20, 20, .1); font-size: 14px; }
.popover-tbl input[type=search] { width: calc(100% - 8px); margin: 4px; height: 32px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; } .popover-tbl input[type=search]:focus-visible { outline: none; box-shadow: none; }
.pop-titre { margin: 0; padding: 6px 8px; font-weight: 500; font-size: 13px; color: var(--muted-foreground); }
.pop-liste { display: grid; max-height: 260px; overflow-y: auto; } .pop-liste .rien { margin: 0; padding: 14px 8px; text-align: center; color: var(--muted-foreground); font-size: 13px; }
.opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; text-align: left; cursor: pointer; color: var(--foreground); } .opt:hover, .opt:focus-visible { background: var(--accent); outline: none; }
.coche { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--input); border-radius: 4px; } .coche.on { background: var(--foreground); border-color: var(--foreground); color: #fff; } .coche svg { width: 12px; height: 12px; }
.opt-lib { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .opt-n { font-size: 12px; color: var(--muted-foreground); }
.pop-pied { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; } .pop-pied[hidden] { display: none; } .pop-pied button { width: 100%; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; text-align: center; cursor: pointer; } .pop-pied button:hover { background: var(--accent); }
.tri { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; } .tri:hover { color: var(--foreground); } .tri-signe { display: inline-flex; width: 12px; } .tri-signe svg { width: 12px; height: 12px; opacity: .55; }
th.case-selection, td.case-selection { width: 36px; padding-right: 0; } td.case-selection input, th.case-selection input { width: 16px; height: 16px; accent-color: var(--foreground); vertical-align: middle; }
tr.choisie { background: var(--accent); }
.tbl-pied { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.tbl-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tbl-taille-label { display: inline-flex; align-items: center; gap: 8px; margin-right: 12px; } .tbl-taille { height: 32px; padding: 0 6px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--card); font: inherit; font-size: 13px; }
.tbl-page-n { margin-right: 6px; }
.cadre-bouton { width: 32px; height: 32px; margin: 0; border: 1px solid var(--input); background: var(--card); } .cadre-bouton:disabled { opacity: .4; cursor: default; } .cadre-bouton svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .tbl-recherche { width: 100%; } .bouton-colonnes { margin-left: 0; } .tbl-taille-label { margin-right: 0; } }
.tbl-outils input[type=search].tbl-recherche { width: 240px; height: 34px; flex: 0 0 auto; }
.popover-tbl input[type=search] { height: 32px; }
.tbl-pages .tbl-taille { width: 68px; flex: none; } .tbl-taille-label { white-space: nowrap; }
@media (max-width: 640px) { .tbl-outils input[type=search].tbl-recherche { width: 100%; } }
.popover-tbl input[type=search] { width: calc(100% - 8px) !important; border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; background: none !important; }

.nav-groupe { padding: 12px 10px 4px; font: 500 11.5px Onest, sans-serif; letter-spacing: .03em; color: var(--discret-nuit); opacity: .75; } .barre nav .nav-groupe:first-child { padding-top: 0; }

/* Recherche globale / palette de commandes */
.recherche-globale { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 32px; min-width: 220px; padding: 0 8px 0 10px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--card); color: var(--muted-foreground); font: 400 13.5px Onest, sans-serif; cursor: pointer; }
.recherche-globale:hover { background: var(--accent); } .recherche-globale:focus-visible { outline: none; box-shadow: var(--anneau); } .recherche-globale svg { width: 15px; height: 15px; }
.recherche-globale span { flex: 1; text-align: left; } kbd { font: 500 11px Onest, sans-serif; padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--muted); color: var(--muted-foreground); }
@media (max-width: 640px) { .recherche-globale { min-width: 0; } .recherche-globale span, .recherche-globale kbd { display: none; } }
.palette-voile { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; background: rgba(15, 15, 20, .45); }
.palette { width: min(560px, 92vw); border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: var(--ombre-lg); overflow: hidden; }
.palette input[type=search].palette-champ { width: 100%; height: 48px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 16px; font-size: 15px; background: none; box-shadow: none; }
.palette-liste { max-height: 340px; overflow-y: auto; padding: 4px; } .palette-groupe p { margin: 0; padding: 8px 8px 4px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.palette .opt.actif { background: var(--accent); } .palette .opt svg { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; } .palette .rien { margin: 0; padding: 24px 8px; text-align: center; color: var(--muted-foreground); }
/* Squelettes de chargement et champ de mot de passe */
.squelette { display: grid; gap: 12px; padding: 8px 0; }
.barre-sq { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--muted) 25%, #f8f6f2 37%, var(--muted) 63%); background-size: 400% 100%; animation: sq 1.4s ease infinite; }
@keyframes sq { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .barre-sq { animation: none; } }
.champ-mdp { display: grid; gap: 6px; } .label-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; } .label-ligne label { font-size: 14px; font-weight: 500; } .label-ligne a { font-size: 13px; color: var(--muted-foreground); } .label-ligne a:hover { color: var(--foreground); }

/* Accessibilité : lien d'évitement, focus du contenu */
.lien-evitement { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; border: 0; border-radius: var(--radius-md); background: var(--foreground); color: #fff; font: 500 14px Onest, sans-serif; cursor: pointer; transition: top .15s; } .lien-evitement:focus { top: 12px; }
main:focus { outline: none; }

/* Chargement : barre de progression, roue des boutons, écran de démarrage, entrée de page */
#progression { position: fixed; inset: 0 0 auto 0; z-index: 90; height: 2px; background: var(--pervenche); transform: scaleX(0); transform-origin: left; pointer-events: none; }
#progression.actif { transform: scaleX(.85); transition: transform 10s cubic-bezier(.1, .8, .2, 1); }
#progression.fin { transform: scaleX(1); opacity: 0; transition: transform .2s ease-out, opacity .3s ease .2s; }
.roue { display: inline-block; flex: none; width: 1em; height: 1em; margin-right: .5em; vertical-align: -.15em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .7s linear infinite; }
.roue.grande { width: 28px; height: 28px; margin: 0; color: var(--pervenche); border-width: 3px; }
.icone-bouton .roue, .cadre-bouton .roue { margin-right: 0; }
@keyframes tourne { to { transform: rotate(360deg); } }
.charge { pointer-events: none; cursor: progress; opacity: .8; }
.demarrage { min-height: 100vh; display: grid; place-items: center; }
@keyframes apparition { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
main.entree { animation: apparition .22s ease-out; }
@media (prefers-reduced-motion: reduce) { .roue { animation-duration: 1.8s; } main.entree { animation: none; } #progression.actif { transition: none; } }

/* Liste avec recherche : avatars, texte, indicateur de plage */
.avatar.petit { width: 24px; height: 24px; border-radius: 6px; font-size: 10px; flex: none; }
.declencheur > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.liste-recherche li button { justify-content: flex-start; } .liste-recherche li button > svg { margin-left: auto; flex: none; }
.opt-texte { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; } .liste-recherche .opt-texte small { color: var(--muted-foreground); font-size: 12px; }
.liste-recherche li button[aria-selected=true] { font-weight: 500; }

/* Mots de passe : œil, jauge, règles */
.mdp { position: relative; display: block; } .mdp input { padding-right: 44px; }
.oeil { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted-foreground); cursor: pointer; transition: color .15s, background-color .15s; }
.oeil:hover { color: var(--foreground); background: var(--accent); } .oeil:focus-visible { box-shadow: var(--anneau); outline: none; } .oeil svg { width: 16px; height: 16px; }
.empile { display: grid; gap: 16px; max-width: 440px; }
.colonnes-mdp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
@media (max-width: 1050px) { .colonnes-mdp { grid-template-columns: minmax(0, 1fr); } }
.colonnes-mdp h2 { display: flex; align-items: center; gap: 8px; } .colonnes-mdp h2 svg { width: 16px; height: 16px; color: var(--muted-foreground); }
.bloc-securite { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); } .bloc-securite h3 { margin-bottom: 8px; } .bloc-securite p { margin: 0 0 12px; }
.jauge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; } .jauge i { height: 4px; border-radius: 2px; background: var(--muted); transition: background-color .2s; }
.jauge.n1 i:nth-child(-n+1) { background: #C4483D; } .jauge.n2 i:nth-child(-n+2) { background: #D98A2B; } .jauge.n3 i:nth-child(-n+3) { background: #5B9F6E; } .jauge.n4 i { background: var(--vert); }
.jauge-texte { margin: 8px 0 4px; font-size: 13px; color: var(--muted-foreground); } .jauge-texte b { color: var(--foreground); font-weight: 500; }
.regles { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted-foreground); }
.regles li { display: flex; align-items: center; gap: 8px; } .regles li span { width: 16px; display: inline-grid; place-items: center; flex: none; } .regles li svg { width: 12px; height: 12px; }
.regles li.ok { color: var(--vert); } .regles li.ko { color: var(--destructive); }
.concordance { margin: 0; min-height: 20px; font-size: 13px; } .concordance.ok { color: var(--vert); } .concordance.ko { color: var(--destructive); }
.conseils { margin: 0; padding-left: 20px; color: var(--muted-foreground); font-size: 13px; display: grid; gap: 8px; }

/* Inscription libre : formulaire public, parcours du demandeur, fiche de la demande */
.connexion form.inscription { max-width: 420px; gap: 14px; } .connexion form .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profils { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; } .profils legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.choix-profil { display: flex; grid-template-columns: none; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--input); border-radius: var(--radius-md); background: #fff; cursor: pointer; box-shadow: var(--ombre-xs); }
.choix-profil:has(input:checked) { border-color: var(--ring); background: #F8F8FF; } .choix-profil:has(input:focus-visible) { box-shadow: var(--anneau); }
.choix-profil input { margin: 3px 0 0; accent-color: var(--foreground); flex: none; } .choix-profil span { display: grid; gap: 2px; } .choix-profil small { font-weight: 400; color: var(--muted-foreground); line-height: 1.35; }
.lien-inscription { margin: 0; font-size: 14px; color: var(--muted-foreground); text-align: center; } .lien-inscription a { color: var(--foreground); font-weight: 500; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alerte-test a { color: inherit; font-weight: 600; }
.parcours { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; } .parcours li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-foreground); }
.parcours li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--input); background: #fff; font-size: 12px; font-weight: 600; } .parcours li span svg { width: 14px; height: 14px; }
.parcours li.fait { color: var(--foreground); } .parcours li.fait span { background: var(--vert-f); border-color: transparent; color: var(--vert); }
.parcours li.encours { color: var(--foreground); font-weight: 600; } .parcours li.encours span { background: var(--foreground); border-color: var(--foreground); color: #fff; }
.titre-besoin { margin: 18px 0 6px; font-size: 14px; font-weight: 600; } .besoin { margin: 0; white-space: pre-line; line-height: 1.6; }
.champs.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; gap: 16px 14px; } .champs.deux .large { grid-column: 1 / -1; } .champs.deux > .bouton { justify-self: start; }
@media (max-width: 700px) { .champs.deux { grid-template-columns: 1fr; } }
/* Inscription : libellé et aide de l'adresse e-mail selon le profil choisi (société ou consultant) */
form.inscription:has(input[name=profil][value=consultant]:checked) .pour-societe, form.inscription:has(input[name=profil][value=societe]:checked) .pour-consultant { display: none; }

/* --- Alertes : ce qui dépasse un délai ou un seuil se voit d'abord. Un seul rouge, trois usages : le filet à gauche
   (cartes, lignes), le chiffre, et le badge avec son triangle. Jamais un aplat rouge : le fond reste presque blanc. --- */
.tuile-chiffre { min-width: 0; flex: 1 1 auto; } .tuile .valeur { overflow-wrap: anywhere; }
.tuile-sous { margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--muted-foreground); overflow-wrap: anywhere; }
.tuile.alerte { border-color: #EBC3BE; background: linear-gradient(to top, #FDF3F1, var(--card) 72%); box-shadow: inset 3px 0 0 var(--rouge), var(--ombre-xs); }
.tuile.alerte .valeur { color: var(--rouge); } a.tuile.alerte:hover { border-color: var(--rouge); }
.tuile-badge svg, .badge svg { flex: none; }
.negatif { color: var(--rouge); font-weight: 600; } small.rouge, .rouge { color: var(--rouge); }
tbody tr:has(.badge.retard) { background: #FEF8F7; box-shadow: inset 3px 0 0 var(--rouge); }
.carte.en-retard { border-color: #EBC3BE; box-shadow: inset 3px 0 0 var(--rouge), var(--ombre-xs); }

/* --- À faire : compteurs et liste, à l'accueil et dans la cloche --- */
.afaire-carte { margin-top: 16px; }
.af-compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.af-compteur { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--muted); }
.af-compteur b { font: 600 20px/1.1 Onest, sans-serif; letter-spacing: -0.01em; } .af-compteur span { font-size: 12.5px; color: var(--muted-foreground); }
.af-compteur.alerte { background: var(--rouge-f); border-color: #EBC3BE; } .af-compteur.alerte b, .af-compteur.alerte span { color: var(--rouge); }
.afaire { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.afaire a { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--foreground); }
.afaire a:hover { background: var(--accent); text-decoration: none; } .afaire a:focus-visible { outline: none; box-shadow: var(--anneau); }
.af-point { width: 8px; height: 8px; border-radius: 50%; background: var(--ring); }
.af-texte { display: grid; gap: 1px; min-width: 0; } .af-texte b { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; } .af-texte small { font-size: 12.5px; overflow-wrap: anywhere; }
.af-niveau { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: var(--radius-sm); background: var(--bleu-f); color: var(--bleu); white-space: nowrap; }
.af-urgent a { border-color: #EBC3BE; background: #FEF8F7; box-shadow: inset 3px 0 0 var(--rouge); } .af-urgent .af-point { background: var(--rouge); } .af-urgent .af-niveau { background: var(--rouge-f); color: var(--rouge); } .af-urgent .af-texte b { color: var(--rouge); }
.af-info .af-point { background: var(--input); } .af-info .af-niveau { background: var(--gris-f); color: var(--gris); }

/* --- Cloche --- */
.cloche { position: relative; width: 34px; height: 34px; margin-left: 4px; flex: none; }
.cloche-n { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--foreground); color: #fff; font: 600 10.5px/16px Onest, sans-serif; text-align: center; }
.cloche.urgent { color: var(--rouge); } .cloche.urgent .cloche-n { background: var(--rouge); }
.cloche-panneau { position: fixed; z-index: 55; width: min(420px, calc(100vw - 16px)); max-height: min(72vh, 620px); overflow-y: auto; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); box-shadow: var(--ombre-lg); }
.cloche-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; } .cloche-tete b { font: 600 15px Onest, sans-serif; } .cloche-tete span { font-size: 12.5px; color: var(--muted-foreground); }
.cloche-pied { margin: 10px 0 0; font-size: 12px; color: var(--muted-foreground); }
@media (max-width: 640px) { .cloche-panneau { right: 8px !important; } }

/* --- Simulateur : point de départ (brut, net, budget) et visibilité d'un document --- */
.segments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.segment { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--input); border-radius: var(--radius); background: #fff; box-shadow: var(--ombre-xs); cursor: pointer; }
.segment input { position: absolute; opacity: 0; pointer-events: none; } .segment b { font-weight: 600; font-size: 14px; } .segment small { font-size: 12px; line-height: 1.35; font-weight: 400; }
.segment.actif, .segment:has(input:checked) { border-color: var(--ring); background: #F8F8FF; } .segment:has(input:focus-visible) { box-shadow: var(--anneau); }
@media (max-width: 700px) { .segments { grid-template-columns: 1fr; } }
.choix-visibilite { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.choix-visibilite legend { padding: 0; margin-bottom: 6px; font-weight: 500; font-size: 14px; } .choix-visibilite .choix { cursor: pointer; font-weight: 400; }
@media (max-width: 700px) { .choix-visibilite { grid-template-columns: 1fr; } }
.erreur-bloc a { color: inherit; text-decoration: underline; font-weight: 500; } .erreur-bloc[hidden] { display: none; }
.bouton > svg { flex: none; width: 16px; height: 16px; }
.note .lien-bouton { margin-left: 6px; text-decoration: underline; }

/* --- Pages légales (publiques) et leurs liens (0.2.4) --- */
.liens-legaux { margin: 22px 0 0; display: flex; gap: 8px; justify-content: center; font-size: 12.5px; color: var(--muted-foreground); }
.liens-legaux a { color: inherit; text-decoration: underline; text-underline-offset: 3px; } .liens-legaux a:hover { color: var(--foreground); }
.connexion .formulaire { align-content: center; } .connexion .formulaire > .liens-legaux { width: 100%; }
.notice-donnees { font-size: 12.5px; line-height: 1.5; } .notice-donnees a { text-decoration: underline; text-underline-offset: 3px; }
.page-legale { min-height: 100vh; background: var(--card); }
.page-legale > header { display: flex; align-items: center; gap: 24px; padding: 16px 32px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.page-legale > header .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 700; font-size: 18px; line-height: 1.1; }
.page-legale > header .logo svg { width: 34px; height: auto; } .page-legale > header .logo small { display: block; font-size: 11px; font-weight: 500; color: var(--muted-foreground); }
.page-legale > header nav { display: flex; gap: 6px; margin-left: auto; }
.page-legale > header nav a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--muted-foreground); font-size: 14px; font-weight: 500; }
.page-legale > header nav a[aria-current=page] { background: var(--accent); color: var(--foreground); }
.page-legale main { max-width: 760px; margin: 0 auto; padding: 36px 32px 72px; outline: none; }
.page-legale main .retour { display: inline-block; margin-bottom: 18px; font-size: 14px; color: var(--muted-foreground); text-decoration: none; } .page-legale main .retour:hover { color: var(--foreground); }
.page-legale h1 { font-size: 32px; margin: 0 0 6px; } .page-legale section { margin-top: 30px; } .page-legale h2 { font-size: 18px; margin: 0 0 10px; }
.page-legale p, .page-legale li { font-size: 15px; line-height: 1.65; } .page-legale section p { margin: 0 0 10px; } .page-legale ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.page-legale section a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) { .page-legale > header { padding: 14px 18px; gap: 12px; } .page-legale > header nav { margin-left: 0; } .page-legale main { padding: 24px 18px 56px; } .page-legale h1 { font-size: 26px; } }
