/* CABS — en-tête et hero éditorial inspirés de la maquette de référence.
   Fichier isolé pour permettre un retour arrière immédiat. */

html,
body {
  min-width: 0;
}

.site-header {
  position: relative;
  z-index: 20;
  background:
    radial-gradient(circle at 86% -40%, rgba(67, 159, 181, .16), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
  box-shadow: 0 1px 0 rgba(27, 72, 91, .08);
}

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(19rem, 1.15fr) minmax(34rem, 2fr) auto;
  gap: clamp(1.2rem, 2.7vw, 2.6rem);
  align-items: center;
  min-height: 7.4rem;
  padding-block: .9rem;
  border-bottom: 0;
}

.cabs-brand {
  display: grid;
  grid-template-columns: 5.3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-width: 0;
  color: #153d63;
  text-decoration: none;
}

.cabs-brand__mark {
  display: block;
  width: 5.3rem;
  height: 5.3rem;
  filter: drop-shadow(0 .25rem .55rem rgba(20, 62, 82, .08));
}

.cabs-brand__copy {
  min-width: 0;
}

.site-brand {
  display: block;
  max-width: none;
  color: #173d67;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2vw, 2.05rem);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.035em;
  text-decoration: none;
}

.cabs-brand__tagline {
  display: block;
  margin-top: .45rem;
  color: #6c8792;
  font-family: var(--font-serif);
  font-size: .9rem;
  letter-spacing: .035em;
}

.site-header__inner .site-nav {
  width: 100%;
  max-width: none;
  margin-left: 0;
  gap: 0;
}

.site-nav__row {
  justify-content: center;
  gap: clamp(1.25rem, 2.3vw, 2.65rem) !important;
}

.site-nav__row:nth-child(2) {
  display: none;
}

.site-nav__item {
  position: relative;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: .25rem 0 .42rem;
  color: #173f67;
  font-size: .96rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .1rem;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 170ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: none;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-tone--home,
.nav-tone--glances,
.nav-tone--between,
.nav-tone--urchin,
.nav-tone--sidestep {
  --nav-color: #173f67;
}

.nav-preview {
  top: calc(100% + .55rem);
  left: 50%;
  right: auto;
  width: min(23rem, 72vw);
  min-height: 0;
  padding: .78rem .9rem;
  border: 1px solid #d6e4e8;
  border-radius: .85rem;
  background: rgba(255, 255, 255, .97);
  color: #355b6a;
  box-shadow: 0 .8rem 2rem rgba(26, 67, 84, .13);
  transform: translate(-50%, -.3rem);
  backdrop-filter: blur(10px);
}

.site-nav__item:hover .nav-preview,
.site-nav__item:focus-within .nav-preview {
  transform: translate(-50%, 0);
}

.nav-preview__text {
  max-width: none;
}

.cabs-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}

.cabs-header-search {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  color: #143d67;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.cabs-header-search:hover {
  background: #eaf4f6;
  transform: translateY(-1px);
}

.cabs-header-search svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.cabs-header-cta {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 3.05rem;
  padding: .55rem 1.05rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2f8ba1, #337f95);
  color: #fff;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.05;
  text-decoration: none;
  box-shadow: 0 .45rem 1.2rem rgba(35, 103, 124, .18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cabs-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 .65rem 1.45rem rgba(35, 103, 124, .24);
}

.cabs-header-cta svg {
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero accueil */
.cabs-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  border-bottom: 1px solid #d8e7ea;
  background: #eaf5f7;
  isolation: isolate;
}

.cabs-hero__scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 80% 12%, rgba(255,255,255,.85) 0 9%, transparent 32%),
    linear-gradient(180deg, #dceff8 0%, #eff8fb 42%, #dcebee 43%, #bed6d5 63%, #8daea0 64%, #567d68 100%);
}

.cabs-hero__scene::before {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 13%;
  height: 36%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(205,227,226,.7) 38%, rgba(110,154,146,.58) 39%, rgba(232,240,230,.55) 44%, rgba(77,119,95,.75) 82%),
    repeating-linear-gradient(175deg, transparent 0 19px, rgba(255,255,255,.45) 20px 22px, transparent 23px 36px);
  clip-path: polygon(0 28%, 15% 18%, 27% 30%, 39% 21%, 55% 34%, 68% 20%, 82% 29%, 100% 17%, 100% 100%, 0 100%);
  filter: saturate(.88);
}

.cabs-hero__scene::after {
  content: "";
  position: absolute;
  left: -3%;
  right: -3%;
  bottom: -9%;
  height: 35%;
  background:
    linear-gradient(176deg, rgba(89,122,81,.88), rgba(52,91,64,.92)),
    repeating-linear-gradient(88deg, transparent 0 12px, rgba(232,238,210,.35) 13px 15px, transparent 16px 24px);
  clip-path: polygon(0 48%, 9% 36%, 18% 45%, 28% 31%, 40% 43%, 51% 28%, 63% 42%, 75% 29%, 87% 39%, 100% 25%, 100% 100%, 0 100%);
}

.cabs-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(248,252,253,.98) 0%, rgba(248,252,253,.9) 34%, rgba(248,252,253,.38) 58%, rgba(248,252,253,.08) 100%);
}

.cabs-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(22rem, 1.05fr);
  gap: 2rem;
  align-items: center;
  min-height: 23.5rem;
  padding-block: clamp(2.35rem, 5vw, 4.6rem) clamp(2.6rem, 5vw, 4.9rem);
}

.cabs-hero__copy {
  max-width: 43rem;
}

.cabs-hero__eyebrow {
  margin: 0 0 .9rem;
  color: #658498;
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.cabs-hero__title {
  max-width: 13ch;
  margin: 0;
  color: #0f3761;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 5.2vw, 5rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.045em;
}

.cabs-hero__lead {
  max-width: 47rem;
  margin: 1rem 0 0;
  color: #526d7f;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.62rem);
  line-height: 1.16;
}

.cabs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  margin-top: 1.45rem;
}

.cabs-hero__primary,
.cabs-hero__secondary {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: 3rem;
  text-decoration: none;
}

.cabs-hero__primary {
  padding: .72rem 1.35rem;
  border-radius: 999px;
  background: #2d8ca5;
  color: #fff;
  font-weight: 650;
  box-shadow: 0 .5rem 1.3rem rgba(36, 113, 137, .18);
}

.cabs-hero__secondary {
  position: relative;
  color: #2c6d87;
  font-weight: 600;
}

.cabs-hero__secondary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .15rem;
  height: 2px;
  background: #3a95af;
}

.cabs-hero__motto {
  align-self: start;
  justify-self: end;
  max-width: 27rem;
  margin-top: 1rem;
  color: rgba(21, 61, 99, .88);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
  font-style: italic;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-5deg);
}

.cabs-hero__motto::after {
  content: "";
  display: block;
  width: 4.7rem;
  height: 2px;
  margin: .65rem auto 0;
  background: #1f5378;
  transform: rotate(-4deg);
}

.cabs-hero__location {
  position: absolute;
  right: clamp(1.5rem, 5vw, 5rem);
  bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255,255,255,.96);
  font-size: .82rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(30,56,49,.5);
}

.cabs-hero__location svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.cabs-values {
  position: relative;
  z-index: 3;
  width: min(calc(100% - 2rem), var(--page));
  margin: -1.25rem auto 0;
  padding: 1rem 1.35rem;
  border: 1px solid rgba(209, 228, 231, .88);
  border-radius: 1rem;
  background: rgba(255,255,255,.94);
  box-shadow: 0 .8rem 2.2rem rgba(35, 79, 96, .08);
  backdrop-filter: blur(12px);
}

.cabs-values__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cabs-value {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: .9rem;
  align-items: center;
  min-height: 4.6rem;
  padding: .35rem 1.3rem;
  border-right: 1px solid #d9e5e7;
}

.cabs-value:last-child {
  border-right: 0;
}

.cabs-value__icon {
  display: grid;
  place-items: center;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 50%;
  background: #e8f5f8;
  color: #2c88a1;
}

.cabs-value:nth-child(2) .cabs-value__icon {
  background: #edf6df;
  color: #6d9c31;
}

.cabs-value:nth-child(3) .cabs-value__icon {
  background: #fff3d6;
  color: #c58c2c;
}

.cabs-value:nth-child(4) .cabs-value__icon {
  background: #fff0ec;
  color: #cc7767;
}

.cabs-value__icon svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cabs-value strong {
  display: block;
  color: #153f68;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.08;
}

.cabs-value span {
  display: block;
  margin-top: .2rem;
  color: #68808c;
  font-size: .84rem;
  line-height: 1.15;
}

.home-latest {
  padding-top: 2rem;
}

@media (max-width: 1050px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-nav__row {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .cabs-header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .cabs-hero__inner {
    grid-template-columns: 1fr;
  }

  .cabs-hero__motto {
    justify-self: start;
    margin: 0 0 0 auto;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 1.25rem), var(--page));
  }

  .site-header__inner {
    display: block;
    min-height: 0;
    padding-block: .7rem .8rem;
  }

  .cabs-brand {
    grid-template-columns: 3.9rem minmax(0, 1fr);
    gap: .75rem;
  }

  .cabs-brand__mark {
    width: 3.9rem;
    height: 3.9rem;
  }

  .site-brand {
    font-size: 1.38rem;
  }

  .cabs-brand__tagline {
    font-size: .76rem;
  }

  .site-nav {
    margin-top: .65rem;
  }

  .site-nav__row {
    justify-content: flex-start;
    gap: 1.1rem !important;
    padding-bottom: .2rem;
  }

  .site-nav a {
    font-size: .84rem;
  }

  .cabs-header-actions {
    display: none;
  }

  .nav-preview {
    display: none;
  }

  .cabs-hero__inner {
    min-height: 25rem;
    padding-block: 2.5rem 6rem;
  }

  .cabs-hero__veil {
    background: linear-gradient(180deg, rgba(248,252,253,.97), rgba(248,252,253,.74) 62%, rgba(248,252,253,.16));
  }

  .cabs-hero__title {
    font-size: clamp(2.7rem, 13vw, 4.1rem);
  }

  .cabs-hero__lead {
    font-size: 1.15rem;
  }

  .cabs-hero__motto {
    display: none;
  }

  .cabs-hero__location {
    right: 1rem;
    bottom: 2rem;
  }

  .cabs-values {
    margin-top: -1.6rem;
    padding: .4rem .8rem;
  }

  .cabs-values__grid {
    grid-template-columns: 1fr 1fr;
  }

  .cabs-value {
    grid-template-columns: 2.8rem 1fr;
    padding: .7rem;
    border-right: 0;
    border-bottom: 1px solid #d9e5e7;
  }

  .cabs-value:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .cabs-value__icon {
    width: 2.7rem;
    height: 2.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a::after,
  .cabs-header-search,
  .cabs-header-cta {
    transition: none;
  }
}
