/* ── Variables ── */
:root {
  --color-bg: #0c1222;
  --color-bg-alt: #111827;
  --color-surface: #1a2332;
  --color-surface-hover: #243044;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #e8edf5;
  --color-text-muted: #94a3b8;
  --color-accent: #3b9eff;
  --color-accent-dark: #1d7ed6;
  --color-accent-glow: rgba(59, 158, 255, 0.25);
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --transition: 0.25s ease;
}

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #6bb8ff;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ── Header ── */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(12, 18, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

/* Reprise du pictogramme du favicon, sans sa plaque de fond :
   l'en-tête est déjà du même bleu nuit */
.logo-icon {
  flex: none;
  height: 28px;
  width: auto;
  color: var(--color-accent);
}

.logo-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
  box-shadow: 0 0 24px var(--color-accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  /* Évite le saut de hauteur lié à la barre d'adresse mobile */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.58) 0%, rgba(12, 18, 34, 0.66) 60%, var(--color-bg-alt) 100%),
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(59, 158, 255, 0.14) 0%, transparent 60%),
    url("images/jgb-hero-bus-tram-768.jpg") center / cover no-repeat,
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
  pointer-events: none;
}

@media (min-width: 769px) {
  .hero-bg {
    background:
      /* Fondu vers la section suivante, sans assombrir le haut de l'image */
      linear-gradient(180deg, transparent 0%, transparent 60%, rgba(12, 18, 34, 0.5) 84%, var(--color-bg-alt) 100%),
      /* Voile localisé derrière le texte : la carrosserie claire du bus passe
         juste derrière le titre et ferait chuter le contraste sans lui */
      radial-gradient(ellipse 58% 72% at 20% 52%, rgba(12, 18, 34, 0.62) 0%, rgba(12, 18, 34, 0.38) 48%, transparent 80%),
      /* Voile latéral : dense côté texte, quasi nul côté image */
      linear-gradient(100deg, rgba(12, 18, 34, 0.55) 0%, rgba(12, 18, 34, 0.4) 38%, rgba(12, 18, 34, 0.2) 68%, rgba(12, 18, 34, 0.1) 100%),
      radial-gradient(ellipse 80% 60% at 70% 20%, rgba(59, 158, 255, 0.14) 0%, transparent 60%),
      image-set(url("images/jgb-hero-bus-tram-1536.webp") type("image/webp"),
                url("images/jgb-hero-bus-tram-1536.jpg") type("image/jpeg")) center / cover no-repeat,
      linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
  }
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(180deg, black 30%, transparent 90%);
}

.hero-content {
  position: relative;
  padding-block: 4rem 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  margin-bottom: 1.5rem;
  background: rgba(12, 18, 34, 0.55);
  border: 1px solid rgba(59, 158, 255, 0.45);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.hero-badge strong {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-accent);
}

.hero-badge span {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.hero-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 12px rgba(12, 18, 34, 0.8);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 24px rgba(12, 18, 34, 0.7);
}

.hero h1 span {
  color: var(--color-accent);
}

.hero-lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  /* Plus clair que le gris courant : le texte passe ici par-dessus la photo */
  color: rgba(232, 237, 245, 0.92);
  max-width: 540px;
  margin-bottom: 2rem;
  text-shadow: 0 1px 16px rgba(12, 18, 34, 0.75);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}

.stat {
  background: var(--color-surface);
  padding: 1.5rem 1.75rem;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ── Sections ── */
.section {
  padding-block: 5rem;
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

/* ── Services ── */
.services {
  background: var(--color-bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.service-card:hover {
  border-color: rgba(59, 158, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 158, 255, 0.1);
  border-radius: var(--radius);
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.service-icon svg {
  width: 32px;
  height: 32px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ── Équipements ── */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.25rem;
}

.equip-item {
  position: relative;
  padding: 1.5rem 1.25rem 1.5rem 1.5rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.equip-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 3px;
  background: var(--color-accent);
  border-radius: 0 3px 3px 0;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.equip-item:hover {
  border-color: rgba(59, 158, 255, 0.3);
  background: var(--color-surface);
}

.equip-item:hover::before {
  opacity: 1;
}

.equip-item h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.equip-item p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Marques ── */
.marques-liste {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.marques-liste li {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: all var(--transition);
}

.marques-liste li:hover {
  border-color: rgba(59, 158, 255, 0.4);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.marques-note {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── Références ── */
.confiance-groupe {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 1.25rem;
}

.confiance-mur {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}

.confiance-mur:last-child {
  margin-bottom: 0;
}

.confiance-mur li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 1.5rem;
  background: var(--color-surface);
  transition: background var(--transition);
}

.confiance-mur li:hover {
  background: var(--color-surface-hover);
}

/* Signature typographique, remplaçable par un logo sans toucher au reste */
.confiance-mur span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.confiance-mur li:hover span {
  color: var(--color-text);
}

.confiance-mur img {
  max-height: 44px;
  width: auto;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.confiance-mur li:hover img {
  opacity: 1;
}

/* ── FAQ ── */
.faq {
  background: var(--color-bg-alt);
}

.faq-liste {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.faq-item[open],
.faq-item:hover {
  border-color: rgba(59, 158, 255, 0.3);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.faq-item > p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ── Expertise ── */
.expertise-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.expertise-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.expertise-text > p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.expertise-chiffre {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  background: rgba(59, 158, 255, 0.08);
  border: 1px solid rgba(59, 158, 255, 0.25);
  border-radius: var(--radius);
}

.expertise-chiffre strong {
  flex: none;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}

.expertise-chiffre span {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.expertise-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.expertise-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
}

.expertise-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.expertise-visual img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* ── Bandeau illustré ── */
.visuel-bande {
  margin-top: 3rem;
}

.visuel-bande img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.visuel-bande figcaption {
  margin-top: 0.875rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ── CTA ── */
.cta {
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.12) 0%, rgba(59, 158, 255, 0.04) 100%);
  border-block: 1px solid var(--color-border);
}

.cta-inner {
  text-align: center;
}

.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-inner p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.35rem;
}

.contact-item p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-text-muted);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  width: 100%;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--color-border);
  padding-block: 2.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  max-width: 300px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-nav h2 {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-copy {
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Responsive ── */
/* .equip-grid et .confiance-mur s'adaptent seuls via auto-fit + min() */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .expertise-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Le menu se replie dès que les six entrées ne tiennent plus sur une ligne */
@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li a {
    display: block;
    padding: 0.875rem 1.5rem;
  }
}

@media (max-width: 640px) {
  .hero-content {
    padding-block: 3rem 2rem;
  }

  .section {
    padding-block: 3.5rem;
  }

  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .faq-item summary {
    padding: 1rem 1.125rem;
    font-size: 0.9375rem;
  }

  .faq-item > p {
    padding: 0 1.125rem 1rem;
  }
}
