@import url('https://fonts.googleapis.com/css2?family=Anton&family=Work+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F3F5;
  --ink: #1A1418;
  --ink-dim: #6B6169;
  --pink: #E8478F;
  --pink-deep: #C22E71;
  --pink-pale: #FDE7F1;
  --pink-soft: #B03A70;
  --gold: #B57A14;
  --gold-soft: #FBF0DC;
  --line: #E6DEE2;
  --card: #FFFFFF;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(26,20,24,0.06), 0 4px 14px rgba(26,20,24,0.06);
  --orange-money: #FF7900;
  --wave: #0E8E99;
  --wave-soft: #E2F4F6;
  --green: #2E7D4F;
  --green-soft: #E4F2E9;
  --red: #C2334F;
  --red-soft: #FBE4E8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Work Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* ---------- Fond photographique (toutes les pages sauf l'accueil) ----------
   L'image change selon la page (déterministe, pas de scintillement au clic).
   Fixe et assombrie : c'est une ambiance derrière un contenu qui reste sur
   fond blanc — jamais du texte posé à même la photo. */
body.bg-photo {
  background-image:
    linear-gradient(rgba(20, 15, 17, .84), rgba(20, 15, 17, .84)),
    var(--page-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body.bg-photo main {
  background: var(--surface);
  border-radius: 20px;
  margin-top: 22px;
  margin-bottom: 22px;
  box-shadow: 0 14px 44px rgba(10, 6, 8, .35);
}
body.bg-photo footer.site-footer {
  background: var(--surface);
  border-radius: 20px;
  margin-bottom: 22px;
  padding-left: 24px;
  padding-right: 24px;
  box-shadow: 0 14px 44px rgba(10, 6, 8, .35);
}
@media (max-width: 640px) {
  body.bg-photo main,
  body.bg-photo footer.site-footer { border-radius: 14px; margin-left: 10px; margin-right: 10px; }
  body.bg-photo { background-attachment: scroll; }
}
h1, h2, h3, .display {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

#app { min-height: 100vh; display: flex; flex-direction: column; }

.demo-banner { background: var(--pink); color: #fff; text-align: center; font-size: 12.5px; font-weight: 700; padding: 7px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 2px solid var(--pink);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; flex-wrap: wrap; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; border: none; background: none; padding: 0; }
.brand-logo-img { height: 52px; width: auto; display: block; }
/* Mot-symbole texte accompagnant le blason : il porte le nom, que le dessin
   ne peut plus rendre lisible à cette taille. */
.brand-name {
  font-family: 'Anton', sans-serif; font-size: 20px; line-height: 1;
  letter-spacing: .02em; color: var(--ink); text-transform: uppercase; white-space: nowrap;
}
.brand-name strong { font-weight: 400; color: var(--pink-deep); }

.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link {
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink); border: none; background: none;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.nav-link.active { background: var(--pink); color: #fff; }
.nav-link:hover:not(.active) { background: var(--surface-2); }
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff; border-radius: 999px;
  min-width: 18px; height: 18px; font-size: 11px; font-weight: 700; padding: 0 5px; margin-left: 6px;
}

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 24px 80px; }
footer { text-align: center; padding: 20px; color: var(--ink-dim); font-size: 12px; }

/* ---------- Bandeau d'introduction (sous le hero-banner) ---------- */
.intro-strip {
  text-align: center; padding: 26px 0 38px; border-bottom: 1px solid var(--line); margin-bottom: 30px;
}
.intro-strip .lede {
  font-size: 16px; line-height: 1.6; color: var(--ink-dim); max-width: 58ch; margin: 0 auto;
  font-family: 'Work Sans', sans-serif; text-transform: none;
}
.intro-strip .trust-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.intro-strip .trust-item {
  font-size: 12px; font-weight: 700; color: var(--pink-deep); background: var(--pink-pale);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
  display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.03em;
}

@media (max-width: 760px) {
  .intro-strip .lede { font-size: 14px; }
  .intro-strip .trust-row { gap: 8px; }
  .intro-strip .trust-item { font-size: 11px; padding: 8px 12px; }
}

/* ---------- Category rail ---------- */
.cat-rail { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 20px; }
.cat-pill {
  flex: none; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-weight: 700; font-size: 13px; white-space: nowrap; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.02em;
}
.cat-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Product grid ---------- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 16px; }
.section-title h2 { font-size: 21px; color: var(--ink); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative;
}
.product-swatch {
  height: 80px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.product-card h3 { font-size: 14.5px; font-family: 'Work Sans', sans-serif; font-weight: 700; color: var(--ink); text-transform: none; }
.product-card .desc { font-size: 12.5px; color: var(--ink-dim); min-height: 32px; }
.product-card .unit { font-size: 11px; color: var(--pink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.product-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { font-weight: 400; font-size: 17px; font-family: 'Anton', sans-serif; color: var(--pink-deep); letter-spacing: 0.01em; }
.qty-btn {
  border: none; background: var(--pink); color: #fff; border-radius: 8px;
  padding: 8px 12px; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.02em;
}
.qty-btn:hover { background: var(--pink-deep); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; color: var(--ink);
}

/* ---------- Cards / forms ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 12.5px; font-weight: 700; color: var(--pink-soft); text-transform: uppercase; letter-spacing: 0.02em; }
.form-row input, .form-row select, .form-row textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--ink);
}
.form-row input::placeholder, .form-row textarea::placeholder { color: #A79DA3; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--pink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 13.5px;
  background: var(--pink); color: #fff; text-transform: uppercase; letter-spacing: 0.03em;
}
.btn:hover { background: var(--pink-deep); }
.btn.secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.secondary:hover { border-color: var(--pink); color: var(--pink-deep); }
.btn.block { width: 100%; }
.btn.danger { background: var(--red); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.auth-shell { max-width: 440px; margin: 24px auto; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.02em; font-size: 12.5px;
}
.auth-tabs button.active { background: var(--pink); color: #fff; border-color: var(--pink); }
.role-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.role-chip { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; background: #fff; color: var(--ink); text-transform: uppercase; letter-spacing: 0.02em; }
.role-chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.hint { font-size: 12px; color: var(--ink-dim); margin-top: -8px; margin-bottom: 14px; }

/* ---------- Cart ---------- */
.cart-line { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.cart-line:last-child { border-bottom: none; }
.cart-line .meta { flex: 1; }
.cart-line .meta .name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.cart-line .meta .sub { font-size: 12px; color: var(--ink-dim); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 400; font-size: 19px; padding-top: 14px; font-family: 'Anton', sans-serif; color: var(--ink); text-transform: uppercase; }
.fee-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-dim); padding-top: 8px; }

/* ---------- Payment method cards ---------- */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-method {
  border: 2px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center;
  background: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pay-method .logo { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 13px; }
.pay-method.om .logo { background: var(--orange-money); }
.pay-method.wave .logo { background: var(--wave); }
.pay-method.cash .logo { background: var(--gold); }
.pay-method .lbl { font-size: 12px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.02em; }
.pay-method.selected { border-color: var(--pink); background: var(--pink-pale); }
@media (max-width: 500px) { .pay-methods { grid-template-columns: 1fr; } }

.payment-modal-backdrop {
  position: fixed; inset: 0; background: rgba(26,20,24,0.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.payment-modal {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; max-width: 380px; width: 100%;
  box-shadow: 0 20px 50px rgba(26,20,24,0.25); text-align: center; color: var(--ink);
}
.payment-modal .logo-big { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 20px; margin: 0 auto 14px; }
.payment-modal.om .logo-big { background: var(--orange-money); }
.payment-modal.wave .logo-big { background: var(--wave); }
.payment-modal h3 { color: var(--ink); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--pink);
  margin: 16px auto; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-status-icon { font-size: 40px; margin-bottom: 8px; }

/* ---------- Orders / tracking ---------- */
.order-card { display: flex; flex-direction: column; gap: 10px; }
.order-head { display: flex; align-items: center; justify-content: space-between; }
.order-id { font-weight: 400; font-family: 'Anton', sans-serif; font-size: 18px; color: var(--ink); text-transform: uppercase; }
.badge {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.badge.recue { background: var(--surface-2); color: var(--ink-dim); }
.badge.acceptee, .badge.en_preparation { background: var(--gold-soft); color: var(--gold); }
.badge.assignee, .badge.vers_retrait, .badge.en_livraison { background: var(--wave-soft); color: var(--wave); }
.badge.livree { background: var(--green-soft); color: var(--green); }
.badge.annulee { background: var(--red-soft); color: var(--red); }
.badge.paye { background: var(--green-soft); color: var(--green); }
.badge.en_attente { background: var(--surface-2); color: var(--ink-dim); }
.badge.echoue { background: var(--red-soft); color: var(--red); }

.progress-track { display: flex; align-items: center; gap: 4px; margin: 6px 0; }
.progress-step { flex: 1; height: 6px; border-radius: 4px; background: var(--line); }
.progress-step.done { background: var(--pink); }

.items-mini { font-size: 13px; color: var(--ink-dim); }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Suivi temps reel facon Yango ---------- */
.track-panel {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-top: 12px;
}
.track-head { display: flex; align-items: center; gap: 12px; }
.track-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--pink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex: none;
}
.track-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.track-sub { font-size: 12.5px; color: var(--ink-dim); }
.track-eta { margin-left: auto; text-align: right; }
.track-eta .big { font-family: 'Anton', sans-serif; font-size: 22px; color: var(--pink-deep); }
.track-eta .lbl { font-size: 10.5px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.track-call {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  background: var(--green); color: #fff; border-radius: 999px; padding: 8px 16px;
  font-weight: 700; font-size: 12.5px; text-transform: uppercase;
}
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  margin-right: 6px; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- Tables (gestion) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink); }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-dim); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat-card .num { font-family: 'Anton', sans-serif; font-size: 26px; font-weight: 400; color: var(--pink-deep); }
.stat-card .label { font-size: 11px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.03em; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-dim); }
.empty-state .emoji { font-size: 40px; margin-bottom: 10px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; box-shadow: 0 6px 20px rgba(26,20,24,0.25); z-index: 100;
}

.status-select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; background: #fff; color: var(--ink); }

.role-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.role-badge.gestion { background: var(--pink-pale); color: var(--pink-deep); }
.role-badge.client { background: var(--wave-soft); color: var(--wave); }
.role-badge.livreur { background: var(--gold-soft); color: var(--gold); }
.role-badge.super_admin { background: var(--ink); color: #fff; }

.online-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 13px; text-transform: uppercase; border: 2px solid var(--line); background: #fff; color: var(--ink-dim);
}
.online-toggle.on { border-color: var(--green); color: var(--green); background: var(--green-soft); }

@media (max-width: 600px) {
  .topbar { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  main { padding: 20px 16px 60px; }
  .brand-logo-img { height: 42px; }
  .brand-name { font-size: 16px; }
}

/* ---------- Geolocalisation / cartes ---------- */
.map-box { height: 260px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.map-box.small { height: 190px; }
.map-coord-label { font-size: 12px; color: var(--pink-soft); margin-top: 8px; font-weight: 600; }
.leaflet-container { background: var(--surface-2); font-family: 'Work Sans', sans-serif; }
.route-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  border: 1.5px solid var(--wave); color: var(--wave); border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 12.5px; text-transform: uppercase;
}
.route-link:hover { background: var(--wave); color: #fff; }
.pin-marker {
  width: 16px; height: 16px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.pin-marker.pickup { background: var(--gold); }
.pin-marker.delivery { background: var(--pink); }
.pin-marker.livreur { background: var(--green); }

/* =====================================================================
   CONSOLE DE GESTION (js/gestion.js)
   ===================================================================== */

.g-console { max-width: 1280px; }
.g-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.g-header h2 { font-size: 24px; color: var(--ink); margin-bottom: 2px; }
.g-subtitle { font-size: 12.5px; color: var(--ink-dim); }

/* ---- Navigation par onglets ---- */
.g-nav {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.g-nav-btn {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-dim); font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em; cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
}
.g-nav-btn:hover { border-color: var(--pink); color: var(--pink-deep); }
.g-nav-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.g-loading { padding: 50px; text-align: center; color: var(--ink-dim); font-size: 14px; }

/* ---- Mise en page ---- */
.g-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.g-cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 16px; }
.g-cols-2 > .card, .g-cols-3 > .card { margin-top: 0; }
@media (max-width: 900px) { .g-cols-2, .g-cols-3 { grid-template-columns: 1fr; } }

.g-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.g-card-head h3 { font-size: 16px; color: var(--ink); }
.g-card-actions { display: flex; gap: 8px; }

.g-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 16px; font-size: 13.5px; color: var(--ink);
}
.g-banner.warn { background: var(--gold-soft); border-color: #EBD9AE; color: var(--gold); }

/* ---- Indicateurs ---- */
.stat-card.kpi .sub { font-size: 11px; color: var(--ink-dim); margin-top: 4px; }
.stat-card.kpi.good .num { color: var(--green); }
.stat-card.kpi.bad .num { color: var(--red); }
.stat-card.kpi.warn .num { color: var(--gold); }

/* ---- Tableaux ---- */
.g-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.g-table th {
  text-align: left; padding: 9px 10px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-dim);
  border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
.g-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.g-table tr:last-child td { border-bottom: none; }
.g-table tbody tr:hover, .g-table tr:hover { background: var(--surface-2); }
.g-table.compact td, .g-table.compact th { padding: 6px 8px; font-size: 12.5px; }
.g-empty-cell { text-align: center; color: var(--ink-dim); padding: 30px !important; font-style: italic; }
.g-row-bad td { background: var(--red-soft); }
.g-clip { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.g-mini { font-size: 11.5px; color: var(--ink-dim); }
.g-thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); display: block; }
.g-code { font-family: ui-monospace, monospace; font-size: 11.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }

.g-good { color: var(--green); font-weight: 700; }
.g-danger { color: var(--red); font-weight: 700; }
.g-warn { color: var(--gold); font-weight: 700; }

/* ---- Boutons compacts ---- */
.btn-xs { padding: 5px 10px !important; font-size: 11.5px !important; }
.g-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---- Pastilles ---- */
.g-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap;
}
.g-pill.good { background: var(--green-soft); color: var(--green); }
.g-pill.bad { background: var(--red-soft); color: var(--red); }
.g-pill.warn { background: var(--gold-soft); color: var(--gold); }
.g-pill.info { background: var(--wave-soft); color: var(--wave); }
.g-pill.mute { background: var(--surface-2); color: var(--ink-dim); }

/* ---- Filtres et période ---- */
.g-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.g-filters input, .g-filters select {
  padding: 9px 12px; border-radius: 9px; border: 1.5px solid var(--line);
  font-size: 13.5px; background: #fff; color: var(--ink); font-family: inherit;
}
.g-filters input[type="search"] { min-width: 260px; flex: 1; }
.g-filters input:focus, .g-filters select:focus { border-color: var(--pink); outline: none; }

.g-period {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--surface-2); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px;
}
.g-period-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.g-preset {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12px; font-weight: 700; color: var(--ink-dim); cursor: pointer;
}
.g-preset:hover { border-color: var(--pink); color: var(--pink-deep); }
.g-period-range { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); flex-wrap: wrap; }
.g-period-range input { padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--line); font-size: 12.5px; font-family: inherit; }

/* ---- Graphique en barres ---- */
.g-chart { display: flex; flex-direction: column; gap: 7px; }
.g-bar-row { display: grid; grid-template-columns: 120px 1fr 100px; gap: 10px; align-items: center; }
.g-bar-label { font-size: 12px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-bar-track { background: var(--surface-2); border-radius: 5px; height: 16px; overflow: hidden; }
.g-bar-fill { height: 100%; background: var(--pink); border-radius: 5px; transition: width .3s ease; }
.g-bar-fill.bad { background: var(--red); }
.g-bar-value { font-size: 12px; font-weight: 700; color: var(--ink); text-align: right; }
@media (max-width: 640px) { .g-bar-row { grid-template-columns: 90px 1fr 80px; } }

/* ---- Paires clé / valeur ---- */
.g-kv { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.g-kv:last-child { border-bottom: none; }
.g-kv > span { color: var(--ink-dim); }
.g-kv.sub-total { border-top: 1px solid var(--line); font-weight: 700; }
.g-kv.total { border-top: 2px solid var(--ink); border-bottom: none; font-size: 16px; padding-top: 10px; margin-top: 4px; }
.g-tel { color: var(--pink-deep); font-weight: 700; text-decoration: none; }
.g-tel:hover { text-decoration: underline; }
.g-pl { max-width: 560px; }

/* ---- Fiche client ---- */
.g-breadcrumb { margin-bottom: 14px; }
.g-client-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.g-avatar {
  width: 54px; height: 54px; border-radius: 50%; background: var(--pink-pale); color: var(--pink-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Anton', sans-serif; font-size: 24px; flex-shrink: 0;
}
.g-client-id { flex: 1; min-width: 200px; }
.g-client-id h3 { font-size: 20px; color: var(--ink); }
.g-client-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.g-note-box { margin-top: 14px; background: var(--gold-soft); border-radius: 9px; padding: 11px 14px; font-size: 13px; color: var(--gold); }

/* ---- Suivi de commande ---- */
.g-timeline { display: flex; gap: 4px; flex-wrap: wrap; }
.g-tl-step { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 11.5px; color: var(--ink-dim); }
.g-tl-step.done { background: var(--pink-pale); color: var(--pink-deep); font-weight: 700; }
.g-tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.g-tl-step.done .g-tl-dot { background: var(--pink); }
.g-sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g-sheet-grid > .card { margin-top: 0; }
@media (max-width: 800px) { .g-sheet-grid { grid-template-columns: 1fr; } }

/* ---- Fenêtre modale ---- */
.g-modal-backdrop {
  position: fixed; inset: 0; background: rgba(26,20,24,0.55); z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto;
}
.g-modal {
  background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(26,20,24,0.28);
  width: 100%; max-width: 560px; margin: auto 0;
}
.g-modal.wide { max-width: 980px; }
.g-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.g-modal-head h3 { font-size: 18px; color: var(--ink); }
.g-modal-x { background: none; border: none; font-size: 20px; color: var(--ink-dim); cursor: pointer; line-height: 1; padding: 4px 8px; }
.g-modal-x:hover { color: var(--red); }
.g-modal-body { padding: 22px; }
.g-modal-body > .card { box-shadow: none; }
.g-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.g-confirm-text { font-size: 14.5px; line-height: 1.65; color: var(--ink); white-space: pre-line; }

/* ---- Formulaires ---- */
.field-hint { font-size: 11.5px; color: var(--ink-dim); line-height: 1.5; }
.g-check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); margin-bottom: 12px; cursor: pointer; }
.g-check input { width: auto; }
.g-cash-block { background: var(--surface-2); border-radius: 10px; padding: 14px 16px 2px; margin-top: 6px; }
.g-order-list { min-height: 100px; }
.map-box.large { height: 400px; }

@media (max-width: 700px) {
  .g-table { font-size: 12.5px; }
  .g-table th, .g-table td { padding: 8px 6px; }
  .g-clip { max-width: 140px; }
  .g-console { max-width: 100%; }
}

/* =====================================================================
   CHOIX LIBRE DE LA DATE ET DE L'HEURE DE LIVRAISON
   ===================================================================== */

.slot-picker { display: flex; flex-direction: column; gap: 12px; }
.slot-modes { display: flex; gap: 8px; flex-wrap: wrap; }
.slot-mode {
  flex: 1; min-width: 140px; padding: 11px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 700; cursor: pointer; text-align: center;
  text-transform: uppercase; letter-spacing: 0.02em; transition: all .15s ease;
}
.slot-mode:hover { border-color: var(--pink); }
.slot-mode.active { background: var(--pink-pale); border-color: var(--pink); color: var(--pink-deep); }
.slot-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot-field { display: flex; flex-direction: column; gap: 5px; }
.slot-field > span { font-size: 11.5px; font-weight: 700; color: var(--pink-soft); text-transform: uppercase; letter-spacing: 0.02em; }
.slot-field input {
  padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); width: 100%;
}
.slot-field input:focus { border-color: var(--pink); outline: none; }
.slot-feedback { font-size: 12.5px; line-height: 1.5; margin: 0; }
.slot-feedback.ok { color: var(--green); font-weight: 600; }
.slot-feedback.err { color: var(--red); font-weight: 600; }
@media (max-width: 480px) { .slot-fields { grid-template-columns: 1fr; } }

/* =====================================================================
   MESSAGERIE
   ===================================================================== */

.msg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.msg-head h2 { font-size: 22px; color: var(--ink); margin-bottom: 4px; }

.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-thread {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius); padding: 15px 18px; cursor: pointer; transition: all .15s ease;
}
.msg-thread:hover { border-color: var(--pink); box-shadow: var(--shadow); }
.msg-thread.unread { border-left-color: var(--pink); background: var(--pink-pale); }
.msg-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.msg-subject { font-weight: 700; font-size: 15px; color: var(--ink); }
.msg-preview { font-size: 13px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--ink-dim); }
.msg-dot { color: var(--pink); font-weight: 700; }
.msg-strong { font-weight: 700; color: var(--ink); }
.msg-row-unread td { background: var(--pink-pale); }

.msg-status {
  display: inline-block; padding: 3px 10px; border-radius: 999px; margin-right: 6px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.msg-status.ouvert { background: var(--pink-pale); color: var(--pink-deep); }
.msg-status.en_cours { background: var(--wave-soft); color: var(--wave); }
.msg-status.resolu { background: var(--green-soft); color: var(--green); }
.msg-status.haute { background: var(--red-soft); color: var(--red); }

.msg-thread-info { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.msg-meta-inline { font-size: 12px; color: var(--ink-dim); }
.msg-order-ref {
  background: var(--surface-2); border-radius: 9px; padding: 10px 14px;
  font-size: 12.5px; color: var(--ink); margin-bottom: 14px;
}

.msg-stream {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 420px; overflow-y: auto; padding: 6px 2px 10px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.msg-bubble-row { display: flex; }
.msg-bubble-row.mine { justify-content: flex-end; }
.msg-bubble {
  max-width: 76%; background: var(--surface-2); border-radius: 14px;
  padding: 11px 15px; font-size: 13.5px; line-height: 1.6;
}
.msg-bubble-row.mine .msg-bubble { background: var(--pink-pale); }
.msg-bubble.staff { background: var(--wave-soft); }
.msg-author { font-size: 11px; font-weight: 700; color: var(--pink-soft); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.msg-body { color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.msg-time { font-size: 10.5px; color: var(--ink-dim); margin-top: 5px; }

.msg-reply { display: flex; flex-direction: column; gap: 10px; }
.msg-reply textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line);
  font-family: inherit; font-size: 14px; resize: vertical; color: var(--ink); background: #fff;
}
.msg-reply textarea:focus { border-color: var(--pink); outline: none; }
.msg-reply .btn { align-self: flex-end; }
.msg-counter { font-size: 11px; color: var(--ink-dim); text-align: right; }
.form-row textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line);
  font-family: inherit; font-size: 14px; resize: vertical; color: var(--ink); background: #fff;
}
.form-row textarea:focus { border-color: var(--pink); outline: none; }

@media (max-width: 600px) { .msg-bubble { max-width: 88%; } .msg-stream { max-height: 320px; } }

/* =====================================================================
   BANDEAU D'ACCUEIL ILLUSTRÉ
   ===================================================================== */

.hero-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 22px; aspect-ratio: 16 / 9; max-height: 420px;
}
.hero-banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-banner-veil {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(26,20,24,.88) 0%, rgba(26,20,24,.62) 45%, rgba(26,20,24,.15) 100%);
}
.hero-banner-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; padding: 6% 8%; max-width: 640px; color: #fff;
}
.hero-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pink); margin-bottom: 10px;
}
.hero-banner-text h1 { font-size: clamp(24px, 4.2vw, 46px); line-height: 1.08; color: #fff; margin-bottom: 12px; }
.hero-banner-text h1 .accent { color: var(--pink); }
.hero-banner-text p { font-size: clamp(13px, 1.5vw, 16px); color: rgba(255,255,255,.9); margin-bottom: 20px; line-height: 1.6; }
.hero-cta { align-self: flex-start; }
@media (max-width: 640px) {
  .hero-banner { aspect-ratio: 4 / 3; }
  .hero-banner-veil { background: linear-gradient(0deg, rgba(26,20,24,.92) 20%, rgba(26,20,24,.35) 100%); }
  .hero-banner-text { justify-content: flex-end; padding: 22px; }
}

/* =====================================================================
   CATALOGUE — PHOTOS AU FORMAT 16/9
   ===================================================================== */

.product-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.product-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: var(--surface-2); margin-bottom: 12px;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.product-media:hover img { transform: scale(1.05); }
.product-media-tag {
  position: absolute; top: 8px; left: 8px; background: rgba(26,20,24,.72); color: #fff;
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.product-media-hint {
  position: absolute; inset: auto 0 0 0; background: linear-gradient(0deg, rgba(26,20,24,.85), transparent);
  color: #fff; font-size: 11.5px; font-weight: 700; padding: 20px 12px 9px;
  opacity: 0; transition: opacity .25s ease;
}
.product-media:hover .product-media-hint { opacity: 1; }
.product-title { cursor: pointer; }
.product-title:hover { color: var(--pink-deep); }
.product-fiche-link {
  background: none; border: none; padding: 8px 0 0; margin-top: 4px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--pink-deep); font-family: inherit; text-align: left;
}
.product-fiche-link:hover { text-decoration: underline; }
.g-thumb.placeholder { opacity: .55; }

/* =====================================================================
   FICHE TECHNIQUE PRODUIT
   ===================================================================== */

.fiche { max-width: 940px; }
.fiche-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; max-height: 460px; }
.fiche-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche-hero-veil { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(26,20,24,.93) 15%, rgba(26,20,24,.30) 75%); }
.fiche-hero-body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 26px 30px; color: #fff; }
.fiche-back {
  position: absolute; top: 18px; left: 22px; background: rgba(255,255,255,.16); border: none;
  color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  cursor: pointer; backdrop-filter: blur(6px); font-family: inherit;
}
.fiche-back:hover { background: rgba(255,255,255,.3); }
.fiche-cat {
  align-self: flex-start; background: var(--c, var(--pink)); color: #fff; padding: 4px 12px;
  border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px;
}
.fiche-hero-body h1 { font-size: clamp(22px, 3.6vw, 38px); color: #fff; line-height: 1.1; margin-bottom: 8px; }
.fiche-lede { color: rgba(255,255,255,.88); font-size: 14.5px; line-height: 1.6; margin-bottom: 14px; max-width: 620px; }
.fiche-hero-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fiche-price { font-family: 'Anton', sans-serif; font-size: 30px; color: var(--pink); }
.fiche-price span { font-family: inherit; font-size: 14px; color: rgba(255,255,255,.75); font-weight: 400; }
.fiche-stock { padding: 5px 13px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.fiche-stock.disponible { background: var(--green); color: #fff; }
.fiche-stock.limite { background: var(--gold); color: #fff; }
.fiche-stock.rupture { background: var(--red); color: #fff; }
.fiche-photo-note { position: absolute; top: 18px; right: 22px; background: rgba(26,20,24,.7); color: #fff; font-size: 10px; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }

.fiche-block { margin-top: 26px; }
.fiche-block h2 { font-size: 19px; color: var(--ink); margin-bottom: 12px; }
.fiche-text { font-size: 15px; line-height: 1.8; color: var(--ink); }
.fiche-advice { background: var(--gold-soft); border-radius: var(--radius); padding: 20px 24px; }
.fiche-advice h2 { color: var(--gold); }
.fiche-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fiche-spec { background: var(--surface-2); border-radius: 10px; padding: 13px 16px; }
.fiche-spec .k { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--pink-soft); margin-bottom: 4px; }
.fiche-spec .v { font-size: 13.5px; color: var(--ink); line-height: 1.55; }

.recipe { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.recipe-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit;
}
.recipe-head:hover { background: var(--surface-2); }
.recipe-head.open { background: var(--pink-pale); }
.recipe-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.recipe-meta { font-size: 11.5px; color: var(--ink-dim); }
.recipe-chevron { font-size: 22px; color: var(--pink-deep); line-height: 1; flex-shrink: 0; }
.recipe-content { padding: 4px 20px 20px; }
.recipe-intro { font-size: 14px; color: var(--ink-dim); font-style: italic; margin-bottom: 16px; line-height: 1.6; }
.recipe-cols { display: grid; grid-template-columns: 1fr 1.6fr; gap: 26px; }
.recipe-cols h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pink-soft); margin-bottom: 10px; }
.recipe-ing ul { list-style: none; padding: 0; }
.recipe-ing li { padding: 6px 0 6px 16px; position: relative; font-size: 13.5px; line-height: 1.5; border-bottom: 1px solid var(--line); }
.recipe-ing li:before { content: "•"; position: absolute; left: 0; color: var(--pink); font-weight: 700; }
.recipe-ing li:last-child { border-bottom: none; }
.recipe-steps ol { padding-left: 20px; }
.recipe-steps li { padding: 7px 0; font-size: 14px; line-height: 1.65; color: var(--ink); }
.recipe-steps li::marker { color: var(--pink); font-weight: 700; }
.recipe-tip { margin-top: 16px; background: var(--green-soft); border-radius: 10px; padding: 13px 16px; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.recipe-tip strong { color: var(--green); }
@media (max-width: 720px) { .recipe-cols { grid-template-columns: 1fr; gap: 18px; } }

.fiche-cta {
  position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 16px 22px; margin-top: 28px; box-shadow: 0 8px 30px rgba(26,20,24,.25);
}
.fiche-cta-name { font-weight: 700; font-size: 15px; }
.fiche-cta-price { font-size: 13px; color: rgba(255,255,255,.7); }

.fiche-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.fiche-related-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 12px; cursor: pointer; overflow: hidden; text-align: left; font-family: inherit; }
.fiche-related-card:hover { border-color: var(--pink); box-shadow: var(--shadow); }
.fiche-related-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 9px; }
.fiche-related-card .n { font-size: 13px; font-weight: 700; color: var(--ink); padding: 0 12px; }
.fiche-related-card .p { font-size: 12px; color: var(--pink-deep); padding: 3px 12px 0; }

/* =====================================================================
   RAPPEL DE COMMANDE
   ===================================================================== */

.order-notice {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 20px;
  background: var(--gold-soft); border: 1px solid #EBD9AE; border-radius: var(--radius);
  padding: 16px 20px; font-size: 13.5px; line-height: 1.65; color: var(--ink);
}
.order-notice.ok { background: var(--green-soft); border-color: #BFE3CC; }
.order-notice-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.order-notice.ok .order-notice-icon { background: var(--green); }
.order-notice strong { display: block; margin-bottom: 3px; }
.order-notice-actions { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.checkout-final-note { font-size: 12px; color: var(--ink-dim); text-align: center; margin-top: 10px; line-height: 1.6; }

/* =====================================================================
   PASTILLES DE NOTIFICATION
   ===================================================================== */

.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; line-height: 1; vertical-align: middle;
  animation: badge-pop .3s ease;
}
@keyframes badge-pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Pastille neutre : un décompte informatif (ex. commandes en cours), pas une
   alerte. Distincte du rouge de .notif-badge, réservé à ce qui est nouveau
   et non encore vu (messages non lus, comptes en attente de validation). */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  background: var(--surface-2); color: var(--ink-dim); border: 1px solid var(--line);
  border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 1; vertical-align: middle;
}

/* =====================================================================
   PIED DE PAGE
   ===================================================================== */

.site-footer { margin-top: 50px; border-top: 1px solid var(--line); padding-top: 32px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 26px; }
.footer-brand { font-family: 'Anton', sans-serif; font-size: 20px; letter-spacing: .04em; color: var(--ink); margin-bottom: 8px; }
.footer-col p { font-size: 13px; line-height: 1.7; color: var(--ink-dim); }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pink-soft); margin-bottom: 12px; }
.footer-link { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 9px; text-decoration: none; }
.footer-link:hover { color: var(--pink-deep); }
.footer-note { font-size: 12.5px; margin-bottom: 12px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding: 16px 0 26px; font-size: 11.5px; color: var(--ink-dim);
}
@media (max-width: 720px) { .footer-cols { grid-template-columns: 1fr; gap: 24px; } }

.fiche-editor-recipes { display: flex; flex-direction: column; gap: 8px; }
.fiche-editor-recipe {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-2); border-radius: 10px; padding: 11px 15px;
}

/* =====================================================================
   AGENDA DE LIVRAISON
   ===================================================================== */

.agenda-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.agenda-day {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  min-height: 96px; display: flex; flex-direction: column; gap: 6px; background: var(--surface);
}
.agenda-day.clickable { cursor: pointer; transition: all .15s ease; }
.agenda-day.clickable:hover { border-color: var(--pink); box-shadow: var(--shadow); }
.agenda-day.today { border-color: var(--pink); border-width: 2px; }
.agenda-day.empty { background: var(--surface-2); opacity: .6; }
.agenda-day.busy { background: var(--gold-soft); border-color: #EBD9AE; }
.agenda-day-head { display: flex; align-items: baseline; justify-content: space-between; }
.agenda-dow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-dim); }
.agenda-num { font-family: 'Anton', sans-serif; font-size: 19px; color: var(--ink); }
.agenda-day.today .agenda-num { color: var(--pink-deep); }
.agenda-count { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.agenda-total { font-size: 11.5px; color: var(--ink-dim); }
.agenda-warn { font-size: 10.5px; font-weight: 700; color: var(--red); margin-top: 2px; }
.agenda-none { font-size: 16px; color: var(--line); text-align: center; margin-top: 12px; }
@media (max-width: 900px) { .agenda-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .agenda-grid { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================================
   WHATSAPP
   ===================================================================== */

.wa-btn { background: #25D366 !important; border-color: #25D366 !important; color: #fff !important; }
.wa-btn:hover { background: #1DA851 !important; border-color: #1DA851 !important; }
.wa-mini { color: #128C7E !important; border-color: #A8DFC8 !important; }
.wa-mini:hover { background: #E7F8F0 !important; border-color: #25D366 !important; }
.wa-preview-wrap { margin-top: 14px; }
.wa-preview-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); margin-bottom: 7px; }
.wa-preview { background: #ECE5DD; border-radius: 12px; padding: 14px; }
.wa-bubble {
  background: #DCF8C6; border-radius: 9px; padding: 10px 13px; font-size: 13.5px;
  line-height: 1.55; white-space: pre-wrap; word-break: break-word; max-width: 85%;
  margin-left: auto; box-shadow: 0 1px 1px rgba(0,0,0,.08);
}

/* Carte des livraisons : conteneur stable, la carte n'est plus recréée */
.live-map-host { min-height: 400px; }
.pin-legend { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; font-size: 12px; }
.pin-legend:before { content: ""; width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.pin-legend.pickup:before { background: var(--gold); }
.pin-legend.delivery:before { background: var(--pink); }
.pin-legend.livreur:before { background: var(--wave); }

/* =====================================================================
   SUIVI EN DIRECT DU LIVREUR
   ===================================================================== */

.suivi { max-width: 720px; }
.suivi-topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.suivi-back { font-size: 13px; font-weight: 700; color: var(--ink-dim); text-decoration: none; }
.suivi-back:hover { color: var(--pink-deep); }
.suivi-topbar h2 { font-size: 20px; color: var(--ink); }

.suivi-map {
  height: 46vh; min-height: 300px; max-height: 460px;
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2);
}
.suivi-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  margin-top: -22px; position: relative; z-index: 500; padding: 18px 20px;
  box-shadow: 0 -6px 24px rgba(26,20,24,.10);
}
.suivi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.suivi-ref { font-weight: 700; font-size: 15px; color: var(--ink); }
.suivi-addr { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; }

.suivi-driver { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.suivi-driver-id { flex: 1; min-width: 0; }

.suivi-progress { margin: 14px 0 6px; }
.suivi-progress-bar { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.suivi-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--pink-soft), var(--pink));
  border-radius: 999px; transition: width 1.2s ease;
}
.suivi-progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-dim); margin-top: 6px; }
.suivi-eta-at { font-size: 13px; color: var(--ink); font-weight: 700; margin-top: 10px; }
.suivi-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.suivi-actions .btn { flex: 1; min-width: 130px; text-align: center; }
.suivi-foot { font-size: 11px; color: var(--ink-dim); margin-top: 12px; text-align: center; }

.suivi-stale {
  background: var(--gold-soft); border: 1px solid #EBD9AE; border-radius: 10px;
  padding: 11px 14px; font-size: 12.5px; line-height: 1.55; color: var(--gold); margin-bottom: 12px;
}
.suivi-wait { text-align: center; padding: 22px 10px; }
.suivi-wait-icon { font-size: 38px; margin-bottom: 12px; }
.suivi-wait p { font-size: 14px; line-height: 1.65; color: var(--ink-dim); margin-bottom: 16px; }
.suivi-wait .btn { margin: 0 5px 8px; }
.suivi-done {
  margin-top: 16px; background: var(--green-soft); color: var(--green);
  border-radius: 10px; padding: 13px; text-align: center; font-weight: 700; font-size: 14px;
}
.suivi-cta { margin-top: 12px; }

.geo-warn {
  background: var(--gold-soft); border: 1px solid #EBD9AE; border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; color: var(--gold); margin-top: 10px;
}

/* Le marqueur du livreur pulse doucement : on voit qu'il est vivant. */
.pin-marker.livreur { animation: pin-pulse 2s ease-in-out infinite; }
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53,166,213,.55); }
  50% { box-shadow: 0 0 0 9px rgba(53,166,213,0); }
}

/* =====================================================================
   CORRECTIFS D'AFFICHAGE — issus de l'audit téléphone / tablette / ordinateur
   ===================================================================== */

/* 1. Téléphone — défilement latéral parasite de 10 px sur TOUTES les pages
   sauf l'accueil. `main` et le pied de page recevaient une marge latérale
   de 10 px tout en gardant `width: 100%` : le contenu dépassait donc
   l'écran de la valeur exacte de ces marges. */
@media (max-width: 640px) {
  body.bg-photo main,
  body.bg-photo footer.site-footer { width: auto; }
}

/* 2. Console de gestion — les tableaux imposaient leur largeur au document
   entier (jusqu'à +515 px sur téléphone, +280 px sur tablette). Ils
   défilent désormais horizontalement dans leur propre conteneur, la page
   reste à la largeur de l'écran. */
.g-table-wrap { width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.g-table-wrap > .g-table { min-width: max-content; }

/* Un enfant de grille a `min-width: auto` par defaut : la colonne s'elargit
   alors a la taille de son contenu le plus large et emporte toute la page
   avec elle. On autorise explicitement les colonnes a retrecir. */
.g-cols-2 > *, .g-cols-3 > *, .g-body > * { min-width: 0; }
.card { min-width: 0; }

/* 3. Cibles tactiles — minimum de 44 px recommandé au doigt. */
@media (max-width: 1024px) {
  .stepper button { width: 44px; height: 44px; border-radius: 10px; }
  .g-nav-btn { min-height: 44px; }
  .g-inline .btn.secondary,
  .g-period-presets button { min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .suivi-back { display: inline-flex; align-items: center; min-height: 44px; }
}
