/* ── OpusCV — landing "dynamique" ───────────────────────────────────────────
   Même identité que landing.css (tokens repris de client/tailwind.config.cjs)
   mais avec plus de mouvement : mot du titre qui tourne, halo qui suit le
   curseur, cartes en tilt 3D léger, bandeau de mots-clés défilant, parallaxe
   douce sur les formes du hero. Toujours zéro dépendance. */

:root {
  --brand-400: #c8703c;
  --brand-500: #b5572a;
  --brand-600: #a34c22;
  --brand-50: #fbeee7;
  --ink: #2a2420;
  --ink-muted: #8c7f6f;
  --paper: #f4ede1;
  --paper-surface: #fbf7ef;
  --paper-line: #e2d5c2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; }

/* ── Header ── */
header.site {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid transparent;
  background: rgba(251, 247, 239, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s ease, box-shadow .3s ease;
}
header.site.is-scrolled { border-bottom-color: var(--paper-line); box-shadow: 0 4px 20px rgba(42, 36, 32, 0.05); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.logo { font-family: 'Fraunces', serif; font-weight: 600; font-size: 22px; }
.logo span { color: var(--brand-500); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn-brand {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff;
  background-size: 160% 160%;
  animation: gradientShift 6s ease infinite;
}
.btn-brand:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 28px rgba(181, 87, 42, 0.4); }
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── Hero ── */
.hero { position: relative; padding: 96px 0 64px; text-align: center; isolation: isolate; }

.hero .blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .35; animation: drift 18s ease-in-out infinite; will-change: transform; }
.hero .blob-1 { width: 460px; height: 460px; top: -160px; left: -130px; background: var(--brand-400); }
.hero .blob-2 { width: 400px; height: 400px; top: -60px; right: -150px; background: #c5a059; animation-delay: -6s; animation-direction: reverse; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
}

/* Halo qui suit le curseur — posé par landing-dynamique.js sur --mx/--my,
   en pourcentage du conteneur .hero. Purement décoratif (z-index -1,
   pointer-events none) : jamais un obstacle au clic. */
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 20%), rgba(181, 87, 42, 0.14), transparent 70%);
  transition: background .1s linear;
}

.hero .kicker {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-50); color: var(--brand-600);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: 44px; line-height: 1.15; max-width: 800px; margin: 0 auto 20px; }

/* Mot qui tourne dans le titre — landing-dynamique.js échange le texte de
   .rotator toutes les 2,2s ; la transition ne porte que sur cet élément,
   jamais sur le reste de la phrase. */
.rotator {
  display: inline-block;
  color: var(--brand-500);
  min-width: 1ch;
  white-space: nowrap;
  transition: opacity .35s ease, transform .35s ease, filter .35s ease;
}
@media (max-width: 480px) {
  .rotator { white-space: normal; }
}
.rotator.is-swapping { opacity: 0; transform: translateY(10px); filter: blur(4px); }

.hero p.sub { font-size: 18px; color: var(--ink-muted); max-width: 560px; margin: 0 auto 34px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn { padding: 15px 30px; font-size: 15px; }

/* ── Entrée en cascade au chargement (pas au scroll) ──
   Chaque enfant du hero apparaît l'un après l'autre — visible dès la
   première frame une fois le chargement terminé, jamais suspendu dans
   l'attente d'un geste. */
.enter { animation: enter .7s cubic-bezier(.16,1,.3,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.enter-1 { animation-delay: .05s; }
.enter-2 { animation-delay: .15s; }
.enter-3 { animation-delay: .25s; }
.enter-4 { animation-delay: .35s; }
.enter-5 { animation-delay: .45s; }

/* ── Bandeau de mots-clés défilant ── */
.ticker {
  margin-top: 52px;
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  padding: 16px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track {
  display: flex; gap: 36px; width: max-content;
  animation: scroll-left 26s linear infinite;
}
.ticker-track span {
  font-size: 13px; font-weight: 700; color: var(--ink-muted);
  letter-spacing: .02em; white-space: nowrap;
}
.ticker-track span::before { content: '✦'; color: var(--brand-400); margin-right: 10px; }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Mockup CV flottant ── */
.hero-mockup {
  margin: 48px auto 0; max-width: 380px; background: #fff;
  border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(42, 36, 32, 0.25);
  padding: 22px 24px; text-align: left; animation: float 6s ease-in-out infinite;
  position: relative; overflow: hidden;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-mockup::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-100%); animation: sweep 4s ease-in-out infinite;
}
@keyframes sweep { 0%, 30% { transform: translateX(-120%); } 60%, 100% { transform: translateX(120%); } }
.hero-mockup .line { height: 10px; border-radius: 5px; background: var(--paper-line); margin-bottom: 10px; }
.hero-mockup .line.w-60 { width: 60%; } .hero-mockup .line.w-90 { width: 90%; } .hero-mockup .line.w-40 { width: 40%; }

/* Checklist qui coche un item à la fois — landing-dynamique.js fait tourner
   .is-active parmi les .tick, en boucle. Illustratif, jamais présenté comme
   une vraie analyse : aria-hidden sur le conteneur parent. */
.tick-list { position: relative; height: 24px; margin-bottom: 14px; }
.tick {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: #0f766e;
  opacity: 0; transform: translateX(-8px);
  transition: opacity .4s ease, transform .4s ease;
}
.tick.is-active { opacity: 1; transform: translateX(0); }
.tick .check {
  width: 16px; height: 16px; border-radius: 50%; background: #ecfdf5; border: 1px solid #a7f3d0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0;
}

/* ── Sections ── */
section { padding: 64px 0; }
section.alt { background: var(--paper-surface); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.section-title { text-align: center; font-size: 30px; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--ink-muted); max-width: 560px; margin: 0 auto 44px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 800px) { .grid-3 { grid-template-columns: 1fr; } .hero h1 { font-size: 32px; } }

/* Cartes en tilt 3D léger — landing-dynamique.js pose --rx/--ry au
   mousemove ; au repos elles restent plates (0deg), le survol seul incline. */
.card {
  background: var(--paper-surface);
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  padding: 26px;
  transform: perspective(700px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateY(var(--lift, 0px));
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
  will-change: transform;
}
.card:hover { --lift: -6px; box-shadow: 0 24px 44px -18px rgba(42, 36, 32, 0.22); border-color: var(--brand-400); }
.card .icon { font-size: 26px; margin-bottom: 14px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--ink-muted); font-size: 14px; margin: 0; }

/* ── CTA final ── */
.cta-final { text-align: center; padding: 76px 0; position: relative; }
.cta-final h2 { font-size: 28px; margin-bottom: 14px; }
.cta-final p { color: var(--ink-muted); margin-bottom: 28px; }

/* ── Footer ── */
footer.site { border-top: 1px solid var(--paper-line); padding: 28px 0; text-align: center; font-size: 12px; color: var(--ink-muted); }
footer.site a { text-decoration: underline; }

/* ── Apparition au scroll (sections hors hero) ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .enter { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero .blob, .hero-mockup, .hero-mockup::after, .btn-brand, .ticker-track { animation: none !important; }
  .hero::before { background: none; }
  .card { transform: none !important; }
  .rotator { transition: none; }
}
