/* Batia Automobile : feuille de style du site (écrite à la main, sans outil).
   Couleurs du logo : bleu marine de la silhouette, rouge de la signature « Batia ». Ambiance showroom, sombre.
   Police libre (SIL OFL, voir assets/fonts/OFL.txt) : Outfit.
   Les photos ne sont jamais trop agrandies, pour rester nettes.
   Animations discrètes, coupées si le visiteur a demandé « moins d'animations ». */

@font-face { font-family: "Outfit"; src: url("../fonts/outfit-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --night: #0b0f1c;
    --night-2: #111830;
    --navy: #1b2560;       /* silhouette du logo */
    --red: #d8232a;        /* signature du logo */
    --red-light: #ff4a4f;
    --light: #f3f4f8;
    --ink: #121827;
    --muted: #5e6679;
    --muted-dark: #98a1b6;
    --line: #e3e6ee;
    --line-dark: rgba(255, 255, 255, .1);
    --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--night); color: #e7eaf2; font: 400 1.0625rem/1.65 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--red-light); }
h1, h2, h3 { font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); color: #fff; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.small { font-size: .875rem; }
.eyebrow { margin: 0 0 12px; color: var(--red-light); font-size: .82rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }

/* Boutons */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 14px 26px; border: 1.5px solid var(--red); border-radius: 999px; background: var(--red); color: #fff; font: 500 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .25s, border-color .25s, color .25s, box-shadow .25s; }
.button:hover { background: #b81b21; border-color: #b81b21; box-shadow: 0 10px 26px rgba(216, 35, 42, .35); }
.button-line { background: transparent; border-color: rgba(255, 255, 255, .35); }
.button-line:hover { background: #fff; border-color: #fff; color: var(--night); box-shadow: none; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 15, 28, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-dark); }
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 74px; }
.brand img { width: 118px; height: auto; }
.menu { display: flex; gap: 30px; margin-left: auto; }
.menu a { position: relative; color: #d5d9e4; text-decoration: none; font-weight: 400; transition: color .2s; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .3s var(--ease); }
.menu a:hover { color: #fff; }
.menu a:hover::after { transform: scaleX(1); }
.top-call { padding: 9px 18px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .3); color: #fff; text-decoration: none; font-weight: 500; white-space: nowrap; transition: background .2s, border-color .2s; }
.top-call:hover { background: var(--red); border-color: var(--red); }
.phone-short { display: none; }

/* Haut de page */
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at 80% 20%, #1a2550 0%, var(--night) 60%); }
.hero-line { position: absolute; left: -5%; right: -5%; bottom: 4%; width: 110%; height: auto; fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 3; pointer-events: none; }
.js .hero-line path { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: dessine 3s var(--ease) .3s forwards; }
@keyframes dessine { to { stroke-dashoffset: 0; } }
.hero-inner { position: relative; display: grid; gap: 44px; align-items: center; padding-top: 56px; padding-bottom: 70px; }
.hero h1 span { color: var(--red-light); }
.lead { max-width: 34em; color: #c1c7d6; font-size: 1.15rem; font-weight: 300; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 36px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--line-dark); }
.hero-stats strong { display: block; color: #fff; font-size: 1.6rem; font-weight: 600; }
.hero-stats span { color: var(--muted-dark); font-size: .9rem; }
.hero-photos { position: relative; height: 470px; max-width: 470px; justify-self: center; width: 100%; }
.hero-photos img { position: absolute; width: 62%; aspect-ratio: 382 / 510; object-fit: cover; border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.ph-1 { left: 0; top: 0; z-index: 1; }
.ph-2 { right: 0; bottom: 0; border: 6px solid var(--night); }
.hero-badge { position: absolute; left: 6%; bottom: 8%; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 500; font-size: .92rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.hero-badge::before, .open-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; }
.hero-badge.is-open::before, .open-status.is-open::before { background: #2fbf71; box-shadow: 0 0 0 0 rgba(47, 191, 113, .6); animation: pouls 2s infinite; }
@keyframes pouls { 70% { box-shadow: 0 0 0 8px rgba(47, 191, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0); } }

.js .rise { opacity: 0; transform: translateY(20px); animation: monte .9s var(--ease) forwards; }
.js .hero-text .rise:nth-child(2) { animation-delay: .1s; }
.js .hero-text .rise:nth-child(3) { animation-delay: .2s; }
.js .hero-text .rise:nth-child(4) { animation-delay: .3s; }
.js .hero-text .rise:nth-child(5) { animation-delay: .4s; }
.js .hero-photos.rise { animation-delay: .25s; }
@keyframes monte { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Vente · Achat · Reprise */
.services { background: var(--night-2); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.services-grid { display: grid; }
.service { padding: 34px 26px; }
.service + .service { border-top: 1px solid var(--line-dark); }
.service-num { color: var(--red-light); font-weight: 600; font-size: .9rem; letter-spacing: .1em; }
.service h2 { margin: 8px 0 10px; font-size: 1.7rem; color: #fff; }
.service p { margin: 0; color: var(--muted-dark); }

/* Stock */
.stock { padding: 90px 0; background: var(--light); color: var(--ink); }
.stock h2 { color: var(--ink); }
.stock .eyebrow { color: var(--red); }
.stock-head { display: grid; gap: 18px; margin-bottom: 30px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 16px; border: 1.5px solid #d3d7e2; border-radius: 999px; background: #fff; color: var(--ink); font: 500 .95rem var(--font); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .95rem; }
.sort select { padding: 9px 12px; border: 1.5px solid #d3d7e2; border-radius: 10px; background: #fff; color: var(--ink); font: 500 .95rem var(--font); }
.cars { display: grid; gap: 18px; }
.car { display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(18, 24, 39, .05), 0 10px 30px rgba(18, 24, 39, .07); transition: transform .35s var(--ease), box-shadow .35s; }
.car[hidden] { display: none; }
.car:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(18, 24, 39, .14); }
.car-photo { position: relative; overflow: hidden; background: #e7e9ef; }
.car-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1s var(--ease); }
.car:hover .car-photo img { transform: scale(1.04); }
.car-new { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 600; }
.car-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.car h3 { margin: 0 0 2px; color: var(--ink); }
.car-version { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.car-specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.car-specs li { padding: 4px 10px; border-radius: 8px; background: var(--light); color: #3a4256; font-size: .85rem; }
.car-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.car-price { margin: 0; color: var(--ink); font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; }
.car-cta { padding: 9px 14px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 500; font-size: .92rem; text-decoration: none; white-space: nowrap; transition: background .2s; }
.car-cta:hover { background: #b81b21; }
.cars-empty { margin: 20px 0 0; color: var(--muted); }

/* Reprise */
.reprise { padding: 90px 0; background: linear-gradient(120deg, var(--navy) 0%, #121a45 55%, #3a1020 100%); }
.reprise-inner { display: grid; gap: 34px; align-items: center; }
.reprise h2 { color: #fff; }
.reprise p { color: #c6cbe0; max-width: 34em; }
.reprise-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.reprise-steps li { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #fff; }
.reprise-steps span { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--red); font-weight: 600; }

/* Le garage */
.garage { padding: 90px 0; }
.garage-inner { display: grid; gap: 40px; align-items: center; }
.garage-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 540px; }
.garage-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; }
.garage-photos img:last-child { margin-top: 40px; }
.garage h2 { color: #fff; }
.garage-text p:not(.eyebrow) { color: var(--muted-dark); }
.garage-points { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.garage-points li { position: relative; padding-left: 30px; color: #e7eaf2; }
.garage-points li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Contact */
.contact { padding: 90px 0; background: var(--light); color: var(--ink); }
.contact-inner { display: grid; gap: 28px; align-items: start; }
.contact h2 { color: var(--ink); }
.contact .eyebrow { color: var(--red); }
.contact-form { padding: 30px 22px; background: #fff; border-radius: 20px; box-shadow: 0 20px 50px rgba(18, 24, 39, .08); }
.form { display: grid; gap: 16px; }
.form label { display: block; font-weight: 500; font-size: .95rem; color: var(--ink); }
.form input:not([type="radio"]), .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid #d6dae4; border-radius: 12px; background: #fff; color: var(--ink); font: 1rem/1.4 var(--font); transition: border-color .2s, box-shadow .2s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(27, 37, 96, .12); }
.form-row { display: grid; gap: 16px; }
.when[hidden] { display: none; }
.segmented { display: grid; gap: 6px; padding: 5px; border-radius: 14px; background: var(--light); }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 10px 12px; border-radius: 10px; text-align: center; color: var(--muted); font-weight: 500; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(18, 24, 39, .1); }
.segmented input:focus-visible + span { outline: 3px solid rgba(27, 37, 96, .3); }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 4px 0 0; }
.optional { font-weight: 400; font-size: .85rem; color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--light); }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { border-left: 4px solid #22a061; }
.notice-error { border-left: 4px solid var(--red); }
.contact-info { padding: 30px 24px; border-radius: 20px; background: var(--night); color: #e7eaf2; }
.contact-info > img { width: 190px; height: auto; margin-bottom: 18px; }
.open-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: .9rem; }
.address { color: #c1c7d6; }
.phone a { color: #fff; font-size: 1.7rem; font-weight: 600; text-decoration: none; }
.hours { width: 100%; border-collapse: collapse; margin: 6px 0 20px; }
.hours caption { text-align: left; font-weight: 600; padding-bottom: 6px; color: #fff; }
.hours th, .hours td { padding: 7px 0; border-bottom: 1px solid var(--line-dark); text-align: left; font-weight: 400; font-size: .95rem; }
.hours td { text-align: right; color: var(--muted-dark); }
.hours .today > * { color: var(--red-light); font-weight: 600; }
.map { overflow: hidden; border-radius: 14px; }
.map iframe { display: block; width: 100%; height: 240px; border: 0; background: var(--night-2); }

/* Pied de page */
.bottom { padding: 26px 0 30px; background: #070a14; color: var(--muted-dark); font-size: .92rem; }
.bottom a { color: #fff; }
.bottom p { margin: 0 0 4px; }

/* Téléphone */
@media (max-width: 819px) {
    .menu { display: none; }
    .top-inner { min-height: 64px; }
    .brand img { width: 98px; }
    .top-call { margin-left: auto; }
    .phone-long { display: none; }
    .phone-short { display: inline; }
    .hero-inner { padding-top: 34px; padding-bottom: 50px; gap: 34px; }
    .hero-actions .button { flex: 1 1 100%; }
    .hero-photos { height: 380px; max-width: 360px; }
    .hero-stats { gap: 12px 24px; }
    .hero-stats strong { font-size: 1.3rem; }
    .car-price { font-size: 1.35rem; }
}

/* Tablette et ordinateur */
@media (min-width: 640px) {
    .cars { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr 1fr; }
    .span-2 { grid-column: 1 / -1; }
    .segmented { grid-template-columns: repeat(3, 1fr); }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .service + .service { border-top: 0; border-left: 1px solid var(--line-dark); }
}
@media (min-width: 960px) {
    .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 50px; padding-top: 76px; padding-bottom: 96px; }
    .stock-head { grid-template-columns: 1fr auto; align-items: end; }
    .cars { grid-template-columns: repeat(3, 1fr); gap: 22px; }
    .reprise-inner { grid-template-columns: 1.1fr .9fr; gap: 60px; }
    .garage-inner { grid-template-columns: 1fr 1fr; gap: 64px; }
    .contact-inner { grid-template-columns: 1.3fr .7fr; gap: 28px; }
    .contact-form { padding: 38px 40px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal, .js .rise { opacity: 1; transform: none; }
    .js .hero-line path { stroke-dashoffset: 0; }
}
