/* =====================================================================
   CIPROTEC Fieldwork — style « SaaS » (v1.1)
   Téléphone d'abord ; barre latérale sombre à partir de 992 px.
   ===================================================================== */

:root {
  --fond: #F5F6F8;
  --carte: #FFFFFF;
  --encre: #101820;
  --encre-2: #3E4752;
  --gris: #6B7684;
  --gris-clair: #9AA3AE;
  --trait: #E6E8EC;
  --trait-2: #F0F1F4;
  --champ: #DDE1E6;
  --bleu: #1D4E89;
  --bleu-fonce: #163B68;
  --bleu-doux: #EEF4FB;
  --ciel: #7CC4FF;
  --nuit: #0E1620;
  --nuit-2: #121C27;
  --nuit-3: #1A2532;
  --nuit-trait: #1E2A37;
  --nuit-texte: #AEB9C5;
  --nuit-muet: #7E8B99;
  --orange: #E0662B;
  --orange-texte: #8A3A10;
  --orange-doux: #FDEEE4;
  --vert: #2E8B4A;
  --vert-texte: #1F6B33;
  --vert-doux: #E7F4EA;
  --jaune: #6B4A00;
  --jaune-doux: #FFF4D6;
  --rayon: 18px;
  --ombre: 0 1px 2px rgba(16, 24, 40, .04);
  --ombre-haute: 0 14px 30px -14px rgba(16, 24, 40, .22);
  --police: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --chiffres: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --nav-h: 66px;
  --sur-bas: env(safe-area-inset-bottom, 0px);
  --courbe: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--police); font-size: 15px; line-height: 1.45; color: var(--encre); background: var(--fond); -webkit-font-smoothing: antialiased; }
a { color: var(--bleu); }
a:hover { color: var(--bleu-fonce); }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.num { font-family: var(--chiffres); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.muet { color: var(--gris); }
.petit { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ciel); outline-offset: 2px; border-radius: 8px; }

/* Apparition en cascade */
.apparait { animation: apparait .55s var(--courbe) both; }
.apparait:nth-child(2) { animation-delay: .05s; }
.apparait:nth-child(3) { animation-delay: .1s; }
.apparait:nth-child(4) { animation-delay: .15s; }
.apparait:nth-child(5) { animation-delay: .2s; }
@keyframes apparait { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(46, 139, 74, .5); } 70% { box-shadow: 0 0 0 8px rgba(46, 139, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 139, 74, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Cadre ---------- */
.cadre { min-height: 100vh; display: flex; flex-direction: column; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Barre latérale (grand écran) / barre flottante (téléphone) */
.lateral { display: none; }

.entete {
  position: sticky; top: 0; z-index: 20; height: 64px;
  padding: 0 16px; padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 12px;
  background: rgba(245, 246, 248, .82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.entete-titre { font-size: 13px; color: var(--gris); display: none; }
.entete-titre b { color: var(--encre); }
.marque { display: flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; }
.marque:hover { color: var(--encre); }
.marque span { display: flex; flex-direction: column; line-height: 1.05; }
.marque small { font-size: 9px; font-weight: 800; letter-spacing: .16em; color: var(--gris); }
.marque b { font-size: 16px; font-weight: 800; }
.entete-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bouton-recherche {
  height: 40px; min-width: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--champ); background: #fff; color: var(--gris);
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 14px;
}
.bouton-recherche span, .bouton-recherche kbd { display: none; }
.bouton-recherche kbd { margin-left: auto; font-family: var(--chiffres); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--champ); color: var(--gris); }
.bouton-recherche:hover { color: var(--encre); border-color: #C9CFD6; }
.avatar-rond {
  width: 38px; height: 38px; border-radius: 50%; background: var(--ciel); color: var(--nuit);
  font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none;
}

.contenu { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 16px calc(var(--nav-h) + 36px + var(--sur-bas)); display: flex; flex-direction: column; gap: 18px; }

.nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--sur-bas)); z-index: 30;
  display: flex; height: var(--nav-h); padding: 0 6px; border-radius: 22px;
  background: rgba(14, 22, 32, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 36px -12px rgba(14, 22, 32, .55);
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; font-size: 10px; font-weight: 700; color: #8A94A1; text-decoration: none; border-radius: 16px;
}
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"] svg { color: var(--ciel); }
.nav svg { width: 21px; height: 21px; }

/* ---------- Composants ---------- */
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); }
a.carte, .carte-vivante { transition: transform .25s var(--courbe), box-shadow .25s var(--courbe), border-color .25s; }
a.carte:hover, .carte-vivante:hover { transform: translateY(-2px); box-shadow: var(--ombre-haute); }
.carte-pad { padding: 18px; }
.titre-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.titre-page h1 { font-size: 26px; font-weight: 800; }
.titre-page p { margin: 4px 0 0; color: var(--gris); }
.section-titre { font-size: 15px; font-weight: 800; color: var(--encre); margin: 0 0 10px; letter-spacing: -0.01em; }

.liste { overflow: hidden; }
.ligne {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-top: 1px solid var(--trait-2); color: var(--encre); text-decoration: none; min-height: 62px;
  transition: background .15s;
}
.ligne:first-child { border-top: 0; }
a.ligne:hover { background: #FAFBFC; color: var(--encre); }
.ligne-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ligne-texte b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-texte span { font-size: 12px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-fin { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; background: var(--bleu-doux); color: var(--bleu);
  font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none;
}
.liste .ligne:first-child .avatar { background: var(--bleu); color: #fff; }

.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill-dispo { background: var(--vert-doux); color: var(--vert-texte); }
.pill-faible { background: var(--jaune-doux); color: var(--jaune); }
.pill-rupture, .pill-sommeil { background: var(--orange-doux); color: var(--orange-texte); }
.pill-info { background: var(--bleu-doux); color: var(--bleu); }
.pill-neutre { background: #F0F2F5; color: var(--encre-2); }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--encre); }
.kpi:hover { color: var(--encre); }
.kpi-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-tete span { font-size: 13px; font-weight: 600; color: var(--gris); }
.kpi-icone { width: 32px; height: 32px; border-radius: 9px; background: var(--bleu-doux); color: var(--bleu); display: flex; align-items: center; justify-content: center; flex: none; }
.kpi b { font-size: 28px; font-weight: 600; line-height: 1.1; }
.kpi small { font-size: 12px; color: var(--gris); }
.kpi-alerte { background: linear-gradient(180deg, #FFF6F0, var(--orange-doux)); border-color: #F6D7C2; }
.kpi-alerte .kpi-tete span, .kpi-alerte small { color: var(--orange-texte); }
.kpi-alerte b { color: #6E2A08; }
.kpi-alerte .kpi-icone { background: #fff; color: var(--orange); }

.raccourcis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.raccourci { min-height: 76px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--encre); }
.raccourci .kpi-icone { width: 40px; height: 40px; border-radius: 12px; }
.raccourci span { display: flex; flex-direction: column; }
.raccourci small { font-size: 12px; font-weight: 500; color: var(--gris); }
.raccourci-principal { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 10px 24px -12px rgba(29, 78, 137, .7); }
.raccourci-principal small { color: #C9DCF2; }
.raccourci-principal .kpi-icone { background: rgba(255, 255, 255, .14); color: #fff; }
.raccourci-principal:hover { color: #fff; background: var(--bleu-fonce); }

/* Recherche */
.recherche {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--champ); color: var(--gris); box-shadow: var(--ombre);
  transition: border-color .2s, box-shadow .2s;
}
.recherche:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(29, 78, 137, .12); }
.recherche input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--encre); outline: none; }
.recherche-sombre { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: var(--nuit-texte); box-shadow: none; }
.recherche-sombre:focus-within { border-color: var(--ciel); box-shadow: 0 0 0 4px rgba(124, 196, 255, .18); }
.recherche-sombre input { color: #fff; }
.recherche-sombre input::placeholder { color: var(--nuit-muet); }
[aria-busy="true"] { opacity: .55; transition: opacity .2s; }

.puces { display: flex; gap: 6px; overflow-x: auto; padding: 4px; border-radius: 13px; background: #ECEEF1; align-self: flex-start; max-width: 100%; }
.puce {
  height: 34px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 700; white-space: nowrap;
  display: inline-flex; align-items: center; text-decoration: none; color: var(--gris); border: 0;
}
.puce:hover { color: var(--encre); }
.puce[aria-current="true"] { background: #fff; color: var(--encre); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.titre-page .puce { background: #fff; border: 1px solid var(--champ); }
.titre-page .puce[aria-current="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }

/* Bandeaux sombres (accueil, fiches) */
.bandeau, .fiche-tete {
  position: relative; overflow: hidden; background: var(--nuit); color: #fff; border-radius: 24px;
  padding: 22px 20px 22px; display: flex; flex-direction: column; gap: 14px;
}
.bandeau::before, .fiche-tete::before {
  content: ""; position: absolute; right: -90px; top: -110px; width: 280px; height: 280px; border-radius: 50%;
  border: 34px solid rgba(255, 255, 255, .04); pointer-events: none;
}
.bandeau::after, .fiche-tete::after {
  content: ""; position: absolute; right: 20px; top: 26px; width: 90px; height: 90px; border-radius: 50%;
  border: 14px solid rgba(124, 196, 255, .07); pointer-events: none;
}
.bandeau > *, .fiche-tete > * { position: relative; z-index: 1; }
.bandeau small { color: var(--nuit-muet); font-size: 13px; }
.bandeau h1 { font-size: 28px; font-weight: 800; }
.bandeau p { margin: 2px 0 0; color: var(--nuit-texte); }
.fiche-tete h1 { font-size: 25px; font-weight: 800; }
.fiche-tete .muet { color: var(--nuit-texte); }
.retour { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--nuit-texte); text-decoration: none; font-size: 13px; font-weight: 600; align-self: flex-start; }
.retour:hover { color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.action {
  flex: 1; min-width: 80px; min-height: 58px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06);
  color: #fff; font-size: 12px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-decoration: none;
  transition: background .2s, border-color .2s;
}
.action:hover { color: #fff; background: rgba(124, 196, 255, .14); border-color: rgba(124, 196, 255, .4); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--trait-2); font-size: 14px; }
.kv:first-child { border-top: 0; }
.kv > span:first-child { color: var(--gris); }
.kv > :last-child { text-align: right; overflow-wrap: anywhere; }
.chiffres3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.chiffre { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.chiffre span { font-size: 12px; font-weight: 600; color: var(--gris); }
.chiffre b { font-size: 22px; font-weight: 600; }

/* Tableaux */
.defile { overflow-x: auto; }
table.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { font-size: 12px; font-weight: 700; color: var(--gris); text-align: right; padding: 12px 16px; border-bottom: 1px solid var(--trait-2); background: #FAFBFC; white-space: nowrap; }
.tableau td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--trait-2); white-space: nowrap; }
.tableau th:first-child, .tableau td:first-child { text-align: left; }
.tableau tbody tr:hover { background: #FAFBFC; }
.tableau tfoot td { background: #F5F7F9; font-weight: 700; border-bottom: 0; }

/* Articles */
.article { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.article-tete { display: flex; gap: 12px; align-items: flex-start; }
.article-tete a { color: var(--encre); text-decoration: none; font-weight: 700; line-height: 1.3; }
.article-tete a:hover { color: var(--bleu); }
.article-stock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 14px; background: #F6F7F9; }
.article-stock span { display: block; font-size: 11px; font-weight: 600; color: var(--gris); }
.article-stock b { font-size: 17px; font-weight: 600; }
.cartes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

/* Formulaires */
.formulaire { display: flex; flex-direction: column; gap: 16px; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--encre-2); }
.champ input, .champ select, .champ textarea {
  min-height: 46px; border-radius: 12px; border: 1px solid var(--champ); padding: 0 12px; font-size: 15px; font-weight: 500; background: #fff; color: var(--encre);
  transition: border-color .2s, box-shadow .2s;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(29, 78, 137, .12); }
.champ textarea { padding: 10px 12px; min-height: 110px; font-family: var(--chiffres); font-size: 13px; }
.champ .aide { font-size: 12px; font-weight: 500; color: var(--gris); }
.champ-erreur input, .champ-erreur select, .champ-erreur textarea { border-color: var(--orange); }
.erreur { font-size: 12px; font-weight: 600; color: var(--orange); }
.choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--champ); background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
.option:hover { border-color: #B9C2CC; }
.option:has(input:checked) { border: 2px solid var(--bleu); background: #F5F9FE; }
.option input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--bleu); }
.option span { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--gris); }
.option b { font-size: 14px; color: var(--encre); }
.case { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; }
.case input { width: 20px; height: 20px; accent-color: var(--bleu); }
.cases { display: flex; flex-wrap: wrap; gap: 4px 18px; }

.bouton {
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--champ); background: #fff; color: var(--encre);
  font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, transform .1s;
}
.bouton:hover { border-color: #B9C2CC; color: var(--encre); }
.bouton:active { transform: scale(.98); }
.bouton-principal { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 8px 18px -8px rgba(29, 78, 137, .7); }
.bouton-principal:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); color: #fff; }
.bouton-plein { width: 100%; min-height: 52px; font-size: 16px; font-weight: 800; }
.boutons { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.message { padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.message-succes { background: var(--vert-doux); color: var(--vert-texte); }
.message-erreur { background: var(--orange-doux); color: var(--orange-texte); }
.vide { padding: 32px 16px; text-align: center; color: var(--gris); }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--gris); margin-top: 12px; }

/* ---------- Connexion ---------- */
.connexion { min-height: 100vh; display: flex; flex-direction: column; background: var(--fond); }
.connexion-marque {
  position: relative; overflow: hidden; background: var(--nuit); color: #fff; padding: 48px 28px 32px; display: flex; flex-direction: column; gap: 22px;
}
.connexion-marque::before { content: ""; position: absolute; right: -120px; top: -120px; width: 340px; height: 340px; border-radius: 50%; border: 44px solid rgba(255, 255, 255, .04); }
.connexion-marque::after { content: ""; position: absolute; right: 30px; top: 40px; width: 110px; height: 110px; border-radius: 50%; border: 16px solid rgba(124, 196, 255, .08); }
.connexion-marque > * { position: relative; z-index: 1; }
.connexion-marque h1 { font-size: 30px; font-weight: 800; }
.connexion-marque p { margin: 6px 0 0; color: var(--nuit-texte); max-width: 420px; }
.connexion-atouts { display: none; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.connexion-atouts li { display: flex; gap: 12px; align-items: flex-start; color: var(--nuit-texte); font-size: 14px; }
.connexion-atouts li span { width: 34px; height: 34px; border-radius: 10px; background: rgba(124, 196, 255, .12); color: var(--ciel); display: flex; align-items: center; justify-content: center; flex: none; }
.connexion-atouts b { color: #fff; display: block; font-size: 14px; }
.connexion-corps { flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 24px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.connexion-corps h2 { font-size: 24px; font-weight: 800; }
.connexion-pied { text-align: center; font-size: 11px; color: var(--gris); font-family: var(--chiffres); padding: 0 24px 24px; }

/* Bandeau d'installation iPhone */
.installer {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 24px + var(--sur-bas)); z-index: 40;
  background: var(--nuit); color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; font-size: 13px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}
.installer button { background: transparent; border: 0; color: var(--ciel); font-weight: 800; cursor: pointer; min-height: 44px; }

/* ---------- Tablette ---------- */
@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bouton-recherche { min-width: 260px; }
  .bouton-recherche span, .bouton-recherche kbd { display: inline; }
}

/* ---------- Grand écran ---------- */
@media (min-width: 992px) {
  .cadre { flex-direction: row; }
  .nav, .entete .marque, .installer { display: none; }
  .lateral {
    display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; width: 252px; flex: none;
    background: var(--nuit); color: #fff; padding: 20px 14px;
  }
  .lateral .marque { color: #fff; padding: 4px 8px 18px; }
  .lateral .marque small { color: var(--nuit-muet); }
  .lateral-societe { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--nuit-trait); background: var(--nuit-2); margin-bottom: 6px; }
  .lateral-societe > span:first-child { width: 28px; height: 28px; border-radius: 8px; background: var(--bleu); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
  .lateral-societe b { font-size: 13px; }
  .lateral-groupe { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: #5E6B79; text-transform: uppercase; padding: 16px 12px 6px; }
  .lateral a.lien { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--nuit-texte); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
  .lateral a.lien svg { width: 18px; height: 18px; }
  .lateral a.lien:hover { background: var(--nuit-3); color: #fff; }
  .lateral a.lien[aria-current="page"] { background: var(--nuit-3); color: #fff; box-shadow: inset 3px 0 0 var(--ciel); }
  .lateral-pied { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .lateral-etat { padding: 11px 12px; border-radius: 12px; background: var(--nuit-2); border: 1px solid var(--nuit-trait); display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--nuit-texte); }
  .lateral-etat i { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); flex: none; animation: pouls 2s infinite; }
  .lateral-profil { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0 8px; }
  .lateral-profil span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .lateral-profil b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lateral-profil small { font-size: 11px; color: var(--nuit-muet); }
  .lateral-profil button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--nuit-trait); background: transparent; color: var(--nuit-texte); display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .lateral-profil button:hover { color: #fff; border-color: var(--nuit-muet); }

  .entete { height: 68px; padding: 0 28px; background: rgba(255, 255, 255, .78); border-bottom-color: var(--trait); }
  .entete-titre { display: block; }
  .entete .avatar-rond, .entete .deconnexion-mobile { display: none; }
  .contenu { padding: 26px 28px 48px; gap: 20px; }
  .bandeau, .fiche-tete { padding: 28px 30px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .raccourcis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-accueil { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }

  .connexion { flex-direction: row; }
  .connexion-marque { flex: 0 0 46%; padding: 64px 56px; justify-content: space-between; }
  .connexion-marque h1 { font-size: 40px; }
  .connexion-atouts { display: flex; }
  .connexion-droite { flex: 1; display: flex; flex-direction: column; }
}
@media (min-width: 1280px) {
  .cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =====================================================================
   Devis (v1.2)
   ===================================================================== */
.section-entete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lien-retour { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--gris); text-decoration: none; margin-bottom: 6px; }
.lien-retour:hover { color: var(--bleu); }
.message-attention { background: var(--jaune-doux); color: var(--jaune); }
.liste-erreurs { margin: 8px 0 0; padding-left: 18px; font-weight: 500; }
.erreur { font-size: 12px; font-weight: 600; color: var(--orange-texte); }
.bouton-petit { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.bouton-plein-discret { width: 100%; min-height: 46px; background: transparent; border: 1px solid var(--champ); border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--encre-2); cursor: pointer; }
.bouton-plein-discret:hover { background: #F6F7F9; }
[data-occupe].occupe button[type="submit"], [data-occupe].occupe .action { opacity: .65; pointer-events: none; }
button.en-cours::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: tourne .7s linear infinite; flex: none;
}
button.en-cours svg { display: none; }
@keyframes tourne { to { transform: rotate(360deg); } }

.avatar-devis { background: var(--bleu-doux); color: var(--bleu); }
.liste .ligne:first-child .avatar-devis { background: var(--bleu-doux); color: var(--bleu); }
.avatar-dispo { background: var(--vert-doux) !important; color: var(--vert-texte) !important; }
.avatar-faible { background: var(--jaune-doux) !important; color: var(--jaune) !important; }
.avatar-rupture { background: var(--orange-doux) !important; color: var(--orange-texte) !important; }
.avatar-neutre { background: #F0F2F5 !important; color: var(--encre-2) !important; }

/* Mise en page du formulaire */
.devis-editeur { display: flex; flex-direction: column; gap: 18px; }
.devis-grille { display: flex; flex-direction: column; gap: 18px; }
/* Téléphone : les blocs se suivent (client, articles, détails) et le total reste en bas de l'écran. */
.devis-colonne { display: contents; }
.devis-bloc { display: flex; flex-direction: column; gap: 14px; }
.devis-etape { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; }
.devis-etape > span { width: 26px; height: 26px; border-radius: 8px; background: var(--nuit); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }

.client-choisi { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #F5F9FE; border: 1px solid #D6E4F5; animation: apparait .35s var(--courbe) both; }
.client-choisi .avatar { background: var(--bleu); color: #fff; }

/* Sélecteur avec suggestions (clients, articles) */
.selecteur { position: relative; }
.selecteur-resultats {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 360px; overflow-y: auto;
  background: #fff; border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre-haute); padding: 6px;
}
.selecteur-resultats[aria-busy="true"] { opacity: .6; }
.selecteur-option {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 12px;
  background: transparent; text-align: left; cursor: pointer; min-height: 52px;
}
.selecteur-option:hover, .selecteur-option.actif { background: var(--bleu-doux); }
.selecteur-option .ligne-texte b { font-size: 14px; }
.selecteur-option .ligne-fin b { font-size: 14px; font-weight: 600; }
.selecteur-vide { padding: 16px; text-align: center; color: var(--gris); font-size: 14px; }

/* Lignes */
.devis-lignes { display: flex; flex-direction: column; gap: 10px; }
.devis-ligne {
  display: grid; gap: 10px 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--trait); background: #fff;
  grid-template-columns: auto auto minmax(0, 1fr) 36px;
  grid-template-areas: "art art art suppr" "qte remise montant montant";
}
.devis-ligne.flash { animation: flash 1s var(--courbe); }
@keyframes flash { 0% { background: #E3F0FF; border-color: var(--ciel); } 100% { background: #fff; border-color: var(--trait); } }
.devis-ligne-article { grid-area: art; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.devis-ligne-article b { font-size: 14px; line-height: 1.3; }
.devis-ligne-article > span { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gris); flex-wrap: wrap; }
.devis-ligne-qte { grid-area: qte; display: flex; align-items: center; border: 1px solid var(--champ); border-radius: 12px; overflow: hidden; height: 42px; }
.devis-ligne-qte button { width: 38px; height: 100%; border: 0; background: #F6F7F9; color: var(--encre-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.devis-ligne-qte button:hover { background: var(--bleu-doux); color: var(--bleu); }
.devis-ligne-qte input { width: 52px; height: 100%; border: 0; text-align: center; font-family: var(--chiffres); font-size: 15px; -moz-appearance: textfield; }
.devis-ligne-qte input:focus { outline: none; background: #F5F9FE; }
.devis-ligne input::-webkit-outer-spin-button, .devis-ligne input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.devis-ligne-remise { grid-area: remise; display: flex; align-items: center; gap: 4px; height: 42px; padding: 0 10px; border: 1px solid var(--champ); border-radius: 12px; color: var(--gris); font-weight: 700; }
.devis-ligne-remise input { width: 46px; border: 0; text-align: right; font-family: var(--chiffres); font-size: 15px; background: transparent; -moz-appearance: textfield; }
.devis-ligne-remise input:focus { outline: none; }
.devis-ligne-remise:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(29, 78, 137, .12); }
.devis-ligne-remise:has(input.invalide) { border-color: var(--orange); background: var(--orange-doux); color: var(--orange-texte); }
.devis-ligne-montant { grid-area: montant; display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.devis-ligne-montant b { font-size: 16px; font-weight: 600; }
.devis-ligne-suppr { grid-area: suppr; align-self: start; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--gris-clair); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.devis-ligne-suppr:hover { background: var(--orange-doux); color: var(--orange-texte); }
.devis-vide { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px; border: 1.5px dashed var(--champ); border-radius: 16px; color: var(--gris); text-align: center; font-size: 14px; }
.devis-vide svg { color: var(--gris-clair); }

/* Total (collé en bas sur téléphone) */
.devis-total {
  position: sticky; bottom: calc(var(--nav-h) + 20px + var(--sur-bas)); z-index: 10;
  padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--ombre-haute);
}
.devis-total-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--gris); }
.devis-total-ligne b { color: var(--encre); font-weight: 600; }
.devis-total-grand span:first-child { color: var(--encre); font-weight: 800; }
.devis-total-grand b { font-size: 26px; letter-spacing: -0.04em; }
.devis-total-grand small { font-size: 13px; color: var(--gris); }
.devis-total-note { margin: 0; color: var(--gris); }
.devis-total-actions { display: flex; flex-direction: row-reverse; gap: 8px; margin-top: 4px; }
.devis-total-actions .bouton-plein { flex: 1; min-height: 50px; font-size: 15px; }
.devis-total-actions .bouton-plein-discret { width: auto; padding: 0 16px; min-height: 50px; }
.devis-total .long, .devis-total-nb, .devis-total-note { display: none; }
.devis-total { padding: 12px 14px; gap: 6px; }

/* Fiche devis */
.action-form { display: contents; }
.action-form button { font-family: inherit; cursor: pointer; }
.action-principale { background: var(--ciel); border-color: var(--ciel); color: var(--nuit); }
.action-principale:hover { background: #A3D6FF; color: var(--nuit); }
.devis-tete-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.devis-tete-titre { display: flex; align-items: center; gap: 14px; }
.devis-tete-titre > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.devis-tete h1.num { font-size: 30px; letter-spacing: -0.04em; }
.devis-tete-total { display: flex; flex-direction: column; gap: 2px; }
.devis-tete-total small { color: var(--nuit-muet); font-size: 12px; font-weight: 600; }
.devis-tete-total b { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; }
.devis-tete-total b small { font-size: 14px; }
.devis-coche { width: 56px; height: 56px; border-radius: 50%; background: var(--vert); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; animation: coche .7s var(--courbe) both; box-shadow: 0 0 0 0 rgba(46, 139, 74, .6); }
.devis-tete-cree .devis-coche { animation: coche .7s var(--courbe) both, onde 1.6s .5s ease-out 2; }
.devis-tete-cree h1 { animation: apparait .6s .25s var(--courbe) both; }
@keyframes coche { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes onde { 0% { box-shadow: 0 0 0 0 rgba(46, 139, 74, .55); } 100% { box-shadow: 0 0 0 26px rgba(46, 139, 74, 0); } }
.tableau-article { white-space: normal !important; min-width: 200px; }
.tableau-article b { display: block; font-weight: 600; }
.tableau-article span { display: block; }
@media (max-width: 639px) {
  .col-detail { display: none; }
  .tableau-article { min-width: 0; }
  .tableau th, .tableau td { padding: 12px 10px; }
}
@media (min-width: 640px) { .mobile-seul { display: none !important; } }

@media (min-width: 640px) {
  .devis-total .long { display: inline; }
  .devis-tete .action { flex: 0 1 170px; }
  .devis-ligne { grid-template-columns: minmax(0, 1fr) auto auto 120px 36px; grid-template-areas: "art qte remise montant suppr"; }
  .devis-ligne-suppr { align-self: center; }
}
@media (min-width: 992px) {
  .devis-grille { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
  .devis-colonne { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .devis-cote { position: sticky; top: 88px; }
  .devis-total { position: static; box-shadow: var(--ombre); padding: 16px; gap: 8px; }
  .devis-total-nb { display: flex; }
  .devis-total-note { display: block; }
  .devis-total-actions { flex-direction: column; }
  .devis-total-actions .bouton-plein { min-height: 52px; font-size: 16px; }
  .devis-total-actions .bouton-plein-discret { width: 100%; min-height: 46px; }
}

/* Documents Sage (v1.3) */
.documents-filtres { display: flex; flex-direction: column; gap: 10px; }
.documents-selects { display: flex; gap: 10px; flex-wrap: wrap; }
.champ-compact select { min-height: 42px; padding: 0 12px; font-size: 14px; }
.documents-resume { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--gris); margin: 0 0 8px; }
.documents-resume b { color: var(--encre); font-weight: 600; }
.filtre-actif { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--bleu-doux); color: var(--bleu); font-size: 13px; }
.filtre-actif a { display: flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; color: var(--bleu); background: #fff; }
@media (min-width: 640px) {
  .documents-filtres { flex-direction: row; align-items: center; }
  .documents-filtres .recherche { flex: 1; }
}

/* Catalogue Sage (navigation des articles) */
.catalogue { display: flex; flex-direction: column; gap: 8px; }
.catalogue-chemin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--gris); }
.catalogue-chemin a { color: var(--bleu); font-weight: 700; text-decoration: none; }
.catalogue-chemin a:hover { text-decoration: underline; }
.catalogue-chemin b { color: var(--encre); }

/* Photos des articles */
.article-vignette { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #F3F4F6; border: 1px solid var(--trait); }
.article-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos { display: flex; flex-direction: column; gap: 10px; }
.photo-grande { display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; padding: 8px; }
.photo-grande img { max-width: 100%; max-height: 360px; width: auto; height: auto; object-fit: contain; display: block; }
.photo-vignettes { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; overflow-x: auto; }
.photo-vignette { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.photo-vignette > a { position: relative; display: block; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #F3F4F6; }
.photo-vignette > a[aria-current="true"] { border-color: var(--bleu); }
.photo-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-badge { position: absolute; left: 3px; bottom: 3px; font-size: 9px; padding: 1px 5px; }
.photo-actions { display: flex; gap: 2px; }
.photo-actions form { margin: 0; }
.photo-action { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--champ); background: #fff; color: var(--encre-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.photo-action:hover { border-color: var(--bleu); color: var(--bleu); }
.photo-action-danger:hover { border-color: var(--orange); color: var(--orange-texte); }
.photo-fleche-avant { display: inline-flex; transform: rotate(180deg); }
.photo-ajout { display: flex; flex-direction: column; gap: 10px; }
.photo-ajout input[type="file"] { min-height: 0; padding: 10px; }

/* =====================================================================
   Tableau de bord, chiffre d'affaires et recouvrement (v1.5)
   ===================================================================== */
.tdb-filtres { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tdb-filtres form { margin: 0; }
.kpi b small { font-size: 14px; font-weight: 600; color: var(--gris); letter-spacing: 0; }
.kpi-alerte b small { color: var(--orange-texte); }
.tendance { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; padding: 1px 7px 1px 4px; border-radius: 999px; font-family: var(--chiffres); font-size: 12px; }
.tendance-hausse { background: var(--vert-doux); color: var(--vert-texte); }
.tendance-baisse { background: var(--orange-doux); color: var(--orange-texte); }
.texte-alerte { color: var(--orange-texte) !important; }
.negatif { color: var(--orange-texte); }

.jauge { display: block; height: 8px; border-radius: 999px; background: #EDF0F3; overflow: hidden; }
.jauge i { display: block; height: 100%; border-radius: 999px; background: var(--bleu); transition: width .8s var(--courbe); }

.grille-deux { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ligne-barre .ligne-texte { gap: 6px; }
.barre-part { display: block; height: 6px; border-radius: 999px; background: #EDF0F3; overflow: hidden; }
.barre-part i { display: block; height: 100%; border-radius: 999px; background: var(--bleu); }

/* Histogramme */
.graphique { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.graphique svg { width: 100%; height: auto; overflow: visible; }
.graphique-legende { display: flex; gap: 16px; font-size: 12px; color: var(--gris); }
.graphique-legende span { display: inline-flex; align-items: center; gap: 6px; }
.graphique-legende i { width: 10px; height: 10px; border-radius: 3px; }
.pastille-n { background: var(--bleu); }
.pastille-n1 { background: #A9CFF2; }
.graphique-grille { stroke: #EEF0F3; stroke-width: 1; }
.graphique-axe { stroke: #D5DAE0; }
.graphique-texte { font-family: var(--chiffres); font-size: 11px; fill: var(--gris); }
.graphique-courant { fill: var(--encre); font-weight: 700; }
.graphique-zone { fill: transparent; }
.graphique-n { fill: var(--bleu); }
.graphique-n1 { fill: #A9CFF2; }
.graphique-mois { outline: none; cursor: default; }
.graphique-mois:hover .graphique-zone, .graphique-mois:focus .graphique-zone { fill: #F3F6FA; }
.graphique-mois:hover .graphique-n, .graphique-mois:focus .graphique-n { fill: var(--bleu-fonce); }
.graphique-table summary { font-size: 12px; font-weight: 700; color: var(--bleu); cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
.graphique-table .tableau { margin-top: 6px; }

/* Recouvrement */
.indisponible { display: flex; gap: 12px; align-items: flex-start; }
.indisponible svg { flex: none; margin-top: 1px; }
.indisponible p { margin: 4px 0 0; font-weight: 500; }
.tranches { display: flex; flex-direction: column; gap: 10px; }
.tranche { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13px; }
.tranche > span:first-child { color: var(--gris); font-weight: 600; }
.tranche .barre-part { height: 10px; }
.tranche .barre-part i { background: #E9A23B; }
.tranche-grave .barre-part i { background: var(--orange); }
.tranche b { font-weight: 600; min-width: 96px; text-align: right; }
.chiffre small { display: block; }

/* Tableaux CA par client et objectifs */
.tableau-ca td, .tableau-ca th { padding: 10px 10px; }
.tableau-ca td.muet { color: var(--gris-clair); }
.tableau-ca .tableau-article a { color: var(--encre); text-decoration: none; }
.tableau-ca .tableau-article a:hover { color: var(--bleu); }
.tableau-ca th:first-child, .tableau-ca td:first-child, .tableau-objectifs td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.tableau-objectifs td { padding: 6px 4px; }
.tableau-objectifs input { width: 92px; min-height: 40px; border-radius: 10px; border: 1px solid var(--champ); padding: 0 8px; text-align: right; font-family: var(--chiffres); font-size: 14px; }
.tableau-objectifs input:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(29, 78, 137, .12); }
.option-ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.option-ligne > span { display: flex; flex-direction: column; gap: 2px; }

@media (max-width: 639px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 24px; }
  .raccourci { min-height: 64px; padding: 12px; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; }
  .raccourci .kpi-icone { width: 34px; height: 34px; }
  .raccourci small { font-size: 11px; }
  .chiffres3 { gap: 8px; }
  .chiffre { padding: 12px 10px; }
  .chiffre b { font-size: 15px; letter-spacing: -0.05em; overflow-wrap: anywhere; }
  .graphique-texte { font-size: 17px; }
  .graphique-mois text:not(.graphique-courant) { letter-spacing: -0.06em; }
  .nav a { font-size: 9.5px; }
}
@media (min-width: 992px) {
  .grille-deux { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
}

/* Panier (v1.5) */
.bouton-panier { position: relative; padding: 0 10px; }
.bouton-panier span { display: none; }
.badge-panier {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff;
}
.badge-lateral { position: static; margin-left: auto; box-shadow: none; }
.badge-panier.rebond { animation: rebond .45s var(--courbe); }
@keyframes rebond { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.ajout-panier { margin: 0; }
.actions .ajout-panier { display: contents; }
.ajout-panier button { cursor: pointer; font-family: inherit; }
.ajout-panier button.ajoute:not(.action) { border-color: var(--vert); color: var(--vert-texte); background: var(--vert-doux); }
.panier-ligne { grid-template-areas: "art art art suppr" "qte qte montant montant"; }
.panier-total { margin-top: 14px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 28px + var(--sur-bas)); z-index: 50;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--nuit); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); animation: apparait .3s var(--courbe) both;
}
.toast-erreur { background: var(--orange-texte); }
@media (min-width: 640px) {
  .panier-ligne { grid-template-columns: minmax(0, 1fr) auto 140px 36px; grid-template-areas: "art qte montant suppr"; }
}
@media (min-width: 992px) {
  .toast { bottom: 28px; }
  .panier-form { max-width: 900px; }
}
@media (max-width: 639px) {
  .entete .avatar-rond { display: none; }
}
.alerte-lien { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.alerte-lien > span { flex: 1; }
.alerte-lien:hover { color: var(--jaune); filter: brightness(.98); }
.panier-client { margin-bottom: 4px; }
.panier-client .client-choisi { margin: 0; }
.panier-client .client-choisi form { margin: 0 0 0 auto; }

/* Droits sur les articles (administration) */
.droits-bloc { border: 1px solid var(--trait); border-radius: 14px; padding: 4px 14px; }
.droits-bloc summary { min-height: 46px; display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.droits-bloc[open] { padding-bottom: 14px; }
.droits-catalogue { display: flex; flex-direction: column; gap: 6px; }
.droits-sous { padding-left: 30px; }
.tableau-droits td, .tableau-droits th { padding: 8px 10px; }
.tableau-droits input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--bleu); }
.tableau-droits input[type="number"] { width: 90px; min-height: 38px; border-radius: 10px; border: 1px solid var(--champ); padding: 0 8px; text-align: right; font-family: var(--chiffres); }
