/* ============================================================
   MÉCA 3D — direction "Plan Directeur"
   Bureau d'études mécanique : esthétique plan technique / bleu
   ============================================================ */

:root {
  --paper: #f5f2ea;
  --paper-dim: #eee9dc;
  --ink: #16202b;
  --ink-soft: #3c4a58;
  --blue-deep: #0c3455;
  --blue-deep-2: #0a2a45;
  --blue-line: #2e86ab;
  --blue-pale: #dbe7ee;
  --amber: #e2790f;
  --amber-ink: #7a3e05;
  --line-grey: #8a96a3;
  --border: rgba(12, 52, 85, 0.16);
  --shadow: 0 20px 45px rgba(12, 42, 69, 0.14);
  --radius-lg: 22px;
  --radius-md: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
  --header-h: 84px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--blue-deep-2); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

section[id] { scroll-margin-top: var(--header-h); }

/* Blueprint grid background wash, used on several sections */
.blueprint-wash {
  background-image:
    linear-gradient(rgba(12, 52, 85, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 52, 85, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* Reveal-on-scroll, gated so content is visible without JS */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transition: none; opacity: 1; transform: none; }
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(245, 242, 234, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 46px; height: 46px; flex-shrink: 0; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; color: var(--blue-deep-2); line-height: 1.1; white-space: nowrap; }
.brand-word small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { text-decoration: none; font-size: 0.94rem; font-weight: 500; color: var(--ink-soft); white-space: nowrap; position: relative; }
.main-nav a:hover { color: var(--blue-deep-2); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 4px; font-family: var(--font-mono); font-size: 0.78rem; }
.lang-switch a { padding: 3px 7px; border-radius: 6px; text-decoration: none; color: var(--ink-soft); border: 1px solid transparent; }
.lang-switch a[aria-current="true"] { background: var(--blue-deep); color: var(--paper); }
.lang-switch a:not([aria-current="true"]):hover { border-color: var(--border); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: #25d366; color: #05320f; }
.btn-primary:hover { background: #1fb956; }
.btn-outline { border-color: var(--blue-deep); color: var(--blue-deep-2); background: transparent; }
.btn-outline:hover { background: var(--blue-pale); }
.btn-ghost { color: var(--blue-deep-2); font-size: 0.9rem; }
.header-actions .btn-primary .short { display: none; }

.burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  align-items: center; justify-content: center;
}
.burger span, .burger::before, .burger::after { content: ""; display: block; width: 20px; height: 2px; background: var(--blue-deep-2); position: relative; }
.burger { flex-direction: column; gap: 5px; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 56px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-line);
  background: var(--blue-pale);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.1; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--blue-line); }
.hero-sub { font-size: 1.07rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-reassurance { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rating-badge {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  font-size: 0.88rem; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px;
}
.rating-badge .stars { color: var(--amber); letter-spacing: 1px; font-size: 0.95rem; }
.hero-reassurance .micro { font-size: 0.85rem; color: var(--ink-soft); }

.hero-visual { position: relative; width: 100%; aspect-ratio: 1/1; max-width: 480px; margin-inline: auto; }
.scene-stage {
  position: relative;
  width: 100%; height: 100%;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-deep-2) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.scene-stage::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; display: flex; align-items: center; justify-content: center; padding: 12%; }
.scene.is-active { opacity: 1; }
.scene svg { width: 100%; height: 100%; overflow: visible; }
.scene-chip {
  position: absolute; left: 20px; bottom: 20px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: #cfe3ee; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 5px 11px; border-radius: 999px;
  transition: opacity .3s ease;
}
.scene-dots { position: absolute; right: 20px; bottom: 20px; display: flex; gap: 8px; }
.scene-dots button { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.5); background: transparent; padding: 0; }
.scene-dots button.is-active { background: var(--amber); border-color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  .scene { transition: opacity 3s ease; }
}

/* ---------------- Section heads ---------------- */
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); font-size: 1.02rem; }
.section { padding: 84px 0; }
.section-alt { background: var(--paper-dim); }

/* ---------------- Prestations ---------------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card .badge {
  position: absolute; top: -12px; left: 22px;
  background: var(--amber); color: #fff;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.service-icon { width: 52px; height: 52px; margin-bottom: 16px; color: var(--blue-line); }
.service-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------------- Bandeau clients ---------------- */
.clients-band { padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.clients-band .container { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.clients-band .label { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue-line); }
.clients-list { display: flex; flex-wrap: wrap; gap: 12px; }
.client-chip { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; color: var(--blue-deep-2); background: var(--blue-pale); padding: 8px 16px; border-radius: 999px; }
.client-chip svg { width: 18px; height: 18px; }

/* ---------------- Avis ---------------- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-bottom: 30px; }
.review-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; }
.review-stars { color: var(--amber); font-size: 1rem; letter-spacing: 2px; margin-bottom: 12px; }
.review-text { font-size: 1rem; color: var(--ink); margin-bottom: 18px; }
.review-text::before { content: "\201C"; }
.review-text::after { content: "\201D"; }
.review-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--ink-soft); }
.review-meta .g-mark { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.reviews-cta { text-align: center; }

/* ---------------- Pourquoi nous ---------------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.why-item { display: flex; gap: 16px; }
.why-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--blue-line); border: 1.5px solid var(--blue-line); border-radius: 50%; width: 34px; height: 34px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.why-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.why-item p { color: var(--ink-soft); font-size: 0.93rem; }

/* ---------------- Zone d'intervention ---------------- */
.zone-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.zone-map { position: relative; }
.zone-map svg { width: 100%; height: auto; }
.zone-list { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.zone-list li { display: flex; align-items: center; gap: 10px; font-size: 0.96rem; }
.zone-list svg { width: 18px; height: 18px; color: var(--blue-line); flex-shrink: 0; }

/* ---------------- Contact ---------------- */
.contact-section { background: var(--blue-deep-2); color: var(--paper); position: relative; overflow: hidden; }
.contact-section::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
.contact-section h2, .contact-section .eyebrow { color: var(--paper); }
.contact-section .eyebrow { background: rgba(255,255,255,0.1); color: #bcd6e6; }
.contact-section .section-head p { color: #c3d3dd; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; position: relative; z-index: 1; }
.contact-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-lg); padding: 32px; }
.contact-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.contact-row:last-child { border-bottom: none; }
.contact-row svg { width: 22px; height: 22px; color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.contact-row a { text-decoration: none; color: var(--paper); font-weight: 600; }
.contact-row .label { display: block; font-size: 0.8rem; color: #9db8c8; margin-bottom: 3px; }
.hours-table { width: 100%; font-size: 0.94rem; }
.hours-table td { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.hours-table td:last-child { text-align: right; font-family: var(--font-mono); color: #cfe3ee; }
.contact-cta-block { display: flex; flex-direction: column; gap: 16px; }
.contact-cta-block .btn { justify-content: center; width: 100%; padding: 15px 20px; font-size: 1rem; }

/* ---------------- Footer ---------------- */
.site-footer { padding: 36px 0; background: var(--ink); color: #b8c3cc; font-size: 0.85rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: #b8c3cc; }
.footer-links a:hover { color: #fff; }

/* ---------------- Floating WhatsApp ---------------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  background: #25d366; color: #05320f;
  padding: 13px 18px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 0.92rem;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}
.wa-float svg { width: 22px; height: 22px; }

/* ---------------- Mobile ---------------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 340px; }
  .zone-wrap { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-actions { gap: 8px; }
  .header-actions > a.btn-outline { display: none; }
  .header-actions .btn-primary { padding: 11px 14px; }
  .header-actions .btn-primary .long { display: none; }
  .header-actions .btn-primary .short { display: block; }
  .brand-word small { display: none; }
  .site-header.nav-open .main-nav {
    display: flex; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); flex-direction: column; align-items: flex-start;
    padding: 18px 6%; border-bottom: 1px solid var(--border); gap: 16px;
  }
  .clients-band .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
}
@media (min-width: 761px) {
  .nav-tel-only { display: none; }
}

/* ---------------- Scene animations (hero + service icons) ---------------- */
@keyframes spin-cw { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }
@keyframes dash-flow { to { stroke-dashoffset: -40; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse-ring { 0%, 100% { r: 30; opacity: .55; } 50% { r: 36; opacity: .15; } }
@keyframes belt-move { to { stroke-dashoffset: -48; } }
@keyframes sweep-x { 0% { transform: translateX(-14px); } 50% { transform: translateX(14px); } 100% { transform: translateX(-14px); } }
@keyframes fade-blueprint { 0%, 40% { opacity: 1; } 50%, 90% { opacity: 0; } 100% { opacity: 1; } }

.scene .gear-cw { transform-origin: center; animation: spin-cw 9s linear infinite; }
.scene .gear-ccw { transform-origin: center; animation: spin-ccw 7s linear infinite; }
.scene .dash-line { stroke-dasharray: 6 6; animation: dash-flow 2.4s linear infinite; }
.scene .float-part { animation: float-y 3.6s ease-in-out infinite; }
.scene .pulse { animation: pulse-ring 2.6s ease-in-out infinite; }
.scene .belt-dash { stroke-dasharray: 10 6; animation: belt-move 1.4s linear infinite; }
.scene .sweep { animation: sweep-x 4s ease-in-out infinite; }
.scene .blueprint-flicker { animation: fade-blueprint 4.5s ease-in-out infinite; }

.scene:not(.is-active) * { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .scene .gear-cw, .scene .gear-ccw, .scene .dash-line, .scene .float-part,
  .scene .pulse, .scene .belt-dash, .scene .sweep, .scene .blueprint-flicker {
    animation: none;
  }
}

/* service icon micro-animations, only while visible */
.service-card:hover .service-icon .gear-cw { animation: spin-cw 6s linear infinite; }
.service-card:hover .service-icon .gear-ccw { animation: spin-ccw 5s linear infinite; }

