/* ─────────────────────────────────────────────────────────
   Azimut Nord
   Shared styles + design tokens
   ───────────────────────────────────────────────────────── */

:root {
  /* Palette — sobre & corporate */
  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --ink: #0f1b2d;        /* bleu nuit / ardoise */
  --ink-2: #2a3647;
  --ink-3: #5a6577;
  --ink-4: #8a93a3;
  --rule: #e5e8ee;
  --rule-2: #eef0f4;

  --accent: #1d4ed8;     /* bleu profond — overridable via Tweaks */
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in oklab, var(--accent) 8%, var(--bg));

  /* Typo */
  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Densité */
  --space-1: 6px;
  --space-2: 12px;
  --space-3: 20px;
  --space-4: 32px;
  --space-5: 56px;
  --space-6: 88px;
  --space-7: 128px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 48px);

  --section-y: clamp(72px, 10vw, 128px);

  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .04), 0 1px 3px rgba(15, 27, 45, .06);
  --shadow: 0 4px 16px rgba(15, 27, 45, .06), 0 2px 6px rgba(15, 27, 45, .04);
}

[data-theme="dark"] {
  --bg: #0a121e;
  --bg-elev: #0f1b2d;
  --ink: #f1f4f9;
  --ink-2: #d8dee8;
  --ink-3: #9aa4b6;
  --ink-4: #6b7587;
  --rule: #1c2738;
  --rule-2: #15202f;
  --accent-soft: color-mix(in oklab, var(--accent) 14%, var(--bg));
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

[data-density="compact"] {
  --space-3: 14px;
  --space-4: 22px;
  --space-5: 40px;
  --space-6: 64px;
  --space-7: 96px;
  --section-y: clamp(56px, 8vw, 96px);
}

[data-density="comfy"] {
  --space-4: 40px;
  --space-5: 72px;
  --space-6: 112px;
  --space-7: 160px;
  --section-y: clamp(96px, 12vw, 160px);
}

/* ─── Reset + base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; }
h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.1; }
h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; }
h4 { font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px; background: currentColor;
  display: inline-block;
}

/* ─── Layout ─── */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: var(--section-y) 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.section-head .lead { margin-top: 12px; }
.section-head > div:first-child { max-width: 720px; }

/* ─── Header / nav ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg-header, var(--bg)) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule-2);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-size: 16px;
}
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
[data-theme="dark"] .brand-mark { background: var(--accent); color: var(--accent-ink); }
/* Variante avec image (logo paramétré dans l'admin) : pas de fond,
   l'image porte sa propre identité visuelle. */
.brand-mark.brand-mark-img {
  background: transparent;
  border-radius: 0;
  width: auto;
  height: auto;
  overflow: visible;
}
.brand-mark.brand-mark-img img {
  display: block;
  width: auto;
  height: auto; /* piloté par l'attribut style inline */
  object-fit: contain;
}
[data-theme="dark"] .brand-mark.brand-mark-img { background: transparent; }
.brand small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--rule-2); color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; display: block; height: 1px; background: var(--accent);
  margin-top: 4px; margin-left: 12px; margin-right: 12px;
}

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  border: 0;
  transition: transform .15s, background .15s;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }
[data-theme="dark"] .nav-cta { background: var(--accent); }
[data-theme="dark"] .nav-cta:hover { background: color-mix(in oklab, var(--accent) 80%, white); }

.nav-mobile { display: none; }

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile { display: inline-flex; padding: 8px; border-radius: 8px;
    border: 1px solid var(--rule); background: var(--bg-elev); }
  .nav { position: relative; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
    margin-top: 6px; padding: 10px;
    background: var(--bg-elev, var(--bg));
    border: 1px solid var(--rule-2);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
  }
  .nav-links.open a { padding: 12px; border-radius: 8px; text-align: center; }
  .nav-links.open a.active::after { display: none; }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--bg);
  transition: transform .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translate(2px, -2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--ink-3); transform: translateY(-1px); }

/* ─── Cards ─── */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--ink) 18%, var(--rule));
  box-shadow: var(--shadow);
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-elev);
  padding: var(--space-6) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.footer-grid h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 600;
}
.footer-grid h2::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  margin: 8px auto 0;
  background: var(--accent);
  border-radius: 2px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.footer-grid a { color: var(--ink-2); font-size: 14px; }
.footer-contact ul { align-items: stretch; }
.footer-contact li, .footer-contact a { text-align: left; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Placeholder media ─── */
.media {
  position: relative;
  background: var(--rule-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid var(--rule);
}
.media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ─── À propos : médias de la rubrique « Matériel » ───
   Réserve la place de l'image (proportion fixe) pour éviter
   le saut de page au chargement et un affichage trop grand. */
.equip-media {
  position: relative;
  background: var(--rule-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid var(--rule);
}
.equip-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ─── Reveal animation ─── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }

/* ─── Hero ─── */
.hero {
  padding: clamp(64px, 9vw, 128px) 0 clamp(56px, 8vw, 112px);
  position: relative;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { max-width: 14ch; }
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}
.hero-sub {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-5);
  align-items: end;
  margin-top: var(--space-4);
}
.hero-sub .lead { max-width: 52ch; }
.hero-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .hero-sub { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
}

.hero-reel {
  margin-top: var(--space-5);
  aspect-ratio: 21/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--ink);
  border: 1px solid var(--rule);
}
.hero-reel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) brightness(0.85);
}
.hero-reel-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: end; justify-content: space-between;
  padding: var(--space-4);
  color: white;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5));
}
.hero-reel-overlay .play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .25s;
}
.hero-reel-overlay .play:hover { transform: translate(-50%, -50%) scale(1.05); }

/* ─── Hero : mode vidéo ─── */
.hero-reel.hero-video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

/* ─── Hero : mode carrousel ─── */
.hero-reel.hero-carousel { padding: 0; }
.hero-carousel-track { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .6s ease-in-out;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) brightness(0.9);
}
.hero-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--space-4);
  color: white;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.65) 100%);
}
.hero-carousel-dots {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 2;
}
.hero-carousel-dot {
  width: 24px; height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-carousel-dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: background .2s, transform .2s;
}
.hero-carousel-dot:hover::before { background: rgba(255,255,255,.75); }
.hero-carousel-dot.is-active::before { background: #fff; transform: scale(1.25); }

/* ─── Stats strip ─── */
.stats {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--space-4) 0;
}
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  gap: 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% / var(--stat-count, 4));
  padding: var(--space-2) var(--space-3);
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat .lbl {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  margin-top: 6px;
}
@media (max-width: 720px) { .stat { width: calc(100% / 2); } }
/* Mobile portrait : toutes les stats sur une seule ligne, police réduite
   automatiquement (vw) pour qu'elles tiennent côte à côte. */
@media (max-width: 720px) and (orientation: portrait) {
  .stats-grid { flex-wrap: nowrap; }
  .stat {
    width: calc(100% / var(--stat-count, 4));
    padding: var(--space-2) 4px;
  }
  .stat .num,
  .stat .lbl { font-size: clamp(11px, 3.4vw, 28px); }
}

/* ─── Service cards ─── */
.service {
  padding: var(--space-4);
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  min-height: 280px;
}
.service .num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.service h3 { margin-bottom: 4px; }
.service p { color: var(--ink-3); font-size: 14.5px; flex: 1; }
.service .more {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
  margin-top: auto;
}
.service .more .arrow { transition: transform .2s; }
.service:hover .more .arrow { transform: translateX(3px); }
.service .icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
}

/* Style variants for service cards */
[data-cards="bordered"] .service { background: var(--bg-elev); }
[data-cards="filled"] .service {
  background: color-mix(in oklab, var(--ink) 4%, var(--bg));
  border-color: transparent;
}
[data-cards="filled"] .service:hover { background: var(--bg-elev); }
[data-cards="minimal"] .service {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  padding: var(--space-4) 8px;
}
[data-cards="minimal"] .service:hover { transform: none; box-shadow: none; }

/* ─── Process / Approach ─── */
.process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.process > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto auto;
  column-gap: 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.process > div:last-child { border-bottom: 0; }
.process .num {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 0;
}
.process h3 { grid-column: 2; grid-row: 1; margin-bottom: 2px; font-size: 15px; }
.process p  { grid-column: 2; grid-row: 2; color: var(--ink-3); font-size: 13px; margin: 0; }

/* ─── Portfolio grid ─── */
.pf-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4/3;
  border: 1px solid var(--rule);
}
.pf-item img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.pf-item:hover img { transform: scale(1.04); }
.pf-item .meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  color: white;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.7));
  display: flex; justify-content: space-between; align-items: end;
}
.pf-item .meta h3 { color: white; font-weight: 500; font-size: 16px; line-height: 1.3; }
.pf-item .meta .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-top: 4px;
}
.pf-item .meta .ext {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ─── Portfolio grid 6 colonnes (page Réalisations BDD) ─── */
.pf-row.cols6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  grid-auto-flow: dense;
}
.pf-c-2 { grid-column: span 2; aspect-ratio: 4/5; }   /* 1/3 — tuile portrait */
.pf-c-4 { grid-column: span 4; aspect-ratio: 16/10; } /* 2/3 — tuile paysage */
.pf-c-6 { grid-column: span 6; aspect-ratio: 21/9; }  /* pleine largeur */

.pf-item video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
}
.pf-item .pf-play-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(15,27,45,.8);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
}

/* Tablette : grille 4 colonnes ; les 2/3 deviennent pleine largeur */
@media (max-width: 1000px) {
  .pf-row.cols6 { grid-template-columns: repeat(4, 1fr); }
  .pf-c-2 { grid-column: span 2; aspect-ratio: 4/5; }
  .pf-c-4 { grid-column: span 4; aspect-ratio: 16/10; }
  .pf-c-6 { grid-column: span 4; aspect-ratio: 21/9; }
}
/* Mobile : tout en pleine largeur */
@media (max-width: 720px) {
  .pf-row.cols6 { grid-template-columns: 1fr; }
  .pf-c-2, .pf-c-4, .pf-c-6 { grid-column: span 1; aspect-ratio: 16/10; }
}

/* ─── Lightbox (popup au clic sur une réalisation) ─── */
.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 14, 24, 0.92);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  opacity: 0;
  transition: opacity .2s;
}
.lb-overlay.is-open {
  display: flex;
  opacity: 1;
}
.lb-overlay .lb-stage {
  position: relative;
  max-width: min(1280px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.lb-overlay img,
.lb-overlay video {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  background: #000;
  display: block;
}
.lb-overlay .lb-meta {
  color: #fff;
  text-align: center;
  font-family: var(--font-body);
  max-width: 80ch;
}
.lb-overlay .lb-meta h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 4px;
  color: #fff;
  font-weight: 500;
}
.lb-overlay .lb-meta .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  background: transparent;
  border-color: rgba(255,255,255,.3);
}
.lb-overlay .lb-close {
  position: absolute;
  top: -42px; right: -4px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  width: 38px; height: 38px;
  cursor: pointer;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background .15s;
}
.lb-overlay .lb-close:hover { background: rgba(255,255,255,.12); }
@media (max-width: 720px) {
  .lb-overlay .lb-close { top: -38px; right: 0; }
}

/* ─── About / Two-column blocks ─── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
}
.kv:last-child { border-bottom: 1px solid var(--rule); }
.kv dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.kv dd { margin: 0; color: var(--ink-2); }

/* ─── FAQ ─── */
.faq { border-top: 1px solid var(--rule); }
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 19px);
  font-weight: 500;
  color: var(--ink);
  gap: 24px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 300;
  color: var(--ink-3);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin-top: 14px;
  color: var(--ink-3);
  max-width: 70ch;
  font-size: 15px;
}

/* ─── CTA banner — large image, glassy text card ─── */
.cta-banner {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 120px) clamp(28px, 5vw, 80px);
  min-height: clamp(360px, 42vw, 520px);
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(8,14,24,.0) 30%, rgba(8,14,24,.78) 100%),
    url("../../MEDIA/IMG/unsplash-1473968512647.webp") center/cover no-repeat;
  color: #fff;
}
.cta-banner::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 80% -10%, color-mix(in oklab, var(--accent) 38%, transparent), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner .eyebrow {
  color: color-mix(in oklab, var(--accent) 70%, white);
  display: inline-flex; align-items: center; gap: 12px;
}
.cta-banner .eyebrow::before {
  /* Trait décoratif masqué sur les CTA bas de page. */
  display: none;
}
.cta-banner h2 {
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 14ch;
  margin-bottom: 28px;
}
.cta-banner p {
  color: rgba(255,255,255,.78);
  font-size: 16px;
  max-width: 46ch;
  margin-bottom: 24px;
}
.cta-banner > div:first-child { display: flex; flex-direction: column; }
.cta-banner > div:last-child {
  margin-top: clamp(20px, 3vw, 32px);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.cta-banner .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-banner .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-banner .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cta-banner .btn-ghost {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,.45);
}
.cta-banner .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
@media (max-width: 760px) {
  .cta-banner > div:last-child { flex-direction: column; align-items: flex-start; }
}

/* ─── CTA banner — positionnement vertical personnalisé (admin) ─── */
/* Quand le titre a une position verticale définie, on remplace le padding-top par défaut
   de la tuile par la valeur souhaitée. La distance s'entend depuis le HAUT exact de la tuile.
   On force aussi `align-content: start` pour empêcher la grid d'étirer ses rows et de
   redescendre le contenu quand la tuile est plus haute que son contenu. */
.cta-banner.cta-title-positioned {
  padding-top: var(--cta-title-top, 0);
  align-content: start;
}
.cta-banner.cta-title-positioned > div:first-child {
  margin-top: 0;
}
/* Quand le bloc bas a une position verticale définie, on le positionne en absolu pour
   garder un contrôle pixel-précis de son origine depuis le haut de la tuile. */
.cta-banner.cta-bottom-positioned {
  position: relative;
}
.cta-banner.cta-bottom-positioned > div:last-child {
  position: absolute;
  top: var(--cta-bottom-top, auto);
  left: clamp(28px, 5vw, 80px);
  right: clamp(28px, 5vw, 80px);
  margin-top: 0;
}
/* Titre sur une seule ligne — on supprime la contrainte max-width et on désactive le wrap. */
.cta-banner.cta-title-oneline h2 {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 760px) {
  /* Sur mobile, on relâche les contraintes pour éviter les débordements horizontaux. */
  .cta-banner.cta-title-oneline h2 {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .cta-banner.cta-bottom-positioned > div:last-child {
    position: static;
    left: auto;
    right: auto;
  }
}
/* Mobile portrait : on ancre le texte + le bouton tout en bas de la tuile CTA. */
@media (max-width: 760px) and (orientation: portrait) {
  .cta-banner { display: flex; flex-direction: column; }
  .cta-banner > div:last-child,
  .cta-banner.cta-bottom-positioned > div:last-child { margin-top: auto; }
}
/* Mobile portrait — tous les CTA : boutons réduits de moitié, centrés tout en
   bas, texte centré au-dessus, titre sur une ligne, voile sombre renforcé. */
@media (max-width: 760px) and (orientation: portrait) {
  .cta-banner { min-height: 640px !important; padding-bottom: 21px; }
  /* Renforce le voile sombre du bas pour que le drone s'estompe derrière le texte. */
  .cta-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, rgba(8,14,24,.92) 88%);
  }
  .cta-banner h2 { max-width: none; white-space: nowrap; font-size: clamp(20px, 6.8vw, 44px); }
  .cta-banner > div:last-child { align-items: center; text-align: center; }
  .cta-banner > div:last-child p { margin: 0 auto 16px !important; line-height: 1.4; text-align: center; max-width: none; }
  .cta-banner .actions {
    flex-wrap: nowrap;
    gap: 8px;
    align-self: center;
    justify-content: center;
  }
  .cta-banner .btn { padding: 7px 11px; font-size: 12px; gap: 5px; }
  .cta-banner .btn .arrow { width: 11px; height: 11px; }
}

/* ─── Forms ─── */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea, .field select {
  font: inherit;
  padding: 13px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 15%, transparent);
}
.field textarea { resize: vertical; min-height: 120px; }
.checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.chk {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-elev);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.chk input { display: none; }
.chk:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
@media (max-width: 620px) { .form { grid-template-columns: 1fr; } }

/* ─── Tag pills ─── */
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: var(--bg-elev);
}

/* ─── Page intro (sub-pages) ─── */
.page-intro {
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}
.page-intro .breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
  display: flex; gap: 10px; align-items: center;
}
.page-intro h1 {
  font-size: clamp(36px, 4.4vw, 60px);
  max-width: 18ch;
}
.page-intro .lead { margin-top: 20px; max-width: 60ch; }

/* ─── Destructured tiles (Audiences) ─── */
.tile-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  position: relative;
  padding: 8px 0;
}
@media (max-width: 720px) { .tile-rail { grid-template-columns: 1fr; } }

/* Tuile centrée sur sa propre ligne (ex. 3e tuile Pros sous les 2 premières). */
.tile-rail .tile.tile-centered {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: calc(50% - 11px); /* moitié - moitié du gap (22/2) */
}
@media (max-width: 720px) {
  .tile-rail .tile.tile-centered { max-width: 100%; }
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-height: 220px;
  border-radius: 22px;
  overflow: hidden;
  background: #0a121e;
  color: #fff;
  box-shadow: 0 24px 48px -20px rgba(15,27,45,.35), 0 8px 24px -10px rgba(15,27,45,.18);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  isolation: isolate;
}
.tile:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 32px 60px -22px rgba(15,27,45,.45), 0 12px 32px -10px rgba(15,27,45,.22);
}
.tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  z-index: 0;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.tile:hover img { transform: scale(1.04); }
.tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(8,14,24,.85) 0%, rgba(8,14,24,.55) 55%, rgba(8,14,24,.25) 100%);
  z-index: 1;
}
.tile-num {
  position: absolute; top: 18px; right: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  z-index: 2;
}
.tile-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  margin-bottom: 14px;
}
.tile-icon[data-tone="thermo"] { background: #d94a3d; }
.tile-icon[data-tone="photo"]  { background: #d97a3d; }
.tile-icon[data-tone="agri"]   { background: #2f8f6f; }
.tile-icon[data-tone="3d"]     { background: #4a6fd9; }
.tile-icon[data-tone="event"]  { background: #8b5cd9; }

.tile[data-no-icon] { justify-content: flex-start; }
.tile[data-no-icon] .tile-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tile[data-no-icon] .tile-cta { margin-top: auto; align-self: flex-end; }

.tile-body {
  position: relative;
  padding: 28px;
  z-index: 2;
}
.tile-body .tile-icon { margin-bottom: 14px; }
.tile-body h4 {
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.tile-body p {
  color: rgba(255,255,255,.78);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 12px;
  max-width: 52ch;
}
.tile-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.tile[data-tone-cta="thermo"] .tile-cta { color: #ff8478; }
.tile[data-tone-cta="photo"]  .tile-cta { color: #ffb178; }
.tile[data-tone-cta="agri"]   .tile-cta { color: #6dd1ad; }
.tile[data-tone-cta="3d"]     .tile-cta { color: #8aa6ff; }
.tile[data-tone-cta="event"]  .tile-cta { color: #c19eff; }
.tile-cta .arrow { transition: transform .25s; }
.tile:hover .tile-cta .arrow { transform: translateX(4px); }

/* Tiles aligned: no destructure */
.tile[data-skew] { transform: none; }

@media (max-width: 760px) {
  .tile { width: 100%; min-height: 240px; }
  .tile[data-skew] { transform: none; }
  .tile-body { padding: 18px; }
  .tile-body h4 { font-size: 17px; }
}

.audiences {
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 7vw, 100px);
}
.audience-block { width: 100%; }

.audience-head {
  margin-bottom: 28px;
}
.audience-head .eyebrow { color: var(--accent); }
.audience-head h3 {
  font-size: clamp(24px, 2.2vw, 30px);
  margin-top: 12px;
  margin-bottom: 8px;
}
.audience-head p {
  color: var(--ink-3);
  font-size: 14.5px;
  max-width: 42ch;
}

/* Helpers */
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
