:root {
  --color-bg: #f7f7f8;
  --color-surface: #ffffff;
  --color-text: #14161a;
  --color-text-muted: #5b6068;
  --color-border: #e4e6ea;

  --color-navy: #000000;
  --color-navy-alt: #161616;
  --color-navy-text: #f2f2f2;
  --color-navy-muted: #a3a3a3;

  --color-metal: #c9cdd3;
  --color-accent: #c4172a;
  --color-accent-dark: #9c1220;

  --font-heading: 'Oswald', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-base: 0.3s ease;
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition-base), background var(--transition-base), border-color var(--transition-base);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

#hero .btn-secondary,
#site-footer .btn-secondary {
  border-color: var(--color-navy-muted);
  color: var(--color-navy-text);
}

#hero .btn-secondary:hover,
#site-footer .btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-navy-text);
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
  color: var(--color-navy-text);
  transition: padding var(--transition-base), box-shadow var(--transition-base);
}

#site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-bar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#lang-toggle {
  background: none;
  border: 1px solid var(--color-metal);
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: transform var(--transition-base);
}

.btn-whatsapp img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-whatsapp:hover {
  transform: scale(1.08);
}

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  background: var(--color-navy);
  color: var(--color-navy-text);
}

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

.hero-bg-zoom {
  position: absolute;
  inset: -5%;
  background: url('images/shop/bmw-hero.jpg') center 65% / cover no-repeat;
  animation: hero-bg-zoom 20s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65));
}

@keyframes hero-bg-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 0.3em;
  opacity: 0;
  animation: hero-fade-up 0.8s ease-out 0.6s forwards;
}

.hero-tagline {
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: hero-fade-up 0.8s ease-out 0.9s forwards;
}

.hero-subtitle {
  max-width: 560px;
  margin: 0.5em auto 1.5em;
  color: var(--color-navy-muted);
  opacity: 0;
  animation: hero-fade-up 0.8s ease-out 1.1s forwards;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  animation: hero-fade-up 0.8s ease-out 1.3s forwards;
}

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

#site-header.is-scrolled .nav-inner {
  padding: 0.6rem 1.5rem;
}

.nav-links a.is-active::after {
  width: 100%;
}

.section-subtitle {
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
}

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

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(20, 22, 26, 0.06);
  transition: transform 0.15s ease, border-color var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--color-accent);
}

.service-card h3 {
  font-size: 1.15rem;
  color: var(--color-navy);
}

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

.service-card-image,
.about-image {
  border-radius: 10px;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
}

.service-card-image {
  aspect-ratio: 16 / 10;
  margin: -1.75rem -1.75rem 1.25rem;
  border-radius: 12px 12px 0 0;
}

.about-image {
  aspect-ratio: 4 / 3;
  min-height: 260px;
}

.service-card-image--diagnostic { background-image: url('images/shop/diagnostic-tablet.jpg'); }
.service-card-image--entretien { background-image: url('images/shop/workshop-interior.jpg'); }
.service-card-image--repair { background-image: url('images/shop/workshop-bays.jpg'); }
.service-card-image--performance { background-image: url('images/shop/bmw-m4.jpg'); }

.about-image {
  background-image: url('images/shop/workshop-interior.jpg');
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px) rotateX(6deg);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--reveal-index, 0) * 80ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
}

.about-inner {
  max-width: 760px;
}

.about-body {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.about-bullets {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.about-bullets li {
  position: relative;
  padding-left: 1.5rem;
}

.about-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.beliefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.belief-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(20, 22, 26, 0.06);
  font-size: 0.9rem;
  color: var(--color-text);
}

.belief-icon {
  width: 32px;
  height: 32px;
  color: var(--color-accent);
}

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

.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(20, 22, 26, 0.06);
}

.review-stars {
  color: var(--color-accent);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.review-text {
  color: var(--color-text);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.review-meta {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-navy);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  float: right;
  color: var(--color-accent);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  color: var(--color-text-muted);
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-tile {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 22, 26, 0.06);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  padding: 0;
}

.gallery-tile img,
.gallery-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-tile:hover {
  border-color: var(--color-accent);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  width: min(90vw, 600px);
}

.lightbox-tile {
  width: 100%;
  aspect-ratio: 4 / 3;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 2rem;
  cursor: pointer;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}

@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

#contact-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  background: var(--color-navy);
  color: var(--color-navy-text);
}

.contact-hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/shop/storefront-porsche-bmw.jpg') center / cover no-repeat;
}

.contact-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 26, 39, 0.75), rgba(19, 26, 39, 0.55));
}

.contact-hero-content {
  position: relative;
  z-index: 1;
}

.contact-hero-content h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  margin-bottom: 0.4em;
}

.contact-hero-content p {
  max-width: 520px;
  margin: 0 auto 1.5em;
  color: var(--color-navy-muted);
}

.devis-container {
  max-width: 700px;
}

.legal-page {
  max-width: 720px;
}

.legal-page h2 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

.legal-page p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

.legal-list {
  color: var(--color-text-muted);
  line-height: 1.7;
  padding-left: 1.25rem;
  margin: 1rem 0;
}

.legal-list li {
  margin-bottom: 0.5rem;
}

.legal-notice {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
}

.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.map-grid .map-embed {
  margin-bottom: 0;
}

.map-grid .map-embed iframe {
  height: 360px;
}

@media (max-width: 800px) {
  .map-grid {
    grid-template-columns: 1fr;
  }

  .map-grid .map-embed iframe {
    height: 260px;
  }
}

.map-info h2 {
  margin-bottom: 0.75rem;
}

.map-info p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.map-directions-btn {
  margin-top: 1rem;
}

#devis-form {
  display: grid;
  gap: 1rem;
}

#devis-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

#devis-form input,
#devis-form select,
#devis-form textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
}

#devis-form input:focus,
#devis-form select:focus,
#devis-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-errors {
  color: var(--color-accent);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.map-embed {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.map-embed iframe {
  width: 100%;
  height: 240px;
  border: 0;
}

.contact-link {
  display: block;
  text-decoration: none;
  color: var(--color-text);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

#site-footer {
  background: var(--color-navy);
  color: var(--color-navy-text);
  padding: 3rem 0 5.5rem;
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.footer-brand p {
  color: var(--color-navy-muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.footer-col h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  color: var(--color-navy-text);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-col .footer-links {
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-navy-muted);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-legal {
  border-top: 1px solid rgba(238, 240, 243, 0.12);
  margin-top: 1rem;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: var(--color-navy-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-legal-links a:hover {
  color: var(--color-accent);
}

.footer-copyright {
  color: var(--color-navy-muted);
  font-size: 0.85rem;
  margin: 0;
}

#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-navy);
  color: var(--color-navy-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-base);
  z-index: 90;
}

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

#back-to-top svg {
  width: 20px;
  height: 20px;
}

#back-to-top:hover {
  background: var(--color-accent);
}

#whatsapp-float {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  width: 56px;
  height: 56px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 90;
}

#whatsapp-float svg {
  width: 26px;
  height: 26px;
}

#brands {
  background: var(--color-navy);
  padding: 1.5rem 0;
  overflow: hidden;
}

.brands-strip {
  display: flex;
  width: max-content;
  animation: brands-scroll 45s linear infinite;
}

.brands-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.brand-logo img {
  height: 100%;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.brand-logo--white img {
  filter: brightness(0) invert(1);
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-tagline,
  .hero-subtitle,
  .hero-ctas,
  .hero-bg-zoom,
  #hero-bg,
  .brands-strip {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #back-to-top {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

.service-card,
.gallery-tile,
.btn {
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform 0.15s ease, border-color var(--transition-base), box-shadow 0.2s ease, background var(--transition-base);
}

.service-card:hover,
.service-card:active {
  box-shadow: 0 12px 30px -12px rgba(196, 23, 42, 0.35);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.gallery-tile:hover,
.gallery-tile:active {
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.6);
}

@media (max-width: 900px) {
  .nav-menu {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    background: var(--color-bg);
    color: var(--color-text);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 150;
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    font-size: 1.4rem;
  }

  .nav-actions {
    flex-direction: column;
    gap: 1.25rem;
  }

  .nav-toggle {
    display: flex;
  }

  body.nav-open {
    overflow: hidden;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .contact-grid {
    gap: 2rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    min-height: 200px;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 3.5rem 0;
  }

  #hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .services-grid,
  .gallery-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .beliefs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }

  .nav-logo span {
    font-size: 0.85rem;
  }

  #devis-form input,
  #devis-form select,
  #devis-form textarea {
    font-size: 16px;
  }
}
