/* ============================================================
   HELBY — style.css
   Thème : Dark | Violet + Coral | Modélisation & Impression 3D
   ============================================================ */

/* ---------- RESET & BASE ---------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Backgrounds — dark violet prononcé */
  --bg-base:     #1a1830;
  --bg-surface:  #1f1d38;
  --bg-elevated: #28253e;
  --bg-card:     #221f38;

  /* Couleur principale — violet */
  --bordeaux:      #7F77DD;
  --bordeaux-light:#9990e8;
  --bordeaux-dim:  rgba(127, 119, 221, 0.12);
  --bordeaux-glow: rgba(127, 119, 221, 0.28);

  /* Accent chaud — coral */
  --cyan:     #D85A30;
  --cyan-dim: rgba(216, 90, 48, 0.1);

  /* Accents secondaires */
  --teal: #1D9E75;
  --blue: #378ADD;
  --error: #e05555;

  /* Ombres */
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-md: 0 16px 48px rgba(0,0,0,0.48);
  --shadow-lg: 0 28px 72px rgba(0,0,0,0.58);

  /* Transition lente (accordéon, panels) */
  --transition-slow: 0.42s var(--ease-out);

  /* Texte */
  --text-primary:   #FFFFFF;
  --text-secondary: #D4D1EC;
  --text-muted:     #A09DC0;

  /* Bordures */
  --border:       rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.18);

  /* Rayons */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 24px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.28s var(--ease-out);

  /* Typographie — Trebuchet MS (web-safe) + fallbacks */
  --font-sans:    'Segoe UI', 'Inter', system-ui, sans-serif;
  --font-display: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  cursor: none;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

.mono { font-family: var(--font-mono); }

/* Scrollbar */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: var(--bg-surface); }
::-webkit-scrollbar-thumb        { background: rgba(127,119,221,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(127,119,221,0.6); }
* { scrollbar-width: thin; scrollbar-color: rgba(127,119,221,0.35) var(--bg-surface); }

/* Sélection de texte */
::selection { background: rgba(127,119,221,0.38); color: #fff; }

/* Focus clavier — accessible sans être intrusif */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--bordeaux-light);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- CUSTOM CURSOR --------------------------------- */
.cursor-ring,
.cursor-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: width 0.22s var(--ease-out), height 0.22s var(--ease-out),
              border-color 0.22s ease, transform 0.1s linear, opacity 0.3s ease;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--cyan);
  transition: transform 0.06s linear, opacity 0.3s ease;
}

body:hover .cursor-ring,
body:hover .cursor-dot { opacity: 1; }

.cursor-ring.hovering {
  width: 48px;
  height: 48px;
  border-color: var(--bordeaux-light);
}

/* ---------- PAGE VEIL ------------------------------------- */
#page-veil {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 9998;
  transition: opacity 0.8s var(--ease-out);
  pointer-events: none;
}

#page-veil.out { opacity: 0; }

/* ---------- SCROLL PROGRESS ------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--bordeaux), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 202;
  pointer-events: none;
  transition: none;
}

/* ---------- UTILITY --------------------------------------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

.section { padding: 140px 0; }

.section--dark { background-color: var(--bg-surface); }

/* ---------- SCROLL REVEAL --------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.services-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.projects-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* Directional reveal variants */
.reveal-left  { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }

.reveal-left.visible,
.reveal-right.visible { transform: translateX(0); }

/* ---------- SECTION HEADER -------------------------------- */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 72px;
}

.section-header--left {
  text-align: left;
  margin: 0 0 36px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section-tag .mono {
  color: var(--bordeaux-light);
  letter-spacing: 0.06em;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.section-sub {
  font-size: 0.975rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ---------- BUTTONS --------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: none;
  border: none;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  transition: background var(--transition), transform var(--transition),
              box-shadow var(--transition), border-color var(--transition);
}

.btn-sm { padding: 10px 20px; font-size: 0.82rem; }

.btn-primary {
  background-color: var(--bordeaux);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.13), transparent);
  transform: skewX(-18deg);
  animation: btnShimmer 4.5s ease-in-out infinite;
  pointer-events: none;
}

.btn-primary:hover {
  background-color: var(--bordeaux-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--bordeaux-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

/* ---------- NAVBAR ---------------------------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 22px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(24, 22, 44, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  transition: color var(--transition);
  text-transform: uppercase;
}

.logo-mark {
  width: 20px;
  height: 18px;
  flex-shrink: 0;
}

.logo:hover { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
}

/* Bouton CTA navbar — halo visible même sur fond transparent */
.nav-links .btn-primary {
  box-shadow: 0 0 0 1px rgba(153, 144, 232, 0.45),
              0 4px 18px rgba(127, 119, 221, 0.25);
}

.nav-links .btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(153, 144, 232, 0.6),
              0 6px 28px rgba(127, 119, 221, 0.4);
}

.nav-links > a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  letter-spacing: 0.01em;
  position: relative;
}

/* Animated underline sweep */
.nav-links > a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease-out);
}

.nav-links > a:not(.btn):hover { color: var(--text-primary); }

.nav-links > a:not(.btn):hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- HERO ------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 20%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 500px;
  filter: blur(80px);
  border-radius: 50%;
}

.hero-glow--l {
  top: 5%;
  left: -5%;
  background: radial-gradient(ellipse, rgba(127, 119, 221, 0.18) 0%, transparent 70%);
}

.hero-glow--r {
  top: 10%;
  right: -5%;
  background: radial-gradient(ellipse, rgba(216, 90, 48, 0.06) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 80px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
  opacity: 0;
}

.hero-tag-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2.5s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.8vw, 5.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  opacity: 0;
}

.hero-title-top {
  display: block;
}

.hero-title em {
  display: block;
  font-style: normal;
  background: linear-gradient(135deg, var(--bordeaux), #c0bcf5, #9990e8, var(--bordeaux));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

/* Logo mobile dans le hero — caché sur desktop */
.hero-logo-mobile { display: none; }

.hero-subtitle {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 48px;
  line-height: 1.8;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
}

/* Stagger delays */
.hero-tag      { transition-delay: 0.08s; }
.hero-title    { transition-delay: 0.2s; }
.hero-subtitle { transition-delay: 0.32s; }
.hero-actions  { transition-delay: 0.44s; }
.hero-visual   { transition-delay: 0.3s; }

/* Hero visual column */
.hero-visual {
  position: relative;
  display: flex;
  will-change: transform;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.hv-svg {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 0 40px rgba(127, 119, 221, 0.10));
}

.hv-glow {
  position: absolute;
  inset: 10%;
  background: radial-gradient(ellipse at center, rgba(127, 119, 221, 0.06) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* ── Animations des pièces du cube SVG ── */
.piece-top,
.piece-left,
.piece-right {
  transform-box: fill-box;
  transform-origin: center;
}

/* Entrée : chaque pièce arrive de sa direction naturelle */
.piece-top {
  animation:
    pieceTopIn   0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both,
    pieceTopFloat 5.5s ease-in-out 1.9s infinite;
}
.piece-right {
  animation:
    pieceRightIn   0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both,
    pieceRightFloat 4.8s ease-in-out 2.1s infinite;
}
.piece-left {
  animation:
    pieceLeftIn   0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.3s both,
    pieceLeftFloat 6.2s ease-in-out 2.3s infinite;
}

@keyframes pieceTopIn {
  from { opacity: 0; transform: translateY(-22px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)     scale(1); }
}
@keyframes pieceLeftIn {
  from { opacity: 0; transform: translate(-20px, 12px) scale(0.92); }
  to   { opacity: 1; transform: translate(0, 0)        scale(1); }
}
@keyframes pieceRightIn {
  from { opacity: 0; transform: translate(20px, 12px) scale(0.92); }
  to   { opacity: 1; transform: translate(0, 0)       scale(1); }
}

/* Flottement continu — chaque pièce dérive indépendamment */
@keyframes pieceTopFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes pieceLeftFloat {
  0%, 100% { transform: translate(0, 0); }
  40%       { transform: translate(-4px, 3px); }
  80%       { transform: translate(-2px, -2px); }
}
@keyframes pieceRightFloat {
  0%, 100% { transform: translate(0, 0); }
  35%       { transform: translate(4px, 2px); }
  70%       { transform: translate(2px, -3px); }
}

/* ── Flottement des éléments décoratifs SVG ── */
.hv-svg g[class^="deco-float"] {
  transform-box: fill-box;
  transform-origin: center;
}

.deco-float-a { animation: decoFloatUp   6.4s ease-in-out infinite; }
.deco-float-b { animation: decoFloatDiag 8.2s ease-in-out infinite; animation-delay: -2.8s; }
.deco-float-c { animation: decoFloatDown 7.1s ease-in-out infinite; animation-delay: -5.1s; }
.deco-float-d { animation: decoFloatUp   9s   ease-in-out infinite; animation-delay: -1.4s; }

@keyframes decoFloatUp {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

@keyframes decoFloatDown {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(5px); }
}

@keyframes decoFloatDiag {
  0%, 100% { transform: translate(0px, 0px); }
  30%       { transform: translate(4px, -5px); }
  70%       { transform: translate(-3px, -3px); }
}

.hv-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  animation: fadeUp 0.6s var(--ease-out) both;
}

.hv-label--tl { top: 15%; left: 5%;   animation-delay: 0.9s; }
.hv-label--br { bottom: 15%; right: 5%; animation-delay: 1.15s; }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeUp 1s 1.2s both;
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ---------- TICKER ---------------------------------------- */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
  padding: 14px 0;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 32px;
  animation: ticker 40s linear infinite;
}

.ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ticker-sep {
  color: var(--bordeaux-light) !important;
}

/* ---------- SERVICES -------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 44px 36px;
  transition: border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  overflow: hidden;
  will-change: transform;
}

/* Gradient top line on hover */
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bordeaux-light), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

/* Glow wash on hover */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, var(--bordeaux-dim) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.service-card:hover {
  border-color: rgba(127, 119, 221, 0.4);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before,
.service-card:hover::after { opacity: 1; }

.service-card--featured {
  border-color: rgba(127, 119, 221, 0.3);
  background: linear-gradient(160deg, var(--bg-base) 0%, var(--bg-card) 55%);
}

.service-card--featured::before { opacity: 0.5; }

/* Card number */
.card-num {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.card-badge {
  display: inline-block;
  background: var(--bordeaux);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

/* Icon container */
.service-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bordeaux-dim);
  border: 1px solid rgba(127, 119, 221, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition);
}

.service-card:hover .service-icon-wrap {
  background: rgba(127, 119, 221, 0.2);
  border-color: rgba(127, 119, 221, 0.4);
  animation: iconPulse 1.8s ease-in-out infinite;
}

.service-icon {
  width: 28px;
  height: 28px;
  color: var(--cyan);
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.75;
}

.service-features {
  margin-bottom: 32px;
}

.service-features li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.service-features li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bordeaux-light);
  flex-shrink: 0;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.02em;
  transition: gap var(--transition), opacity var(--transition);
}

.service-link:hover {
  gap: 12px;
  text-shadow: 0 0 20px rgba(216, 90, 48, 0.4);
}

/* ---------- ABOUT ----------------------------------------- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.about-graphic {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graphic-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: spin linear infinite;
}

.graphic-ring--1 {
  width: 280px;
  height: 280px;
  border-color: rgba(127, 119, 221, 0.2);
  animation-duration: 22s;
}

/* Tick marks on outer ring */
.ring-tick {
  position: absolute;
  width: 6px;
  height: 1px;
  background: var(--bordeaux-light);
  border-radius: 1px;
}

.ring-tick--1 { top: -1px;   left: 50%; transform: translateX(-50%); }
.ring-tick--2 { bottom: -1px; left: 50%; transform: translateX(-50%); }
.ring-tick--3 { left: -1px;  top: 50%;  transform: translateY(-50%) rotate(90deg); }
.ring-tick--4 { right: -1px; top: 50%;  transform: translateY(-50%) rotate(90deg); }

.graphic-ring--2 {
  width: 200px;
  height: 200px;
  border-color: rgba(216, 90, 48, 0.15);
  animation-duration: 14s;
  animation-direction: reverse;
  border-style: dashed;
}

.graphic-ring--3 {
  width: 120px;
  height: 120px;
  border-color: rgba(127, 119, 221, 0.35);
  animation-duration: 8s;
}

/* Center dot */
.graphic-dot {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(216, 90, 48, 0.6), 0 0 60px rgba(216, 90, 48, 0.2);
  z-index: 2;
}

.graphic-dot-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(216, 90, 48, 0.3);
  animation: expandFade 2.5s ease-out infinite;
}

/* Orbiting dot on outer ring */
.graphic-orbit {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  animation: spin 22s linear infinite;
}

.orbit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bordeaux-light);
  box-shadow: 0 0 10px var(--bordeaux-glow);
  margin: -3.5px auto 0;
}

/* About text */
.about-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
  line-height: 1.85;
}

.about-stats {
  display: flex;
  gap: 0;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat {
  flex: 1;
  padding-right: 32px;
  border-right: 1px solid var(--border);
  margin-right: 32px;
}

.stat:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.stat-value {
  display: inline;
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-suffix {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--cyan);
  margin-left: 1px;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* ---------- PROJECTS -------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  will-change: transform;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Hue-matched ambient glow per card theme */
.project-card:has(.pv--blue):hover {
  box-shadow: 0 28px 64px rgba(0,0,0,0.5), 0 0 70px rgba(30, 100, 220, 0.08);
  border-color: rgba(77, 166, 255, 0.15);
}
.project-card:has(.pv--red):hover {
  box-shadow: 0 28px 64px rgba(0,0,0,0.5), 0 0 70px rgba(216, 90, 48, 0.12);
  border-color: rgba(216, 90, 48, 0.22);
}
.project-card:has(.pv--cyan):hover {
  box-shadow: 0 28px 64px rgba(0,0,0,0.5), 0 0 70px rgba(29, 158, 117, 0.10);
  border-color: rgba(29, 158, 117, 0.18);
}

.project-visual {
  position: relative;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Light sweep on hover */
.project-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 0;
}

.project-card:hover .project-visual::before { opacity: 1; }

.project-visual svg {
  width: 88px;
  height: 66px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 20px currentColor) opacity(0.7);
  transition: filter var(--transition), transform var(--transition);
}

.project-card:hover .project-visual svg {
  filter: drop-shadow(0 4px 28px currentColor) opacity(1);
  transform: scale(1.05);
}

.pv-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.78;
  z-index: 2;
}

.pv--blue {
  background: linear-gradient(145deg, #0b1929, #060e18);
  color: #4da6ff;
}

.pv--red {
  background: linear-gradient(145deg, #1f0e07, #110804);
  color: #D85A30;
}

.pv--cyan {
  background: linear-gradient(145deg, #061810, #030d08);
  color: #1D9E75;
}

.project-body { padding: 28px 32px 32px; }

.project-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bordeaux-light);
  margin-bottom: 12px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-meta span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ---------- CONTACT --------------------------------------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 100px;
  align-items: start;
}

.contact-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 40px;
  margin-top: 18px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.contact-item svg {
  width: 17px;
  height: 17px;
  color: var(--bordeaux-light);
  flex-shrink: 0;
}

/* ---------- FORM ------------------------------------------ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 36px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* Glow when any field inside is focused */
.contact-form:focus-within {
  border-color: rgba(127, 119, 221, 0.25);
  box-shadow: 0 0 0 1px rgba(127, 119, 221, 0.08),
              0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 13px 16px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  resize: none;
  -webkit-appearance: none;
}

.form-group select {
  cursor: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2344444e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group select option { background: var(--bg-elevated); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(127, 119, 221, 0.5);
  box-shadow: 0 0 0 3px rgba(127, 119, 221, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.captcha-wrap {
  display: flex;
  justify-content: center;
}

/* reCAPTCHA iframe background is forced by Google — we just frame it */
.captcha-wrap .g-recaptcha {
  border-radius: var(--radius-sm);
  overflow: hidden;
  outline: 1px solid var(--border);
  transition: outline-color var(--transition);
}

.captcha-wrap .g-recaptcha:focus-within {
  outline-color: rgba(127, 119, 221, 0.5);
}

.captcha-error {
  font-size: 0.8rem;
  color: var(--error);
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  margin-top: -6px;
}

.form-optional {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.form-success {
  font-size: 0.875rem;
  color: #1D9E75;
  text-align: center;
  padding: 14px;
  background: rgba(29, 158, 117, 0.08);
  border: 1px solid rgba(29, 158, 117, 0.25);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ---------- FOOTER ---------------------------------------- */
.footer {
  background: var(--bg-surface);
  position: relative;
}

.footer-top-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bordeaux), rgba(216, 90, 48, 0.4), var(--bordeaux), transparent);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 36px 40px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-brand .logo {
  font-size: 1rem;
  margin-bottom: 7px;
}

.footer-brand p {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 27px;
}

.footer-logo-link {
  display: block;
  line-height: 0;
}

.footer-logo-img {
  width: 210px;
  height: auto;
  opacity: 0.88;
  transition: opacity var(--transition);
}

.footer-logo-link:hover .footer-logo-img {
  opacity: 1;
}

.footer-nav {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--transition);
  letter-spacing: 0.02em;
}

.footer-nav a:hover { color: var(--text-primary); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-social-link:hover {
  color: var(--bordeaux-light);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ---------- COOKIE BANNER --------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 9990;
  width: calc(100% - 48px);
  max-width: 780px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(127, 119, 221, 0.08);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
  opacity: 0;
}

.cookie-banner::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--bordeaux), var(--cyan));
}

.cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cookie-banner.hiding {
  transform: translateX(-50%) translateY(120px);
  opacity: 0;
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  flex-wrap: wrap;
}

.cookie-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.cookie-text svg {
  flex-shrink: 0;
  color: var(--bordeaux-light);
}

.cookie-text p {
  font-size: 0.855rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.cookie-text a {
  color: var(--bordeaux-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.cookie-text a:hover { color: var(--text-primary); }

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cookie-banner { bottom: 16px; width: calc(100% - 32px); }
  .cookie-inner  { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- KEYFRAMES ------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(0.8); }
  50%       { opacity: 0.7; transform: scaleY(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--cyan); }
  50%       { opacity: 0.5; box-shadow: 0 0 14px var(--cyan); }
}

@keyframes expandFade {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.2); }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

@keyframes btnShimmer {
  0%, 50%, 100% { left: -80%; opacity: 0; }
  20%           { opacity: 1; }
  45%           { left: 150%; opacity: 0; }
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0   rgba(127, 119, 221, 0); }
  50%       { box-shadow: 0 0 28px rgba(127, 119, 221, 0.4); }
}

/* ---------- FAQ ------------------------------------------- */
.faq-grid {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.975rem;
  font-weight: 500;
  text-align: left;
  cursor: none;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--bordeaux-light);
}

.faq-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition), background var(--transition),
              transform var(--transition);
}

/* + icon via pseudo-elements */
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  border-radius: 1px;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}

.faq-icon::before {
  width: 10px; height: 1.5px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 1.5px; height: 10px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* Open state */
.faq-question[aria-expanded="true"] .faq-icon {
  border-color: rgba(127, 119, 221, 0.5);
  background: var(--bordeaux-dim);
  transform: rotate(45deg);
}

.faq-question[aria-expanded="true"] .faq-icon::before,
.faq-question[aria-expanded="true"] .faq-icon::after {
  background: var(--bordeaux-light);
}

.faq-question[aria-expanded="true"] {
  color: var(--bordeaux-light);
}

/* Answer panel */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-slow);
  overflow: hidden;
}

.faq-answer.open {
  grid-template-rows: 1fr;
}

.faq-answer > p {
  overflow: hidden;
  padding-bottom: 22px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.85;
  min-height: 0;
}

.faq-answer > p strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Bouton d'ouverture */
.faq-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.faq-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: none;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition);
}

.faq-toggle-btn:hover {
  background: var(--bordeaux-dim);
  border-color: rgba(127, 119, 221, 0.4);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(127, 119, 221, 0.12);
}

.faq-toggle-btn[aria-expanded="true"] {
  background: var(--bordeaux-dim);
  border-color: rgba(127, 119, 221, 0.4);
  color: var(--bordeaux-light);
}

.faq-toggle-arrow {
  transition: transform 0.35s var(--ease-out);
  flex-shrink: 0;
}

.faq-toggle-btn[aria-expanded="true"] .faq-toggle-arrow {
  transform: rotate(180deg);
}

/* Panneau collapsible */
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-slow);
}

.faq-body.open {
  grid-template-rows: 1fr;
}

.faq-body-inner {
  overflow: hidden;
  padding-top: 0;
  transition: padding-top var(--transition-slow);
}

.faq-body.open .faq-body-inner {
  padding-top: 48px;
}

/* CTA sous la FAQ */
.faq-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 52px;
  flex-wrap: wrap;
}

.faq-cta p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- ESTIMATEUR ------------------------------------ */
.estimateur-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.estimateur-controls {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.est-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.est-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.est-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.est-value {
  font-size: 0.78rem;
  color: var(--bordeaux-light);
  letter-spacing: 0.04em;
}

.est-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  margin-top: -4px;
}

/* Pills */
.est-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.est-pill {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-sans);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: none;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition);
}

.est-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.est-pill--active {
  background: var(--bordeaux-dim);
  border-color: rgba(127, 119, 221, 0.5);
  color: var(--bordeaux-light);
}

/* Slider */
.est-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: none;
  border: none;
  background: linear-gradient(
    to right,
    var(--bordeaux) 0%,
    var(--bordeaux) var(--fill, 25%),
    var(--bg-elevated) var(--fill, 25%),
    var(--bg-elevated) 100%
  );
}

.est-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bordeaux-light);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 14px var(--bordeaux-glow);
  cursor: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.est-slider::-webkit-slider-thumb:hover,
.est-slider:active::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 22px var(--bordeaux-glow);
}

.est-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bordeaux-light);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.est-slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.est-slider-ticks span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Stepper */
.est-stepper {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}

.est-step-btn {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  user-select: none;
}

.est-step-btn:hover {
  background: var(--bordeaux-dim);
  color: var(--text-primary);
}

.est-step-input {
  width: 64px;
  height: 44px;
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.est-step-input::-webkit-outer-spin-button,
.est-step-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Result card */
.estimateur-result {
  position: sticky;
  top: 100px;
  background: var(--bg-card);
  border: 1px solid rgba(127, 119, 221, 0.3);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  text-align: center;
  overflow: hidden;
}

.estimateur-result::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bordeaux-light), transparent);
}

.estimateur-result::after {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: radial-gradient(ellipse, rgba(127, 119, 221, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.est-result-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.est-price-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.est-currency {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--text-muted);
  line-height: 1;
}

.est-price-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  min-width: 2ch;
  display: inline-block;
}

.est-price-sep {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1;
}

.est-price-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.est-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 26px;
  margin-bottom: 24px;
}

.est-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--teal);
  background: rgba(29, 158, 117, 0.1);
  border: 1px solid rgba(29, 158, 117, 0.2);
  padding: 4px 10px;
  border-radius: 100px;
}

.est-result-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

.est-disclaimer {
  margin-top: 16px;
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------- FIL DE PROGRESSION ---------------------------- */
.devis-track {
  display: flex;
  align-items: flex-start;
  padding: 0 0 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 72px;
}

.devis-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  position: relative;
}

.ds-connector {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(127, 119, 221, 0.35), rgba(127, 119, 221, 0.1));
  margin-top: 22px;
  flex-shrink: 1;
  min-width: 16px;
}

.ds-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bordeaux-dim);
  border: 1px solid rgba(127, 119, 221, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bordeaux-light);
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition);
}

.ds-icon svg {
  width: 18px;
  height: 18px;
}

.devis-step:hover .ds-icon {
  background: rgba(127, 119, 221, 0.2);
  border-color: rgba(127, 119, 221, 0.5);
  box-shadow: 0 0 20px var(--bordeaux-glow);
}

.ds-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ds-num {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--bordeaux-light);
}

.ds-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ds-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 110px;
}

/* ---------- RESPONSIVE ------------------------------------ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual  { display: none; }
  .hero-subtitle { max-width: 600px; }
}

@media (max-width: 900px) {
  .container { padding: 0 28px; }
  .section   { padding: 100px 0; }
  .about-inner   { grid-template-columns: 1fr; gap: 60px; }
  .about-visual  { order: -1; }
  .contact-inner { grid-template-columns: 1fr; gap: 60px; }
  .contact-form  { padding: 32px 28px; }
  .footer-inner  { padding: 32px 28px; }

  .estimateur-wrap   { grid-template-columns: 1fr; }
  .estimateur-result { position: static; }

  .devis-track  { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-bottom: 40px; margin-bottom: 56px; }
  .ds-connector { display: none; }
}

@media (max-width: 640px) {
  body { cursor: auto; }
  .cursor-ring, .cursor-dot { display: none; }

  /* Navbar fixe sur mobile — backdrop-filter retiré car il créait un
     containing block qui cassait l'overlay du menu */
  .navbar,
  .navbar.scrolled {
    position: fixed;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(16, 14, 30, 0.99);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    /* Force GPU compositing — prevents iOS Safari from hiding fixed
       navbar when the URL bar collapses during scroll */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* With transform on parent, position:fixed children are relative to
     the navbar box (which is itself fixed at top:0, full width).
     Use absolute + height:100dvh to cover the full visual viewport. */
  .nav-links {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100dvh;
    background: rgba(24, 22, 44, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    z-index: 199;
  }

  .nav-links.open { display: flex; }

  .nav-links > a:not(.btn) {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
  }

  .logo {
    position: relative;
    z-index: 202;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 201;
    cursor: auto;
  }

  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .container { padding: 0 20px; }
  .section   { padding: 64px 0; }

  /* Hero */
  .hero         { align-items: flex-start; min-height: 0; }
  .hero-content { padding-top: 80px; padding-bottom: 48px; }
  .hero-logo-mobile { display: block; width: 44px; height: 44px; margin-bottom: 20px; }
  .hero-scroll-hint { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Ticker — masqué sur mobile */
  .ticker { display: none; }

  /* Services / Projets */
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-visual  { display: none; }
  .project-meta  { display: none; }

  /* Matériaux — barres masquées, 2 colonnes compactes */
  .mat-grid  { grid-template-columns: repeat(2, 1fr); }
  .mat-props { display: none; }
  .mat-usecase { border-top: none; padding-top: 0; }

  /* Formulaire */
  .form-row { grid-template-columns: 1fr; }
  .estimateur-controls { padding: 28px 20px; }

  /* Parcours devis — masqué sur mobile */
  .devis-track { display: none; }

  /* À propos */
  .about-stats { flex-direction: column; gap: 28px; }
  .stat { border-right: none; padding-right: 0; margin-right: 0; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; padding-bottom: 0; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav   { justify-content: center; }
  .footer-brand p { padding-left: 0; }
  .footer-logo-img { width: 170px; }
  .footer-right { align-items: center; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 2.8rem; }
}

/* ---------- POURQUOI HELBY -------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bordeaux-light), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.why-card:hover {
  border-color: rgba(127, 119, 221, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.why-card:hover::before { opacity: 1; }

.why-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bordeaux-dim);
  border: 1px solid rgba(127, 119, 221, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--bordeaux-light);
  transition: background var(--transition), border-color var(--transition);
}

.why-card:hover .why-icon-wrap {
  background: rgba(127, 119, 221, 0.2);
  border-color: rgba(127, 119, 221, 0.4);
}

.why-icon-wrap svg { width: 22px; height: 22px; }

.why-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.why-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

@media (max-width: 900px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- MATÉRIAUX ------------------------------------- */
.mat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.mat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
}

.mat-card:hover {
  border-color: rgba(127, 119, 221, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.mat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.mat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mat-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mat-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: auto;
  letter-spacing: 0.06em;
}

.mat-badge-sm {
  width: 100%;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bordeaux-light);
}

.mat-props {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

.mat-props li {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mat-prop-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.mat-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.mat-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s var(--ease-out);
}

.mat-fill--pla  { background: #7F77DD; }
.mat-fill--petg { background: #D85A30; }
.mat-fill--asa  { background: #1D9E75; }
.mat-fill--tpu  { background: #378ADD; }

.mat-prop-val {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.mat-usecase {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.mat-usecase strong { color: var(--text-primary); font-weight: 500; }

@media (max-width: 1024px) {
  .mat-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- FILE UPLOAD ----------------------------------- */
.file-drop {
  display: block;
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 20px;
  cursor: none;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.file-drop:hover,
.file-drop:focus-within,
.file-drop.drag-over {
  border-color: rgba(127, 119, 221, 0.5);
  background: var(--bordeaux-dim);
}

.file-drop input[type="file"] {
  display: none;
}

.file-idle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

.file-idle em {
  font-style: normal;
  color: var(--bordeaux-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-size: 0.875rem;
  pointer-events: none;
}

.file-selected svg { flex-shrink: 0; }

#file-name-display {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.file-clear-btn {
  pointer-events: all;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}

.file-clear-btn:hover {
  background: rgba(200, 40, 60, 0.18);
  color: var(--error);
}

/* ---------- BACK TO TOP ----------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  z-index: 100;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out),
              background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--bordeaux-dim);
  border-color: rgba(127, 119, 221, 0.4);
  color: var(--bordeaux-light);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(127,119,221,0.15);
}

@media (max-width: 640px) {
  .back-to-top { bottom: 20px; right: 20px; cursor: auto; }
}

/* Curseurs mobiles — restore pointer là où cursor: none est hérité de body */
@media (max-width: 640px) {
  .btn, button, .est-pill, .file-drop,
  .faq-question, .faq-toggle-btn, .back-to-top,
  .nav-toggle { cursor: pointer; }
  input[type="range"] { cursor: pointer; }
  input, textarea { cursor: text; }
  select { cursor: pointer; }
}

/* ---------- PRINT --------------------------------------- */
@media print {
  #scroll-progress, .cursor-ring, .cursor-dot,
  .navbar, .cookie-banner, .back-to-top,
  #page-veil, .ticker, .hero-scroll-hint { display: none !important; }

  body {
    background: #fff !important;
    color: #111 !important;
    cursor: auto !important;
    font-size: 12pt;
  }

  .hero, .section, .section--dark, .footer {
    background: #fff !important;
    padding: 24pt 0;
  }

  .container { max-width: 100%; padding: 0 16pt; }

  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }

  .service-card, .project-card, .why-card, .mat-card,
  .contact-form, .estimateur-result {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}

