/* =========================================================
   Renault Matran – Bertschy Automobiles
   Système visuel conforme aux Standards digitaux Renault V2 (mai 2026)
   - Couleurs : uniquement la palette officielle (p. 18-19)
   - Police : nouvel'R (fichiers licenciés à déposer dans /assets/fonts/)
   - Boutons / liens : spécifications p. 24
   ========================================================= */

@font-face { font-family: "NouvelR"; src: url("fonts/NouvelR-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "NouvelR"; src: url("fonts/NouvelR-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "NouvelR"; src: url("fonts/NouvelR-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "NouvelR"; src: url("fonts/NouvelR-Extrabold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  /* Couleurs principales */
  --yellow: #EFDF00;
  --yellow-hover: #F8EB4C;
  --white: #FFFFFF;
  --grey-light: #D9D9D6;
  --grey-mid: #BBBCBC;
  --grey-dark: #888B8D;
  --black: #000000;
  /* Texte */
  --text: #000000;
  --text-2: #3E3F40;
  --text-3: #656666;
  /* Notifications */
  --success: #40D37C;
  --alert: #E91630;
  --info: #1E8FCE;
  /* EV */
  --electric: #1885D1;
  /* Désactivé */
  --disabled: #F2F2F2;

  --font: "NouvelR", "Outfit", system-ui, sans-serif;
  --maxw: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 86px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.5; font-weight: 400;
  text-align: left;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 800; }
h2 { font-size: clamp(26px, 3vw, 38px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--text-3); }
.small { font-size: 14px; }
.legal { font-size: 12px; color: var(--text-3); line-height: 1.45; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--tight { padding: 40px 0; }
.section--dark { background: var(--black); color: var(--white); }
.section--dark .muted, .section--dark .legal { color: var(--grey-mid); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head p { margin: 0; color: var(--text-2); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--yellow); color: var(--black); padding: 12px 16px; font-weight: 700; z-index: 100; }
.skip:focus { left: 16px; top: 16px; }
:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; box-shadow: 0 0 0 6px var(--yellow); }
.section--dark :focus-visible { outline-color: var(--white); }

/* ---------- Header (fond blanc, emblème noir à gauche) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--grey-light); }
.site-header .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 10px 0; }
.brand__emblem { height: 50px; width: auto; }            /* min. H 40px / W 50px + zone de protection */
.brand__emblem-box { padding: 4px 13px; }                  /* zone de protection ≈ H/4 */
.brand__name { font-weight: 700; font-size: 17px; line-height: 1.1; white-space: nowrap; }
.brand__name span { font-weight: 400; }
.brand__name i { font-style: normal; display: inline-block; width: 1px; height: 16px; background: var(--black); margin: 0 8px; vertical-align: -2px; }

.nav { justify-self: center; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; text-decoration: none; font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--black); }
.nav a[aria-current="page"] { border-bottom-color: var(--yellow); }

.dealer { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.dealer img { height: 40px; width: auto; }
.dealer__txt { font-size: 12px; line-height: 1.2; color: var(--text-2); text-align: left; }

.menu-btn { display: none; background: none; border: 0; width: 48px; height: 48px; padding: 12px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--black); margin: 5px 0; }

@media (max-width: 1080px) {
  .site-header .wrap { grid-template-columns: auto 1fr auto; }
  .menu-btn { display: block; justify-self: end; grid-column: 3; grid-row: 1; }
  .dealer { display: none; }
  .nav { grid-column: 1 / -1; justify-self: stretch; display: none; padding-bottom: 12px; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { border-bottom: 1px solid var(--grey-light); border-left: 3px solid transparent; }
  .nav a[aria-current="page"] { border-left-color: var(--yellow); border-bottom-color: var(--grey-light); }
  .nav .nav-dealer { display: flex; }
}
.nav .nav-dealer { display: none; }

/* ---------- Boutons (p. 24) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 16px; max-width: 280px;
  font: 700 16px/20px var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; border-radius: 0; text-align: center; }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn--super { background: var(--yellow); color: var(--black); }
.btn--super:hover { background: var(--yellow-hover); }
.btn--primary { background: var(--black); color: var(--white); }
.btn--primary:hover { background: var(--yellow); color: var(--black); }
.btn--secondary { background: var(--white); color: var(--black); border-color: var(--black); }
.btn--secondary:hover { background: var(--black); color: var(--white); }
.btn--tertiary { background: var(--white); color: var(--text-2); border-color: var(--grey-light); }
.btn--tertiary:hover { background: var(--text-2); color: var(--white); }
.btn[disabled] { background: var(--disabled); color: var(--grey-dark); border-color: var(--grey-light); cursor: not-allowed; }
.section--dark .btn--secondary { background: transparent; color: var(--white); border-color: var(--white); }
.section--dark .btn--secondary:hover { background: var(--white); color: var(--black); }
.btns { display: flex; flex-wrap: wrap; gap: 9px; }

/* Liens CTA */
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-weight: 700; text-decoration: none;
  background-image: linear-gradient(var(--yellow), var(--yellow)); background-size: 100% 3px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 2px; }
.link:hover { background-image: linear-gradient(var(--black), var(--black)); }
.section--dark .link:hover { background-image: linear-gradient(var(--white), var(--white)); }
.link--chev { background: none; }
.link--chev svg { width: 24px; height: 24px; color: var(--yellow); transition: transform .15s; }
.link--chev:hover { background: none; }
.link--chev:hover svg { color: currentColor; transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--black); color: var(--white); overflow: hidden; }
.hero picture, .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { object-fit: cover; object-position: center 60%; }
.hero .wrap { position: relative; min-height: clamp(520px, 72vh, 760px); display: flex; align-items: flex-end; padding-top: 48px; padding-bottom: clamp(32px, 5vw, 64px); }
.welcome { background: rgba(0,0,0,.72); padding: clamp(24px, 3vw, 40px); max-width: 620px; width: 100%; }
.welcome h1 { margin-bottom: 12px; }
.welcome > p { color: var(--grey-light); font-size: 18px; }
.infos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 24px 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.25); }
.info { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.info svg { width: 24px; height: 24px; flex: none; margin-top: 1px; }
.info strong { display: block; font-weight: 700; }
.info a { text-decoration: none; }
.info a:hover { text-decoration: underline; }
.status { display: inline; font-weight: 700; }
.status::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--grey-dark); margin-right: 8px; vertical-align: 1px; }
.info .status { display: block; }
.nw { white-space: nowrap; }
.status.is-open::before { background: var(--success); }
.status.is-closed::before { background: var(--alert); }
@media (max-width: 640px) { .infos { grid-template-columns: 1fr; } .welcome > p { font-size: 16px; } }

/* Page hero (sous-pages) */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--grey-light); }
.page-hero p { color: var(--text-2); font-size: 18px; }
.crumbs { font-size: 14px; color: var(--text-3); margin-bottom: 16px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--grey-mid); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--grey-light); margin-bottom: 40px; }
.tab { background: none; border: 0; font: 700 16px var(--font); padding: 12px 4px; margin-right: 24px; min-height: 48px; cursor: pointer; color: var(--text-3); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--black); border-bottom-color: var(--yellow); }
.tab:hover { color: var(--black); }

/* ---------- Gamme véhicules neufs ---------- */
.range { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 48px 32px; list-style: none; padding: 0; margin: 0; }
.model { display: flex; flex-direction: column; }
.model__img { aspect-ratio: 16 / 9; background: var(--white); display: grid; place-items: center; margin-bottom: 12px; }
.model__img img { width: 100%; height: 100%; object-fit: contain; }
.model__img .ph { color: var(--grey-dark); font-size: 13px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; min-height: 26px; }
.tag { font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 8px; border: 1px solid var(--grey-mid); color: var(--text-2); }
.tag--ev { border-color: var(--electric); color: var(--text-2); box-shadow: inset 3px 0 0 var(--electric); }
.model h3 { margin: 0 0 4px; font-size: 18px; text-transform: none; }
.model h3 b { font-weight: 800; text-transform: uppercase; }
.model h3 span { font-weight: 400; }
.price { font-size: 15px; margin: 0 0 4px; }
.price strong { font-size: 18px; }
.model .legal { margin-bottom: 12px; }
.model .link { margin-top: auto; align-self: flex-start; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--grey-light); }
.service { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--grey-light); display: flex; gap: 18px; }
.service svg { width: 40px; height: 40px; flex: none; }
.service h3 { font-size: 18px; margin-bottom: 6px; }
.service p { color: var(--text-2); margin: 0; font-size: 15px; }
.section--dark .service { border-color: #3E3F40; }
.section--dark .services { border-color: #3E3F40; }
.section--dark .service p { color: var(--grey-light); }

.service-block { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 32px 0; border-bottom: 1px solid var(--grey-light); }
.service-block svg { width: 48px; height: 48px; }
.service-block h2 { font-size: 24px; }
.service-block ul { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); }

/* ---------- Commitments ---------- */
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; list-style: none; padding: 0; margin: 0; }
.promises li { border-left: 3px solid var(--yellow); padding-left: 16px; }
.promises strong { display: block; font-size: 18px; margin-bottom: 4px; }

/* ---------- Occasions ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; border-left: 4px solid var(--info); background: var(--disabled); padding: 14px 16px; font-size: 14px; color: var(--text-2); margin-bottom: 32px; }
.notice svg { width: 24px; height: 24px; color: var(--info); flex: none; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; align-items: end; padding: 24px; border: 1px solid var(--grey-light); margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field select, .field input, .field textarea { font: 400 16px var(--font); min-height: 48px; padding: 10px 12px; border: 1px solid var(--grey-dark); border-radius: 0; background: var(--white); color: var(--black); width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field select:focus, .field input:focus, .field textarea:focus { outline: 2px solid var(--black); outline-offset: 0; border-color: var(--black); }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.results-bar p { margin: 0; font-weight: 600; }
.stock { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 40px 24px; list-style: none; padding: 0; margin: 0; }
.car { display: flex; flex-direction: column; }
.car[hidden] { display: none; }
.car__media { position: relative; aspect-ratio: 4 / 3; background: var(--grey-light); margin-bottom: 14px; overflow: hidden; }
.car__media img { width: 100%; height: 100%; object-fit: cover; }
.car__label { position: absolute; left: 0; top: 0; background: var(--black); color: var(--white); font-size: 12px; font-weight: 700; padding: 6px 10px; }
.photo-ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); font-size: 13px; padding: 16px; }
.photo-ph svg { width: 40px; height: 40px; }
.car h3 { font-size: 17px; margin-bottom: 2px; }
.car h3 b { font-weight: 800; text-transform: uppercase; }
.car .version { color: var(--text-2); font-size: 14px; margin: 0 0 6px; }
.car .specs-line { color: var(--text-3); font-size: 14px; margin: 0 0 12px; }
.car .price { margin-bottom: 14px; }
.car .btn { margin-top: auto; align-self: flex-start; }
.empty { padding: 40px 0; }

/* Fiche véhicule */
.vd { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 48px; align-items: start; }
.vd__gallery .main { aspect-ratio: 4 / 3; background: var(--grey-light); }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.thumbs span { aspect-ratio: 4 / 3; background: var(--grey-light); display: block; }
.vd__aside { position: sticky; top: calc(var(--header-h) + 24px); border: 1px solid var(--grey-light); padding: 28px; }
.vd__aside .price strong { font-size: 32px; font-weight: 800; }
.keyfacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; padding: 20px 0; border-top: 1px solid var(--grey-light); border-bottom: 1px solid var(--grey-light); }
.keyfacts div { font-size: 14px; color: var(--text-3); }
.keyfacts b { display: block; color: var(--black); font-size: 16px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 32px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--grey-light); font-size: 15px; vertical-align: top; }
.spec-table th { font-weight: 400; color: var(--text-3); width: 45%; }
.eq { columns: 2 240px; column-gap: 32px; padding-left: 20px; margin: 0 0 32px; color: var(--text-2); }
.eq li { margin-bottom: 6px; break-inside: avoid; }
.usp { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.usp li { border-left: 3px solid var(--yellow); padding-left: 14px; }
.contact-mini { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--grey-light); font-size: 15px; }
.contact-mini p { margin: 0 0 6px; }
@media (max-width: 900px) { .vd { grid-template-columns: 1fr; } .vd__aside { position: static; } .keyfacts { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Contact / horaires ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.hours caption { text-align: left; font-weight: 700; font-size: 18px; padding-bottom: 8px; }
.hours th, .hours td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--grey-light); font-weight: 400; font-size: 15px; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.section--dark .hours th, .section--dark .hours td { border-color: #3E3F40; }
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--black); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.form-msg { padding: 14px 16px; border-left: 4px solid var(--success); background: var(--disabled); font-weight: 600; }
.err { color: var(--alert); font-size: 14px; }
.map-link { display: block; aspect-ratio: 16 / 9; background: var(--grey-light); position: relative; text-decoration: none; }
.map-link span { position: absolute; left: 16px; bottom: 16px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--grey-light); }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 18px; padding: 20px 40px 20px 0; position: relative; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 26px; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq details > p { color: var(--text-2); padding-bottom: 20px; margin: 0; }

/* ---------- Pré-footer / footer ---------- */
.prefooter { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.prefooter a { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; }
.prefooter svg { width: 40px; height: 40px; flex: none; }
.prefooter strong { display: block; font-size: 17px; }
.prefooter span { color: var(--text-2); font-size: 14px; }
.prefooter a:hover strong { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }

.site-footer { background: var(--black); color: var(--white); padding: 56px 0 32px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 16px; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; color: var(--grey-light); }
.site-footer li a:hover { color: var(--white); text-decoration: underline; }
.site-footer .social { display: flex; gap: 8px; margin-top: 12px; }
.site-footer .social a { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #3E3F40; color: var(--white); }
.site-footer .social a:hover { border-color: var(--yellow); }
.site-footer .social svg { width: 22px; height: 22px; }
.site-footer .bottom { border-top: 1px solid #3E3F40; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--grey-mid); font-size: 13px; }
.site-footer .bottom a { color: var(--grey-mid); }

/* ---------- Bannière cookies (LPD) ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 760px; margin: 0 auto; background: var(--white); color: var(--black); border: 1px solid var(--black); padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; font-size: 14px; color: var(--text-2); }
@media (max-width: 640px) { .cookie { grid-template-columns: 1fr; } }

/* ---------- Page neutre (multimarque) ---------- */
.neutral-header .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 86px; }
.neutral-header img { height: 44px; width: auto; }
.brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 720px) { .brands { grid-template-columns: 1fr; } }
.brand-card { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 260px; padding: 32px; border: 1px solid var(--grey-light); text-decoration: none; }
.brand-card:hover { border-color: var(--black); }
.brand-card .logo { height: 72px; display: flex; align-items: center; }
.brand-card .logo img { max-height: 72px; width: auto; }
.brand-card strong { font-size: 20px; display: block; }
.partners { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.partners img { height: 40px; width: auto; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
