/* ==========================================================================
   AB-MOTORS — Feuille de style principale
   Garage automobile — Vaulx-en-Velin (Lyon)
   Palette : noir / slate + rouge action + blanc
   Typo : Poppins (titres) / Open Sans (texte)
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Couleurs de marque */
  --rouge: #E30613;
  --rouge-fonce: #B4040F;
  --rouge-clair: #ff2f3c;

  /* Neutres */
  --noir: #0d0f12;
  --slate-900: #14181d;
  --slate-800: #1e242c;
  --slate-700: #2a323c;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --blanc: #ffffff;
  --fond: #f8fafc;

  /* Sémantique */
  --texte: #14181d;
  --texte-doux: #4b5563;
  --texte-inverse: #ffffff;
  --bordure: #e2e8f0;

  /* Layout */
  --max: 1200px;
  --radius: 14px;
  --radius-sm: 8px;
  --ombre: 0 4px 20px rgba(13, 15, 18, .08);
  --ombre-forte: 0 20px 50px rgba(13, 15, 18, .18);
  --transition: 220ms cubic-bezier(.4, 0, .2, 1);

  /* Typo */
  --f-titre: "Poppins", system-ui, -apple-system, sans-serif;
  --f-texte: "Open Sans", system-ui, -apple-system, sans-serif;

  /* Header */
  --header-h: 110px;
}

/* --- Reset léger -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--f-texte);
  font-size: 16px;
  line-height: 1.65;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--f-titre);
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--slate-900);
  letter-spacing: -.02em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; }

p { margin: 0 0 1rem; }

:focus-visible {
  outline: 3px solid var(--rouge);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Utilitaires ------------------------------------------------------- */
.conteneur {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--sombre { background: var(--slate-900); color: var(--slate-300); }
.section--sombre h2, .section--sombre h3 { color: var(--blanc); }

.section__intro { max-width: 640px; margin-bottom: 3rem; }
.section--centre .section__intro { margin-inline: auto; text-align: center; }

.surtitre {
  display: inline-block;
  font-family: var(--f-titre);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rouge);
  margin-bottom: .9rem;
}

.texte-doux { color: var(--texte-doux); }
.section--sombre .texte-doux { color: var(--slate-400); }

/* --- Boutons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.7rem;
  font-family: var(--f-titre);
  font-weight: 600;
  font-size: .98rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition),
              box-shadow var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primaire {
  background: var(--rouge);
  color: var(--blanc);
  box-shadow: 0 8px 22px rgba(227, 6, 19, .28);
}
.btn--primaire:hover { background: var(--rouge-fonce); box-shadow: 0 12px 28px rgba(227, 6, 19, .38); }

.btn--fantome {
  background: transparent;
  color: var(--blanc);
  border-color: rgba(255, 255, 255, .35);
}
.btn--fantome:hover { border-color: var(--blanc); background: rgba(255, 255, 255, .08); }

.btn--sombre {
  background: var(--slate-900);
  color: var(--blanc);
}
.btn--sombre:hover { background: var(--noir); }

/* --- Header ------------------------------------------------------------ */
.entete {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(13, 15, 18, .0);
  transition: background var(--transition), box-shadow var(--transition);
}
.entete--fixe {
  background: rgba(13, 15, 18, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .25);
}
.entete__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.entete__logo { display: flex; align-items: center; }
.entete__logo img { height: 90px; width: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__liens { display: flex; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.nav__liens a {
  font-family: var(--f-titre);
  font-weight: 500;
  font-size: .96rem;
  color: var(--slate-300);
  padding: .3rem 0;
  position: relative;
  transition: color var(--transition);
}
.nav__liens a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--rouge);
  transition: width var(--transition);
}
.nav__liens a:hover, .nav__liens a[aria-current="page"] { color: var(--blanc); }
.nav__liens a:hover::after, .nav__liens a[aria-current="page"]::after { width: 100%; }

.nav__cta { padding: .7rem 1.3rem; font-size: .92rem; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.burger span {
  display: block;
  width: 26px; height: 2.5px;
  background: var(--blanc);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  color: var(--blanc);
  overflow: hidden;
  padding-top: var(--header-h);
  padding-bottom: 4rem;
}
.hero__fond {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(120deg, #0d0f12 0%, #1a1f27 55%, #2a323c 100%);
}
/* Image d'ambiance floutée en fond (remplacée par photo réelle plus tard) */
.hero__fond::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/facade.jpg");
  background-size: cover;
  background-position: center;
  filter: blur(3px) brightness(.4) saturate(.9);
  transform: scale(1.06);
  opacity: .55;
}
.hero__fond::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 75% 20%, rgba(227, 6, 19, .22), transparent 60%),
    linear-gradient(0deg, rgba(13, 15, 18, .85), rgba(13, 15, 18, .35));
}
.hero__contenu { position: relative; z-index: 2; max-width: 720px; padding-block: 3rem; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: .5rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 1.6rem;
  backdrop-filter: blur(6px);
}
.hero__badge .point {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
}
.hero h1 { color: var(--blanc); margin-bottom: 1.2rem; }
.hero h1 .accent { color: var(--rouge-clair); }
.hero__sous { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--slate-300); max-width: 560px; margin-bottom: 2.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.8rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.hero__stat .num { font-family: var(--f-titre); font-size: 2rem; font-weight: 700; color: var(--blanc); line-height: 1; }
.hero__stat .lbl { font-size: .85rem; color: var(--slate-400); }

.hero__scroll {
  position: absolute;
  bottom: 1.8rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--slate-400);
  font-size: .8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero__scroll .souris {
  width: 24px; height: 38px;
  border: 2px solid var(--slate-400);
  border-radius: 12px;
  position: relative;
}
.hero__scroll .souris::before {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 7px;
  background: var(--slate-400);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scroll-anim 1.6s infinite;
}
@keyframes scroll-anim {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* --- Bandeau confiance ------------------------------------------------- */
.confiance {
  background: var(--slate-900);
  border-top: 1px solid var(--slate-700);
  padding-block: 1.6rem;
}
.confiance__liste {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  list-style: none;
  margin: 0; padding: 0;
}
.confiance__item {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--slate-300);
  font-weight: 500;
  font-size: .95rem;
}
.confiance__item svg { width: 22px; height: 22px; color: var(--rouge); flex-shrink: 0; }

/* --- Grille services --------------------------------------------------- */
.services-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
}
.carte-service {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 2.2rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.carte-service:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre-forte);
  border-color: transparent;
}
.carte-service__icone {
  width: 58px; height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--rouge), var(--rouge-fonce));
  color: var(--blanc);
  margin-bottom: 1.4rem;
}
.carte-service__icone svg { width: 28px; height: 28px; }
.carte-service h3 { margin-bottom: .6rem; }
.carte-service p { color: var(--texte-doux); font-size: .96rem; flex-grow: 1; }
.carte-service__lien {
  margin-top: 1.2rem;
  font-family: var(--f-titre);
  font-weight: 600;
  font-size: .92rem;
  color: var(--rouge);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: gap var(--transition);
}
.carte-service__lien:hover { gap: .8rem; }
.carte-service__lien svg { width: 1em; height: 1em; }

/* --- À propos ---------------------------------------------------------- */
.apropos { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.apropos__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--ombre-forte);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-700));
}
.apropos__media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: blur(1.5px) brightness(.75); }
/* Note visible uniquement si l'image ne charge pas (elle est derrière l'image) */
.apropos__media .placeholder-note {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  color: var(--slate-400);
  font-size: .85rem;
  text-align: center;
  padding: 1rem;
}
.apropos__badge {
  position: absolute;
  bottom: 1.4rem; left: 1.4rem;
  background: var(--rouge);
  color: var(--blanc);
  padding: 1rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--ombre-forte);
}
.apropos__badge .n { font-family: var(--f-titre); font-size: 1.8rem; font-weight: 700; line-height: 1; }
.apropos__badge .t { font-size: .8rem; opacity: .9; }
.liste-check { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.liste-check li { display: flex; gap: .8rem; align-items: flex-start; }
.liste-check svg { width: 22px; height: 22px; color: var(--rouge); flex-shrink: 0; margin-top: 2px; }

/* --- Étapes ------------------------------------------------------------ */
.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.6rem; counter-reset: etape; }
.etape { position: relative; padding: 2rem 1.6rem; background: var(--slate-800); border-radius: var(--radius); border: 1px solid var(--slate-700); }
.etape::before {
  counter-increment: etape;
  content: "0" counter(etape);
  font-family: var(--f-titre);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--rouge);
  opacity: .35;
  line-height: 1;
}
.etape h3 { margin-top: .6rem; }
.etape p { color: var(--slate-400); font-size: .94rem; margin: 0; }

/* --- Contact ----------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); }
.contact__infos { display: grid; gap: 1.2rem; align-content: start; }
.info-bloc {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.4rem;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  transition: box-shadow var(--transition);
}
.info-bloc:hover { box-shadow: var(--ombre); }
.info-bloc__icone {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--rouge);
  display: grid;
  place-items: center;
}
.info-bloc__icone svg { width: 22px; height: 22px; }
.info-bloc h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.info-bloc p, .info-bloc a { margin: 0; color: var(--texte-doux); font-size: .96rem; }
.info-bloc a:hover { color: var(--rouge); }
.badge-attente { font-size: .75rem; color: var(--slate-500); font-style: italic; }

.contact__carte {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
  box-shadow: var(--ombre);
  border: 1px solid var(--bordure);
}
.contact__carte iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* Horaires */
.horaires { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .95rem; }
.horaires li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--bordure); }
.horaires li:last-child { border-bottom: 0; }
.horaires .ferme { color: var(--rouge); font-weight: 600; }
.horaires .aujourd { font-weight: 700; color: var(--slate-900); }

/* --- CTA final --------------------------------------------------------- */
.cta-final {
  position: relative;
  background: linear-gradient(120deg, var(--rouge-fonce), var(--rouge));
  color: var(--blanc);
  text-align: center;
  overflow: hidden;
}
.cta-final::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 20% 0%, rgba(255,255,255,.15), transparent 60%);
}
.cta-final__inner { position: relative; z-index: 1; max-width: 620px; margin-inline: auto; }
.cta-final h2 { color: var(--blanc); }
.cta-final p { color: rgba(255, 255, 255, .9); margin-bottom: 2rem; }
.cta-final .btn--primaire { background: var(--blanc); color: var(--rouge-fonce); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.cta-final .btn--primaire:hover { background: var(--slate-100); }
.cta-final .btn--fantome { border-color: rgba(255,255,255,.6); }

/* --- Footer ------------------------------------------------------------ */
.pied {
  background: var(--noir);
  color: var(--slate-400);
  padding-block: 3.5rem 1.8rem;
}
.pied__haut { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.pied__logo img { height: 52px; margin-bottom: 1rem; }
.pied__desc { font-size: .92rem; max-width: 300px; }
.pied h4 { color: var(--blanc); font-family: var(--f-titre); font-size: 1rem; margin-bottom: 1.1rem; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pied ul a { font-size: .92rem; transition: color var(--transition); }
.pied ul a:hover { color: var(--rouge-clair); }
.pied__bas {
  border-top: 1px solid var(--slate-700);
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .85rem;
}
.pied__bas a:hover { color: var(--slate-300); }

/* --- Page service (interne) ------------------------------------------- */
.page-entete {
  background: var(--slate-900);
  color: var(--blanc);
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}
.page-entete::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 400px at 80% 0%, rgba(227,6,19,.18), transparent 60%);
}
.page-entete__inner { position: relative; z-index: 1; }
.page-entete h1 { color: var(--blanc); }
.fil { display: flex; gap: .5rem; font-size: .88rem; color: var(--slate-400); margin-bottom: 1rem; flex-wrap: wrap; }
.fil a:hover { color: var(--rouge-clair); }
.fil span { color: var(--slate-500); }

.contenu-riche { max-width: 760px; }
.contenu-riche h2 { margin-top: 2.5rem; }
.contenu-riche ul { padding-left: 1.2rem; }
.contenu-riche li { margin-bottom: .5rem; }

/* --- FAQ --------------------------------------------------------------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--bordure); }
.faq-item summary {
  cursor: pointer;
  padding: 1.3rem 0;
  font-family: var(--f-titre);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--slate-900);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.6rem;
  color: var(--rouge);
  transition: transform var(--transition);
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--texte-doux); padding-bottom: 1.3rem; margin: 0; }

/* --- Animations d'apparition ------------------------------------------ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.visible { opacity: 1; transform: none; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .apropos, .contact { grid-template-columns: 1fr; }
  .pied__haut { grid-template-columns: 1fr 1fr; }
  .pied__logo { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --header-h: 84px; }
  .entete__logo img { height: 64px; }
  .burger { display: flex; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    background: rgba(13, 15, 18, .98);
    backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .nav--ouvert { transform: translateX(0); }
  .nav__liens { flex-direction: column; text-align: center; gap: 1.6rem; }
  .nav__liens a { font-size: 1.3rem; }
  .hero__stats { gap: 1.8rem; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); overflow-wrap: break-word; }
  .hero__sous, .hero__actions, .hero__stats { max-width: 100%; }
  .hero__badge { max-width: 100%; }
  .btn { white-space: normal; }
  .pied__haut { grid-template-columns: 1fr; }
  .pied__bas { flex-direction: column; align-items: center; text-align: center; }
}

/* --- Accessibilité : mouvement réduit --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
