/* ═══════════════════════════════════════
   RESET + TOKENS
═══════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;height:100dvh;overflow:hidden;font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;font-size:14px}
button{font-family:inherit;cursor:pointer;border:none;background:none}
input,select,textarea{font-family:inherit}
:root{
  --bg:#f5f6fa;--bg2:#edeff7;
  --surface:#ffffff;--surface2:#f0f2f8;--surface3:#e8eaf3;
  --border:rgba(0,0,0,.08);--border2:rgba(0,0,0,.14);--border3:rgba(0,0,0,.22);
  --text:#1a1d28;--text2:#4a5068;--text3:#7b839e;--text4:#b0b8d0;
  --orange:#F5A623;--orange2:#d4891a;
  --orange-dim:rgba(245,166,35,.12);--orange-glow:rgba(245,166,35,.2);
  --violet:#6a3ba0;--violet2:#7c50b4;--violet3:#6a3ba0;
  --violet-dim:rgba(106,59,160,.10);
  --green:#16a34a;--green-dim:rgba(22,163,74,.10);
  --red:#dc2626;--red-dim:rgba(220,38,38,.08);
  --blue:#2563eb;--blue-dim:rgba(37,99,235,.08);
  --amber:#d97706;--amber-dim:rgba(217,119,6,.10);
  --r:8px;--r-sm:6px;--r-xs:4px;
  --sb-w:220px;--sb-w-sm:64px;--nav-h:56px;
  --c-jaune:#f5c842;--c-vert:#22c55e;--c-bleu:#3b82f6;
  --c-rouge:#ef4444;--c-blanc:#a0a0c0;--c-noir:#555570;
  --font-body:'DM Sans',system-ui,sans-serif;
  --font-mono:'DM Mono',monospace;
  /* ── Typographie ── */
  --text-page-title:700 1.25rem/1.2 var(--font-body);
  --text-section-title:600 0.95rem/1.3 var(--font-body);
  --text-nav-label:500 0.84rem/1 var(--font-body);
  --text-meta-label:500 0.65rem/1 var(--font-mono);
  --text-data:400 0.84rem/1.5 var(--font-body);
  --text-kpi:700 1.6rem/1 var(--font-body);
  --text-secondary:400 0.76rem/1.5 var(--font-body);
  --text-empty:400 0.84rem/1.6 var(--font-body);
  --text-button:600 0.82rem/1 var(--font-body);
  --text-placeholder:400 0.84rem/1 var(--font-body);
  --text-link:500 inherit/inherit var(--font-body);
  --text-badge:500 0.65rem/1 var(--font-mono);
  --text-error:500 0.76rem/1.5 var(--font-body);
}

/* ═══════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════ */
#app{width:100%;height:100dvh;display:flex;flex-direction:row;background:var(--bg);overflow:hidden;position:relative}

/* ── Sidebar ── */
#sidebar{
  width:var(--sb-w);flex-shrink:0;
  display:flex;flex-direction:column;
  background:var(--bg2);border-right:1px solid var(--border);
  height:100%;overflow:hidden;z-index:20;
  transition:width .2s ease;
}
#sidebar.collapsed{width:var(--sb-w-sm)}
#sb-header{
  display:flex;align-items:center;
  padding:0 14px;height:48px;flex-shrink:0;min-width:0;
  border-bottom:1px solid var(--border);
}
.sb-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.sb-brand-icon{
  width:20px;height:20px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
}
.sb-brand-icon svg{width:18px;height:18px;stroke:var(--text2);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sb-brand-name{
  font-size:.72rem;font-weight:700;color:var(--text2);
  letter-spacing:.8px;text-transform:uppercase;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;
}
#sidebar.collapsed .sb-brand-name{display:none}
#sidebar.collapsed #sb-header{padding:0 8px;justify-content:center}
#sb-salle{display:none}
#sb-toggle{display:none}
#sb-toggle{
  width:24px;height:24px;border-radius:4px;flex-shrink:0;
  border:1px solid var(--border);background:none;
  color:var(--text3);display:flex;align-items:center;justify-content:center;cursor:pointer;
  transition:all .15s;
}
#sb-toggle:hover{border-color:var(--border2);color:var(--text)}
#sb-toggle svg{width:12px;height:12px;stroke:currentColor;fill:none;transition:transform .2s}
#sidebar.collapsed #sb-toggle svg{transform:rotate(180deg)}
#sidebar.collapsed #sb-salle,#sidebar.collapsed #sb-badge{display:none}
#sidebar.collapsed #sb-header{padding:0 8px;justify-content:center}

#sb-nav{flex:1;overflow-y:auto;overflow-x:hidden;padding:8px 0;scrollbar-width:none}
#sb-nav::-webkit-scrollbar{display:none}

.sb-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 14px;cursor:pointer;border:none;background:none;
  color:var(--text2);font-size:.84rem;font-weight:500;
  width:100%;text-align:left;position:relative;
  border-radius:0;transition:all .12s;white-space:nowrap;
}
.sb-item:hover{background:var(--surface);color:var(--text)}
.sb-item.active{background:var(--orange-dim);color:var(--orange)}
.sb-item.active::before{content:'';position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--orange);border-radius:0 2px 2px 0}
.sb-item svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;flex-shrink:0}
.sb-label{font-size:.84rem;font-weight:500;flex:1}
.sb-badge{
  min-width:18px;height:18px;border-radius:9px;background:var(--red);
  font-size:.6rem;font-weight:700;color:#fff;
  display:flex;align-items:center;justify-content:center;
  padding:0 5px;flex-shrink:0;
}
#sidebar.collapsed .sb-label,#sidebar.collapsed .sb-badge{display:none}
#sidebar.collapsed .sb-item{padding:9px;justify-content:center}
#sidebar.collapsed #sb-user-info{display:none}
#sidebar.collapsed #sb-logout-label{display:none}
#sidebar.collapsed #sb-footer{padding:10px;display:flex;flex-direction:column;align-items:center}
#sidebar.collapsed #sb-user{margin-bottom:0;justify-content:center}

.sb-section{
  font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;
  text-transform:uppercase;color:var(--text3);padding:12px 14px 4px;
  white-space:nowrap;
}
#sidebar.collapsed .sb-section{display:none}

#sb-footer{
  border-top:1px solid var(--border);padding:12px 14px;flex-shrink:0;
}
#sb-user{display:flex;align-items:center;gap:8px;margin-bottom:8px;min-width:0}
#sb-avatar{
  width:30px;height:30px;border-radius:6px;flex-shrink:0;
  background:var(--violet-dim);border:1px solid var(--violet2);
  display:flex;align-items:center;justify-content:center;
  font-size:.7rem;font-weight:700;color:var(--violet3);
}
#sb-user-info{flex:1;min-width:0}
#sb-user-name{font-size:.84rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sb-user-role{font-size:.65rem;font-weight:500;color:var(--text2);font-family:'DM Mono',monospace}
#sidebar.collapsed #sb-user-info,#sidebar.collapsed #sb-logout-label{display:none}
#sidebar.collapsed #sb-footer{padding:10px;display:flex;flex-direction:column;align-items:center;gap:8px}
#sidebar.collapsed #sb-user{margin-bottom:0;justify-content:center}
.sb-logout{
  display:flex;align-items:center;gap:8px;width:100%;
  padding:7px 10px;border-radius:var(--r-sm);
  border:1px solid var(--border);background:none;
  color:var(--text3);font-size:.84rem;font-weight:500;cursor:pointer;
  transition:all .15s;
}
.sb-logout:hover{border-color:rgba(239,68,68,.3);color:var(--red);background:var(--red-dim)}
.sb-logout svg{width:14px;height:14px;stroke:currentColor;fill:none;flex-shrink:0}

/* ── Page wrap & content ── */
#page-wrap{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;overflow:hidden}
#main-content{flex:1;min-height:0;position:relative;overflow:hidden}

/* ═══════════════════════════════════════
   PAGES
═══════════════════════════════════════ */
.page{display:none;flex-direction:column;position:absolute;inset:0;height:100%;background:var(--bg);overflow:hidden}
.page.active{display:flex;animation:fadeIn .18s ease both}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.scroll-area{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;scrollbar-width:none}
.scroll-area::-webkit-scrollbar{display:none}

/* ── Login ── */
#page-login{
  position:fixed;inset:0;z-index:9999;
  background:var(--bg);justify-content:center;align-items:center;padding:24px;
}
.login-card{width:100%;max-width:340px;background:var(--surface);border:1px solid var(--border2);border-radius:12px;padding:32px 28px}
.login-logo-wrap{display:flex;justify-content:center;margin-bottom:20px}
.login-logo-wrap img{height:64px;width:auto;object-fit:contain}
.login-eyebrow{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);text-align:center;margin-bottom:6px}
.login-title{font-size:1.25rem;font-weight:700;color:var(--text);letter-spacing:-.3px;line-height:1.2;text-align:center;margin-bottom:2px}
.login-sub{font-size:.76rem;color:var(--text2);text-align:center;margin-bottom:24px}
.login-divider{height:1px;background:var(--border);margin:20px 0}
.demo-hint{background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 12px;font-size:.72rem;color:var(--text3);font-family:'DM Mono',monospace;margin-bottom:16px}
.demo-hint span{color:var(--orange);font-weight:500}

/* ═══════════════════════════════════════
   TOP HEADER (page-level)
═══════════════════════════════════════ */
.top-header{display:flex;align-items:center;padding:0 16px;height:48px;flex-shrink:0;border-bottom:1px solid var(--border);background:var(--bg);position:relative;z-index:10}
.th-left{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
.th-divider{width:1px;height:16px;background:var(--border2);flex-shrink:0}
.th-title{font-family:'DM Sans',system-ui,sans-serif;font-size:1.25rem;font-weight:700;color:var(--text);letter-spacing:-.3px;line-height:1.2}
.th-right{display:flex;align-items:center;gap:8px}
/* Page bar — titre + sous-titre (gauche) + boutons d'action (droite) */
.page-bar{display:flex;align-items:center;gap:8px;padding:8px 14px 2px;flex-shrink:0;background:var(--bg)}
.page-bar-title{font-size:1.1rem;font-weight:700;color:var(--text);letter-spacing:-.3px;line-height:1.2}
.page-bar-sub{font-size:.65rem;font-weight:400;color:var(--text3);white-space:nowrap}
.page-bar-sub::before{content:'· '}
.page-bar-spacer{flex:1} /* pousse les boutons vers la droite */
@media(max-width:767px){.page-bar-title{font-size:.95rem}}

/* User info dans th-right (desktop seulement) */
.th-user-info{display:none;flex-direction:column;gap:1px;min-width:0}
.th-user-info-name{font-size:.78rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-user-info-role{font-size:.6rem;font-family:var(--font-mono);color:var(--text3);text-transform:uppercase;letter-spacing:.8px;white-space:nowrap}
@media(min-width:1024px){.th-user-info{display:flex}}
.th-sub{font-size:.68rem;font-weight:400;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:1;min-width:0}
.th-sub::before{content:'· '}
.th-logo{height:22px;width:auto;max-width:110px;object-fit:contain;flex-shrink:0}
@media(min-width:768px){.th-logo{display:none}}
.th-sb-toggle{
  width:28px;height:28px;border-radius:var(--r-sm);
  border:1px solid var(--border);background:none;
  color:var(--text3);display:flex;align-items:center;justify-content:center;
  cursor:pointer;flex-shrink:0;transition:all .15s;
}
.th-sb-toggle:hover{border-color:var(--border2);color:var(--text)}
.th-sb-toggle svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;transition:transform .2s;flex-shrink:0}
/* Chevron directionnel : → quand collapsed (menu fermé = va s'ouvrir à droite), ← quand expanded */
#sidebar.collapsed~#page-wrap .th-sb-toggle svg{transform:rotate(180deg)}
@media(max-width:767px){.th-sb-toggle{display:none}}
.th-retour svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2.5;flex-shrink:0}

/* Salle compact + user menu dans th-right */
.th-salle{
  display:flex;align-items:center;gap:5px;
  height:28px;padding:0 10px;border-radius:var(--r-xs);
  border:1px solid var(--border);background:var(--surface2);
  cursor:pointer;transition:all .15s;white-space:nowrap;
  font-size:.68rem;font-weight:600;color:var(--text2);
  font-family:var(--font-mono);letter-spacing:.3px;
}
.th-salle:hover{border-color:var(--border2);color:var(--text)}
.th-salle svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2}
.th-user-btn{
  width:30px;height:30px;border-radius:50%;
  border:1.5px solid var(--border2);background:var(--violet-dim);
  color:var(--violet);font-size:.68rem;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:all .15s;flex-shrink:0;font-family:var(--font-mono);
  position:relative;
}
.th-user-btn:hover{border-color:var(--violet2);background:rgba(106,59,160,.18)}
/* Dropdown user */
.th-user-drop{
  position:absolute;top:calc(100% + 6px);right:0;z-index:300;
  background:var(--surface);border:1px solid var(--border2);border-radius:var(--r-sm);
  padding:6px;min-width:180px;box-shadow:0 4px 16px rgba(0,0,0,.10);
  display:none;
}
.th-user-drop.open{display:block}
.th-user-drop-header{padding:8px 10px 6px;border-bottom:1px solid var(--border);margin-bottom:4px}
.th-user-drop-name{font-size:.82rem;font-weight:600;color:var(--text)}
.th-user-drop-role{font-size:.65rem;font-family:var(--font-mono);color:var(--text3);text-transform:uppercase;letter-spacing:1px}
.th-user-drop-item{
  display:flex;align-items:center;gap:8px;padding:7px 10px;
  border-radius:var(--r-xs);cursor:pointer;font-size:.82rem;color:var(--text2);
  transition:background .1s;border:none;background:none;width:100%;text-align:left;
  font-family:var(--font-body);
}
.th-user-drop-item:hover{background:var(--surface2);color:var(--text)}
.th-user-drop-item svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0}
.th-user-drop-item.danger{color:var(--red)}
.th-user-drop-item.danger:hover{background:var(--red-dim)}
.th-badge{background:var(--orange-dim);border:1px solid var(--orange-glow);border-radius:4px;padding:2px 8px;font-family:'DM Mono',monospace;font-size:.6rem;letter-spacing:1px;text-transform:uppercase;color:var(--orange);font-weight:500}
.th-avatar{width:28px;height:28px;border-radius:6px;background:var(--violet-dim);border:1px solid var(--violet2);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;color:var(--violet3);cursor:pointer;flex-shrink:0;transition:all .15s}
.th-avatar:hover{background:rgba(106,59,160,.25)}

/* ═══════════════════════════════════════
   BOTTOM NAV (mobile)
═══════════════════════════════════════ */
#bottom-nav{
  display:flex;align-items:stretch;
  border-top:1px solid var(--border);background:var(--bg2);
  flex-shrink:0;height:var(--nav-h);
  padding-bottom:max(0px,env(safe-area-inset-bottom));
}
.nav-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 4px;cursor:pointer;border:none;background:none;transition:all .15s;border-top:2px solid transparent;position:relative}
.nav-item.active{border-top-color:var(--orange);background:var(--surface)}
.nav-item svg{width:18px;height:18px;stroke:var(--text3);fill:none;stroke-width:1.8;transition:all .15s}
.nav-item.active svg{stroke:var(--orange)}
.nav-item span{font-size:.84rem;font-weight:500;letter-spacing:.1px;color:var(--text2);transition:all .15s}
.nav-item.active span{color:var(--orange)}
.nav-badge{position:absolute;top:6px;right:calc(50% - 14px);min-width:16px;height:16px;border-radius:8px;background:var(--red);font-size:.58rem;font-weight:700;color:#fff;display:flex;align-items:center;justify-content:center;padding:0 3px}

/* More drawer (mobile) */
#more-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(4px);z-index:400;display:flex;align-items:flex-end;opacity:0;pointer-events:none;transition:opacity .25s}
#more-overlay.open{opacity:1;pointer-events:all}
#more-drawer{background:var(--surface);border-top:1px solid var(--border2);border-radius:16px 16px 0 0;padding:16px 0 max(24px,env(safe-area-inset-bottom));width:100%;transform:translateY(100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}
#more-overlay.open #more-drawer{transform:translateY(0)}
.more-handle{width:32px;height:3px;background:var(--border2);border-radius:2px;margin:0 auto 16px}
.more-title{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);padding:0 16px 10px}
.more-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 16px}
.more-item{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 8px;border-radius:var(--r);background:var(--surface2);border:1px solid var(--border);cursor:pointer;transition:all .15s}
.more-item:hover,.more-item:active{background:var(--surface3);border-color:var(--border2)}
.more-item svg{width:20px;height:20px;stroke:var(--text2);fill:none;stroke-width:1.8}
.more-item span{font-size:.84rem;font-weight:500;color:var(--text2);text-align:center}
.more-item.active svg{stroke:var(--orange)}
.more-item.active span{color:var(--orange)}

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-group{margin-bottom:14px}
.form-label{display:block;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);margin-bottom:6px;font-family:'DM Mono',monospace}
.form-input{width:100%;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--r-sm);padding:10px 12px;color:var(--text);font-size:.84rem;font-weight:400;outline:none;transition:all .15s;appearance:none;-webkit-appearance:none}
.form-input:focus{border-color:var(--orange);background:var(--surface3);box-shadow:0 0 0 3px var(--orange-dim)}
.form-input::placeholder{color:var(--text4)}
select.form-input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5068' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:30px}
select.form-input option{background:var(--surface)}
.input-wrap{position:relative}
.input-suffix{position:absolute;right:10px;top:50%;transform:translateY(-50%);cursor:pointer;background:none;border:none;color:var(--text3);display:flex}
.input-suffix svg{width:15px;height:15px;stroke:currentColor;fill:none}
.error-msg{font-size:.76rem;font-weight:500;color:var(--red);line-height:1.5;margin-top:5px;display:none}
.error-msg.show{display:block}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.form-hint{font-size:.76rem;color:var(--text2);margin-top:4px;line-height:1.5}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:11px 22px;border-radius:var(--r-sm);font-size:.82rem;font-weight:600;cursor:pointer;border:none;transition:all .15s;white-space:nowrap;line-height:1;letter-spacing:.2px;font-family:'DM Sans',sans-serif}
.btn:active{transform:scale(.98)}
.btn-w{width:100%}
.btn-primary{background:var(--orange);color:#1a0d00}
.btn-primary:hover{background:var(--orange2)}
.btn-secondary{background:var(--surface2);color:var(--text);border:1px solid var(--border2)}
.btn-secondary:hover{border-color:var(--border3);background:var(--surface3)}
.btn-ghost{background:transparent;color:var(--text2);border:1px solid var(--border)}
.btn-ghost:hover{border-color:var(--border2);color:var(--text)}
.btn-danger{background:var(--red);color:#fff;border:none}
.btn-danger:hover{background:#b91c1c}
.btn-success{background:var(--green);color:#fff;border:none}
.btn-success:hover{background:#15803d}
.btn-filter{background:var(--surface3);color:var(--text);border:1px solid var(--border2)}
.btn-filter:hover{border-color:var(--border3);background:var(--surface2)}
.btn-filter-reset{background:var(--surface2);color:var(--text3);border:1px solid var(--border)}
.btn-filter-reset:hover{background:var(--surface3);color:var(--text2);border-color:var(--border2)}
.btn-sm{padding:9px 18px;font-size:.76rem}
.btn-xs{padding:6px 13px;font-size:.68rem;border-radius:var(--r-xs)}
.icon-btn{width:30px;height:30px;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface2);color:var(--text3);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;flex-shrink:0}
.icon-btn svg{width:13px;height:13px;stroke:currentColor;fill:none}
.icon-btn:hover{border-color:var(--border2);color:var(--text)}
.icon-btn.del:hover{border-color:rgba(239,68,68,.3);color:var(--red);background:var(--red-dim)}
.icon-btn.ok:hover{border-color:rgba(34,197,94,.3);color:var(--green);background:var(--green-dim)}

/* ═══════════════════════════════════════
   TABLE / LIST
═══════════════════════════════════════ */
.data-table{width:100%;border-collapse:collapse}
.data-table th{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);padding:8px 12px;text-align:left;border-bottom:1px solid var(--border);background:var(--surface);position:sticky;top:0;z-index:2}
.data-table td{padding:9px 12px;border-bottom:1px solid var(--border);vertical-align:middle;font-size:.84rem;color:var(--text)}
.data-table tr:last-child td{border-bottom:none}
.data-table tr:hover td{background:var(--surface2)}
.td-primary{color:var(--text);font-weight:600}
.table-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;overflow-x:auto}

.row-card{display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--border);transition:background .12s;cursor:pointer}
.row-card:last-child{border-bottom:none}
.row-card:hover{background:var(--surface2)}
.row-thumb{width:44px;height:44px;border-radius:var(--r-sm);flex-shrink:0;background:var(--surface2);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:1.3rem;overflow:hidden}
.row-thumb img{width:100%;height:100%;object-fit:cover}
.row-info{flex:1;min-width:0}
.row-name{font-size:.84rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}
.row-sub{font-size:.76rem;color:var(--text2);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.row-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}

/* ═══════════════════════════════════════
   KPI CARDS
═══════════════════════════════════════ */
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;padding:14px 14px 0}
.kpi-grid-3{grid-template-columns:repeat(3,1fr)}
.kpi-grid-2{grid-template-columns:repeat(2,1fr)}
.kpi-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px;transition:border-color .15s,background .15s}
.kpi-card.warn{border-color:rgba(239,68,68,.3)}
.kpi-card.aging{border-color:rgba(245,158,11,.3)}
.kpi-card[onclick]{cursor:pointer}
.kpi-card[onclick]:hover{border-color:var(--border2);background:var(--surface2)}
.kpi-label{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);margin-bottom:6px}
.kpi-value{font-size:1.6rem;font-weight:700;color:var(--text);line-height:1}
.kpi-value.red{color:var(--red)}
.kpi-delta{font-size:.76rem;color:var(--text2);margin-top:3px;font-weight:400}

/* ═══════════════════════════════════════
   BADGES & PILLS
═══════════════════════════════════════ */
.pill{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:.8px;text-transform:uppercase;white-space:nowrap}
.pill-jaune{background:rgba(245,200,66,.12);color:#d4a900;border:1px solid rgba(245,200,66,.2)}
.pill-vert{background:rgba(34,197,94,.1);color:#16a34a;border:1px solid rgba(34,197,94,.15)}
.pill-bleu{background:rgba(59,130,246,.1);color:#2563eb;border:1px solid rgba(59,130,246,.15)}
.pill-rouge{background:rgba(239,68,68,.1);color:#dc2626;border:1px solid rgba(239,68,68,.15)}
.pill-blanc{background:rgba(160,160,192,.1);color:#8888a8;border:1px solid rgba(160,160,192,.15)}
.pill-noir{background:rgba(85,85,112,.1);color:#666688;border:1px solid rgba(85,85,112,.15)}
.pill-dot{width:5px;height:5px;border-radius:50%}
.pill-jaune .pill-dot{background:#d4a900}.pill-vert .pill-dot{background:#16a34a}
.pill-bleu .pill-dot{background:#2563eb}.pill-rouge .pill-dot{background:#dc2626}
.pill-blanc .pill-dot{background:#8888a8}.pill-noir .pill-dot{background:#666688}

.status-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:4px;font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:.8px;text-transform:uppercase;white-space:nowrap}
.s-active{background:var(--green-dim);color:var(--green);border:1px solid rgba(34,197,94,.2)}
.s-pending{background:var(--amber-dim);color:var(--amber);border:1px solid rgba(245,158,11,.2)}
.s-archived{background:var(--surface2);color:var(--text3);border:1px solid var(--border)}
.live-dot{width:5px;height:5px;border-radius:50%;background:currentColor;animation:blink 1.8s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.3}}

/* ═══════════════════════════════════════
   SECTION HEADERS / FILTERS
═══════════════════════════════════════ */
.section-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px 8px}
.section-label{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2)}
.page-title{font-size:1.25rem;font-weight:700;color:var(--text);letter-spacing:-.3px;line-height:1.2}
.filter-tabs{display:flex;gap:4px;padding:0 14px 12px;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap}
.filter-tabs::-webkit-scrollbar{display:none}
.ftab{padding:5px 12px;border-radius:var(--r-xs);font-size:.84rem;font-weight:500;cursor:pointer;white-space:nowrap;flex-shrink:0;border:1px solid transparent;background:none;color:var(--text3);transition:all .15s;font-family:'DM Sans',sans-serif}
.ftab.active{background:var(--surface2);color:var(--text);border-color:var(--border2)}
.ftab:not(.active):hover{color:var(--text2)}

/* ── Filter Block ── */
.filter-block{
  margin:10px 14px 0;
  padding:8px 10px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r);
  flex-shrink:0;
}
.filter-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.filter-block-title{
  font-family:var(--font-mono);font-size:.6rem;font-weight:500;
  letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);
  flex-shrink:0;white-space:nowrap;align-self:center;padding-right:2px;
}
.filter-block .search-bar{
  padding:3px 10px;
  width:150px;flex:0 0 150px;
  margin:0;border-radius:var(--r-xs);
}
.filter-actions{display:flex;gap:6px;flex-shrink:0;margin-left:auto}
/* Multi-select — hauteur alignée sur .btn-xs */
.ms-wrap{position:relative;flex-shrink:0}
.ms-btn{
  display:inline-flex;align-items:center;gap:5px;
  padding:4px 9px;border-radius:var(--r-xs);
  border:1px solid var(--border2);background:var(--surface2);
  color:var(--text2);font-size:.68rem;font-weight:500;
  cursor:pointer;transition:all .15s;white-space:nowrap;
  font-family:var(--font-body);line-height:1;
}
.ms-btn:hover,.ms-wrap.ms-open .ms-btn{border-color:var(--border3);color:var(--text);background:var(--surface3)}
.ms-btn svg{width:10px;height:10px;stroke:currentColor;fill:none;stroke-width:2.5;transition:transform .2s;flex-shrink:0}
.ms-wrap.ms-open .ms-btn svg{transform:rotate(180deg)}
.ms-lbl.ms-on{color:var(--orange);font-weight:600}
.ms-panel{position:absolute;top:calc(100% + 4px);left:0;z-index:120;background:var(--surface);border:1px solid var(--border2);border-radius:var(--r-sm);padding:4px;min-width:175px;max-height:240px;overflow-y:auto;box-shadow:0 4px 16px rgba(0,0,0,.10);display:none;scrollbar-width:none}
.ms-wrap.ms-open .ms-panel{display:block}
.ms-opt{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:var(--r-xs);cursor:pointer;font-size:.82rem;color:var(--text);transition:background .1s}
.ms-opt:hover{background:var(--surface2)}
.ms-opt input[type=checkbox]{width:14px;height:14px;accent-color:var(--orange);cursor:pointer;flex-shrink:0}
.ms-empty{font-size:.75rem;color:var(--text3);padding:8px 10px}
/* Inputs date/select dans le bloc filtres : alignés sur la hauteur btn-xs */
.filter-block .form-input{padding:3px 10px;font-size:.76rem}
.search-bar{display:flex;align-items:center;gap:8px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 12px;margin:0 14px 12px}
.search-bar svg{width:14px;height:14px;stroke:var(--text3);fill:none;flex-shrink:0}
.search-bar input{flex:1;background:none;border:none;color:var(--text);font-size:.84rem;outline:none}
.search-bar input::placeholder{color:var(--text4)}

/* ═══════════════════════════════════════
   OVERLAYS / DRAWERS / DIALOGS
═══════════════════════════════════════ */
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.75);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);z-index:200;display:flex;align-items:flex-end;justify-content:center;opacity:0;pointer-events:none;transition:opacity .25s}
.overlay.open{opacity:1;pointer-events:all}
.drawer{background:var(--surface);border-top:1px solid var(--border2);border-radius:12px 12px 0 0;padding:0 18px 36px;width:100%;max-width:520px;max-height:92dvh;overflow-y:auto;scrollbar-width:none;transform:translateY(100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}
.drawer::-webkit-scrollbar{display:none}
.overlay.open .drawer{transform:translateY(0)}
.drawer-handle{width:32px;height:3px;background:var(--border2);border-radius:2px;margin:12px auto 20px}
.drawer-title{font-size:.95rem;font-weight:600;color:var(--text);margin-bottom:18px;display:flex;align-items:center;gap:8px}
.drawer-title svg{width:18px;height:18px;stroke:var(--orange);fill:none;flex-shrink:0}

.dialog-overlay{position:fixed;inset:0;background:rgba(0,0,0,.85);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:300;display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;pointer-events:none;transition:opacity .22s}
.dialog-overlay.open{opacity:1;pointer-events:all}
.dialog-box{background:var(--surface);border:1px solid var(--border2);border-radius:10px;padding:22px 18px;width:100%;max-width:310px;transform:scale(.94);transition:transform .25s cubic-bezier(.34,1.56,.64,1)}
.dialog-overlay.open .dialog-box{transform:scale(1)}
.dialog-icon{font-size:1.8rem;margin-bottom:10px}
.dialog-title{font-size:.95rem;font-weight:600;color:var(--text);margin-bottom:6px}
.dialog-desc{font-size:.76rem;color:var(--text2);line-height:1.5;margin-bottom:18px}
.dialog-actions{display:flex;gap:8px}

/* TOAST — défini en bas du fichier (haut-droite) */

/* ═══════════════════════════════════════
   MISC COMPONENTS
═══════════════════════════════════════ */
.toggle{position:relative;display:inline-flex;align-items:center;cursor:pointer;gap:8px}
.toggle input{opacity:0;width:0;height:0;position:absolute}
.toggle-track{width:36px;height:20px;background:var(--border2);border-radius:10px;transition:all .2s;position:relative;flex-shrink:0}
.toggle input:checked+.toggle-track{background:var(--orange)}
.toggle-thumb{position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .2s;pointer-events:none}
.toggle input:checked~.toggle-thumb{left:19px}
.toggle-label{font-size:.84rem;font-weight:400;color:var(--text2)}

.chart-bar-row{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.chart-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.chart-name{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;color:var(--text2);width:48px;flex-shrink:0}
.chart-track{flex:1;height:5px;background:var(--surface2);border-radius:3px;overflow:hidden}
.chart-fill{height:100%;border-radius:3px;opacity:.8}
.chart-count{font-family:'DM Mono',monospace;font-size:.62rem;font-weight:500;color:var(--text2);width:24px;text-align:right}

.upload-btns{display:flex;gap:8px;margin-bottom:8px}
.photo-preview{border-radius:var(--r);overflow:hidden;display:none;border:1px solid var(--border);position:relative;margin-bottom:8px}
.photo-preview img{width:100%;height:160px;object-fit:cover;display:block}
.remove-photo{position:absolute;top:8px;right:8px;width:26px;height:26px;border-radius:50%;background:rgba(0,0,0,.7);border:1px solid rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;cursor:pointer}
.remove-photo svg{width:12px;height:12px;stroke:#fff;fill:none}

.swatch-row{display:flex;gap:8px;flex-wrap:wrap}
.swatch{width:34px;height:34px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:all .18s;display:flex;align-items:center;justify-content:center;position:relative}
.swatch.sel{border-color:#fff;transform:scale(1.15)}
.swatch.sel::after{content:'';width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.9);position:absolute}

.divider{border:none;border-top:1px solid var(--border);margin:12px 0}
.empty{text-align:center;padding:36px 16px}
.empty svg{width:36px;height:36px;stroke:var(--text4);fill:none;margin-bottom:10px}
.empty p{font-size:.84rem;color:var(--text3);line-height:1.6}
.empty a{color:var(--orange);font-weight:500;text-decoration:none;cursor:pointer;transition:opacity .15s ease}
.empty a:hover{text-decoration:underline;opacity:.85}
.tag{display:inline-block;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-xs);padding:2px 7px;font-family:'DM Mono',monospace;font-size:.62rem;font-weight:500;color:var(--text2)}
.back-btn{display:none}
.back-btn + .th-divider{display:none}

/* Alert card */
.alert-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;margin-bottom:8px}
.alert-card.warn{border-color:rgba(245,158,11,.3)}
.alert-card.danger{border-color:rgba(239,68,68,.3)}
.alert-card.info{border-color:rgba(59,130,246,.2)}
.alert-header{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.alert-header svg{width:14px;height:14px;stroke:currentColor;fill:none;flex-shrink:0}
.alert-title{font-size:.84rem;font-weight:600;color:var(--text)}

/* Settings sections */
.settings-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px;margin-bottom:12px}
.settings-section-title{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}

/* Horaire row */
.horaire-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--border)}
.horaire-row:last-child{border-bottom:none}
.horaire-day{font-size:.78rem;font-weight:600;color:var(--text);width:80px;flex-shrink:0}
.horaire-inputs{display:flex;align-items:center;gap:6px;flex:1}
.horaire-input{width:80px;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--r-sm);padding:5px 8px;color:var(--text);font-size:.84rem;outline:none}
.horaire-input:focus{border-color:var(--orange)}
.horaire-sep{font-size:.76rem;color:var(--text2)}

::-webkit-scrollbar{width:0}

/* ═══════════════════════════════════════
   DETAIL PAGES — tabs, info-grid, voie hero
═══════════════════════════════════════ */
.detail-tabs-bar{
  display:flex;padding:0 14px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;background:var(--bg);
  overflow-x:auto;scrollbar-width:none;
}
.detail-tabs-bar::-webkit-scrollbar{display:none}
.detail-tab{
  padding:11px 14px;font-size:.84rem;font-weight:500;
  color:var(--text3);background:none;border:none;cursor:pointer;
  border-bottom:2px solid transparent;margin-bottom:-1px;
  transition:all .15s;white-space:nowrap;flex-shrink:0;
  font-family:'DM Sans',sans-serif;
}
.detail-tab:hover{color:var(--text2)}
.detail-tab.active{color:var(--orange);border-bottom-color:var(--orange)}

.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}
@media(max-width:360px){.info-grid{grid-template-columns:1fr}}
.info-cell{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 12px}
.info-cell-label{font-family:'DM Mono',monospace;font-size:.65rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);margin-bottom:4px}
.info-cell-value{font-size:.84rem;font-weight:600;color:var(--text);line-height:1.3}

.voie-hero{width:100%;aspect-ratio:16/9;max-height:200px;overflow:hidden;background:var(--surface2);border-bottom:1px solid var(--border);flex-shrink:0}
.voie-hero img{width:100%;height:100%;object-fit:cover;display:block}
.voie-hero-band{width:100%;height:64px;border-bottom:1px solid var(--border);flex-shrink:0;position:relative;overflow:hidden;opacity:.55}
.voie-hero-band::after{content:'';position:absolute;inset:0;background:linear-gradient(to bottom,transparent 20%,var(--bg))}

/* ═══════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════ */
.dash-statusbar{display:flex;align-items:center;justify-content:space-between;margin:10px 14px 0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:10px 12px;gap:8px}
.dash-kpi-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px 14px 0}
@media(min-width:768px){.dash-kpi-row{grid-template-columns:repeat(6,1fr)}}
.dash-kpi-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px;transition:border-color .15s,background .15s;overflow:hidden}
.dash-kpi-clickable{cursor:pointer}
.dash-kpi-clickable:hover{background:var(--surface2)}
.dash-kpi-urgent{border-color:rgba(220,38,38,.3);background:rgba(220,38,38,.025)}
.dash-kpi-label{font-family:'DM Mono',monospace;font-size:.58rem;font-weight:500;letter-spacing:1px;text-transform:uppercase;color:var(--text2);margin-bottom:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-kpi-value{font-size:1.5rem;font-weight:700;line-height:1;margin-bottom:4px}
.dash-kpi-sub{font-size:.6rem;color:var(--text3);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-alerts{padding:10px 14px 0}
.dash-body{display:grid;grid-template-columns:1fr;gap:10px;padding:10px 14px 0}
@media(min-width:768px){.dash-body{grid-template-columns:1fr 1fr}}
.dash-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px;min-width:0}
.dash-card-wide{grid-column:1/-1}
.dash-card-title{font-family:'DM Mono',monospace;font-size:.58rem;font-weight:500;letter-spacing:1.5px;text-transform:uppercase;color:var(--text2);margin-bottom:12px;display:flex;align-items:center;gap:6px}
.dash-voie-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--border);cursor:pointer}
.dash-voie-row:last-child{border-bottom:none}
.dash-voie-row:hover{opacity:.85}
.dash-activity-row{display:flex;align-items:flex-start;gap:10px;padding:7px 0;border-bottom:1px solid var(--border)}
.dash-activity-row:last-child{border-bottom:none}
.dash-mini-stat{background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 12px;margin-bottom:6px}
.dash-mini-stat:last-child{margin-bottom:0}
.dash-mini-stat-label{font-family:'DM Mono',monospace;font-size:.58rem;font-weight:500;letter-spacing:1px;text-transform:uppercase;color:var(--text2);margin-bottom:4px}
.dash-mini-stat-value{font-size:1.4rem;font-weight:700;line-height:1}
.dash-mini-stat-sub{font-size:.62rem;color:var(--text3);margin-top:2px}
.dash-balance-warn{margin-top:8px;padding:6px 8px;background:var(--amber-dim);border:1px solid rgba(217,119,6,.2);border-radius:var(--r-xs);font-size:.72rem;color:var(--amber)}
.dash-community-grid{display:grid;grid-template-columns:1fr 160px;gap:16px;align-items:start}
@media(max-width:520px){.dash-community-grid{grid-template-columns:1fr}}

/* ── Voie detail 2-col layout ── */
.vd-layout{display:flex;flex-direction:column;gap:16px;padding:14px 14px 24px}
.vd-info{flex:1;min-width:0}
.vd-photo{
  width:100%;border-radius:var(--r);overflow:hidden;
  border:1px solid var(--border);
  min-height:200px;flex-shrink:0;
  display:flex;flex-direction:column;
}
.vd-photo img{flex:1;width:100%;object-fit:cover;display:block}
.vd-photo-placeholder{
  flex:1;display:flex;align-items:center;justify-content:center;min-height:200px;
}
.vd-photo-placeholder svg{width:48px;height:48px;stroke:rgba(255,255,255,.45);fill:none;stroke-width:1.5}
@media(min-width:768px){
  .vd-layout{flex-direction:row;align-items:flex-start}
  .vd-photo{width:260px;align-self:stretch;min-height:0}
  .vd-photo-placeholder{min-height:0}
}

/* ═══════════════════════════════════════
   VOIE PICKER (comp form)
═══════════════════════════════════════ */
.voie-picker-item{
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;cursor:pointer;
  border-bottom:1px solid var(--border);
  transition:background .12s;user-select:none;
}
.voie-picker-item:last-child{border-bottom:none}
.voie-picker-item:hover{background:var(--surface3)}
.voie-picker-item.selected{background:var(--orange-dim)}
.voie-picker-check{
  width:18px;height:18px;border-radius:4px;
  border:1px solid var(--border2);
  display:flex;align-items:center;justify-content:center;
  background:var(--surface);flex-shrink:0;
  color:transparent;transition:all .12s;
}
.voie-picker-check.on{background:var(--orange);border-color:var(--orange);color:#1a0d00}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
/* Mobile: sidebar hidden, bottom nav shown */
@media (max-width:767px){
  #sidebar{display:none}
  #bottom-nav{display:flex}
}
/* Tablet + desktop : sidebar visible, bottom nav masqué */
@media (min-width:768px){
  #sidebar{display:flex;width:var(--sb-w-sm)}
  /* Sidebar déployée (pas de .collapsed) */
  #sidebar:not(.collapsed){width:var(--sb-w)}
  #sidebar:not(.collapsed) .sb-label{display:block}
  #sidebar:not(.collapsed) .sb-section{display:block}
  #sidebar:not(.collapsed) #sb-user-info{display:block}
  #sidebar:not(.collapsed) #sb-logout-label{display:block}
  #sidebar:not(.collapsed) #sb-footer{padding:12px 14px;display:block}
  #sidebar:not(.collapsed) #sb-user{margin-bottom:8px;justify-content:flex-start}
  #sidebar:not(.collapsed) #sb-header{padding:0 12px;justify-content:flex-start}
  #sidebar:not(.collapsed) .sb-item{padding:9px 14px;justify-content:flex-start}
  #sidebar:not(.collapsed) #sb-salle{display:block;font-size:.88rem;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #bottom-nav{display:none}
}
/* Wide screens: pages can be wider */
@media (min-width:1280px){
  .drawer{max-width:600px}
  .kpi-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}
}

/* ═══════════════════════════════════════
   SKELETON LOADER
═══════════════════════════════════════ */
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skel{background:linear-gradient(90deg,var(--surface2) 25%,var(--surface3) 50%,var(--surface2) 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:var(--r-xs);display:inline-block}
.skel-h{height:10px;width:75%}
.skel-line{height:14px;width:88%}
.skel-sm{height:10px;width:50%}

/* ═══════════════════════════════════════
   PAGINATION
═══════════════════════════════════════ */
.pagination{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-top:1px solid var(--border);flex-shrink:0;gap:8px;flex-wrap:wrap}
.pag-info{font-family:'DM Mono',monospace;font-size:.6rem;font-weight:500;color:var(--text2);white-space:nowrap}
.pag-btns{display:flex;gap:3px;align-items:center;flex-wrap:wrap}
.btn[disabled]{opacity:.35;cursor:not-allowed;pointer-events:none}

/* ═══════════════════════════════════════
   LIST INFO BAR (compteur filtré)
═══════════════════════════════════════ */
.list-info{padding:4px 14px 6px;flex-shrink:0;display:flex;align-items:center}
.list-info-count{font-family:var(--font-mono);font-size:.6rem;font-weight:500;color:var(--text2);white-space:nowrap}

/* ═══════════════════════════════════════
   LIST SECTION HEADER
═══════════════════════════════════════ */
.list-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px 10px;flex-shrink:0;gap:8px}
.list-header-left{display:flex;align-items:baseline;gap:8px;min-width:0}
.list-header-title{font-size:.95rem;font-weight:600;color:var(--text)}
.list-header-count{font-family:'DM Mono',monospace;font-size:.62rem;font-weight:500;color:var(--text2)}
.list-filter-row{display:flex;gap:6px;padding:0 14px 10px;overflow-x:auto;scrollbar-width:none;align-items:center}
.list-filter-row::-webkit-scrollbar{display:none}
.filter-chip{padding:4px 10px;border-radius:20px;font-size:.68rem;font-weight:600;cursor:pointer;white-space:nowrap;flex-shrink:0;border:1px solid var(--border);background:var(--surface2);color:var(--text3);transition:all .12s;font-family:'DM Sans',sans-serif}
.filter-chip.active{background:var(--orange-dim);color:var(--orange);border-color:var(--orange-glow)}
.filter-chip:hover:not(.active){border-color:var(--border2);color:var(--text2)}
.filter-reset{font-size:.65rem;color:var(--text3);cursor:pointer;white-space:nowrap;flex-shrink:0;padding:4px 8px;border:1px solid transparent;border-radius:20px;transition:all .12s;background:none}
.filter-reset:hover{color:var(--red);border-color:rgba(239,68,68,.25)}
.th-id{width:52px;flex-shrink:0}

/* ═══════════════════════════════════════
   TOAST — haut-droite
═══════════════════════════════════════ */
#toast{
  position:fixed;top:16px;right:16px;left:auto;
  transform:translateY(-8px);
  background:var(--surface3);color:var(--text);
  border:1px solid var(--border2);border-radius:var(--r-sm);
  padding:9px 16px;font-size:.78rem;font-weight:500;
  z-index:9999;opacity:0;transition:all .25s;pointer-events:none;
  white-space:nowrap;max-width:calc(100vw - 32px);
  box-shadow:0 4px 16px rgba(0,0,0,.12);
}
#toast.show{opacity:1;transform:translateY(0)}
#toast.ok{border-color:rgba(34,197,94,.4);color:var(--green);background:rgba(34,197,94,.08)}
#toast.err{border-color:rgba(239,68,68,.4);color:var(--red);background:rgba(239,68,68,.08)}
#toast.warn{border-color:rgba(245,158,11,.4);color:var(--amber);background:rgba(245,158,11,.08)}

/* ═══════════════════════════════════════
   BOUTON EN CHARGEMENT
═══════════════════════════════════════ */
@keyframes spin{to{transform:rotate(360deg)}}
.btn.loading{position:relative;color:transparent!important}
.btn.loading::after{content:'';position:absolute;width:12px;height:12px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:spin .7s linear infinite;opacity:0.7}
.btn-primary.loading::after{border-color:rgba(26,13,0,.5);border-top-color:transparent}
.btn-success.loading::after{border-color:rgba(255,255,255,.6);border-top-color:transparent}
.btn-danger.loading::after{border-color:rgba(255,255,255,.6);border-top-color:transparent}

/* ═══════════════════════════════════════
   SEARCH BAR — bouton clear
═══════════════════════════════════════ */
.search-clear{background:none;border:none;color:var(--text3);cursor:pointer;padding:0;display:flex;align-items:center;transition:color .12s}
.search-clear:hover{color:var(--text)}
.search-clear svg{width:14px;height:14px;stroke:currentColor;fill:none}

/* ═══════════════════════════════════════
   RESPONSIVE TABLE → CARDS (mobile)
═══════════════════════════════════════ */
@media(max-width:767px){
  .data-table th.hide-mobile,
  .data-table td.hide-mobile{display:none}
}
