/* Maousse Lab — Chat Mistral · charte MixMaster (navy / mint, Plus Jakarta Sans, zéro dégradé) */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/static/fonts/latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("/static/fonts/latin-800-normal.woff2") format("woff2"); }

:root {
  /* Tokens charte MixMaster */
  --primaire: #1F4F9C;
  --navy: #122A54;
  --vert: #059669;
  --vert-hover: #047857;
  --menthe: #34D399;
  --encre: #111827;
  --encre-2: #374151;
  --gris: #6B7280;
  --canvas: #F4F5FB;
  --bord: #E9EBF4;
  --carte: #FFFFFF;
  --nav-texte: #B7C6E2;
  --nav-icone: #8CA0C6;
  --ok-fond: #ECFDF5; --ok-texte: #047857;
  --cmd-fond: #FFF4E8; --cmd-texte: #C2410C;
  --absent-fond: #F3F4F6; --absent-texte: #4B5563;
  --rouge: #B42318; --rouge-fond: #FEF3F2;
  --bulle-moi: #E9EBF4;
  --code-fond: #F4F5FB;
  --ombre: 0 1px 2px rgba(18, 42, 84, .06);
  --police: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primaire: #4F7FD0; --encre: #E6ECF8; --encre-2: #C9D4EA; --gris: #8CA0C6; --canvas: #0D1A33;
    --bord: #22355C; --carte: #132447; --bulle-moi: #1B3160; --code-fond: #0F1E3D;
    --ok-fond: #0F2E26; --ok-texte: #34D399; --cmd-fond: #33210F; --cmd-texte: #FDBA74;
    --absent-fond: #1E293B; --absent-texte: #CBD5E1; --rouge: #F97066; --rouge-fond: #3A1717;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primaire: #4F7FD0; --encre: #E6ECF8; --encre-2: #C9D4EA; --gris: #8CA0C6; --canvas: #0D1A33;
  --bord: #22355C; --carte: #132447; --bulle-moi: #1B3160; --code-fond: #0F1E3D;
  --ok-fond: #0F2E26; --ok-texte: #34D399; --cmd-fond: #33210F; --cmd-texte: #FDBA74;
  --absent-fond: #1E293B; --absent-texte: #CBD5E1; --rouge: #F97066; --rouge-fond: #3A1717;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--canvas); color: var(--encre); font: 600 15px/1.6 var(--police); -webkit-font-smoothing: antialiased; }
button, select, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primaire); }
:focus-visible { outline: 3px solid var(--menthe); outline-offset: 2px; }
.ic { flex: none; display: inline-block; vertical-align: -3px; }

.appli { display: grid; grid-template-columns: 236px 1fr auto; height: 100vh; height: 100dvh; }

/* ---------- Barre latérale navy ---------- */
.lateral { background: var(--navy); color: var(--nav-texte); display: flex; flex-direction: column; min-height: 0; }
.marque { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 16px; }
.marque img { width: 34px; height: 34px; }
.marque .mot { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.marque .mot span { color: var(--menthe); }
.marque small { display: block; font-size: 11px; font-weight: 600; color: var(--nav-icone); letter-spacing: 0; }
.btn-nouveau { margin: 4px 12px 6px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; font-weight: 700; font-size: 13.5px; transition: background-color .15s; }
.btn-nouveau:hover { background: rgba(255,255,255,.12); }
.defile { overflow-y: auto; flex: 1; padding: 0 12px 16px; min-height: 0; }
.titre-section { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; margin-bottom: 6px; padding: 0 12px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--nav-icone); }
.titre-section button { border: 0; background: none; color: var(--nav-icone); padding: 2px; border-radius: 6px; display: grid; place-items: center; transition: color .15s, background-color .15s; }
.titre-section button:hover { color: #fff; background: rgba(255,255,255,.08); }
.element { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 12px; border-radius: 10px;
  color: var(--nav-texte); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; transition: background-color .15s, color .15s; }
.element .txt { overflow: hidden; text-overflow: ellipsis; }
.element .ic { color: var(--nav-icone); }
.element:hover { background: rgba(255,255,255,.05); color: #fff; }
.element.actif { background: var(--primaire); color: #fff; }
.element.actif .ic { color: #fff; }
.vide-liste { color: var(--nav-icone); font-size: 12.5px; padding: 4px 12px; font-weight: 500; }
.profil { border-top: 1px solid rgba(255,255,255,.1); padding: 12px 16px 14px; }
.profil .ligne { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--navy); background: var(--menthe); flex: none; }
.profil .qui { flex: 1; min-width: 0; line-height: 1.3; }
.profil .qui b { display: block; font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil .qui small { color: var(--nav-icone); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.profil a { color: var(--nav-texte); display: grid; place-items: center; padding: 6px; border-radius: 8px; transition: background-color .15s, color .15s; }
.profil a:hover { background: rgba(255,255,255,.06); color: #fff; }
.pied { margin-top: 10px; font-size: 11px; color: var(--nav-icone); }

/* ---------- Zone principale ---------- */
.principal { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.entete { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--bord); background: var(--canvas); flex-wrap: wrap; min-height: 64px; }
.entete .lieu { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; letter-spacing: -0.01em; margin-right: auto; min-width: 0; }
.entete .lieu span.nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--absent-fond); color: var(--absent-texte); white-space: nowrap; }
.badge.ok { background: var(--ok-fond); color: var(--ok-texte); }
.badge.cmd { background: var(--cmd-fond); color: var(--cmd-texte); }
.badge.bleu { background: var(--bulle-moi); color: var(--primaire); }
.reglage { display: flex; align-items: center; gap: 6px; background: var(--carte); border: 1.5px solid var(--bord); border-radius: 10px; padding: 2px 4px 2px 10px; font-size: 13px; height: 36px; color: var(--gris); }
.reglage .ic { color: var(--gris); }
.reglage select { border: 0; background: transparent; padding: 4px 2px; font-weight: 700; max-width: 190px; outline: none; color: var(--encre); cursor: pointer; }
.jauge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gris); padding: 0 4px; }
.jauge svg { transform: rotate(-90deg); }
.etat-co { width: 8px; height: 8px; border-radius: 50%; background: var(--gris); flex: none; }
.etat-co.ok { background: var(--vert); box-shadow: 0 0 0 3px var(--ok-fond); }
.etat-co.ko { background: var(--rouge); }
.icone-btn { border: 1.5px solid transparent; background: none; border-radius: 10px; padding: 6px 8px; color: var(--encre-2); line-height: 1; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; transition: background-color .15s, border-color .15s; }
.icone-btn:hover { background: var(--carte); border-color: var(--bord); }
.icone-btn.actif { background: var(--carte); border-color: var(--primaire); color: var(--primaire); }
.menu-mobile { display: none; }

.fil { flex: 1; overflow-y: auto; min-height: 0; }
.fil-int { max-width: 860px; margin: 0 auto; padding: 28px 20px 40px; }

/* Accueil */
.accueil { padding: 7vh 0 10px; }
.accueil img { width: 56px; height: 56px; margin-bottom: 14px; }
.accueil h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.accueil p { color: var(--gris); margin: 0 0 26px; max-width: 560px; font-weight: 500; }
.suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.suggestion { border: 1px solid var(--bord); background: var(--carte); border-radius: 14px; padding: 14px 16px; text-align: left; box-shadow: var(--ombre); transition: border-color .15s; }
.suggestion:hover { border-color: var(--primaire); }
.suggestion b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14px; color: var(--encre); }
.suggestion b .ic { color: var(--primaire); }
.suggestion span { color: var(--gris); font-size: 13px; font-weight: 500; }

/* Messages */
.msg { display: flex; gap: 12px; margin: 0 0 22px; }
.msg .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; margin-top: 1px; background: var(--carte); border: 1px solid var(--bord); }
.msg .av img { width: 22px; height: 22px; }
.msg.moi { justify-content: flex-end; }
.msg.moi .bulle { background: var(--bulle-moi); max-width: 78%; border-radius: 16px 16px 4px 16px; padding: 10px 16px; white-space: pre-wrap; font-weight: 500; }
.msg.agent .corps { flex: 1; min-width: 0; }
.md { font-weight: 500; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .8em; }
.md h1, .md h2, .md h3 { font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; margin: 1.1em 0 .5em; }
.md h1 { font-size: 22px; } .md h2 { font-size: 19px; } .md h3 { font-size: 16px; }
.md strong { font-weight: 700; }
.md pre { background: var(--code-fond); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; overflow-x: auto; font-size: 13px; position: relative; }
.md code { font-family: var(--mono); font-size: .88em; }
.md :not(pre) > code { background: var(--code-fond); border: 1px solid var(--bord); border-radius: 6px; padding: 1px 5px; }
.md pre code.hljs { background: transparent; padding: 0; }
.md table { border-collapse: collapse; margin: 0 0 1em; display: block; overflow-x: auto; font-size: 14px; }
.md th { background: var(--canvas); font-weight: 700; }
.md th, .md td { border: 1px solid var(--bord); padding: 6px 10px; }
.md blockquote { border-left: 3px solid var(--menthe); margin: 0 0 1em; padding: 2px 14px; color: var(--encre-2); }
.copier { position: absolute; top: 8px; right: 8px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--bord); background: var(--carte); opacity: 0; transition: opacity .15s; display: inline-flex; gap: 4px; align-items: center; }
.md pre:hover .copier, .copier:focus-visible { opacity: 1; }
.curseur::after { content: ""; display: inline-block; width: 8px; height: 16px; background: var(--menthe); border-radius: 2px; margin-left: 3px; vertical-align: -2px; animation: clignote 1s steps(2) infinite; }
@keyframes clignote { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .curseur::after { animation: none; } }

/* Pièces jointes dans les bulles */
.pj-liste { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: flex-start; margin-bottom: 8px; }
.pj-img { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--bord); background: var(--carte); }
.pj-img img { display: block; max-width: 220px; max-height: 180px; object-fit: cover; }
.pj-fic { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--bord); background: var(--carte);
  font-size: 13px; font-weight: 600; color: var(--encre); text-decoration: none; max-width: 260px; }
.pj-fic .ic { color: var(--primaire); }
.pj-fic span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-fic small { color: var(--gris); font-weight: 500; flex: none; }

/* Réflexion */
details.reflexion { margin: 0 0 12px; color: var(--gris); font-size: 13.5px; }
details.reflexion summary { cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
details.reflexion summary::-webkit-details-marker { display: none; }
details.reflexion .txt { border-left: 2px solid var(--bord); padding: 4px 0 4px 12px; margin-top: 6px; white-space: pre-wrap; font-weight: 500; }

/* Outils */
.outil { border: 1px solid var(--bord); background: var(--carte); border-radius: 14px; margin: 0 0 10px; overflow: hidden; box-shadow: var(--ombre); }
.outil > summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; font-size: 13.5px; }
.outil > summary::-webkit-details-marker { display: none; }
.outil > summary > .ic { color: var(--primaire); }
.outil .type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); flex: none; }
.outil .titre { font-family: var(--mono); font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.statut { flex: none; display: inline-flex; align-items: center; gap: 5px; }
.rond { width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.outil .detail { border-top: 1px solid var(--bord); padding: 10px 12px; font-size: 13px; }
.outil pre.sortie { margin: 0; max-height: 320px; overflow: auto; font-family: var(--mono); font-size: 12.5px; font-weight: 500; white-space: pre-wrap; word-break: break-word; color: var(--encre-2); }
.diff { font-family: var(--mono); font-size: 12.5px; font-weight: 500; border: 1px solid var(--bord); border-radius: 10px; overflow: auto; max-height: 380px; margin-bottom: 8px; }
.diff .fic { background: var(--canvas); padding: 6px 10px; font-weight: 700; border-bottom: 1px solid var(--bord); position: sticky; top: 0; font-family: var(--police); display: flex; gap: 8px; align-items: center; }
.diff .l { padding: 0 10px; white-space: pre; min-height: 1.5em; }
.diff .plus { background: var(--ok-fond); color: var(--ok-texte); }
.diff .moins { background: var(--rouge-fond); color: var(--rouge); }
.diff .ctx { color: var(--gris); }
.autorisation { border-top: 1px solid var(--bord); background: var(--cmd-fond); padding: 12px; }
.autorisation p { margin: 0 0 10px; font-weight: 700; font-size: 14px; color: var(--cmd-texte); display: flex; align-items: center; gap: 8px; }
.autorisation .choix { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 1.5px solid var(--primaire); background: transparent; color: var(--primaire); border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; transition: background-color .15s, color .15s, border-color .15s; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { background: var(--bord); }
.btn.primaire { background: var(--primaire); color: #fff; }
.btn.primaire:hover { background: var(--navy); border-color: var(--navy); }
.btn.accent { background: var(--vert); border-color: var(--vert); color: #fff; }
.btn.accent:hover { background: var(--vert-hover); border-color: var(--vert-hover); }
.btn.danger { border-color: var(--rouge); color: var(--rouge); }
.btn.danger:hover { background: var(--rouge-fond); }

/* Plan */
.plan { border: 1px solid var(--bord); background: var(--carte); border-radius: 14px; padding: 10px 14px; margin: 0 0 12px; font-size: 13.5px; box-shadow: var(--ombre); }
.plan b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.plan ul { margin: 0; padding: 0; }
.plan li { list-style: none; margin: 3px 0; display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.plan li .ic { margin-top: 4px; color: var(--gris); }
.plan li.fait { color: var(--gris); text-decoration: line-through; }
.plan li.fait .ic { color: var(--vert); }
.plan li.encours .ic { color: var(--cmd-texte); }

.erreur-bulle { border: 1px solid var(--rouge); background: var(--rouge-fond); color: var(--rouge); border-radius: 12px; padding: 10px 14px; margin: 0 0 18px; display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.erreur-bulle .ic { margin-top: 3px; }
.info-bulle { text-align: center; color: var(--gris); font-size: 13px; margin: 6px 0 18px; display: flex; gap: 6px; justify-content: center; align-items: center; }

/* Saisie */
.saisie { padding: 4px 20px 18px; }
.saisie-int { max-width: 860px; margin: 0 auto; background: var(--carte); border: 1.5px solid var(--bord); border-radius: 16px; box-shadow: var(--ombre);
  transition: border-color .15s; }
.saisie-int:focus-within { border-color: var(--primaire); }
.saisie-ligne { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 8px; }
.saisie textarea { flex: 1; border: 0; outline: none; background: transparent; resize: none; max-height: 240px; min-height: 26px; padding: 7px 4px; line-height: 1.5; font-weight: 500; }
.saisie textarea::placeholder { color: var(--gris); }
.joindre { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--gris); display: grid; place-items: center; flex: none; transition: background-color .15s, color .15s; }
.joindre:hover { background: var(--canvas); color: var(--primaire); }
.envoyer { width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--vert); color: #fff; display: grid; place-items: center; flex: none; transition: background-color .15s; }
.envoyer:hover { background: var(--vert-hover); }
.envoyer:disabled { background: var(--bord); color: var(--gris); cursor: not-allowed; }
.envoyer.stop { background: var(--navy); }
.aide-saisie { max-width: 860px; margin: 6px auto 0; color: var(--gris); font-size: 12px; text-align: center; font-weight: 500; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--bord); border-bottom-width: 2px; border-radius: 5px; padding: 0 4px; background: var(--carte); }
/* Pièces jointes en préparation */
.jointes { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.jointes:empty { display: none; }
.jointe { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--bord); background: var(--canvas); border-radius: 12px; padding: 6px 30px 6px 6px; max-width: 240px; font-size: 12.5px; }
.jointe .vignette { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; background: var(--carte); display: grid; place-items: center; color: var(--primaire); border: 1px solid var(--bord); }
.jointe .infos { min-width: 0; line-height: 1.3; }
.jointe .infos b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.jointe .infos small { color: var(--gris); font-weight: 500; }
.jointe .retirer { position: absolute; top: 4px; right: 4px; border: 0; background: transparent; color: var(--gris); border-radius: 6px; padding: 3px; display: grid; place-items: center; }
.jointe .retirer:hover { background: var(--bord); color: var(--encre); }
.jointe.erreur { border-color: var(--rouge); background: var(--rouge-fond); }
.depot { position: absolute; inset: 10px; border: 2px dashed var(--primaire); border-radius: 18px; background: rgba(244, 245, 251, .92); display: none;
  place-items: center; z-index: 30; pointer-events: none; color: var(--primaire); font-weight: 800; font-size: 18px; text-align: center; }
.depot.vu { display: grid; }
.depot small { display: block; font-size: 13px; font-weight: 600; color: var(--gris); margin-top: 4px; }

/* Panneau fichiers */
.fichiers { width: 0; overflow: hidden; border-left: 1px solid var(--bord); background: var(--carte); display: flex; flex-direction: column; transition: width .2s; min-height: 0; }
.fichiers.ouvert { width: min(460px, 42vw); }
.fichiers .haut { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 64px; border-bottom: 1px solid var(--bord); font-weight: 800; flex: none; }
.fichiers .haut .ic { color: var(--primaire); }
.fichiers .haut .ariane { flex: 1; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fichiers .liste { overflow-y: auto; flex: 1; padding: 8px; min-height: 0; }
.fichiers .liste .element { color: var(--encre-2); }
.fichiers .liste .element .ic { color: var(--primaire); }
.fichiers .liste .element:hover { background: var(--canvas); color: var(--encre); }
.fichiers .liste .vide-liste { color: var(--gris); }
.fichiers .vue { overflow: auto; flex: 1; margin: 0; padding: 12px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; min-height: 0; }
.fichiers .vue .barre { display: flex; gap: 8px; margin-bottom: 10px; font-family: var(--police); }
.fichiers .vue img { max-width: 100%; border-radius: 10px; border: 1px solid var(--bord); }
.fichiers .vue code.hljs { background: transparent; padding: 0; }

/* Modale */
.voile { position: fixed; inset: 0; background: rgba(18, 42, 84, .45); display: none; place-items: center; z-index: 50; padding: 16px; }
.voile.ouvert { display: grid; }
.modale { background: var(--carte); border-radius: 16px; padding: 22px; width: min(420px, 100%); box-shadow: 0 20px 50px rgba(18, 42, 84, .25); }
.modale h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.modale p { margin: 0 0 14px; color: var(--gris); font-size: 14px; font-weight: 500; }
.modale label { display: block; font-size: 12px; font-weight: 600; color: var(--encre-2); margin-bottom: 6px; }
.modale input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--canvas); outline: none; }
.modale input:focus { border-color: var(--primaire); background: var(--carte); }
.modale .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 10px 16px;
  border-radius: 12px; font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 60; pointer-events: none; }
.toast.vu { opacity: 1; transform: translateX(-50%); }

/* Mobile */
@media (max-width: 860px) {
  .appli { grid-template-columns: 1fr; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .lateral.ouvert { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-mobile { display: inline-flex; }
  .fichiers.ouvert { position: fixed; inset: 0; width: 100%; z-index: 45; }
  .entete { padding: 8px 12px; min-height: 0; }
  .entete .lieu { flex: 1 1 auto; font-size: 15px; }
  .reglage { flex: 1 1 28%; min-width: 0; padding: 2px 2px 2px 8px; }
  .reglage select { width: 100%; max-width: none; font-size: 12.5px; }
  .reglage .ic, .lib, #txtJauge { display: none; }
  .fil-int { padding: 18px 16px 30px; }
  .saisie { padding: 4px 12px 12px; }
  .msg.moi .bulle { max-width: 90%; }
  .aide-saisie { display: none; }
}
