/* ==========================================================================
   REXEA — rexeagroup.com
   Feuille de style de la page d'accueil.
   Source unique des valeurs : rexea-tokens.json / Charte graphique v1.0 (juillet 2026).
   Trois couleurs, une famille typographique (Inter), filets d'un pixel,
   photographies sous cache dégradé. Aucune ombre décorative.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — Charte graphique v1.0
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs de marque */
  --rexea-green: #37C4B1;        /* Accent. Texte autorisé sur ardoise uniquement. */
  --rexea-green-dark: #116156;   /* Vert de lecture : tout texte vert sur fond clair. */
  --rexea-slate: #1B2530;        /* Fond dominant sombre. Texte courant sur blanc. */
  --rexea-white: #FFFFFF;        /* Blanc franc, jamais teinté. */

  /* Neutres dérivés de l'ardoise (teinte 211°) */
  --slate-800: #2A3847;          /* Corps de texte sur blanc */
  --slate-600: #506073;          /* Texte secondaire, légendes */
  --slate-400: #7F8E9E;          /* Surtitres neutres, pagination */
  --slate-200: #C6D0DB;          /* Filets et bordures. Jamais de texte. */
  --slate-100: #E7EDF4;          /* Aplats légers. Jamais de texte. */

  /* Fond d'accent — token de la charte conservé en réserve (non utilisé sur cette page) */
  --accent-deep: #0D3B36;

  /* Typographie */
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --tracking-display: -0.015em;
  --tracking-caps: 0.26em;
  --tracking-caps-wide: 0.34em;
  --leading-display: 1.2;
  --leading-quote: 1.42;
  --leading-body: 1.72;
  --leading-tight: 1.55;

  /* Filets */
  --rule-light: 1px solid var(--slate-200);          /* sur fond blanc */
  --rule-dark: 1px solid rgba(198, 208, 219, 0.22);  /* slate-200 atténué sur ardoise */

  /* Mise en page */
  --content-width: 1140px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(72px, 11vw, 132px);
}

/* --------------------------------------------------------------------------
   2. Police — Inter variable (latin), auto-hébergée. Source : fontsource (OFL 1.1)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* L'attribut hidden doit toujours l'emporter sur les display posés par les
   composants (ex. .form-field en flex). */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* en-tête fixe de 82 px + respiration */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.0625rem; /* 17 px */
  line-height: var(--leading-body);
  color: var(--slate-800);
  background: var(--rexea-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* Lien d'évitement */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--rexea-white);
  color: var(--rexea-slate);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--rexea-green-dark);
  outline-offset: 3px;
}

.on-dark :focus-visible,
.photo-section :focus-visible,
.site-header :focus-visible {
  outline-color: var(--rexea-green);
}

/* --------------------------------------------------------------------------
   4. Utilitaires typographiques
   -------------------------------------------------------------------------- */

/* Surtitre en capitales — graisse 600, approche +0,26 em */
.kicker {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 0.8125rem; /* 13 px */
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.kicker .kicker-num {
  color: var(--rexea-green-dark);
  font-weight: 600;
}

.kicker .kicker-label {
  color: var(--slate-600); /* AA sur blanc ; slate-400 réservé aux fonds ardoise (voir .on-dark) */
}

.on-dark .kicker .kicker-num {
  color: var(--rexea-green);
}

.on-dark .kicker .kicker-label {
  color: var(--slate-400); /* AA sur ardoise (4,63:1) */
}

/* Surtitre simple (hero, mission, contact) : vert, seul accent de la composition */
.kicker--accent {
  color: var(--rexea-green);
  display: block;
}

/* Titres — graisse 300 quelle que soit la taille */
h1, h2, h3 {
  font-weight: 300;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.55rem);
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

h3 {
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: var(--leading-tight);
}

/* Chapeau — graisse 300, interligne 1,66 (échelle typographique de la charte, rôle « chapeau ») */
.lead {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  font-weight: 300;
  line-height: 1.66;
  color: var(--slate-800);
  max-width: 46em;
}

.on-dark .lead {
  color: var(--rexea-white);
}

/* Citation mise en avant */
.pullquote {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 300;
  line-height: var(--leading-quote);
  letter-spacing: var(--tracking-display);
  color: var(--rexea-slate);
  max-width: 30em;
}

/* --------------------------------------------------------------------------
   5. Structure de section
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--section-pad);
}

.section--dark {
  background: var(--rexea-slate);
  color: var(--rexea-white);
}

.section--dark .lead,
.section--dark p,
.photo-section .lead {
  color: var(--rexea-white);
}

.container {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-head {
  max-width: 46em;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head .kicker {
  margin-bottom: 26px;
}

.section-head h2 {
  margin-bottom: 22px;
}

/* --------------------------------------------------------------------------
   6. Boutons — un bouton plein vert se compose en ardoise, jamais en blanc
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 15px 30px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn--primary {
  background: var(--rexea-green);
  color: var(--rexea-slate);
}

.btn--primary:hover {
  background: var(--rexea-white);
  color: var(--rexea-slate);
}

.btn--ghost {
  background: transparent;
  color: var(--rexea-white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  border-color: var(--rexea-white);
  background: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   7. En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: var(--rexea-slate);
  border-bottom: var(--rule-dark);
}

.site-header .container {
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* Logotype horizontal — hauteur 26 px (minimum écran de la charte),
   zone de protection respectée : 28 px d'espace libre au-dessus et en dessous */
.brand img {
  height: 26px;
  width: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 38px);
}

.site-nav a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--rexea-white);
  padding-block: 8px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-current {
  border-bottom-color: var(--rexea-green);
}

/* Bouton menu mobile */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--rexea-white);
  margin-block: 5px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Bascule vers le menu mobile : 6 entrées + sélecteur de langue exigent
   plus de place qu'auparavant — le panneau prend le relais sous 1200 px
   (max-width: 1199px). */
@media (max-width: 1199px) {
  html.js .nav-toggle {
    display: block;
  }

  html.js .site-nav {
    position: fixed;
    inset: 0;
    top: 82px;
    background: var(--rexea-slate);
    display: none;
    padding: 40px var(--gutter);
    overflow-y: auto; /* panneau atteignable même sur viewport bas (paysage) */
    overscroll-behavior: contain;
  }

  html.js .site-nav.is-open {
    display: block;
  }

  .site-header.menu-open {
    background: var(--rexea-slate);
  }

  html.js .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  html.js .site-nav a {
    display: block;
    font-size: 0.875rem;
    padding-block: 16px;
  }

  /* Sans JavaScript : pas de panneau, les liens restent accessibles dans l'en-tête */
  html:not(.js) .site-header .container {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-block: 12px;
  }

  html:not(.js) .site-header {
    background: var(--rexea-slate);
    /* L'en-tête multi-lignes sans JavaScript entre dans le flux au lieu de
       recouvrir le début du contenu. */
    position: static;
  }

  html:not(.js) .site-nav ul {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px 22px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* --------------------------------------------------------------------------
   8. Sections photographiques — image en fond sous cache dégradé
   -------------------------------------------------------------------------- */
.photo-section {
  position: relative;
  overflow: hidden;
  background: var(--rexea-slate);
  color: var(--rexea-white);
}

.photo-section .photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.photo-section .photo-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.photo-section .container {
  position: relative;
  z-index: 2;
}

/* Hero — paysage : cache ouvert en haut et sur la droite pour révéler la falaise
   et le glacier, protection concentrée derrière la zone de texte (bas gauche).
   Luminance maintenue ≤ 55/255 sous le texte blanc. */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero .photo-veil {
  background:
    radial-gradient(95% 80% at 18% 82%, rgba(27, 37, 48, 0.66) 0%, rgba(27, 37, 48, 0.28) 52%, rgba(27, 37, 48, 0) 74%),
    linear-gradient(96deg,
      rgba(27, 37, 48, 0.56) 0%,
      rgba(27, 37, 48, 0.32) 34%,
      rgba(27, 37, 48, 0.06) 62%,
      rgba(27, 37, 48, 0) 82%),
    linear-gradient(180deg,
      rgba(27, 37, 48, 0.34) 0%,
      rgba(27, 37, 48, 0.05) 30%,
      rgba(27, 37, 48, 0.10) 52%,
      rgba(27, 37, 48, 0.58) 80%,
      rgba(27, 37, 48, 0.90) 100%);
}

@media (max-width: 820px) {
  /* Sur mobile, le texte occupe presque toute la largeur et démarre haut :
     cache vertical seul, ouvert sur le premier cinquième de l'image,
     progressivement refermé derrière le texte. */
  .hero .photo-veil {
    background:
      linear-gradient(180deg,
        rgba(27, 37, 48, 0.30) 0%,
        rgba(27, 37, 48, 0.16) 12%,
        rgba(27, 37, 48, 0.46) 30%,
        rgba(27, 37, 48, 0.62) 55%,
        rgba(27, 37, 48, 0.86) 80%,
        rgba(27, 37, 48, 0.96) 100%);
  }

  .kicker {
    font-size: 0.6875rem;
  }
}

.hero .container {
  padding-block: clamp(96px, 14vh, 160px) clamp(64px, 9vh, 110px);
}

.hero .kicker--accent {
  margin-bottom: 28px;
}

.hero h1 {
  color: var(--rexea-white);
  max-width: 15.5em;
  margin-bottom: 28px;
}

.hero .lead {
  max-width: 38em;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Mission et contact — sujet centré : cache refermé en haut et en bas + vignettage */
.photo-veil--closed {
  background:
    radial-gradient(120% 100% at 50% 50%, rgba(27, 37, 48, 0) 40%, rgba(27, 37, 48, 0.42) 100%),
    linear-gradient(180deg,
      rgba(27, 37, 48, 1) 0%,
      rgba(27, 37, 48, 0.55) 24%,
      rgba(27, 37, 48, 0.48) 50%,
      rgba(27, 37, 48, 0.55) 76%,
      rgba(27, 37, 48, 1) 100%);
}

/* --------------------------------------------------------------------------
   9. Mission
   -------------------------------------------------------------------------- */
.mission-band {
  /* Bande haute : la photographie de la forêt se déploie largement
     autour de la citation. */
  padding-block: clamp(160px, 24vw, 300px);
  text-align: center;
}

.mission-band .kicker--accent {
  margin-bottom: 30px;
}

.mission-quote {
  font-size: clamp(1.9rem, 4.4vw, 3.3rem);
  font-weight: 300;
  line-height: var(--leading-quote);
  letter-spacing: var(--tracking-display);
  color: var(--rexea-white);
  max-width: 17em;
  margin-inline: auto;
}

.mission-sub {
  font-weight: 300;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.66;
  max-width: 36em;
  margin: 26px auto 0;
  color: var(--rexea-white);
}

/* Les deux temps de la mission — sur blanc */
.mission-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
}

.mission-step {
  border-top: var(--rule-light);
  padding-top: 28px;
}

.mission-step .step-index {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--rexea-green-dark);
  display: block;
  margin-bottom: 18px;
}

.mission-step h3 {
  margin-bottom: 14px;
}

.mission-step p {
  color: var(--slate-600);
}

.mission-principle {
  margin-top: clamp(48px, 7vw, 80px);
  border-left: 2px solid var(--rexea-green-dark);
  padding-left: clamp(20px, 3vw, 34px);
}

@media (max-width: 700px) {
  .mission-steps {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   10. Constat — rangées à filets
   -------------------------------------------------------------------------- */
.fact-rows {
  border-top: var(--rule-light);
  /* Rythme vertical commun : chaque rangée reçoit exactement le même
     espacement, défini une seule fois ici. */
  --row-space: clamp(24px, 3vw, 30px);
}

.fact-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  align-items: start;
  gap: clamp(20px, 4vw, 64px);
  padding-block: var(--row-space);
  border-bottom: var(--rule-light);
}

.fact-row dt {
  font-weight: 500;
  color: var(--rexea-slate);
  line-height: var(--leading-tight);
}

.fact-row dd {
  color: var(--slate-600);
}

.constat-quote {
  margin-top: clamp(48px, 7vw, 80px);
}

@media (max-width: 640px) {
  .fact-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* --------------------------------------------------------------------------
   11. Plateforme — six briques sur ardoise, filets seulement
   -------------------------------------------------------------------------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: clamp(36px, 5vw, 60px);
}

.platform-item {
  border-top: var(--rule-dark);
  padding-top: 24px;
}

.platform-item h3 {
  color: var(--rexea-white);
  margin-bottom: 12px;
}

.platform-item p {
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--rexea-white);
}

.platform-note {
  margin-top: clamp(48px, 7vw, 76px);
  border-left: 2px solid var(--rexea-green);
  padding-left: clamp(20px, 3vw, 34px);
  max-width: 52em;
}

.platform-note p {
  font-weight: 300;
  font-size: 1.0625rem;
  color: var(--rexea-white);
}

@media (max-width: 900px) {
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .platform-grid {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }
}

/* --------------------------------------------------------------------------
   12. Fonctionnement — quatre étapes, chiffres en graisse 200
   -------------------------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(28px, 4vw, 48px);
}

.step {
  border-top: var(--rule-light);
  padding-top: 26px;
}

.step .step-num {
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 200;
  line-height: 1;
  color: var(--rexea-green-dark);
  display: block;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  margin-bottom: 12px;
}

.step p {
  font-size: 0.9375rem;
  color: var(--slate-600);
}

@media (max-width: 980px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   13. Applications — deux colonnes sur ardoise
   -------------------------------------------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(40px, 6vw, 88px);
}

.app-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: clamp(16px, 2.5vw, 36px);
  padding-block: 24px;
  border-bottom: var(--rule-dark);
}

.apps-grid > .app-row:nth-child(-n+2) {
  border-top: var(--rule-dark);
}

.app-row dt {
  font-weight: 500;
  color: var(--rexea-white);
  line-height: var(--leading-tight);
}

.app-row dd {
  font-size: 0.9375rem;
  color: var(--rexea-white);
}

@media (max-width: 860px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }

  .apps-grid > .app-row:nth-child(2) {
    border-top: 0;
  }
}

@media (max-width: 560px) {
  .app-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* --------------------------------------------------------------------------
   14. Infrastructure — rangées à filets + encadré à filet vert
   -------------------------------------------------------------------------- */
/* Encadré à filet vert — filet de 2 px à gauche, conformément au composant de la charte (section 08) */
.callout {
  margin-top: clamp(56px, 8vw, 88px);
  border-left: 2px solid var(--rexea-green-dark);
  padding-left: clamp(20px, 3vw, 34px);
  max-width: 56em;
}

.callout .callout-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--rexea-green-dark);
  display: block;
  margin-bottom: 14px;
}

.callout p {
  color: var(--slate-800);
}

/* --------------------------------------------------------------------------
   15. Contact
   -------------------------------------------------------------------------- */
.contact-band {
  padding-block: clamp(120px, 17vw, 210px);
  text-align: center;
}

.contact-band .kicker--accent {
  margin-bottom: 30px;
}

.contact-band h2 {
  color: var(--rexea-white);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  max-width: 21em;
  margin-inline: auto;
}

.contact-band .lead {
  max-width: 34em;
  margin: 24px auto 44px;
}

.contact-note {
  margin-top: 26px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rexea-white);
}

/* --------------------------------------------------------------------------
   16. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--rexea-slate);
  color: var(--rexea-white);
  padding-block: clamp(56px, 8vw, 88px) 40px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: var(--rule-dark);
}

.footer-brand img {
  height: 34px;
  width: auto;
}

.footer-baseline {
  margin-top: 22px;
  font-weight: 300;
  font-size: 1rem;
  color: var(--rexea-white);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--rexea-white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.footer-nav a:hover {
  border-bottom-color: var(--rexea-green);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 36px;
}

.footer-legal {
  font-size: 0.8125rem;
  color: var(--slate-400);
  /* L'espacement copyright / lien vit sur le parent : pas de décrochement
     quand le lien passe à la ligne sur mobile. */
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

/* Lockup partenaire — artwork officiel, jamais retypé.
   Hauteur contenue sous 70 % du lettrage REXEA de la composition :
   lockup 38 px pour un logotype REXEA à 34 px → wordmark ≈ 69 % (limite charte : 70 %). */
.footer-partner img {
  height: 38px;
  width: auto;
}

@media (max-width: 640px) {
  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   17. Apparitions au défilement — discrètes, désactivables
   -------------------------------------------------------------------------- */
/* Sans JavaScript, le contenu reste pleinement visible */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .site-nav a,
  .site-header,
  .nav-toggle-bar {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   19. Utilitaires
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   20. Outils d'en-tête — sélecteur de langue et lien Connexion
   -------------------------------------------------------------------------- */
.header-tools {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lang-btn {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em; /* approche minimale des capitales (charte) */
  color: rgba(255, 255, 255, 0.62);
  padding: 8px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.lang-btn:hover {
  color: var(--rexea-white);
}

.lang-btn[aria-pressed="true"] {
  color: var(--rexea-white);
  border-bottom-color: var(--rexea-green);
}

.lang-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
}

/* Sans JavaScript, le sélecteur est inopérant : il n'est pas affiché */
html:not(.js) .lang-switch {
  display: none;
}

/* Largeurs intermédiaires : navigation compacte pour tenir sur une ligne */
@media (min-width: 1200px) and (max-width: 1359px) {
  .site-header .container {
    gap: 16px;
  }

  .site-nav ul {
    gap: 14px;
  }

  .site-nav .nav-login {
    padding-left: 14px;
  }
}

/* Lien Connexion, séparé du reste de la navigation */
.site-nav .nav-login {
  border-left: 1px solid rgba(198, 208, 219, 0.35);
  padding-left: clamp(18px, 2.6vw, 38px);
}

@media (max-width: 1199px) {
  html.js .site-nav .nav-login {
    border-left: 0;
    padding-left: 0;
    margin-top: 10px;
    border-top: 1px solid rgba(198, 208, 219, 0.22);
    padding-top: 10px;
    width: 100%;
  }

  html:not(.js) .site-nav .nav-login {
    border-left: 0;
    padding-left: 0;
  }
}

/* --------------------------------------------------------------------------
   21. Section 06 — partenariat REXEA × Volvo Penta
   -------------------------------------------------------------------------- */
.partner-section {
  padding-bottom: 0; /* la bande de chiffres clôt la section */
}

.partner-section .section-head {
  max-width: 52em;
}

/* Artwork officiel « POWERED BY VOLVO PENTA » en ouverture de la section —
   jamais retypé, version blanche sur fond ardoise (charte co-branding). */
.partner-logo {
  margin: 6px 0 26px;
}

.partner-logo img {
  height: 44px;
  width: auto;
}

@media (max-width: 640px) {
  .partner-logo img {
    height: 36px;
  }
}

.partner-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(48px, 7vw, 84px);
}

/* Deux colonnes dès que le visuel BESS sera activé */
.partner-intro:has(.partner-figure) {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
}

.partner-intro-text h3,
.partner-tech-text h3 {
  color: var(--rexea-white);
  margin-bottom: 16px;
}

.partner-intro-text p,
.partner-tech-text p {
  color: var(--rexea-white);
  max-width: 46em;
}

.partner-tech-text p + p {
  margin-top: 14px;
}

/* Lien Volvo Penta : placé sous les deux blocs technologies (BESS et D8),
   rattaché visuellement à eux, avant « Préparer les énergies de demain ». */
.partner-link-row {
  margin: 0 0 clamp(56px, 8vw, 96px);
}

.btn--external .ext-mark {
  margin-left: 10px;
}

.partner-tech {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-bottom: clamp(28px, 4vw, 44px); /* le lien Volvo Penta suit de près */
}

.partner-figure {
  margin: 0;
}

.partner-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.partner-figure figcaption {
  margin-top: 14px;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--slate-400); /* AA sur ardoise (4,63:1) */
}

.partner-future {
  border-left: 2px solid var(--rexea-green);
  padding-left: clamp(20px, 3vw, 34px);
  max-width: 56em;
}

.partner-future h3 {
  color: var(--rexea-white);
  margin-bottom: 12px;
}

.partner-future p {
  color: var(--rexea-white);
  font-weight: 300;
  font-size: 1.0625rem;
}

@media (max-width: 900px) {
  .partner-intro:has(.partner-figure),
  .partner-tech {
    grid-template-columns: 1fr;
  }

  .partner-tech .partner-figure {
    order: 2;
  }
}

/* Bande de chiffres clés — fond d'accent profond, réservé aux chiffres (charte) */
.partner-network {
  background: var(--accent-deep);
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: clamp(56px, 8vw, 88px);
}

.partner-network-title {
  color: var(--rexea-white);
  margin-bottom: clamp(32px, 5vw, 48px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}

.stat {
  border-top: 1px solid rgba(55, 196, 177, 0.4);
  padding-top: 22px;
}

.stat-value {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 200;
  line-height: 1.1;
  color: var(--rexea-green); /* AAA sur fond d'accent profond */
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--rexea-white);
}

.partner-network-note {
  margin-top: clamp(28px, 4vw, 40px);
  color: var(--rexea-white);
  max-width: 52em;
}

.vas-row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid rgba(198, 208, 219, 0.22);
  padding-top: clamp(28px, 4vw, 40px);
}

.vas-logo {
  margin: 0;
}

.vas-logo img {
  width: 100%;
  height: auto;
}

.vas-text {
  color: var(--rexea-white);
  max-width: 46em;
}

@media (max-width: 700px) {
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 520px) {
  .vas-row {
    grid-template-columns: 1fr;
  }

  .vas-logo {
    max-width: 150px;
  }
}

/* --------------------------------------------------------------------------
   22. Bande livre blanc
   -------------------------------------------------------------------------- */
.whitepaper-inner {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.whitepaper-figure {
  margin: 0;
}

.whitepaper-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.whitepaper-text .kicker {
  margin-bottom: 22px;
}

.whitepaper-text .kicker-label {
  color: var(--rexea-green-dark);
}

.whitepaper-text h2 {
  margin-bottom: 18px;
}

.whitepaper-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 30px;
}

.whitepaper-note {
  font-size: 0.875rem;
  color: var(--slate-600);
}

@media (max-width: 820px) {
  .whitepaper-inner {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   23. Pages intérieures — bandeau photo et pages simples
   -------------------------------------------------------------------------- */
.page-hero {
  /* Bandeau ample, presque plein écran : la perspective aérienne de la
     photographie (falaise fuyante, navire au large) se lit entièrement. */
  min-height: clamp(560px, 82svh, 820px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: clamp(170px, 24vh, 260px) clamp(90px, 13vh, 150px);
}

/* Cadrage : la fenêtre couvre la falaise, la ligne de côte et le navire
   (au centre droit de la photographie). */
.page-hero .photo-bg {
  object-position: 50% 18%;
}

@media (max-width: 820px) {
  /* En portrait, le recadrage horizontal se centre sur le navire et la côte */
  .page-hero .photo-bg {
    object-position: 62% 30%;
  }
}

.page-hero .kicker--accent {
  margin-bottom: 24px;
}

.page-hero h1 {
  color: var(--rexea-white);
  max-width: 14em;
  margin-bottom: 20px;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.page-hero .lead {
  max-width: 38em;
}

/* Cache inversé et très ouvert : l'eau sombre porte naturellement le texte
   à gauche, un simple voile discret suffit — le bateau et la falaise
   restent pleinement visibles. */
.photo-veil--page {
  background:
    linear-gradient(90deg,
      rgba(27, 37, 48, 0.50) 0%,
      rgba(27, 37, 48, 0.26) 38%,
      rgba(27, 37, 48, 0.02) 68%,
      rgba(27, 37, 48, 0) 100%),
    linear-gradient(180deg,
      rgba(27, 37, 48, 0.20) 0%,
      rgba(27, 37, 48, 0.03) 24%,
      rgba(27, 37, 48, 0.03) 74%,
      rgba(27, 37, 48, 0.42) 100%);
}

@media (max-width: 820px) {
  /* Sur mobile le texte occupe toute la largeur : voile vertical léger,
     refermé derrière le texte seulement. */
  .photo-veil--page {
    background:
      linear-gradient(180deg,
        rgba(27, 37, 48, 0.46) 0%,
        rgba(27, 37, 48, 0.30) 40%,
        rgba(27, 37, 48, 0.44) 72%,
        rgba(27, 37, 48, 0.72) 100%);
  }
}

.page-plain {
  padding-top: clamp(150px, 18vh, 200px);
}

.page-head {
  margin-bottom: clamp(36px, 5vw, 56px);
}

.page-head .kicker {
  margin-bottom: 22px;
}

.page-head h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 18px;
}

.container--form {
  max-width: calc(880px + 2 * clamp(20px, 5vw, 48px));
}

.container--text {
  max-width: calc(800px + 2 * clamp(20px, 5vw, 48px));
}

/* Texte long (politique de confidentialité) */
.prose h2 {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0;
  margin: clamp(32px, 4vw, 44px) 0 12px;
}

.prose p,
.prose li {
  color: var(--slate-800);
}

.prose p + p {
  margin-top: 12px;
}

.prose ul {
  margin-block: 12px;
}

.prose li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
}

.prose li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rexea-green-dark);
}

.prose a {
  color: var(--rexea-green-dark);
}

.prose-updated {
  margin-top: 40px;
  font-size: 0.875rem;
  color: var(--slate-600);
}

/* --------------------------------------------------------------------------
   24. Formulaires
   -------------------------------------------------------------------------- */
:root {
  --error: #B3261E;        /* rouge fonctionnel, 6,4:1 sur blanc */
  --error-on-dark: #F2B8B5; /* rouge clair, lisible sur ardoise */
}

.form-section {
  padding-top: clamp(48px, 7vw, 88px);
}

.rx-form {
  max-width: 760px;
}

.form-block {
  border: 0;
  padding: 0;
  margin: 0 0 clamp(40px, 6vw, 56px);
  min-width: 0;
}

.form-block legend {
  display: block;
  width: 100%;
  padding-top: 26px;
  border-top: var(--rule-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--rexea-green-dark);
  margin-bottom: 24px;
}

.form-block--consent {
  border-top: var(--rule-light);
  padding-top: 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px clamp(24px, 3vw, 40px);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--rexea-slate);
  line-height: var(--leading-tight);
}

.req {
  color: var(--rexea-green-dark);
}

.optional {
  font-weight: 400;
  color: var(--slate-600);
  font-size: 0.875rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="password"],
.form-field textarea {
  font: inherit;
  line-height: 1.5;
  width: 100%;
  padding: 13px 14px;
  /* slate-400 : 3,35:1 sur blanc — minimum WCAG 1.4.11 pour un composant
     dont la bordure est le seul indicateur visuel. slate-200 reste réservé
     aux filets décoratifs. */
  border: 1px solid var(--slate-400);
  border-radius: 2px;
  background: var(--rexea-white);
  color: var(--slate-800);
  transition: border-color 0.2s ease;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: var(--slate-600);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--rexea-green-dark);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--error);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.field-help {
  font-size: 0.8125rem;
  color: var(--slate-600);
}

.field-error {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--error);
}

.group-label {
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--rexea-slate);
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-list--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2px 32px;
}

.radio-item,
.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  cursor: pointer;
  color: var(--slate-800);
}

.radio-item input,
.checkbox-item input {
  accent-color: var(--rexea-green-dark);
  width: 18px;
  height: 18px;
  margin-top: 4px;
  flex-shrink: 0;
}

.form-field--conditional {
  margin-top: 16px;
  max-width: 420px;
}

.checkbox-field {
  gap: 10px;
}

.checkbox-item a {
  color: var(--rexea-green-dark);
}

/* Champ anti-robots : hors écran, jamais présenté */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  padding: 16px 20px;
  border-left: 2px solid;
  margin-bottom: 32px;
  font-weight: 500;
}

.form-alert--error {
  border-color: var(--error);
  color: var(--error);
  background: var(--slate-100);
}

.form-alert:focus {
  outline: 2px solid var(--rexea-green-dark);
  outline-offset: 3px;
}

.form-required-note {
  font-size: 0.875rem;
  color: var(--slate-600);
  margin-bottom: 28px;
}

.form-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions--stack {
  flex-direction: column;
}

.btn--block {
  width: 100%;
  text-align: center;
}

/* État de chargement du bouton d'envoi */
.btn--submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn--submit[disabled] {
  cursor: default;
  opacity: 0.85;
}

.btn-loading {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(27, 37, 48, 0.35);
  border-top-color: var(--rexea-slate);
  border-radius: 50%;
}

.btn--submit.is-loading .btn-loading {
  display: inline-block;
  animation: rx-spin 0.8s linear infinite;
}

@keyframes rx-spin {
  to { transform: rotate(360deg); }
}

/* Bloc de succès (livre blanc) */
.form-success {
  border-left: 2px solid var(--rexea-green-dark);
  padding-left: clamp(20px, 3vw, 34px);
}

.form-success h2 {
  margin-bottom: 12px;
}

.form-success .form-actions {
  margin-top: 24px;
}

.wp-fallback-note {
  margin-top: 10px;
  color: var(--slate-600);
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   25. Page de connexion (fond ardoise)
   -------------------------------------------------------------------------- */
.page-dark {
  background: var(--rexea-slate);
}

.login-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(140px, 20vh, 200px) clamp(72px, 10vw, 120px);
}

.login-section .container {
  width: 100%;
}

.login-card {
  max-width: 440px;
  margin-inline: auto;
}

.login-card .kicker--accent {
  margin-bottom: 20px;
}

.login-card h1 {
  color: var(--rexea-white);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 12px;
}

.login-sub {
  color: var(--rexea-white);
  font-weight: 300;
  margin-bottom: 36px;
}

.rx-form--dark .form-field label {
  color: var(--rexea-white);
}

.rx-form--dark .form-field input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(198, 208, 219, 0.5); /* ≥ 3:1 sur ardoise (WCAG 1.4.11) */
  color: var(--rexea-white);
}

.rx-form--dark .form-field input:hover {
  border-color: rgba(198, 208, 219, 0.65);
}

.rx-form--dark .form-field input:focus {
  border-color: var(--rexea-green);
}

.rx-form--dark .form-field input.is-invalid {
  border-color: var(--error-on-dark);
}

.rx-form--dark .field-error {
  color: var(--error-on-dark);
}

.rx-form--dark .form-alert--error {
  border-color: var(--error-on-dark);
  color: var(--error-on-dark);
  background: rgba(255, 255, 255, 0.04);
}

.rx-form--dark .form-alert:focus {
  outline-color: var(--rexea-green);
}

.rx-form--dark .btn-loading {
  border-color: rgba(27, 37, 48, 0.35);
  border-top-color: var(--rexea-slate);
}

.login-note {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
}

.site-footer--rule {
  border-top: var(--rule-dark);
}

/* --------------------------------------------------------------------------
   26. Page de confirmation
   -------------------------------------------------------------------------- */
.confirm-card {
  border-left: 2px solid var(--rexea-green-dark);
  padding-left: clamp(20px, 3vw, 34px);
}

.confirm-card .kicker {
  margin-bottom: 18px;
}

.confirm-card h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 16px;
}

.confirm-card .lead {
  margin-bottom: 32px;
}

.btn--ghost-darktext {
  background: transparent;
  color: var(--rexea-slate);
  border-color: var(--slate-200);
}

.btn--ghost-darktext:hover {
  border-color: var(--slate-400);
  background: var(--slate-100);
}

/* Pied de page simplifié des pages intérieures */
.footer-bottom--single {
  padding-top: 0;
}

.footer-privacy {
  color: var(--slate-400);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-privacy:hover {
  color: var(--rexea-white);
}

@media (prefers-reduced-motion: reduce) {
  .btn--submit.is-loading .btn-loading {
    animation: none;
  }

  .lang-btn {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   18. Impression
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .nav-toggle,
  .hero-actions,
  .photo-bg,
  .photo-veil {
    display: none;
  }

  .photo-section,
  .section--dark,
  .site-footer,
  .hero {
    background: var(--rexea-white) !important;
    color: var(--rexea-slate) !important;
  }

  .hero h1,
  .mission-quote,
  .mission-sub,
  .contact-band h2,
  .section--dark .lead,
  .section--dark p,
  .photo-section .lead,
  .platform-item h3,
  .platform-item p,
  .app-row dt,
  .app-row dd,
  .footer-baseline,
  .footer-nav a,
  .contact-note {
    color: var(--rexea-slate) !important;
  }
}
