/* ============================================================
   ZCARS33 — style.css
   Dark tech / futuriste sobre. Vanilla CSS, no framework.
   ============================================================ */

:root {
  --bg-black: #08090b;
  --bg-anthracite: #16181d;
  --bg-card: rgba(255, 255, 255, 0.05);
  --border-card: rgba(255, 255, 255, 0.09);
  --red: #ff2b3d;
  --red-dim: #c21f2d;
  --red-glow: rgba(255, 43, 61, 0.55);
  --text-primary: #f4f5f7;
  --text-secondary: #a8adb8;
  --text-muted: #6c7280;
  --whatsapp: #25d366;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-heading: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --max-width: 1180px;
  --header-h: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--bg-black) 0%, var(--bg-anthracite) 45%, var(--bg-black) 100%);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dim) 100%);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-glow {
  box-shadow: 0 0 0 rgba(255, 43, 61, 0);
  animation: pulse-glow 2.6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 18px rgba(255, 43, 61, 0.35), 0 0 0 rgba(255,43,61,0); }
  50% { box-shadow: 0 4px 28px rgba(255, 43, 61, 0.6), 0 0 22px rgba(255,43,61,0.25); }
}

.btn-secondary {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.4);
  color: #3ee87f;
}

.btn-secondary:hover {
  background: rgba(37, 211, 102, 0.2);
  transform: translateY(-2px);
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--red);
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 43, 61, 0.4);
  color: var(--text-primary);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-call:hover {
  background: rgba(255, 43, 61, 0.12);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg picture,
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,9,11,0.35) 0%, rgba(8,9,11,0.55) 45%, rgba(8,9,11,0.96) 100%),
    linear-gradient(90deg, rgba(8,9,11,0.75) 0%, rgba(8,9,11,0.15) 55%);
}

.hero-gradient-anim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 110%, rgba(255,43,61,0.28) 0%, transparent 55%),
              radial-gradient(ellipse at 90% 0%, rgba(255,43,61,0.14) 0%, transparent 50%);
  mix-blend-mode: screen;
  animation: drift 12s ease-in-out infinite alternate;
}

@keyframes drift {
  0% { opacity: 0.6; transform: translate3d(0,0,0) scale(1); }
  100% { opacity: 1; transform: translate3d(1%, -1%, 0) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 4.5rem;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  max-width: 16ch;
  margin-bottom: 1.1rem;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================================
   Sections (generic)
   ============================================================ */

.section {
  padding: 5.5rem 0;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-eyebrow {
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.4rem);
  margin-bottom: 1rem;
  max-width: 24ch;
}

.section-lead {
  color: var(--text-secondary);
  max-width: 60ch;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Services grid
   ============================================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.15s ease, border-color 0.25s ease, background 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.service-card:hover {
  border-color: rgba(255, 43, 61, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 43, 61, 0.12);
  color: var(--red);
  margin-bottom: 1.1rem;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.badge {
  display: inline-block;
  background: rgba(37, 211, 102, 0.15);
  color: #3ee87f;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* ============================================================
   Gallery ("Nos interventions")
   ============================================================ */

.gallery-scroll {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding: 0.5rem 1.25rem 1.25rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--red-dim) transparent;
}

.gallery-scroll::-webkit-scrollbar {
  height: 8px;
}
.gallery-scroll::-webkit-scrollbar-thumb {
  background: var(--red-dim);
  border-radius: 999px;
}

.gallery-item {
  position: relative;
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  background: var(--bg-anthracite);
}

.gallery-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.75rem 0.9rem 0.85rem;
  font-size: 0.83rem;
  color: var(--text-primary);
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
}

/* ============================================================
   Split sections (Achat / Epave)
   ============================================================ */

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.split-reverse .split-media {
  order: 2;
}
.split-reverse .split-text {
  order: 1;
}

.split-media img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
}

.split-text h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.split-text p {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  font-size: 1.02rem;
}

/* ============================================================
   Devis calculator
   ============================================================ */

.glass {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
}

.devis-card {
  padding: 2rem;
  max-width: 720px;
}

.devis-card label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  font-size: 0.94rem;
}

.devis-input-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#devis-adresse {
  flex: 1 1 260px;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#devis-adresse::placeholder {
  color: var(--text-muted);
}

#devis-adresse:focus {
  border-color: var(--red);
}

.devis-result {
  margin-top: 1.5rem;
}

.devis-result:empty {
  display: none;
}

.devis-result-box {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.03);
  animation: fade-in 0.4s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.devis-result-box p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.devis-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.35rem;
}

.devis-result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.devis-loading {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   Zones desservies
   ============================================================ */

.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
}

.zone-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.zone-item p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 3.5rem 0 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  color: var(--text-secondary);
  margin: 0.75rem 0 1rem;
  font-size: 0.92rem;
  max-width: 32ch;
}

.footer-phone,
.footer-email {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.footer-phone {
  color: var(--red);
}

.footer-zones h4,
.footer-legal a {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.footer-zones p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-legal a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.footer-copy {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 3rem;
}

/* ============================================================
   Mobile sticky CTA bar
   ============================================================ */

.mobile-sticky-bar {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: 78px;
  }

  .mobile-sticky-bar {
    display: flex;
    gap: 0.6rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    padding: 0.7rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom));
    background: rgba(8, 9, 11, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .mobile-sticky-bar .btn {
    flex: 1;
    padding: 0.85rem 1rem;
  }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .split-section {
    grid-template-columns: 1fr;
  }
  .split-reverse .split-media,
  .split-reverse .split-text {
    order: initial;
  }
  .split-media img {
    max-height: 380px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}

@media (max-width: 560px) {
  .header-call span {
    display: none;
  }
  .hero {
    min-height: 88vh;
  }
  .devis-card {
    padding: 1.5rem;
  }
  .section {
    padding: 4rem 0;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .service-card.tilt {
    transform: none !important;
  }
}
