/* =========================================================
   WCBH — Design System Tokens
   ========================================================= */
:root {
  /* =========================================================
     Colors — palette complète (source : Figma « Styles / Colors »)
     Nomenclature : --color-{couleur}-{teinte}
     Teintes : extra-dark · dark · (base) · light · extra-light
     ========================================================= */

  /* Primary — brand / accent */
  --color-primary-extra-dark: #631803;
  --color-primary-dark: #C63006;
  --color-primary: #DB470C;
  --color-primary-light: #FCB19C;
  --color-primary-extra-light: #FEEBE6;

  /* Yellow — accent / highlight */
  --color-yellow-extra-dark: #936906;
  --color-yellow-dark: #F5AE0A;
  --color-yellow: #F7C244;
  --color-yellow-light: #FBDF9D;
  --color-yellow-extra-light: #FEF7E7;

  /* Linen — backgrounds */
  --color-linen-extra-dark: #675532;
  --color-linen-dark: #8A7142;
  --color-linen: #AC8D53;
  --color-linen-light: #CDBB98;
  --color-linen-extra-light: #F2EDE4;

  /* Green — success / backgrounds / shadow */
  --color-green-extra-dark: #2B3B2D;
  --color-green-dark: #405944;
  --color-green: #4E6B52;
  --color-green-light: #C4D4C6;
  --color-green-extra-light: #F0F4F1;

  /* Orange — danger (identique au primary dans le Figma actuel) */
  --color-orange-extra-dark: #631803;
  --color-orange-dark: #C63006;
  --color-orange: #DB470C;
  --color-orange-light: #FCB19C;
  --color-orange-extra-light: #FEEBE6;

  /* Pink — soutien / background */
  --color-pink-extra-dark: #86132C;
  --color-pink-dark: #B3193B;
  --color-pink: #E64C6E;
  --color-pink-light: #F2A6B6;
  --color-pink-extra-light: #FCE9ED;

  /* Blue — soutien / background */
  --color-blue-extra-dark: #1C2A4A;
  --color-blue-dark: #2A3F6F;
  --color-blue: #4669B9;
  --color-blue-light: #B5C3E3;
  --color-blue-extra-light: #EDF0F8;

  /* Grey — texts / backgrounds / borders */
  --color-black: #131311;
  --color-grey-dark: #2C2C27;
  --color-grey: #6C6C60;
  --color-grey-light: #B7B7AE;
  --color-grey-extra-light: #F3F3F1;
  --color-white: #FFFFFF;

  /* Divers (hors palette Figma) */
  --color-placeholder: #D9D9D9;    /* placeholder image */

  /* Fonts */
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Lexend", system-ui, -apple-system, sans-serif;

  /* Type scale (desktop) */
  --fs-display-1: 128px;   --lh-display-1: 96px;
  /* Titre de section : fluide sur desktop, rétrécit avec le viewport pour tenir
     sur une ligne (cf. white-space:nowrap sur .section__title). Plafond < 96px Figma
     pour garder une marge même si DM Serif rend plus large selon l'OS (Windows). */
  --fs-title-1: clamp(64px, calc(8vw - 10px), 88px);   --lh-title-1: 1.05;
  --fs-title-2: 42px;      --lh-title-2: 42px;
  --fs-title-3: 24px;      --lh-title-3: 36px;   /* Lexend Medium */
  --fs-display-2: 42px;    --lh-display-2: 51px;
  --fs-title-4: 18px;      --lh-title-4: 27px;   /* Lexend Medium */
  --fs-title-5: 14px;      --lh-title-5: 21px;   /* Lexend Medium */
  --fs-title-6: 12px;      --lh-title-6: 18px;   /* Lexend Medium */
  --fs-text-large: 21px;   --lh-text-large: 27px;
  --fs-text-medium: 16px;  --lh-text-medium: 21px;
  --fs-text-small: 13px;   --lh-text-small: 18px;
  --fs-text-extra-small: 11px; --lh-text-extra-small: 14px; /* Lexend Medium */

  /* Font weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* Layout */
  --content-width: 1142px;
  --header-width: 1440px;
  --section-pad: 128px;
  --gap-xl: 92px;
  --gap-lg: 64px;
  --gap-md: 32px;
  --gap-sm: 24px;
  --gap-xs: 16px;
  --radius-pill: 48px;
  --radius-image: 16px;   /* coins arrondis des photos (use cases) */

  /* Shadows (Figma « Styles / Shadows » — couleur = green) */
  --shadow-1: 0 2px 5px 1px color-mix(in srgb, var(--color-green) 20%, transparent);
  --shadow-2: 5px 5px 0 0 var(--color-green);
  --shadow-3: 8px 8px 0 0 var(--color-green);
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-text-medium);
  line-height: var(--lh-text-medium);
  color: var(--color-grey-dark);
  background: var(--color-linen-extra-light);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
/* height:auto → une image contrainte en largeur garde toujours ses proportions */
img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.inner {
  width: min(var(--content-width), calc(100% - 96px));
  margin-inline: auto;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(var(--header-width), 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  z-index: 10;
}
/* SVG logos use preserveAspectRatio="none" → set explicit dimensions to keep ratio */
.site-header__logo img { width: 56px; height: 32px; }
.site-nav {
  display: flex;
  gap: var(--gap-md);
  font-weight: 500;
  font-size: var(--fs-title-4);
  line-height: var(--lh-title-4);
  color: var(--color-grey-dark);
}
.site-nav a { transition: opacity .2s; }
.site-nav a:hover { opacity: .6; }
.nav-toggle { display: none; font-size: 22px; color: var(--color-grey-dark); padding: 4px 8px; }

/* Mobile menu — overlay plein écran */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-grey-dark);
  display: flex;
  flex-direction: column;
  color: var(--color-linen-extra-light);
  animation: menu-fade .25s ease;
}
.mobile-menu[hidden] { display: none; }
@keyframes menu-fade { from { opacity: 0; } to { opacity: 1; } }

.mobile-menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}
.mobile-menu__logo { width: 56px; height: 32px; }
.mobile-menu__close {
  font-size: 26px;
  color: var(--color-linen-extra-light);
  padding: 4px 8px;
  line-height: 1;
}
.mobile-menu__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-md);
  padding: 0 24px 15vh;
}
.mobile-menu__nav a {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.1;
  color: var(--color-linen-extra-light);
  transition: color .2s;
}
.mobile-menu__nav a:hover,
.mobile-menu__nav a:active { color: var(--color-yellow); }

/* Verrou de scroll quand le menu est ouvert */
body.menu-open { overflow: hidden; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: var(--color-linen-extra-light);
  overflow: hidden;
  padding-bottom: var(--section-pad);
}
.hero__inner {
  position: relative;
  padding-top: 256px;
}
/* Texte superposé en haut à gauche de l'illustration (cf. Figma). */
.hero__content {
  position: absolute;
  top: 256px;
  left: 0;
  z-index: 2;
  max-width: 620px;
}
.hero__title {
  font-family: var(--font-display);
  /* Fluide : ~128px Figma sur grand écran, rétrécit avant de wrapper sur 3 lignes.
     La colonne (620px) garde « We can be heroes » sur 2 lignes même si la police
     rend un peu plus large (différences de rendu Windows/macOS). */
  font-size: clamp(64px, calc(10.5vw - 6px), 128px);
  line-height: 0.82;  color: var(--color-grey-dark);
  margin-bottom: var(--gap-sm);
}
.hero__subtitle {
  font-family: var(--font-display);
  font-size: var(--fs-display-2);
  line-height: var(--lh-display-2);
  color: var(--color-grey-dark);
  max-width: 544px;
}
/* Illustration : taille native respectée sur desktop (1142×1482),
   largeur fluide plafonnée à --content-width, ratio préservé (height auto). */
.hero__illustration {
  display: block;
  width: 100%;
  max-width: var(--content-width);
  height: auto;
  pointer-events: none;
}

/* =========================================================
   Generic sections
   ========================================================= */
.section { padding: var(--section-pad) 0; }
.section--approche { background: var(--color-primary); }
.section--services { background: var(--color-grey-dark); }
.section--projets  { background: var(--color-linen-extra-light); }
.section--partners { background: var(--color-linen-extra-light); padding-top: var(--gap-lg); }
.section--contact  { background: var(--color-green); }

.section__label {
  font-weight: 500;
  font-size: var(--fs-title-4);
  line-height: var(--lh-title-4);
  margin-bottom: var(--gap-xl);
}
.section__label--light, .section--approche .section__label { color: var(--color-linen-extra-light); }
.section--projets .section__label, .section--projets .section__label { color: var(--color-grey-dark); }

.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-title-1);
  line-height: var(--lh-title-1);
  white-space: nowrap;   /* desktop : une seule ligne garantie (reset en ≤1024px) */
}
.section--approche .section__title { color: var(--color-linen-extra-light); margin-bottom: var(--gap-xl); }
.section--services .section__title { color: var(--color-linen-extra-light); margin-bottom: var(--gap-xl); }
.section--projets .section__title  { color: var(--color-grey-dark); margin-bottom: var(--gap-xl); }
.section--partners .section__title { color: var(--color-grey-dark); margin-bottom: var(--gap-xl); }
.section__title--light { color: var(--color-linen-extra-light); }

/* Image placeholders (intentionally grey in the Figma design) */
.media-placeholder {
  background: var(--color-placeholder);
  width: 100%;
  height: 255px;
}

/* =========================================================
   Approche columns
   ========================================================= */
.approche__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-lg);
  color: var(--color-linen-extra-light);
}
.approche__col-title {
  font-family: var(--font-display);
  font-size: var(--fs-title-2);
  line-height: var(--lh-title-2);  margin-bottom: var(--gap-xs);
}
.approche__col-text {
  font-size: var(--fs-text-large);
  line-height: var(--lh-text-large);
}

/* =========================================================
   Services grid + cards
   ========================================================= */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-lg);
}
.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  color: var(--color-linen-extra-light);
}
.service-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-title-2);
  line-height: var(--lh-title-2);}
/* Pictogramme de la carte : ratio Figma 676/556, coins arrondis, recadré */
.service-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 676 / 556;
  object-fit: cover;
  border-radius: var(--radius-image);
}
.service-card__sep {
  border: none;
  border-top: 1px solid var(--color-linen-dark);
  width: 100%;
  margin: 0;
}
.service-card__desc {
  font-size: var(--fs-text-small);
  line-height: var(--lh-text-small);
}
.service-card__list {
  font-size: var(--fs-text-medium);
  line-height: var(--lh-text-medium);
}
/* tighten internal gaps between title/sep/desc/list (gap-16 group) */
.service-card__title + .service-card__sep,
.service-card__sep + .service-card__desc,
.service-card__desc + .service-card__list { margin-top: -16px; }

/* link button (Cas d'usage) */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 12px;
  border-radius: var(--radius-pill);
  color: var(--color-yellow);
  font-weight: 600;
  font-size: var(--fs-text-medium);
  line-height: var(--lh-text-medium);
  transition: opacity .2s;
}
.btn-link:hover { opacity: .75; }

/* =========================================================
   Projets carousel
   ========================================================= */
.project-carousel {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  justify-content: center;
}
.carousel-arrow {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--color-grey-dark);
  transition: background .2s;
}
.carousel-arrow:hover { background: rgba(44,44,39,.08); }
/* Fenêtre du carrousel : un seul projet visible, le reste masqué (overflow). */
.carousel-viewport {
  flex: 0 1 848px;
  min-width: 0;
  overflow: hidden;
  /* Respiration verticale : laisse passer le soulèvement de la carte au survol
     (translateY -6px) sans rogner ses coins arrondis. Compensée par une marge
     négative pour ne pas modifier la hauteur de la section.
     Le masquage horizontal des slides voisins (overflow) reste intact. */
  padding-block: 12px;
  margin-block: -12px;
}
/* Piste : tous les slides côte à côte, déplacée par translateX en JS. */
.carousel-track {
  display: flex;
  transition: transform .5s ease;
  will-change: transform;
}
.project { flex: 0 0 100%; width: 100%; display: flex; flex-direction: column; gap: var(--gap-md); }
.project__media { position: relative; width: 100%; aspect-ratio: 1024 / 488; overflow: hidden; border-radius: var(--radius-image); }
.project__media > img { width: 100%; height: 100%; object-fit: cover; }
.project__badge {
  position: absolute;
  top: 50%;
  /* left:0/right:0 + margin auto : centré ET largeur dispo = toute la photo
     (pas seulement la moitié droite), pour ne pas écraser le logo sur mobile. */
  left: 0; right: 0;
  margin-inline: auto;
  width: fit-content;
  max-width: calc(100% - 48px);
  transform: translateY(-50%);
  background: var(--color-white);
  padding: 16px 20px;
  box-shadow: var(--shadow-1);
}
/* max-height + max-width (dimensions auto) → logo toujours à l'échelle, jamais déformé */
.project__badge img { max-height: 46px; max-width: 100%; }
.project__badge--adene img { max-height: 58px; }
.project__info { display: flex; flex-direction: column; gap: var(--gap-xs); }
.project__meta {
  font-size: var(--fs-text-small);
  line-height: var(--lh-text-small);
  color: var(--color-grey);
}
.project__title {
  font-family: var(--font-display);
  font-size: var(--fs-title-2);
  line-height: var(--lh-title-2);  color: var(--color-grey-dark);
}

/* Slide entièrement cliquable → cas d'usage.
   Hover « roll » léger : la carte se soulève, l'image zoome lentement
   (effet Ken Burns) et le titre prend l'accent de marque. */
.project--link { cursor: pointer; transition: transform .45s cubic-bezier(.22,.61,.36,1); }
.project--link .project__media > img { transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.project--link .project__title { transition: color .3s ease; }
.project--link:hover { transform: translateY(-6px); }
.project--link:hover .project__media > img { transform: scale(1.05); }
.project--link:hover .project__title { color: var(--color-primary); }
.project--link:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 6px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .project--link,
  .project--link .project__media > img { transition: none; transform: none; }
}

/* =========================================================
   Partners grid
   ========================================================= */
.partners__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--gap-md);
}
.partner {
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-bottom: 1px solid var(--color-white);
}
/* remove bottom border on last row */
.partner:nth-last-child(-n+4) { border-bottom: none; }
.partner img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }

/* =========================================================
   Contact
   ========================================================= */
/* Contenu centré : titre puis bouton, alignés au centre (cf. Figma).
   Scopé à .section--contact (home + usecase) — la page contact dédiée
   (.section.contact) garde ses propres styles alignés à gauche. */
.section--contact .contact__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
  text-align: center;
}
.section--contact .contact__title {
  font-family: var(--font-display);
  font-size: clamp(56px, calc(12vw - 60px), 88px);
  line-height: 0.95;
  color: var(--color-linen-extra-light);
}
/* Le bouton porte un align-self:flex-start global → recentré dans la section contact. */
.section--contact .btn-pill { align-self: center; }
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 20px;
  border-radius: var(--radius-pill);
  background: var(--color-yellow);
  color: var(--color-grey-dark);
  font-weight: 600;
  font-size: var(--fs-text-large);
  line-height: var(--lh-text-large);
  transition: filter .2s, transform .2s ease;
}
.btn-pill:hover { filter: brightness(.95); transform: scale(1.03); }
/* Variante primary : fond de marque, texte blanc (ex. CTA de confirmation) */
.btn-pill--primary { background: var(--color-primary); color: var(--color-white); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--color-grey-dark);
  padding: var(--section-pad) 0;
}
.site-footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
}
.site-footer__logo { height: 121px; width: auto; }
.site-footer__links {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  flex-wrap: wrap;
  justify-content: center;
  color: var(--color-linen-extra-light);
  font-size: var(--fs-text-small);
  line-height: var(--lh-text-small);
  font-weight: 600;
}
.footer-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px; transition: opacity .2s; }
.footer-link:hover { opacity: .7; }
.footer-copy { color: var(--color-linen-dark); font-weight: 400; }

/* =========================================================
   Form fields (design system) — TextInput · Textarea · Select
   Styles partagés par les 3 composants (label · control · helper · états · tailles).
   ========================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-body);
  max-width: 100%;
}
.field__label {
  font-size: var(--fs-text-small);
  line-height: var(--lh-text-small);
  font-weight: var(--fw-medium);
  color: var(--color-grey-dark);
}
.field__control {
  position: relative;
  display: flex;
  align-items: center;
}
.field__input {
  width: 100%;
  font-family: var(--font-body);
  color: var(--color-blue-extra-dark);
  background: var(--color-white);
  border: 1.5px solid var(--color-grey-light);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__input::placeholder { color: var(--color-grey); }

/* Textarea : même base + hauteur mini + redimensionnement vertical */
.field__textarea {
  display: block;
  min-height: 96px;
  resize: vertical;
}

/* Tailles */
.field--large .field__input  { padding: 14px 18px; font-size: var(--fs-text-large);  line-height: var(--lh-text-large); }
.field--medium .field__input { padding: 11px 16px; font-size: var(--fs-text-medium); line-height: var(--lh-text-medium); }
.field--small .field__input  { padding: 8px 12px;  font-size: var(--fs-text-small);  line-height: var(--lh-text-small); }

/* Icônes */
.field__icon { position: absolute; color: var(--color-grey-dark); font-size: 16px; pointer-events: none; }
.field__icon--left  { left: 16px; }
.field__icon--right { right: 16px; }
.field__control--icon-left .field__input  { padding-left: 44px; }
.field__control--icon-right .field__input { padding-right: 44px; }

/* Hover */
.field__input:hover:not(:disabled),
.field.is-hover .field__input { border-color: var(--color-grey); }

/* Focus */
.field__input:focus,
.field.is-focus .field__input {
  border-color: var(--color-linen);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-linen) 18%, transparent);
}

/* Error */
.field.is-error .field__input { border-color: var(--color-primary); }
.field.is-error .field__input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent); }
.field.is-error .field__helper { color: var(--color-primary); }

/* Helper text */
.field__helper { font-size: var(--fs-text-small); line-height: var(--lh-text-small); color: var(--color-grey); }

/* Disabled */
.field.is-disabled .field__label,
.field.is-disabled .field__helper { color: var(--color-grey-light); }
.field__input:disabled,
.field.is-disabled .field__input {
  background: var(--color-white);
  border-color: var(--color-grey-extra-light);
  color: var(--color-grey-light);
  cursor: not-allowed;
}
.field__input:disabled::placeholder { color: var(--color-grey-light); }
.field.is-disabled .field__icon { color: var(--color-grey-light); }

/* =========================================================
   Responsive — Tablet
   ========================================================= */
@media (max-width: 1024px) {
  :root {
    --fs-display-1: 80px;  --lh-display-1: 78px;
    --fs-title-1: 64px;    --lh-title-1: 64px;
    --section-pad: 96px;
    --gap-xl: 56px;
  }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .section--contact .contact__title { line-height: 1.05; }
  .section__title { white-space: normal; }   /* tablette/mobile : wrap autorisé */
}

/* =========================================================
   Responsive — Mobile (Ecrans Mobile)
   ========================================================= */
@media (max-width: 720px) {
  :root {
    --fs-display-1: 64px;  --lh-display-1: 64px;
    --fs-title-1: 56px;    --lh-title-1: 58px;
    --fs-title-2: 32px;    --lh-title-2: 36px;
    --fs-display-2: 26px;  --lh-display-2: 32px;
    --fs-text-large: 18px; --lh-text-large: 25px;
    --section-pad: 64px;
    --gap-xl: 40px;
    --gap-lg: 40px;
  }

  .inner { width: calc(100% - 48px); }

  /* Header → burger */
  .site-header { padding: 20px 24px; }
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }

  /* Hero → empilé : texte puis illustration (pas de superposition sur petit écran) */
  .hero__inner { padding-top: 120px; }
  .hero__content {
    position: static;
    max-width: 100%;
    margin-bottom: var(--gap-lg);
  }
  .hero__illustration { max-width: 100%; }

  /* Approche / Services → 1 column */
  .approche__cols { grid-template-columns: 1fr; gap: var(--gap-lg); }
  .services__grid { grid-template-columns: 1fr; gap: var(--gap-lg); }

  /* Projets → même carrousel JS, flèches plus compactes (swipe tactile aussi). */
  .project-carousel { gap: var(--gap-sm); }
  .carousel-arrow { width: 44px; height: 44px; font-size: 18px; }
  .project__badge { padding: 12px 14px; }
  .project__badge img { max-height: 32px; }
  .project__badge--adene img { max-height: 40px; }

  /* Partners → 2 columns */
  .partners__grid { grid-template-columns: repeat(2, 1fr); column-gap: var(--gap-xs); }
  .partner { height: 120px; }
  .partner:nth-last-child(-n+4) { border-bottom: 1px solid var(--color-white); }
  .partner:nth-last-child(-n+2) { border-bottom: none; }

  /* Contact → titre un peu plus aéré */
  .section--contact .contact__title { line-height: 1.05; }

  /* Footer */
  .site-footer__logo { height: 84px; width: auto; }
  .site-footer__links { gap: var(--gap-xs); }
}
