/* =========================================================================
   colisfacile — charte de marque et composants du SITE CLIENT
   Palette dérivée du logo : violet #6321EE, orange #F7941D, encre #17171A.
   (surchargée au chargement depuis /api/config → config.js)
   Mobile-first : pensé pour ~380 px, puis élargi en tablette/desktop.
   ========================================================================= */

:root {
  --primary: #6321EE;
  --primary-dark: #4A16B8;
  --primary-soft: #F0EAFE;
  --accent: #F7941D;
  --accent-dark: #E07E0A;
  --bg: #FFFFFF;
  --bg-alt: #F7F5FC;
  --card: #FFFFFF;
  --text: #17171A;
  --muted: #5A5A66;
  --border: #E3E0EC;
  --success: #1E9E5A;
  --danger: #E5484D;
  --radius: 16px;
  --shadow: 0 2px 14px rgba(23, 23, 26, .06);
  --shadow-lg: 0 12px 40px rgba(23, 23, 26, .12);
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 .5rem;
  line-height: 1.2;
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); }
img { max-width: 100%; }

.mono, .tracking-number {
  font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  letter-spacing: .04em;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.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;
}
.section { padding: 34px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 20px; }
.section-title p { color: var(--muted); max-width: 580px; margin-inline: auto; }
.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent-dark);
  background: #FEF3E3; padding: 4px 12px; border-radius: 999px; margin-bottom: 8px;
}

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* =========================== EN-TÊTE =================================== */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 900;
  transition: box-shadow .2s ease, padding .2s ease;
}
.site-header.compact { box-shadow: var(--shadow); }
.header-main { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); transition: min-height .2s ease; }
.site-header.compact .header-main { min-height: 54px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.brand-logo { height: 44px; width: 44px; object-fit: cover; border-radius: 11px; transition: height .2s ease, width .2s ease; }
.site-header.compact .brand-logo { height: 36px; width: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.05rem; }
.brand-tagline { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* Barre de suivi permanente */
.header-track { display: none; flex: 1; max-width: 400px; }
.header-track input {
  flex: 1; min-width: 0; padding: 9px 12px;
  border: 1px solid var(--border); border-right: none;
  border-radius: 10px 0 0 10px; font: inherit; font-size: .88rem; outline: none;
}
.header-track input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.header-track button {
  border: none; background: var(--primary); color: #fff;
  padding: 0 16px; border-radius: 0 10px 10px 0;
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
}
.header-track button:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-admin {
  display: none; font-size: .82rem; color: var(--muted); text-decoration: none;
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border);
}
.header-admin:hover { color: var(--primary); border-color: var(--primary); }

/* Numéro du service client (masqué sur petit écran : la bulle WhatsApp
   et le pied de page prennent le relais) */
.header-phone {
  display: none; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; color: var(--primary);
  text-decoration: none; white-space: nowrap;
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border);
}
.header-phone:hover { border-color: var(--primary); background: var(--primary-soft); }
.header-phone-icon { font-size: .95rem; }

.burger {
  width: 42px; height: 38px; border: 1px solid var(--border); background: #fff;
  border-radius: 10px; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.main-nav { display: none; border-top: 1px solid var(--border); background: var(--card); }
.main-nav.open { display: block; }
.main-nav .container { display: flex; flex-direction: column; padding-block: 6px; }
.main-nav a {
  padding: 12px 4px; color: var(--text); text-decoration: none;
  font-weight: 600; font-size: .95rem; border-bottom: 1px solid var(--border);
}
.main-nav a:last-child { border-bottom: none; }
.main-nav a.active { color: var(--primary); }

.mobile-track { padding: 10px 0; background: var(--card); border-bottom: 1px solid var(--border); }
.mobile-track .header-track { display: flex; max-width: none; }

/* =========================== BOUTONS =================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; background: var(--primary); color: #fff;
  font: inherit; font-weight: 600; padding: 13px 20px; border-radius: 12px;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--primary-dark); box-shadow: 0 6px 18px rgba(99, 33, 238, .25); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 1.02rem; }
.btn-sm { padding: 8px 12px; font-size: .84rem; border-radius: 9px; }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--primary-soft); box-shadow: none; }
.btn-accent { background: var(--accent); color: #17171A; }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 6px 18px rgba(247, 148, 29, .3); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #C93B3F; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #F1ECFE; }

/* =========================== CARTES ==================================== */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px; border: 1px solid var(--border);
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-icon {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 1rem; flex: none;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1.02rem; }

/* =========================== HÉROS ===================================== */
.hero {
  position: relative; color: #fff; overflow: hidden;
  padding: 40px 0 48px;
  background: var(--primary-dark); /* repli si l'image ne charge pas */
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero::before { /* voile violet pour la lisibilité du texte */
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(165deg, rgba(99,33,238,.92) 0%, rgba(74,22,184,.88) 55%, rgba(23,23,26,.85) 100%);
}
.hero::after { /* traits de vitesse orange, rappel du logo */
  content: ''; position: absolute; right: -70px; top: 26px; z-index: 2;
  width: 320px; height: 200px; pointer-events: none; opacity: .5;
  background:
    linear-gradient(90deg, transparent, var(--accent)) 0 20px/220px 6px no-repeat,
    linear-gradient(90deg, transparent, var(--accent)) 40px 60px/260px 6px no-repeat,
    linear-gradient(90deg, transparent, var(--accent)) 20px 100px/200px 6px no-repeat;
}
.hero .container { position: relative; z-index: 3; }
.hero-logo {
  height: 104px; width: 104px; border-radius: 24px; object-fit: cover;
  background: #fff; padding: 6px; box-shadow: var(--shadow-lg);
}
.hero-slogan {
  display: inline-block; margin-top: 12px; font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .16em; color: var(--accent);
}
.hero h1 { font-size: 1.9rem; margin-top: 8px; }
.hero p.lead { color: rgba(255,255,255,.9); max-width: 560px; margin-inline: auto; }

/* Héros compact des rubriques intérieures */
.page-hero { position: relative; color: #fff; padding: 30px 0 34px; overflow: hidden; background: var(--primary-dark); }
.page-hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(150deg, rgba(99,33,238,.93), rgba(23,23,26,.82));
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: 1.6rem; }
.page-hero p { color: rgba(255,255,255,.88); margin: 0; max-width: 620px; }
.breadcrumb { font-size: .78rem; color: rgba(255,255,255,.75); margin-bottom: 6px; }
.breadcrumb a { color: rgba(255,255,255,.92); }

/* Grande barre de suivi */
.search-box {
  display: flex; gap: 8px; flex-wrap: wrap;
  background: #fff; padding: 8px; border-radius: 18px;
  box-shadow: var(--shadow-lg); margin: 20px auto 8px; max-width: 560px;
}
.search-box input {
  flex: 1 1 200px; min-width: 0; border: none; outline: none;
  padding: 14px; font-size: 1rem; border-radius: 12px; color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .05em; text-transform: uppercase;
}
.search-box input:focus { background: var(--primary-soft); }
.search-hint { color: rgba(255,255,255,.85); font-size: .84rem; }

/* =========================== GRILLES ================================== */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }

/* Tuiles de rubriques avec image */
.tile {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.tile-media { position: relative; height: 132px; overflow: hidden; background: var(--primary); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile:hover .tile-media img { transform: scale(1.06); }
.tile-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(99,33,238,.12), rgba(99,33,238,.42)); }
.tile-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.tile .tile-icon {
  width: 42px; height: 42px; border-radius: 12px; margin: -34px 0 10px;
  background: #fff; color: var(--primary); position: relative; z-index: 2;
  display: grid; place-items: center; font-size: 1.3rem; box-shadow: var(--shadow);
}
.tile h3 { margin-bottom: 4px; }
.tile p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.tile .tile-more { color: var(--primary); font-weight: 600; font-size: .86rem; margin-top: 10px; }
.tile:hover .tile-more { color: var(--accent-dark); }

/* Cartes d'offres (sans prix) */
.offer {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease;
}
.offer:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.offer-media { height: 128px; overflow: hidden; background: var(--primary-soft); }
.offer-media img { width: 100%; height: 100%; object-fit: cover; }
.offer-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.offer .offer-icon { font-size: 1.6rem; }
.offer h3 { margin: 4px 0 6px; }
.offer .delay {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: .76rem; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-soft); padding: 4px 11px; border-radius: 999px; margin-bottom: 8px;
}
.offer p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }

/* Bandeau de statistiques animées */
.stats-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; padding: 26px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; text-align: center; }
.stat-value { font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-value .suffix { color: var(--accent); }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.85); margin-top: 4px; }

/* Mini-suivi de démonstration interactif */
.demo-track { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); padding: 18px; }
.demo-choices { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.demo-chip {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .8rem;
  padding: 8px 12px; border-radius: 999px; cursor: pointer; transition: all .15s ease;
}
.demo-chip:hover { border-color: var(--primary); color: var(--primary); }
.demo-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.demo-status { font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; }
.demo-note { color: var(--muted); font-size: .86rem; }

/* Étapes numérotées */
.steps { display: grid; grid-template-columns: 1fr; gap: 14px; }
.step-card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.step-card .n {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; margin-bottom: 10px;
}

/* Témoignages */
.testimonials {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 14px; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.testimonial {
  flex: 0 0 88%; scroll-snap-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.testimonial-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .9rem;
}
.testimonial .who { font-weight: 700; font-size: .92rem; }
.testimonial .city { color: var(--muted); font-size: .78rem; }
.stars { color: var(--accent); letter-spacing: .08em; font-size: .9rem; }
.testimonial p { margin: 6px 0 0; font-size: .92rem; color: var(--muted); font-style: italic; }
.carousel-dots { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0;
  background: var(--border); cursor: pointer;
}
.carousel-dots button.active { background: var(--primary); width: 22px; border-radius: 999px; }

/* Réassurance */
.reassurance { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reassurance div {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow);
}
.reassurance .r-icon { font-size: 1.4rem; }
.reassurance strong { display: block; font-size: .9rem; margin-top: 4px; }
.reassurance span { color: var(--muted); font-size: .8rem; }

/* Bandeau d'appel à l'action */
.cta-band {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; text-align: center; border: 2px dashed var(--primary);
}
.cta-final {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center;
}
.cta-final p { color: rgba(255,255,255,.88); }

/* Image d'illustration pleine largeur */
.figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.figure img { display: block; width: 100%; height: 200px; object-fit: cover; }

/* =========================== PARTENAIRES =============================== */
.partners-section { padding-bottom: 26px; }

/* Fenêtre du bandeau : les logos disparaissent en fondu sur les bords */
.partners-marquee {
  overflow: hidden; padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.partners-track {
  display: flex; width: max-content;
  animation: partners-scroll 46s linear infinite;
}
.partners-marquee:hover .partners-track,
.partners-marquee:focus-within .partners-track { animation-play-state: paused; }

.partner {
  flex: 0 0 auto; width: 158px; height: 60px; margin: 0 7px;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow);
}
.partner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.partners-note { font-size: .78rem; margin-top: 14px; }

@keyframes partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =========================== RÉSULTAT DE SUIVI ========================= */
.status-banner {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); border-left: 6px solid var(--primary);
  padding: 20px; margin-bottom: 16px;
}
.status-banner.is-delivered { border-left-color: var(--success); }
.status-banner.is-problem { border-left-color: var(--danger); background: #FEF4F4; }
.status-label { font-family: 'Poppins', sans-serif; font-size: 1.45rem; font-weight: 700; }
.status-meta { color: var(--muted); font-size: .9rem; }
.tracking-number { font-size: .92rem; color: var(--muted); }

.progress { display: flex; margin: 24px 0 8px; }
.progress-step { flex: 1; text-align: center; position: relative; font-size: .7rem; color: var(--muted); }
.progress-step .dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border);
  margin: 0 auto 7px; display: grid; place-items: center;
  font-size: .75rem; color: var(--muted); position: relative; z-index: 2;
  transition: background .4s ease, border-color .4s ease, transform .3s ease;
}
.progress-step::before {
  content: ''; position: absolute; top: 14px; left: -50%;
  width: 100%; height: 3px; background: var(--border); z-index: 1;
  transition: background .4s ease;
}
.progress-step:first-child::before { display: none; }
.progress-step.done .dot { background: var(--primary); border-color: var(--primary); color: #fff; transform: scale(1.06); }
.progress-step.done { color: var(--text); font-weight: 600; }
.progress-step.done::before { background: var(--primary); }
.progress.is-delivered .progress-step.done .dot { background: var(--success); border-color: var(--success); }
.progress.is-delivered .progress-step.done::before { background: var(--success); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--border);
}
.timeline li:first-child::before { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline .t-status { font-weight: 600; }
.timeline .t-date { font-size: .8rem; color: var(--muted); }
.timeline .t-place { font-size: .86rem; }
.timeline .t-note { font-size: .86rem; color: var(--muted); }

#map { height: 300px; border-radius: 12px; overflow: hidden; z-index: 1; }

/* Marqueurs personnalisés de la carte (départ / arrivée / véhicule) */
.cf-pin { background: none; border: none; }

/* Légende de la carte d'itinéraire */
.map-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 10px; font-size: .82rem; color: var(--muted);
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i {
  width: 14px; height: 3px; border-radius: 2px; background: var(--primary); font-style: normal;
}
.map-legend i.todo { background: repeating-linear-gradient(90deg, #9A93AD 0 5px, transparent 5px 9px); }

.kv { display: grid; grid-template-columns: 1fr; }
.kv > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: .9rem;
}
.kv > div:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; }
.parcel-image { width: 100%; border-radius: 12px; display: block; }

/* =========================== DIVERS ==================================== */
.alert { padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin-bottom: 14px; }
.alert-error { background: #FDECEC; color: #8E2226; border: 1px solid #F5C6C7; }
.alert-ok { background: #E8F7EF; color: #14683C; border: 1px solid #B9E5CD; }
.alert-warn { background: #FFF5E6; color: #8A5200; border: 1px solid #FFD9A0; }
.alert-info { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #D8CBFB; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  background: var(--primary-soft); color: var(--primary-dark); white-space: nowrap;
}
.badge.livre { background: #E8F7EF; color: #14683C; }
.badge.probleme { background: #FDECEC; color: #8E2226; }
.badge.retourne { background: #F1EFF6; color: var(--muted); }

/* Champs de formulaire (partagés avec l'admin) */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input[type=text], .field input[type=number], .field input[type=date],
.field input[type=datetime-local], .field input[type=password],
.field select, .field textarea {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; color: var(--text); background: #fff;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.field-inline { display: flex; gap: 8px; align-items: stretch; }
.field-inline input { flex: 1; }
.icon-btn {
  border: none; background: var(--primary); color: #fff;
  border-radius: 10px; padding: 0 14px; cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--primary-dark); }
.checkbox {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px; background: var(--primary-soft);
  border-radius: 10px; margin-bottom: 13px; font-size: .88rem;
}
.checkbox input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary); }
.form-note { font-size: .78rem; color: var(--muted); margin-top: -8px; margin-bottom: 12px; }

/* Tableaux (admin) — défilement horizontal sur téléphone */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; min-width: 460px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; font-size: .9rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg-alt); }

/* =========================== SÉLECTEUR DE LANGUE ======================= */
.lang-switch { position: relative; }
.lang-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font: inherit; font-size: .82rem; font-weight: 600;
  padding: 7px 10px; border-radius: 9px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 6px;
  min-width: 170px; z-index: 950;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left;
  border: none; background: none; font: inherit; font-size: .88rem;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text);
}
.lang-menu button:hover { background: var(--primary-soft); }
.lang-menu button.active { background: var(--primary); color: #fff; }
.lang-menu strong { display: inline-block; width: 30px; }

/* =========================== BANDEAU COOKIES =========================== */
.cookie-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 960;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.cookie-banner p { margin: 0; font-size: .86rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* =========================== QR CODE / PARTAGE ========================= */
.qr-block { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr-block img {
  width: 132px; height: 132px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; padding: 6px;
}
.qr-text { flex: 1 1 220px; }

/* Compte à rebours de livraison */
.countdown {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-weight: 700; font-size: .92rem;
}
.countdown.delivered { background: #E8F7EF; color: #14683C; }
.countdown.late { background: #FDECEC; color: #8E2226; }

/* =========================== FAQ (accordéon) =========================== */
.faq-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}
.faq-question {
  width: 100%; text-align: left; border: none; background: none;
  font: inherit; font-weight: 600; font-size: .98rem; color: var(--text);
  padding: 16px 46px 16px 18px; cursor: pointer; position: relative;
}
.faq-question::after {
  content: '+'; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%); font-size: 1.3rem; color: var(--primary); font-weight: 400;
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-question:hover { background: var(--bg-alt); }
.faq-answer { display: none; padding: 0 18px 18px; color: var(--muted); font-size: .93rem; }
.faq-item.open .faq-answer { display: block; }

/* =========================== FORMULAIRE DE CONTACT ===================== */
.form-card { max-width: 620px; margin: 0 auto; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Canaux du service client : e-mail, téléphone, WhatsApp */
.contact-channels { display: grid; grid-template-columns: 1fr; gap: 10px; }
.contact-channel {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); text-decoration: none; background: var(--bg-alt);
}
.contact-channel:hover { border-color: var(--primary); background: var(--primary-soft); }
.contact-channel.wa:hover { border-color: #25D366; background: #E9FBF0; }
.contact-channel-icon { font-size: 1.25rem; }
.contact-channel strong { display: block; font-size: .92rem; }
.contact-channel .muted { font-size: .85rem; }

/* =========================== BOUTON DE CHAT ============================ */
.chat-fab {
  position: fixed; right: 14px; bottom: 14px; z-index: 950;
  display: flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; border: none; border-radius: 999px;
  padding: 13px 18px; font: inherit; font-weight: 600; font-size: .9rem;
  box-shadow: var(--shadow-lg); cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.chat-fab:hover { background: var(--primary-dark); transform: translateY(-2px); }
.chat-fab-icon { font-size: 1.1rem; }
.chat-fab-label { display: none; }

/* =========================== BOUTON WHATSAPP =========================== */
.wa-fab {
  position: fixed; left: 14px; bottom: 14px; z-index: 950;
  display: flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff; border-radius: 999px;
  padding: 12px 16px; font-weight: 600; font-size: .9rem; text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: background .15s ease, transform .15s ease;
}
.wa-fab:hover { background: #1EBE5B; transform: translateY(-2px); color: #fff; }
.wa-fab-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.wa-fab-label { display: none; }

/* =========================== PIED DE PAGE ============================== */
.site-footer {
  margin-top: 36px; padding: 30px 0 16px;
  background: var(--bg-alt); border-top: 1px solid var(--border); font-size: .88rem;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.footer-brand .brand-logo { height: 44px; width: 44px; }
.footer-slogan { color: var(--accent-dark); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer h3 { font-size: .92rem; margin-bottom: 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
  color: var(--muted); font-size: .8rem; text-align: center;
}

/* =========================== RESPONSIVE ================================ */
@media (min-width: 560px) {
  .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; left: 20px; right: 20px; }
  .cookie-banner p { flex: 1; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .chat-fab-label { display: inline; }
  .wa-fab-label { display: inline; }
  .reassurance { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonial { flex-basis: 46%; }
}

@media (min-width: 780px) {
  body { font-size: 16px; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
  .section { padding: 52px 0; }
  .hero { padding: 60px 0 66px; }
  .hero h1 { font-size: 2.7rem; }
  .hero-logo { height: 130px; width: 130px; }
  .page-hero { padding: 40px 0 46px; }
  .page-hero h1 { font-size: 2.1rem; }
  .header-track { display: flex; }
  .header-admin { display: inline-block; }
  .header-phone { display: inline-flex; }
  .contact-channels { grid-template-columns: repeat(3, 1fr); }
  .partner { width: 190px; height: 72px; margin: 0 9px; }
  .burger { display: none; }
  .mobile-track { display: none; }
  .main-nav { display: block !important; }
  .main-nav .container { flex-direction: row; gap: 24px; padding-block: 0; }
  .main-nav a { border-bottom: 3px solid transparent; padding: 13px 0; font-size: .92rem; }
  .main-nav a.active { border-bottom-color: var(--primary); }
  .main-nav a:hover { color: var(--primary); }
  .nav-admin-mobile { display: none; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .kv { grid-template-columns: 1fr 1fr; column-gap: 26px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
  .progress-step { font-size: .85rem; }
  .testimonial { flex-basis: 31%; }
  .stat-value { font-size: 2.6rem; }
  .figure img { height: 300px; }
  #map { height: 340px; }
}

/* =========================== ACCESSIBILITÉ ============================= */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  /* Sans animation, le bandeau des partenaires se parcourt à la main */
  .partners-marquee { overflow-x: auto; }
}
