/* ===== Saint Clair Dentaire · Indicateurs =====
   Charte ARTIM : bleu nuit, crème, taupe, sable. Titres en Instrument Serif, texte en Jost. */
:root {
  --nuit: #09213e;
  --nuit-2: #142f55;
  --nuit-doux: #e6ebf2;
  --creme: #fffdf7;
  --papier: #f5f1e8;
  --sable: #e2d3c0;
  --sable-2: #efe6da;
  --sable-fonce: #b59f82;
  --taupe: #605c51;
  --taupe-2: #8d887b;
  --cobalt: #1f35c4;
  --encre: #0d1a2c;
  --trait: #e7e0d3;
  --trait-2: #d9d0c0;
  --carte: #fffdf7;
  --carte-2: #f3eee4;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 22px;
  --r-s: 14px;
  --ombre: 0 1px 0 rgba(9, 33, 62, .03), 0 18px 40px -28px rgba(9, 33, 62, .35);
  --courbe: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--sans); font-size: 15px; font-weight: 400; line-height: 1.45;
  color: var(--encre); background: var(--papier);
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; color: inherit; }
svg { display: block; }
[data-icone] svg, .ico svg, .kpi-ico svg, .ico-rond svg, .fleche svg, .rond svg, .puce svg, .a-regarder svg, .evol svg, .fil svg, .bouton svg, .pied svg, .modale-icone svg, h3 svg { width: 18px; height: 18px; }
::selection { background: var(--sable); }

.app { max-width: 1280px; margin: 0 auto; padding: 0 32px 32px; }

/* ---------- Barre du haut ---------- */
.barre {
  display: flex; align-items: center; gap: 22px;
  height: 92px; border-bottom: 1px solid var(--trait);
}
.marque { display: flex; align-items: center; gap: 14px; color: var(--nuit); text-decoration: none; }
.mont { width: 62px; height: auto; fill: var(--nuit); }
.marque-texte { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.marque-nom { font-weight: 500; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.marque-sous { font-size: 8.5px; font-weight: 500; letter-spacing: .52em; margin: 5px -.52em 0 0; text-transform: uppercase; }
.barre-sep { width: 1px; height: 30px; background: var(--trait-2); }
.barre-titre { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--taupe); }
.barre-droite { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.pilule {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 40px 0 16px; border-radius: 999px;
  border: 1px solid var(--trait-2); background: var(--creme); color: var(--nuit);
  cursor: pointer; transition: border-color .2s;
}
.pilule:hover, .pilule:focus-within { border-color: var(--nuit); }
.pilule select { appearance: none; border: 0; background: transparent; outline: none; font-weight: 500; font-size: 14px; cursor: pointer; }
.pilule .chev { position: absolute; right: 15px; pointer-events: none; color: var(--taupe-2); }
.pilule .chev svg { width: 15px; height: 15px; }
.pilule > [data-icone]:first-child { color: var(--taupe); }

.utilisateur { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 6px; border-radius: 999px; background: var(--creme); border: 1px solid var(--trait-2); }
.nom-user { font-size: 14px; font-weight: 500; color: var(--nuit); white-space: nowrap; }
.deconnexion { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--taupe); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.deconnexion:hover { background: var(--nuit); color: var(--creme); }
.deconnexion svg { width: 16px; height: 16px; }
.mode-connexion .barre-droite, .mode-connexion .barre-sep, .mode-connexion .barre-titre { display: none; }

/* ---------- Avatars (monogrammes) ---------- */
.avatar, .mini-avatar {
  flex: none; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--sans); font-weight: 500; letter-spacing: .06em;
}
.avatar { width: 44px; height: 44px; font-size: 13px; }
.mini-avatar { width: 32px; height: 32px; font-size: 11px; }
.av-TF { background: var(--nuit); color: var(--creme); }
.av-PC { background: var(--taupe); color: var(--creme); }
.av-SD { background: var(--sable); color: var(--nuit); }
.av-EC { background: var(--nuit-doux); color: var(--nuit); }
.av-MB { background: var(--sable-2); color: var(--taupe); box-shadow: inset 0 0 0 1px var(--trait-2); }
.av-SECR { background: var(--carte-2); color: var(--taupe); }

/* ---------- En-tête de page ---------- */
.entete {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 44px 0 30px;
}
.fil { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe); margin-bottom: 14px; }
.fil svg { width: 15px; height: 15px; }
h1 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 5vw, 60px); line-height: 1; letter-spacing: -.01em; color: var(--nuit);
}
h1 .doux { font-style: italic; color: var(--taupe-2); }
.entete-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fiche-entete { display: flex; align-items: center; gap: 18px; }
.fiche-entete .avatar { width: 64px; height: 64px; font-size: 17px; }

.statut {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap;
}
.statut .point { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.statut-attente { background: var(--sable-2); color: var(--taupe); box-shadow: inset 0 0 0 1px var(--sable); }
.statut-attente .point { animation: pulse 2s ease-in-out infinite; }
.statut-valide { background: var(--nuit-doux); color: var(--nuit); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; letter-spacing: .01em; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.bouton:active { transform: scale(.98); }
.bouton:disabled { opacity: .55; cursor: default; }
.bouton-sombre { background: var(--nuit); color: var(--creme); padding-left: 8px; }
.bouton-sombre:hover { background: var(--nuit-2); }
.bouton-clair { background: transparent; border-color: var(--trait-2); color: var(--nuit); }
.bouton-clair:hover { border-color: var(--nuit); }
.bouton-lien { background: none; border: 0; padding: 0 6px; height: auto; color: var(--taupe); text-decoration: underline; text-underline-offset: 3px; font-weight: 400; }
.bouton-rond { width: 46px; padding: 0; }
.bouton-large { width: 100%; height: 54px; font-size: 15px; }
.ico-rond { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--creme); color: var(--nuit); }
.ico-rond svg { width: 16px; height: 16px; }
.bouton-sombre:not(:has(.ico-rond)) { padding-left: 22px; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

/* ---------- Cartes indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; min-height: 248px; padding: 24px 24px 22px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--r);
  box-shadow: var(--ombre);
}
.kpi-sombre { background: var(--nuit); border-color: var(--nuit); color: var(--creme); }
.kpi-sombre::after {
  content: ""; position: absolute; z-index: -1; right: -40px; bottom: -6px; width: 300px; height: 75px; opacity: .07;
  background: var(--creme);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 30'%3E%3Cpath d='M0 30C10 28.6 18 26.2 26 24.6c8-1.6 14-3.1 22-7.1 8-4 14-9.5 20-12.5 2.5-1.2 4-1.4 5.5-.8 1 .4 2 .1 3-.3 1.5-.5 3-.1 4.5 1.5 5 5.1 11 13.6 18 19.1 5 3.5 11 4.9 21 5.5z'/%3E%3C/svg%3E") no-repeat bottom / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 30'%3E%3Cpath d='M0 30C10 28.6 18 26.2 26 24.6c8-1.6 14-3.1 22-7.1 8-4 14-9.5 20-12.5 2.5-1.2 4-1.4 5.5-.8 1 .4 2 .1 3-.3 1.5-.5 3-.1 4.5 1.5 5 5.1 11 13.6 18 19.1 5 3.5 11 4.9 21 5.5z'/%3E%3C/svg%3E") no-repeat bottom / contain;
}
.kpi-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.kpi-label { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe); }
.kpi-sombre .kpi-label { color: rgba(255, 253, 247, .7); }
.kpi-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--carte-2) !important; color: var(--nuit); }
.kpi-ico svg { width: 16px; height: 16px; }
.kpi-sombre .kpi-ico { background: rgba(255, 253, 247, .1) !important; color: var(--creme); }
.kpi-valeur {
  margin-top: 26px; font-family: var(--serif); font-size: clamp(36px, 3.4vw, 48px); line-height: 1;
  letter-spacing: -.01em; color: var(--nuit); white-space: nowrap;
}
.kpi-sombre .kpi-valeur { color: var(--creme); }
.kpi-sur { margin-top: 10px; font-size: 13.5px; color: var(--taupe); }
.kpi-sur b { font-weight: 600; color: var(--nuit); }
.kpi-sombre .kpi-sur { color: rgba(255, 253, 247, .7); }
.kpi-sombre .kpi-sur b { color: var(--creme); }
.kpi-pied { margin-top: auto; padding-top: 22px; }
.kpi-info { margin-top: 14px; font-size: 12.5px; color: var(--taupe-2); line-height: 1.5; }
.kpi-sombre .kpi-info { color: rgba(255, 253, 247, .62); }

/* Jauge fine : remplissage, repère (objectif ou 14 %), curseur */
.jauge { position: relative; height: 3px; border-radius: 3px; background: var(--sable-2); }
.kpi-sombre .jauge { background: rgba(255, 253, 247, .16); }
.jauge-remplie { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--nuit); transition: width 1.2s var(--courbe) .25s; }
.kpi-sombre .jauge-remplie { background: var(--creme); }
.jauge-repere { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--taupe-2); }
.kpi-sombre .jauge-repere { background: rgba(255, 253, 247, .5); }
.jauge-curseur {
  position: absolute; top: 50%; left: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--creme); border: 2px solid var(--nuit);
  transition: left 1.2s var(--courbe) .25s;
}
.kpi-sombre .jauge-curseur { background: var(--nuit); border-color: var(--creme); }

/* Repère neutre « à regarder ensemble » */
.a-regarder {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px;
  border-radius: 999px; background: var(--sable-2); color: var(--taupe);
  font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--sable);
}
.a-regarder svg { width: 13px; height: 13px; }
.kpi-sombre .a-regarder { background: var(--sable); color: var(--nuit); box-shadow: none; }

.evol { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 500; vertical-align: 1px; }
.evol svg { width: 12px; height: 12px; }
.evol-haut { color: var(--nuit); }
.evol-bas { color: var(--taupe-2); }
.kpi-sombre .evol-haut, .kpi-sombre .evol-bas { color: var(--creme); }

/* ---------- Panneaux ---------- */
.panneau {
  margin-top: 16px; padding: 28px 28px 14px; border-radius: var(--r);
  background: var(--carte); border: 1px solid var(--trait); box-shadow: var(--ombre);
}
.section-titre {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px;
  font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; color: var(--nuit);
}
.section-titre .ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--carte-2); color: var(--nuit); }
.section-titre .ico svg { width: 17px; height: 17px; }
.section-titre .note { margin-left: auto; font-family: var(--sans); font-size: 13px; color: var(--taupe-2); }

/* ---------- Tableau des praticiens ---------- */
.tableau-defilant { overflow-x: auto; margin: 0 -12px; }
.tableau { width: 100%; min-width: 1040px; border-collapse: separate; border-spacing: 0; }
.tableau th {
  padding: 0 10px 12px; text-align: left; vertical-align: bottom;
  font-size: 10.5px; font-weight: 500; letter-spacing: .1em; line-height: 1.5; text-transform: uppercase; color: var(--taupe-2);
  border-bottom: 1px solid var(--trait);
}
.tableau td { padding: 18px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th:first-child, .tableau td:first-child { padding-left: 12px; }
.tableau .prat-nom { white-space: normal; }
.tableau tbody tr[data-fiche] { cursor: pointer; transition: background .2s; }
.tableau tbody tr[data-fiche]:hover { background: var(--papier); }
.tableau tbody tr[data-fiche]:hover .fleche { background: var(--nuit); color: var(--creme); border-color: var(--nuit); transform: translateX(2px); }
.tableau tr:focus-visible { outline-offset: -2px; }
.ligne-total td { border-bottom: 0; background: var(--carte-2); }
.ligne-total td:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
.ligne-total td:last-child { border-radius: 0 var(--r-s) var(--r-s) 0; }
.ligne-total .cell-val { font-weight: 600; }
.prat { display: flex; align-items: center; gap: 14px; }
.prat .avatar svg { width: 18px; height: 18px; color: var(--nuit); }
.prat-nom { font-weight: 500; font-size: 15px; color: var(--nuit); white-space: nowrap; }
.prat-role { font-size: 12.5px; color: var(--taupe-2); }
.cell-val { font-size: 15px; font-weight: 500; color: var(--nuit); white-space: nowrap; }
.cell-sous { margin-top: 3px; font-size: 12.5px; color: var(--taupe-2); }
.cell-sous b { font-weight: 500; color: var(--taupe); }
.mini-jauge { width: 100%; max-width: 128px; height: 2px; margin-top: 10px; background: var(--sable-2); border-radius: 2px; }
.mini-jauge i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--nuit); transition: width 1.1s var(--courbe) .3s; }
.mini-jauge.attention i { background: var(--sable-fonce); }
.cell-flag { margin-top: 10px; }
.fleche { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--trait-2); color: var(--nuit); transition: all .25s var(--courbe); }
.fleche svg { width: 15px; height: 15px; }
.cartes-prat { display: none; }

/* ---------- Fiche praticien ---------- */
.grille-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-top: 16px; align-items: start; }
.grille-fiche .panneau { margin-top: 0; padding-bottom: 24px; }
.graph-onglets { margin-left: auto; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--carte-2); font-family: var(--sans); }
.onglet { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--taupe); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s; }
.onglet:hover { color: var(--nuit); }
.onglet[aria-pressed="true"] { background: var(--nuit); color: var(--creme); }
.graph-zone { position: relative; height: 300px; }
.graph-zone svg { width: 100%; height: 100%; overflow: visible; }
.axe-texte { font: 400 11px var(--sans); fill: var(--taupe-2); }
.axe-mois { font: 500 11px var(--sans); fill: var(--taupe-2); letter-spacing: .06em; text-transform: uppercase; }
.axe-mois.actif { fill: var(--nuit); font-weight: 600; }
.barre-graph { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform 1s var(--courbe); }
.graph-pret .barre-graph { transform: scaleY(1); }
.ligne-obj { stroke-dasharray: 4 5; opacity: 0; transition: opacity .6s .6s; }
.graph-pret .ligne-obj { opacity: 1; }
.zone-survol { fill: transparent; }
.zone-survol:hover { fill: rgba(9, 33, 62, .035); }
.tooltip {
  position: absolute; z-index: 3; pointer-events: none; min-width: 210px; padding: 12px 14px;
  border-radius: 14px; background: var(--nuit); color: var(--creme); font-size: 12.5px; line-height: 1.6;
  transform: translate(-50%, -100%); opacity: 0; transition: opacity .18s;
  box-shadow: 0 20px 40px -18px rgba(9, 33, 62, .6);
}
.tooltip b { display: block; margin-bottom: 4px; font-family: var(--serif); font-weight: 400; font-size: 17px; text-transform: capitalize; }
.tooltip .tt-l { display: flex; align-items: center; gap: 8px; }
.tooltip .tt-l i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.legende { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--trait); font-size: 12.5px; color: var(--taupe); }
.legende span { display: inline-flex; align-items: center; gap: 8px; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legende .lg-reel { background: var(--nuit); }
.legende .lg-n1 { background: repeating-linear-gradient(135deg, var(--sable-fonce) 0 1.2px, var(--sable-2) 1.2px 4px); box-shadow: inset 0 0 0 1px var(--sable); }
.legende .lg-obj, .legende .lg-repere { width: 18px; height: 0; border-radius: 0; border-top: 1.6px dashed var(--taupe); }

.cote { display: flex; flex-direction: column; gap: 16px; }
.carte-cote { padding: 24px; border-radius: var(--r); background: var(--carte); border: 1px solid var(--trait); box-shadow: var(--ombre); }
.carte-cote h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 23px; color: var(--nuit); }
.carte-cote h3 svg { width: 17px; height: 17px; }
.petit { margin: 6px 0 0; font-size: 13px; color: var(--taupe-2); }
.comparatif { margin-top: 16px; display: flex; flex-direction: column; gap: 11px; }
.comp-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--taupe); }
.comp-ligne b { font-weight: 500; color: var(--nuit); text-align: right; white-space: nowrap; }
.carte-sujets { background: var(--sable-2); border-color: var(--sable); box-shadow: none; }
.carte-sujets ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.carte-sujets li { display: flex; gap: 12px; font-size: 13.5px; line-height: 1.5; color: var(--encre); }
.puce { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--creme); color: var(--taupe); }
.puce svg { width: 14px; height: 14px; }
.carte-confiance { background: var(--nuit); border-color: var(--nuit); color: var(--creme); }
.carte-confiance h3 { color: var(--creme); }
.carte-confiance .petit { color: rgba(255, 253, 247, .7); line-height: 1.55; }

/* ---------- Secrétariat ---------- */
.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.etape { padding: 26px; border-radius: var(--r); background: var(--carte); border: 1px solid var(--trait); box-shadow: var(--ombre); }
.etape .num { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe-2); }
.etape h3 { margin: 14px 0 8px; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--nuit); }
.etape p { margin: 0; font-size: 14px; color: var(--taupe); line-height: 1.55; }
.colonnes { width: 100%; border-collapse: collapse; }
.colonnes th { text-align: left; padding: 0 12px 12px; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe-2); border-bottom: 1px solid var(--trait); }
.colonnes td { padding: 14px 12px; border-bottom: 1px solid var(--trait); font-size: 14px; color: var(--taupe); }
.colonnes tr:last-child td { border-bottom: 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--nuit); background: var(--carte-2); padding: 3px 7px; border-radius: 6px; }

/* ---------- Messages ---------- */
.message { max-width: 520px; margin: 80px auto; text-align: center; }
.message .rond { width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sable-2); color: var(--taupe); }
.message .rond svg { width: 26px; height: 26px; }
.message h2 { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: 36px; color: var(--nuit); }
.message p { margin: 0; color: var(--taupe); line-height: 1.6; }

/* ---------- Connexion ---------- */
.connexion { display: grid; grid-template-columns: 1fr 460px; gap: 64px; align-items: center; min-height: calc(100vh - 200px); padding: 48px 0; }
.connexion-titre { position: relative; }
.connexion-titre .logo { width: 220px; color: var(--nuit); margin-bottom: 40px; }
.connexion-titre .logo svg { width: 100%; height: auto; fill: currentColor; }
.connexion-titre .logo svg path { stroke: none; }
.connexion-titre h1 { font-size: clamp(48px, 6vw, 80px); }
.connexion-titre p { max-width: 440px; margin: 24px 0 0; font-size: 16px; line-height: 1.6; color: var(--taupe); }
.connexion-carte { padding: 28px; border-radius: 28px; background: var(--carte); border: 1px solid var(--trait); box-shadow: 0 40px 80px -40px rgba(9, 33, 62, .35); }
.champ { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; margin-bottom: 14px; border-radius: 16px; border: 1px solid var(--trait-2); background: var(--papier); color: var(--taupe); transition: border-color .2s; }
.champ[hidden] { display: none; }
.champ:focus-within { border-color: var(--nuit); }
.champ input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--nuit); }
.erreur { margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--sable-2); color: var(--taupe); font-size: 13.5px; }

/* ---------- Pied ---------- */
.pied { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--trait); font-size: 12px; letter-spacing: .04em; color: var(--taupe-2); text-align: center; }
.pied svg { width: 14px; height: 14px; }

/* ---------- Modale & toast ---------- */
.modale { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(9, 33, 62, .32); backdrop-filter: blur(6px); animation: fondu .2s ease both; }
.modale[hidden] { display: none; }
.modale-carte { width: 100%; max-width: 460px; padding: 32px; border-radius: 26px; background: var(--creme); box-shadow: 0 40px 90px -30px rgba(9, 33, 62, .55); animation: monte .4s var(--courbe) both; }
.modale-icone { width: 52px; height: 52px; margin-bottom: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--nuit); color: var(--creme); }
.modale-icone svg { width: 22px; height: 22px; }
.modale h2 { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--nuit); }
.modale p { margin: 0 0 26px; font-size: 14.5px; line-height: 1.6; color: var(--taupe); }
.modale-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modale-actions [hidden] { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; border-radius: 999px;
  background: var(--nuit); color: var(--creme); font-size: 14px; box-shadow: 0 20px 40px -16px rgba(9, 33, 62, .6);
  animation: monte .4s var(--courbe) both;
}
.toast[hidden] { display: none; }

/* ---------- Animations d'entrée ---------- */
.entre { opacity: 0; animation: monte .8s var(--courbe) forwards; }
@keyframes monte { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .entre { opacity: 1; }
  .barre-graph { transform: none; }
  .ligne-obj { opacity: 1; }
}

/* ---------- Écrans plus étroits ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grille-fiche { grid-template-columns: minmax(0, 1fr); }
  .grille-fiche > * { min-width: 0; }
  .cote { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .barre-titre, .barre-sep { display: none; }
}
@media (max-width: 860px) {
  .connexion { grid-template-columns: 1fr; gap: 32px; min-height: 0; padding: 32px 0; }
  .connexion-titre .logo { width: 160px; margin-bottom: 26px; }
  .etapes { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .app { padding: 0 16px 24px; }
  .barre { height: auto; flex-wrap: wrap; gap: 12px; padding: 14px 0; }
  .mont { width: 46px; }
  .marque-nom { font-size: 14px; }
  .marque-sous { font-size: 7.5px; }
  .barre-droite { display: contents; }
  .utilisateur { margin-left: auto; }
  .nom-user { display: none; }
  .select-mois { order: 5; width: 100%; }
  .select-mois select { flex: 1; }
  .entete { padding: 28px 0 20px; gap: 16px; }
  .entete-actions { width: 100%; }
  .entete-actions .bouton:not(.bouton-lien) { flex: 1; }
  .fiche-entete { gap: 12px; }
  .fiche-entete .avatar { width: 48px; height: 48px; font-size: 14px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { min-height: 0; padding: 16px; border-radius: 18px; }
  .kpi-haut { flex-direction: column; align-items: flex-start; gap: 8px; }
  .kpi-label { font-size: 10.5px; gap: 8px; }
  .kpi-ico { width: 28px; height: 28px; }
  .kpi-valeur { margin-top: 12px; font-size: 30px; }
  .kpi-sur { font-size: 12.5px; }
  .kpi-info { font-size: 11.5px; }
  .kpi-pied { padding-top: 16px; }
  .panneau { padding: 20px 16px 10px; border-radius: 18px; }
  .section-titre { font-size: 24px; }
  .section-titre .note { margin-left: 0; width: 100%; }
  .graph-onglets { margin-left: 0; overflow-x: auto; max-width: 100%; }
  .onglet { white-space: nowrap; padding: 0 12px; }
  .graph-zone { height: 230px; }
  .tableau-defilant { display: none; }
  .cartes-prat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
  .carte-prat { width: 100%; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--trait); background: var(--carte); cursor: pointer; }
  .carte-prat-haut { display: flex; align-items: center; gap: 12px; }
  .carte-prat-haut .a-regarder { margin-left: auto; }
  .carte-prat dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--trait); }
  .carte-prat dt { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--taupe-2); }
  .carte-prat dd { margin: 3px 0 0; font-size: 13.5px; font-weight: 500; color: var(--nuit); }
  .carte-prat dd.attention { color: var(--taupe); }
  .carte-prat dd.attention::after { content: " · à regarder"; font-weight: 400; font-size: 12px; color: var(--sable-fonce); }
  .carte-cote { padding: 20px; border-radius: 18px; }
  .connexion-carte { padding: 18px; border-radius: 22px; }
  .modale-carte { padding: 24px; }
}
@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
}

/* ---------- Accès ---------- */
.acces-liste { display: flex; flex-direction: column; }
.acces-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.acces-ligne:last-child { border-bottom: 0; }
.acces-ligne .bouton svg { width: 16px; height: 16px; }
.modale-champ { width: 100%; height: 50px; margin: -12px 0 22px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--trait-2, var(--trait)); background: var(--papier, #fff); font: inherit; font-size: 16px; letter-spacing: .02em; outline: none; }
.modale-champ:focus { border-color: var(--nuit, #000); }

/* ---------- Signalement ---------- */
.statut-corriger { background: var(--sable-2, #f3e3c8); color: var(--taupe, #7a5a2e); }
.bandeau-correction { display: flex; gap: 14px; align-items: flex-start; margin: -6px 0 22px; padding: 16px 18px; border-radius: 18px; background: var(--sable-2, #f3e3c8); color: var(--nuit, #1c1d1f); }
.bandeau-correction > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.bandeau-correction b { display: block; font-weight: 600; margin-bottom: 4px; }
.bandeau-correction span { display: block; font-size: 14.5px; line-height: 1.5; }
.bandeau-correction small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--taupe, #6b6b6b); }

/* ---------- Rubriques : Indicateurs / Réunions ---------- */
.espaces[hidden] { display: none !important; }
.espaces { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--carte-2); }
.espaces button { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--taupe); font-size: 14px; font-weight: 500; cursor: pointer; }
.espaces button[aria-pressed="true"] { background: var(--nuit); color: var(--creme); }
.espaces button:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* ---------- Réunions ---------- */
.etiq { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; letter-spacing: .02em; vertical-align: 1px; }
.etiq-decision { background: var(--nuit-doux); color: var(--nuit); }
.etiq-proposition, .etiq-retard { background: var(--sable-2); color: #633806; }
.etiq-action { background: #e1f5ee; color: #085041; }
.reu-liste { list-style: none; margin: 0 0 14px; padding: 0; }
.reu-item { padding: 10px 0; border-bottom: 1px solid var(--trait); line-height: 1.5; }
.reu-item:last-child { border-bottom: 0; }
.reu-meta { margin-top: 2px; font-size: 13px; color: var(--taupe); }
.reu-qui { margin: 14px 0 0; font-size: 14px; font-weight: 500; color: var(--nuit); }
.reu-crs { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; }
.reu-cr { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--trait); border-radius: var(--r-s); background: var(--carte); text-align: left; cursor: pointer; }
.reu-cr:hover, .reu-cr:focus-visible { border-color: var(--nuit); }
.reu-cr small { display: block; margin-top: 2px; color: var(--taupe); font-size: 13px; }
.cote .carte-cote p { margin: 8px 0 14px; }
.cote .carte-cote .bouton { text-decoration: none; }
.cr { max-width: 760px; padding-bottom: 24px; }
.cr p { margin: 6px 0 10px; line-height: 1.55; }
.cr-infos { display: grid; gap: 10px; margin: 0 0 10px; padding: 16px 18px; border-radius: var(--r-s); background: var(--carte-2); }
.cr-infos dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--taupe-2); }
.cr-infos dd { margin: 2px 0 0; color: var(--nuit); }
.cr-titre { margin: 26px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--nuit); font-size: 17px; font-weight: 500; color: var(--nuit); }
.cr-bloc { margin: 10px 0; }
.cr-bloc p { margin-top: 4px; }
@media (max-width: 760px) {
  .espaces { order: 4; width: 100%; }
  .espaces button { flex: 1; }
}

/* ---------- Accueil ---------- */
.accueil { max-width: 820px; margin: 56px auto 0; }
.accueil h1 { margin: 0 0 32px; }
.accueil-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.accueil-carte { position: relative; display: grid; gap: 6px; padding: 28px 26px 26px; border: 1px solid var(--trait); border-radius: var(--r); background: var(--carte); box-shadow: var(--ombre); text-align: left; cursor: pointer; transition: border-color .2s var(--courbe), transform .2s var(--courbe); }
.accueil-carte:hover, .accueil-carte:focus-visible { border-color: var(--nuit); transform: translateY(-2px); outline: none; }
.accueil-carte .ico { width: 46px; height: 46px; margin-bottom: 12px; border-radius: 50%; display: grid; place-items: center; background: var(--nuit-doux); color: var(--nuit); }
.accueil-carte .ico svg { width: 20px; height: 20px; }
.accueil-titre { font-family: var(--serif); font-size: 30px; color: var(--nuit); line-height: 1.1; }
.accueil-sous { font-size: 14px; color: var(--taupe); line-height: 1.5; }
.accueil-carte .fleche { position: absolute; top: 26px; right: 24px; color: var(--taupe-2); }
@media (max-width: 760px) {
  .accueil { margin-top: 28px; }
  .accueil-choix { grid-template-columns: 1fr; }
  .accueil-carte { padding: 22px 20px; }
  .accueil-titre { font-size: 26px; }
}
