/* ===================================================
   Reverdy Automation — style.css (v4)
   Direction : premium sombre / tech. Aurora animée,
   verre dépoli, micro-interactions, parcours en une page.
   =================================================== */

:root {
  --bg: #12161F;
  --bg-soft: #171C27;
  --surface: #1E2530;
  --surface-2: #262E3C;
  --border: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.26);

  --ink: #FAFBFE;
  --ink-soft: #B7C0D1;
  --ink-faint: #8892A6;

  --signal: #4C8DFF;
  --signal-dark: #2F6FED;
  --signal-bright: #7CB2FF;
  --signal-glow: rgba(76,141,255,0.35);
  --accent-2: #7C6CFF;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max-width: 1160px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 2.9vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.04rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--signal-bright); text-decoration: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-bright);
  display: block;
  margin-bottom: 1.1em;
}

/* ---------- Background FX ---------- */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora {
  position: absolute;
  width: 60vw; height: 60vw;
  max-width: 900px; max-height: 900px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
}
.aurora-a {
  top: -20%; left: -10%;
  background: radial-gradient(circle, var(--signal-glow) 0%, transparent 70%);
  animation: drift-a 26s ease-in-out infinite;
}
.aurora-b {
  top: 10%; right: -15%;
  background: radial-gradient(circle, rgba(124,108,255,0.3) 0%, transparent 70%);
  animation: drift-b 32s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 10%) scale(1.12); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8%, 6%) scale(1.08); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 75%);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18,22,31,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled { background: rgba(18,22,31,0.92); border-bottom-color: var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo-text { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); white-space: nowrap; }
.logo-text span { color: var(--signal-bright); }

.main-nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.main-nav a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; position: relative; transition: color 0.15s ease; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
  background: var(--signal-bright); transition: right 0.25s var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.nav-cta:hover { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal-glow), 0 8px 24px -8px var(--signal-glow); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--ink-soft); margin: 0 auto; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Ticker ---------- */
.ticker-wrap {
  background: var(--bg-soft);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 1;
}
.ticker { display: inline-flex; animation: ticker-scroll 32s linear infinite; padding: 9px 0; }
.ticker span {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
  padding: 0 28px;
  border-right: 1px solid var(--border);
}
.ticker span b { color: var(--ink); font-weight: 500; }
.ticker .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal-glow); flex: none; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero p.lead { font-size: 1.1rem; max-width: 560px; }
.cta-row { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.trust-row { margin-top: 22px; font-size: 0.82rem; color: var(--ink-faint); font-family: var(--font-mono); }
.trust-row .sep { margin: 0 10px; opacity: 0.5; }

.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.94rem; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--signal-bright), var(--signal-dark)); color: #10131A; box-shadow: 0 12px 30px -12px var(--signal-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px var(--signal-glow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--signal-bright); color: var(--signal-bright); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* Hero visual: live feed card */
.hero-visual { display: flex; justify-content: center; }
.feed-card {
  width: 100%; max-width: 380px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.feed-card-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4CE38B; box-shadow: 0 0 8px rgba(76,227,139,0.6); animation: pulse-dot 1.8s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feed-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  opacity: 0; transform: translateY(10px);
  animation: feed-in 6.4s var(--ease) infinite;
  animation-delay: var(--d);
}
.feed-ic {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(76,141,255,0.12); color: var(--signal-bright); font-size: 0.85rem;
}
.feed-list strong { display: block; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.feed-list small { font-size: 0.76rem; color: var(--ink-faint); }
@keyframes feed-in {
  0% { opacity: 0; transform: translateY(10px); }
  8%, 78% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* ---------- Stats ---------- */
.stats { padding: 20px 0 88px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stat-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3rem);
  background: linear-gradient(135deg, var(--signal-bright), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.stat-tile p { font-size: 0.92rem; margin: 0; color: var(--ink-soft); }
.stat-tile-text { display: flex; align-items: center; background: var(--surface-2); }
.stat-quote { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); line-height: 1.4; margin: 0; }

/* ---------- Sections générales ---------- */
section { padding: 88px 0; position: relative; z-index: 1; }
.section-inset { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head p { margin-top: 6px; }

/* ---------- Offre : cartes ---------- */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.process-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}
.process-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76,141,255,0.4);
  box-shadow: 0 20px 40px -24px var(--signal-glow);
}
.process-card .idx {
  display: inline-block;
  font-family: var(--font-mono); color: var(--signal-bright); font-size: 0.8rem;
  margin-bottom: 14px;
}
.process-card h3 { margin-bottom: 8px; font-size: 1rem; }
.process-card p { font-size: 0.9rem; margin: 0; }
.process-card-ghost {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
  display: flex; flex-direction: column; justify-content: center;
}
.process-card-ghost a { font-weight: 600; font-size: 0.9rem; margin-top: 4px; }

/* ---------- Timeline horizontale (méthode) ---------- */
.timeline { position: relative; padding-top: 8px; }
.timeline-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.tl-line { position: absolute; top: 15px; left: 0; right: 0; height: 1px; background: var(--border-strong); z-index: 0; overflow: hidden; }
.tl-line-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--signal), var(--accent-2)); transition: width 1.6s var(--ease); }
.in-view .tl-line-fill { width: 100%; }
.js .tl-step { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transition-delay: calc(var(--i) * 0.12s); }
.tl-step { position: relative; z-index: 1; }
.in-view .tl-step { opacity: 1; transform: translateY(0); }
.tl-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--signal);
  color: var(--signal-bright);
  font-family: var(--font-mono); font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 0 4px var(--bg-soft);
}
.tl-step h3 { font-size: 0.95rem; }
.tl-step p { font-size: 0.86rem; }

/* ---------- Bloc asymétrique "pourquoi" ---------- */
.why-block { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.why-statement { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--ink); font-weight: 600; }
.why-list { display: flex; flex-direction: column; gap: 22px; }
.why-item { padding-left: 18px; border-left: 2px solid var(--signal); transition: border-color 0.2s ease; }
.why-item:hover { border-color: var(--signal-bright); }
.why-item h3 { font-size: 0.98rem; margin-bottom: 4px; }
.why-item p { font-size: 0.92rem; margin: 0; }

.devis-note {
  margin-top: 44px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.devis-note strong { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; transition: border-color 0.2s ease; }
.faq-item.open, .faq-item:hover { border-color: var(--border-strong); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 18px 20px; font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; color: var(--ink);
}
.faq-plus { position: relative; width: 16px; height: 16px; flex: none; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; background: var(--signal-bright); border-radius: 2px; transition: transform 0.25s ease; }
.faq-plus::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq-plus::after { left: 50%; top: 0; height: 100%; width: 1.5px; transform: translateX(-50%); }
.faq-item.open .faq-plus::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
.faq-a p { padding: 0 20px 18px; margin: 0; font-size: 0.92rem; }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; position: relative; overflow: hidden; }
.cta-final::before {
  content: "";
  position: absolute; top: -220px; left: 50%; width: 720px; height: 720px;
  background: radial-gradient(circle, var(--signal-glow) 0%, transparent 65%);
  transform: translateX(-50%);
  animation: pulse-glow 5s ease-in-out infinite;
}
@keyframes pulse-glow { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
.cta-final .container { position: relative; z-index: 1; }
.cta-final h2 { margin-bottom: 14px; max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-final p { color: var(--ink-soft); max-width: 520px; margin: 0 auto 32px; }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 36px; border-top: 1px solid var(--border); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-soft); font-size: 0.88rem; }
.footer-nav a:hover { color: var(--ink); }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 0.82rem; color: var(--ink-faint); }
.footer-meta a { color: var(--ink-faint); }
.footer-meta a:hover { color: var(--ink); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--ink); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--signal-bright); color: var(--signal-bright); }

/* ---------- Fade-in au scroll (scoped to .js : le contenu reste visible sans JS) ---------- */
.js .fade-up { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .fade-up.in-view { opacity: 1; transform: translateY(0); }
.hero-copy .fade-up:nth-child(1) { transition-delay: 0s; }
.hero-copy .fade-up:nth-child(2) { transition-delay: 0.08s; }
.hero-copy .fade-up:nth-child(3) { transition-delay: 0.16s; }
.hero-copy .fade-up:nth-child(4) { transition-delay: 0.24s; }
.hero-copy .fade-up:nth-child(5) { transition-delay: 0.32s; }
.process-grid .process-card:nth-child(1) { transition-delay: 0s; }
.process-grid .process-card:nth-child(2) { transition-delay: 0.06s; }
.process-grid .process-card:nth-child(3) { transition-delay: 0.12s; }
.process-grid .process-card:nth-child(4) { transition-delay: 0.18s; }
.process-grid .process-card:nth-child(5) { transition-delay: 0.24s; }
.process-grid .process-card:nth-child(6) { transition-delay: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-tile-text { grid-column: span 2; }
}
@media (max-width: 860px) {
  .timeline-track { grid-template-columns: 1fr; gap: 26px; }
  .tl-line { display: none; }
  .why-block { grid-template-columns: 1fr; }
  .main-nav { position: fixed; top: 68px; left: 0; right: 0; background: rgba(18,22,31,0.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
  .main-nav.open { max-height: 320px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 18px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .nav-cta { padding: 8px 14px; font-size: 0.8rem; }
}
@media (max-width: 640px) {
  .process-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-tile-text { grid-column: span 1; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
}

/* ---------- Accessibilité : réduction du mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora, .ticker, .feed-list li, .cta-final::before, .live-dot { animation: none !important; }
  .fade-up, .tl-step, .tl-line-fill { transition: none !important; opacity: 1 !important; transform: none !important; }
}
