/* ==== Design tokens ==== */
:root {
  --bg: #0a0806;
  --bg-elevated: #14100c;
  --surface: #191410;
  --border: rgba(255, 230, 200, 0.09);
  --text: #f7f2ec;
  --text-dim: #ab9f92;
  --accent: #fe862f;
  --accent-2: #4ebd40;
  --accent-3: #bbec9a;
  --brown: #9a6845;
  --brown-deep: #7d4c23;
  --amber: #feb83d;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 16px;
  --container: 1180px;
  --shadow-glow: 0 0 40px rgba(254, 134, 47, 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; color: var(--text-dim); }

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.62;
}

#cursor-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(254, 134, 47, 0.10) 0%, rgba(78, 189, 64, 0.06) 40%, transparent 70%);
  transition: opacity 0.3s ease;
}

@media (hover: none) {
  #cursor-spotlight { display: none; }
}

/* ==== Custom cursor (desktop only) ==== */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
#cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  opacity: 0;
}
#cursor-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(254, 134, 47, 0.5);
  opacity: 0;
  transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s, border-color 0.2s, opacity 0.3s;
}
#cursor-ring.is-active, #cursor-dot.is-active { opacity: 1; }
#cursor-ring.hovering {
  width: 54px;
  height: 54px;
  background: rgba(254, 134, 47, 0.08);
  border-color: var(--accent-2);
}

@media (hover: hover) {
  body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button {
    cursor: none;
  }
}

/* ==== Layout helpers ==== */
.section-head { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }
.section-sub { color: var(--text-dim); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

section { position: relative; padding: 7rem 1.5rem; max-width: var(--container); margin: 0 auto; }

/* ==== Nav ==== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 8, 6, 0.8);
  backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; }
.brand-logo { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link { font-size: 0.92rem; color: var(--text-dim); transition: color 0.2s; position: relative; }
.nav-link:hover { color: var(--text); }
.nav-phone {
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(254, 134, 47, 0.35);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s, box-shadow 0.2s;
}
.nav-phone:hover { background: rgba(254, 134, 47, 0.1); box-shadow: var(--shadow-glow); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-burger span { width: 22px; height: 2px; background: var(--text); transition: transform 0.3s, opacity 0.3s; }

/* ==== Hero ==== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 6rem;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  pointer-events: none;
}

/* ==== Hero background video ==== */
/* Priorité à la largeur : la vidéo n'est jamais rognée à gauche/droite,
   quitte à rogner en haut/bas si le ratio du hero est plus "portrait" que la vidéo. */
.hero-video-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
}
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: auto;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.22;
  will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* ==== Hero reactive blobs (soft 3D-ish shape, parallax on mouse) ==== */
.hero-blobs {
  position: absolute;
  inset: -10%;
  overflow: hidden;
  filter: blur(70px);
  opacity: 0.6;
  pointer-events: none;
}
.blob { position: absolute; will-change: transform; transition: transform 0.3s ease-out; }
.blob-shape { display: block; border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%; will-change: transform, border-radius; }
.blob-1 {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -8%; left: 4%;
}
.blob-1 .blob-shape { width: 100%; height: 100%; background: radial-gradient(circle at 32% 32%, var(--accent), transparent 72%); animation: morph1 16s ease-in-out infinite; }
.blob-2 {
  width: 34vw; height: 34vw; max-width: 460px; max-height: 460px;
  bottom: -12%; right: 6%;
}
.blob-2 .blob-shape { width: 100%; height: 100%; background: radial-gradient(circle at 62% 42%, var(--accent-2), transparent 72%); animation: morph2 20s ease-in-out infinite; }
.blob-3 {
  width: 22vw; height: 22vw; max-width: 320px; max-height: 320px;
  top: 34%; right: 26%;
}
.blob-3 .blob-shape { width: 100%; height: 100%; background: radial-gradient(circle at 50% 50%, var(--amber), transparent 72%); animation: morph3 12s ease-in-out infinite reverse; }

@keyframes morph1 {
  0%, 100% { border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%; transform: scale(1) rotate(0deg); }
  50% { border-radius: 62% 38% 30% 70% / 55% 62% 38% 45%; transform: scale(1.1) rotate(8deg); }
}
@keyframes morph2 {
  0%, 100% { border-radius: 55% 45% 40% 60% / 40% 50% 50% 60%; transform: scale(1) rotate(0deg); }
  50% { border-radius: 35% 65% 60% 40% / 60% 35% 65% 40%; transform: scale(1.14) rotate(-10deg); }
}
@keyframes morph3 {
  0%, 100% { border-radius: 50%; transform: scale(1); }
  50% { border-radius: 40% 60% 55% 45% / 55% 45% 55% 45%; transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .blob-shape { animation: none !important; }
}
.hero-content { max-width: 820px; position: relative; }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  background: linear-gradient(180deg, #ffffff 0%, #e7ddd0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle { font-size: 1.15rem; max-width: 620px; margin-inline: auto; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  width: 34px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: 20px;
}
.scroll-cue span {
  display: block;
  width: 6px;
  height: 12px;
  margin: 10px auto 0;
  background: var(--accent);
  border-radius: 3px;
  animation: scrollcue 1.8s infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(20px); opacity: 0; }
}

/* ==== Buttons ==== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  will-change: transform;
}
.btn-primary { background: var(--gradient); color: #0a0806; box-shadow: 0 8px 30px rgba(254, 134, 47, 0.25); }
.btn-primary:hover { box-shadow: 0 8px 40px rgba(254, 134, 47, 0.45); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.full-width { width: 100%; }

/* ==== Stats ==== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}
.stat-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-plus { font-weight: 800; color: var(--accent-2); font-size: 1.5rem; }
.stat-label { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.4rem; }

/* ==== Services ==== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.3s;
}
.service-card-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  border-radius: inherit;
  transform: translateZ(0) scale(1.01);
}
.service-card:hover { border-color: rgba(254, 134, 47, 0.4); }
.service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(254, 134, 47, 0.18), rgba(78, 189, 64, 0.15));
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 1.05rem; }
.service-card p { font-size: 0.92rem; margin: 0; }
.service-glow {
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(254, 134, 47, 0.2), transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.service-card:hover .service-glow { opacity: 1; }

/* ==== Method (sticky stacking panels) ==== */
.method { padding-bottom: 0; }
.stack { position: relative; }
.stack-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}
.stack-panel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.stack-panel-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(10, 8, 6, 0.94) 0%, rgba(10, 8, 6, 0.78) 42%, rgba(10, 8, 6, 0.4) 100%);
}
.tone-1 .stack-panel-scrim { background: linear-gradient(100deg, rgba(10, 8, 6, 0.95) 0%, rgba(125, 76, 35, 0.55) 45%, rgba(10, 8, 6, 0.55) 100%); }
.tone-2 .stack-panel-scrim { background: linear-gradient(100deg, rgba(10, 8, 6, 0.95) 0%, rgba(78, 189, 64, 0.35) 45%, rgba(10, 8, 6, 0.55) 100%); }
.tone-3 .stack-panel-scrim { background: linear-gradient(100deg, rgba(10, 8, 6, 0.95) 0%, rgba(254, 134, 47, 0.35) 45%, rgba(10, 8, 6, 0.55) 100%); }
.tone-4 .stack-panel-scrim { background: linear-gradient(100deg, rgba(10, 8, 6, 0.95) 0%, rgba(254, 184, 61, 0.35) 45%, rgba(10, 8, 6, 0.55) 100%); }
.stack-panel-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.stack-panel-content h3 { font-size: clamp(1.8rem, 4vw, 3rem); max-width: 620px; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55); }
.stack-panel-content p { font-size: 1.05rem; max-width: 460px; color: #f0ebe4; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65); }
.stack-index {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (max-width: 680px) {
  .stack-panel { height: 88vh; }
  .stack-panel-content h3 { font-size: 1.7rem; }
}

/* ==== About ==== */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 4rem; align-items: center; }
.about-visual { display: flex; align-items: center; justify-content: center; }
.orbit { position: relative; width: 260px; height: 260px; }
.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.ring-1 { animation: spin 18s linear infinite; border-top-color: var(--accent); }
.ring-2 { inset: 30px; animation: spin 12s linear infinite reverse; border-right-color: var(--accent-2); }
.orbit-core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-glow);
  padding: 12px;
}
.orbit-logo { width: 100%; height: 100%; object-fit: contain; }
@keyframes spin { to { transform: rotate(360deg); } }
.about-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* ==== Contact ==== */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; }
.contact-form, .contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.contact-card { margin-bottom: 1.5rem; }
.contact-card h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--accent); }
.contact-link { display: block; margin-bottom: 0.6rem; color: var(--text); }
.contact-link:hover { color: var(--accent); }
.social-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.social-links a {
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}
.social-links a:hover { border-color: var(--accent); color: var(--accent); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
label { font-size: 0.85rem; color: var(--text-dim); }
input, select, textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(254, 134, 47, 0.18);
}
.checkbox { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--text-dim); margin-bottom: 1.2rem; }
.checkbox input { width: auto; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-status { min-height: 1.4em; font-size: 0.9rem; margin-top: 0.8rem; }
.form-status.ok { color: var(--accent-3); }
.form-status.error { color: #ff5c7a; }

/* ==== Footer ==== */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ==== Reveal (JS-controlled) ==== */
.reveal { opacity: 1; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js-ready .reveal { opacity: 0; transform: translateY(24px); }
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

/* ==== Responsive ==== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
}

@media (max-width: 680px) {
  section { padding: 5rem 1.25rem; }
  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 8, 6, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    transition: transform 0.35s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
  .nav-links .nav-phone { border: none; padding: 0.9rem 0; }
  .nav-burger { display: flex; }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-ready .reveal { opacity: 1; transform: none; }
  .ring-1, .ring-2, .scroll-cue span { animation: none; }
}
