/* ============================================================
   Detailing Auto Gardois — landing page one-pager
   Charte : fond noir profond, texte blanc, esprit premium
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-soft: #111112;
  --bg-card: #161617;
  --bg-card-hover: #1c1c1e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f4;
  --text-muted: #9b9b98;
  --text-dim: #6b6b68;
  --accent: #d8c9a3; /* doré discret, étoiles et détails */
  --radius: 18px;
  --font-main: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  border: 1px solid transparent;
}

.btn--light { background: var(--text); color: #0a0a0a; }
.btn--light:hover { background: #fff; transform: translateY(-2px); }

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

.btn--sm { padding: 0.55rem 1.2rem; font-size: 0.85rem; }
.btn--lg { padding: 1.05rem 2.4rem; font-size: 1.1rem; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.7rem 0;
  border-bottom-color: var(--border);
}

.header-inner {
  width: min(1320px, 94vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; }

.brand__logo {
  height: 48px;
  width: auto;
  transition: height 0.4s ease, transform 0.3s ease;
}

.brand:hover .brand__logo { transform: scale(1.04); }

.site-header.is-scrolled .brand__logo { height: 38px; }

.nav-pill {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem;
}

.nav-pill a {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.87rem;
  color: var(--text-muted);
  transition: color 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}

.nav-pill a:hover,
.nav-pill a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Hero ---------- */

.hero {
  padding: 9.5rem 0 4rem;
  width: min(1320px, 94vw);
  margin-inline: auto;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.hero__title {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero__lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 30rem;
  margin-bottom: 2.2rem;
}

.hero__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  /* Ratio natif de la vidéo (1664x1244) : aucun recadrage haut/bas */
  aspect-ratio: 1664 / 1244;
  background: var(--bg-soft);
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__quote {
  margin: 3.5rem auto 0;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1rem;
  font-style: italic;
  text-align: center;
}

/* Trait doré centré au-dessus de la citation */
.hero__quote::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 1.2rem;
}

.hero__quote cite {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding: 1.1rem 0;
  background: var(--bg-soft);
}

.marquee__track {
  display: flex;
  gap: 2.2rem;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  white-space: nowrap;
}

.marquee__sep { color: var(--accent); }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */

.section { padding: 7rem 0; }
.section--tight { padding: 5.5rem 0; }

.section__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}

.section__title {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 42rem;
  margin-bottom: 3rem;
}

.section__sub {
  color: var(--text-muted);
  margin-top: -2rem;
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

.section__note {
  margin-top: 3rem;
  color: var(--text-muted);
  max-width: 44rem;
  font-size: 0.95rem;
}

/* ---------- Section pourquoi : Aston Martin en filigrane ---------- */

#pourquoi {
  position: relative;
  overflow: hidden;
}

#pourquoi::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/accueil-3.jpg") center 32% / cover no-repeat;
  opacity: 0.2;
  filter: grayscale(100%) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  pointer-events: none;
}

#pourquoi .container { position: relative; z-index: 1; }

/* ---------- Cards (pourquoi) ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  transition: background 0.3s ease, transform 0.3s ease;
}

.card:hover { background: var(--bg-card-hover); transform: translateY(-4px); }

.card__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 2.2rem;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

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

/* ---------- Statement voiture de prêt ---------- */

.statement {
  margin-top: 5.5rem;
  text-align: center;
}

/* Véhicule de prêt : médaillon rond noir et blanc cerclé de blanc */
.statement__car {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  margin: 0 auto 2.2rem;
}

.statement__car img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.statement__big {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 46rem;
  margin-inline: auto;
}

.statement__small {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---------- Avant / Après ---------- */

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

.ba figcaption {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ba__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba__before-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* largeur pilotée en JS via --pos */
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-1px);
  pointer-events: none;
}

.ba__handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}

.ba__handle span::before {
  content: "◂ ▸";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  color: #fff;
  letter-spacing: 0.15em;
  padding-left: 0.15em;
}

.ba__tag {
  position: absolute;
  top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.ba__tag--before { left: 0.9rem; }
.ba__tag--after { right: 0.9rem; }

/* ---------- Prestations ---------- */

.presta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.presta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  transition: background 0.3s ease, transform 0.3s ease;
}

.presta:hover { background: var(--bg-card-hover); transform: translateY(-4px); }

.presta__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.presta h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.presta__price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  white-space: nowrap;
}

.presta p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.presta ul { list-style: none; }

.presta li {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.3rem;
}

.presta li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.2rem;
}

/* ---------- Artisan ---------- */

.section--artisan { background: var(--bg-soft); border-block: 1px solid var(--border); }

.artisan__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
}

.artisan__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.artisan__media img { width: 100%; height: 100%; object-fit: cover; }

.artisan__content p { color: var(--text-muted); margin-bottom: 1.2rem; max-width: 34rem; }

.artisan__content strong { color: var(--text); font-weight: 600; }

.artisan__quote {
  margin-top: 1.8rem;
  font-style: italic;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
  max-width: 32rem;
}

/* ---------- Témoignages ---------- */

.cards-grid--reviews { grid-template-columns: repeat(4, 1fr); }

.review {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.review__stars { color: var(--accent); letter-spacing: 0.2em; font-size: 0.85rem; }

.review p { color: var(--text-muted); font-size: 0.9rem; flex: 1; }

.review footer {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Contact ---------- */

.section--contact {
  padding: 9rem 0;
  position: relative;
  overflow: hidden;
}

/* Devanture en filigrane, calée en haut pour laisser voir l'enseigne au-dessus du logo */
.section--contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/devanture.jpg") center top / 25% no-repeat;
  opacity: 0.2;
  filter: grayscale(100%) contrast(1.05);
  /* Fondu vers le noir : haut/bas + côtés (l'image occupe 37,5% à 62,5% de la largeur) */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, #000 10%, #000 78%, transparent),
    linear-gradient(to right, transparent 37.5%, #000 45%, #000 55%, transparent 62.5%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent, #000 10%, #000 78%, transparent),
    linear-gradient(to right, transparent 37.5%, #000 45%, #000 55%, transparent 62.5%);
  mask-composite: intersect;
  pointer-events: none;
}

.contact__inner { text-align: center; position: relative; z-index: 1; }

.contact__logo {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin-inline: auto;
  margin-bottom: 2rem;
}

.contact__title {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 46rem;
  margin-inline: auto;
  margin-bottom: 1.2rem;
}

.contact__sub { color: var(--text-muted); margin-bottom: 2.4rem; }

.contact__actions { margin-bottom: 2.4rem; }

.contact__address {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.contact__address a { transition: color 0.25s ease; }
.contact__address a:hover { color: var(--text); }

.contact__area {
  margin-top: 0.9rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  max-width: 34rem;
  margin-inline: auto;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-inner a { color: var(--text-muted); transition: color 0.25s ease; }
.footer-inner a:hover { color: var(--text); }

/* ---------- Icônes réseaux sociaux ---------- */

.header-right { display: flex; align-items: center; gap: 0.6rem; }

.icon-social {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.icon-social:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
}

.contact__social {
  margin-top: 1.6rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

.contact__social .icon-social { width: 44px; height: 44px; }

/* ---------- Section Instagram ---------- */

/* Banner devanture au-dessus de la grille Instagram */
.insta-banner {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 1;
  margin-bottom: 1rem;
}

.insta-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insta-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.insta {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  display: block;
}

/* Mobile et tablette : on garde le carré d'origine */
@media (max-width: 1024px) {
  .insta { aspect-ratio: 1; }
}

.insta img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.insta:hover img { transform: scale(1.05); }

.insta__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(10, 10, 10, 0.55);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.insta:hover .insta__overlay { opacity: 1; }

.insta-follow { margin-top: 2.2rem; text-align: center; }

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

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

@media (max-width: 640px) {
  /* Masquées par défaut, elles réapparaissent en compact une fois le header scrollé (sticky) */
  .header-right .icon-social { display: none; }

  .site-header.is-scrolled .header-right { gap: 0.4rem; }

  .site-header.is-scrolled .header-right .icon-social {
    display: grid;
    width: 32px;
    height: 32px;
  }

  .site-header.is-scrolled .header-right .icon-social svg {
    width: 14px;
    height: 14px;
  }
}

/* ---------- Bouton WhatsApp flottant ---------- */

.whatsapp-fab {
  position: fixed;
  right: clamp(1.2rem, 3vw, 2rem);
  bottom: clamp(1.2rem, 3vw, 2rem);
  z-index: 200;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-fab:hover {
  background: #2ae06f;
  transform: scale(1.1);
  box-shadow: 0 12px 34px rgba(37, 211, 102, 0.35);
}

.whatsapp-fab svg { position: relative; z-index: 1; }

/* Halo pulsé pour inciter au clic */
.whatsapp-fab__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.55);
  animation: wa-pulse 2.4s ease-out infinite;
}

@keyframes wa-pulse {
  0%   { transform: scale(1); opacity: 0.6; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

@media (max-width: 640px) {
  .whatsapp-fab { width: 58px; height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab__ring { animation: none; opacity: 0; }
}

/* ---------- États initiaux animations (JS présent) ---------- */

html.has-js [data-reveal],
html.has-js [data-card],
html.has-js [data-reveal-media],
html.has-js [data-pop] {
  opacity: 0;
}

html.has-js [data-blur-title] .w {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.35em);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .cards-grid,
  .cards-grid--reviews { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero { padding-top: 8rem; }
  .nav-pill { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 4.5rem 0; }
  .cards-grid,
  .cards-grid--reviews,
  .ba-grid,
  .presta-list { grid-template-columns: 1fr; }
  .artisan__grid { grid-template-columns: 1fr; gap: 2rem; }
  .header-cta { display: none; }
  .hero { padding-top: 6.5rem; }
  .hero__quote { margin-top: 2.4rem; }
}

/* ---------- Ajustements mobile uniquement (desktop intouché) ---------- */

@media (max-width: 640px) {
  /* Hero : Voir les transformations en haut, Demander un devis en bas */
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn--ghost { order: 1; }
  .hero__actions .btn--light { order: 2; }

  /* Pourquoi : Aston recadrée en haut, petite, derrière le titre */
  #pourquoi::before {
    background-position: center top;
    background-size: 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 4%, #000 82%, transparent);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to bottom, transparent, #000 4%, #000 82%, transparent);
    mask-composite: add;
  }

  /* Instagram : 4 vignettes au lieu de 5, banner un peu plus haut */
  .insta-grid .insta:nth-child(5) { display: none; }
  .insta-banner { aspect-ratio: 2.5 / 1; }

  /* Médaillon véhicule de prêt réduit */
  .statement__car { width: 180px; height: 180px; }

  /* Contact : devanture agrandie et plus lumineuse pour rester lisible */
  .section--contact::before {
    background-size: 55%;
    opacity: 0.3;
    -webkit-mask-image:
      linear-gradient(to bottom, transparent, #000 10%, #000 78%, transparent),
      linear-gradient(to right, transparent 22.5%, #000 34%, #000 66%, transparent 77.5%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to bottom, transparent, #000 10%, #000 78%, transparent),
      linear-gradient(to right, transparent 22.5%, #000 34%, #000 66%, transparent 77.5%);
    mask-composite: intersect;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
}
