:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --line: rgba(255, 255, 255, .08);
  --text: #f3efe7;
  --muted: #a39d92;
  --gold: #c4a35c;
  --gold-2: #e2c98f;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: "Marcellus", "Optima", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 4vw, 40px);
  opacity: 0; animation: fade .8s 2.6s forwards;
}
.topbar__brand img { width: 28px; height: 28px; opacity: .9; }
.lang { display: flex; align-items: center; gap: 6px; font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.lang button {
  background: none; border: 0; padding: 6px 4px; cursor: pointer;
  font: inherit; letter-spacing: inherit; color: var(--muted); transition: color .2s;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 16px 120px; text-align: center; overflow: hidden;
}
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 45% at 50% 48%, rgba(196, 163, 92, .16), transparent 70%);
  opacity: 0; animation: fade 2.4s .4s forwards;
}

/* Logo : pièces positionnées sur la géométrie d'origine (926 × 404) */
.logo {
  position: relative; margin: 0; cursor: pointer;
  width: min(560px, 82vw); aspect-ratio: 926 / 404;
}
.logo > span:not(.sr-only) { position: absolute; display: block; }
.logo img { width: 100%; height: 100%; }

.logo__mark { left: 0; top: 0; width: 27.21%; height: 62.38%; overflow: hidden;
  clip-path: inset(100% 0 0 0); transform: scale(.85) rotate(-6deg);
  animation: markIn 1.2s var(--ease) .2s forwards; }
.logo__shine {
  position: absolute; inset: -20% auto -20% -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 245, 220, .65), transparent);
  transform: skewX(-18deg); animation: shine 1.1s ease-in-out 1.35s forwards;
}

.logo__line { left: 34.56%; width: 65.44%; overflow: hidden; }
.logo__line img { transform: translateY(105%); animation: lineUp 1s var(--ease) forwards; }
.logo__line--five   { top: 16.58%; height: 29.46%; }
.logo__line--frames { top: 50.99%; height: 30.20%; }
.logo__line--group  { top: 87.38%; height: 12.62%; }
.logo__line--five img   { animation-delay: 1.0s; }
.logo__line--frames img { animation-delay: 1.18s; }
.logo__line--group img  { animation-delay: 1.5s; }

.hero__rule {
  width: 0; height: 1px; margin: clamp(28px, 5vw, 44px) auto 22px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: rule 1.2s var(--ease) 1.9s forwards;
}
.hero__tagline {
  margin: 0; max-width: 46ch; font-size: clamp(12px, 2.6vw, 15px);
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
  opacity: 0; transform: translateY(10px); animation: rise .9s var(--ease) 2.2s forwards;
}
.hero__scroll {
  position: absolute; bottom: 32px; left: 0; right: 0; margin: 0; padding: 0 16px;
  color: var(--gold); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; text-align: center;
  opacity: 0; animation: fade 1s 2.8s forwards, pulse 3s ease-in-out 3.8s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Rejouer l'animation */
.logo.replay * { animation: none !important; }

/* ---------- Services ---------- */
.services { padding: clamp(80px, 12vw, 140px) clamp(16px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.services__head { text-align: center; margin-bottom: clamp(40px, 7vw, 72px); }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.services h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 5vw, 46px); line-height: 1.15; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(6, 1fr);
}
.card { grid-column: span 2; }
.card:nth-child(4) { grid-column: 2 / span 2; }
.card:nth-child(5) { grid-column: 4 / span 2; }
.grid::after { content: ""; grid-column: 1 / -1; display: none; }

.card {
  position: relative; background: var(--bg); padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line); overflow: hidden;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--gold); transition: width .5s var(--ease);
}
.card:hover { background: var(--bg-2); border-color: rgba(196, 163, 92, .25); }
.card:hover::before { width: 100%; }
.card__num { position: absolute; top: 20px; right: 24px; font-family: var(--serif); color: rgba(196, 163, 92, .45); font-size: 14px; letter-spacing: .1em; }
.card__icon { width: 44px; height: 44px; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 22px; transition: transform .5s var(--ease); }
.card:hover .card__icon { transform: translateY(-4px); }
.card h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: 23px; letter-spacing: .02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Apparition au scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.grid .card.reveal:nth-child(2) { transition-delay: .08s; }
.grid .card.reveal:nth-child(3) { transition-delay: .16s; }
.grid .card.reveal:nth-child(4) { transition-delay: .24s; }
.grid .card.reveal:nth-child(5) { transition-delay: .32s; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 56px 16px 48px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; letter-spacing: .06em; text-align: center;
}
.footer img { width: 32px; height: 32px; opacity: .8; }
.footer p { margin: 0; }

/* ---------- Keyframes ---------- */
@keyframes markIn { to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes shine { to { left: 140%; } }
@keyframes lineUp { to { transform: none; } }
@keyframes rule { to { width: min(220px, 50vw); } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card, .card:nth-child(4) { grid-column: span 1; }
  .card:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: auto; }
  .hero__tagline { letter-spacing: .18em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .logo__shine { display: none; }
}
