/* SOLR — feuille partagée par les 3 pages.
   ATTENTION : nginx la met en cache 30 jours en `immutable`. Après toute
   modification, incrémenter ?v=N dans le <link> de CHAQUE page, sinon les
   visiteurs gardent l'ancienne version pendant un mois. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #08090b;
  --bg-elevated: #0f1114;
  --bg-card: #141619;
  --gold: #b49554;        /* or relevé sur le logo */
  --gold-dim: #947941;
  --gold-glow: rgba(180, 149, 84, 0.10);
  --gold-glow2: rgba(180, 149, 84, 0.18);
  --text: #e2ded8;
  --text-muted: #6b7075;
  --text-dim: #3d4045;
  --border: #1e2024;
  /* Valeurs qui étaient codées en dur : elles doivent basculer avec le thème. */
  --nav-bg: rgba(8, 9, 11, 0.85);
  --hero-glow: rgba(180, 149, 84, 0.05);
  --num: #1e2024;          /* chiffre fantôme des étapes */
  --canvas-rgb: 180, 149, 84;
  --canvas-boost: 1;       /* multiplicateur d'opacité de la bannière animée */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  color-scheme: dark;      /* barres de défilement accordées au fond */
}

/* ── Variante claire (`?theme=light`) ────────────────────────────────────
   Seules les variables — et les trois règles qui ne pouvaient pas en être —
   sont redéfinies ici. Tout le reste de la feuille est commun aux deux. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf9f7;
  --bg-elevated: #ffffff;
  --bg-card: #f4f2ed;
  --gold: #886f3b;      /* or de marque assombri : 4,55:1 ; tel quel il n'atteint que 2,71:1 */
  --gold-dim: #b49554;  /* or de marque EXACT — décoratif : filets et bordures */
  --gold-glow: rgba(180, 149, 84, 0.16);
  --gold-glow2: rgba(180, 149, 84, 0.24);
  --text: #25282d;      /* charbon relevé sur le logo */
  --text-muted: #5b6167;
  --text-dim: #797f86;
  --border: #e6e3dc;
  --nav-bg: rgba(250, 249, 247, 0.85);
  --hero-glow: rgba(180, 149, 84, 0.15);
  --num: #eae7df;
  --canvas-rgb: 136, 111, 59;
  --canvas-boost: 2.2;  /* aux opacités du thème sombre, la bannière disparaît sur blanc */
}

/* `antialiased` est un réglage pour texte clair sur fond sombre : sur fond
   clair il amincit les glyphes. La graisse 300 souffre du même effet. */
:root[data-theme="light"] body {
  -webkit-font-smoothing: auto;
  font-weight: 400;
}

/* Ce libellé de 10px est le seul usage de --gold-dim comme texte : dans le
   thème clair, --gold-dim est trop pâle pour être lu. */
:root[data-theme="light"] .section-label { color: var(--gold); }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

nav.scrolled { border-bottom-color: var(--border); }

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* L'adresse complète est un mot insécable : sur petit écran elle ne peut pas
   se réduire et pousse la nav hors du viewport. On bascule sur un libellé court. */
.nav-contact-short { display: none; }

/* Le logo existe en deux versions : encre charbon pour le fond clair,
   inversée pour le fond sombre où le charbon serait illisible (1,4:1).
   L'or de marque est identique dans les deux — seul le gris est recoloré. */
.nav-logo { display: block; line-height: 0; }
.nav-logo img { height: 26px; width: auto; display: block; }
.nav-logo:hover { opacity: 1; }
.nav-logo .on-light { display: none; }
:root[data-theme="light"] .nav-logo .on-light { display: block; }
:root[data-theme="light"] .nav-logo .on-dark { display: none; }

.nav-contact {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s;
}

.nav-contact:hover {
  border-color: var(--gold);
  color: var(--gold);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  min-height: 100svh; /* évite le saut lié à la barre d'adresse mobile */
  display: flex;
  align-items: center;
  position: relative;
  padding: 90px 0 60px; /* dégage la nav fixe sur écrans courts */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100%); /* 600px fixes = débordement horizontal sous 600px d'écran */
  height: 600px;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

/* Bannière animée. Le masque éteint le canvas là où se trouve le texte :
   à gauche sur desktop, en bas sur mobile où le titre prend toute la largeur. */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 46%);
  mask-image: linear-gradient(to right, transparent 0%, #000 46%);
}

@media (max-width: 900px) {
  .hero-canvas {
    opacity: 0.6;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 46%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 46%);
  }
  /* Le repli à 0.6 suppose un fond sombre qui fait ressortir l'or. */
  :root[data-theme="light"] .hero-canvas { opacity: 0.85; }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 700px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.hero-line {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 24px;
}

.hero-scroll {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-scroll::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════ */
section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  /* Indispensable : les blocs révélés depuis la droite dépassent le viewport
     pendant leur trajet et recréeraient un défilement horizontal.
     `hidden` sert de repli aux navigateurs qui ignorent `clip`. */
  overflow-x: hidden;
  overflow-x: clip;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 40px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════
   WHAT WE DO — the transformation flow
   ═══════════════════════════════════════════════════════ */
.what-text {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 48px;
  line-height: 1.8;
}

/* 4 éléments : on passe 4 → 2 → 1 pour garder des rangées pleines
   (3 colonnes laisserait une carte orpheline) */
.capabilities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 48px;
}

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

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

.cap {
  background: var(--bg-card);
  padding: 28px 24px;
}

.cap-icon {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cap-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.cap-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   CLIENTS — proof cards
   ═══════════════════════════════════════════════════════ */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.client-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 28px;
  background: var(--bg-elevated);
  transition: border-color 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.client-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.client-card:hover {
  border-color: var(--gold-dim);
  background: var(--bg-card);
}

.client-card:hover::before { opacity: 1; }

/* Les deux logos fournis sont de l'encre sombre sur blanc OPAQUE (aucune
   transparence). Posés sur une plaque blanche, leur fond disparaît : pas de
   détourage, donc aucun artefact ni dérive de couleur sur la marque du client.
   La plaque reste blanche dans les deux thèmes — c'est la convention. */
.client-logo {
  display: flex;
  align-items: center;
  height: 68px;
  padding: 12px 18px;
  margin-bottom: 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.3s;
}

.client-logo img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  display: block;
}

.client-logo:hover {
  border-color: var(--gold-dim);
  opacity: 1; /* neutralise le fondu global des liens : un logo reste net */
}

.client-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 6px;
}

.client-type {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.client-problem {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.client-solution {
  font-size: 13px;
  color: var(--text);
  padding: 12px 16px;
  background: var(--gold-glow);
  border-left: 2px solid var(--gold-dim);
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   PROCESS
   ═══════════════════════════════════════════════════════ */
/* 3 étapes : 3 → 1 directement, une rangée de 2 + 1 casserait la séquence */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 48px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}

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

.step {
  background: var(--bg-card);
  padding: 36px 28px;
  position: relative;
}

.step-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--num);
  line-height: 1;
  margin-bottom: 16px;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   CTA / CONTACT
   ═══════════════════════════════════════════════════════ */
.cta-section {
  text-align: center;
  padding: 120px 0;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  margin-bottom: 16px;
}

.cta-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.cta-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--gold);
  padding: 16px 40px;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.cta-email:hover {
  background: var(--gold-glow2);
  border-color: var(--gold);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}


/* ═══════════════════════════════════════════════════════
   RÉVÉLATION AU DÉFILEMENT
   ═══════════════════════════════════════════════════════ */
:root { --reveal-dx: 44px; }

/* État masqué. Les enfants de grille sont ciblés via leur parent : pas besoin
   d'ajouter une classe sur chaque carte. */
.has-reveal .reveal,
.has-reveal .capabilities > *,
.has-reveal .clients-grid > *,
.has-reveal .process-steps > * {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.7s ease,
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Chaque carte entre par son propre côté : les colonnes impaires depuis la
   gauche, les paires depuis la droite. */
.has-reveal .reveal-l,
.has-reveal .capabilities > :nth-child(odd),
.has-reveal .clients-grid > :nth-child(odd),
.has-reveal .process-steps > :nth-child(odd) {
  transform: translate3d(calc(-1 * var(--reveal-dx)), 0, 0);
}

.has-reveal .reveal-r,
.has-reveal .capabilities > :nth-child(even),
.has-reveal .clients-grid > :nth-child(even),
.has-reveal .process-steps > :nth-child(even) {
  transform: translate3d(var(--reveal-dx), 0, 0);
}

/* Cascade dans les grilles */
.has-reveal .capabilities > :nth-child(2),
.has-reveal .clients-grid > :nth-child(2),
.has-reveal .process-steps > :nth-child(2) { transition-delay: 90ms; }
.has-reveal .capabilities > :nth-child(3),
.has-reveal .process-steps > :nth-child(3) { transition-delay: 180ms; }
.has-reveal .capabilities > :nth-child(4) { transition-delay: 270ms; }

/* État révélé — déclaré après les directions pour l'emporter à spécificité égale */
.has-reveal .reveal.in,
.has-reveal .capabilities > .in,
.has-reveal .clients-grid > .in,
.has-reveal .process-steps > .in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
/* Tablette */
@media (max-width: 768px) {
  section { padding: 80px 0; }
  .cta-section { padding: 90px 0; }
  .hero-sub { margin-bottom: 40px; }
}

/* Grand téléphone */
@media (max-width: 560px) {
  :root { --reveal-dx: 20px; } /* 44px sur un écran étroit, c'est trop brutal */
  .container { padding: 0 20px; }
  section { padding: 64px 0; }
  .cta-section { padding: 72px 0; }

  .section-label { margin-bottom: 28px; }
  .what-text { font-size: 16px; margin-bottom: 36px; }
  .hero-sub { font-size: 17px; }

  .cap { padding: 24px 20px; }
  .client-card { padding: 26px 22px; }
  .step { padding: 30px 24px; }

  .nav-logo img { height: 22px; }
  .nav-contact-long { display: none; }
  .nav-contact-short { display: inline; }
}

/* Petit téléphone (320–400px) */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .cta-email { font-size: 13px; padding: 15px 20px; letter-spacing: 0; }
  .hero-sub { font-size: 16px; }
  .step-num { font-size: 40px; }
  section { padding: 56px 0; }
}

/* Cibles tactiles d'au moins 44px (WCAG 2.5.8) */
@media (hover: none) and (pointer: coarse) {
  .nav-contact,
  .cta-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
}

/* Téléphone en paysage : le hero ne tient pas en 100svh */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 110px 0 64px;
  }
  .hero h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 20px; }
  .hero-sub { margin-bottom: 28px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0s !important; }
}

/* ═══════════════════════════════════════════════════════
   PAGES ÉTUDES DE CAS
   ═══════════════════════════════════════════════════════ */
.page-hero {
  padding: 150px 0 60px; /* dégage la nav fixe */
  position: relative;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 760px;
}

.page-hero h1 em { font-style: normal; color: var(--gold); }

.page-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.7;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.back-link::before { content: '←'; }
.back-link:hover { color: var(--gold); opacity: 1; }

/* Bandeau d'identité du client */
.case-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.case-logo {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.case-logo img { max-height: 100%; max-width: 100%; width: auto; display: block; }

.case-facts {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 2;
}

/* Phrase d'accroche isolée */
.pull {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 29px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  max-width: 720px;
  margin: 8px 0 40px;
  padding-left: 24px;
  border-left: 2px solid var(--gold-dim);
}

.prose {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 22px;
}

.prose strong { color: var(--text); font-weight: 500; }

/* ── Chaîne technique ────────────────────────────────────
   Grille plutôt que SVG : un schéma vectoriel large ne se reflow pas,
   ces blocs s'empilent tout seuls sur téléphone. */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: 44px 0 12px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.flow-step {
  background: var(--bg-card);
  padding: 26px 20px;
  position: relative;
}

.flow-icon { color: var(--gold); margin-bottom: 14px; display: block; }

.flow-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.flow-step h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.flow-step p { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

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

/* Étiquettes technologiques */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-elevated);
}

/* Emplacement photo — visiblement vide tant que l'image n'est pas fournie,
   plutôt qu'une image d'illustration qui ferait passer du décor pour du réel. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.photo-slot {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

.photo-slot span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  line-height: 1.6;
}

.photo-slot figure { margin: 0; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }

/* Renvoi vers l'autre étude de cas */
.next-case {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  margin-top: 12px;
  transition: border-color 0.3s;
}

.next-case:hover { border-color: var(--gold-dim); opacity: 1; }

.next-case-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.next-case-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}

.next-case-arrow { color: var(--gold); font-size: 22px; }

@media (max-width: 560px) {
  .page-hero { padding: 128px 0 44px; }
  .pull { padding-left: 18px; }
  .next-case { padding: 22px 20px; }
}
