/* ============================================================
   E-CH EXPRESS — Design System
   Couleurs du logo : bleu foncé #0D2C6B · bleu #1E4FA8 · orange #F97316
   ============================================================ */

:root {
  --ech-navy: #0D2C6B;
  --ech-blue: #1E4FA8;
  --ech-blue-light: #3B6FD4;
  --ech-orange: #F97316;
  --ech-orange-dark: #EA580C;
  --ech-amber: #FBBF24;
  --ech-bg: #F6F8FC;
  --ech-surface: #FFFFFF;
  --ech-border: #E2E8F0;
  --ech-text: #1E293B;
  --ech-text-muted: #64748B;
  --ech-success: #16A34A;
  --ech-danger: #DC2626;
  --ech-warning: #D97706;
  --ech-radius: 14px;
  --ech-radius-sm: 9px;
  --ech-shadow: 0 1px 3px rgba(13, 44, 107, .08), 0 4px 16px rgba(13, 44, 107, .06);
  --ech-shadow-lg: 0 8px 30px rgba(13, 44, 107, .14);
  --ech-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ech-font);
  background: var(--ech-bg);
  color: var(--ech-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--ech-blue); text-decoration: none; }
a:hover { color: var(--ech-navy); }

/* ---------- Utilitaires ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.muted { color: var(--ech-text-muted); }
.text-center { text-align: center; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.price { font-weight: 800; color: var(--ech-navy); }
.price-old { text-decoration: line-through; color: var(--ech-text-muted); font-size: .85em; font-weight: 500; margin-left: 6px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--ech-radius-sm);
  border: 1px solid transparent; font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: all .18s ease; text-decoration: none; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--ech-orange), var(--ech-orange-dark)); color: #fff; box-shadow: 0 4px 14px rgba(249, 115, 22, .35); }
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-navy { background: linear-gradient(135deg, var(--ech-blue), var(--ech-navy)); color: #fff; box-shadow: 0 4px 14px rgba(13, 44, 107, .3); }
.btn-navy:hover { filter: brightness(1.15); color: #fff; }
.btn-outline { background: #fff; border-color: var(--ech-border); color: var(--ech-text); }
.btn-outline:hover { border-color: var(--ech-blue); color: var(--ech-blue); }
.btn-ghost { background: transparent; color: var(--ech-blue); }
.btn-danger { background: var(--ech-danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Badges ---------- */
/* Un badge dit une chose courte : « à faire », « en examen ». Il ne se coupe
   jamais sur deux lignes — c'est le libellé à côté qui cède de la place. */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.badge-orange { background: #FFF1E6; color: var(--ech-orange-dark); }
.badge-blue { background: #E8EFFC; color: var(--ech-blue); }
.badge-navy { background: var(--ech-navy); color: #fff; }
.badge-green { background: #E8F7EE; color: var(--ech-success); }
.badge-red { background: #FDECEC; color: var(--ech-danger); }
.badge-gray { background: #EEF2F7; color: var(--ech-text-muted); }
.badge-discount { background: var(--ech-orange); color: #fff; }

/* ---------- Navbar boutique ---------- */
.store-header { background: #fff; border-bottom: 1px solid var(--ech-border); position: sticky; top: 0; z-index: 50; }
.store-header .inner { display: flex; align-items: center; gap: 22px; min-height: 92px; padding-top: 10px; padding-bottom: 10px; }
.store-logo { display: flex; align-items: center; flex-shrink: 0; }
.store-logo img { height: 64px; width: auto; border-radius: 12px; transition: transform .15s ease; }
.store-logo:hover img { transform: scale(1.04); }
.store-search { flex: 1; display: flex; max-width: 560px; margin: 0 auto; }
.store-search input {
  flex: 1; border: 2px solid var(--ech-border); border-right: 0; border-radius: 10px 0 0 10px;
  padding: 11px 16px; font-size: .95rem; outline: none; transition: border-color .15s; background: var(--ech-bg);
}
.store-search input:focus { border-color: var(--ech-blue); background: #fff; }
.store-search button { border: 0; border-radius: 0 10px 10px 0; background: var(--ech-navy); color: #fff; padding: 0 20px; cursor: pointer; font-size: 1rem; }
.store-search button:hover { background: var(--ech-blue); }
.store-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.store-nav .nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 10px;
  color: var(--ech-text); font-weight: 700; font-size: .92rem;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.store-nav .nav-link:hover { background: var(--ech-bg); color: var(--ech-blue); }
.store-nav .cart-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px; font-size: 1.15rem;
  transition: background .15s;
}
.store-nav .cart-link:hover { background: var(--ech-bg); }
.cart-count { position: absolute; top: 2px; right: 0; background: var(--ech-orange); color: #fff; border-radius: 999px; font-size: .66rem; font-weight: 800; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(115deg, var(--ech-navy) 0%, var(--ech-blue) 55%, var(--ech-orange) 130%);
  border-radius: 20px; color: #fff; padding: 48px 44px; position: relative; overflow: hidden;
}
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.15; margin: 0 0 12px; }
.hero p { opacity: .92; max-width: 560px; margin: 0 0 24px; font-size: 1.02rem; }
.hero .hl { color: var(--ech-amber, var(--ech-amber)); color: #FBBF24; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.08); }

/* ---------- Cartes produit ---------- */
.product-card {
  background: var(--ech-surface); border-radius: var(--ech-radius); overflow: hidden;
  border: 1px solid var(--ech-border); transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column; position: relative;
}
.product-card:hover { box-shadow: var(--ech-shadow-lg); transform: translateY(-2px); }
.product-card .thumb { aspect-ratio: 1; background: #F1F5F9; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .name { font-weight: 700; font-size: .93rem; color: var(--ech-text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .shop { font-size: .78rem; color: var(--ech-text-muted); }
.product-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.product-card .thumb .badge-discount { position: absolute; top: 10px; left: 10px; }
.product-card .rating { color: var(--ech-amber); font-size: .8rem; font-weight: 700; }

/* ---------- Cartes génériques ---------- */
.card { background: var(--ech-surface); border: 1px solid var(--ech-border); border-radius: var(--ech-radius); box-shadow: var(--ech-shadow); }
.card .card-header { padding: 16px 20px; border-bottom: 1px solid var(--ech-border); font-weight: 800; color: var(--ech-navy); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .card-body { padding: 20px; }

/* ---------- Stat tiles (dashboards) ---------- */
.stat-tile { background: #fff; border: 1px solid var(--ech-border); border-radius: var(--ech-radius); padding: 18px 20px; display: flex; gap: 16px; align-items: center; box-shadow: var(--ech-shadow); }
.stat-tile .icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.stat-tile .icon.blue { background: #E8EFFC; color: var(--ech-blue); }
.stat-tile .icon.orange { background: #FFF1E6; color: var(--ech-orange); }
.stat-tile .icon.green { background: #E8F7EE; color: var(--ech-success); }
.stat-tile .icon.navy { background: var(--ech-navy); color: #fff; }
.stat-tile .value { font-size: 1.35rem; font-weight: 900; color: var(--ech-navy); line-height: 1.1; }
.stat-tile .label { font-size: .8rem; color: var(--ech-text-muted); font-weight: 600; }

/* ---------- Formulaires ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 6px; color: var(--ech-text); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--ech-border); border-radius: 10px;
  font-size: .95rem; font-family: inherit; background: #fff; transition: border-color .15s; outline: none;
}
.form-control:focus { border-color: var(--ech-blue); box-shadow: 0 0 0 3px rgba(30, 79, 168, .12); }
.form-error { color: var(--ech-danger); font-size: .8rem; margin-top: 4px; font-weight: 600; }
.form-hint { color: var(--ech-text-muted); font-size: .8rem; margin-top: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.ech-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ech-table th { text-align: left; padding: 12px 14px; background: #F8FAFF; color: var(--ech-navy); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid var(--ech-border); white-space: nowrap; }
.ech-table td { padding: 12px 14px; border-bottom: 1px solid var(--ech-border); vertical-align: middle; }
.ech-table tr:hover td { background: #F8FAFF; }

/* ============================================================
   Notifications : cloche, panneau et pastilles de menu
   ------------------------------------------------------------
   Chargé par tous les espaces (administration, vendeur, commercial,
   boutique). Le contenu du panneau est posé par
   public/assets/js/notifications.js : ici, uniquement l'habillage.
   ============================================================ */

.bell { position: relative; display: inline-flex; }

.bell-btn {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ech-border); border-radius: 10px;
  background: #fff; color: var(--ech-navy); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.bell-btn:hover { border-color: var(--ech-blue); background: #F8FAFF; }
.bell-btn .material-symbols-outlined { font-size: 21px; }

.bell-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 2px solid #fff;
  background: var(--ech-danger); color: #fff;
  font-size: .68rem; font-weight: 800; line-height: 1;
}
@keyframes bell-pop {
  0% { transform: scale(.6); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.bell-count.is-pop { animation: bell-pop .35s cubic-bezier(.22, .8, .28, 1); }

.bell-panel {
  position: absolute; top: calc(100% + 10px); z-index: 80;
  width: min(390px, 92vw);
  background: #fff; border: 1px solid var(--ech-border);
  border-radius: 14px; box-shadow: var(--ech-shadow-lg);
  overflow: hidden; text-align: left;
}
.bell-panel.notif-align-right { right: 0; }
.bell-panel.notif-align-left { left: 0; }

.bell-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 15px; border-bottom: 1px solid var(--ech-border);
  font-size: .88rem; color: var(--ech-navy);
}
.bell-link {
  border: 0; background: none; cursor: pointer; padding: 0;
  font: inherit; font-size: .76rem; font-weight: 700; color: var(--ech-blue);
}
.bell-link:hover { text-decoration: underline; }

.bell-panel-body { max-height: min(60vh, 420px); overflow-y: auto; }

.bell-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 15px; border-bottom: 1px solid #F1F5F9;
  text-decoration: none; color: inherit;
  transition: background-color .15s ease;
}
.bell-item:hover { background: #F8FAFF; }
.bell-item.is-unread { background: #FBFDFF; }
.bell-item.is-unread .bell-item-title::after {
  content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px;
  border-radius: 50%; background: var(--ech-orange); vertical-align: middle;
}
.bell-item.is-urgent { box-shadow: inset 3px 0 0 var(--ech-danger); }
/* Pastille de domaine : la couleur situe l'information sans dépendre d'une
   police d'icônes, absente de l'espace vendeur. */
.bell-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: #94A3B8; }
.bell-dot.is-orders { background: var(--ech-orange); }
.bell-dot.is-deliveries { background: var(--ech-blue); }
.bell-dot.is-shops { background: var(--ech-navy); }
.bell-dot.is-payments, .bell-dot.is-wallet { background: var(--ech-success); }
.bell-dot.is-withdrawals { background: var(--ech-warning); }
.bell-dot.is-support { background: var(--ech-blue-light); }
.bell-dot.is-stock { background: var(--ech-danger); }
.bell-dot.is-commercial { background: #7C3AED; }
.bell-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bell-item-title { font-size: .85rem; font-weight: 700; color: var(--ech-navy); }
.bell-item-text { font-size: .82rem; color: var(--ech-text); overflow-wrap: anywhere; }
.bell-item-meta { font-size: .72rem; color: var(--ech-text-muted); }
.bell-empty { margin: 0; padding: 22px 15px; text-align: center; font-size: .85rem; color: var(--ech-text-muted); }
.bell-panel-foot {
  padding: 11px 15px; border-top: 1px solid var(--ech-border);
  background: #FBFCFE; text-align: center; font-size: .8rem; font-weight: 700;
}

.bell-device {
  display: block; width: 100%; margin-top: 9px;
  padding: 9px 12px; border-radius: 9px; cursor: pointer;
  border: 1px dashed var(--ech-border); background: #fff;
  font: inherit; font-size: .78rem; font-weight: 700; color: var(--ech-blue);
}
.bell-device:hover { border-color: var(--ech-blue); background: #F8FAFF; }
.bell-device-state { display: block; margin-top: 8px; font-size: .74rem; font-weight: 600; color: var(--ech-success); }

/* Pastille d'une entrée de menu : elle ne s'affiche que s'il y a du nouveau. */
.nav-bubble[hidden] { display: none; }
/* Un bouton masqué reste masqué malgré son display:inline-flex (ex. selfie). */
.btn[hidden] { display: none; }

.nav-bubble {
  margin-left: auto;
  min-width: 19px; padding: 1px 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--ech-danger); color: #fff;
  font-size: .68rem; font-weight: 800; line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .bell-count.is-pop { animation: none; }
}

@media (max-width: 768px) {
  .bell-panel { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; border-radius: 14px 14px 0 0; }
  .bell-panel-body { max-height: 55vh; }
}

/* ============================================================
   Barre de filtres des listes (administration, vendeur, commercial)
   ------------------------------------------------------------
   Un seul gabarit pour toutes les listes : recherche, période
   (choix simple ou deux dates) et filtres propres à l'écran. Les
   champs s'alignent sur une ligne et passent à la ligne suivante
   quand la place manque, sans jamais rétrécir un libellé.
   ============================================================ */

.list-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.list-filters .lf-field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.list-filters .lf-field.is-grow { flex: 1 1 240px; }
.list-filters .lf-field label {
  font-size: .74rem; font-weight: 700; color: #64748B;
}
.list-filters .form-control { min-width: 0; }
.list-filters .lf-actions { display: flex; gap: 8px; align-items: center; }
.list-filters .lf-actions .btn { white-space: nowrap; }

@media (max-width: 768px) {
  .list-filters .lf-field { min-width: 0; flex: 1 1 100%; }
  .list-filters .lf-actions { width: 100%; }
  .list-filters .lf-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- Sidebar admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 248px; background: linear-gradient(180deg, var(--ech-navy), #081D49); color: #CBD5E1;
  flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: #fff; font-weight: 900; font-size: 1.02rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-sidebar .brand-sub { font-size: .68rem; font-weight: 600; color: var(--ech-orange); letter-spacing: 1.5px; display: block; }

/* Logo de l'espace vendeur et de l'espace commercial : la même famille que
   l'administration, en plus discret — le mot d'accueil et les chiffres restent
   le sujet de l'écran. Le sélecteur vise la barre latérale : l'en-tête de la
   vitrine, qui partage la classe .store-logo, garde sa taille. */
.admin-shell .admin-sidebar .store-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.admin-shell .admin-sidebar .store-logo img {
  height: 36px; width: auto; border-radius: 9px;
  background: #fff; flex-shrink: 0;
}
.admin-shell .admin-sidebar .store-logo > span {
  display: flex; flex-direction: column; line-height: 1.15; min-width: 0;
  color: #fff; font-weight: 800; font-size: .92rem; letter-spacing: -.01em;
}
.admin-sidebar nav { padding: 12px 10px; flex: 1; }
.admin-sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; color: #64748B; padding: 14px 12px 6px; font-weight: 800; }
.admin-sidebar a.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: #CBD5E1; font-weight: 600; font-size: .88rem; margin-bottom: 2px; transition: background .15s;
}
.admin-sidebar a.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-sidebar a.nav-item.active { background: var(--ech-orange); color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,.35); }

/* Une entrée de menu porte parfois un badge (« à faire ») et une pastille de
   notifications. Ce sont eux qui doivent rester lisibles : ils gardent leur
   taille, et c'est le libellé qui se raccourcit si la place manque — sinon le
   badge se comprime et son texte passe sur deux lignes. */
.admin-sidebar a.nav-item > .badge,
.admin-sidebar a.nav-item > .nav-bubble { flex: none; }

.admin-sidebar a.nav-item > .nav-bubble { margin-left: auto; }

.admin-sidebar a.nav-item .nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Le badge des menus est plus compact que sur les fiches : la barre latérale
   n'est pas large, et « Vérification » + son badge + la pastille de
   notifications doivent tenir sur une seule ligne. */
.admin-sidebar a.nav-item > .badge { padding: 2px 8px; font-size: .68rem; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { height: 62px; background: #fff; border-bottom: 1px solid var(--ech-border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 40; }
.admin-content { padding: 24px; flex: 1; }

/* ---------- Alertes ---------- */
.alert { padding: 13px 17px; border-radius: 10px; font-size: .9rem; font-weight: 600; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: #E8F7EE; color: #14532D; border-color: #BBE7C9; }
.alert-danger { background: #FDECEC; color: #7F1D1D; border-color: #F5C6C6; }
.alert-info { background: #E8EFFC; color: var(--ech-navy); border-color: #C7D8F5; }
.alert-warning { background: #FEF7E0; color: #92400E; border-color: #F5E3A8; }

/* ---------- Steps checkout ---------- */
.steps { display: flex; gap: 0; margin-bottom: 28px; }
.steps .step { flex: 1; text-align: center; position: relative; font-size: .82rem; font-weight: 700; color: var(--ech-text-muted); }
.steps .step-dot {
  width: 34px; height: 32px; border-radius: 10px; background: #E2E8F0; color: #64748B;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 900; margin-bottom: 6px;
}
.steps .step.active .step-dot { background: var(--ech-orange); color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,.4); }
.steps .step.active { color: var(--ech-navy); }
.steps .step.done .step-dot { background: var(--ech-success); color: #fff; }

/* ---------- Timeline suivi ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--ech-border); }
.timeline .tl-item { position: relative; padding-bottom: 20px; }
.timeline .tl-dot { position: absolute; left: -28px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #CBD5E1; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ech-border); }
.timeline .tl-dot.done { background: var(--ech-success); box-shadow: 0 0 0 2px #BBE7C9; }
.timeline .tl-title { font-weight: 800; font-size: .9rem; }
.timeline .tl-time { font-size: .78rem; color: var(--ech-text-muted); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: #fff; border: 1px solid var(--ech-border); font-weight: 700; font-size: .88rem; color: var(--ech-text);
}
.pagination .active { background: var(--ech-navy); color: #fff; border-color: var(--ech-navy); }
.pagination .disabled { opacity: .45; }

/* ---------- Section titres ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 18px; }
.section-title h2 { font-size: 1.3rem; font-weight: 900; color: var(--ech-navy); margin: 0; position: relative; padding-left: 14px; }
.section-title h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 4px; background: linear-gradient(180deg, var(--ech-orange), var(--ech-amber)); }
.section-title a { font-size: .88rem; font-weight: 700; }

/* ---------- Catégories rondes ---------- */
.category-chip {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px;
  background: #fff; border: 1px solid var(--ech-border); border-radius: 14px; font-size: .8rem; font-weight: 700;
  color: var(--ech-text); transition: all .15s; text-align: center;
}
.category-chip:hover { border-color: var(--ech-orange); box-shadow: var(--ech-shadow); color: var(--ech-orange-dark); transform: translateY(-2px); }
.category-chip .cat-ico { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #E8EFFC, #F6F8FC); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .store-logo img { height: 56px; }
  .store-header .inner { gap: 14px; }
  .store-nav .nav-link { padding: 9px 10px; font-size: .88rem; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-products { grid-template-columns: repeat(2, 1fr); }
  .store-header .inner {
    flex-wrap: wrap;
    gap: 10px;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 12px;
  }
  .store-logo { order: 1; }
  .store-logo img { height: 50px; }
  .store-nav { order: 2; margin-left: auto; }
  .store-search { order: 3; max-width: none; width: 100%; margin: 0; }
  .store-nav .nav-link span { display: none; }
  .store-nav .nav-link { font-size: 1.05rem; padding: 9px 11px; }
  .store-nav .nav-link.btn, .store-nav a.nav-link:last-of-type { font-size: .85rem; }
  .hero { padding: 30px 22px; }
  .admin-sidebar { position: fixed; left: -260px; transition: left .25s; z-index: 100; }
  /* Ouvert, le volet assombrit ce qu'il recouvre : on voit qu'il y a du
     contenu derrière, et qu'un appui à côté le referme (shell-nav.js). */
  .admin-sidebar.open { left: 0; box-shadow: 0 0 0 100vmax rgba(11, 18, 32, .45); }
  .admin-content { padding: 14px; }
  /* La barre du haut tient dans la largeur d'un téléphone : le titre se
     tronque, le nom de l'utilisateur s'efface — la déconnexion reste entière,
     c'est le geste qu'on vient y chercher. Les écarts des rangées sont posés
     en style inline, d'où le !important. */
  .admin-topbar { padding: 0 12px; height: 56px; }
  .admin-topbar > .flex { gap: 8px !important; min-width: 0; }
  .admin-topbar > .flex > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-topbar > .flex > .muted { display: none; }
  .admin-topbar .btn { padding-left: 11px; padding-right: 11px; }
  /* Les grilles à deux colonnes posées en style inline cèdent la place : sur un
     téléphone, deux colonnes de formulaire ne se lisent pas. */
  .order-layout { grid-template-columns: 1fr !important; }
}
@media (max-width: 420px) {
  .grid-products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .store-logo img { height: 44px; }
  .store-nav { gap: 2px; }
  .store-nav .nav-link { padding: 8px 9px; }
}

/* ---------- Mode sombre (optionnel via data-theme) ---------- */
[data-theme="dark"] {
  --ech-bg: #0B1220; --ech-surface: #111A2E; --ech-border: #24304A;
  --ech-text: #E2E8F0; --ech-text-muted: #94A3B8;
  --ech-shadow: 0 1px 3px rgba(0,0,0,.4); --ech-shadow-lg: 0 8px 30px rgba(0,0,0,.5);
}
[data-theme="dark"] .card, [data-theme="dark"] .product-card, [data-theme="dark"] .stat-tile,
[data-theme="dark"] .store-header, [data-theme="dark"] .admin-topbar, [data-theme="dark"] .btn-outline,
[data-theme="dark"] .pagination a, [data-theme="dark"] .pagination span { background: var(--ech-surface); color: var(--ech-text); }
[data-theme="dark"] .btn-outline:hover { color: var(--ech-blue-light); }

/* ---------- Impression ---------- */
@media print {
  .admin-sidebar, .store-header, .btn, .pagination { display: none !important; }
  body { background: #fff; }
}

/* ---------- Assistant d'ouverture de boutique ----------
   Un dossier long se remplit mieux par petits morceaux : le fil des étapes dit
   où l'on en est, l'étape courante est la seule visible, et la barre du bas ne
   propose qu'un geste — continuer, ou revenir. */
.wizard-steps {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 20px; padding: 0;
  list-style: none; counter-reset: none;
}
.wizard-step-item {
  display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600;
  color: var(--ech-text-muted);
}
.wizard-step-number {
  width: 26px; height: 26px; flex: none; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; font-size: .78rem; font-weight: 700;
  background: var(--ech-bg); border: 1px solid var(--ech-border); color: var(--ech-text-muted);
}
.wizard-step-item.is-current { color: var(--ech-navy); }
.wizard-step-item.is-current .wizard-step-number {
  background: var(--ech-navy); border-color: var(--ech-navy); color: #fff;
}
.wizard-step-item.is-done .wizard-step-number {
  background: var(--ech-success); border-color: var(--ech-success); color: #fff;
}
.wizard-pane[hidden] { display: none; }
.wizard-title { margin: 0 0 4px; font-size: 1.05rem; color: var(--ech-navy); }
.wizard-title:focus { outline: none; }
.wizard-sub { margin: 0 0 16px; font-size: .86rem; color: var(--ech-text-muted); }
.wizard-nav {
  display: flex; gap: 10px; align-items: center; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--ech-border);
}
.wizard-nav .btn-primary { margin-left: auto; }
/* « hidden » doit gagner contre le display des boutons : `.btn` impose
   inline-flex, et un bouton masqué qui reste affiché fait cliquer sur
   « Ouvrir ma boutique » à la troisième étape. */
.wizard-nav [hidden] { display: none; }

/* Cadre de signature manuscrite : la hauteur vit ici, pas dans le HTML, pour
   qu'elle s'adapte au téléphone. */
.signature-pad {
  display: block; width: 100%; height: 200px; touch-action: none; cursor: crosshair;
  border-radius: 8px; background:
    repeating-linear-gradient(0deg, #fff, #fff 38px, #f1f5fb 38px, #f1f5fb 39px);
}
.signature-box {
  border: 1px dashed var(--ech-border); border-radius: 10px; background: #fff;
  padding: 6px; max-width: 640px;
}

/* Contrat affiché dans le dossier et dans l'espace vendeur. */
.contract-frame {
  width: 100%; height: 320px; border: 1px solid var(--ech-border);
  border-radius: 10px; background: #fff;
}

/* Champ mot de passe : masqué par défaut, avec l'œil pour le relire. */
.password-field { position: relative; }
.password-field .form-control { padding-right: 46px; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--ech-text-muted, #5B6B85);
  cursor: pointer;
}
.password-toggle:hover { background: var(--ech-bg, #F4F7FC); color: var(--ech-navy); }
.password-toggle .material-symbols-outlined { font-size: 20px; }

/* ---------- Assistant d'inscription : téléphone ----------
   Le dossier se remplit aussi sur le téléphone du commerçant : on empile les
   colonnes, le fil des étapes défile au doigt, la signature garde une hauteur
   utilisable, et rien ne dépasse en largeur. */
@media (max-width: 720px) {
  .wizard-steps {
    flex-wrap: nowrap; overflow-x: auto; gap: 12px; padding-bottom: 6px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .wizard-steps::-webkit-scrollbar { display: none; }
  .wizard-step-item { flex: none; }
  .wizard-step-label { display: none; }
  .wizard .grid-2, .wizard .grid-3, .wizard .grid-4 { grid-template-columns: 1fr; }
  .wizard-title { font-size: 1.1rem; }
  .wizard-sub { font-size: .92rem; }
  .wizard-nav { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .wizard-nav .btn, .wizard-nav button { width: 100%; justify-content: center; }
  .wizard-nav .btn-primary { margin-left: 0; }
  .signature-pad { height: 160px; }
  .signature-box { padding: 4px; }
  .contract-frame { height: 260px; }
  .map-picker-canvas { height: 240px !important; }
  /* Le dossier respire moins : les marges du cadre se resserrent. */
  body > div > .card > .card-body { padding: 16px 14px; }
}

