/* Tableau de bord du collaborateur — feuille de style unique. Couleurs en jetons : thème clair par défaut, sombre selon
   le système ou le choix fait dans Paramètres (data-theme). */
:root {
  --fond: #f3f4f8;
  --carte: #ffffff;
  --carte-2: #f8f9fc;
  --bord: #e6e8f0;
  --texte: #1d2240;
  --texte-2: #5d6385;
  --texte-3: #8a90ad;
  --accent: #5b63d3;
  --accent-doux: #eceefe;
  --accent-texte: #ffffff;
  --barre: #2f3a6f;
  --barre-2: #3b4785;
  --barre-texte: #dfe3ff;
  --entete-1: #7d84d8;
  --entete-2: #a2a7ef;
  --vert: #2f8f46;   --vert-doux: #e9f7ec;
  --rouge: #cf3f3f;  --rouge-doux: #fdeeee;
  --orange: #92400e; --orange-doux: #fef3c7;
  /* Texte posé sur le fond orange (--orange-doux) : jetons propres à chaque thème */
  --sur-orange: #92400e; --sur-orange-texte: #1d2240; --sur-orange-texte-2: #5d6385;
  --bleu: #2b6fc6;   --bleu-doux: #e8f1fc; --contrat-incomplet: #e8f1fc;
  --violet: #6b4fd1; --violet-doux: #f0ecfd;
  --sarcelle: #13836d; --sarcelle-doux: #e5f6f2;
  --jaune: #a16207;  --jaune-doux: #fefce8;
  --ombre: 0 1px 2px rgba(29, 34, 64, .04), 0 6px 20px rgba(29, 34, 64, .06);
  --rayon: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #12152a; --carte: #1b1f38; --carte-2: #222746; --bord: #2d3356; --texte: #eceefb; --texte-2: #b3b8d6; --texte-3: #858bb0;
    --accent: #8b92f2; --accent-doux: #2b3062; --accent-texte: #12152a; --barre: #0d1022; --barre-2: #1f2550; --barre-texte: #c9cdf5;
    --entete-1: #2d3470; --entete-2: #3d4590;
    --vert: #6fd18a; --vert-doux: #1d3527; --rouge: #ff8a8a; --rouge-doux: #3d2026; --orange: #fcd34d; --orange-doux: #2b2f4d;
    --sur-orange: #fcd34d; --sur-orange-texte: #eceefb; --sur-orange-texte-2: #b3b8d6;
    --bleu: #8ab8f5; --bleu-doux: #1c2c45; --contrat-incomplet: #2b2f4d; --violet: #b9a6ff; --violet-doux: #2b2550; --sarcelle: #6fd6c0; --sarcelle-doux: #173632; --jaune: #fde047; --jaune-doux: #2f2c1a;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #12152a; --carte: #1b1f38; --carte-2: #222746; --bord: #2d3356; --texte: #eceefb; --texte-2: #b3b8d6; --texte-3: #858bb0;
  --accent: #8b92f2; --accent-doux: #2b3062; --accent-texte: #12152a; --barre: #0d1022; --barre-2: #1f2550; --barre-texte: #c9cdf5;
  --entete-1: #2d3470; --entete-2: #3d4590;
  --vert: #6fd18a; --vert-doux: #1d3527; --rouge: #ff8a8a; --rouge-doux: #3d2026; --orange: #fcd34d; --orange-doux: #2b2f4d;
  --sur-orange: #fcd34d; --sur-orange-texte: #eceefb; --sur-orange-texte-2: #b3b8d6;
  --bleu: #8ab8f5; --bleu-doux: #1c2c45; --contrat-incomplet: #2b2f4d; --violet: #b9a6ff; --violet-doux: #2b2550; --sarcelle: #6fd6c0; --sarcelle-doux: #173632; --jaune: #fde047; --jaune-doux: #2f2c1a;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fond); color: var(--texte);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ── Structure ─────────────────────────────────────────────────────────────── */
.coque { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.barre {
  background: var(--barre); color: var(--barre-texte); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.barre .salut { font-size: 19px; font-weight: 600; color: #fff; padding: 4px 12px 18px; }
.barre nav { display: flex; flex-direction: column; gap: 2px; }
.lien-nav {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  color: inherit; text-align: left; cursor: pointer; font-weight: 500; width: 100%;
}
.lien-nav:hover { background: rgba(255, 255, 255, .06); }
.lien-nav[aria-current="page"] { background: var(--barre-2); color: #fff; }
.lien-nav .pastille { margin-left: auto; }
.barre .profil { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #e6e8ff; color: var(--barre); display: grid; place-items: center;
  font-weight: 700; font-size: 14px; flex: none;
}
.profil .nom { color: #fff; font-weight: 600; font-size: 14px; }
.profil .poste { font-size: 12px; opacity: .75; }

.zone-principale { min-width: 0; display: flex; flex-direction: column; }
.entete {
  background: linear-gradient(100deg, var(--entete-1), var(--entete-2)); color: #fff; padding: 16px 28px;
  display: flex; align-items: center; gap: 18px;
}
.entete .date { font-size: 17px; font-weight: 500; white-space: nowrap; text-transform: capitalize; }
.recherche { flex: 1; max-width: 420px; position: relative; }
.recherche input {
  width: 100%; border: 0; border-radius: 10px; padding: 9px 12px 9px 38px; background: #fff; color: #1d2240;
}
.recherche svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #8a90ad; }
.entete .actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bouton-rond {
  border: 0; background: rgba(255,255,255,.16); color: #fff; width: 38px; height: 38px; border-radius: 10px; display: grid;
  place-items: center; cursor: pointer; position: relative;
}
.bouton-rond:hover { background: rgba(255,255,255,.26); }
.bouton-rond .point { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #ff6b6b; border: 2px solid var(--entete-2); }
.maj { font-size: 12px; opacity: .85; white-space: nowrap; }
/* Actualiser : l'icône tourne pendant la relecture */
.bouton-rond:disabled { cursor: progress; opacity: .85; }
.bouton-rond.actualise svg { animation: tourne 0.8s linear infinite; }
/* Cloche : liste des points urgents sous le bouton */
.zone-cloche { position: relative; display: inline-flex; }
.panneau-cloche { position: absolute; right: 0; top: 46px; z-index: 40; width: min(400px, 88vw); background: var(--carte); color: var(--texte);
  border: 1px solid var(--bord); border-radius: 12px; box-shadow: var(--ombre); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.panneau-cloche h3 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-3); }
.panneau-cloche ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.panneau-cloche .lien { text-align: left; color: var(--texte); line-height: 1.35; }
.panneau-cloche .lien:hover { color: var(--accent); }
.panneau-cloche .detail { color: var(--texte-2); font-size: 13px; }
.contenu { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; }
.titre-page { font-size: 22px; font-weight: 700; margin: 0; }
.sous-titre { color: var(--texte-2); margin: 2px 0 0; }

/* ── Cartes ───────────────────────────────────────────────────────────────── */
.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 18px 20px; min-width: 0; }
.carte > h2, .carte > header h2 { font-size: 15px; font-weight: 600; margin: 0; }
.carte > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.carte > header .lien-tout { margin-left: auto; font-size: 13px; background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 500; }
.carte > h2 { margin-bottom: 12px; }
.grille { display: grid; gap: 20px; }
.grille.kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grille.jour { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.grille.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.colonne { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.kpi-carte {
  border-radius: var(--rayon); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; border: 0; text-align: left;
  cursor: pointer; box-shadow: var(--ombre);
}
.kpi-carte .libelle { font-weight: 500; font-size: 14px; color: var(--texte-2); display: flex; justify-content: space-between; align-items: center; }
.kpi-carte .valeur { font-size: 32px; font-weight: 700; line-height: 1.1; }
.kpi-carte .detail { font-size: 12px; color: var(--texte-2); }
.ton-sarcelle { background: var(--sarcelle-doux); } .ton-sarcelle .valeur, .ton-sarcelle svg { color: var(--sarcelle); }
.ton-jaune { background: var(--jaune-doux); } .ton-jaune .valeur, .ton-jaune svg { color: var(--jaune); }
.ton-vert { background: var(--vert-doux); } .ton-vert .valeur, .ton-vert svg { color: var(--vert); }
.ton-rouge { background: var(--rouge-doux); } .ton-rouge .valeur, .ton-rouge svg { color: var(--rouge); }
.ton-violet { background: var(--violet-doux); } .ton-violet .valeur, .ton-violet svg { color: var(--violet); }
.ton-bleu { background: var(--bleu-doux); } .ton-bleu .valeur, .ton-bleu svg { color: var(--bleu); }
/* Blocs sur fond --orange-doux (miel en clair, bleu nuit en sombre) : les jetons de texte y prennent leurs valeurs « sur orange » */
.ton-orange, .encadre.alerte { --orange: var(--sur-orange); --texte: var(--sur-orange-texte); --texte-2: var(--sur-orange-texte-2);
  --texte-3: var(--sur-orange-texte-2); color: var(--texte); }
.ton-orange { background: var(--orange-doux); } .ton-orange .valeur, .ton-orange svg { color: var(--orange); }

/* ── Listes ───────────────────────────────────────────────────────────────── */
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--bord); }
.liste > li:first-child { border-top: 0; padding-top: 2px; }
.liste .heure { font-variant-numeric: tabular-nums; color: var(--texte-2); font-size: 13px; min-width: 46px; padding-top: 1px; }
/* Base de 170 px : sur mobile, les badges passent sous le texte au lieu de l'écraser mot à mot */
.liste .corps { flex: 1 1 170px; min-width: 0; }
.liste .titre { font-weight: 500; overflow-wrap: anywhere; }
.liste .detail { font-size: 13px; color: var(--texte-2); overflow-wrap: anywhere; }
.liste .fin { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: none; }
.vide { color: var(--texte-3); font-size: 14px; padding: 6px 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.rouge { background: var(--rouge-doux); color: var(--rouge); }
.badge.orange { background: var(--orange-doux); color: var(--sur-orange); }
.badge.vert { background: var(--vert-doux); color: var(--vert); }
.badge.bleu { background: var(--bleu-doux); color: var(--bleu); }
.badge.violet { background: var(--violet-doux); color: var(--violet); }
.badge.gris { background: var(--carte-2); color: var(--texte-2); }
.pastille { background: #ff6b6b; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }

/* Cases à cocher des tâches */
.coche {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--texte-3); background: none; cursor: pointer; flex: none;
  display: grid; place-items: center; margin-top: 1px; color: transparent; padding: 0;
}
.coche:hover { border-color: var(--vert); color: var(--vert); }
.coche.faite { background: var(--vert); border-color: var(--vert); color: #fff; }
button.coche.faite:hover { background: none; color: var(--vert); }   /* tâche faite : un clic la remet à faire */
.coche svg { width: 13px; height: 13px; stroke-width: 3; }

/* ── Plan de vol ─────────────────────────────────────────────────────────── */
.plan { position: relative; margin: 0; padding: 0; list-style: none; }
.plan li { display: grid; grid-template-columns: 70px 18px 1fr; gap: 10px; padding-bottom: 14px; }
.plan .quand { font-size: 13px; color: var(--texte-2); text-align: right; padding-top: 1px; font-variant-numeric: tabular-nums; }
.plan .repere { display: block; font-size: 11px; color: var(--texte-3); }
.plan .rail { position: relative; }
.plan .rail::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: -14px; width: 2px; background: var(--bord); }
.plan li:last-child .rail::before { display: none; }
.plan .rond { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--carte); box-shadow: 0 0 0 2px currentColor; background: currentColor; margin-top: 2px; }
.plan .rouge { color: var(--rouge); } .plan .orange { color: var(--orange); } .plan .bleu { color: var(--bleu); }
.plan .vert { color: var(--vert); } .plan .violet { color: var(--violet); } .plan .gris { color: var(--texte-3); }
.plan .quoi { min-width: 0; }
.plan .quoi .titre { font-weight: 600; color: var(--texte); }
.plan .quoi .detail { font-size: 13px; color: var(--texte-2); }
.plan .quoi button.lien { padding: 0; font-weight: 600; }
.plan .quoi .detail .badge { margin-left: 4px; padding: 0 6px; font-size: 11px; vertical-align: 1px; }
button.lien { background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 500; padding: 0; text-align: left; }

/* ── E-mails ──────────────────────────────────────────────────────────────── */
.filtres { display: flex; gap: 8px; flex-wrap: wrap; }
.puce {
  border: 1px solid var(--bord); background: var(--carte); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px;
  font-weight: 500; color: var(--texte-2); display: inline-flex; gap: 6px; align-items: center;
}
.puce[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.puce .nb { opacity: .8; }
.courrier { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.boite-liste { padding: 6px; }
/* Le détail reste en vue quand on fait défiler la liste ; s'il est plus haut que l'écran, il défile dans son cadre */
.fiche-carte { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.ligne-mail {
  display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 0; background: none; width: 100%; text-align: left;
}
.ligne-mail:hover { background: var(--carte-2); }
.ligne-mail[aria-current="true"] { background: var(--accent-doux); }
.ligne-mail .prio { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.ligne-mail .prio.HAUTE { background: var(--rouge); } .ligne-mail .prio.MOYENNE { background: var(--orange); } .ligne-mail .prio.BASSE { background: var(--texte-3); }
.ligne-mail .de { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-mail .objet { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-mail .resume { font-size: 13px; color: var(--texte-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ligne-mail .droite { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--texte-3); }
.ligne-mail.traite { opacity: .6; }
.fiche { display: flex; flex-direction: column; gap: 16px; }
.fiche .tete { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.fiche h2 { font-size: 19px; margin: 0; overflow-wrap: anywhere; }
.fiche .meta { color: var(--texte-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.encadre { border-radius: 12px; padding: 12px 14px; background: var(--carte-2); }
.encadre h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); }
.encadre.alerte { background: var(--orange-doux); }
.encadre.alerte h3 { color: var(--orange); }
.encadre.erreur { background: var(--rouge-doux); }
.encadre.erreur h3 { color: var(--rouge); }
.encadre ul { margin: 0; padding-left: 18px; }
.demande { font-size: 16px; }
.reponse label { display: block; font-size: 13px; font-weight: 600; color: var(--texte-2); margin: 10px 0 4px; }
.reponse input, .reponse textarea {
  width: 100%; border: 1px solid var(--bord); background: var(--carte); border-radius: 10px; padding: 10px 12px; resize: vertical;
}
.reponse textarea { min-height: 220px; line-height: 1.55; }
.reponse .dest { font-size: 13px; color: var(--texte-2); }
.boutons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bouton {
  border: 1px solid var(--bord); background: var(--carte); padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--texte);
}
.bouton:hover { background: var(--carte-2); }
.bouton.principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.bouton.principal:hover { filter: brightness(1.06); }
.bouton[disabled] { opacity: .55; cursor: default; }
.bouton.petit { padding: 6px 10px; font-size: 13px; }
.etat-envoi { display: inline-flex; gap: 8px; align-items: center; color: var(--texte-2); font-weight: 500; }
.tourne { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--bord); border-top-color: var(--accent); animation: tourne 0.8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.retour-liste { display: none; }

/* ── Agenda ───────────────────────────────────────────────────────────────── */
.jour-agenda + .jour-agenda { margin-top: 18px; }
.jour-agenda h3 { font-size: 13px; text-transform: capitalize; color: var(--texte-2); margin: 0 0 6px; font-weight: 600; }
.evenement { border-left: 3px solid var(--accent); padding-left: 10px; }
.evenement.passe { opacity: .55; }

/* ── Panneau de service ───────────────────────────────────────────────────── */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.indicateur { border-radius: 12px; padding: 12px 14px; }
.indicateur .valeur { font-size: 24px; font-weight: 700; }
.indicateur .libelle { font-size: 13px; color: var(--texte-2); }

/* ── Connexion, états ─────────────────────────────────────────────────────── */
.ecran-centre { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(140deg, var(--barre), #5b63d3); }
.carte-connexion { background: var(--carte); border-radius: 20px; padding: 32px; width: min(420px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 14px; }
.carte-connexion h1 { margin: 0; font-size: 22px; }
.carte-connexion p { margin: 0; color: var(--texte-2); }
.carte-connexion input { border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; width: 100%; background: var(--carte); }
.carte-connexion .bouton { justify-content: center; width: 100%; }
.separateur { display: flex; align-items: center; gap: 10px; color: var(--texte-3); font-size: 13px; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--bord); }
.chargement { color: #fff; font-weight: 500; }
.chargement { text-align: center; max-width: 520px; line-height: 1.5; }
.chargement .boutons { display: flex; justify-content: center; margin-top: 14px; }
.chargement .bouton, .chargement .bouton.principal { background: #fff; color: #2f3a6f; border-color: #fff; font-weight: 600; }
.bandeau-demo { background: var(--orange-doux); color: var(--sur-orange); padding: 8px 28px; font-size: 13px; font-weight: 500; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--texte); color: var(--carte); padding: 12px 16px; border-radius: 12px; box-shadow: var(--ombre); font-weight: 500; display: flex; gap: 12px; align-items: center; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 600; }
.reglage { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--bord); flex-wrap: wrap; }
.reglage:first-of-type { border-top: 0; }
.reglage select { border: 1px solid var(--bord); background: var(--carte); border-radius: 8px; padding: 6px 10px; }
/* Interrupteur (JARVIS Galaxy) */
.interrupteur { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; color: var(--texte-2); font-weight: 600; font-size: 14px; padding: 4px 0; }
.interrupteur .curseur { width: 42px; height: 24px; border-radius: 999px; background: var(--bord); position: relative; transition: background .15s; flex: none; }
.interrupteur .curseur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.interrupteur[aria-checked="true"] { color: var(--accent); }
.interrupteur[aria-checked="true"] .curseur { background: var(--accent); }
.interrupteur[aria-checked="true"] .curseur::after { transform: translateX(18px); }
.assistant-etat { display: flex; align-items: center; gap: 12px; }
.assistant-etat .rond-etat { width: 12px; height: 12px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 0 4px var(--vert-doux); }
.assistant-etat .rond-etat.alerte { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-doux); }

/* ── Petits écrans ────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .grille.jour { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grille.jour > .plan-carte { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .coque { grid-template-columns: 1fr; }
  .barre {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 20; flex-direction: row; padding: 6px 8px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .barre .salut, .barre .profil { display: none; }
  .barre nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .lien-nav { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; align-items: center; text-align: center; }
  .lien-nav .libelle-long { display: none; }
  .lien-nav .pastille { position: absolute; margin: 0 0 0 18px; transform: translateY(-4px); }
  .lien-nav { position: relative; }
  .lien-nav.secondaire { display: none; }
  .zone-principale { padding-bottom: 72px; }
  .entete { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .recherche { order: 3; max-width: none; flex-basis: 100%; }
  .maj { display: none; }
  .contenu { padding: 16px 16px 32px; }
  .grille.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grille.jour, .grille.deux { grid-template-columns: 1fr; }
  .courrier { grid-template-columns: 1fr; }
  .fiche-carte { position: static; max-height: none; overflow: visible; }
  .courrier.detail-ouvert .boite-liste { display: none; }
  .courrier:not(.detail-ouvert) .fiche-carte { display: none; }
  .retour-liste { display: inline-flex; }
  .kpi-carte .valeur { font-size: 26px; }
  .plan li { grid-template-columns: 54px 18px 1fr; }
}


/* ── Accueil : mot du jour, priorités, tâches prioritaires, attentes, listes du service ──────────────────── */
.grille.haut { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
.grille.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.mot-du-jour { background: linear-gradient(135deg, var(--barre), var(--barre-2)); color: #fff; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.mot-du-jour .etiquette-titre { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--barre-texte); }
.mot-du-jour p { margin: 0; font-size: 19px; line-height: 1.45; font-weight: 500; }
.mot-du-jour .pied { font-size: 12px; color: var(--barre-texte); opacity: .85; }
.priorites { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.priorite { display: flex; gap: 12px; align-items: flex-start; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; width: 100%; }
.priorite .num { flex: 0 0 30px; height: 30px; border-radius: 9px; font-weight: 800; display: grid; place-items: center; }
.priorite .num.n1 { background: var(--rouge); color: #fff; }
.priorite .num.n2 { background: var(--orange); color: #fff; }
.priorite .num.n3 { background: var(--accent-doux); color: var(--accent); }
.priorite .texte { min-width: 0; display: flex; flex-direction: column; }
.priorite .quoi { font-weight: 600; overflow-wrap: anywhere; }
.priorite .pourquoi { font-size: 13px; color: var(--texte-2); overflow-wrap: anywhere; }
.priorite:hover .quoi { color: var(--accent); }
.liste > li.faite .titre { text-decoration: line-through; color: var(--texte-3); }
.liste > li.faite .detail { color: var(--texte-3); }
.liste .detail.retard { color: var(--rouge); font-weight: 600; }
.liste .titre a { color: inherit; text-decoration: none; }
.liste .titre a:hover { text-decoration: underline; }

/* ── Administration ────────────────────────────────────────────────────────────────────────────────────── */
.admin-ligne { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1fr) 190px; gap: 12px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--bord); }
.admin-ligne:first-of-type { border-top: 0; }
.admin-ligne .qui { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.admin-ligne .boite-etat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.admin-ligne .detail { font-size: 13px; color: var(--texte-2); }
.admin-ligne select { border: 1px solid var(--bord); background: var(--carte); border-radius: 8px; padding: 8px 10px; width: 100%; }
.coque-seule { grid-template-columns: 1fr; background: var(--fond); }
.coque-seule .zone-principale { max-width: 1100px; margin: 0 auto; width: 100%; }
.boutons { display: flex; gap: 10px; flex-wrap: wrap; }
code { background: var(--carte-2); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; }
@media (max-width: 1180px) {
  .grille.trois { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .grille.haut, .grille.trois { grid-template-columns: 1fr; }
  .admin-ligne { grid-template-columns: 1fr; }
}

/* ── Contrats signés (panneau Exploitation) ────────────────────────────────────────────────────────────── */
.sous-carte { margin: -6px 0 12px; font-size: 13px; color: var(--texte-3); }
.contrats { display: flex; flex-direction: column; gap: 12px; }
.contrat { border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
/* Démarrage dont la checklist n'est pas complète, absence encore à couvrir */
.contrat.incomplet { background: var(--contrat-incomplet); border-color: transparent; }
/* Prestations ponctuelles : une tuile par prestation, comme les démarrages d'abonnement */
.liste.ponctuels { display: flex; flex-direction: column; gap: 12px; }
.liste.ponctuels > li, .liste.ponctuels > li:first-child { border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; }
.liste.ponctuels > li.incomplet { background: var(--contrat-incomplet); border-color: transparent; }
.contrat-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contrat-tete .titre { font-weight: 600; color: var(--texte); margin-right: auto; overflow-wrap: anywhere; }
.contrat-tete .titre:hover { color: var(--accent); }
.contrat .detail { font-size: 13px; color: var(--texte-2); overflow-wrap: anywhere; }
.contrat .detail.alerte { color: var(--orange); font-weight: 600; }
/* Absences à remplacer : remplaçants proposés, contact cliquable */
.liste.remplacants { margin: 2px 0 4px; }
.liste.remplacants > li { padding: 8px 0; }
.liste.remplacants .fin { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.contact { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 2px; }
.contact a, .contact span { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); overflow-wrap: anywhere; }
.contact span { color: var(--texte-3); }
.contact span.tel { color: var(--texte-2); }
.contact .ic { width: 14px; height: 14px; }
.etapes { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.etapes li { display: flex; align-items: center; gap: 10px; }
.etapes li.faite > span { color: var(--texte-2); }
.etapes li.manque > span { color: var(--rouge); font-weight: 600; }
.etapes .par { font-size: 12px; color: var(--texte-3); font-weight: 400; }
.coche.petite { width: 20px; height: 20px; margin-top: 0; }
.coche.petite svg { width: 12px; height: 12px; }
.etapes li.manque .coche { border-color: var(--rouge); }
.champs { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.champs .champ { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; }
.champs dt { font-size: 13px; color: var(--texte-2); }
.champs dd { margin: 0; overflow-wrap: anywhere; }
.detail-carte { margin: 12px 0 0; font-size: 14px; color: var(--texte-2); }
.sous-titre .badge { margin-right: 6px; }
@media (max-width: 900px) {
  .champs .champ { grid-template-columns: 1fr; gap: 2px; }
}

/* Citation du jour, sous le mot du jour */
.mot-du-jour .citation { margin: 6px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column; gap: 6px; }
.mot-du-jour .citation blockquote { margin: 0; font-style: italic; font-size: 15px; line-height: 1.5; }
.mot-du-jour .citation figcaption { font-size: 12px; color: var(--barre-texte); opacity: .85; }
.groupe-absences { margin: 4px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); }
.contrats + .groupe-absences { margin-top: 16px; }

/* ── Objectif Zéro mail (carte de l'accueil et page « Zéro mail », 15/10/2026) ─────────────────────────────────────
   Séries des graphiques : palette catégorielle validée (clair et sombre), toujours dans le même ordre. */
:root { --serie-1: #2a78d6; --serie-2: #eb6834; --serie-3: #1baf7a; --serie-4: #eda100; --reste: #d5d8e6; --grille: #e9eaf1; --axe: #c9ccdb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500; --reste: #3a4170; --grille: #283050; --axe: #3b426a; }
}
:root[data-theme="dark"] { --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500; --reste: #3a4170; --grille: #283050; --axe: #3b426a; }

.pastille.ok { background: var(--vert); }
.zero { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: center; padding: 22px 24px; }
.anneau { position: relative; width: 168px; height: 168px; flex: none; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau .piste { stroke: var(--accent-doux); }
.anneau .jauge { stroke: var(--accent); transition: stroke-dashoffset .5s ease, stroke .3s; }
.zero.atteint .anneau .piste { stroke: var(--vert-doux); }
.zero.atteint .anneau .jauge { stroke: var(--vert); }
.anneau .centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.anneau .chiffre { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.anneau .unite { font-size: 13px; color: var(--texte-2); font-weight: 500; margin-top: 4px; }
.zero.atteint .anneau .chiffre { color: var(--vert); }
.zero .etiquette { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.zero.atteint .etiquette { color: var(--vert); }
.zero .phrase { font-size: 22px; font-weight: 700; margin: 6px 0 4px; line-height: 1.25; }
.zero .sous { color: var(--texte-2); font-size: 14px; margin: 0 0 14px; }
.faits { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.faits li { display: flex; gap: 8px; align-items: flex-start; }
.faits svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--texte-3); }
.faits strong { font-weight: 600; }
.faits small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--texte-3); }
.repartition h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--texte-2); }
.barre-empilee { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; background: var(--carte); }
.barre-empilee span { display: block; height: 100%; min-width: 4px; transition: flex-basis .4s ease; cursor: default; }
.legende { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13px; }
.legende li { display: flex; align-items: center; gap: 8px; color: var(--texte-2); }
.legende .pastille-serie { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legende strong { color: var(--texte); font-variant-numeric: tabular-nums; margin-left: auto; }
.graphique { width: 100%; height: auto; display: block; overflow: visible; }
.graphique text { fill: var(--texte-2); font-size: 11px; font-family: inherit; }
.graphique .valeur-barre { fill: var(--texte); font-weight: 600; }
.graphique .grille-ligne { stroke: var(--grille); stroke-width: 1; }
.graphique .ligne-base { stroke: var(--axe); stroke-width: 1; }
.graphique .barre-donnee { fill: var(--accent); }
.graphique .barre-donnee.aujourdhui { fill: var(--accent); opacity: .45; }
.graphique .zero-ok { fill: var(--vert); }
.graphique .sans-donnees { stroke: var(--axe); stroke-width: 2; stroke-linecap: round; }
.graphique .zone-survol { fill: transparent; cursor: default; }
.graphique g:hover .barre-donnee { filter: brightness(1.1); }
.bruyants { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bruyants li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.bruyants .nom { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.bruyants .piste-h { grid-column: 1; height: 8px; border-radius: 4px; background: var(--carte-2); position: relative; }
.bruyants .piste-h span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 0 4px 4px 0; }
.bruyants .nb { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--texte-2); grid-column: 2; grid-row: 1 / span 2; text-align: right; }
.bruyants .conseil { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--texte-2); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .libelle { font-size: 13px; color: var(--texte-2); font-weight: 500; }
.stat .valeur { font-size: 30px; font-weight: 700; line-height: 1.15; }
.stat .detail { font-size: 12px; color: var(--texte-2); }
.regles { list-style: none; margin: 0; padding: 0; }
.regles li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--bord); font-size: 14px; }
.regles li:first-child { border-top: 0; padding-top: 2px; }
.regles .si { font-weight: 600; }
.regles .alors { color: var(--texte-2); }
.regles .groupe { grid-column: 1 / -1; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-3); border-top: 0; padding: 14px 0 2px; }
.infobulle { position: fixed; z-index: 60; pointer-events: none; background: var(--texte); color: var(--carte); font-size: 12px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; box-shadow: var(--ombre); max-width: 240px; }
.regle-admin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--bord); }
.regle-admin:first-of-type { border-top: 0; }
@media (max-width: 1180px) {
  .zero { grid-template-columns: auto minmax(0, 1fr); }
  .zero .repartition { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .zero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 18px; padding: 18px 16px; }
  .zero .texte-zero { justify-self: stretch; }
  .zero .faits li, .zero .boutons { justify-content: center; }
  .zero .repartition { justify-self: stretch; text-align: left; }
  .zero .phrase { font-size: 19px; }
  .regles li, .regle-admin { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) { .stats { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .anneau .jauge, .barre-empilee span { transition: none; } }

/* ── ABC Réseau : « Mon entreprise par les e-mails » (maquette du devis) ── */
.indicateurs-dirigeant { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.indicateur-d { border-radius: 12px; padding: 12px 14px; background: var(--carte-2); display: flex; flex-direction: column; gap: 2px; border: 0; text-align: left; cursor: pointer; color: var(--texte); font: inherit; }
.indicateur-d:hover { box-shadow: inset 0 0 0 1px var(--bord); }
.indicateur-d .valeur { font-size: 24px; font-weight: 700; line-height: 1.2; }
.indicateur-d .libelle { font-size: 13px; color: var(--texte-2); font-weight: 500; }
.indicateur-d .detail { font-size: 12px; color: var(--texte-2); }
.indicateur-d .detail.alerte { color: var(--rouge); font-weight: 600; }
button.badge { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
@media (max-width: 420px) { .indicateurs-dirigeant { grid-template-columns: minmax(0, 1fr); } }
/* ── Zéro mail · SaaS : assistant de connexion, messages, administration ── */
.cx-assistant { display: flex; flex-direction: column; gap: 16px; }
.cx-bienvenue { margin-bottom: 4px; }
.cx-etapes { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.cx-etapes li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texte-3); padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--carte); border: 1px solid var(--bord); }
.cx-etapes li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--carte-2); font-weight: 700; font-size: 12px; }
.cx-etapes li.courante { color: var(--texte); border-color: var(--accent); }
.cx-etapes li.courante span { background: var(--accent); color: var(--accent-texte); }
.cx-etapes li.faite span { background: var(--vert-doux); color: var(--vert); }
.cx-assistant h2, .cx-messages h2 { margin: 0 0 10px; font-size: 18px; }
.cx-fournisseurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.cx-fournisseur { border: 1px solid var(--bord); background: var(--carte); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 500; text-align: left; color: var(--texte); }
.cx-fournisseur.choisi { border-color: var(--accent); background: var(--accent-doux); color: var(--accent); }
.cx-guide { background: var(--carte-2); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; }
.cx-guide h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); }
.cx-guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.cx-guide a { display: inline-block; margin-top: 8px; font-weight: 600; }
.cx-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; margin: 6px 0 14px; }
.cx-champ { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--texte-2); font-weight: 600; }
.cx-champ input, .cx-champ select { border: 1px solid var(--bord); border-radius: 10px; padding: 9px 11px; background: var(--carte); color: var(--texte); font-weight: 400; font-size: 14px; width: 100%; }
.cx-avance { margin: 0 0 14px; }
.cx-avance summary { cursor: pointer; font-weight: 600; color: var(--texte-2); font-size: 14px; }
.cx-erreur { color: var(--rouge); font-weight: 600; margin: 8px 0; }
.cx-resultat, .cx-recap { margin-bottom: 12px; }
.cx-resultat > li, .cx-recap > li { align-items: center; }
.cx-messages .cx-fil { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cx-fil { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cx-fil li { display: flex; flex-direction: column; gap: 3px; max-width: 85%; }
.cx-fil li.client { align-self: flex-end; align-items: flex-end; }
.cx-fil .bulle { padding: 9px 12px; border-radius: 14px; background: var(--carte-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.cx-fil li.client .bulle { background: var(--accent); color: var(--accent-texte); }
.cx-fil .quand { font-size: 12px; color: var(--texte-3); }
.cx-saisie { display: flex; gap: 8px; align-items: flex-end; }
.cx-saisie textarea { flex: 1; border: 1px solid var(--bord); border-radius: 10px; padding: 9px 11px; background: var(--carte); color: var(--texte); resize: vertical; min-height: 44px; font-size: 14px; line-height: 1.45; }
.admin-boite.choisie { background: var(--accent-doux); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.admin-boite .detail .badge { vertical-align: middle; }
@media (max-width: 600px) { .cx-saisie { flex-direction: column; align-items: stretch; } .cx-fil li { max-width: 100%; } }
