/* =========================================================================
   Transports Fabry — feuille de style
   Palette dérivée de l'identité réelle : bleu du logo (#184890) et du site
   d'origine (#1c4882). Aucun accent décoratif étranger à la marque.
   ========================================================================= */

:root {
  /* Marque */
  --brand: #1c4882;
  --brand-600: #173c6d;
  --brand-700: #12305a;
  --brand-800: #0d2645;
  --brand-900: #091b31;
  --brand-300: #6f9bd1;
  --brand-100: #e7eef8;

  /* Accent signal (rouge présent sur le site d'origine, usage parcimonieux) */
  --signal: #cb2130;
  --signal-600: #ab1a27;

  /* Neutres */
  --ink: #14202f;
  --ink-soft: #4a5a6e;
  --ink-faint: #7d8b9c;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f5f8fc;
  --white: #ffffff;

  /* Typographie */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;

  /* Rythme */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 4px;
  --radius-lg: 8px;

  /* Élévation */
  --shadow-sm: 0 1px 2px rgba(13, 38, 69, .06), 0 2px 8px rgba(13, 38, 69, .05);
  --shadow-md: 0 4px 12px rgba(13, 38, 69, .08), 0 12px 32px rgba(13, 38, 69, .07);
  --shadow-lg: 0 12px 24px rgba(13, 38, 69, .1), 0 32px 64px rgba(13, 38, 69, .12);

  --header-h: 76px;
  --utility-h: 38px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ============================ BASE ============================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Décalage des ancres pour ne pas passer sous l'en-tête fixe */
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--brand-900);
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--signal); }

img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

button { font: inherit; color: inherit; }

/* Accessibilité : focus toujours visible */
:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--brand-900);
  color: var(--white);
  padding: .75rem 1.25rem;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: .5rem; color: var(--white); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded', sans-serif;
  font-weight: normal;
  font-size: 1.25em;
  line-height: 1;
  vertical-align: middle;
  /* Évite un saut de mise en page pendant le chargement de la police d'icônes */
  min-width: 1em;
  display: inline-block;
}

/* ============================ BOUTONS ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  cursor: pointer;
  text-align: center;
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease),
              box-shadow .22s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--signal);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(203, 33, 48, .28);
}
.btn--primary:hover { background: var(--signal-600); color: var(--white); box-shadow: 0 10px 26px rgba(203, 33, 48, .34); }

.btn--ghost {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .5);
  color: var(--white);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .95); color: var(--brand-900); border-color: transparent; }

.btn--outline {
  background: transparent;
  border-color: var(--line);
  color: var(--brand);
}
.btn--outline:hover { background: var(--brand-100); color: var(--brand-700); border-color: var(--brand-300); }

.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn--sm { padding: .6rem 1.1rem; font-size: .875rem; }
.btn--block { width: 100%; }

/* ============================ BARRE UTILITAIRE ============================ */

.utility-bar {
  background: var(--brand-900);
  color: rgba(255, 255, 255, .82);
  font-size: .8125rem;
}
.utility-bar__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 38px;
  flex-wrap: wrap;
}
.utility-bar__item { display: inline-flex; align-items: center; gap: .4rem; }
.utility-bar__item .material-symbols-rounded { font-size: 1.05rem; opacity: .7; }
.utility-bar__link { color: rgba(255, 255, 255, .82); }
.utility-bar__link:hover { color: var(--white); }
.utility-bar__inner > .utility-bar__item:first-child { margin-right: auto; }

@media (max-width: 900px) {
  .utility-bar { display: none; }
  /* Masquée : elle ne prend plus de hauteur, le hero doit la récupérer */
  :root { --utility-h: 0px; }
}

/* ============================ EN-TÊTE ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* La poussée est portée par le logo, pas par .nav : en mobile .nav passe en
   display:none et sort du flux, ce qui laisserait les outils collés au logo. */
.brand { flex: 0 0 auto; display: block; margin-right: auto; }
.brand__logo {
  height: 44px;
  width: auto;
  /* Réserve la place du logo pour éviter tout décalage au chargement */
  aspect-ratio: 1200 / 344;
}

.nav { display: flex; align-items: center; gap: 1.75rem; }

.nav__list { display: flex; align-items: center; gap: .35rem; }

.nav__link {
  position: relative;
  display: block;
  padding: .5rem .7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .1rem;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav__link:hover { color: var(--brand-900); }
.nav__link:hover::after { transform: scaleX(1); }
/* État actif piloté par l'observateur de sections */
.nav__link.is-active { color: var(--brand-900); }
.nav__link.is-active::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: .5rem; }

/* Sélecteur de langue */
.lang-switch { position: relative; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .5rem .7rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.lang-current:hover { border-color: var(--brand-300); color: var(--brand); }
.lang-dropdown {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.lang-switch.is-open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: .55rem .7rem;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.lang-dropdown button:hover { background: var(--surface-alt); color: var(--brand-900); }
.lang-dropdown button.active { background: var(--brand-100); color: var(--brand-700); font-weight: 600; }

/* Menu hamburger */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 2px;
  background: var(--brand-900);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Progression de lecture */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--signal);
  transition: width .1s linear;
}

/* ============================ HERO ============================ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Occupe exactement la hauteur d'écran restante sous la barre utilitaire et le
     header. Pas de plafond en px : sur un grand écran il laisserait un vide sous
     le hero. `svh` = viewport stable, il ne saute pas quand la barre d'adresse
     mobile se replie. */
  min-height: calc(100svh - var(--header-h) - var(--utility-h));
  padding-top: clamp(3rem, 10vw, 7rem);
  isolation: isolate;
  overflow: hidden;
}
@supports not (height: 100svh) {
  .hero { min-height: calc(100vh - var(--header-h) - var(--utility-h)); }
}

.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  /* Léger zoom continu : donne de la vie sans distraire */
  animation: heroDrift 26s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.02); }
  to { transform: scale(1.1); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(9, 27, 49, .92) 0%, rgba(13, 38, 69, .78) 42%, rgba(13, 38, 69, .34) 72%, rgba(13, 38, 69, .18) 100%),
    linear-gradient(to top, rgba(9, 27, 49, .85) 0%, rgba(9, 27, 49, 0) 45%);
}

.hero__content {
  position: relative;
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  max-width: 900px;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.4rem;
  padding: .45rem .95rem .45rem .8rem;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 100px;
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .95);
}
.hero__kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(203, 33, 48, .7);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(203, 33, 48, .7); }
  70% { box-shadow: 0 0 0 10px rgba(203, 33, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(203, 33, 48, 0); }
}

.hero__title {
  font-size: clamp(2.4rem, 6.4vw, 4.75rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.035em;
  margin-bottom: 1.5rem;
}

/* ---- Entrée en cascade du hero -------------------------------------------
   Chaque bloc monte et apparaît, décalé de 90 ms. `backwards` maintient
   l'état initial pendant le délai, sinon un flash apparaît au chargement.
   L'ordre suit la lecture : accroche → titre → texte → boutons → chiffres. */
@keyframes heroRise {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero__kicker,
.hero__title-line,
.hero__lead,
.hero__actions > * {
  animation: heroRise .85s var(--ease) backwards;
}
.hero__kicker            { animation-delay: .10s; }
.hero__title-line:nth-child(1) { animation-delay: .22s; }
.hero__title-line:nth-child(2) { animation-delay: .34s; }
.hero__lead             { animation-delay: .50s; }
.hero__actions > *:nth-child(1) { animation-delay: .64s; }
.hero__actions > *:nth-child(2) { animation-delay: .74s; }

/* Le bandeau de chiffres se révèle en dernier, sans mouvement (il est ancré au bas) */
.hero__stats { animation: heroFade 1s var(--ease) .9s backwards; }

/* Le titre est masqué le temps de son propre délai : les lignes glissent
   depuis le dessous de leur ligne de base plutôt que sur toute la page. */
.hero__title { overflow: hidden; }
.hero__title-line { display: block; }
.hero__title-line--accent {
  /* Soulignement dégradé : accent de marque sans changer la couleur du texte */
  background-image: linear-gradient(transparent 62%, rgba(203, 33, 48, .85) 62%);
  background-repeat: no-repeat;
  background-size: 0 100%;
  animation: underlineIn 1s var(--ease) .35s forwards;
  padding-bottom: .1em;
}
@keyframes underlineIn { to { background-size: 100% 100%; } }

.hero__lead {
  max-width: 62ch;
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, .88);
  margin-bottom: 2.25rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Bandeau de chiffres */
.hero__stats {
  position: relative;
  background: rgba(9, 27, 49, .55);
  border-top: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
}
.hero__stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}
.stat {
  padding: 1.6rem .5rem;
  text-align: center;
  position: relative;
}
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(255, 255, 255, .16);
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--white);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  margin-top: .45rem;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .68);
}

/* ============================ SECTIONS ============================ */

.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-alt); }
.section--dark { background: var(--brand-900); color: rgba(255, 255, 255, .82); }
.section--contact { background: var(--surface-alt); }

.section__head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section__kicker {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 .9rem;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--signal);
}
.section__kicker::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--signal);
  flex: 0 0 auto;
}

.section__title {
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  margin-bottom: 1.1rem;
}
.section__intro {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 65ch;
}
.section__head--light .section__title { color: var(--white); }
.section__head--light .section__intro { color: rgba(255, 255, 255, .78); }
.section__head--light .section__kicker { color: var(--brand-300); }
.section__head--light .section__kicker::before { background: var(--brand-300); }

/* ============================ MÉTIER (alternance) ============================ */

.services { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.service--reverse .service__media { order: 2; }

.service__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.service__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.service:hover .service__media img { transform: scale(1.04); }

.service__body { position: relative; }
.service__index {
  display: block;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-100);
  letter-spacing: -.04em;
  margin-bottom: .35rem;
}
.service__title { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-bottom: .9rem; }
.service__body > p { color: var(--ink-soft); margin-bottom: 1.5rem; }

.service__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.service__specs li { display: flex; flex-direction: column; gap: .1rem; }
.service__specs strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -.02em;
}
.service__specs span {
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ============================ BANDEAU IMMERSIF ============================ */

.banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(260px, 34vw, 400px);
  isolation: isolate;
  overflow: hidden;
}
.banner__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(9, 27, 49, .9), rgba(13, 38, 69, .55));
}
.banner__content { padding-block: 3rem; }
.banner__quote {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
  color: var(--white);
  margin: 0;
}

/* ============================ FLOTTE ============================ */

.fleet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.vehicle {
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.vehicle:hover {
  transform: translateY(-4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

.vehicle__silhouette {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  margin-bottom: 1.1rem;
}
.vehicle__silhouette img { max-height: 96px; width: auto; object-fit: contain; }

.vehicle__name {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: 1.08rem;
  margin-bottom: .4rem;
}
.vehicle__spec { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* La carte ecocombi occupe deux colonnes : photo large + texte */
.vehicle--wide { grid-column: span 2; }
.vehicle--wide .vehicle__silhouette {
  min-height: 0;
  margin-bottom: 1.1rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.vehicle--wide .vehicle__silhouette img {
  max-height: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
/* Bloc texte de la carte large (ecocombi) */
.vehicle__wide-body { display: flex; flex-direction: column; gap: .4rem; }


.badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .5rem;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge--green { background: #e3f2e6; color: #1e6b32; }

/* ============================ ZONES ============================ */

.zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.zone {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.zone:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.zone__media { overflow: hidden; }
.zone__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.zone:hover .zone__media img { transform: scale(1.05); }

/* Une carte de zone doit rester lisible en entier : jamais recadrée */
.zone--map .zone__media { background: var(--brand-100); }
.zone--map .zone__media img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: .75rem;
}
.zone--map:hover .zone__media img { transform: none; }

.zone__body { padding: 1.6rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.zone__title { font-size: 1.25rem; }
.zone__body > p { color: var(--ink-soft); margin: 0; }
.zone__tag {
  align-self: flex-start;
  margin-top: auto;
  padding: .3rem .7rem;
  background: var(--brand-100);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-700);
}

/* Bloc groupage : carte + liste de départements */
.groupage {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.groupage__map img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}
.groupage__body > p { color: var(--ink-soft); margin-bottom: 1.25rem; }

.departments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .5rem .9rem;
}
.departments li {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.departments__code {
  flex: 0 0 auto;
  min-width: 46px;
  padding: .18rem .4rem;
  background: var(--brand-900);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  color: var(--white);
}

/* ============================ OUTILS INTERACTIFS ============================ */

/* Modules activables depuis FEATURES (script.js). Masqués par défaut : ils
   n'ont aucun sens sans JavaScript, et le script les révèle s'ils sont activés.
   Ce défaut évite aussi tout clignotement au chargement. */
[data-feature] { display: none; }
[data-feature].is-enabled { display: block; }

.tool {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tool__head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.tool__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--brand-100);
  border-radius: var(--radius);
  color: var(--brand);
  font-size: 1.5rem;
}
.tool__title { font-size: clamp(1.1rem, 2vw, 1.3rem); margin-bottom: .35rem; }
.tool__hint { font-size: .92rem; color: var(--ink-soft); margin: 0; }

.tool__form { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.tool__form--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}
.tool__field { display: grid; gap: .4rem; min-width: 0; flex: 1 1 200px; }
.tool__label {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
}
.tool__field input {
  width: 100%;
  padding: .8rem .9rem;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.tool__field input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(28, 72, 130, .14);
}
.tool__form .btn { flex: 0 0 auto; }

/* Réponse */
.tool__result { display: none; margin-top: 1.25rem; }
.tool__result.is-visible { display: block; animation: toolResult .3s var(--ease); }
@keyframes toolResult {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-300);
  background: var(--surface-alt);
  overflow: hidden;
}
/* Avec visuel : une colonne dédiée au véhicule ou à la carte concernée */
.result--media { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); }

.result--served { border-left-color: #1e6b32; background: #f1f8f2; }
.result--partial { border-left-color: var(--brand); background: var(--brand-100); }
.result--unknown { border-left-color: var(--ink-faint); background: var(--surface-alt); }

.result__media {
  display: grid;
  place-items: center;
  padding: .9rem;
  background: var(--white);
  border-right: 1px solid var(--line);
}
.result__media img { width: 100%; max-height: 130px; object-fit: contain; }

.result__body { display: flex; gap: .9rem; padding: 1.1rem 1.25rem; align-items: flex-start; }
.result__icon { flex: 0 0 auto; font-size: 1.5rem; color: var(--brand); }
.result--served .result__icon { color: #1e6b32; }
.result__text { min-width: 0; }
.result__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--brand-900);
  margin-bottom: .25rem;
}
.result__detail { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.result__detail strong { color: var(--brand-900); }

/* Zone reconnue à partir du code saisi */
.result__zone {
  display: block;
  margin-bottom: .5rem;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
}

/* Points clés, en pastilles : lisibles d'un coup d'œil */
.result__specs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.result__specs li {
  padding: .22rem .6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  color: var(--brand-700);
  white-space: nowrap;
}

/* Jauge d'occupation du véhicule */
.fill {
  margin-top: .95rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.fill__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .4rem;
}
.fill__label {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.fill__pct {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.fill__track {
  height: 8px;
  border-radius: 100px;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}
.fill__bar {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 100px;
  /* La barre se remplit à l'apparition de la réponse */
  animation: fillGrow .7s var(--ease) both;
}
@keyframes fillGrow { from { width: 0 !important; } }
.fill__text {
  margin: .6rem 0 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.fill__text strong { color: var(--brand-900); }

@media (prefers-reduced-motion: reduce) {
  .fill__bar { animation: none; }
}

.result__cta {
  display: inline-flex;
  align-items: center;   /* sans cela la flèche flotte au-dessus du texte */
  gap: .35rem;
  margin-top: .9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1;
}
.result__cta .material-symbols-rounded {
  font-size: 1.15em;
  line-height: 1;
  transition: transform .2s var(--ease);
}
.result__cta:hover .material-symbols-rounded { transform: translateX(3px); }

@media (max-width: 560px) {
  .result--media { grid-template-columns: 1fr; }
  .result__media { border-right: 0; border-bottom: 1px solid var(--line); }
  .result__media img { max-height: 100px; }
}

@media (max-width: 860px) {
  .tool__form--grid { grid-template-columns: 1fr 1fr; }
  .tool__submit { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .tool__form,
  .tool__form--grid { grid-template-columns: 1fr; }
  .tool__form .btn { width: 100%; }
}

/* ============================ ENTREPOSAGE ============================ */

.logistics {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.logistics__aerial { margin: 0; }
.logistics__aerial img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.logistics__aerial figcaption {
  margin-top: .8rem;
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
}

.logistics__facts { display: grid; gap: 1.5rem; }
.fact { border-left: 2px solid var(--brand-300); padding-left: 1.1rem; }
.fact__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--white);
}
.fact__label {
  display: block;
  margin-top: .25rem;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.logistics__note { color: rgba(255, 255, 255, .78); margin: 0; }

.sites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.site {
  padding: 1.5rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .24); }
.site__name { font-size: 1.05rem; color: var(--white); margin-bottom: .7rem; }
.site__address { font-size: .92rem; line-height: 1.6; color: rgba(255, 255, 255, .72); margin-bottom: 1rem; }
.site__map {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand-300);
}
.site__map:hover { color: var(--white); }

/* ============================ ENVIRONNEMENT ============================ */

.eco {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eco__text > p { color: var(--ink-soft); }

.eco__labels {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.eco__labels img {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: saturate(.9);
  transition: filter .3s var(--ease), transform .3s var(--ease);
}
.eco__labels li:hover img { filter: saturate(1.15); transform: translateY(-2px); }

.eco__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.eco__shot { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.eco__shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.eco__shot:hover img { transform: scale(1.05); }
.eco__shot--tall { grid-row: span 2; }

/* ============================ GALERIE ============================ */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: .85rem;
}
.gallery__item {
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--surface-alt);
  position: relative;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 27, 49, .45), transparent 55%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover::after { opacity: 1; }
.gallery__item--xl { grid-column: span 2; grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }

.credit { margin-top: 1.5rem; font-size: .82rem; color: var(--ink-faint); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(9, 27, 49, .95);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: 1.25rem; right: 1.25rem; }
.lightbox__nav--prev { left: 1.25rem; }
.lightbox__nav--next { right: 1.25rem; }
.lightbox__nav .material-symbols-rounded,
.lightbox__close .material-symbols-rounded { font-size: 1.6rem; }

/* ============================ CONTACT ============================ */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.contact__form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label,
.field__label {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .8rem .9rem;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(28, 72, 130, .14);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: var(--signal); }

/* ============================ LISTE DÉROULANTE SUR MESURE ============================ */

.select { position: relative; }

.select__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .8rem .9rem;
  font-family: var(--font-body);
  font-size: .95rem;
  text-align: left;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.select__button:hover { border-color: var(--brand-300); }
.select__button[aria-expanded="true"],
.select__button:focus-visible {
  background: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(28, 72, 130, .14);
}

.select__chevron {
  flex: 0 0 auto;
  color: var(--ink-faint);
  transition: transform .25s var(--ease), color .2s var(--ease);
}
.select__button[aria-expanded="true"] .select__chevron { transform: rotate(180deg); color: var(--brand); }

.select__list {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 17rem;
  overflow-y: auto;
  padding: .3rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: selectOpen .18s var(--ease);
}
.select__list[hidden] { display: none; }

@keyframes selectOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.select__option {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .7rem;
  border-radius: 3px;
  font-size: .95rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.select__option:hover,
.select__option.is-active {
  background: var(--brand-100);
  color: var(--brand-900);
}
.select__option.is-selected {
  color: var(--brand-900);
  font-weight: 600;
}
/* Coche de l'option retenue, sans décaler les autres libellés */
.select__option::before {
  content: '';
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0;
  transition: opacity .15s var(--ease);
}
.select__option.is-selected::before { opacity: 1; }

/* Consentement : la case doit rester atteignable au doigt et au clavier */
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: start;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input {
  width: 20px;
  height: 20px;
  margin: .15rem 0 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.consent input:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* Message d'état du formulaire */
.form-message {
  display: none;
  margin: 0;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .92rem;
  border-left: 3px solid transparent;
}
.form-message.is-visible { display: block; }
.form-message--success {
  background: #f1f8f2;
  border-left-color: #1e6b32;
  color: #1a5c2b;
}
.form-message--error {
  background: #fdf1f2;
  border-left-color: var(--signal);
  color: #96131f;
}
.form-message--info {
  background: var(--brand-100);
  border-left-color: var(--brand);
  color: var(--brand-700);
}

/* Bouton d'envoi pendant la requête */
#contact-submit[disabled] { opacity: .65; cursor: progress; transform: none; }

/* Champ leurre anti-spam : masqué sans sortir du cadre (pas de débordement) */
.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.contact__info { display: grid; gap: 1.25rem; }
.contact__card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--brand-900);
  border-radius: var(--radius-lg);
  color: rgba(255, 255, 255, .8);
}
.contact__company { font-size: 1.15rem; color: var(--white); margin-bottom: .8rem; }
.contact__address { font-size: .95rem; line-height: 1.65; margin-bottom: 1.4rem; }
.contact__list { display: grid; gap: .85rem; margin-bottom: 1.6rem; }
.contact__list li { display: flex; align-items: center; gap: .7rem; font-size: .98rem; }
.contact__list .material-symbols-rounded { color: var(--brand-300); }
.contact__list a { color: var(--white); }
.contact__list a:hover { color: var(--brand-300); }
.contact__list em { font-style: normal; font-size: .82rem; color: rgba(255, 255, 255, .5); }
.contact__card .btn--outline {
  border-color: rgba(255, 255, 255, .28);
  color: var(--white);
}
.contact__card .btn--outline:hover { background: rgba(255, 255, 255, .12); color: var(--white); border-color: rgba(255, 255, 255, .5); }

.contact__photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.contact__photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

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

.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .68); padding-top: clamp(3rem, 6vw, 4.5rem); }

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.site-footer__brand img { height: 42px; width: auto; margin-bottom: 1.1rem; }
.site-footer__brand p { font-size: .92rem; line-height: 1.7; max-width: 42ch; }

.site-footer h2 {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.1rem;
}
.site-footer__col ul { display: grid; gap: .55rem; }
.site-footer__col a { color: rgba(255, 255, 255, .68); font-size: .93rem; }
.site-footer__col a:hover { color: var(--white); }
.site-footer__col address,
.site-footer__col p { font-size: .93rem; line-height: 1.65; margin-bottom: .5rem; }
.site-footer__sites li { font-size: .9rem; line-height: 1.6; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .82rem;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom .credit { color: rgba(255, 255, 255, .45); margin-top: 0; }
.site-footer__bottom .dev-credit { margin-left: auto; opacity: .8; }
.site-footer__bottom .dev-credit a { color: var(--brand-300); }

/* ============================ BARRE MOBILE ============================ */

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  gap: .5rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  /* Escamotée par défaut : dans le hero elle répéterait ses deux boutons.
     Le script la fait monter dès que le hero est quitté. */
  transform: translateY(105%);
  transition: transform .32s var(--ease);
}
.mobile-bar.is-visible { transform: translateY(0); }
.mobile-bar__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .8rem .6rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand-900);
  background: var(--surface-alt);
}
.mobile-bar__btn--primary { background: var(--signal); color: var(--white); }

/* La règle générique `a:hover { color: var(--signal) }` est plus spécifique que
   les classes ci-dessus : sans ces états explicites, le libellé passait en rouge
   sur le fond rouge du bouton et devenait illisible au survol comme au tap. */
.mobile-bar__btn:hover,
.mobile-bar__btn:focus-visible,
.mobile-bar__btn:active { color: var(--brand-900); }

.mobile-bar__btn--primary:hover,
.mobile-bar__btn--primary:focus-visible,
.mobile-bar__btn--primary:active {
  color: var(--white);
  background: var(--signal-600);
}

/* ============================ VOILE MENU MOBILE ============================ */

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(9, 27, 49, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.nav-backdrop.is-visible { opacity: 1; visibility: visible; }

/* ============================ ANIMATIONS D'APPARITION ============================ */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Sans JavaScript, tout reste visible */
.no-js .reveal { opacity: 1; transform: none; }
/* Sans JavaScript, aucun observateur ne peut la révéler : on la laisse en place */
.no-js .mobile-bar { transform: none; }

/* ============================ RESPONSIVE ============================ */

@media (max-width: 1180px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
  .nav__list { gap: 0; }
  .nav__link { padding-inline: .5rem; font-size: .86rem; }
}

@media (max-width: 1024px) {
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; }
  .eco { grid-template-columns: 1fr; }
  .logistics { grid-template-columns: 1fr; }
  .groupage { grid-template-columns: 1fr; }
  .groupage__map img { max-height: 320px; }
}

/* Bascule vers le menu mobile */
@media (max-width: 980px) {
  .burger { display: block; }
  /* Le burger (qui referme le panneau) doit rester au-dessus de celui-ci */
  .header-tools { position: relative; z-index: 97; }

  /* Panneau latéral. Fermé, il est en `display: none` : un panneau simplement
     translaté hors écran élargit la page et crée un défilement horizontal
     parasite, et le confiner via `overflow` sur <html> rognerait les éléments
     fixes (dont ce panneau lui-même). */
  .nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 96;
    /* Hauteur explicite : dans un conteneur flex centré, `top/bottom: 0` ne
       suffit pas à étirer un élément positionné. `dvh` suit les barres mobiles. */
    height: 100vh;
    height: 100dvh;
    width: min(360px, 86vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
  }
  .nav.is-open {
    display: flex;
    animation: navSlideIn .32s var(--ease) both;
  }
  /* Le glissement n'a lieu qu'à l'ouverture, quand <body> est déjà verrouillé */
  @keyframes navSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
  }

  .nav__list { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav__link {
    padding: .95rem .25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }
  .nav__link.is-active { color: var(--signal); }
  .nav__cta { margin-top: 1.5rem; width: 100%; }

  body.nav-open { overflow: hidden; }
}

@media (max-width: 860px) {
  .service { grid-template-columns: 1fr; }
  .service--reverse .service__media { order: 0; }
  .service__index { font-size: 2.6rem; }
  .contact { grid-template-columns: 1fr; }
  .hero__stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat { padding-block: 1.25rem; }
  .vehicle--wide { grid-column: span 1; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .mobile-bar { display: flex; }
  /* Espace pour la barre d'action fixe */
  body { padding-bottom: 74px; }
}

@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .gallery__item--xl { grid-column: span 2; grid-row: span 2; }
  .gallery__item--wide { grid-column: span 2; }
  .eco__gallery { grid-template-columns: 1fr 1fr; }
  .eco__shot--tall { grid-row: span 1; }
  .field-row { grid-template-columns: 1fr; }
  .departments { grid-template-columns: 1fr 1fr; }
  .hero { min-height: calc(100svh - var(--header-h) - var(--utility-h)); }
  .hero__actions .btn { width: 100%; }
  .service__specs { gap: 1.25rem; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .site-footer__bottom .dev-credit { margin-left: 0; }
}

@media (max-width: 420px) {
  .departments { grid-template-columns: 1fr; }
  .brand__logo { height: 36px; }
}

/* Cibles tactiles : au moins 44px de haut sur écran tactile */
@media (hover: none) and (pointer: coarse) {
  .site__map,
  .site-footer__col a,
  .utility-bar__link,
  .contact__list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .site-footer__col ul { gap: .15rem; }
  .credit, .dev-credit { line-height: 2; }
}

/* ============================ PRÉFÉRENCES UTILISATEUR ============================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title-line--accent { background-size: 100% 100%; }
  .hero__media img { animation: none; }
}

@media print {
  .utility-bar, .site-header, .mobile-bar, .lightbox, .hero__media, .hero__veil { display: none !important; }
  body { color: #000; }
  .section { padding-block: 1rem; page-break-inside: avoid; }
}
