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

:root {
  --page-container-max: 1100px;
  --nav-height: 56px;
  --mobile-vh: 100svh;
  --bg: #0a0a0a;
  --border: #1e1e1e;
  --red: #c92927;
  --text: #f0ede8;
  --muted: #6e6b66;
  --muted2: #9e9a94;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::after {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
  animation: grain 0.4s steps(1) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -3%); }
  20% { transform: translate(3%, 1%); }
  30% { transform: translate(-1%, 3%); }
  40% { transform: translate(2%, -2%); }
  50% { transform: translate(-3%, 1%); }
  60% { transform: translate(1%, 3%); }
  70% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 2%); }
  90% { transform: translate(-1%, -3%); }
}

.container {
  max-width: var(--page-container-max);
  margin: 0 auto;
  padding: 0 2.5rem;
}

nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--page-container-max);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  display: block;
  height: 34px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
}

.nav-back {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-back svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-hero {
  position: relative;
  height: clamp(340px, 52vh, 580px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-image: none;
  background-size: cover;
  background-position: center;
  transform: scale(1.09);
  transition: transform 5.5s ease;
  will-change: transform;
}

body.service-aerien .page-hero-bg {
  background-image: var(--service-hero-bg, url('../../image_card/transport_aerien.jpg'));
  background-position: center;
}

body.service-routier .page-hero-bg {
  background-image: var(--service-hero-bg, url('../../image_card/transport_routier.jpg'));
  background-position: center 35%;
}

body.service-maritime .page-hero-bg {
  background-image: var(--service-hero-bg, url('../../image_card/Transport_maritime.jpg'));
  background-position: center 80%;
}

body.service-logistique .page-hero-bg {
  background-image: var(--service-hero-bg, url('../../image_card/Logistique_national.jpg'));
  background-position: center;
}

body.service-decors .page-hero-bg {
  background-image: var(--service-hero-bg, url('../../image_card/decor_costumes.jpg'));
  background-position: center;
}

body.service-douanes .page-hero-bg {
  background-image: var(--service-hero-bg, url('../../image_card/douanes_et_conseil.jpg'));
  background-position: center;
}

.page-hero.is-inview .page-hero-bg {
  transform: scale(1);
}

.page-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.82) 80%,
    rgba(0, 0, 0, 0.96) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 2.5rem 3rem;
  width: 100%;
  max-width: var(--page-container-max);
  margin: 0 auto;
}

.page-hero-cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-hero-cat::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--red);
}

.page-hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: 0.01em;
}

main {
  flex: 1;
  padding: 4.5rem 0 5rem;
}

.content-lead {
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--text);
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  max-width: 780px;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.content-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.content-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(201, 41, 39, 0.4);
  padding: 1.8rem 2rem;
}

.content-block-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1.1rem;
  stroke: var(--red);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-block h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.content-block p {
  font-size: 0.92rem;
  color: var(--muted2);
  line-height: 1.82;
  text-align: left;
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.content-block strong,
.content-single strong,
.content-item strong {
  color: var(--text);
  font-weight: 600;
}

.content-single {
  max-width: 780px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(201, 41, 39, 0.4);
  padding: 1.8rem 2rem;
  margin-bottom: 1.5rem;
}

.content-single p {
  font-size: 0.92rem;
  color: var(--muted2);
  line-height: 1.82;
  text-align: left;
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.content-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.content-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(201, 41, 39, 0.4);
  padding: 1.8rem 2rem;
}

.content-item-num {
  display: none;
}

.content-item p {
  font-size: 0.92rem;
  color: var(--muted2);
  line-height: 1.82;
  text-align: left;
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .content-lead,
  .content-block p,
  .content-single p,
  .content-item p {
    -webkit-hyphens: none;
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
  }

  .content-blocks,
  .content-list {
    grid-template-columns: 1fr;
  }

  .page-hero-content {
    padding: 0 1.25rem 2.5rem;
  }

  .container,
  .nav-inner {
    padding: 0 1.25rem;
  }

  .nav-back span {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 700px) {
  html,
  body {
    background: #0a0a0a;
    overscroll-behavior-y: auto;
  }

  body {
    min-height: var(--mobile-vh);
    padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
  }

  body::after {
    z-index: 90;
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    align-items: center;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255,255,255,.07);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    isolation: isolate;
  }

  nav::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1 * (env(safe-area-inset-top, 0px) + 16px));
    height: calc(env(safe-area-inset-top, 0px) + 16px);
    background: #0a0a0a;
    pointer-events: none;
  }

  .page-hero {
    margin-top: 0;
  }
}

/* iPhone Safari paysage: largeur > 700px mais nav doit rester fixe/safe-area */
@supports (-webkit-touch-callout: none) {
  @media (hover: none) and (pointer: coarse) and (min-width: 701px) {
    html,
    body {
      background: #0a0a0a;
      overscroll-behavior-y: auto;
    }

    body {
      min-height: var(--mobile-vh);
      padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    }

    body::after {
      z-index: 90;
    }

    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
      padding-top: env(safe-area-inset-top, 0px);
      align-items: center;
      background: #0a0a0a;
      border-bottom: 1px solid rgba(255,255,255,.07);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      isolation: isolate;
    }

    nav::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: calc(-1 * (env(safe-area-inset-top, 0px) + 16px));
      height: calc(env(safe-area-inset-top, 0px) + 16px);
      background: #0a0a0a;
      pointer-events: none;
    }
  }
}
