/* =========================================================================
   colisdirect — charte de marque et composants du SITE CLIENT
   Palette dérivée du logo : bleu marine #1D3C6E, bleu ciel #5BA9E8, encre #101B2D.
   (surchargée au chargement depuis /api/config → config.js)

   Parti pris graphique (volontairement différent de l'ancienne maquette) :
   angles nets plutôt qu'arrondis, en-tête à trois niveaux, titres en
   capitales soulignés de bleu ciel, pied de page bleu marine.
   Mobile-first : pensé pour ~380 px, puis élargi en tablette/desktop.
   ========================================================================= */

:root {
  --primary: #1D3C6E;
  --primary-dark: #132749;
  --primary-soft: #E7EFF9;
  --accent: #5BA9E8;
  --accent-dark: #1F6FB2;
  --bg: #FFFFFF;
  --bg-alt: #F1F5FB;
  --card: #FFFFFF;
  --text: #101B2D;
  --muted: #55647A;
  --border: #D6E0EE;
  --success: #0E8F58;
  --danger: #D93A3F;
  --radius: 3px;
  --shadow: 0 1px 3px rgba(16, 27, 45, .08);
  --shadow-lg: 0 14px 34px rgba(16, 27, 45, .16);
  --header-h: 62px;
  --font-head: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 .5rem;
  line-height: 1.16;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.005em;
}
h1 { font-size: 1.72rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.04rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent-dark); }
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: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.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: 36px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { margin-bottom: 22px; }
.section-title p { color: var(--muted); max-width: 620px; margin-inline: 0; }
.section-title.center { text-align: center; }
.section-title.center p { margin-inline: auto; }

/* Sur-titre : petit carré bleu ciel + capitales bleu marine */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em; color: var(--primary);
  margin-bottom: 8px;
}
.eyebrow::before {
  content: ''; width: 16px; height: 3px; background: var(--accent); flex: none;
}
.section-title h2 { position: relative; padding-bottom: 12px; text-transform: uppercase; }
.section-title h2::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 54px; height: 3px; background: var(--accent);
}
.section-title.center h2::after { left: 50%; transform: translateX(-50%); }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* =========================== EN-TÊTE =================================== */
/* Trois niveaux : barre de service marine, barre principale blanche,
   barre de navigation marine. */
.site-header {
  background: var(--card);
  position: sticky; top: 0; z-index: 900;
  box-shadow: 0 1px 0 var(--border);
  transition: box-shadow .2s ease;
}
.site-header.compact { box-shadow: 0 4px 18px rgba(16, 27, 45, .12); }

.header-top {
  background: var(--primary-dark); color: rgba(255, 255, 255, .82);
  font-size: .76rem;
}
.header-top .container {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 34px;
}
.header-top a { color: #fff; text-decoration: none; }
.header-top a:hover { color: var(--accent); }
.header-top .ht-hours { display: none; }
.site-header.compact .header-top { display: none; }

.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: 11px; text-decoration: none; color: inherit; flex: none; }
/* Le logo est un emblème plus large que haut : hauteur fixe, largeur libre. */
.brand-logo {
  height: 46px; width: auto; object-fit: contain;
  transition: height .2s ease;
}
.site-header.compact .brand-logo { height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-head); font-weight: 700; font-size: 1.08rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--primary);
}
.brand-tagline {
  font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em;
}

/* Barre de suivi permanente */
.header-track { display: none; flex: 1; max-width: 420px; }
.header-track input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--border); border-right: none;
  border-radius: 2px 0 0 2px; font: inherit; font-size: .88rem; outline: none;
  background: var(--bg-alt);
}
.header-track input:focus { border-color: var(--accent-dark); background: #fff; box-shadow: inset 0 0 0 1px var(--accent-dark); }
.header-track button {
  border: none; background: var(--primary); color: #fff;
  padding: 0 18px; border-radius: 0 2px 2px 0;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
}
.header-track button:hover { background: var(--accent-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: 2px; border: 1px solid var(--border);
}
.header-admin:hover { color: var(--primary); border-color: var(--primary); }

.burger {
  width: 42px; height: 38px; border: 1px solid var(--border); background: #fff;
  border-radius: 2px; 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(--primary); 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; background: var(--primary); }
.main-nav.open { display: block; }
.main-nav .container { display: flex; flex-direction: column; padding-block: 4px; }
.main-nav a {
  padding: 13px 4px; color: rgba(255, 255, 255, .88); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.main-nav a:last-child { border-bottom: none; }
.main-nav a.active { color: var(--accent); }

.mobile-track { padding: 10px 0; background: var(--bg-alt); 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-family: var(--font-head); font-weight: 700; font-size: .88rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 13px 22px; border-radius: 2px;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--accent-dark); box-shadow: 0 6px 16px rgba(29, 60, 110, .28); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: .96rem; }
.btn-sm { padding: 8px 13px; font-size: .74rem; }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; box-shadow: none; }
.btn-accent { background: var(--accent); color: var(--primary-dark); }
.btn-accent:hover { background: #8CC6F2; color: var(--primary-dark); box-shadow: 0 6px 16px rgba(91, 169, 232, .35); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #B62F33; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--primary-soft); color: var(--primary-dark); }

/* =========================== CARTES ==================================== */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px; border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-icon {
  width: 38px; height: 38px; border-radius: 2px;
  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: 44px 0 52px;
  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 marine latéral pour la lisibilité du texte */
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(16, 27, 45, .95) 0%, rgba(29, 60, 110, .9) 48%, rgba(29, 60, 110, .58) 100%);
}
.hero::after { /* bandes obliques bleu ciel, rappel du logo */
  content: ''; position: absolute; right: -60px; top: 0; bottom: 0; z-index: 2;
  width: 260px; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(
    115deg, var(--accent) 0 4px, transparent 4px 22px);
}
.hero .container { position: relative; z-index: 3; }
.hero-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hero-logo {
  height: 76px; width: auto; border-radius: 4px; object-fit: contain;
  background: #fff; padding: 8px 12px; box-shadow: var(--shadow-lg); flex: none;
}
.hero-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.hero-wordmark .hero-name {
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: .09em; color: #fff;
}
.hero-slogan {
  display: inline-block; margin-top: 5px; font-weight: 600; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .18em; color: var(--accent);
}
.hero h1 { font-size: 1.95rem; margin-top: 4px; text-transform: uppercase; }
.hero p.lead { color: rgba(255, 255, 255, .88); max-width: 580px; }

/* 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(100deg, rgba(16, 27, 45, .94), rgba(29, 60, 110, .72));
}
.page-hero::after { /* liseré bleu ciel en bas de bandeau */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--accent); z-index: 3;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: 1.6rem; text-transform: uppercase; }
.page-hero p { color: rgba(255, 255, 255, .86); margin: 0; max-width: 640px; }
.breadcrumb { font-size: .76rem; color: rgba(255, 255, 255, .7); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }
.breadcrumb a { color: rgba(255, 255, 255, .92); }

/* Grande barre de suivi */
.search-box {
  display: flex; gap: 6px; flex-wrap: wrap;
  background: #fff; padding: 6px; border-radius: 2px;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-lg); margin: 20px 0 8px; max-width: 580px;
}
.search-box input {
  flex: 1 1 200px; min-width: 0; border: none; outline: none;
  padding: 14px; font-size: 1rem; border-radius: 2px; 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, .82); font-size: .82rem; }
.center .search-box { margin-inline: auto; }

/* =========================== 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);
  border-bottom: 3px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-bottom-color: var(--accent); }
.tile-media { position: relative; height: 138px; 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.05); }
.tile-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29, 60, 110, .1), rgba(16, 27, 45, .55)); }
.tile-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.tile .tile-icon {
  width: 44px; height: 44px; border-radius: 2px; margin: -36px 0 10px;
  background: var(--primary); color: #fff; position: relative; z-index: 2;
  display: grid; place-items: center; font-size: 1.25rem; 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(--accent-dark); font-family: var(--font-head); font-weight: 700;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 12px;
}
.tile:hover .tile-more { color: var(--primary); }

/* 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); border-top: 3px solid var(--primary);
  transition: transform .18s ease, box-shadow .18s ease, border-top-color .18s ease;
}
.offer:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-top-color: var(--accent); }
.offer-media { height: 132px; 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.55rem; }
.offer h3 { margin: 4px 0 8px; text-transform: uppercase; font-size: 1rem; letter-spacing: .02em; }
.offer .delay {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: .72rem; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-soft); border-left: 3px solid var(--accent);
  padding: 5px 10px; border-radius: 0; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .04em;
}
.offer p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }

/* Bandeau de statistiques animées */
.stats-band {
  background: var(--primary-dark); color: #fff; padding: 28px 0;
  background-image: repeating-linear-gradient(115deg, rgba(91, 169, 232, .16) 0 3px, transparent 3px 26px);
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; text-align: center; }
.stats-grid > div { border-left: 2px solid rgba(91, 169, 232, .45); padding-left: 12px; text-align: left; }
.stat-value { font-family: var(--font-head); font-size: 1.95rem; font-weight: 700; line-height: 1; }
.stat-value .suffix { color: var(--accent); }
.stat-label { font-size: .76rem; color: rgba(255, 255, 255, .82); margin-top: 5px; text-transform: uppercase; letter-spacing: .08em; }

/* Mini-suivi de démonstration interactif */
.demo-track { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: 18px; }
.demo-choices { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.demo-chip {
  border: 1px solid var(--border); background: var(--bg-alt); color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .78rem;
  padding: 8px 12px; border-radius: 2px; cursor: pointer; transition: all .15s ease;
}
.demo-chip:hover { border-color: var(--accent-dark); color: var(--accent-dark); }
.demo-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.demo-status { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin-bottom: 2px; text-transform: uppercase; }
.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 18px 18px 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  transition: transform .18s ease, box-shadow .18s ease, border-left-color .18s ease;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-left-color: var(--accent); }
.step-card .n {
  width: 34px; height: 34px; border-radius: 2px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; margin-bottom: 10px;
}
.step-card h3 { text-transform: uppercase; font-size: .98rem; letter-spacing: .03em; }

/* 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);
  border-top: 3px solid var(--accent);
  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: 2px; flex: none;
  display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 700; color: #fff; font-size: .9rem;
}
.testimonial .who { font-weight: 700; font-size: .92rem; }
.testimonial .city { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.stars { color: var(--accent-dark); 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: 9px; height: 4px; border-radius: 0; border: none; padding: 0;
  background: var(--border); cursor: pointer;
}
.carousel-dots button.active { background: var(--accent-dark); width: 26px; }

/* 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: var(--radius);
  border-bottom: 3px solid var(--accent);
  padding: 14px; box-shadow: var(--shadow);
}
.reassurance .r-icon { font-size: 1.35rem; }
.reassurance strong { display: block; font-family: var(--font-head); font-size: .88rem; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.reassurance span { color: var(--muted); font-size: .8rem; }

/* Bandeau d'appel à l'action */
.cta-band {
  background: var(--bg-alt); border-radius: var(--radius); box-shadow: none;
  padding: 24px; text-align: center; border: 1px solid var(--border); border-left: 4px solid var(--accent);
}
.cta-final {
  background: var(--primary-dark); color: #fff; border-radius: var(--radius);
  padding: 30px 20px; text-align: center;
  background-image: repeating-linear-gradient(115deg, rgba(91, 169, 232, .16) 0 3px, transparent 3px 26px);
}
.cta-final h2 { text-transform: uppercase; }
.cta-final p { color: rgba(255, 255, 255, .86); }

/* Image d'illustration pleine largeur */
.figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border-bottom: 4px solid var(--primary); }
.figure img { display: block; width: 100%; height: 200px; object-fit: cover; }

/* =========================== 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: #FDF3F3; }
.status-label { font-family: var(--font-head); font-size: 1.45rem; font-weight: 700; text-transform: uppercase; }
.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: 2px;
  background: #fff; border: 2px solid var(--border);
  margin: 0 auto 7px; display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; 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.05); }
.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: -6px; top: 5px;
  width: 10px; height: 10px; border-radius: 1px; background: var(--border);
}
.timeline li:first-child::before { background: var(--accent-dark); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline .t-status { font-weight: 700; }
.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: var(--radius); overflow: hidden; z-index: 1; border: 1px solid var(--border); }

/* Marqueurs personnalisés de la carte (départ / arrivée / véhicule) */
.cd-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; background: var(--primary); font-style: normal;
}
.map-legend i.todo { background: repeating-linear-gradient(90deg, #93A3B8 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 solid var(--border); font-size: .9rem;
}
.kv > div:last-child { border-bottom: none; }
.kv .k { color: var(--muted); text-transform: uppercase; font-size: .76rem; letter-spacing: .06em; }
.kv .v { font-weight: 600; text-align: right; }
.parcel-image { width: 100%; border-radius: var(--radius); display: block; }

/* =========================== DIVERS ==================================== */
.alert { padding: 12px 14px; border-radius: 2px; font-size: .9rem; margin-bottom: 14px; border-left: 4px solid transparent; }
.alert-error { background: #FDF0F0; color: #8E2226; border-color: var(--danger); }
.alert-ok { background: #E9F7F0; color: #0B6A42; border-color: var(--success); }
.alert-warn { background: #FFF6E6; color: #8A5200; border-color: #E8A33D; }
.alert-info { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--accent); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 2px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--primary-soft); color: var(--primary-dark); white-space: nowrap;
}
.badge.livre { background: #E9F7F0; color: #0B6A42; }
.badge.probleme { background: #FDF0F0; color: #8E2226; }
.badge.retourne { background: #EEF1F6; color: var(--muted); }

/* Champs de formulaire (partagés avec l'admin) */
.field { margin-bottom: 13px; }
.field label {
  display: block; font-size: .76rem; font-weight: 700; color: var(--muted);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em;
}
.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: 2px;
  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(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent-dark);
}
.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: 2px; padding: 0 14px; cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--accent-dark); }
.checkbox {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px; background: var(--primary-soft);
  border-radius: 2px; border-left: 3px solid var(--accent);
  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); color: #fff; font-family: var(--font-head);
  font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em;
}
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(--primary);
  font-family: var(--font-head); font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; padding: 8px 10px; border-radius: 2px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--accent-dark); color: var(--accent-dark); }
.lang-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--primary);
  border-radius: 2px; box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 5px;
  min-width: 175px; 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: 2px; cursor: pointer; color: var(--text);
}
.lang-menu button:hover { background: var(--bg-alt); }
.lang-menu button.active { background: var(--primary); color: #fff; }
.lang-menu strong { display: inline-block; width: 30px; }

/* =========================== BANDEAU COOKIES =========================== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 960;
  background: var(--primary-dark); color: rgba(255, 255, 255, .9);
  border-top: 3px solid var(--accent); border-radius: 0;
  box-shadow: var(--shadow-lg);
  /* marge à droite : la bulle Chatway est ancrée dans ce coin et passe au-dessus */
  padding: 16px 90px 16px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.cookie-banner p { margin: 0; font-size: .86rem; color: rgba(255, 255, 255, .82); }
.cookie-banner .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.cookie-banner .btn-ghost:hover { background: #fff; color: var(--primary-dark); }
.cookie-banner .btn { background: var(--accent); color: var(--primary-dark); }
.cookie-banner .btn:hover { background: #8CC6F2; }
.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: 2px;
  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: 2px;
  background: var(--primary-soft); color: var(--primary-dark);
  border-left: 3px solid var(--accent);
  font-weight: 700; font-size: .9rem;
}
.countdown.delivered { background: #E9F7F0; color: #0B6A42; border-left-color: var(--success); }
.countdown.late { background: #FDF0F0; color: #8E2226; border-left-color: var(--danger); }

/* =========================== FAQ (accordéon) =========================== */
.faq-item {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
  transition: border-left-color .15s ease;
}
.faq-item.open { border-left-color: var(--accent); }
.faq-question {
  width: 100%; text-align: left; border: none; background: none;
  font-family: var(--font-head); 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(--accent-dark); 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: 640px; margin: 0 auto; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* =========================== 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: 2px;
  padding: 13px 18px; font-family: var(--font-head); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em;
  box-shadow: var(--shadow-lg); cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.chat-fab:hover { background: var(--accent-dark); transform: translateY(-2px); }
.chat-fab-icon { font-size: 1.1rem; }
.chat-fab-label { display: none; }

/* =========================== PIED DE PAGE ============================== */
/* Pied de page bleu marine : contraste franc avec le corps de page blanc. */
.site-footer {
  margin-top: 40px; padding: 34px 0 16px;
  background: var(--primary-dark); color: rgba(255, 255, 255, .78);
  border-top: 4px solid var(--accent); font-size: .88rem;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.footer-brand .brand-logo { height: 50px; width: auto; background: #fff; padding: 5px 8px; border-radius: 3px; }
.footer-brand .brand-name { color: #fff; }
.footer-slogan { color: var(--accent); font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.site-footer .muted { color: rgba(255, 255, 255, .62); }
.site-footer h3 {
  font-size: .8rem; margin-bottom: 12px; color: #fff;
  text-transform: uppercase; letter-spacing: .1em;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.site-footer .btn-accent { color: var(--primary-dark); }
.footer-bottom {
  margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18);
  display: flex; flex-direction: column; gap: 4px;
  color: rgba(255, 255, 255, .6); font-size: .78rem; text-align: center;
}
.footer-bottom .brand-name { color: #fff; }

/* =========================== RESPONSIVE ================================ */
@media (min-width: 560px) {
  .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .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; }
  .reassurance { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonial { flex-basis: 46%; }
  .header-top .ht-hours { display: inline; }
  .hero-logo { height: 88px; }
  .hero-wordmark .hero-name { font-size: 1.9rem; }
}

@media (min-width: 780px) {
  body { font-size: 16px; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.65rem; }
  .section { padding: 56px 0; }
  .hero { padding: 66px 0 74px; }
  .hero h1 { font-size: 2.7rem; }
  .hero-logo { height: 104px; }
  .hero-wordmark .hero-name { font-size: 2.2rem; }
  .page-hero { padding: 42px 0 46px; }
  .page-hero h1 { font-size: 2.1rem; }
  .header-track { display: flex; }
  .header-admin { display: inline-block; }
  .burger { display: none; }
  .mobile-track { display: none; }
  .main-nav { display: block !important; }
  .main-nav .container { flex-direction: row; gap: 26px; padding-block: 0; }
  .main-nav a { border-bottom: none; border-top: 3px solid transparent; padding: 12px 0; font-size: .84rem; }
  .main-nav a.active { border-top-color: var(--accent); color: #fff; background: rgba(255, 255, 255, .06); }
  .main-nav a:hover { color: var(--accent); }
  .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.6fr 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.5rem; }
  .figure img { height: 300px; }
  #map { height: 340px; }
  .section-title { max-width: 720px; }
  .section-title.center { max-width: none; }
}

/* =========================== 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; }
}
