/* ---------------------------------------------------------------------
   Loco Transports — site public, mobile-first.
------------------------------------------------------------------------ */

:root {
  --loco-blue: #0088c4;
  --loco-blue-dark: #036493;
  --loco-orange: #e2861e;
  --loco-orange-dark: #c06e0f;
  --ink: #1d2530;
  --ink-soft: #57626f;
  --line: #e2e6ea;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,30,40,.06), 0 8px 24px rgba(20,30,40,.08);
  --navy-from: #0d1b2e;
  --navy-via: #123a5e;
  --navy-to: #0a1830;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--surface);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--loco-blue-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* --- En-tête --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand img { height: 48px; width: auto; }
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px;
  background: none; cursor: pointer; flex-shrink: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; height: 2px; width: 20px; background: var(--ink); margin: 0 auto; position: relative;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.main-nav {
  position: fixed; inset: 62px 0 0 0; background: var(--surface);
  display: flex; flex-direction: column; gap: 2px; padding: 16px 20px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  overflow-y: auto; z-index: 40;
}
.main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.main-nav a {
  padding: 12px 6px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem;
}
.main-nav a.active { color: var(--loco-blue-dark); }
.main-nav a.btn-devis {
  margin-top: 10px; border: none; border-radius: 999px; text-align: center;
  background: var(--loco-orange); color: #fff; padding: 12px;
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .main-nav {
    position: static; inset: auto; transform: none; opacity: 1; pointer-events: auto;
    flex-direction: row; align-items: center; gap: 28px; padding: 0; overflow: visible;
  }
  .main-nav a { padding: 6px 0; border-bottom: 2px solid transparent; font-size: .95rem; }
  .main-nav a.active { border-bottom-color: var(--loco-orange); }
  .main-nav a.btn-devis {
    margin-top: 0; padding: 10px 20px; font-size: .9rem; font-weight: 700;
  }
  .main-nav a.btn-devis:hover { background: var(--loco-orange-dark); }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(165deg, var(--navy-from) 0%, var(--navy-via) 55%, var(--navy-to) 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  display: grid; gap: 32px; align-items: center;
}
.hero h1 { color: #fff; }
.hero p.lead { color: #cfd8e2; font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-image { border-radius: var(--radius); overflow: hidden; }
.hero-image img { width: 100%; }

@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; }
}

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  text-decoration: none; border: none; cursor: pointer;
}
.btn-primary { background: var(--loco-orange); color: #fff; }
.btn-primary:hover { background: var(--loco-orange-dark); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; }

/* --- Sections --- */
section.block { padding: 56px 0; }
section.block.alt { background: var(--bg); }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-head p { font-size: 1.05rem; }

.cards-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 22px;
}
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(0,136,196,.1); color: var(--loco-blue);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.card .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { margin: 0; font-size: .95rem; }

.coverage-figure { margin: 40px 0 0; text-align: center; }
.coverage-figure img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto; max-width: min(560px, 100%); }
.coverage-figure figcaption { margin-top: 12px; color: var(--ink-soft); font-size: .9rem; }

/* --- Véhicules --- */
.vehicule-card {
  display: flex; flex-direction: column; gap: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px;
}
.vehicule-image {
  display: flex; align-items: center; justify-content: center;
  min-height: 160px;
}
.vehicule-card img { max-height: 190px; width: auto; max-width: 100%; object-fit: contain; }
.vehicule-card h3 { color: var(--loco-blue-dark); }

.vehicule-specs { list-style: none; margin: 0; padding: 0; font-size: .92rem; columns: 1; }
.spec-group {
  break-inside: avoid; -webkit-column-break-inside: avoid;
  display: table; /* évite un bug Chrome où break-inside:avoid est ignoré sur un simple bloc en colonnes */
  width: 100%;
}
.vehicule-specs dt {
  font-weight: 700; color: var(--ink-soft); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .03em; margin: 14px 0 2px;
}
.spec-group:first-child dt { margin-top: 0; }
.vehicule-specs dd {
  margin: 0; padding: 3px 0; color: var(--ink);
  border-bottom: 1px dashed var(--line);
}
.spec-group:last-child dd:last-of-type { border-bottom: none; }

@media (min-width: 560px) {
  .vehicule-specs { columns: 2; column-gap: 28px; }
}

@media (min-width: 760px) {
  .vehicule-card { flex-direction: row; align-items: stretch; }
  .vehicule-image { flex: 0 0 240px; }
  .vehicule-card > div:last-child { flex: 1; min-width: 0; }
}

/* --- Formulaires --- */
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; max-width: 640px; margin: 0 auto;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; font-family: inherit; color: var(--ink);
}
input:focus, textarea:focus { outline: none; border-color: var(--loco-blue); box-shadow: 0 0 0 3px rgba(0,136,196,.15); }
.required-note { font-size: .82rem; color: var(--ink-soft); margin-top: 4px; }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: #c0392b; font-size: .82rem; }

.messages { list-style: none; margin: 0; padding: 20px 20px 0; max-width: 1120px; margin: 0 auto; }
.messages li { padding: 12px 16px; border-radius: 10px; background: #e9f7ee; color: #1e7e42; font-size: .92rem; }
.messages li.error { background: #fdecea; color: #c0392b; }

/* --- Contact --- */
.contact-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: .8fr 1.2fr; } }
.contact-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.contact-info h3 { color: var(--loco-blue-dark); }
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-frame iframe { width: 100%; height: 360px; border: 0; display: block; }

/* --- Pages légales --- */
.legal-content { max-width: 760px; }
.legal-content h2 { margin-bottom: 24px; }
.legal-content h3 { color: var(--loco-blue-dark); font-size: 1.05rem; margin-top: 28px; }
.legal-content p { font-size: .95rem; }
.legal-content a { color: var(--loco-blue-dark); }

/* --- Bandeau cookies --- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 640px; margin: 0 auto;
  background: var(--ink); color: #e6ebf0;
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-banner:not([hidden]) { display: flex; }
.cookie-banner p { margin: 0; color: #cfd8e2; font-size: .85rem; flex: 1 1 260px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner .btn { padding: 9px 16px; font-size: .85rem; flex-shrink: 0; }

/* --- Pied de page --- */
.site-footer { background: linear-gradient(165deg, var(--navy-from) 0%, var(--navy-via) 55%, var(--navy-to) 100%); color: #cfd8e2; padding: 48px 0 20px; }
.site-footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 28px;
}
@media (min-width: 760px) { .site-footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand img { height: 40px; margin-bottom: 12px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-brand p { color: #93a1b0; font-size: .9rem; }
.footer-col h3 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-col a { display: block; color: #b7c2cf; text-decoration: none; padding: 4px 0; font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { color: #b7c2cf; font-size: .92rem; margin: 0 0 8px; }
.footer-legal { text-align: center; font-size: .8rem; color: #7c8a99; border-top: 1px solid rgba(255,255,255,.08); margin: 0 20px; padding-top: 18px; }
