/* ============================================================
   SKANLIA — enhance.css
   Couche d'animation & d'enrichissement visuel partagée par
   toutes les pages statiques (à-propos, carrières, blog,
   articles, pages légales). Chargée APRÈS le <style> inline
   de chaque page pour pouvoir affiner sans tout réécrire.
   ============================================================ */

/* ---- Barre de progression de lecture ---- */
.rv-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--gold), #C9A35F);
  z-index: 100; pointer-events: none;
  box-shadow: 0 1px 6px -1px rgba(214, 179, 106, .6);
  transition: width .12s linear;
}

/* ---- Élévation du header au scroll ---- */
.header { transition: box-shadow .3s ease, background .3s ease; }
.header.scrolled {
  box-shadow: 0 8px 30px -16px rgba(6, 17, 31, .28);
  background: rgba(255, 255, 255, .92);
}

/* ============================================================
   Orbes dorés flottants dans les héros
   ============================================================ */
.hero, .art-hero { position: relative; overflow: hidden; }
.hero > .container, .art-hero > .container { position: relative; z-index: 2; }
.fx-orbs {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.fx-orb {
  position: absolute; border-radius: 50%;
  filter: blur(46px); opacity: .55;
  background: radial-gradient(circle at 35% 35%, rgba(214, 179, 106, .6), rgba(214, 179, 106, 0) 70%);
  will-change: transform;
}
.fx-orb.o1 { width: 360px; height: 360px; top: -120px; right: -60px; animation: orbFloat 19s ease-in-out infinite; }
.fx-orb.o2 { width: 260px; height: 260px; top: 30px; left: -100px; opacity: .4;
  background: radial-gradient(circle at 35% 35%, rgba(45, 212, 191, .35), rgba(45, 212, 191, 0) 70%);
  animation: orbFloat 24s ease-in-out infinite reverse; }
.fx-orb.o3 { width: 180px; height: 180px; bottom: -60px; left: 38%; opacity: .35;
  animation: orbFloat 16s ease-in-out infinite 2s; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(26px, -22px) scale(1.08); }
  66%      { transform: translate(-20px, 16px) scale(.95); }
}

/* Fine grille technique en filigrane derrière le héros */
.fx-grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(6, 17, 31, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 17, 31, .035) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(620px 280px at 50% 30%, #000 0%, transparent 78%);
          mask-image: radial-gradient(620px 280px at 50% 30%, #000 0%, transparent 78%);
}

/* ============================================================
   Reveal au scroll — état caché activé seulement quand
   <html class="rv-on"> (ajouté par enhance.js si l'animation
   est permise). Sans JS → tout reste visible.
   ============================================================ */
.rv-on:not(.rv-frozen) :is(
  .hero .eyebrow, .hero h1, .hero-sub, .hero-meta,
  .art-hero .crumb, .art-hero .art-tag, .art-hero h1, .art-lead, .art-byline,
  .story-chapter, .story .lead, .pullquote,
  .team-card, .job-card, .future-card, .commission-table,
  .legal-section > h2,
  .id-card, .notice, .rights, .sub-card,
  .contact-box, .newsletter-card, .sk-cta,
  .filters, .blog-card,
  .prose > h2, .checklist, .stat-row,
  .about-stats, .perks
) {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .72s cubic-bezier(.22, 1, .36, 1),
              transform .72s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

/* Cartes : montée + léger zoom */
.rv-on:not(.rv-frozen) :is(.team-card, .job-card, .blog-card, .future-card, .sk-cta, .newsletter-card, .contact-box) {
  transform: translateY(34px) scale(.975);
}

/* Variante image : fondu + zoom (pas de translation) */
.rv-on:not(.rv-frozen) :is(.art-cover, .fig, .featured, .img-banner, .img-collage) {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .9s cubic-bezier(.22, 1, .36, 1),
              transform 1.1s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

/* État révélé (la classe ajoute de la spécificité → l'emporte) */
.rv-on .rv-in { opacity: 1 !important; transform: none; }
.rv-on :is(.art-cover, .fig, .featured, .img-banner, .img-collage).rv-in { transform: scale(1); }

/* ============================================================
   Tilt 3D des cartes (pointeur fin uniquement)
   ============================================================ */
.tilt { transform-style: preserve-3d; }
.tilt.tilt-active { transition: transform .12s ease-out; }

/* ============================================================
   Sommaire collant des pages légales
   ============================================================ */
.toc {
  position: fixed; top: 50%; transform: translateY(-50%);
  left: max(20px, calc((100vw - var(--container-wide)) / 2 - 216px));
  width: 196px; z-index: 40;
  font-family: var(--font-display);
}
.toc-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-mute-2); margin-bottom: 14px;
  padding-left: 14px;
}
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a {
  display: block; position: relative;
  font-size: 12.5px; line-height: 1.35; color: var(--ink-mute-2);
  padding: 7px 0 7px 16px; border-left: 2px solid var(--line);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.toc a:hover { color: var(--ink); transform: translateX(2px); }
.toc a.active { color: var(--ink); border-color: var(--gold); font-weight: 600; }
@media (max-width: 1680px) { .toc { display: none; } }

/* ============================================================
   Sheen lent sur les cartes sombres (CTA, newsletter)
   ============================================================ */
.sk-cta, .newsletter-card { position: relative; }
.sk-cta::after, .newsletter-card::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(214, 179, 106, .10) 48%, transparent 66%);
  background-size: 280% 100%;
  animation: sheen 7s linear infinite;
  border-radius: inherit;
}
.sk-cta > *, .newsletter-card > * { position: relative; z-index: 1; }
@keyframes sheen {
  0%   { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

/* ============================================================
   Compteurs animés
   ============================================================ */
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 34px 0 8px;
}
@media (max-width: 560px) { .about-stats { grid-template-columns: 1fr; } }
.about-stat {
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 22px 24px;
}
.about-stat .n {
  font-family: var(--font-display); font-size: 34px; font-weight: 600;
  color: var(--ink); letter-spacing: -.02em; line-height: 1;
}
.about-stat .n em { font-style: normal; color: var(--gold); }
.about-stat .l { font-size: 13px; color: var(--ink-muted); margin-top: 8px; line-height: 1.45; }

/* ============================================================
   Collage de photos (page à-propos)
   ============================================================ */
.img-collage {
  display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 12px; margin: 8px 0 4px; height: 320px;
}
.img-collage figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: #1E293B; position: relative; }
.img-collage figure:first-child { grid-row: span 2; }
.img-collage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s cubic-bezier(.22,1,.36,1); }
.img-collage figure:hover img { transform: scale(1.06); }
.img-collage figcaption {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  color: #fff; background: rgba(6, 17, 31, .5); backdrop-filter: blur(4px);
  padding: 3px 9px; border-radius: 100px;
}
@media (max-width: 560px) { .img-collage { height: 240px; grid-template-columns: 1fr 1fr; } .img-collage figcaption { display: none; } }

/* ============================================================
   Bandeau image (page carrières)
   ============================================================ */
.img-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin: 8px 0 4px; min-height: 230px; display: flex; align-items: flex-end;
  background: #1E293B center/cover no-repeat;
}
.img-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, rgba(6, 17, 31, .85) 0%, rgba(6, 17, 31, .45) 55%, rgba(6, 17, 31, .15) 100%);
}
.img-banner .ib-body { position: relative; z-index: 1; padding: 28px 32px; max-width: 60ch; }
.img-banner .ib-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.img-banner .ib-title {
  font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 26px); font-weight: 600;
  color: #fff; letter-spacing: -.02em; line-height: 1.2; margin: 0;
}

/* ============================================================
   Bandeau de perks / avantages (page carrières)
   ============================================================ */
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 8px; }
@media (max-width: 640px) { .perks { grid-template-columns: 1fr; } }
.perk {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.perk:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.perk-ic {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(214, 179, 106, .14); color: var(--gold);
  display: grid; place-items: center; margin-bottom: 14px;
}
.perk h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.perk p { font-size: 13.5px; color: var(--ink-muted); line-height: 1.55; margin: 0; }

/* ============================================================
   Respect de prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .fx-orb, .sk-cta::after, .newsletter-card::after { animation: none !important; }
  .toc { animation: none; opacity: 1; }
  .rv-on :is([class]) { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   Navigation d'en-tête unifiée (fournie aux pages qui ne la
   définissent pas en interne — ex. pages légales). Identique
   au reste du site.
   ============================================================ */
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { white-space: nowrap; font-size: 14px; color: var(--ink-muted); padding: 8px 13px; border-radius: 8px; transition: color .15s, background .15s; font-family: var(--font-display); font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a.active { color: var(--ink); background: var(--bg-soft); font-weight: 600; }
.nav a.nav-demo { color: var(--gold); font-weight: 600; }
.nav a.nav-demo:hover { color: var(--gold); background: rgba(214, 179, 106, .12); }
.header-cta { display: flex; align-items: center; gap: 8px; }
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border-radius: 100px; font-weight: 500; font-size: 15px; font-family: var(--font-display); letter-spacing: -0.01em; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease; cursor: pointer; border: none; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn-primary .arrow { transition: transform .2s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.menu-btn { display: none; background: transparent; border: 1px solid var(--line); color: var(--ink); }
.mobile-nav { display: none; }
@media (max-width: 1140px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; padding: 8px; border-radius: 8px; }
  .mobile-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 24px 18px; max-width: var(--container-wide); margin: 0 auto; }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a { padding: 12px 14px; border-radius: 8px; color: var(--ink-2); font-family: var(--font-display); font-weight: 500; font-size: 15px; }
  .mobile-nav a.active { background: var(--bg-soft); color: var(--ink); }
  .mobile-nav a.nav-demo-m { color: var(--gold); font-weight: 600; }
  .mobile-nav .mobile-demo { margin-top: 8px; justify-content: center; }
}

/* ---- Phones : la barre d'en-tête ne garde que le logo + le burger ----
   Le bouton « Demander une démo » est repris dans le menu mobile (CTA dorée),
   donc on le masque dans l'en-tête sous 600px pour éviter tout débordement
   horizontal sur les écrans ≤ 414px. */
@media (max-width: 600px) {
  .header-cta .btn-primary { display: none; }
}
