/* =============================================================================
   Fali CRM Location — feuille de style unique (rendu serveur, zéro dépendance)
   1. Réglages       2. Base        3. Layout      4. Sidebar    5. Top bar
   6. Boutons        7. Formulaires 8. Cartes      9. Tableaux  10. Badges
  11. Composants    12. Modules    13. Impression 14. Responsive
============================================================================= */

/* 1. RÉGLAGES ------------------------------------------------------------- */
:root{
  --navy:#0f172a;
  --navy-2:#1e293b;
  --navy-3:#334155;
  --orange:#f97316;
  --orange-dark:#ea580c;
  --orange-soft:#fff7ed;
  --blue:#2563eb;
  --blue-dark:#1d4ed8;
  --blue-soft:#eff6ff;
  --green:#16a34a;
  --green-soft:#dcfce7;
  --green-text:#15803d;
  --red:#dc2626;
  --red-soft:#fee2e2;
  --amber:#d97706;
  --amber-soft:#ffedd5;
  --purple:#7c3aed;
  --purple-soft:#f3e8ff;

  --bg:#f8fafc;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --border:#e5e7eb;
  --border-strong:#d1d5db;
  --text:#0f172a;
  --text-2:#334155;
  --muted:#64748b;
  --muted-2:#94a3b8;

  --radius:12px;
  --radius-lg:16px;
  --radius-sm:8px;
  --shadow-xs:0 1px 2px rgba(15,23,42,.05);
  --shadow-sm:0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:0 4px 12px rgba(15,23,42,.08);
  --shadow-lg:0 12px 32px rgba(15,23,42,.14);
  --sidebar-w:248px;
  --topbar-h:76px;
  --font:"Inter","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
}

/* 2. BASE ----------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;font-family:var(--font);font-size:14px;line-height:1.55;
  color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,h5{margin:0;font-weight:700;letter-spacing:-.01em;color:var(--text)}
h1{font-size:1.5rem}
h2{font-size:1.15rem}
h3{font-size:1rem}
p{margin:0}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;display:block}
hr{border:0;border-top:1px solid var(--border);margin:1.25rem 0}
code{background:#f1f5f9;padding:2px 7px;border-radius:6px;font-size:.85em;font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}

.ico{width:18px;height:18px;flex:0 0 auto}
.ico--sm{width:15px;height:15px}
.ico--lg{width:22px;height:22px}
.ico--xl{width:28px;height:28px}

.muted{color:var(--muted)}
.small{font-size:.8rem}
.tiny{font-size:.72rem}
.strong{font-weight:600}
.bold{font-weight:700}
.center{text-align:center}
.right{text-align:right}
.nowrap{white-space:nowrap}
.req{color:var(--red);font-weight:700}
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
.hidden{display:none !important}
.flex{display:flex}
.flex-between{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.flex-center{display:flex;align-items:center;gap:.5rem}
.flex-col{display:flex;flex-direction:column}
.gap-1{gap:.5rem}.gap-2{gap:1rem}.gap-3{gap:1.5rem}
.grow{flex:1 1 auto;min-width:0}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* 3. LAYOUT --------------------------------------------------------------- */
.app{display:flex;min-height:100vh}
.main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;margin-left:var(--sidebar-w)}
.content{padding:1.75rem 2rem 3rem;flex:1 1 auto}
.content--tight{padding:1.25rem 2rem 3rem}

.layout-side{display:grid;grid-template-columns:minmax(0,1fr) 372px;gap:1.5rem;align-items:start}
.layout-side--narrow{grid-template-columns:minmax(0,1fr) 330px}
.rail{position:sticky;top:calc(var(--topbar-h) + 1rem);display:flex;flex-direction:column;gap:1.25rem}

.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.25rem}
.grid-5{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1rem}
.grid-auto{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:1.25rem}
.dash-split{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:1.25rem;align-items:start}

/* 4. SIDEBAR -------------------------------------------------------------- */
.sidebar{
  position:fixed;inset:0 auto 0 0;width:var(--sidebar-w);background:var(--navy);
  color:#cbd5e1;display:flex;flex-direction:column;z-index:60;
}
.sidebar__brand{display:flex;align-items:center;gap:.7rem;padding:1.35rem 1.15rem 1.15rem;text-decoration:none}
.sidebar__brand:hover{text-decoration:none}
.sidebar__logo{
  width:38px;height:38px;border-radius:11px;background:var(--orange);
  display:flex;align-items:center;justify-content:center;color:#fff;flex:0 0 auto;
  box-shadow:0 4px 12px rgba(249,115,22,.35);
}
.sidebar__logo .ico{width:22px;height:22px;stroke-width:1.9}
.sidebar__name{font-size:1.06rem;font-weight:800;color:#fff;letter-spacing:-.02em;line-height:1.15}
.sidebar__tag{font-size:.7rem;color:#94a3b8;letter-spacing:.01em}
.sidebar__nav{flex:1 1 auto;overflow-y:auto;padding:.35rem .7rem 1rem;scrollbar-width:thin}
.sidebar__nav::-webkit-scrollbar{width:5px}
.sidebar__nav::-webkit-scrollbar-thumb{background:#334155;border-radius:9px}
.sidebar__group{margin:1rem 0 .35rem;padding:0 .55rem;font-size:.63rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:#64748b}
.nav-item{
  display:flex;align-items:center;gap:.8rem;padding:.66rem .8rem;border-radius:10px;
  color:#cbd5e1;font-size:.875rem;font-weight:500;text-decoration:none;margin-bottom:2px;
  transition:background .15s,color .15s;
}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff;text-decoration:none}
.nav-item.is-active{background:var(--orange);color:#fff;font-weight:600;box-shadow:0 4px 12px rgba(249,115,22,.3)}
.nav-item.is-active .ico{stroke-width:2}
.nav-item__badge{margin-left:auto;background:rgba(255,255,255,.16);color:#fff;font-size:.68rem;font-weight:700;padding:1px 7px;border-radius:99px}
.nav-item.is-active .nav-item__badge{background:rgba(255,255,255,.28)}

.sidebar__help{margin:.5rem .85rem 1rem;background:#1e293b;border:1px solid #334155;border-radius:14px;padding:1rem}
.sidebar__help-title{display:flex;align-items:center;gap:.55rem;color:#fff;font-weight:700;font-size:.85rem;margin-bottom:.35rem}
.sidebar__help-text{font-size:.75rem;color:#94a3b8;line-height:1.5;margin-bottom:.75rem}
.sidebar__help-btn{
  display:flex;align-items:center;justify-content:center;gap:.4rem;width:100%;
  background:var(--orange);color:#fff;font-weight:600;font-size:.8rem;padding:.55rem;
  border-radius:9px;text-decoration:none;transition:background .15s;
}
.sidebar__help-btn:hover{background:var(--orange-dark);text-decoration:none;color:#fff}

.sidebar__user{display:flex;align-items:center;gap:.7rem;padding:.9rem 1rem;border-top:1px solid #1e293b}
.sidebar__user .avatar{flex:0 0 auto}
.sidebar__user-name{color:#fff;font-size:.83rem;font-weight:600;line-height:1.25}
.sidebar__user-role{color:#94a3b8;font-size:.7rem}

.scrim{position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:55;display:none;backdrop-filter:blur(2px)}
.scrim.is-open{display:block}

/* 5. TOP BAR -------------------------------------------------------------- */
.topbar{
  position:sticky;top:0;z-index:40;background:#fff;border-bottom:1px solid var(--border);
  min-height:var(--topbar-h);display:flex;align-items:center;gap:1rem;padding:.9rem 2rem;
}
.topbar__burger{
  display:none;background:none;border:0;padding:.45rem;border-radius:9px;color:var(--text);cursor:pointer;
}
.topbar__burger:hover{background:var(--surface-2)}
.topbar__titles{min-width:0;flex:1 1 auto}
.topbar__title{font-size:1.4rem;font-weight:700;letter-spacing:-.02em;display:flex;align-items:center;gap:.65rem}
.topbar__back{
  display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;
  border-radius:9px;color:var(--text-2);background:none;border:0;flex:0 0 auto;
}
.topbar__back:hover{background:var(--surface-2);text-decoration:none}
.crumbs{display:flex;align-items:center;gap:.45rem;font-size:.8rem;color:var(--muted);margin-top:.15rem;flex-wrap:wrap}
.crumbs a{color:var(--muted)}
.crumbs a:hover{color:var(--text)}
.crumbs .ico{width:13px;height:13px;color:var(--muted-2)}

.topbar__actions{display:flex;align-items:center;gap:.75rem;flex:0 0 auto}
.searchbox{position:relative;width:270px}
.searchbox input{
  width:100%;height:42px;border:1px solid var(--border);background:var(--surface-2);
  border-radius:11px;padding:0 2.5rem 0 .95rem;font-size:.85rem;font-family:inherit;color:var(--text);
}
.searchbox input:focus{outline:none;border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.searchbox button{
  position:absolute;right:6px;top:6px;width:30px;height:30px;border:0;background:none;
  color:var(--muted);border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.searchbox button:hover{background:#e2e8f0;color:var(--text)}

.icon-btn{
  position:relative;width:42px;height:42px;border:1px solid var(--border);background:#fff;
  border-radius:11px;display:flex;align-items:center;justify-content:center;color:var(--text-2);cursor:pointer;
}
.icon-btn:hover{background:var(--surface-2);text-decoration:none;color:var(--text)}
.icon-btn--accent{background:var(--orange);border-color:var(--orange);color:#fff;box-shadow:0 4px 12px rgba(249,115,22,.3)}
.icon-btn--accent:hover{background:var(--orange-dark);border-color:var(--orange-dark);color:#fff}
.icon-btn__dot{
  position:absolute;top:-5px;right:-5px;min-width:19px;height:19px;padding:0 4px;background:var(--red);
  color:#fff;font-size:.66rem;font-weight:700;border-radius:99px;display:flex;align-items:center;
  justify-content:center;border:2px solid #fff;
}

.avatar{
  width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#475569,#1e293b);
  color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.85rem;
  overflow:hidden;flex:0 0 auto;
}
.avatar--sm{width:32px;height:32px;font-size:.72rem}
.avatar--lg{width:56px;height:56px;font-size:1.05rem}
.avatar--xl{width:84px;height:84px;font-size:1.6rem}
.avatar--soft{background:#e2e8f0;color:#64748b}
.avatar img{width:100%;height:100%;object-fit:cover}

/* Menu déroulant */
.dropdown{position:relative}
.dropdown__toggle{
  display:flex;align-items:center;gap:.6rem;background:none;border:0;cursor:pointer;
  padding:.25rem .35rem;border-radius:11px;font-family:inherit;color:inherit;
}
.dropdown__toggle:hover{background:var(--surface-2)}
.dropdown__label{text-align:left;line-height:1.25}
.dropdown__name{font-size:.83rem;font-weight:600}
.dropdown__role{font-size:.72rem;color:var(--muted)}
.dropdown__menu{
  position:absolute;right:0;top:calc(100% + 8px);min-width:230px;background:#fff;
  border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-lg);padding:.4rem;
  display:none;z-index:70;
}
.dropdown.is-open .dropdown__menu{display:block}
.dropdown__item{
  display:flex;align-items:center;gap:.65rem;padding:.6rem .7rem;border-radius:9px;
  color:var(--text-2);font-size:.85rem;text-decoration:none;width:100%;background:none;border:0;
  font-family:inherit;cursor:pointer;text-align:left;
}
.dropdown__item:hover{background:var(--surface-2);text-decoration:none;color:var(--text)}
.dropdown__item--danger{color:var(--red)}
.dropdown__item--danger:hover{background:var(--red-soft);color:var(--red)}
.dropdown__sep{height:1px;background:var(--border);margin:.35rem 0}
.dropdown__head{padding:.6rem .7rem;border-bottom:1px solid var(--border);margin-bottom:.3rem}

/* 6. BOUTONS -------------------------------------------------------------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  height:42px;padding:0 1.1rem;border-radius:10px;border:1px solid transparent;
  font-family:inherit;font-size:.87rem;font-weight:600;cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s;
  text-decoration:none;white-space:nowrap;
}
.btn:hover{text-decoration:none}
.btn:disabled,.btn.is-disabled{opacity:.55;pointer-events:none}
.btn--primary{background:var(--blue);color:#fff;box-shadow:0 1px 2px rgba(37,99,235,.3)}
.btn--primary:hover{background:var(--blue-dark);color:#fff}
.btn--orange{background:var(--orange);color:#fff}
.btn--orange:hover{background:var(--orange-dark);color:#fff}
.btn--ghost{background:#fff;border-color:var(--border);color:var(--text-2)}
.btn--ghost:hover{background:var(--surface-2);border-color:var(--border-strong);color:var(--text)}
.btn--soft{background:var(--surface-2);color:var(--text-2);border-color:transparent}
.btn--soft:hover{background:#e2e8f0;color:var(--text)}
.btn--danger{background:#fff;border-color:#fecaca;color:var(--red)}
.btn--danger:hover{background:var(--red-soft);color:var(--red)}
.btn--danger-solid{background:var(--red);color:#fff}
.btn--danger-solid:hover{background:#b91c1c;color:#fff}
.btn--green{background:var(--green);color:#fff}
.btn--green:hover{background:var(--green-text);color:#fff}
.btn--sm{height:34px;padding:0 .75rem;font-size:.8rem;border-radius:8px;gap:.35rem}
.btn--lg{height:48px;padding:0 1.5rem;font-size:.95rem}
.btn--block{width:100%}
.btn--icon{width:42px;padding:0}
.btn--icon.btn--sm{width:34px}

.btn-row{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.page-actions{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:flex-end;margin-bottom:1.25rem}
@media (max-width:760px){.page-actions{justify-content:stretch}.page-actions .btn{flex:1 1 auto}}

/* Action de tableau */
.act{
  display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;
  border-radius:8px;border:1px solid transparent;background:none;color:var(--muted);cursor:pointer;
}
.act:hover{background:var(--surface-2);color:var(--text);text-decoration:none}
.act--edit:hover{background:var(--blue-soft);color:var(--blue)}
.act--del:hover{background:var(--red-soft);color:var(--red)}
.act--ok:hover{background:var(--green-soft);color:var(--green-text)}

/* 7. FORMULAIRES ---------------------------------------------------------- */
.field{margin-bottom:1.1rem}
.label{display:block;font-size:.82rem;font-weight:600;color:var(--text-2);margin-bottom:.4rem}
.hint{font-size:.75rem;color:var(--muted);margin-top:.35rem}
.input,.select,.textarea{
  width:100%;height:44px;border:1px solid var(--border);border-radius:10px;background:#fff;
  padding:0 .85rem;font-family:inherit;font-size:.875rem;color:var(--text);transition:border-color .15s,box-shadow .15s;
}
.input::placeholder,.textarea::placeholder{color:var(--muted-2)}
.input:focus,.select:focus,.textarea:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.input:disabled,.select:disabled,.textarea:disabled{background:var(--surface-2);color:var(--muted);cursor:not-allowed}
.input.is-error,.select.is-error{border-color:var(--red)}
.textarea{height:auto;min-height:96px;padding:.7rem .85rem;resize:vertical;line-height:1.55}
.select{
  appearance:none;padding-right:2.3rem;cursor:pointer;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right .8rem center;background-size:16px;
}
.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 1.1rem}
.form-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-grid .col-2{grid-column:span 2}
.form-grid .col-3{grid-column:span 3}
.form-grid .col-full{grid-column:1/-1}

.input-group{display:flex}
.input-group .input{border-radius:0 10px 10px 0}
.input-group__addon{
  display:flex;align-items:center;gap:.4rem;height:44px;padding:0 .7rem;border:1px solid var(--border);
  border-right:0;border-radius:10px 0 0 10px;background:var(--surface-2);font-size:.85rem;
  font-weight:600;color:var(--text-2);white-space:nowrap;
}
.input-group__addon .flag{width:22px;height:15px;border-radius:2px;overflow:hidden;flex:0 0 auto}
.input-suffix{position:relative}
.input-suffix .input{padding-right:3.2rem}
.input-suffix__unit{
  position:absolute;right:1px;top:1px;bottom:1px;display:flex;align-items:center;padding:0 .8rem;
  background:var(--surface-2);border-radius:0 9px 9px 0;font-size:.8rem;font-weight:600;color:var(--muted);
}

.check{display:flex;align-items:center;gap:.6rem;cursor:pointer;font-size:.85rem;color:var(--text-2)}
.check input{width:17px;height:17px;accent-color:var(--blue);cursor:pointer;flex:0 0 auto;margin:0}

.section-title{
  display:flex;align-items:center;gap:.6rem;font-size:.95rem;font-weight:700;color:var(--text);
  margin:1.6rem 0 1rem;
}
.section-title .ico{color:var(--muted)}
.section-title:first-child{margin-top:0}

/* Radio card (choix véhicule, assurance) */
.opt-row{
  display:flex;align-items:center;gap:1rem;padding:1rem 1.15rem;border:1px solid var(--border);
  border-radius:12px;background:#fff;cursor:pointer;transition:border-color .15s,box-shadow .15s,background .15s;
  margin-bottom:.75rem;
}
.opt-row:hover{border-color:var(--border-strong)}
.opt-row.is-active{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.1);background:var(--blue-soft)}
.opt-row input[type=radio]{width:18px;height:18px;accent-color:var(--blue);cursor:pointer;flex:0 0 auto;margin:0}

/* Carte de choix avec quantité */
.opt-card{
  border:1px solid var(--border);border-radius:12px;background:#fff;padding:1rem .85rem;
  display:flex;flex-direction:column;align-items:center;gap:.55rem;text-align:center;transition:border-color .15s,box-shadow .15s;
}
.opt-card.is-active{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.opt-card__check{align-self:flex-start;margin-bottom:-1.4rem}
.opt-card__icon{
  width:46px;height:46px;border-radius:12px;background:var(--surface-2);color:var(--text-2);
  display:flex;align-items:center;justify-content:center;
}
.opt-card__icon .ico{width:24px;height:24px}
.opt-card__name{font-size:.83rem;font-weight:600;line-height:1.3}
.opt-card__price{font-size:.75rem;color:var(--muted)}

.stepper-num{display:flex;align-items:center;gap:0;border:1px solid var(--border);border-radius:9px;overflow:hidden}
.stepper-num button{
  width:32px;height:32px;border:0;background:#fff;color:var(--text-2);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.stepper-num button:hover{background:var(--surface-2)}
.stepper-num input{
  width:38px;height:32px;border:0;border-left:1px solid var(--border);border-right:1px solid var(--border);
  text-align:center;font-family:inherit;font-size:.85rem;font-weight:600;color:var(--text);
  -moz-appearance:textfield;
}
.stepper-num input::-webkit-outer-spin-button,.stepper-num input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.stepper-num input:focus{outline:none;background:var(--blue-soft)}

/* Zone de dépôt fichier */
.dropzone{
  border:2px dashed var(--border-strong);border-radius:12px;padding:1.5rem;text-align:center;
  background:var(--surface-2);color:var(--muted);cursor:pointer;transition:border-color .15s,background .15s;
}
.dropzone:hover{border-color:var(--blue);background:var(--blue-soft)}
.dropzone input{display:none}

/* 8. CARTES --------------------------------------------------------------- */
.card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-xs)}
.card__head{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:1.15rem 1.35rem;border-bottom:1px solid var(--border);
}
.card__title{font-size:1rem;font-weight:700;display:flex;align-items:center;gap:.55rem}
.card__title .ico{color:var(--orange)}
.card__body{padding:1.35rem}
.card__body--flush{padding:0}
.card__foot{padding:1rem 1.35rem;border-top:1px solid var(--border);background:var(--surface-2);border-radius:0 0 var(--radius-lg) var(--radius-lg)}
.card__link{font-size:.82rem;font-weight:600;color:var(--orange)}
.card__link:hover{color:var(--orange-dark)}

.stat{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.25rem;
  display:flex;align-items:center;gap:1rem;box-shadow:var(--shadow-xs);
}
.stat__icon{
  width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.stat__icon .ico{width:24px;height:24px}
.stat__icon--orange{background:var(--orange);color:#fff}
.stat__icon--blue{background:var(--blue-soft);color:var(--blue)}
.stat__icon--purple{background:var(--purple-soft);color:var(--purple)}
.stat__icon--green{background:var(--green-soft);color:var(--green)}
.stat__icon--amber{background:var(--amber-soft);color:var(--amber)}
.stat__icon--red{background:var(--red-soft);color:var(--red)}
.stat__label{font-size:.8rem;color:var(--muted);font-weight:500}
.stat__value{font-size:1.6rem;font-weight:800;letter-spacing:-.03em;line-height:1.2;margin:.1rem 0}
.stat__trend{font-size:.75rem;font-weight:600}
.stat__trend--up{color:var(--green)}
.stat__trend--down{color:var(--red)}
.stat__trend--flat{color:var(--muted)}

.kpi{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:1rem 1.1rem}
.kpi__label{font-size:.75rem;color:var(--muted);font-weight:500}
.kpi__value{font-size:1.25rem;font-weight:800;letter-spacing:-.02em;margin-top:.15rem}

.tile{background:var(--surface-2);border-radius:10px;padding:.75rem .95rem}
.tile__label{font-size:.7rem;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.tile__value{font-weight:600;margin-top:.15rem;word-break:break-word}

/* Encart d'information */
.note{display:flex;gap:.8rem;padding:1rem 1.1rem;border-radius:12px;font-size:.83rem;line-height:1.6}
.note .ico{flex:0 0 auto;margin-top:1px}
.note--info{background:var(--blue-soft);color:#1e40af}
.note--info .ico{color:var(--blue)}
.note--success{background:var(--green-soft);color:#14532d}
.note--success .ico{color:var(--green)}
.note--warn{background:var(--amber-soft);color:#9a3412}
.note--warn .ico{color:var(--amber)}
.note--danger{background:var(--red-soft);color:#991b1b}
.note--danger .ico{color:var(--red)}
.note--muted{background:var(--surface-2);color:var(--text-2)}
.note__title{font-weight:700;margin-bottom:.15rem}

/* Alertes flash */
.flash{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1.25rem}
.alert{
  display:flex;align-items:center;gap:.7rem;padding:.85rem 1.1rem;border-radius:11px;
  font-size:.87rem;font-weight:500;border:1px solid transparent;
}
.alert--success{background:var(--green-soft);color:#14532d;border-color:#bbf7d0}
.alert--error{background:var(--red-soft);color:#991b1b;border-color:#fecaca}
.alert--info{background:var(--blue-soft);color:#1e40af;border-color:#bfdbfe}
.alert--warning{background:var(--amber-soft);color:#9a3412;border-color:#fed7aa}
.alert__close{margin-left:auto;background:none;border:0;color:inherit;opacity:.6;cursor:pointer;padding:2px}
.alert__close:hover{opacity:1}

/* 9. TABLEAUX ------------------------------------------------------------- */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.tbl{width:100%;border-collapse:collapse;font-size:.865rem}
table.tbl th{
  text-align:left;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;
  color:var(--muted);padding:.85rem 1.1rem;border-bottom:1px solid var(--border);white-space:nowrap;background:var(--surface-2);
}
table.tbl td{padding:.9rem 1.1rem;border-bottom:1px solid #f1f5f9;vertical-align:middle}
table.tbl tbody tr:last-child td{border-bottom:0}
table.tbl tbody tr:hover{background:#fafbfc}
table.tbl .td-actions{text-align:right;white-space:nowrap}
table.tbl .td-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tbl__main{font-weight:600;color:var(--text)}
.tbl__sub{font-size:.76rem;color:var(--muted)}
.tbl__link{font-weight:600;color:var(--text)}
.tbl__link:hover{color:var(--blue)}

.cell-media{display:flex;align-items:center;gap:.7rem;min-width:0}
.thumb{
  width:52px;height:36px;border-radius:8px;background:var(--surface-2);flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;color:var(--muted-2);overflow:hidden;
}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb--lg{width:76px;height:52px}

.empty{padding:3.5rem 1.5rem;text-align:center;color:var(--muted)}
.empty__icon{
  width:60px;height:60px;border-radius:16px;background:var(--surface-2);color:var(--muted-2);
  display:flex;align-items:center;justify-content:center;margin:0 auto 1rem;
}
.empty__icon .ico{width:28px;height:28px}
.empty__title{font-weight:700;color:var(--text);margin-bottom:.3rem}
.empty__text{font-size:.85rem;max-width:380px;margin:0 auto 1.25rem}

/* Barre de filtres */
.filters{
  display:flex;flex-wrap:wrap;align-items:flex-end;gap:.85rem;padding:1.1rem 1.35rem;
  border-bottom:1px solid var(--border);
}
.filters .field{margin:0;min-width:150px;flex:1 1 150px}
.filters .field--sm{flex:0 0 auto;min-width:130px}
.filters__actions{display:flex;gap:.5rem;margin-left:auto}

.pager{display:flex;align-items:center;gap:.35rem;padding:1rem 1.35rem;border-top:1px solid var(--border);justify-content:flex-end}
.pager__btn{
  min-width:34px;height:34px;padding:0 .5rem;border:1px solid var(--border);border-radius:8px;background:#fff;
  display:inline-flex;align-items:center;justify-content:center;color:var(--text-2);font-size:.82rem;font-weight:600;
}
.pager__btn:hover{background:var(--surface-2);text-decoration:none}
.pager__btn.is-active{background:var(--blue);border-color:var(--blue);color:#fff}
.pager__btn.is-disabled{opacity:.4;pointer-events:none}
.pager__gap{padding:0 .25rem;color:var(--muted)}
.pager__info{margin-right:auto;font-size:.8rem;color:var(--muted)}

/* 10. BADGES -------------------------------------------------------------- */
.badge{
  display:inline-flex;align-items:center;gap:.3rem;padding:.28rem .6rem;border-radius:7px;
  font-size:.74rem;font-weight:600;line-height:1.3;white-space:nowrap;
}
.badge--green{background:var(--green-soft);color:var(--green-text)}
.badge--blue{background:var(--blue-soft);color:var(--blue-dark)}
.badge--orange{background:var(--amber-soft);color:#c2410c}
.badge--red{background:var(--red-soft);color:#b91c1c}
.badge--gray{background:#f1f5f9;color:#475569}
.badge--purple{background:var(--purple-soft);color:#6d28d9}
.badge--outline{background:#fff;border:1px solid var(--border);color:var(--text-2)}
.badge--dot::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}

.chip{
  display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .7rem;border-radius:99px;
  background:var(--surface-2);font-size:.78rem;font-weight:500;color:var(--text-2);
}
.chip .ico{width:14px;height:14px;color:var(--muted)}

/* 11. COMPOSANTS ---------------------------------------------------------- */

/* Onglets */
.tabs{display:flex;gap:1.75rem;border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{
  display:flex;align-items:center;gap:.5rem;padding:.9rem .15rem;font-size:.87rem;font-weight:600;
  color:var(--muted);border-bottom:2.5px solid transparent;white-space:nowrap;background:none;border-top:0;
  border-left:0;border-right:0;font-family:inherit;cursor:pointer;
}
.tab:hover{color:var(--text-2);text-decoration:none}
.tab.is-active{color:var(--orange);border-bottom-color:var(--orange)}
.tab.is-active .ico{color:var(--orange)}

/* Fil d'étapes (wizard) */
.steps{display:flex;align-items:center;gap:.35rem;padding:.5rem 0 1.75rem}
.step{display:flex;align-items:center;gap:.6rem;flex:0 0 auto}
.step__bullet{
  width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:.8rem;font-weight:700;background:#e2e8f0;color:var(--muted);flex:0 0 auto;
}
.step__label{font-size:.87rem;font-weight:600;color:var(--muted)}
.step.is-done .step__bullet{background:var(--green);color:#fff}
.step.is-done .step__label{color:var(--text-2)}
.step.is-current .step__bullet{background:var(--blue);color:#fff;box-shadow:0 0 0 4px rgba(37,99,235,.14)}
.step.is-current .step__label{color:var(--blue)}
.step__line{flex:1 1 auto;height:2px;background:#e2e8f0;min-width:24px;margin:0 .5rem}
.step__line.is-done{background:var(--green)}

/* Résumé latéral (récap prix) */
.summary__row{display:flex;justify-content:space-between;gap:1rem;padding:.42rem 0;font-size:.85rem}
.summary__row span:first-child{color:var(--muted)}
.summary__row span:last-child{font-weight:600;text-align:right}
.summary__sep{border-top:1px dashed var(--border);margin:.65rem 0}
.summary__total{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;padding-top:.3rem}
.summary__total-label{font-weight:700}
.summary__total-value{font-size:1.35rem;font-weight:800;color:var(--blue);letter-spacing:-.02em}

/* Barre de progression */
.progress{height:7px;border-radius:99px;background:#e2e8f0;overflow:hidden}
.progress__bar{height:100%;border-radius:99px;background:var(--orange);transition:width .3s}
.progress__bar--blue{background:var(--blue)}
.progress__bar--green{background:var(--green)}
.progress__bar--red{background:var(--red)}

/* Liste d'éléments (réservations récentes) */
.list{display:flex;flex-direction:column}
.list__item{
  display:flex;align-items:center;gap:.9rem;padding:.9rem 1.35rem;border-bottom:1px solid #f1f5f9;
  color:inherit;text-decoration:none;
}
.list__item:last-child{border-bottom:0}
.list__item:hover{background:#fafbfc;text-decoration:none}
.list__title{font-weight:600;font-size:.875rem}
.list__sub{font-size:.78rem;color:var(--muted)}
.list__meta{text-align:right;flex:0 0 auto}

/* Graphique */
.chart{width:100%;height:230px;display:block;overflow:visible}
.chart__grid{stroke:#eef2f6;stroke-width:1}
.chart__line{fill:none;stroke:var(--orange);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.chart__area{fill:url(#chartFade)}
.chart__label{font-size:11px;fill:var(--muted);font-family:var(--font)}
.chart__dot{fill:#fff;stroke:var(--orange);stroke-width:2.5}

/* Barre de disponibilité par catégorie */
.avail{display:flex;align-items:center;gap:.9rem;padding:.85rem 1.35rem;border-bottom:1px solid #f1f5f9}
.avail:last-child{border-bottom:0}
.avail__name{font-weight:600;font-size:.85rem}
.avail__sub{font-size:.75rem;color:var(--muted)}
.avail__pct{font-size:.82rem;font-weight:700;flex:0 0 auto}
.avail__bar{width:110px;flex:0 0 auto}

/* Modale */
.modal{position:fixed;inset:0;z-index:80;display:none;align-items:center;justify-content:center;padding:1.25rem}
.modal.is-open{display:flex}
.modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(2px)}
.modal__box{
  position:relative;background:#fff;border-radius:16px;box-shadow:var(--shadow-lg);width:100%;max-width:520px;
  max-height:90vh;display:flex;flex-direction:column;
}
.modal__box--lg{max-width:760px}
.modal__head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.2rem 1.4rem;border-bottom:1px solid var(--border)}
.modal__body{padding:1.4rem;overflow-y:auto}
.modal__foot{display:flex;justify-content:flex-end;gap:.6rem;padding:1.1rem 1.4rem;border-top:1px solid var(--border);background:var(--surface-2);border-radius:0 0 16px 16px}

/* Bandeau démo */
.demo-bar{
  display:flex;align-items:center;gap:.7rem;padding:.6rem 2rem;background:#1e293b;color:#e2e8f0;font-size:.8rem;
}
.demo-bar .ico{color:var(--orange)}
.demo-bar a{color:#fff;font-weight:600;text-decoration:underline}
.demo-bar__actions{margin-left:auto;display:flex;gap:.6rem}

/* 12. MODULES ------------------------------------------------------------- */

/* Kanban */
.kanban{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.1rem;align-items:start}
.kanban__col{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:.9rem}
.kanban__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.85rem;padding:0 .25rem}
.kanban__title{font-size:.85rem;font-weight:700;display:flex;align-items:center;gap:.45rem}
.kanban__count{background:#fff;border:1px solid var(--border);border-radius:99px;font-size:.72rem;font-weight:700;padding:1px 8px;color:var(--muted)}
.kanban__card{background:#fff;border:1px solid var(--border);border-radius:11px;padding:.85rem;margin-bottom:.65rem;box-shadow:var(--shadow-xs)}
.kanban__card:last-child{margin-bottom:0}
.kanban__card-title{font-weight:600;font-size:.86rem;margin-bottom:.3rem}

/* Fiche produit du catalogue */
.product{
  display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);
  border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-xs);
  transition:box-shadow .2s,border-color .2s;
}
.product:hover{box-shadow:var(--shadow-md)}
.product.is-off{opacity:.62}
.product__media{
  height:120px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;
  color:var(--muted-2);overflow:hidden;
}
.product__media img{width:100%;height:100%;object-fit:cover}
.product__body{padding:1rem 1.1rem;flex:1 1 auto}
.product__body h3{font-size:1rem}
.product__old{text-decoration:line-through;color:var(--muted-2);font-size:.85rem;margin-inline-end:.35rem}
.product__foot{
  display:flex;gap:.25rem;justify-content:flex-end;padding:.6rem 1rem;
  border-top:1px solid var(--border);background:var(--surface-2);
}

/* Sélecteur visuel de type d'activité */
.type-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:.6rem}
.type-opt{
  display:flex;flex-direction:column;align-items:center;gap:.4rem;padding:.75rem .5rem;
  border:1px solid var(--border);border-radius:11px;cursor:pointer;background:#fff;
  transition:border-color .15s,box-shadow .15s;text-align:center;
}
.type-opt:hover{border-color:var(--border-strong)}
.type-opt.is-active,.type-opt:has(input:checked){border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.1)}

/* Carte de synthèse sélectionnée */
.stat--active{border-color:var(--orange);box-shadow:0 0 0 3px rgba(249,115,22,.12)}

/* Pipeline commercial : colonnes défilantes */
.pipeline{display:grid;grid-template-columns:repeat(7,minmax(200px,1fr));gap:.9rem;align-items:start;overflow-x:auto;padding-bottom:.5rem}
.pipeline__col{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:.8rem;min-width:200px}
.pipeline__head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem;padding:0 .2rem}
.pipeline .kanban__card{padding:.75rem}
.pipeline .kanban__card-title{display:block;font-weight:600;font-size:.85rem;color:var(--text);margin-bottom:.25rem}
.pipeline .kanban__card-title:hover{color:var(--blue)}

@media (max-width:1400px){.pipeline{grid-template-columns:repeat(7,minmax(190px,1fr))}}
@media (max-width:760px){
  .pipeline{grid-template-columns:minmax(0,1fr);overflow-x:visible}
  .pipeline__col{min-width:0}
}

/* Calendrier */
.cal{width:100%;border-collapse:collapse;table-layout:fixed}
.cal th{
  padding:.6rem;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);
  font-weight:700;border-bottom:1px solid var(--border);text-align:center;
}
.cal td{border:1px solid #f1f5f9;vertical-align:top;height:112px;padding:.4rem;width:14.28%}
.cal__day{font-size:.78rem;font-weight:600;color:var(--muted);margin-bottom:.3rem}
.cal td.is-today{background:var(--orange-soft)}
.cal td.is-today .cal__day{color:var(--orange-dark);font-weight:800}
.cal td.is-out{background:var(--surface-2)}
.cal__ev{
  display:block;font-size:.7rem;font-weight:600;padding:.2rem .4rem;border-radius:5px;margin-bottom:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.cal__ev--start{background:var(--green-soft);color:var(--green-text)}
.cal__ev--mid{background:var(--blue-soft);color:var(--blue-dark)}
.cal__ev--end{background:var(--green-soft);color:var(--green-text)}
.cal__ev--late{background:var(--red-soft);color:#b91c1c}
.cal__ev:hover{text-decoration:none;filter:brightness(.96)}

/* Sélecteur segmenté (jour / semaine / mois) */
.seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:3px}
.seg__btn{
  padding:.4rem .85rem;border-radius:7px;font-size:.83rem;font-weight:600;color:var(--muted);
}
.seg__btn:hover{color:var(--text);text-decoration:none}
.seg__btn.is-active{background:#fff;color:var(--text);box-shadow:var(--shadow-xs)}

/* Agenda (vues jour et semaine) */
.agenda{display:flex;flex-direction:column;gap:1rem}
.agenda__day{border:1px solid var(--border);border-radius:12px;padding:1rem 1.15rem}
.agenda__day.is-today{border-color:var(--orange);background:var(--orange-soft)}
.agenda__head{display:flex;align-items:center;gap:.6rem;margin-bottom:.5rem;text-transform:capitalize}
.agenda__item{display:flex;align-items:center;gap:.75rem;padding:.6rem 0;border-top:1px solid var(--border)}
.agenda__time{width:52px;flex:0 0 auto;font-weight:700;font-size:.85rem;color:var(--text-2)}

/* Signature */
.sign{background:var(--blue-soft);border:1px solid #dbeafe;border-radius:12px;padding:1.1rem 1.25rem}
.sign__label{font-size:.78rem;font-weight:600;color:var(--text-2);margin-bottom:.5rem}
.sign__value{font-family:"Segoe Script","Brush Script MT",cursive;font-size:1.55rem;color:#1e3a5f;line-height:1.4}
.sign__date{font-size:.72rem;color:var(--muted);margin-top:.35rem}

/* Fiche document */
.doc{display:flex;align-items:center;gap:.75rem;padding:.8rem 0;border-bottom:1px solid #f1f5f9}
.doc:last-child{border-bottom:0}
.doc__name{font-size:.85rem;flex:1 1 auto;min-width:0}
.doc .ico{color:var(--muted)}

/* Marketing IA */
.ai-hero{
  background:linear-gradient(135deg,#1e293b,#0f172a);color:#fff;border-radius:var(--radius-lg);
  padding:1.75rem;display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap;
}
.ai-hero__icon{
  width:56px;height:56px;border-radius:16px;background:rgba(249,115,22,.18);color:var(--orange);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.ai-hero h2{color:#fff}
.ai-hero p{color:#94a3b8;font-size:.87rem;margin-top:.2rem}
.ai-card{border:1px solid var(--border);border-radius:12px;padding:1.1rem 1.25rem;background:#fff;margin-bottom:.85rem}
.ai-card__title{font-weight:700;font-size:.9rem;margin-bottom:.35rem;display:flex;align-items:center;gap:.5rem}
.ai-kw{display:inline-flex;align-items:center;gap:.35rem;background:var(--surface-2);border:1px solid var(--border);border-radius:7px;padding:.3rem .6rem;font-size:.8rem;margin:0 .35rem .35rem 0}

/* Connexion */
.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}
.auth__side{
  background:linear-gradient(160deg,#0f172a,#1e293b);color:#fff;padding:3rem;
  display:flex;flex-direction:column;justify-content:space-between;
}
.auth__form{display:flex;align-items:center;justify-content:center;padding:2.5rem 1.5rem;background:var(--bg)}
.auth__box{width:100%;max-width:394px}
.auth__feature{display:flex;gap:.9rem;margin-bottom:1.25rem}
.auth__feature-icon{
  width:38px;height:38px;border-radius:11px;background:rgba(249,115,22,.16);color:var(--orange);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.auth__feature-title{font-weight:600;font-size:.9rem;color:#fff}
.auth__feature-text{font-size:.8rem;color:#94a3b8;line-height:1.5}

/* Aperçu du véhicule / client (rail) */
.preview{text-align:center;padding:.5rem 0 1rem}
.preview__img{
  width:100%;height:150px;border-radius:12px;background:var(--surface-2);display:flex;
  align-items:center;justify-content:center;color:var(--muted-2);overflow:hidden;margin-bottom:.9rem;
}
.preview__img img{width:100%;height:100%;object-fit:cover}
.preview__name{font-weight:700;font-size:1.05rem}
.preview__sub{font-size:.82rem;color:var(--muted);margin-top:.15rem}
.preview__specs{display:flex;justify-content:center;flex-wrap:wrap;gap:.5rem 1rem;margin-top:.85rem}
.preview__spec{display:flex;align-items:center;gap:.35rem;font-size:.78rem;color:var(--muted)}

.keyinfo{display:flex;align-items:flex-start;gap:.8rem;padding:.65rem 0}
.keyinfo__icon{
  width:36px;height:36px;border-radius:10px;background:var(--surface-2);color:var(--muted);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.keyinfo__label{font-size:.75rem;color:var(--muted)}
.keyinfo__value{font-size:.86rem;font-weight:600;word-break:break-word}
.keyinfo__value--empty{color:var(--muted-2);font-weight:500}

.checklist{display:flex;flex-direction:column;gap:.15rem}
.checklist__item{display:flex;align-items:center;gap:.7rem;padding:.5rem 0;font-size:.85rem;color:var(--text-2)}
.checklist__mark{
  width:18px;height:18px;border-radius:50%;border:2px solid var(--border-strong);flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
}
.checklist__item.is-done .checklist__mark{background:var(--green);border-color:var(--green);color:#fff}
.checklist__item.is-done .checklist__mark .ico{width:11px;height:11px;stroke-width:3}
.checklist__item.is-current{color:var(--blue);font-weight:600}
.checklist__item.is-current .checklist__mark{border-color:var(--blue);background:var(--blue)}

/* Rapports */
.report-bar{display:flex;align-items:center;gap:.9rem;padding:.7rem 0}
.report-bar__name{width:150px;flex:0 0 auto;font-size:.83rem;font-weight:500}
.report-bar__track{flex:1 1 auto;height:10px;border-radius:99px;background:#f1f5f9;overflow:hidden}
.report-bar__fill{height:100%;border-radius:99px;background:var(--blue)}
.report-bar__val{width:110px;flex:0 0 auto;text-align:right;font-size:.83rem;font-weight:700;font-variant-numeric:tabular-nums}

/* ── Tableau de bord Gestion ─────────────────────────────────────────── */
.dash-3{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,.95fr);gap:1.25rem;align-items:start}
.dash-4{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,.8fr) minmax(0,1fr);gap:1.25rem;align-items:start}

.dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:var(--muted-2)}
.dot--blue{background:var(--blue)}
.dot--green{background:var(--green)}
.dot--orange{background:var(--orange)}
.dot--amber{background:var(--amber)}
.dot--purple{background:var(--purple)}
.dot--teal{background:#0891b2}
.dot--red{background:var(--red)}
.dot--gray{background:var(--muted-2)}

.progress__bar--purple{background:var(--purple)}
.progress__bar--teal{background:#0891b2}
.progress__bar--amber{background:var(--amber)}
.progress__bar--orange{background:var(--orange)}

.legend{width:20px;height:3px;border-radius:2px;display:inline-block}
.legend--line{background:var(--blue)}
.legend--dash{background:repeating-linear-gradient(90deg,var(--muted-2) 0 5px,transparent 5px 9px);height:3px}

/* Pastille de type d'activité */
.act-icon{
  width:36px;height:36px;border-radius:11px;flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-2);color:var(--muted);
}
.act-icon--appel{background:var(--green-soft);color:var(--green-text)}
.act-icon--email{background:var(--blue-soft);color:var(--blue)}
.act-icon--whatsapp{background:var(--green-soft);color:var(--green-text)}
.act-icon--rdv{background:var(--purple-soft);color:var(--purple)}
.act-icon--reunion{background:var(--purple-soft);color:var(--purple)}
.act-icon--relance{background:var(--amber-soft);color:var(--amber)}
.act-icon--tache{background:var(--surface-2);color:var(--text-2)}
.act-icon--note{background:#f1f5f9;color:var(--muted)}

/* Objectifs */
.goal{display:flex;gap:.75rem;align-items:flex-start;padding:.6rem 0}
.goal__icon{
  width:32px;height:32px;border-radius:9px;flex:0 0 auto;background:var(--surface-2);
  color:var(--muted);display:flex;align-items:center;justify-content:center;
}

/* Boutons d'action rapide */
.quick{
  display:flex;align-items:center;gap:.55rem;padding:.7rem .9rem;border-radius:10px;
  border:1px solid var(--border);font-size:.86rem;font-weight:600;color:var(--text-2);
  background:#fff;transition:background .15s,border-color .15s,color .15s;
}
.quick:hover{text-decoration:none}
.quick--blue{border-color:#bfdbfe;color:var(--blue);background:var(--blue-soft)}
.quick--blue:hover{background:#dbeafe;color:var(--blue-dark)}
.quick--green{border-color:#bbf7d0;color:var(--green-text);background:var(--green-soft)}
.quick--green:hover{background:#bbf7d0}
.quick--purple{border-color:#ddd6fe;color:var(--purple);background:var(--purple-soft)}
.quick--purple:hover{background:#ede9fe}
.quick--orange{border-color:#fed7aa;color:#c2410c;background:var(--amber-soft)}
.quick--orange:hover{background:#fed7aa}
.quick--teal{border-color:#a5f3fc;color:#0e7490;background:#ecfeff}
.quick--teal:hover{background:#cffafe}

/* Fil chronologique */
.timeline{display:flex;flex-direction:column;gap:.9rem}
.timeline__item{display:flex;gap:.75rem;align-items:flex-start}
.timeline__dot{flex:0 0 auto}

@media (max-width:1400px){
  .dash-4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1120px){
  .dash-3{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:760px){
  .dash-4{grid-template-columns:minmax(0,1fr)}
}

/* 13. IMPRESSION ---------------------------------------------------------- */
@media print{
  .sidebar,.topbar,.scrim,.demo-bar,.no-print,.btn-row,.pager,.flash{display:none !important}
  .main{margin-left:0}
  body{background:#fff;font-size:12px}
  .content{padding:0}
  .card{border:1px solid #ddd;box-shadow:none;break-inside:avoid}
  .layout-side{grid-template-columns:1fr;gap:1rem}
  .rail{position:static}
  a{color:#000;text-decoration:none}
  .print-only{display:block !important}
  @page{margin:14mm}
}
.print-only{display:none}

/* 14. RESPONSIVE ---------------------------------------------------------- */
@media (max-width:1280px){
  .layout-side{grid-template-columns:minmax(0,1fr) 320px}
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-5{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:1120px){
  .layout-side,.dash-split{grid-template-columns:minmax(0,1fr)}
  .rail{position:static;flex-direction:column}
  .searchbox{width:200px}
}
@media (max-width:1024px){
  :root{--topbar-h:66px}
  .sidebar{transform:translateX(-100%);transition:transform .25s ease;box-shadow:var(--shadow-lg)}
  .sidebar.is-open{transform:translateX(0)}
  .main{margin-left:0}
  .topbar__burger{display:flex}
  .content,.content--tight{padding:1.25rem 1.15rem 2.5rem}
  .topbar{padding:.75rem 1.15rem;gap:.65rem}
  .demo-bar{padding:.55rem 1.15rem}
  .topbar__title{font-size:1.15rem}
  .grid-3,.grid-5,.kanban{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid .col-3{grid-column:span 2}
  .auth{grid-template-columns:1fr}
  .auth__side{display:none}
}
@media (max-width:760px){
  .searchbox{display:none}
  .searchbox.is-mobile-open{
    display:block;position:absolute;left:1.15rem;right:1.15rem;top:calc(100% + 6px);width:auto;
    background:#fff;z-index:45;
  }
  .topbar{position:relative}
  .grid-2,.grid-3,.grid-4,.grid-5,.grid-auto,.kanban{grid-template-columns:minmax(0,1fr)}
  .form-grid,.form-grid--2{grid-template-columns:minmax(0,1fr)}
  .form-grid .col-2,.form-grid .col-3{grid-column:span 1}
  .dropdown__label{display:none}
  .card__head{flex-wrap:wrap;padding:1rem 1.05rem}
  .card__body{padding:1.05rem}
  .filters{padding:1rem 1.05rem}
  .filters .field{flex:1 1 100%;min-width:0}
  .filters__actions{margin-left:0;width:100%}
  .filters__actions .btn{flex:1 1 auto}
  table.tbl th,table.tbl td{padding:.75rem .85rem}
  .steps{gap:.15rem;overflow-x:auto;padding-bottom:1.25rem;scrollbar-width:none}
  .steps::-webkit-scrollbar{display:none}
  .step__label{display:none}
  .step__line{min-width:16px;margin:0 .25rem}
  .step.is-current .step__label{display:block;font-size:.8rem}
  .stat{padding:1rem;gap:.85rem}
  .stat__icon{width:44px;height:44px;border-radius:12px}
  .stat__value{font-size:1.35rem}
  .btn-row .btn{flex:1 1 auto}
  .modal{padding:0;align-items:flex-end}
  .modal__box{max-width:none;border-radius:16px 16px 0 0;max-height:92vh}
  .modal__foot{border-radius:0}
  .cal td{height:auto;min-height:64px}
  .cal__ev{font-size:.62rem}
  .pager{justify-content:center;flex-wrap:wrap}
  .pager__info{width:100%;text-align:center;margin:0 0 .5rem}
  .demo-bar{flex-wrap:wrap;font-size:.75rem}
  .demo-bar__actions{margin-left:0;width:100%}
  .opt-row{flex-wrap:wrap}
  .preview__img{height:120px}
  h1{font-size:1.25rem}
}
@media (max-width:560px){
  /* Barres de rapport : libellé au-dessus, valeur en dessous */
  .report-bar{flex-wrap:wrap;gap:.35rem}
  .report-bar__name{width:auto;flex:1 1 60%}
  .report-bar__val{width:auto;flex:0 0 auto}
  .report-bar__track{flex:1 1 100%;order:3}
  /* Disponibilité par catégorie : la jauge passe à la ligne */
  .avail{flex-wrap:wrap}
  .avail__bar{width:100%;order:4}
  .avail .thumb{display:none}
}
@media (max-width:420px){
  .topbar__actions{gap:.4rem}
  .icon-btn{width:38px;height:38px}
  .avatar{width:34px;height:34px}
  .btn{padding:0 .85rem}
}
