/* ══════════════════════════════════════════════════════════════════════════
   EasySugu — Système de design
   « Chaque vente compte. Chaque bénéfice se voit. »
   Vert émeraude & or, fond crème, typographie Fira Sans. Mobile-first.
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── Police (servie localement) ─────────────────────────────────────────── */
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-400-normal.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: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-ext-400-normal.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: 'Fira Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-500-normal.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: 'Fira Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-ext-500-normal.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: 'Fira Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-600-normal.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: 'Fira Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-ext-600-normal.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: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-700-normal.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: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-ext-700-normal.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: 'Fira Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-ext-800-normal.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: 'Fira Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../vendor/fira-sans/fira-sans-latin-800-normal.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; }
/* Arabe (Cairo) : téléchargé uniquement si des caractères arabes sont affichés */
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/cairo/cairo-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/cairo/cairo-arabic-500-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/cairo/cairo-arabic-600-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/cairo/cairo-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 800; font-display: swap; src: url('../vendor/cairo/cairo-arabic-800-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

/* ─── Jetons ─────────────────────────────────────────────────────────────── */
:root {
  --es-green-950: #022419;
  --es-green-900: #03301f;
  --es-green-800: #063c2b;
  --es-green-700: #0a4a34;
  --es-green-600: #0b5a40;
  --es-green-500: #0f6b4c;
  --es-green-400: #1d885f;
  --es-green-300: #5fb38c;
  --es-green-200: #bfe3cf;
  --es-green-100: #e4f3ea;
  --es-green-50:  #f1f8f3;

  --es-gold-700: #a76d08;
  --es-gold-600: #c9921f;
  --es-gold-500: #dba12d;
  --es-gold-400: #ebc57a;
  --es-gold-200: #f6dfad;
  --es-gold-100: #fdf3de;
  --es-gold-50:  #fffaf0;

  --es-cream:   #faf8f1;
  --es-cream-2: #f4f0e4;
  --es-paper:   #ffffff;
  --es-ink:     #0b231e;
  --es-ink-2:   #2b3d38;
  --es-muted:   #5e6b73;
  --es-muted-2: #8a959b;
  --es-border:  #e9e4d6;
  --es-border-2:#efebe0;

  --es-red: #e0302e;   --es-red-100: #fdeceb;  --es-red-50: #fff5f5;
  --es-blue: #2f5fd0;  --es-blue-100: #e9f0fd;
  --es-purple: #7b4fe0;--es-purple-100: #f1ebfd;
  --es-orange: #ea7a1a;--es-orange-100: #fff1e3;
  --es-teal: #0f9b8e;  --es-teal-100: #e2f6f3;
  --es-rose: #e2557a;  --es-rose-100: #fde9ef;

  /* Tonalité des titres (écrans « encre » par défaut) */
  --es-title: #0b231e;
  --es-subtitle: #5e6b73;
  --es-head-name: #182a27;
  --es-head-sub: #6f7a80;

  --es-radius-sm: 10px;
  --es-radius: 14px;
  --es-radius-lg: 18px;
  --es-shadow-xs: 0 1px 2px rgba(11, 35, 30, .05);
  --es-shadow-sm: 0 2px 8px rgba(11, 35, 30, .06);
  --es-shadow: 0 8px 24px rgba(11, 35, 30, .08);
  --es-shadow-lg: 0 18px 48px rgba(3, 48, 31, .16);
  --es-sidebar-w: 252px;
  --es-topbar-h: 76px;
  --es-font: 'Fira Sans', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --es-ease: cubic-bezier(.2, .8, .2, 1);

  --bs-body-font-family: var(--es-font);
  --bs-body-color: var(--es-ink);
  --bs-body-bg: var(--es-cream);
  --bs-border-color: var(--es-border);
  --bs-link-color: var(--es-green-600);
  --bs-link-hover-color: var(--es-green-800);
  --bs-primary: #0b5a40;
  --bs-primary-rgb: 11, 90, 64;
  --bs-success: #0f6b4c;
  --bs-danger: #e0302e;
  --bs-warning: #dba12d;
  --bs-focus-ring-color: rgba(11, 90, 64, .25);
}
body.tone-navy {
  --es-title: #101a7a;
  --es-subtitle: #3a5fcc;
  --es-head-name: #101a7a;
  --es-head-sub: #3a6fe0;
}

/* ─── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--es-font);
  background: var(--es-cream);
  color: var(--es-ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 0;
}
h1, h2, h3, h4, h5, h6 { color: var(--es-title); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--es-green-600); text-decoration: none; }
a:hover { color: var(--es-green-800); }
.num, .amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-muted, .es-muted { color: var(--es-muted) !important; }
.text-ink { color: var(--es-ink) !important; }
.text-green { color: var(--es-green-600) !important; }
.text-gold { color: var(--es-gold-600) !important; }
.text-red, .text-danger { color: var(--es-red) !important; }
.text-blue { color: var(--es-blue) !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-800 { font-weight: 800 !important; }
.small-2 { font-size: .8rem; }
.visually-hidden-focusable:focus { position: fixed; top: 8px; left: 8px; z-index: 3000; background: #fff; padding: 8px 14px; border-radius: 8px; box-shadow: var(--es-shadow); }
:focus-visible { outline: 3px solid rgba(219, 161, 45, .55); outline-offset: 2px; }
::selection { background: var(--es-gold-200); color: var(--es-ink); }
img { max-width: 100%; }
hr { border-color: var(--es-border); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   COQUILLE DE L'APPLICATION
   ══════════════════════════════════════════════════════════════════════════ */
.es-app { min-height: 100vh; display: flex; }

/* ─── Barre latérale ─────────────────────────────────────────────────────── */
.es-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1040;
  width: var(--es-sidebar-w);
  display: flex; flex-direction: column;
  color: #e9f3ee;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(29, 136, 95, .35) 0%, rgba(29, 136, 95, 0) 60%),
    linear-gradient(180deg, #0a4a34 0%, #063c2b 38%, #032e20 100%);
  box-shadow: 4px 0 24px rgba(2, 36, 25, .18);
  overflow: hidden;
}
.es-sidebar::after { /* liseré or */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(235, 197, 122, 0) 0%, rgba(235, 197, 122, .45) 30%, rgba(235, 197, 122, .1) 100%);
}
.es-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 18px 4px 14px;
}
.es-brand-plate {
  display: flex; align-items: center; justify-content: center; width: 100%;
  padding: 12px 14px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf7 0%, #f6f0df 100%);
  box-shadow: 0 10px 24px rgba(1, 25, 17, .35), inset 0 0 0 1px rgba(219, 161, 45, .35);
  transition: transform .25s var(--es-ease);
}
.es-brand-plate:hover { transform: translateY(-1px); }
.es-brand-plate img { width: 100%; max-width: 196px; height: auto; display: block; }

.es-nav { flex: 1 1 auto; overflow-y: auto; padding: 6px 4px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; position: relative; z-index: 2; }
.es-nav::-webkit-scrollbar { width: 6px; }
.es-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 6px; }
.es-nav-section { margin: 14px 10px 6px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(235, 197, 122, .8); font-weight: 600; }
.es-nav-sep { height: 1px; margin: 10px 8px; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.14), rgba(255,255,255,0)); }
.es-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 2px 0;
  border-radius: 8px;
  color: #e7f2ec; font-weight: 500; font-size: .97rem;
  position: relative;
  transition: background .2s var(--es-ease), color .2s, transform .2s var(--es-ease);
}
.es-nav-link .bi { font-size: 1.22rem; width: 24px; text-align: center; opacity: .95; }
.es-nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.es-nav-link.active {
  background: linear-gradient(90deg, rgba(29, 136, 95, .55), rgba(29, 136, 95, .28));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 6px 16px rgba(0, 0, 0, .12);
}
.es-nav-link.active::before {
  content: ""; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--es-gold-400), var(--es-gold-600));
}
.es-nav-link .chev { margin-left: auto; font-size: .8rem; transition: transform .2s; opacity: .8; }
.es-nav-group.open > .es-nav-link .chev { transform: rotate(180deg); }
.es-subnav { display: none; padding: 2px 0 4px 18px; }
.es-nav-group.open > .es-subnav { display: block; }
.es-subnav .es-nav-link { padding: 7px 12px; font-size: .9rem; font-weight: 500; }
.es-subnav .es-nav-link .bi { font-size: 1rem; width: 20px; }
.es-subnav .es-nav-link.active { background: rgba(29, 136, 95, .45); }
.es-subnav .es-nav-link.active::before { left: -22px; }
.es-nav-settings .es-nav-link { font-size: .9rem; padding: 8px 12px; }
.es-nav-settings .es-nav-link .bi { font-size: 1.05rem; }
.es-nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--es-gold-500); color: var(--es-green-950); font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.es-sidebar-art {
  position: relative; flex: 0 0 auto; height: 230px; margin-top: auto;
  background: url('../img/illustrations/market-sidebar.jpg') center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
  pointer-events: none;
}
.es-sidebar-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,46,32,.15), rgba(3,46,32,.05)); }
@media (max-height: 820px) { .es-sidebar-art { height: 150px; } }
@media (max-height: 700px) { .es-sidebar-art { display: none; } }

/* ─── Zone principale ────────────────────────────────────────────────────── */
.es-main { flex: 1 1 auto; min-width: 0; margin-left: var(--es-sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }

/* ─── Barre supérieure (en-tête premium) ─────────────────────────────────── */
.es-topbar {
  position: sticky; top: 0; z-index: 1030;
  height: var(--es-topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 4px;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
          backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--es-border-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 6px 18px rgba(11, 35, 30, .04);
}
.es-topbar::after { /* fil d'or subtil */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--es-green-600) 0%, var(--es-gold-500) 50%, transparent 100%);
  opacity: .22;
}
.es-burger { display: none; border: 0; background: transparent; font-size: 1.6rem; color: var(--es-ink); padding: 4px 6px; border-radius: 10px; }
.es-burger:hover { background: var(--es-cream-2); }
.es-topbar-logo { display: none; }
.es-topbar-logo img { height: 34px; width: auto; }

.es-shop-switch { display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border-radius: 14px; border: 1px solid transparent; background: transparent; text-align: left; transition: background .2s, border-color .2s; }
.es-shop-switch:hover, .es-shop-switch[aria-expanded="true"] { background: var(--es-gold-50); border-color: var(--es-gold-200); }
.es-shop-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #fff1d6, #fde3b0); color: #c8611b; font-size: 1.3rem; box-shadow: inset 0 0 0 1px rgba(219, 161, 45, .35); flex: 0 0 auto; }
.es-shop-name { font-weight: 700; font-size: 1.05rem; color: var(--es-head-name); line-height: 1.15; display: flex; align-items: center; gap: 6px; }
.es-shop-city { font-size: .84rem; color: var(--es-head-sub); }

.es-topbar-search { flex: 1 1 auto; max-width: 420px; margin-left: 10px; position: relative; }
.es-topbar-search .form-control { height: 42px; padding-left: 40px; padding-right: 64px; border-radius: 12px; background: var(--es-cream); border-color: var(--es-border-2); font-size: .92rem; }
.es-topbar-search .form-control:focus { background: #fff; }
.es-topbar-search > .bi-search { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--es-muted); }
.es-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: .7rem; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--es-border); background: #fff; color: var(--es-muted); font-weight: 600; }

.es-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.es-topbar-divider { width: 1px; height: 34px; background: var(--es-border); margin: 0 10px; }
.es-date-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; color: var(--es-head-name); border: 1px solid transparent; background: transparent; }
.es-date-chip .bi { font-size: 1.25rem; color: var(--es-head-name); opacity: .8; }
.es-date-chip .lbl { font-weight: 600; font-size: .9rem; line-height: 1.15; display: block; color: var(--es-head-name); }
.es-date-chip .sub { font-size: .8rem; color: var(--es-head-sub); display: block; }
button.es-date-chip:hover { background: var(--es-cream); border-color: var(--es-border-2); }
.es-icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; background: transparent; color: var(--es-ink-2); font-size: 1.35rem; transition: background .2s; }
.es-icon-btn:hover { background: var(--es-cream-2); color: var(--es-ink); }
.es-badge-dot { position: absolute; top: 4px; right: 3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--es-red); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.es-net { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; background: var(--es-green-50); color: var(--es-green-600); border: 1px solid var(--es-green-100); }
.es-net .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--es-green-400); box-shadow: 0 0 0 3px rgba(29,136,95,.18); }
.es-net.offline { background: var(--es-red-50); color: var(--es-red); border-color: var(--es-red-100); }
.es-net.offline .dot { background: var(--es-red); box-shadow: 0 0 0 3px rgba(224,48,46,.15); }
.es-net.pending { background: var(--es-gold-50); color: var(--es-gold-700); border-color: var(--es-gold-200); }
.es-net.pending .dot { background: var(--es-gold-500); }
.es-user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 28px; border: 0; background: transparent; font-weight: 600; color: var(--es-head-name); }
.es-user-btn:hover, .es-user-btn[aria-expanded="true"] { background: var(--es-cream-2); }
.es-quick-sale { white-space: nowrap; }

/* Menus déroulants */
.dropdown-menu { border: 1px solid var(--es-border-2); border-radius: 14px; box-shadow: var(--es-shadow-lg); padding: 8px; font-size: .93rem; }
.dropdown-item { border-radius: 9px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; color: var(--es-ink-2); }
.dropdown-item .bi { color: var(--es-muted); font-size: 1.05rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--es-green-50); color: var(--es-green-700); }
.dropdown-item:hover .bi { color: var(--es-green-600); }
.dropdown-item.active, .dropdown-item:active { background: var(--es-green-600); color: #fff; }
.dropdown-item.active .bi { color: #fff; }
.dropdown-header { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--es-muted-2); font-weight: 600; }
.es-user-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; border-bottom: 1px solid var(--es-border-2); margin-bottom: 6px; }
.es-notif-menu { width: 370px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.es-notif-menu .head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--es-border-2); background: linear-gradient(180deg, #fff, var(--es-cream)); }
.es-notif-menu .list { max-height: 380px; overflow-y: auto; }
.es-notif-menu .foot { padding: 10px; border-top: 1px solid var(--es-border-2); text-align: center; }

/* ─── Contenu ────────────────────────────────────────────────────────────── */
/* Pleine largeur sur toutes les pages : marges latérales fluides, aucun vide à gauche/droite */
.es-content { flex: 1 1 auto; min-width: 0; padding: 20px 4px 30px; width: 100%; max-width: none; margin: 0; }
.es-content.narrow { max-width: none; } /* formulaires aussi en pleine largeur (option conservée pour compatibilité) */

/* ─── Pied de page premium ───────────────────────────────────────────────── */
.es-footer { position: relative; margin-top: auto; background: linear-gradient(180deg, rgba(255,255,255,.65), #fff); border-top: 1px solid var(--es-border-2); }
.es-footer::before { /* liseré tricolore Mali, discret */
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #14b53a 0 33.33%, #fcd116 33.33% 66.66%, #ce1126 66.66% 100%);
  opacity: .55;
}
.es-footer-inner { max-width: none; margin: 0 auto; padding: 18px 4px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.es-footer-brand { display: flex; align-items: center; gap: 12px; }
.es-footer-brand img { height: 34px; width: auto; }
.es-footer-brand .slogan { font-size: .82rem; color: var(--es-muted); font-style: italic; line-height: 1.25; }
.es-footer-brand .slogan strong { color: var(--es-green-600); font-style: normal; font-weight: 700; }
.es-footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; }
.es-footer-links a, .es-footer-links button { color: var(--es-muted); background: none; border: 0; padding: 0; display: inline-flex; gap: 6px; align-items: center; }
.es-footer-links a:hover, .es-footer-links button:hover { color: var(--es-green-600); }
.es-footer-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--es-muted-2); }
.es-made-in { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; background: var(--es-cream); border: 1px solid var(--es-border-2); color: var(--es-ink-2); font-weight: 600; }
.es-flag-ml { display: inline-flex; width: 18px; height: 12px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.es-flag-ml i { flex: 1; }
.es-flag-ml i:nth-child(1) { background: #14b53a; } .es-flag-ml i:nth-child(2) { background: #fcd116; } .es-flag-ml i:nth-child(3) { background: #ce1126; }

/* ─── Navigation mobile (barre inférieure) ───────────────────────────────── */
.es-bottom-nav { display: none; }

/* ══════════════════════════════════════════════════════════════════════════
   COMPOSANTS
   ══════════════════════════════════════════════════════════════════════════ */

/* En-tête de page */
.page-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .titles { flex: 1 1 380px; min-width: 0; }
.page-title { font-size: 2.35rem; font-weight: 700; line-height: 1.08; margin: 0; color: var(--es-title); letter-spacing: -.02em; display: flex; align-items: center; gap: 14px; }
.page-title .title-icon { font-size: 2.2rem; color: var(--es-title); }
.page-title .title-icon-img { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; }
.page-sub { margin: 6px 0 0; font-size: 1.12rem; color: var(--es-subtitle); }
.page-sub strong { color: var(--es-title); }
.page-greet { font-size: 1.55rem; font-weight: 600; color: var(--es-title); margin: 10px 0 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.es-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--es-muted); margin-bottom: 4px; flex-wrap: wrap; }
.es-breadcrumb a { color: var(--es-muted); }
.es-breadcrumb a:hover { color: var(--es-green-600); }
.es-breadcrumb .bi { font-size: .7rem; opacity: .7; }
.es-breadcrumb .current { color: var(--es-ink-2); font-weight: 500; }
.es-back { display: inline-flex; align-items: center; gap: 8px; color: var(--es-ink-2); font-weight: 500; }

/* Cartes */
.es-card { background: var(--es-paper); border: 1px solid var(--es-border-2); border-radius: var(--es-radius-lg); box-shadow: var(--es-shadow-xs); }
.es-card-body { padding: 20px 22px; }
.es-card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 6px; }
.es-card-head h2, .es-card-head h3, .es-card-title { font-size: 1.18rem; margin: 0; font-weight: 600; color: var(--es-title); display: flex; align-items: center; gap: 10px; }
.es-card-head .es-card-link { margin-left: auto; font-size: .92rem; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.es-card-head .icon-sq { width: 40px; height: 40px; }
.es-card-head.tinted { background: linear-gradient(180deg, var(--es-gold-50), rgba(255,255,255,0)); border-radius: var(--es-radius-lg) var(--es-radius-lg) 0 0; padding-bottom: 14px; }
.es-card.tint-green { background: linear-gradient(180deg, #f3faf6, #fff); border-color: #d9eee2; }
.es-card.tint-gold { background: linear-gradient(180deg, var(--es-gold-50), #fff); border-color: var(--es-gold-200); }
.es-card.soft-green { background: var(--es-green-50); border-color: #d6ecdf; }
.es-card.soft-gold { background: var(--es-gold-50); border-color: var(--es-gold-200); }
.es-card.soft-red { background: var(--es-red-50); border-color: #f8d6d4; }
.es-card.soft-blue { background: #f4f7fe; border-color: #dfe7fb; }
.es-card-hover { transition: transform .2s var(--es-ease), box-shadow .2s var(--es-ease); }
.es-card-hover:hover { transform: translateY(-2px); box-shadow: var(--es-shadow); }
a.es-card { color: inherit; display: block; }
a.es-card.kpi, .es-card.kpi { display: flex; }

/* Icônes en pastilles */
.icon-circle, .icon-sq { flex: 0 0 auto; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 1.45rem; }
.icon-sq { border-radius: 14px; }
.icon-sm { width: 38px; height: 38px; font-size: 1.1rem; }
.icon-xs { width: 30px; height: 30px; font-size: .95rem; }
.icon-lg { width: 62px; height: 62px; font-size: 1.75rem; }
.tone-green { background: var(--es-green-100); color: var(--es-green-600); }
.tone-green-solid { background: var(--es-green-600); color: #fff; }
.tone-gold { background: var(--es-gold-100); color: var(--es-gold-600); }
.tone-gold-solid { background: linear-gradient(145deg, var(--es-gold-400), var(--es-gold-600)); color: #fff; }
.tone-red { background: var(--es-red-100); color: var(--es-red); }
.tone-red-solid { background: var(--es-red); color: #fff; }
.tone-blue { background: var(--es-blue-100); color: var(--es-blue); }
.tone-blue-solid { background: #1f3fa8; color: #fff; }
.tone-purple { background: var(--es-purple-100); color: var(--es-purple); }
.tone-orange { background: var(--es-orange-100); color: var(--es-orange); }
.tone-teal { background: var(--es-teal-100); color: var(--es-teal); }
.tone-rose { background: var(--es-rose-100); color: var(--es-rose); }
.tone-gray { background: #eef0f0; color: #5f6b6a; }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; height: 100%; position: relative; }
.kpi-row { display: flex; align-items: center; gap: 14px; }
.kpi-label { color: var(--es-ink-2); font-size: 1rem; font-weight: 500; }
.kpi-value { font-size: 1.9rem; font-weight: 700; color: var(--es-ink); line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.kpi-value.sm { font-size: 1.45rem; }
.kpi-sub { font-size: .85rem; color: var(--es-muted); }
.kpi-trend { font-size: .86rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kpi-trend.up { color: var(--es-green-500); }
.kpi-trend.down { color: var(--es-red); }
.kpi-trend.flat { color: var(--es-muted); }
.kpi .kpi-go { position: absolute; top: 18px; right: 16px; color: var(--es-ink-2); font-size: 1rem; }
.kpi-tile { border-radius: var(--es-radius-lg); border: 1px solid var(--es-border-2); background: #fff; }
.kpi-tile.green { background: linear-gradient(160deg, #eef8f2 0%, #f8fcf9 100%); border-color: #d9eee2; }
.kpi-tile.gold { background: linear-gradient(160deg, #fdf3de 0%, #fffaf1 100%); border-color: #f4e2b9; }
.kpi-tile.blue { background: linear-gradient(160deg, #ecf2fd 0%, #f8faff 100%); border-color: #dde6fa; }
.kpi-tile.red { background: linear-gradient(160deg, #fdecec 0%, #fff8f8 100%); border-color: #f7d7d6; }
.kpi-tile.purple { background: linear-gradient(160deg, #f2ecfd 0%, #fbf9ff 100%); border-color: #e5dbfb; }
.kpi-tile.white { background: #fff; }

/* Boutons */
.btn { font-weight: 600; border-radius: 12px; padding: .62rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all .18s var(--es-ease); }
.btn .bi { font-size: 1.08em; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.08rem; border-radius: 14px; }
.btn-sm { padding: .38rem .8rem; font-size: .86rem; border-radius: 9px; }
.btn-es { background: linear-gradient(180deg, #0d6046 0%, #0a5038 100%); color: #fff; border: 1px solid #08452f; box-shadow: 0 6px 14px rgba(11, 90, 64, .22), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-es:hover, .btn-es:focus { background: linear-gradient(180deg, #0f6b4c 0%, #08452f 100%); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 20px rgba(11, 90, 64, .28); }
.btn-es:active { transform: translateY(0); }
.btn-es .go { margin-left: auto; padding-left: 10px; }
.btn-gold { background: linear-gradient(180deg, #e3ad3c, #cf9420); color: #fff; border: 1px solid #c08619; box-shadow: 0 6px 14px rgba(201, 146, 31, .25); }
.btn-gold:hover { color: #fff; background: linear-gradient(180deg, #e8b54a, #c98d19); transform: translateY(-1px); }
.btn-gold-outline { background: #fffdf8; color: var(--es-gold-700); border: 1.5px solid var(--es-gold-400); }
.btn-gold-outline:hover { background: var(--es-gold-50); color: var(--es-gold-700); border-color: var(--es-gold-500); }
.btn-gold-outline .bi { color: var(--es-gold-600); }
.btn-outline-es { background: #fff; color: var(--es-green-700); border: 1.5px solid var(--es-green-600); }
.btn-outline-es:hover { background: var(--es-green-50); color: var(--es-green-800); border-color: var(--es-green-700); }
.btn-soft-green { background: #d7f1e1; color: var(--es-green-700); border: 1px solid #c3e8d2; }
.btn-soft-green:hover { background: #c6ebd5; color: var(--es-green-800); }
.btn-white { background: #fff; color: var(--es-ink-2); border: 1px solid var(--es-border); }
.btn-white:hover { background: var(--es-cream); color: var(--es-ink); border-color: #d9d3c2; }
.btn-outline-danger { color: var(--es-red); border: 1.5px solid #f0a9a7; background: #fff; }
.btn-outline-danger:hover { background: var(--es-red-50); color: var(--es-red); border-color: var(--es-red); }
.btn-soft-danger { background: var(--es-red-50); color: var(--es-red); border: 1.5px solid #f2b9b7; }
.btn-soft-danger:hover { background: var(--es-red-100); color: #b91c1a; }
.btn-whatsapp { background: #fff; color: var(--es-green-700); border: 1.5px solid var(--es-green-600); }
.btn-whatsapp .bi-whatsapp { color: #25a35a; font-size: 1.25em; }
.btn-whatsapp:hover { background: var(--es-green-50); color: var(--es-green-800); }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn-icon.sm { width: 32px; height: 32px; border-radius: 8px; }
.btn[disabled], .btn.disabled { opacity: .55; transform: none !important; box-shadow: none !important; }
.btn.is-loading { pointer-events: none; position: relative; color: transparent !important; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff; animation: es-spin .7s linear infinite; }
.btn-white.is-loading::after, .btn-outline-es.is-loading::after { border-color: rgba(11,90,64,.25); border-top-color: var(--es-green-600); }
@keyframes es-spin { to { transform: rotate(360deg); } }
.btn-cta { justify-content: flex-start; padding: .95rem 1.4rem; font-size: 1.12rem; border-radius: 12px; }
.btn-cta .bi:first-child { font-size: 1.5rem; margin-right: 14px; }

/* Formulaires */
.form-label { font-weight: 500; color: var(--es-ink-2); margin-bottom: 6px; font-size: .95rem; }
.form-label .req { color: var(--es-red); }
.form-label .opt { color: var(--es-blue); font-weight: 400; }
.form-control, .form-select { border-radius: 10px; border: 1px solid #dcd7c9; min-height: 46px; font-size: .98rem; color: var(--es-ink); background-color: #fff; transition: border-color .15s, box-shadow .15s; }
.form-control::placeholder { color: #9aa4a8; }
.form-control:focus, .form-select:focus { border-color: var(--es-green-400); box-shadow: 0 0 0 4px rgba(29, 136, 95, .14); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--es-red); background-image: none; padding-right: .75rem; }
.invalid-feedback { font-size: .84rem; color: var(--es-red); display: block; }
textarea.form-control { min-height: 92px; resize: vertical; }
.form-control-lg { min-height: 56px; font-size: 1.08rem; border-radius: 12px; }
.input-group > .form-control, .input-group > .form-select { min-height: 46px; }
.input-group-text { background: #f6f4ee; border-color: #dcd7c9; color: var(--es-muted); font-size: .9rem; border-radius: 10px; min-width: 52px; justify-content: center; }
.input-group .input-group-text.plain { background: #fff; }
.input-icon { position: relative; }
.input-icon > .bi:first-child { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--es-muted); font-size: 1.1rem; pointer-events: none; z-index: 5; }
.input-icon > .form-control, .input-icon > .form-select { padding-left: 44px; }
.input-icon .toggle-pass { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--es-muted); font-size: 1.15rem; padding: 6px 8px; border-radius: 8px; z-index: 5; }
.input-icon .toggle-pass:hover { color: var(--es-green-600); background: var(--es-green-50); }
.form-check-input { width: 1.25em; height: 1.25em; border-color: #c7c2b3; }
.form-check-input:checked { background-color: var(--es-green-600); border-color: var(--es-green-600); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(29, 136, 95, .14); border-color: var(--es-green-400); }
.form-switch .form-check-input { width: 3.1em; height: 1.65em; cursor: pointer; background-color: #e4e4e2; border-color: #d6d6d2; }
.form-switch .form-check-input:checked { background-color: var(--es-green-600); border-color: var(--es-green-600); }
.form-hint { font-size: .82rem; color: var(--es-muted); margin-top: 4px; }
.char-count { font-size: .8rem; color: var(--es-muted); text-align: right; margin-top: 4px; }
.phone-group { display: flex; gap: 10px; }
.phone-group .cc { flex: 0 0 132px; }
.money-input { font-variant-numeric: tabular-nums; }

/* Cartes de choix (radio) */
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--es-border); border-radius: 12px; background: #fff; cursor: pointer; transition: all .15s; min-height: 56px; }
.choice:hover { border-color: var(--es-green-300); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .radio { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c3c8c6; flex: 0 0 auto; position: relative; transition: all .15s; }
.choice input:checked ~ .radio { border-color: var(--es-green-600); }
.choice input:checked ~ .radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--es-green-600); }
.choice:has(input:checked) { border-color: var(--es-green-600); background: #f1f9f4; box-shadow: 0 0 0 3px rgba(29,136,95,.08); }
.choice:has(input:focus-visible) { outline: 3px solid rgba(219,161,45,.55); outline-offset: 2px; }
.choice .ttl { font-weight: 600; color: var(--es-ink); line-height: 1.2; }
.choice .dsc { font-size: .82rem; color: var(--es-muted); }
.choice.vertical { flex-direction: column; align-items: flex-start; }
.choice.vertical .radio { position: absolute; top: 12px; right: 12px; }
.choice.danger:has(input:checked) { border-color: var(--es-red); background: var(--es-red-50); }
.choice.danger input:checked ~ .radio { border-color: var(--es-red); }
.choice.danger input:checked ~ .radio::after { background: var(--es-red); }
.pay-logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto; }
.pay-cash { background: #e1f3e8; color: #138a4e; }
.pay-orange { background: #fff0e2; color: #ff6a00; }
.pay-wave { background: #e3f3ff; color: #1b8fe0; }
.pay-moov { background: #fde8ef; color: #e0285a; }
.pay-bank { background: var(--es-purple-100); color: var(--es-purple); }
.pay-credit { background: var(--es-gold-100); color: var(--es-gold-600); }

/* Pastilles de statut */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 8px; font-size: .82rem; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.pill .bi { font-size: .9em; }
.pill-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-green { background: #dff3e6; color: #12804c; }
.pill-gold { background: #fdeccb; color: #b06b00; }
.pill-red { background: #fde3e2; color: #d42a27; }
.pill-blue { background: #e4ecfd; color: #2554c7; }
.pill-purple { background: #efe7fd; color: #6a3fd1; }
.pill-gray { background: #eceeed; color: #5b6665; }
.pill-orange { background: #ffeedd; color: #d06410; }
.pill-outline { background: #fff; border: 1px solid var(--es-border); color: var(--es-ink-2); }
.pill-lg { padding: 6px 14px; font-size: .9rem; border-radius: 10px; }

/* Tableaux */
.es-table-wrap { border-radius: var(--es-radius); overflow: hidden; border: 1px solid var(--es-border-2); background: #fff; }
.es-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.es-table thead th { background: #f7f5ee; color: var(--es-ink-2); font-weight: 600; font-size: .86rem; padding: 12px 14px; border-bottom: 1px solid var(--es-border-2); white-space: nowrap; vertical-align: middle; }
.es-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--es-border-2); vertical-align: middle; color: var(--es-ink); }
.es-table tbody tr:last-child td { border-bottom: 0; }
.es-table tbody tr { transition: background .12s; }
.es-table tbody tr:hover { background: #fbfaf5; }
.es-table tbody tr.is-selected { background: #fff7e6; box-shadow: inset 3px 0 0 var(--es-gold-500); }
.es-table tbody tr.row-green { background: #f2faf5; }
.es-table tbody tr.row-red { background: #fff4f4; }
.es-table tbody tr[data-href] { cursor: pointer; }
.es-table tfoot td { padding: 12px 14px; font-weight: 700; background: var(--es-green-50); }
.es-table .ref { font-weight: 700; color: var(--es-ink); }
.es-table .td-actions { text-align: right; white-space: nowrap; }
.th-sort { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.th-sort:hover { color: var(--es-green-600); }

/* Liste mobile (remplace les tableaux sous 768 px) */
.m-list { display: none; }
.m-item { display: flex; gap: 12px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--es-border-2); border-radius: 14px; margin-bottom: 10px; color: inherit; }
.m-item:hover { color: inherit; border-color: var(--es-green-200); }
.m-item .grow { flex: 1 1 auto; min-width: 0; }
.m-item .t { font-weight: 700; }
.m-item .s { font-size: .84rem; color: var(--es-muted); }

/* Pagination */
.es-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 0; flex-wrap: wrap; }
.es-pager .info { font-size: .88rem; color: var(--es-muted); }
.es-pages { display: flex; gap: 6px; }
.es-pages a, .es-pages span { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--es-border); background: #fff; color: var(--es-ink-2); font-size: .9rem; padding: 0 6px; }
.es-pages a:hover { border-color: var(--es-green-400); color: var(--es-green-600); }
.es-pages .active { background: var(--es-green-600); color: #fff; border-color: var(--es-green-600); font-weight: 700; }
.es-pages .disabled { opacity: .45; }

/* Filtres */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar .form-select, .filter-bar .form-control { min-height: 44px; font-size: .9rem; }
.filter-bar .grow { flex: 1 1 220px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-field > label { font-size: .84rem; color: var(--es-ink-2); font-weight: 500; }

/* Onglets */
.es-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--es-border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.es-tabs::-webkit-scrollbar { display: none; }
.es-tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; color: var(--es-muted); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; }
.es-tab:hover { color: var(--es-green-600); }
.es-tab.active { color: var(--es-title); font-weight: 600; border-bottom-color: var(--es-green-600); }
.es-seg { display: inline-flex; padding: 4px; gap: 4px; background: #fff; border: 1px solid var(--es-border); border-radius: 14px; flex-wrap: wrap; }
.es-seg a, .es-seg button { padding: 9px 16px; border-radius: 10px; border: 0; background: transparent; color: var(--es-ink-2); font-weight: 500; font-size: .93rem; display: inline-flex; gap: 8px; align-items: center; }
.es-seg .active { background: var(--es-green-600); color: #fff; box-shadow: 0 4px 10px rgba(11,90,64,.2); }
.es-seg.boxed a, .es-seg.boxed button { border: 1px solid var(--es-border); background: #fff; }
.es-seg.boxed .active { background: #eef8f2; color: var(--es-green-700); border-color: var(--es-green-600); box-shadow: none; }

/* Panneau de détail (droite) */
.detail-panel { position: sticky; top: calc(var(--es-topbar-h) + 18px); }
.detail-panel .close-x { position: absolute; top: 14px; right: 14px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .93rem; border-bottom: 1px solid var(--es-border-2); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--es-muted); }
.kv .v { font-weight: 600; text-align: right; color: var(--es-ink); }
.info-line { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--es-ink-2); }
.info-line .bi { font-size: 1.1rem; color: var(--es-ink-2); width: 22px; text-align: center; }
.total-box { border-radius: 12px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; }
.total-box.gold { background: linear-gradient(90deg, #fdf0d2, #fdf6e6); }
.total-box.green { background: #e6f5ec; }
.total-box.red { background: #fde8e7; color: var(--es-red); }
.total-box .val { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Chronologie */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 30px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: -4px; width: 2px; background: #dce9e1; }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--es-green-600); box-shadow: 0 0 0 4px #e4f3ea; }
.timeline li.muted::after { background: #b9c4c0; box-shadow: 0 0 0 4px #eef1f0; }

/* Étapes */
.stepper { display: flex; align-items: flex-start; justify-content: space-between; position: relative; margin: 6px 0 22px; }
.step { flex: 1 1 0; text-align: center; position: relative; color: var(--es-muted); font-size: .95rem; }
.step .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 8px; background: #e7e7e3; color: var(--es-ink-2); font-weight: 700; position: relative; z-index: 2; border: 3px solid #fff; box-shadow: 0 0 0 1px #e1e1dc; }
.step::before { content: ""; position: absolute; top: 18px; left: -50%; right: 50%; height: 3px; background: #e1e1dc; z-index: 1; }
.step:first-child::before { display: none; }
.step.done .dot, .step.current .dot { background: var(--es-green-600); color: #fff; box-shadow: 0 0 0 1px var(--es-green-600); }
.step.done::before, .step.current::before { background: var(--es-green-600); }
.step.done, .step.current { color: var(--es-ink); font-weight: 500; }
.num-badge { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--es-green-600); color: #fff; font-weight: 700; font-size: .95rem; flex: 0 0 auto; }
.num-badge.light { background: var(--es-green-100); color: var(--es-green-700); }

/* Avatars */
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .92rem; flex: 0 0 auto; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar.xs { width: 26px; height: 26px; font-size: .7rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 2.2rem; }
.avatar.solid { background: var(--es-green-700); color: #fff; }
.avatar.tone-green { background: #e2f3e8; color: #1a7a4b; }
.avatar.tone-gold { background: #fde9cf; color: #b96a12; }
.avatar.tone-blue { background: #e4ecfd; color: #2c55c3; }
.avatar.tone-purple { background: #ede6fd; color: #6b42cf; }
.avatar.tone-rose { background: #fde4ea; color: #c63a5f; }
.avatar.tone-teal { background: #dff4f1; color: #13857a; }

/* Vignette produit */
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--es-cream-2); flex: 0 0 auto; display: grid; place-items: center; color: var(--es-gold-600); font-size: 1.3rem; border: 1px solid var(--es-border-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.sm { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 8px; }
.thumb.lg { width: 64px; height: 64px; }
.thumb.xl { width: 100%; height: 230px; border-radius: 14px; font-size: 3rem; }

/* Bandeaux d'information */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-size: .93rem; }
.note .bi { font-size: 1.25rem; flex: 0 0 auto; margin-top: 1px; }
.note.info { background: #eef3fd; color: #24408f; }
.note.info .bi { color: #2f5fd0; }
.note.warn { background: #fdf3de; color: #7a4e05; }
.note.warn .bi { color: #e09a10; }
.note.danger { background: #fdeceb; color: #9d1f1d; }
.note.danger .bi { color: var(--es-red); }
.note.success { background: #e8f6ee; color: #11583a; }
.note.success .bi { color: var(--es-green-500); }
.note.lock { background: var(--es-gold-50); color: var(--es-ink-2); border: 1px solid var(--es-gold-200); }
.note.lock .bi { color: var(--es-gold-600); }

/* Alertes flash (toasts) */
.es-toasts { position: fixed; top: calc(var(--es-topbar-h) + 12px); right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.es-toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: var(--es-shadow-lg); border: 1px solid var(--es-border-2); border-left: 5px solid var(--es-green-500); animation: es-toast-in .35s var(--es-ease); }
.es-toast.error { border-left-color: var(--es-red); }
.es-toast.warning { border-left-color: var(--es-gold-500); }
.es-toast.info { border-left-color: var(--es-blue); }
.es-toast .bi:first-child { font-size: 1.3rem; }
.es-toast.success .bi:first-child { color: var(--es-green-500); }
.es-toast.error .bi:first-child { color: var(--es-red); }
.es-toast.warning .bi:first-child { color: var(--es-gold-600); }
.es-toast .msg { flex: 1; font-size: .93rem; color: var(--es-ink-2); }
.es-toast .x { border: 0; background: none; color: var(--es-muted); padding: 0 2px; }
@keyframes es-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }

/* États vides / chargement */
.empty { text-align: center; padding: 34px 18px; color: var(--es-muted); }
.empty .icon-circle { margin: 0 auto 12px; }
.empty h3 { font-size: 1.1rem; color: var(--es-ink); margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, #f0ede4 25%, #f7f5ef 50%, #f0ede4 75%); background-size: 200% 100%; animation: es-shimmer 1.2s infinite; border-radius: 8px; }
@keyframes es-shimmer { to { background-position: -200% 0; } }

/* Barres de progression */
.bar { height: 10px; border-radius: 8px; background: #edf0ee; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 8px; background: var(--es-green-600); }
.bar.gold > span { background: var(--es-gold-500); }
.bar.purple > span { background: #8f6ef0; }
.bar.blue > span { background: var(--es-blue); }

/* Anneau (jauge) */
.ring { --p: 50; --c: var(--es-gold-500); width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #ececec 0); position: relative; flex: 0 0 auto; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring > span { position: relative; font-weight: 700; font-size: 1.05rem; }

/* Graphiques */
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 190px; }
.chart-box.lg { height: 320px; }
.chart-state { position: absolute; inset: 0; display: grid; place-items: center; color: var(--es-muted); font-size: .92rem; text-align: center; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--es-ink-2); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* Ticket de caisse */
.receipt-stage { background: #eceae4; border-radius: 16px; padding: 22px; display: flex; justify-content: center; }
.receipt { width: 100%; max-width: 350px; background: #fff; padding: 22px 22px 18px; font-family: 'Fira Sans', 'Courier New', monospace; color: #111; position: relative; box-shadow: 0 10px 24px rgba(0,0,0,.12); font-size: .93rem; }
.receipt::before, .receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background-size: 14px 10px; }
.receipt::before { top: -9px; background-image: linear-gradient(-45deg, #fff 5px, transparent 0), linear-gradient(45deg, #fff 5px, transparent 0); background-position: left bottom; background-repeat: repeat-x; }
.receipt::after { bottom: -9px; background-image: linear-gradient(-135deg, #fff 5px, transparent 0), linear-gradient(135deg, #fff 5px, transparent 0); background-position: left top; background-repeat: repeat-x; }
.receipt .sep { border-top: 2px dashed #9b9b9b; margin: 10px 0; }
.receipt table { width: 100%; font-size: .9rem; }
.receipt th { font-weight: 500; padding: 3px 0; }
.receipt td { padding: 3px 0; }
.receipt .r { text-align: right; }
.receipt .c { text-align: center; }
.receipt .due { background: #fde3e2; color: #d42a27; padding: 4px 6px; margin: 0 -6px; }
.receipt.a4 { max-width: 560px; }

/* Bulles de discussion (assistant) */
.chat { display: flex; flex-direction: column; gap: 16px; }
.bubble-row { display: flex; gap: 10px; align-items: flex-start; }
.bubble-row.me { justify-content: flex-end; }
.bubble { max-width: min(560px, 86%); padding: 12px 16px; border-radius: 16px; position: relative; }
.bubble.me { background: #dcf3e3; color: var(--es-ink); border-top-right-radius: 4px; }
.bubble.bot { background: #fff; border: 1px solid var(--es-border-2); border-top-left-radius: 4px; box-shadow: var(--es-shadow-xs); }
.bubble.bot.proposal { background: linear-gradient(180deg, #fffaf0, #fff); border-color: var(--es-gold-200); }
.bubble.bot.ok { background: #effaf3; border-color: #cdebd8; }
.bubble .time { font-size: .74rem; color: var(--es-muted); text-align: right; margin-top: 4px; }
.bot-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 1px solid var(--es-gold-200); display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; }
.bot-avatar img { width: 30px; height: auto; }

/* Interrupteurs en ligne (permissions) */
.switch-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--es-border-2); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .ico { font-size: 1.3rem; color: var(--es-ink-2); width: 26px; text-align: center; }
.switch-row .lbl { flex: 1 1 auto; color: var(--es-ink-2); }
.switch-row .form-check { margin: 0; }

/* Zone de dépôt */
.dropzone { border: 2px dashed #e6cf9b; border-radius: 14px; background: var(--es-gold-50); padding: 22px; text-align: center; color: var(--es-ink-2); cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; }
.dropzone:hover, .dropzone.drag { border-color: var(--es-gold-500); background: #fff4dc; }
.dropzone .bi { font-size: 1.7rem; color: var(--es-ink-2); }
.dropzone.green { border-color: #bcdcc8; background: #f5fbf7; }
.file-chip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--es-border); border-radius: 12px; background: #fff; }

/* Divers */
.divider-or { display: flex; align-items: center; gap: 14px; color: var(--es-muted); font-size: .9rem; margin: 18px 0; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--es-border); }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: currentColor; display: inline-block; opacity: .5; vertical-align: middle; margin: 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 9px; background: var(--es-green-50); color: var(--es-green-700); font-weight: 500; font-size: .9rem; border: 1px solid #d4ebdd; }
.chip button { border: 0; background: none; color: inherit; padding: 0; line-height: 1; }
.chip.gold { background: var(--es-gold-50); color: var(--es-gold-700); border-color: var(--es-gold-200); }
.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid #dcd7c9; border-radius: 10px; overflow: hidden; background: #fff; }
.qty-stepper button { width: 36px; border: 0; background: #f7f6f2; color: var(--es-ink); font-size: 1.1rem; }
.qty-stepper button:hover { background: var(--es-green-50); color: var(--es-green-700); }
.qty-stepper input { width: 58px; border: 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; min-height: 40px; }
.qty-stepper input:focus { outline: none; background: var(--es-gold-50); }
.sticky-actions { position: sticky; bottom: 0; z-index: 20; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #ddd; cursor: pointer; display: inline-block; }
.color-pick input { display: none; }
.color-pick input:checked + .color-dot { box-shadow: 0 0 0 2px var(--es-ink); }
.icon-pick input { display: none; }
.icon-pick .sw { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; cursor: pointer; border: 2px solid transparent; }
.icon-pick input:checked + .sw { border-color: var(--es-gold-500); box-shadow: 0 0 0 3px var(--es-gold-100); }
.hl-num { font-size: 2.2rem; font-weight: 700; line-height: 1; }

/* Modales & offcanvas */
.modal-content { border: 0; border-radius: 20px; box-shadow: var(--es-shadow-lg); }
.modal-header { border-bottom: 0; padding: 22px 24px 8px; }
.modal-title { font-weight: 700; font-size: 1.35rem; color: var(--es-title); }
.modal-body { padding: 12px 24px; }
.modal-footer { border-top: 0; padding: 12px 24px 22px; gap: 10px; }
.modal-backdrop.show { opacity: .42; }
.offcanvas { border: 0 !important; }

/* Palette de recherche (Ctrl+K) */
.cmdk .modal-dialog { max-width: 640px; }
.cmdk .search { border: 0; border-bottom: 1px solid var(--es-border-2); border-radius: 0; font-size: 1.1rem; padding: 18px 20px 18px 52px; min-height: 64px; box-shadow: none !important; }
.cmdk .search-ico { position: absolute; left: 20px; top: 21px; font-size: 1.2rem; color: var(--es-muted); }
.cmdk .results { max-height: 420px; overflow-y: auto; padding: 8px; }
.cmdk .res { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--es-ink); }
.cmdk .res:hover, .cmdk .res.active { background: var(--es-green-50); }
.cmdk .grp { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--es-muted-2); padding: 10px 12px 4px; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════
   PAGES D'AUTHENTIFICATION
   ══════════════════════════════════════════════════════════════════════════ */
.auth-body { min-height: 100vh; background: radial-gradient(1200px 600px at 100% 0%, #fff8e8 0%, rgba(255,248,232,0) 60%), var(--es-cream); display: flex; flex-direction: column; }
.auth-shell { flex: 1 1 auto; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr); min-height: calc(100vh - 64px); }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: 56px 56px 0; display: flex; flex-direction: column;
  background: radial-gradient(80% 50% at 10% 0%, rgba(29,136,95,.45), rgba(29,136,95,0) 70%), linear-gradient(170deg, #0c4a33 0%, #073a29 55%, #04301f 100%); }
.auth-hero .brand-plate { display: inline-flex; align-self: flex-start; padding: 14px 20px; border-radius: 20px; background: linear-gradient(180deg, #fffdf7, #f4ecd8); box-shadow: 0 18px 40px rgba(0,0,0,.28), inset 0 0 0 1px rgba(219,161,45,.4); }
.auth-hero .brand-plate img { height: 72px; width: auto; display: block; }
.auth-hero h1 { color: #fff; font-size: 2.15rem; line-height: 1.2; font-weight: 700; margin: 34px 0 0; letter-spacing: -.01em; }
.auth-hero .gold-rule { width: 76px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--es-gold-400), var(--es-gold-600)); margin: 18px 0; }
.auth-hero p.lead { font-size: 1.2rem; color: #e5f1ea; max-width: 520px; line-height: 1.45; }
.auth-feats { display: flex; gap: 34px; margin: 26px 0 0; flex-wrap: wrap; position: relative; z-index: 2; }
.auth-feat { text-align: center; width: 132px; }
.auth-feat .ring-ico { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-size: 1.9rem; color: var(--es-gold-400); border: 2px solid rgba(235,197,122,.85); background: rgba(255,255,255,.04); box-shadow: inset 0 0 18px rgba(235,197,122,.12); }
.auth-feat span { font-weight: 600; font-size: 1.02rem; color: #fff; }
.auth-art { position: relative; margin: auto -56px 0; height: 300px; background: url('../img/illustrations/market-login.jpg') center bottom / cover no-repeat; }
.auth-art::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 70px; background: linear-gradient(180deg, #073a29, rgba(7,58,41,0)); }
.auth-art.djenne { background-image: url('../img/illustrations/djenne-green.jpg'); height: 420px; background-position: left bottom; background-size: contain; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 34px 28px; position: relative; }
.auth-card { width: 100%; max-width: 520px; background: rgba(255,255,255,.92); border: 1px solid var(--es-border-2); border-radius: 26px; box-shadow: 0 30px 70px rgba(11, 35, 30, .10), 0 2px 0 rgba(255,255,255,.8) inset; padding: 34px 40px 32px; position: relative; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.auth-card .logo { display: block; margin: 6px auto 14px; width: 250px; max-width: 75%; height: auto; }
.auth-card h2 { font-size: 1.85rem; font-weight: 700; text-align: center; margin: 0; color: var(--es-ink); }
.auth-card .sub { text-align: center; color: var(--es-ink-2); font-size: 1.08rem; margin: 4px 0 24px; }
.auth-card .form-control { min-height: 56px; border-radius: 12px; font-size: 1.02rem; background: #fdfcf9; }
.auth-card .input-icon > .bi:first-child { font-size: 1.25rem; left: 18px; }
.auth-card .input-icon > .form-control { padding-left: 54px; }
.auth-card .btn-lg { min-height: 58px; }
.auth-footer { padding: 14px 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .84rem; color: var(--es-muted); border-top: 1px solid var(--es-border-2); background: rgba(255,255,255,.75); position: relative; }
.auth-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #14b53a 0 33.33%, #fcd116 33.33% 66.66%, #ce1126 66.66% 100%); opacity: .55; }
.auth-footer a { color: var(--es-muted); }
.auth-footer a:hover { color: var(--es-green-600); }
.auth-footer .right { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.secure-note { display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--es-ink-2); font-size: .9rem; margin-top: 18px; }
.secure-note .shield { color: var(--es-gold-500); font-size: 1.8rem; }

/* Écrans « focus » (ouverture de caisse, dépense) : fond vert + carte */
.focus-shell { min-height: 100%; display: grid; grid-template-columns: 330px 1fr; gap: 0; border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid var(--es-border-2); box-shadow: var(--es-shadow-sm); }
.focus-hero { position: relative; color: #fff; padding: 46px 34px; overflow: hidden; background: linear-gradient(170deg, #0c4a33 0%, #063a28 60%, #04301f 100%); min-height: 640px; }
.focus-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 70%; background: url('../img/illustrations/djenne-green.jpg') left bottom / cover no-repeat; opacity: .95; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); mask-image: linear-gradient(180deg, transparent, #000 30%); }
.focus-hero .brand-plate { position: relative; z-index: 2; display: inline-flex; padding: 12px 16px; border-radius: 16px; background: linear-gradient(180deg, #fffdf7, #f4ecd8); box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.focus-hero .brand-plate img { height: 58px; width: auto; }
.focus-hero p { position: relative; z-index: 2; font-size: 1.2rem; margin-top: 26px; color: #eef6f1; line-height: 1.4; }
.focus-hero .gold-rule { position: relative; z-index: 2; width: 52px; height: 4px; border-radius: 4px; background: var(--es-gold-500); }
.focus-body { padding: 34px 38px; background: linear-gradient(180deg, #fffdf8, #fff); }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1399.98px) {
  .page-title { font-size: 2.1rem; }
  .kpi-value { font-size: 1.65rem; }
}
@media (max-width: 1199.98px) {
  :root { --es-sidebar-w: 236px; }
  .es-topbar-search { display: none; }
  .detail-panel { position: static; }
}
@media (max-width: 991.98px) {
  :root { --es-topbar-h: 64px; }
  .es-sidebar { transform: translateX(-102%); transition: transform .28s var(--es-ease); width: 280px; }
  .es-sidebar.open { transform: none; }
  .es-scrim { position: fixed; inset: 0; background: rgba(2, 24, 17, .45); z-index: 1035; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .es-scrim.show { opacity: 1; pointer-events: auto; }
  .es-main { margin-left: 0; }
  .es-burger { display: inline-grid; place-items: center; }
  .es-topbar { padding: 0 4px; gap: 8px; }
  .es-topbar-logo { display: flex; align-items: center; }
  .es-shop-switch-wrap, .es-date-chip, .es-topbar-divider, .es-net-wrap, .es-quick-sale, .es-user-btn .name, .es-user-btn .bi-chevron-down { display: none !important; }
  .es-content { padding: 16px 4px 96px; }
  .es-mobile-context { display: flex !important; }
  .es-bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--es-border-2); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(11,35,30,.06); }
  .es-bottom-nav a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--es-muted); font-size: .72rem; font-weight: 500; border-radius: 12px; }
  .es-bottom-nav a .bi { font-size: 1.35rem; }
  .es-bottom-nav a.active { color: var(--es-green-600); font-weight: 700; }
  .es-bottom-nav a.primary .bi { width: 50px; height: 50px; margin-top: -24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #0f6b4c, #08452f); box-shadow: 0 8px 18px rgba(11,90,64,.35), 0 0 0 5px #fff; font-size: 1.4rem; }
  .es-bottom-nav a.primary { color: var(--es-green-700); font-weight: 700; }
  .es-footer { margin-bottom: 70px; }
  .es-footer-inner { padding: 16px 4px; gap: 12px; }
  .es-footer-meta { margin-left: 0; }
  .page-title { font-size: 1.85rem; }
  .page-sub { font-size: 1rem; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { padding: 18px 14px 0; align-items: flex-start; flex-direction: column; }
  .auth-card { margin: 0 auto; padding: 26px 20px; border-radius: 22px; }
  .auth-mobile-art { display: block !important; }
  .focus-shell { grid-template-columns: 1fr; }
  .focus-hero { display: none; }
  .focus-body { padding: 22px 18px; }
  .es-toasts { top: 72px; right: 10px; left: 10px; max-width: none; }
}
@media (max-width: 767.98px) {
  .t-desktop { display: none !important; }
  .m-list { display: block; }
  .page-head { gap: 12px; margin-bottom: 16px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .page-title { font-size: 1.6rem; gap: 10px; }
  .page-title .title-icon { font-size: 1.6rem; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 1.3rem; }
  .kpi-label { font-size: .86rem; }
  .icon-circle { width: 42px; height: 42px; font-size: 1.15rem; }
  .es-card-body { padding: 16px; }
  .es-card-head { padding: 16px 16px 4px; }
  .stepper .step { font-size: .78rem; }
  .auth-card h2 { font-size: 1.4rem; }
  .auth-card .logo { width: 180px; }
  .chart-box { height: 210px; }
  .receipt-stage { padding: 12px; }
  .hide-sm { display: none !important; }
}
@media (max-width: 374.98px) {
  body { font-size: 14px; }
  .es-content { padding: 12px 4px 96px; }
  .page-title { font-size: 1.4rem; }
  .kpi-value { font-size: 1.12rem; }
  .btn-lg { padding: .8rem 1rem; font-size: 1rem; }
}
.auth-mobile-art { display: none; height: 170px; margin: 18px -14px 0; background: url('../img/illustrations/market-login.jpg') center bottom / cover no-repeat; -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%); mask-image: linear-gradient(180deg, transparent, #000 35%); }
.es-mobile-context { display: none !important; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 14px; }
.es-mobile-context .es-shop-switch { padding: 4px 8px 4px 4px; gap: 8px; border: 1px solid var(--es-border-2); background: #fff; }
.es-mobile-context .es-shop-icon { width: 30px; height: 30px; font-size: .95rem; }
.es-mobile-context .es-shop-name { font-size: .9rem; }
.es-mobile-context .date { font-size: .78rem; color: var(--es-muted); display: inline-flex; gap: 6px; align-items: center; }

/* Impression */
@media print {
  .es-sidebar, .es-topbar, .es-footer, .es-bottom-nav, .no-print, .es-toasts { display: none !important; }
  .es-main { margin: 0 !important; }
  .es-content { padding: 0 !important; max-width: none; }
  body { background: #fff; }
  .receipt { box-shadow: none; max-width: 80mm; }
  .receipt::before, .receipt::after { display: none; }
  .receipt-stage { background: none; padding: 0; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LANGUES : DRAPEAUX ET SÉLECTEUR (Français · English · Bamanankan · العربية)
   ══════════════════════════════════════════════════════════════════════════ */
.es-flag {
  --w: 24px;
  position: relative; display: inline-block; flex: 0 0 auto; vertical-align: middle;
  width: var(--w); aspect-ratio: 4 / 3; border-radius: calc(var(--w) * .16);
  overflow: hidden; isolation: isolate; background: #e9ece8;
  box-shadow: 0 0 0 1px rgba(11, 35, 30, .14), 0 1px 2px rgba(11, 35, 30, .12), 0 3px 8px -2px rgba(11, 35, 30, .22);
  transform-origin: 0 50%;
}
.es-flag svg, .es-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Relief satiné : reflet en haut, ombre douce en bas, plis légers, liseré intérieur */
.es-flag::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background:
    linear-gradient(160deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.14) 28%, rgba(255,255,255,0) 46%),
    linear-gradient(0deg, rgba(0,0,0,.16) 0%, rgba(0,0,0,0) 38%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 18%, rgba(255,255,255,.07) 26%, rgba(0,0,0,.05) 34%, rgba(255,255,255,0) 42% 50%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.08);
}
/* Éclat lumineux qui traverse le drapeau au survol */
.es-flag::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 45%; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0));
  transform: skewX(-18deg) translateX(-120%); opacity: 0;
}
.es-flag-sm { --w: 18px; }
.es-flag-md { --w: 26px; }
.es-flag-lg { --w: 38px; }
.es-flag-xl { --w: 56px; }

@keyframes es-flag-shine { 0% { transform: skewX(-18deg) translateX(-120%); opacity: 0; } 15% { opacity: 1; } 100% { transform: skewX(-18deg) translateX(520%); opacity: 0; } }
@keyframes es-flag-wave {
  0%, 100% { transform: perspective(140px) rotateY(0deg) skewY(0deg); }
  25% { transform: perspective(140px) rotateY(-14deg) skewY(-1.6deg); }
  60% { transform: perspective(140px) rotateY(9deg) skewY(1.2deg); }
}
.es-lang-btn:hover .es-flag, .es-lang-item:hover .es-flag, .es-lang-item:focus-visible .es-flag { animation: es-flag-wave 1.4s var(--es-ease) infinite; }
.es-lang-btn:hover .es-flag::before, .es-lang-item:hover .es-flag::before, .es-lang-item:focus-visible .es-flag::before { animation: es-flag-shine 1.1s ease-out; }

/* Bouton */
.es-lang-btn {
  display: inline-flex; align-items: center; gap: 9px; border: 0; cursor: pointer;
  color: var(--es-ink); font-weight: 600; font-size: .92rem; line-height: 1;
  transition: background .2s var(--es-ease), box-shadow .2s var(--es-ease), transform .2s var(--es-ease);
}
.es-lang-chev { font-size: .7rem; opacity: .65; transition: transform .25s var(--es-ease); }
.es-lang-btn[aria-expanded="true"] .es-lang-chev { transform: rotate(180deg); }
.es-lang-btn:focus-visible { outline: 3px solid rgba(219, 161, 45, .55); outline-offset: 2px; }

/* Variante « pill » (pages de connexion) : discrète, comme la maquette — drapeau · Français · chevron */
.es-lang-pill .es-lang-btn {
  gap: 7px; height: 32px; padding: 0 9px 0 8px; border-radius: 9px;
  background: transparent; font-size: .84rem; font-weight: 600; letter-spacing: .005em; color: var(--es-ink-2);
}
.es-lang-pill .es-lang-btn .es-flag { --w: 19px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(11, 35, 30, .12), 0 1px 2px rgba(11, 35, 30, .14); }
.es-lang-pill .es-lang-chev { font-size: .62rem; opacity: .55; margin-left: 1px; }
.es-lang-pill .es-lang-btn:hover, .es-lang-pill .es-lang-btn[aria-expanded="true"] { background: rgba(11, 35, 30, .045); color: var(--es-ink); }
.es-lang-pill .es-lang-btn:hover .es-flag, .es-lang-pill .es-lang-btn:hover .es-flag::before { animation: none; }

/* Menu épuré des pages de connexion */
.es-lang-pill .es-lang-menu.dropdown-menu {
  width: 212px; padding: 6px; border-radius: 14px;
  background: rgba(255, 255, 255, .97); border: 1px solid rgba(11, 35, 30, .08);
  box-shadow: 0 18px 40px -16px rgba(3, 48, 31, .30), 0 2px 6px rgba(3, 48, 31, .05);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.es-lang-cap {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px 7px;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--es-muted);
}
.es-lang-cap .bi { color: var(--es-gold-600); font-size: .8rem; }
.es-lang-pill .es-lang-list { padding: 0; gap: 1px; }
.es-lang-pill .es-lang-item { gap: 10px; padding: 8px 10px; border-radius: 9px; }
.es-lang-pill .es-lang-item:hover, .es-lang-pill .es-lang-item:focus-visible { transform: none; box-shadow: none; background: var(--es-cream); }
.es-lang-pill .es-lang-item .es-flag { --w: 20px; border-radius: 3px; animation: none !important; }
.es-lang-pill .es-lang-native { font-size: .88rem; font-weight: 600; }
.es-lang-pill .es-lang-native[lang="ar"] { font-size: .95rem; }
.es-lang-pill .es-lang-item.active { background: var(--es-green-50); box-shadow: none; }
.es-lang-pill .es-lang-item.active::before { display: none; }
.es-lang-pill .es-lang-item.active .es-lang-native { color: var(--es-green-700, #0a4a34); }
.es-lang-pill .es-lang-check { width: auto; height: auto; background: none; box-shadow: none; color: var(--es-green-600); font-size: 1rem; }

.auth-panel { position: relative; }
/* Sélecteur de langue en tête de la carte d'identification (coin supérieur droit) */
.auth-card-top { display: flex; justify-content: flex-end; align-items: center; margin: -20px -26px 0 0; position: relative; z-index: 20; }
.auth-card.text-center .auth-card-top, .auth-card .text-center .auth-card-top { text-align: initial; }

/* Variante « compact » (barre du haut) */
.es-lang-compact .es-lang-btn { height: 44px; padding: 0 10px 0 9px; border-radius: 22px; background: transparent; }
.es-lang-compact .es-lang-btn:hover, .es-lang-compact .es-lang-btn[aria-expanded="true"] { background: var(--es-cream-2); }
.es-lang-compact .es-lang-label { font-size: .86rem; }

/* Menu */
.es-lang-menu.dropdown-menu {
  width: 312px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--es-border-2);
  box-shadow: 0 24px 60px -18px rgba(3, 48, 31, .38), 0 2px 6px rgba(3, 48, 31, .06);
}
.es-lang-menu.show { animation: es-lang-pop .26s var(--es-ease); }
@keyframes es-lang-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.es-lang-head {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px 13px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(29,136,95,.45), rgba(29,136,95,0) 60%), linear-gradient(135deg, #0a4a34, #063a28);
  color: #fff; position: relative;
}
.es-lang-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #14b53a 0 33.33%, #fcd116 33.33% 66.66%, #ce1126 66.66%); opacity: .9; }
.es-lang-globe { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: rgba(255,255,255,.12); color: var(--es-gold-400); font-size: 1.15rem; box-shadow: inset 0 0 0 1px rgba(235,197,122,.45); }
.es-lang-head strong { display: block; font-size: .98rem; }
.es-lang-head small { display: block; font-size: .76rem; opacity: .8; line-height: 1.3; margin-top: 2px; }
.es-lang-list { padding: 8px; display: grid; gap: 4px; }
.es-lang-item {
  display: flex; align-items: center; gap: 14px; padding: 9px 12px 9px 10px; border-radius: 13px;
  color: var(--es-ink); position: relative; text-decoration: none;
  transition: background .18s var(--es-ease), box-shadow .18s var(--es-ease), transform .18s var(--es-ease);
}
.es-lang-item:hover, .es-lang-item:focus-visible { background: var(--es-cream); color: var(--es-ink); transform: translateX(2px); outline: none; box-shadow: inset 0 0 0 1px var(--es-border-2); }
.es-lang-item .es-flag { border-radius: 7px; }
.es-lang-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.es-lang-native { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.es-lang-native[lang="ar"] { font-family: 'Cairo', var(--es-font); font-size: 1.08rem; }
.es-lang-sub { font-size: .76rem; color: var(--es-muted); line-height: 1.3; }
.es-lang-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: #fff; font-size: .85rem; background: var(--es-green-600); transform: scale(0); transition: transform .25s var(--es-ease); box-shadow: 0 4px 10px rgba(11,90,64,.35); }
.es-lang-item.active { background: linear-gradient(90deg, var(--es-green-50), #fff); box-shadow: inset 0 0 0 1.5px rgba(15,107,76,.35); }
.es-lang-item.active::before { content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--es-gold-400), var(--es-gold-600)); }
.es-lang-item.active .es-lang-check { transform: scale(1); }
.es-lang-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px 11px; font-size: .76rem; font-weight: 600; color: var(--es-muted); border-top: 1px solid var(--es-border-2); background: var(--es-cream); }

@media (max-width: 991.98px) {
  .es-lang-compact .es-lang-label, .es-lang-compact .es-lang-chev { display: none; }
  .es-lang-compact .es-lang-btn { width: 44px; padding: 0; justify-content: center; }
  .auth-card-top { margin: -10px -8px 4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .es-lang-btn:hover .es-flag, .es-lang-item:hover .es-flag, .es-flag::before { animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   AJUSTEMENT À L'ÉCRAN — aucune barre de défilement visible, aucun débordement
   latéral. Le contenu reste défilable (molette, tactile, clavier) mais les
   barres sont masquées, et tout s'étire sur la largeur disponible.
   ══════════════════════════════════════════════════════════════════════════ */
html, body { max-width: 100%; overflow-x: hidden; }
html { -ms-overflow-style: none; }
* { scrollbar-width: none !important; }
*::-webkit-scrollbar, .es-main ::-webkit-scrollbar, .es-nav::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none; }
.es-app, .es-main, .es-content { max-width: 100%; }
.es-main { overflow-x: clip; min-width: 0; }
/* Onglets : sur petit écran ils passent à la ligne au lieu de défiler horizontalement */
@media (max-width: 575.98px) {
  .es-tabs { flex-wrap: wrap; overflow-x: visible; gap: 2px 4px; }
  .es-tab { padding: 10px 12px; gap: 6px; }
}

/* Barre latérale : les liens se resserrent selon la hauteur de l'écran */
.es-nav-link { padding-block: clamp(6px, 1.15vh, 10px); }
.es-brand { padding-block: clamp(10px, 1.8vh, 18px) clamp(8px, 1.4vh, 14px); }
.es-nav { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); }
/* Barre supérieure : jamais plus large que l'écran */
.es-topbar-right { min-width: 0; flex-wrap: nowrap; }
.es-shop-switch-wrap { min-width: 0; flex: 0 1 auto; }
.es-shop-name, .es-shop-city { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
@media (min-width: 992px) and (max-width: 1439.98px) {
  .es-topbar { padding: 0 4px; gap: 10px; }
  .es-topbar-divider { margin: 0 4px; }
  .es-user-btn .name, .es-user-btn .bi-chevron-down { display: none; }
}
@media (min-width: 992px) and (max-width: 1279.98px) {
  .es-date-chip, .es-topbar-divider { display: none !important; }
  .es-net .txt, .es-lang-compact .es-lang-label { display: none; }
  .es-net { padding: 8px; }
  .es-shop-name, .es-shop-city { max-width: 150px; }
}

/* Tableaux : se resserrent sur les écrans moyens au lieu de déborder */
@media (max-width: 1599.98px) {
  .es-table { font-size: .86rem; }
  .es-table thead th { font-size: .8rem; }
  .es-table thead th, .es-table tbody td, .es-table tfoot td { padding: 10px 8px; }
  .es-table .btn-sm { font-size: .78rem; padding: .28rem .55rem; }
  .es-table thead th { white-space: normal; }
  .es-table :is(.pill, .cat-pill) { font-size: .76rem; padding: 3px 8px; }
  .es-table .thumb { width: 40px; height: 40px; }
  .es-table .gap-3 { gap: .6rem !important; }
}
/* Tous les tableaux : le texte passe à la ligne plutôt que d'élargir le tableau (sans couper les mots) */
.es-table th, .es-table td { overflow-wrap: break-word; }
.es-table td.text-nowrap:not(.num), .es-table th.text-nowrap { white-space: normal !important; }
.es-table :is(.pill, .cat-pill, .badge) { white-space: normal; max-width: 100%; line-height: 1.25; }
.es-table td.num, .es-table .num { overflow-wrap: normal; }
/* Téléphones, dates, noms passent sur 2 lignes si besoin ; les montants (espaces insécables) restent groupés.
   Priorité sur les réglages propres à chaque module (ventes, caisse, crédits, fournisseurs…) */
.es-table td.num { white-space: normal; }
.es-table td.td-actions { white-space: normal; }
.es-table td.td-actions .btn + .dropdown { margin-top: 4px; }
.es-content table.es-table > tbody > tr > td:not(.td-actions) { white-space: normal !important; }
.es-content table.es-table td :is(span, a, strong, small):not(.text-truncate) { white-space: normal; }
.es-content table.es-table td .num, .es-content table.es-table td.num { white-space: normal !important; }
@media (max-width: 1599.98px) {
  .es-content table.es-table { font-size: .84rem !important; }
  .es-content table.es-table > * > tr > :is(th, td) { padding: 9px 7px !important; }
  .es-content table.es-table > * > tr > :is(th, td):first-child { padding-left: 12px !important; }
  .es-content table.es-table > thead > tr > th { font-size: .78rem !important; }
  .es-content table.es-table .avatar:not(.xs):not(.sm) { width: 32px; height: 32px; font-size: .78rem; }
}
.es-table td .text-truncate { max-width: 100%; }
.es-table-wrap, .table-responsive { max-width: 100%; }

/* Formulaires et en-têtes de page : l'espacement vertical suit la hauteur de l'écran
   (inchangé sur un grand écran, resserré sur un portable) pour limiter le défilement */
@media (min-width: 992px) {
  .es-content { padding-top: clamp(12px, 2.4vh, 26px); padding-bottom: clamp(14px, 2.8vh, 34px); }
  .page-head { margin-bottom: clamp(12px, 2.2vh, 22px); padding-block: clamp(10px, 1.9vh, 24px); }
  .page-title { font-size: clamp(1.55rem, 3.7vh, 2.35rem); }
  .page-title .title-icon { width: clamp(40px, 6.2vh, 52px); height: clamp(40px, 6.2vh, 52px); font-size: clamp(1.15rem, 2.2vh, 1.5rem); }
  .page-sub { font-size: clamp(.95rem, 1.75vh, 1.12rem); margin-top: clamp(2px, .6vh, 6px); }
  .es-card-head { padding-top: clamp(10px, 1.9vh, 18px); }
  .es-card-body { padding-top: clamp(12px, 2vh, 20px); padding-bottom: clamp(12px, 2vh, 20px); }
  .es-card-head .icon-circle, .form-card .es-card-head .icon-circle { width: clamp(36px, 5.6vh, 44px); height: clamp(36px, 5.6vh, 44px); }
  .es-content .form-control, .es-content .form-select { min-height: clamp(38px, 5.4vh, 46px); }
  .es-content textarea.form-control { min-height: clamp(64px, 9vh, 96px); }
  .es-content .form-label { margin-bottom: clamp(3px, .6vh, 6px); }
  .es-content form .mb-3 { margin-bottom: clamp(10px, 1.8vh, 16px) !important; }
  .es-content form .mb-4 { margin-bottom: clamp(12px, 2.2vh, 24px) !important; }
  .es-content form .row.g-3, .es-content form.row.g-3 { --bs-gutter-y: clamp(.6rem, 1.6vh, 1rem); }
  .es-content form .row.g-4, .es-content form.row.g-4, .es-content .row.g-4:has(form, .form-control) { --bs-gutter-y: clamp(.8rem, 2vh, 1.5rem); }
  .es-content .form-actions { margin-top: clamp(10px, 1.8vh, 18px); }
  .es-content .form-actions .btn, .es-content form .btn-lg { min-height: clamp(42px, 6vh, 52px); }
  .es-content form .btn-lg { padding-top: clamp(.55rem, 1.2vh, .9rem); padding-bottom: clamp(.55rem, 1.2vh, .9rem); }
  /* En-tête « héros » vert (caisse, rapports, historiques…) et sa bande d'indicateurs */
  .page-head.hero { row-gap: clamp(8px, 1.4vh, 14px); }
  .page-head.hero .hero-pulse { margin-top: clamp(2px, .8vh, 8px); }
  .page-head.hero .hero-pulse > * { padding-block: clamp(8px, 1.4vh, 14px); }
  .page-head.hero .hero-pulse > * + *::before { top: clamp(10px, 1.6vh, 16px); bottom: clamp(10px, 1.6vh, 16px); }
  .es-content .es-tabs { margin-bottom: clamp(10px, 1.8vh, 18px); }
  /* Tuiles chiffrées, barres de filtres et rangées de cartes */
  .kpi { padding: clamp(10px, 1.8vh, 18px) clamp(14px, 1.4vw, 20px); }
  .kpi-value { font-size: clamp(1.3rem, min(1.7vw, 3.2vh), 1.9rem); }
  .es-content .icon-circle.lg, .kpi .icon-circle { width: clamp(38px, 5.6vh, 48px); height: clamp(38px, 5.6vh, 48px); }
  .filter-bar { margin-bottom: clamp(8px, 1.4vh, 14px); }
  .filter-bar .form-select, .filter-bar .form-control { min-height: clamp(38px, 5.4vh, 44px); }
  .es-content > .row.mb-4, .es-content > .row.mb-3 { margin-bottom: clamp(.6rem, 1.8vh, 1.5rem) !important; }
  .es-content > .row.g-3 { --bs-gutter-y: clamp(.6rem, 1.6vh, 1rem); }
}

/* Page de connexion : tient entièrement dans la hauteur de l'écran (ordinateur) */
@media (min-width: 992px) {
  .auth-body { min-height: 100vh; min-height: 100dvh; }
  .auth-shell { min-height: 0; flex: 1 1 auto; grid-template-columns: minmax(360px, 1fr) minmax(460px, 1.1fr); }
  .auth-hero { padding: clamp(22px, 5vh, 56px) clamp(32px, 4vw, 56px) 0; min-height: 0; }
  .auth-hero .brand-plate { padding: clamp(8px, 1.4vh, 14px) clamp(14px, 1.6vw, 20px); }
  .auth-hero .brand-plate img { height: clamp(42px, 7vh, 72px); }
  .auth-hero h1 { font-size: clamp(1.5rem, 3.6vh, 2.15rem); margin-top: clamp(14px, 3.2vh, 34px); }
  .auth-hero .gold-rule { margin: clamp(10px, 1.8vh, 18px) 0; }
  .auth-hero p.lead { font-size: clamp(1rem, 2vh, 1.2rem); margin-bottom: 0; }
  .auth-feats { gap: clamp(14px, 2vw, 34px); margin-top: clamp(14px, 2.6vh, 26px); flex-wrap: nowrap; }
  .auth-feat { width: auto; flex: 1 1 0; max-width: 132px; }
  .auth-feat .ring-ico { width: clamp(52px, 8vh, 78px); height: clamp(52px, 8vh, 78px); font-size: clamp(1.3rem, 2.4vh, 1.9rem); margin-bottom: clamp(6px, 1vh, 10px); }
  .auth-feat span { font-size: clamp(.86rem, 1.6vh, 1.02rem); }
  .auth-art { flex: 1 1 0; height: auto; min-height: 0; max-height: 300px; margin-left: calc(-1 * clamp(32px, 4vw, 56px)); margin-right: calc(-1 * clamp(32px, 4vw, 56px)); }
  .auth-art.djenne { max-height: 420px; }

  .auth-panel { min-height: 0; padding: clamp(6px, 1.4vh, 34px) clamp(18px, 2.4vw, 40px); }
  .auth-card { max-width: 540px; padding: clamp(14px, 2.8vh, 34px) clamp(26px, 2.8vw, 40px) clamp(12px, 2.4vh, 32px); }
  .auth-card-top { position: absolute; top: 12px; right: 14px; margin: 0; }
  .auth-card .logo { width: auto; height: clamp(32px, 5.6vh, 60px); margin: 0 auto clamp(4px, 1.2vh, 14px); }
  .auth-card h2 { font-size: clamp(1.35rem, 3.3vh, 1.85rem); }
  .auth-card .sub { font-size: clamp(.92rem, 1.9vh, 1.08rem); margin-bottom: clamp(8px, 1.8vh, 24px); }
  .auth-card .es-instance { margin-bottom: clamp(10px, 1.8vh, 18px); }
  .auth-card .es-instance-legend { margin-bottom: clamp(6px, 1vh, 10px); }
  .auth-card .es-instance-info { margin-top: clamp(6px, 1vh, 10px); }
  .auth-card .form-control { min-height: clamp(42px, 6vh, 56px); }
  .auth-card .mb-3 { margin-bottom: clamp(8px, 1.6vh, 16px) !important; }
  .auth-card .mb-4 { margin-bottom: clamp(10px, 2.2vh, 24px) !important; }
  .auth-card .btn-lg { min-height: clamp(44px, 6.2vh, 58px); padding-top: 0; padding-bottom: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .auth-card .divider-or { margin: clamp(8px, 1.8vh, 18px) 0; }
  .auth-card > p.mt-4 { margin-top: clamp(10px, 2vh, 24px) !important; }
  .auth-footer { padding: clamp(8px, 1.4vh, 14px) 28px; }
}
@media (min-width: 992px) and (max-height: 760px) {
  .auth-card .sub { margin-bottom: 6px; }
  .auth-card .divider-or { margin: 6px 0; }
  .auth-card > p.mt-4 { font-size: .78rem; line-height: 1.35; margin-top: 8px !important; }
  .auth-card .es-instance-info { min-height: 0; }
}
@media (min-width: 992px) and (max-height: 680px) {
  .auth-card .logo { height: 30px; }
  .auth-card .form-control { min-height: 40px; }
  .auth-card .btn-lg { min-height: 42px; }
  .auth-card .mb-3 { margin-bottom: 6px !important; }
}

/* En-tête : éléments compacts sur une seule ligne (sélecteur de langue ajouté) */
.es-date-chip .lbl, .es-date-chip .sub, .es-net, .es-quick-sale, .es-shop-name, .es-shop-city, .es-user-btn .name { white-space: nowrap; }
.es-topbar-search { min-width: 140px; flex: 1 1 200px; }
.es-topbar-right { flex: 0 0 auto; }
@media (max-width: 1599.98px) { .es-net-wrap { display: none !important; } }
@media (max-width: 1439.98px) { .es-topbar-search { display: none; } .es-topbar-divider { margin: 0 4px; } }
