/* Console Panbi — même langage visuel que l'application mobile.
   Palette, typographie et rayons repris de src/theme.js, y compris les
   variantes accessibles : l'orange de marque #E8542F reste pour les aplats et
   les icônes, jamais pour du texte. */

/* Polices HÉBERGÉES LOCALEMENT.
 *
 * C'était un `@import` vers fonts.googleapis.com. Trois problèmes :
 *  · un `@import` CSS est SÉRIEL — le navigateur doit récupérer styles.css,
 *    l'analyser, puis lancer une seconde requête vers un tiers avant de
 *    peindre : la console reste blanche pendant tout ce temps ;
 *  · sans accès Internet, la console interne ne s'affiche pas correctement ;
 *  · chaque chargement transmettait l'adresse IP des opérateurs à un tiers,
 *    ce que la loi ivoirienne n° 2013-450 encadre — et que le consentement
 *    de l'application prend par ailleurs au sérieux.
 *
 * Les quatre fichiers (80 ko, sous-ensembles latin et latin étendu) sont dans
 * public/brand/fonts/. `font-display: swap` garde le texte lisible pendant le
 * chargement.
 */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/brand/fonts/InstrumentSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/brand/fonts/SpaceGrotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/brand/fonts/SpaceGrotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/brand/fonts/SpaceGrotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/brand/fonts/SpaceGrotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/brand/fonts/SpaceGrotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/brand/fonts/SpaceGrotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
  --bg:#FBFAF8; --white:#FFFFFF; --ink:#1C1917;
  --muted:#726A62; --muted2:#5C554C; --faint:#807465; --placeholder:#746A5D;
  --line:#EDE7DF; --line2:#F1ECE5; --fill:#F1ECE5; --tile:#F6F4F1;
  --dash:#E3DCD2; --dot:#C9C0B4; --dot-line:#D8D0C5; --neutral-tag:#EBE6DE;
  --accent:#E8542F; --accent-text:#C43916; --accent-strong:#D83E18;
  --accent-deep:#9E3413; --accent-tint:#FCEDE7; --accent-soft:#F8A188;
  --green:#0E7A4E; --green-tint:#E5F3EC; --green-line:#BFE2D0; --green-dark:#0B5C3B;
  --warn:#8A6209; --warn-tint:#F7EEDA;
  --shadow:0 1px 2px rgba(28,25,23,.05), 0 6px 20px rgba(28,25,23,.05);
  --r:16px; --r-sm:13px; --r-pill:99px;
}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);
  font-family:'Instrument Sans',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.015em}
button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
input,select,textarea{font:inherit;color:inherit}
a{color:var(--accent-text);text-decoration:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.mono{font-family:'Space Grotesk','SF Mono',ui-monospace,monospace;font-variant-numeric:tabular-nums}
.display{font-family:'Space Grotesk',sans-serif;font-weight:700}

/* ── structure ─────────────────────────────────────────────── */
.app{display:grid;grid-template-columns:236px 1fr;min-height:100vh}
.side{background:var(--ink);color:#EFEAE4;padding:22px 14px;display:flex;flex-direction:column;gap:3px}
.brand{font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:20px;
  padding:2px 12px 22px;letter-spacing:-.02em}
.brand span{color:var(--accent)}
.nav{display:flex;flex-direction:column;gap:2px}
.nav button{text-align:left;padding:11px 13px;border-radius:var(--r-sm);font-size:14px;
  font-weight:500;color:#B5ACA2;width:100%;transition:background .12s,color .12s}
.nav button:hover:not(:disabled){background:rgba(255,255,255,.07);color:#fff}
.nav button.on{background:var(--white);color:var(--ink);font-weight:600}
.nav button:disabled{opacity:.3;cursor:not-allowed}
.who{margin-top:auto;padding:15px 13px 0;border-top:1px solid rgba(255,255,255,.1);
  font-size:12.5px;color:#B5ACA2}
.who b{display:block;color:#fff;font-size:13.5px;font-weight:600;margin-bottom:1px}
.who .env{display:inline-block;margin-top:8px;padding:2px 8px;border-radius:var(--r-pill);
  background:rgba(255,255,255,.1);font-size:10.5px;font-weight:600;letter-spacing:.04em}
.who button{margin-top:12px;font-size:12.5px;font-weight:600;color:var(--accent-soft)}

.main{padding:28px 32px 64px;overflow-x:hidden}
.head{display:flex;align-items:center;gap:12px;margin-bottom:22px;flex-wrap:wrap}
.head h1{font-size:25px;flex:1;letter-spacing:-.02em}

/* ── surfaces ──────────────────────────────────────────────── */
.card{background:var(--white);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow)}
.pad{padding:17px 19px}
.grid{display:grid;gap:12px}
.tiles{grid-template-columns:repeat(auto-fit,minmax(172px,1fr))}
.tile{background:var(--white);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px}
.tile .n{font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:26px;letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;line-height:1.1}
.tile .k{font-size:11px;color:var(--muted);margin-top:6px;font-weight:500}

table{width:100%;border-collapse:collapse;background:var(--white)}
th,td{text-align:left;padding:12px 15px;border-bottom:1px solid var(--line2);
  font-size:13.5px;vertical-align:middle}
th{font-size:11px;color:var(--muted);background:var(--tile);font-weight:600;letter-spacing:.01em}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:var(--tile)}
tbody tr.click{cursor:pointer}
.tw{border:1px solid var(--line);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow)}
.scroll{overflow-x:auto}

/* ── pastilles, comme dans l'app ───────────────────────────── */
.tag{display:inline-block;padding:3px 9px;border-radius:var(--r-pill);
  font-size:10.5px;font-weight:700;white-space:nowrap}
.t-ok{background:var(--green-tint);color:var(--green)}
.t-warn{background:var(--warn-tint);color:var(--warn)}
.t-acc{background:var(--accent-tint);color:var(--accent-text)}
.t-mut{background:var(--neutral-tag);color:var(--muted2)}

/* ── boutons en pilule, comme dans l'app ───────────────────── */
.btn{padding:11px 20px;border-radius:var(--r-pill);font-size:14px;font-weight:600;
  background:var(--ink);color:var(--white);transition:opacity .12s}
.btn:hover:not([disabled]){opacity:.87}
.btn[disabled]{opacity:.35;cursor:not-allowed}
.btn.ghost{background:var(--white);color:var(--ink);border:1px solid var(--line)}
.btn.ghost:hover:not([disabled]){background:var(--tile)}
.btn.danger{background:var(--accent-strong)}
.btn.sm{padding:7px 14px;font-size:12.5px}

label{display:block;font-size:11.5px;font-weight:600;color:var(--muted);margin-bottom:6px}
.in{width:100%;padding:12px 14px;border:1.5px solid transparent;border-radius:var(--r-sm);
  background:var(--fill);font-size:14px}
.in:focus{outline:none;border-color:var(--accent);background:var(--white)}
select.in{cursor:pointer}
.row{display:flex;gap:12px;flex-wrap:wrap}
.row>*{flex:1;min-width:150px}

.modal{position:fixed;inset:0;background:rgba(28,25,23,.42);display:flex;align-items:center;
  justify-content:center;padding:26px;z-index:50;backdrop-filter:blur(2px)}
.sheet{background:var(--white);border-radius:22px;max-width:680px;width:100%;max-height:88vh;
  overflow:auto;box-shadow:0 24px 70px rgba(28,25,23,.28)}
.sheet header{display:flex;align-items:center;gap:12px;padding:18px 22px;
  border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--white);z-index:1}
.sheet header h2{font-size:17px;flex:1}
.sheet .body{padding:22px}

.msg{padding:12px 15px;border-radius:var(--r-sm);font-size:13.5px;margin-bottom:15px}
.msg.err{background:var(--accent-tint);color:var(--accent-deep)}
.msg.ok{background:var(--green-tint);color:var(--green-dark)}
.empty{padding:46px;text-align:center;color:var(--muted);font-size:14px}
.muted{color:var(--muted)}
.small{font-size:12px}

/* ── connexion ─────────────────────────────────────────────── */
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;
  background:linear-gradient(160deg,#EFE9F4,#F6E3DC)}
.login .card{width:100%;max-width:390px;padding:34px}
.login h1{font-size:24px;margin-bottom:6px;letter-spacing:-.02em}
.login p{color:var(--muted);font-size:13.5px;margin:0 0 24px}
.login .in{margin-bottom:14px}
.login .btn{width:100%;padding:15px}
.accounts{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);
  font-size:12px;color:var(--muted);line-height:2}
.accounts code{background:var(--fill);padding:3px 9px;border-radius:var(--r-pill);
  cursor:pointer;font-family:'Space Grotesk',monospace;font-size:11.5px;font-weight:600}
.accounts code:hover{background:var(--accent-tint);color:var(--accent-text)}

/* ── médias produit ─────────────────────────────────────────── */
.thumb{width:44px;height:44px;border-radius:10px;background:var(--tile);flex:none;
  display:flex;align-items:center;justify-content:center;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:contain}

.medias{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.media{position:relative;width:96px;height:96px;border-radius:var(--r-sm);overflow:hidden;
  background:var(--tile);border:1px solid var(--line);cursor:grab}
.media img,.media video{width:100%;height:100%;object-fit:cover;display:block}
.media-acts{position:absolute;top:4px;right:4px;display:flex;gap:3px;opacity:0;transition:opacity .12s}
.media:hover .media-acts{opacity:1}
.media-acts button{width:22px;height:22px;border-radius:var(--r-pill);background:rgba(28,25,23,.78);
  color:#fff;font-size:11px;line-height:1;display:flex;align-items:center;justify-content:center}
.media-acts button:hover{background:var(--accent-strong)}
.badge-cover{position:absolute;bottom:4px;left:4px;background:var(--ink);color:#fff;
  font-size:9px;font-weight:700;padding:2px 7px;border-radius:var(--r-pill)}
.badge-vid{position:absolute;bottom:4px;left:4px;background:var(--accent-strong);color:#fff;
  font-size:9px;font-weight:700;padding:2px 7px;border-radius:var(--r-pill)}

.drop{border:1.5px dashed var(--dot-line);border-radius:var(--r);padding:22px;text-align:center;
  cursor:pointer;display:flex;flex-direction:column;gap:4px;transition:border-color .12s,background .12s}
.drop:hover,.drop.over{border-color:var(--accent);background:var(--accent-tint)}
.drop b{font-size:13.5px}

/* ── marque ─────────────────────────────────────────────────
   Le logo est noir sur fond clair : sur la barre latérale sombre, on le
   pose dans une pastille claire plutôt que de l'inverser — une inversion
   donnerait un carré gris sale au lieu d'un blanc franc. */
.brand{display:flex;align-items:center;gap:9px}
.brand .mark{width:30px;height:30px;border-radius:9px;background:var(--white);
  display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none}
.brand .mark img{width:112%;height:112%;object-fit:contain}
.brand .dot{color:var(--accent)}
/* Le PNG est désormais réellement transparent : plus besoin de mode de fusion,
   qui laissait de toute façon le gris visible sur fond blanc. */
.login-logo{display:block;width:158px;margin:0 auto 10px}

/* ── Fourchettes de prix par niveau d'état ─────────────────────────────────
   Un niveau décoché reste visible mais atténué : on doit voir d'un coup d'œil
   ce qui est proposé ET ce qui ne l'est pas, sans dérouler un menu. */
.niveaux { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.niveau {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px;
  background: var(--surface-2); opacity: .55; transition: opacity .12s, border-color .12s;
}
.niveau.on { opacity: 1; border-color: var(--accent-soft); background: var(--surface); }
.niv-tete { display: flex; align-items: flex-start; gap: 9px; flex: 1; min-width: 210px; cursor: pointer; margin: 0; }
.niv-tete input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; }
.niv-tete span { display: flex; flex-direction: column; gap: 1px; }
.niv-tete b { font-size: 13px; font-weight: 600; }
.niv-prix { display: flex; align-items: center; gap: 7px; }
.niv-prix .in { width: 108px; text-align: right; }
@media (max-width: 640px) {
  .niv-prix { width: 100%; }
  .niv-prix .in { flex: 1; width: auto; }
}

/* ── Retour d'action ──────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  max-width: min(520px, calc(100vw - 32px));
  background: var(--ink); color: var(--white);
  font-size: 13.5px; line-height: 1.5; padding: 12px 18px; border-radius: var(--r-pill);
  box-shadow: 0 6px 26px rgba(28,25,23,.22); z-index: 60;
  opacity: 0; transition: opacity .22s, transform .22s;
}
.toast.vu { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--accent-deep); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Une action destructrice ne doit pas ressembler à l'action principale. */
.btn.danger {
  background: transparent; color: var(--accent-deep);
  border: 1px solid var(--accent-soft);
}
.btn.danger:hover { background: var(--accent-tint); }

/* ── Fil de conversation ───────────────────────────────────────────────────
   Le côté dit qui parle ; la couleur dit de quelle nature est le message.
   L'équipe doit distinguer d'un coup d'œil ce qu'elle a écrit de ce que
   l'assistant a répondu en son nom. */
.fils {
  max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 9px;
  padding: 13px; background: var(--tile); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.fil { max-width: 78%; padding: 9px 12px; border-radius: 13px; font-size: 13.5px; line-height: 1.5; }
.fil-qui { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.fil.gauche { align-self: flex-start; background: var(--white); border: 1px solid var(--line); }
.fil.droite { align-self: flex-end; background: var(--accent-tint); border: 1px solid var(--accent-soft); }
.fil.assistant { background: var(--fill); border-style: dashed; }
.fil.assistant .fil-qui { color: var(--accent-text); font-weight: 600; }
.fil.systeme { align-self: center; max-width: 92%; background: transparent;
               border: 1px dashed var(--dash); color: var(--muted); font-size: 12.5px; text-align: center; }
.fil.offre { background: var(--white); border: 1.5px solid var(--accent); max-width: 88%; }


/* ── Accessibilité ─────────────────────────────────────────────────────── */

/* Masqué à l'œil, LU par les lecteurs d'écran. `display:none` les priverait
   aussi de l'information ; on sort donc l'élément du flux sans l'effacer. */
.visuellement-masque {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Lien d'évitement : invisible jusqu'à ce qu'il reçoive le focus au clavier. */
.evitement {
  position: absolute; left: 0; top: -3rem; z-index: 100;
  background: var(--ink); color: var(--white);
  padding: .6rem 1rem; border-radius: 0 0 var(--r-md, 12px) 0;
  text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.evitement:focus { top: 0; }
@media (prefers-reduced-motion: reduce) { .evitement { transition: none; } }

/* Pièces jointes de la messagerie : photos et vidéos envoyées par le client.
   Bornées en hauteur — une photo de téléphone fait 4000 px de haut et
   pousserait la conversation hors de l'écran. */
.jointes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.jointe { max-width: 140px; max-height: 140px; border-radius: 8px;
          border: 1px solid var(--line, #EDE7DF); object-fit: cover; display: block; }

/* ── Pastilles numériques des onglets ──────────────────────────────────────
   Le compte de ce qui attend : règlements à confirmer, réclamations ouvertes,
   fils sans réponse. Cachée à zéro — une pastille « 0 » attire l'œil pour rien. */
.nav button{display:flex;align-items:center;gap:8px}
.nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:var(--r-pill);
  background:var(--accent);color:#fff;font-size:11px;font-weight:700;line-height:20px;text-align:center;
  font-variant-numeric:tabular-nums}
.nav button.on .nav-badge{background:var(--accent-strong)}

/* ── File de travail « Aujourd'hui » ──────────────────────────────────────── */
.travail{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.travail .tile{cursor:pointer;transition:border-color .12s,box-shadow .12s;text-align:left}
.travail .tile:hover:not([disabled]){border-color:var(--accent-soft);box-shadow:var(--shadow)}
.travail .tile[disabled]{cursor:not-allowed;opacity:.6}
.travail .tile .n.urgent{color:var(--accent-text)}
.travail .tile .k{font-size:12px}

/* ── Sous-onglets (inventaire, ancien modèle) ──────────────────────────────── */
.sousnav{display:flex;gap:6px;flex-wrap:wrap}
.sousnav button{padding:7px 14px;border-radius:var(--r-pill);font-size:13px;font-weight:600;
  background:var(--white);border:1px solid var(--line);color:var(--muted2)}
.sousnav button.on{background:var(--ink);color:var(--white);border-color:var(--ink)}

/* ── Offre à plusieurs options dans le fil ─────────────────────────────────
   L'option RETENUE par le client est surlignée : c'est elle qui fixe le prix. */
.options{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.option{border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:var(--white)}
.option.retenue{border-color:var(--green);background:var(--green-tint)}
.option .option-tete{display:flex;justify-content:space-between;gap:10px;align-items:baseline}

/* ── Compte à rebours des incidents ──────────────────────────────────────── */
.reste.depasse{color:var(--accent-text);font-weight:700}
.head h2{font-size:19px;flex:1;letter-spacing:-.015em}

/* Journal d'audit : recherche large + quatre filtres + actions, sur une ligne. */
.jfiltres{display:grid;grid-template-columns:minmax(220px,2fr) repeat(4,minmax(130px,1fr)) auto auto;gap:8px;margin-bottom:12px;align-items:center}
.jfiltres .in{width:100%;margin:0}
@media (max-width:1100px){.jfiltres{grid-template-columns:1fr 1fr}.jfiltres #jq{grid-column:1/-1}}
.jfiltres .btn{white-space:nowrap}

/* La veille des nouvelles demandes, sous le nom de la personne connectée. */
.who .veille{margin-top:10px;font-size:12px;line-height:1.4}
.who .veille button{margin-top:0;color:#fff;background:rgba(255,255,255,.12);padding:6px 10px;border-radius:var(--r-pill)}
.who .veille .veille-ok{color:#9FD9B4}
.who .veille .veille-ko{color:var(--accent-soft)}

/* Un texte d'alerte dans une fiche : une arrivée promise déjà dépassée. */
.err-txt{color:var(--accent-text);font-weight:600}
