/* ============================================================
   site-moto-dordogne — style.css
   Dark racing premium / atelier technique local
   Vanilla CSS — pas de framework
   ============================================================ */

:root {
  --noir: #06070a;
  --noir-2: #0a0b0e;
  --gris: #16181c;
  --gris-texte: #c8ccd3;
  --blanc: #f5f6f7;
  --rouge: #e63946;
  --rouge-dark: #b91d2b;
  --max: 1200px;
  --radius: 8px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--noir);
  color: var(--blanc);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, .oswald { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: var(--radius);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  transition: transform .2s, background .2s, box-shadow .2s, color .2s;
  cursor: pointer; border: none; text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--rouge); color: white; box-shadow: 0 8px 20px rgba(230, 57, 70, .25); }
.btn-primary:hover { background: var(--rouge-dark); }
.btn-outline { border: 2px solid var(--rouge); color: var(--rouge); background: transparent; }
.btn-outline:hover { background: var(--rouge); color: white; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: rgba(11, 12, 14, .7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .3s, padding .3s, box-shadow .3s;
}
header.scrolled {
  background: rgba(11, 12, 14, .96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.topbar {
  background: var(--rouge); color: white; font-size: .8rem; font-weight: 600;
  text-align: center; padding: 8px; letter-spacing: .02em;
}
nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; transition: padding .3s; }
header.scrolled nav { padding: 8px 0; }
.logo { font-family: 'Oswald', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--blanc); }
.logo span { color: var(--rouge); }
.nav-links { display: flex; gap: 32px; list-style: none; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.nav-links a { color: var(--gris-texte); transition: color .2s; position: relative; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--rouge); transition: width .25s var(--ease);
}
.nav-links a:hover { color: var(--blanc); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; gap: 12px; align-items: center; }

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

/* ---------- Menu mobile overlay ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(11, 12, 14, .98); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; list-style: none;
  opacity: 0; pointer-events: none; transform: translateY(-12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; transform: none; }
.mobile-menu a {
  font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 1.6rem;
  color: var(--gris-texte); letter-spacing: .03em; transition: color .2s;
}
.mobile-menu a:hover { color: var(--rouge); }
.mobile-menu .btn { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding-top: 120px; overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(230, 57, 70, .18), transparent 45%),
    linear-gradient(135deg, rgba(11, 12, 14, .88) 0%, rgba(20, 22, 25, .72) 100%);
  z-index: -2;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 80px);
  z-index: -1; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.05; margin-bottom: 24px; }
.hero h1 em { color: var(--rouge); font-style: normal; }
.hero p { font-size: 1.15rem; color: var(--gris-texte); max-width: 540px; margin-bottom: 32px; }
.hero-badges { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.badge {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  padding: 10px 16px; border-radius: var(--radius); font-size: .85rem; font-weight: 600;
}
.badge .dot { width: 8px; height: 8px; background: var(--rouge); border-radius: 50%; box-shadow: 0 0 8px var(--rouge); }
.hero-visual {
  position: relative;
  background: linear-gradient(145deg, var(--gris), var(--noir-2));
  border-radius: 20px; padding: 30px; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.hero-visual .graph { height: 220px; display: flex; align-items: flex-end; gap: 8px; padding-bottom: 30px; }
.bar {
  flex: 1; height: 0; background: linear-gradient(to top, var(--rouge-dark), var(--rouge));
  border-radius: 4px 4px 0 0; opacity: .9;
  transition: height 1s var(--ease);
}
.bars.is-visible .bar { height: var(--h); }
.hero-visual .label { text-align: center; font-size: .75rem; color: var(--gris-texte); text-transform: uppercase; letter-spacing: .05em; }
.hero-visual .value { text-align: center; font-family: 'Oswald'; font-size: 1.4rem; color: var(--blanc); margin-top: 6px; }

/* ---------- Sections ---------- */
section { padding: 100px 0; }
.section-title { text-align: center; margin-bottom: 64px; }
.section-title h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 16px; }
.section-title h2 em { color: var(--rouge); font-style: normal; }
.section-title p { color: var(--gris-texte); max-width: 680px; margin: 0 auto; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  background: var(--noir-2); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius); padding: 36px 30px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--rouge); box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
.service-card .icon { width: 56px; height: 56px; background: rgba(230, 57, 70, .12); border-radius: 12px; display: grid; place-items: center; margin-bottom: 22px; color: var(--rouge); font-size: 1.4rem; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.service-card p { color: var(--gris-texte); font-size: .95rem; }
.service-card .price { margin-top: 20px; font-weight: 700; color: var(--rouge); font-size: 1.1rem; }

/* ---------- Process ---------- */
.process { background: var(--noir-2); }
.steps { display: flex; gap: 24px; counter-reset: step; }
.step {
  flex: 1; position: relative; padding: 32px; background: var(--noir); border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .08); transition: transform .25s var(--ease);
}
.step:hover { transform: translateY(-4px); }
.step::before {
  counter-increment: step; content: '0' counter(step);
  font-family: 'Oswald'; font-size: 3rem; color: rgba(230, 57, 70, .25); line-height: 1;
  position: absolute; top: 18px; right: 22px;
}
.step h3 { margin-bottom: 10px; color: var(--blanc); font-size: 1.15rem; }
.step p { color: var(--gris-texte); font-size: .9rem; }

/* ---------- Stage 1 / 2 ---------- */
.stages-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.stage-card {
  background: var(--noir-2); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.stage-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0, 0, 0, .4); }
.stage-header { background: var(--rouge); padding: 20px 30px; }
.stage-header h3 { font-size: 1.5rem; }
.stage-body { padding: 30px; }
.stage-body ul { list-style: none; color: var(--gris-texte); }
.stage-body li { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); display: flex; gap: 12px; }
.stage-body li::before { content: '✓'; color: var(--rouge); font-weight: 700; }

/* ---------- Marques ---------- */
.marques-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.marque {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--noir-2); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius);
  padding: 20px 12px; text-align: center; cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s, box-shadow .2s;
}
.marque-badge {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .04);
  border: 2px solid var(--mc, var(--gris-texte));
  color: var(--mc, var(--blanc));
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: .82rem; letter-spacing: .02em;
  transition: background .2s, color .2s, box-shadow .2s;
}
.marque-logo {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f5f6f7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  transition: box-shadow .2s, transform .2s;
}
.marque-logo img { width: 74%; height: 74%; object-fit: contain; display: block; }
.marque-name {
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  font-size: .82rem; color: var(--gris-texte); transition: color .2s; line-height: 1.25;
}
.marque:hover { border-color: var(--mc, var(--rouge)); transform: translateY(-3px); background: rgba(255, 255, 255, .03); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.marque:hover .marque-badge { background: var(--mc, var(--rouge)); color: #fff; box-shadow: 0 0 14px var(--mc, var(--rouge)); }
.marque:hover .marque-logo { box-shadow: 0 0 16px var(--mc, var(--rouge)); transform: scale(1.04); }
.marque:hover .marque-name { color: var(--blanc); }

/* ---------- Confiance (nouvelle section) ---------- */
.trust { background: var(--noir-2); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 56px; }
.trust-card {
  border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255, 255, 255, .08);
  background: var(--noir); transition: transform .25s var(--ease);
}
.trust-card:hover { transform: translateY(-5px); }
.trust-card img { width: 100%; height: 220px; object-fit: cover; filter: grayscale(.3); transition: filter .3s; }
.trust-card:hover img { filter: grayscale(0); }
.trust-card .body { padding: 22px; }
.trust-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.trust-card p { color: var(--gris-texte); font-size: .9rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 20px; }
.stat .num { font-family: 'Oswald'; font-size: clamp(2rem, 4vw, 3rem); color: var(--rouge); line-height: 1; }
.stat .num .suffix { font-size: 1.5rem; }
.stat .lbl { margin-top: 8px; color: var(--gris-texte); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Localisation / Contact ---------- */
.local { background: linear-gradient(180deg, var(--noir) 0%, var(--noir-2) 100%); }
.local-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.local-text h2 { font-size: 2rem; margin-bottom: 20px; }
.local-text h2 em { color: var(--rouge); font-style: normal; }
.local-text p { color: var(--gris-texte); margin-bottom: 24px; }
.local-info { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.info-row { display: flex; align-items: center; gap: 14px; color: var(--blanc); font-weight: 600; }
.info-row .dot { width: 10px; height: 10px; background: var(--rouge); border-radius: 50%; flex-shrink: 0; }
.map {
  background: var(--gris); border-radius: 16px; min-height: 360px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.map iframe { width: 100%; height: 360px; border: 0; display: block; filter: grayscale(.4) invert(.92) hue-rotate(180deg); }

/* ---------- Formulaire de devis ---------- */
.form-devis {
  background: var(--noir-2); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px; padding: 36px;
}
.form-devis h3 { font-size: 1.4rem; margin-bottom: 8px; }
.form-devis .sub { color: var(--gris-texte); font-size: .9rem; margin-bottom: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-texte); }
.field input, .field select, .field textarea {
  background: var(--noir); border: 1px solid rgba(255, 255, 255, .12); color: var(--blanc);
  padding: 12px 14px; border-radius: var(--radius); font-family: inherit; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #6b6f76; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--rouge); box-shadow: 0 0 0 3px rgba(230, 57, 70, .18);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: .78rem; color: var(--gris-texte); margin-top: 14px; }
.form-status { margin-top: 14px; font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #4ade80; }
.form-status.err { color: var(--rouge); }

/* ---------- CTA ---------- */
.cta { text-align: center; background: var(--rouge); }
.cta h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 16px; }
.cta p { color: rgba(255, 255, 255, .85); max-width: 600px; margin: 0 auto 32px; }
.cta .btn { background: var(--noir); color: white; }
.cta .btn:hover { background: #000; }

/* ---------- Footer ---------- */
footer { background: var(--noir-2); padding: 60px 0 30px; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
footer h4 { font-family: 'Oswald'; text-transform: uppercase; margin-bottom: 18px; color: var(--blanc); }
footer p, footer a { color: var(--gris-texte); font-size: .9rem; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer a:hover { color: var(--rouge); }
.social { display: flex; gap: 14px; margin-top: 14px; }
.social a { width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; display: grid; place-items: center; transition: border-color .2s, color .2s; }
.social a:hover { border-color: var(--rouge); color: var(--rouge); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 24px; text-align: center; color: var(--gris-texte); font-size: .8rem; }

/* ---------- Modal marques / modèles ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(8, 9, 11, .82); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; width: min(960px, 100%); max-height: 88vh; overflow: hidden;
  background: var(--noir-2); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6); display: flex; flex-direction: column;
  transform: translateY(16px) scale(.98); transition: transform .3s var(--ease);
  padding: 36px;
}
.modal-overlay.open .modal { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 18px; background: none; border: none; cursor: pointer;
  color: var(--gris-texte); font-size: 2rem; line-height: 1; transition: color .2s; z-index: 2;
}
.modal-close:hover { color: var(--rouge); }
.modal h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 6px; text-align: center; }
.modal h2 em { color: var(--rouge); font-style: normal; }
.modal-sub { color: var(--gris-texte); font-size: .85rem; margin-bottom: 22px; text-align: center; }
.modal-table-wrap { overflow: auto; max-height: 56vh; border: 1px solid rgba(255, 255, 255, .07); border-radius: 8px; }
.modal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.modal-table th, .modal-table td { padding: 12px 8px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: .85rem; vertical-align: middle; font-variant-numeric: tabular-nums; }
.modal-table th { color: var(--gris-texte); text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; font-weight: 600; position: sticky; top: 0; background: var(--noir-2); z-index: 1; }
.modal-table tbody tr { transition: background .15s; }
.modal-table tbody tr:hover { background: rgba(230, 57, 70, .06); }
.modal-table .m-model { font-weight: 700; color: var(--blanc); text-align: left; padding-left: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-table .m-years { color: var(--gris-texte); white-space: nowrap; font-size: .8rem; }
.modal-table .m-orig { color: var(--gris-texte); }
.modal-table .m-price { display: inline-block; margin-top: 5px; font-weight: 700; color: var(--rouge); font-size: .76rem; }
.modal-table .m-empty { text-align: center; color: var(--gris-texte); padding: 32px 12px; }
/* largeurs colonnes uniformes */
.modal-table th:nth-child(1), .modal-table td:nth-child(1) { width: 22%; }
.modal-table th:nth-child(2), .modal-table td:nth-child(2) { width: 15%; }
.modal-table th:nth-child(3), .modal-table td:nth-child(3) { width: 17%; }
.modal-table th:nth-child(4), .modal-table td:nth-child(4) { width: 17%; }
.modal-table th:nth-child(5), .modal-table td:nth-child(5) { width: 17%; }
.modal-table th:nth-child(6), .modal-table td:nth-child(6) { width: 12%; }
.modal-foot { margin-top: 16px; color: #6b6f76; font-size: .75rem; text-align: center; }
.btn-sm { padding: 8px 14px; font-size: .72rem; }

/* ---------- Animations reveal ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-40px); }
.reveal-right { opacity: 0; transform: translateX(40px); }
.reveal-left.is-visible, .reveal-right.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }
.reveal-delay-3 { transition-delay: .36s; }

/* ---------- Pages légales ---------- */
.legal { padding-top: 160px; padding-bottom: 80px; min-height: 70vh; }
.legal h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.2rem; margin: 32px 0 12px; color: var(--blanc); }
.legal p, .legal li { color: var(--gris-texte); margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal .updated { color: #6b6f76; font-size: .85rem; margin-bottom: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn-outline { display: none; }
  .burger { display: flex; }
  .hero { padding-top: 140px; }
  .hero-grid, .local-grid, .footer-grid { grid-template-columns: 1fr; }
  .services-grid, .stages-grid, .trust-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 70px 0; }
  .footer-grid { gap: 30px; }
}

@media (max-width: 560px) {
  .hero-badges { gap: 10px; }
  .badge { font-size: .78rem; padding: 8px 12px; }
  .nav-cta .btn-primary { padding: 10px 18px; font-size: .75rem; }
}

/* ---------- Préférence reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}