/* ==========================================================================
   LIVING RACING SA — feuille de style unique
   Thème sombre sobre : rail de navigation, compartiments à filets fins,
   accent rouge. Pas de framework, pas de dépendance externe.
   ========================================================================== */

@font-face {
  /* Hanken Grotesk 700, police du logo MotorOS (motoros.ch), licence OFL :
     voir HANKEN-OFL.txt. Réduite aux seules lettres de « MotorOS » (1 Ko) :
     elle ne sert qu'au logo du partenaire. */
  font-family: 'Hanken Grotesk MotorOS';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-700-motoros.woff2') format('woff2');
}

@font-face {
  /* Saira Condensed : caractere d'affichage. L'etroitesse est ce qui signe
     l'automobile en typographie — numeros de course, ecrans de chronometrage —
     la ou le decor ferait pastiche. Mesuree 33 % plus etroite qu'Archivo, avec
     un meilleur rapport hauteur/largeur (1,14 contre 0,90) : elle reste donc
     lisible en petit corps. « block » et non « swap » : le titre change trop de
     largeur entre la police de repli et celle-ci, un echange visible ferait
     sauter la mise en page. */
  font-family: 'Saira Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('../fonts/saira-condensed-600-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600-latin.woff2') format('woff2');
}

/* Hauteur de la barre haute. Elle sert au calcul des sauts d'ancre : sans
   elle, une section rejointe depuis le menu se glisse sous la barre. Mesurée
   à 110 px sous 390 px de large, 105 px jusqu'à 760, 76 px au-delà. */
/* Unites de hauteur : « svh » et non « dvh ».
   « dvh » suit en continu la retraction de la barre d'adresse sur iOS : la page
   se remet en page a chaque image de defilement, ce qui donne des a-coups et
   fait sauter le contenu. « svh » est fige sur la plus petite hauteur possible
   et ne bouge jamais. La ligne « vh » qui precede sert de repli aux navigateurs
   qui ignorent « svh ». */
:root {
  --p-rail-h: 76px;
}

@media (max-width: 760px) {
  :root {
    --p-rail-h: 110px;
  }
}

/* « scroll-padding-top » sur le conteneur de défilement plutôt qu'une marge sur
   chaque section : une seule règle couvre tous les ancrages, y compris le lien
   d'évitement. */
html {
  scroll-padding-top: calc(var(--p-rail-h) + 0.75rem);
}

:root {
  --p-bg: #1a1a1e;
  --p-panel: #232329;
  --p-line: #34343c;
  --p-line-hi: #4b4b55;
  --p-text: #eaeaea;
  --p-muted: #9a9aa6;
  --p-faint: #93939e;
  --p-red: #e72f2a;
  --p-red-solid: #c9231e;
  --p-green: #4af626;
  /* Rouge réservé au TEXTE. Le rouge de marque est trop sombre pour être lu
     sur ce fond ; cette teinte tient l'AA jusque sous le grain (4,55:1 au
     pire point mesuré). Ne pas la remplacer par --p-red. */
  --p-red-text: #ff5f54;
  --p-display: 'Saira Condensed', 'Segoe UI Condensed', 'Segoe UI', system-ui, sans-serif;
  --p-body: 'Inter', system-ui, sans-serif;
  --p-rail: 216px;
  --p-ease: cubic-bezier(0.28, 0.11, 0.24, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-text);
  font-family: var(--p-body);
  font-size: 1.02rem;
  line-height: 1.72;
  overflow-x: hidden;
}

/* Vignetage : la page s'assombrit vers les bords, comme un tirage photo.
   Il fonce le fond, donc il ne peut qu'améliorer le contraste du texte clair. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 299;
  pointer-events: none;
  background: radial-gradient(
    128% 92% at 50% 38%,
    transparent 52%,
    rgba(0, 0, 0, 0.42) 100%
  );
}

/* Grain argentique : deux fréquences superposées pour éviter le motif
   régulier d'un bruit unique, et un peu plus présent qu'un simple anti-aplat. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
  background-size: 180px 180px, 90px 90px;
  /* Repli si la fusion n'est pas gérée : un grain faible en opacité simple,
     car à cette dose une superposition normale écraserait les contrastes. */
  opacity: 0.08;
}

/* En fusion « incrustation », le grain module la matière au lieu de voiler
   la page : il peut être bien plus présent sans coûter en lisibilité.
   Dose retenue après mesure sur le bruit réel — voir les rouges ci-dessus. */
@supports (mix-blend-mode: overlay) {
  body::after {
    opacity: 0.45;
    mix-blend-mode: overlay;
  }
}

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

/* Fins de ligne : les titres s'équilibrent, les paragraphes évitent le mot
   seul sur la dernière ligne. */
h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

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

:focus-visible {
  outline: 2px solid var(--p-red);
  outline-offset: 3px;
}

::selection {
  background: var(--p-red-solid);
  color: #fff;
}

.p-skip {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 400;
  padding: 0.7rem 1.2rem;
  background: var(--p-red-solid);
  color: #fff;
  font-size: 0.85rem;
}

.p-skip:focus {
  top: 1rem;
}

/* Texte destine aux seuls lecteurs d ecran (mention « nouvel onglet »). */
.p-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Barre de navigation haute -------------------------------------------
   Le rail vertical a laissé place à une barre fine en haut de page : c'est la
   première chose qui distingue un site de constructeur d'un site technique.
   Les classes gardent leur nom `p-rail` pour ne pas toucher aux 16 pages. */
.p-rail {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Sa propre couche de composition : sans cela, Safari iOS laisse des
     fantômes de l'ancien contenu au-dessus de la barre pendant que sa propre
     interface se rétracte au défilement. */
  transform: translateZ(0);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  width: 100%;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  min-height: 76px;
  background: rgba(26, 26, 30, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--p-line);
}

.p-rail__logo {
  display: block;
  padding: 0.4rem 0;
  flex: 0 0 auto;
}

.p-rail__logo img {
  width: auto;
  height: 26px;
}

/* La signature sous le logo n'a plus de place dans une barre */
.p-rail__tag {
  display: none;
}

.p-rail__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.6vw, 1.6rem);
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.p-rail__nav::-webkit-scrollbar {
  display: none;
}

.p-rail__nav a {
  position: relative;
  padding: 0.5rem 0.15rem;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--p-muted);
  border: 0;
  transition: color 0.2s;
}

.p-rail__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--p-red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s var(--p-ease);
}

.p-rail__nav a:hover {
  color: var(--p-text);
  background: none;
}

.p-rail__nav a:hover::after,
.p-rail__nav a.is-active::after,
.p-rail__nav a[aria-current='page']::after {
  transform: scaleX(1);
}

.p-rail__nav a.is-active,
.p-rail__nav a[aria-current='page'] {
  color: var(--p-text);
}

/* Liens secondaires : repoussés à droite, discrets */
.p-rail__sub {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-left: auto;
  padding: 0;
  border: 0;
  font-size: 0.82rem;
}

.p-rail__sub a {
  color: var(--p-muted);
  white-space: nowrap;
  padding: 0.2rem 0;
  transition: color 0.2s;
}

.p-rail__sub a:hover {
  color: var(--p-red-text);
}

.p-rail__foot {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--p-muted);
}

.p-rail__foot > a {
  padding: 0.2rem 0;
  color: var(--p-text);
  white-space: nowrap;
}

.p-rail__foot a:hover {
  color: var(--p-red-text);
}

.p-lang {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.p-lang a {
  padding: 0.4rem 0.45rem;
  min-width: 2.1rem;
  text-align: center;
  color: var(--p-muted);
}

.p-lang a[aria-current='true'] {
  color: var(--p-text);
}

.p-lang a:not([aria-current]):hover {
  color: var(--p-text);
}

/* L'indicateur d'ouverture n'a plus sa place dans la barre : il reste dans
   le pied de page, où il est lu au moment utile. */
.p-rail .p-status {
  display: none;
}

.p-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.p-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--p-green);
}

.p-status.is-closed .dot {
  background: var(--p-red);
}

/* ----- Zone principale ----- */
.p-main {
  min-height: 100vh;
  min-height: 100svh;
}

.p-sec {
  position: relative;
  /* La mesure de lecture est bornée par le RETRAIT, pas par la largeur : la
     section reste pleine largeur, donc son fond couvre tout l'écran, tandis
     que le contenu ne dépasse jamais 1400 px. Contraindre la largeur créait
     un rectangle plus clair flottant au milieu de la page.
     Le rembourrage bas est légèrement supérieur au haut — correction optique. */
  padding-block: clamp(3.5rem, 7vw, 7rem) clamp(4rem, 7.6vw, 7.6rem);
  padding-inline: max(clamp(1.5rem, 5vw, 4.5rem), (100% - 1400px) / 2);
}

/* Séparateur en filet dégradé plutôt qu'un trait net d'un bord à l'autre :
   il s'éteint sur les côtés, ce qui pose la page au lieu de la découper. */
.p-sec::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--p-line) 9%,
    var(--p-line) 91%,
    transparent 100%
  );
}

/* Alternance très légère : donne du rythme sans créer de rupture. L'écart
   avec le fond est trop faible pour modifier les contrastes mesurés. */
.p-main > .p-sec:nth-of-type(even):not(.p-hero) {
  background: #1e1e23;
}

.p-sec__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

/* L'ordre visuel inverse l'ordre du code : le petit intitulé passe au-dessus
   du titre, comme sur les pages de constructeur. */
.p-sec__ref {
  order: 1;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--p-faint);
  margin: 0;
}

.p-sec__head h2 {
  order: 2;
  font-family: var(--p-display);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

.p-sec__head::after {
  content: '';
  order: 3;
  position: static;
  width: 56px;
  height: 3px;
  margin-top: 0.5rem;
  background: var(--p-red);
}

.p-sec__head[data-prv]::after {
  width: 0;
}

.p-sec__head[data-prv].on::after {
  width: 56px;
  transition: width 0.75s var(--p-ease) 0.15s;
}

.p-sec__lede {
  max-width: 60ch;
  color: var(--p-muted);
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  text-align: center;
}

/* ----- Ouverture : la photo porte la page ----- */
.p-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: min(86vh, 760px);
  min-height: min(86svh, 760px);
  padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 6vw, 5rem);
  padding-inline: max(clamp(1.5rem, 5vw, 4.5rem), (100% - 1400px) / 2);
}

.p-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.p-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  /* Travelling tres lent : le cadre se resserre sur la scene. */
  animation: p-travelling 20s var(--p-ease) both;
}

@keyframes p-travelling {
  from {
    transform: scale(1.09);
  }
  to {
    transform: scale(1);
  }
}

/* Double voile — un horizontal côté texte, un vertical vers le bas. La
   lisibilité ne dépend jamais du pixel de la photo situé dessous : là où
   le texte se pose, l'opacité cumulée dépasse 0,95. La photo reste visible
   en haut à droite, où rien n'est écrit. */
.p-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(26, 26, 30, 0.93) 0%,
      rgba(26, 26, 30, 0.6) 55%,
      rgba(26, 26, 30, 0.34) 100%
    ),
    linear-gradient(
      180deg,
      rgba(26, 26, 30, 0.3) 0%,
      rgba(26, 26, 30, 0.7) 45%,
      rgba(26, 26, 30, 0.95) 85%,
      var(--p-bg) 100%
    );
}

.p-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 60rem;
}

/* Sur photo, les gris de la charte perdent trop de contraste : les textes
   de l'ouverture sont éclaircis. */
.p-hero__meta {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d6d6da;
  margin: 0 0 1.6rem;
}

.p-hero h1 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 0 0 1.6rem;
}

/* Filet rouge sous le titre principal */
.p-hero h1::after,
.p-phero h1::after,
.p-404 h1::after {
  content: '';
  display: block;
  width: 76px;
  height: 4px;
  background: var(--p-red);
  margin-top: 1.4rem;
}

.p-phero h1::after {
  height: 3px;
  margin-top: 1.1rem;
}


.p-hero__base {
  max-width: 54ch;
  color: #d0d0d6;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  margin: 0 0 2.2rem;
}

.p-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.25rem;
}

/* Accueil : le numéro reste sur sa ligne, les deux boutons se rangent dessous,
   au bord gauche du texte. Sans ce groupe, le second bouton passait seul à la
   ligne dès que la colonne était trop étroite pour les trois éléments. */
.p-hero__btns {
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Bouton placé sous une adresse, dans une cellule de coordonnées. */
.p-cell address + .p-cta {
  margin-top: 0.5rem;
}

.p-tel {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  letter-spacing: -0.01em;
  transition: color 0.18s;
}

.p-tel:hover {
  color: var(--p-red-text);
}

.p-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--p-red-solid);
  color: #fff;
  /* Un <button> n'hérite pas de la police du document, contrairement à un <a> :
     sans cette ligne, le bouton d'envoi du formulaire s'affichait en Arial
     alors que tous les autres appels à l'action étaient en Inter. */
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--p-red-solid);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.p-cta:hover {
  background: var(--p-text);
  border-color: var(--p-text);
  color: var(--p-bg);
}

.p-cta:active {
  transform: scale(0.97);
}

.p-cta--ghost {
  background: transparent;
  border-color: var(--p-line-hi);
  color: var(--p-text);
}

.p-cta--ghost:hover {
  background: var(--p-text);
  color: var(--p-bg);
}

/* ----- En-tête de page intérieure ----- */
.p-phero {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.p-crumbs {
  font-size: 0.85rem;
  color: var(--p-faint);
  margin: 0 0 1.3rem;
}

.p-crumbs a {
  color: var(--p-muted);
  transition: color 0.18s;
}

.p-crumbs a:hover {
  color: var(--p-red-text);
}

.p-phero h1 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6.5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.018em;
  margin: 0 0 1.3rem;
}

.p-phero__base {
  max-width: 58ch;
  color: var(--p-muted);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  margin: 0;
}

/* Le <picture> n'est qu'un aiguillage de format : sans ceci il ajoute une
   boîte en ligne autour de l'image, qui décalerait la mise en page. */
picture {
  display: contents;
}

/* ----- Photo : cadrage large, sans encadrement lourd ----- */
.p-media figure {
  margin: 0;
}

.p-media img {
  width: 100%;
  height: clamp(340px, 62vh, 680px);
  object-fit: cover;
  object-position: center 42%;
}

.p-media figcaption {
  padding: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--p-muted);
}

/* ----- Compartiments à filets fins ----- */
/* Les rangées de tableau laissent place à des tuiles : on parcourt une
   gamme, on ne lit pas un inventaire. Les fiches détaillées (.p-doc) gardent
   la pleine largeur. */
.p-table {
  display: grid;
  gap: 1px;
  background: var(--p-line);
  border: 1px solid var(--p-line);
}

@supports selector(:has(*)) {
  .p-table:has(.p-row) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  }

  /* Quatre véhicules : des fiches plus étroites pour tenir sur une ligne. */
  .p-table.p-stock:has(.p-row) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
  }

  /* Les prestations, elles, restent en pleine largeur : une prestation se lit,
     elle ne se compare pas comme un véhicule. */
  .p-table.p-services:has(.p-row) {
    grid-template-columns: 1fr;
  }
}

/* ----- Prestations : des lignes, pas des tuiles ----------------------------
   Le carré tasse la description ; la ligne pleine largeur la laisse respirer
   à côté de son intitulé. « display: contents » sur l'enveloppe fait passer le
   titre et le texte en cellules de la grille de la ligne, sans rien changer au
   HTML ni à l'ordre de lecture. */
.p-services .p-row {
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto auto;
  grid-template-rows: auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 0;
  padding-block: clamp(1.5rem, 2.8vw, 2rem);
}

.p-services .p-row .body {
  display: contents;
}

.p-services .p-row h3 {
  margin: 0;
}

.p-services .p-row p {
  margin: 0;
  max-width: 52ch;
}

/* La pastille était ancrée en bas de la piste souple, ce qui n'a plus de sens
   sur une seule ligne. */
.p-services .p-row .tag,
.p-services .p-row .arr {
  align-self: center;
}

/* Sous 760 px, la ligne se replie : intitulé et pastille sur la première
   rangée, description en dessous, flèche en pied. */
@media (max-width: 760px) {
  .p-services .p-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.55rem 1rem;
  }

  .p-services .p-row h3 {
    grid-column: 1;
    grid-row: 1;
  }

  .p-services .p-row .tag {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .p-services .p-row p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .p-services .p-row .arr {
    grid-column: 1;
    grid-row: 3;
  }
}

.p-row {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.2rem;
  background: var(--p-bg);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  min-height: 14rem;
  transition: background 0.25s, transform 0.25s;
}

/* La piste du milieu est souple : ancrer la pastille en bas de cette piste
   aligne les pastilles entre tuiles, quelle que soit la longueur du texte. */
.p-row .tag {
  align-self: end;
  justify-self: start;
}

.p-row .arr {
  justify-self: start;
  font-size: 1.3rem;
}

/* Au survol, une arête rouge apparaît sur le bord d'attaque de la ligne.
   Ombre intérieure : aucun décalage de mise en page. */
a.p-row:hover {
  background: var(--p-panel);
  box-shadow: inset 0 3px 0 var(--p-red);
}

a.p-row:active {
  background: #2a2a31;
}

.p-row h3 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.15rem;
}

.p-row p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--p-muted);
}

.p-row .tag {
  font-size: 0.78rem;
  color: var(--p-muted);
  border: 1px solid var(--p-line-hi);
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}

.p-row .arr {
  color: var(--p-red-text);
  transition: transform 0.18s;
}

a.p-row:hover .arr {
  transform: translateX(4px);
}

/* ----- Carrousel des véhicules ----------------------------------------------
   Bande qui défile horizontalement, bâtie sur le défilement natif et son
   accrochage : sans JavaScript elle reste parcourable au doigt, à la molette
   et au clavier. Le script n'ajoute que l'avance automatique et les boutons.
   La spécificité doit dépasser celle de « .p-table.p-stock:has(.p-row) », qui
   impose une grille — d'où les trois classes et l'attribut. */
.p-table.p-stock[data-carrousel] {
  position: relative;
  display: flex;
  grid-template-columns: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* Ni accrochage ni défilement animé par la feuille de style : le ruban avance
     en continu, image par image, et l'un comme l'autre le tireraient en arrière.
     Les boutons, eux, demandent explicitement un défilement animé. */
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.p-table.p-stock[data-carrousel]::-webkit-scrollbar {
  display: none;
}

/* Le ruban proprement dit. Il est déplacé par une transformation animée et non
   en écrivant sa position de défilement image par image : sur iOS, écrire cette
   position passe par le fil principal et le défilement saccade. Une
   transformation, elle, est prise en charge par le compositeur — c'est la seule
   technique réellement fluide sur mobile. */
.p-carr__ruban {
  display: flex;
  width: max-content;
  gap: 1px;
  animation: p-ruban var(--p-duree, 90s) linear infinite;
  will-change: transform;
}

.p-carr__ruban.est-arrete {
  animation-play-state: paused;
}

@keyframes p-ruban {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--p-tour, 0px)), 0, 0); }
}

.p-table.p-stock[data-carrousel] > .p-carr__ruban > .p-row {
  flex: 0 0 clamp(15rem, 24vw, 20rem);
}

/* Sur téléphone, une fiche un peu plus large laisse respirer les trois
   caractéristiques : « 147'900 » ne touche plus la colonne suivante. */
@media (max-width: 760px) {
  .p-table.p-stock[data-carrousel] > .p-carr__ruban > .p-row {
    flex-basis: 17.5rem;
  }
}

/* Les commandes ne sont posées que par le script : sans lui elles ne feraient
   rien, elles n'ont donc pas leur place dans le balisage. */
.p-carr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.p-carr button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  background: none;
  border: 1px solid var(--p-line-hi);
  color: var(--p-text);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.p-carr button:hover {
  background: var(--p-text);
  border-color: var(--p-text);
  color: var(--p-bg);
}



/* Qui demande moins d'animations n'aura pas d'avance automatique (le script s'en
   charge) ni de défilement animé. */
/* Qui demande moins d'animations n'aura pas de ruban : la bande redevient une
   simple liste que l'on parcourt soi-même, avec accrochage sur les fiches. */
@media (prefers-reduced-motion: reduce) {
  .p-carr__ruban {
    animation: none;
  }

  .p-table.p-stock[data-carrousel] {
    scroll-snap-type: x proximity;
  }

  .p-table.p-stock[data-carrousel] > .p-carr__ruban > .p-row {
    scroll-snap-align: start;
  }
}

/* À l'impression, la bande redevient une liste : on ne défile pas sur papier. */
@media print {
  .p-table.p-stock[data-carrousel] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }

  .p-carr {
    display: none;
  }
}

/* ----- Véhicules : fiches de gamme ----- */
.p-stock .p-row {
  grid-template-columns: repeat(3, 1fr);
  /* vignette · intitulé · caractéristiques (souple) · prix.
     La piste souple pousse le prix en bas, ce qui aligne les prix d'une fiche
     à l'autre quelle que soit la longueur de l'intitulé. */
  grid-template-rows: auto auto 1fr auto;
  gap: 1.1rem 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* La vignette est à fond perdu en haut de la fiche : les marges négatives
   annulent le rembourrage de la fiche, sans le retirer au reste du contenu. */
.p-stock .vign {
  grid-column: 1 / -1;
  display: block;
  margin: calc(-1 * clamp(1.6rem, 3vw, 2.2rem)) calc(-1 * clamp(1.6rem, 3vw, 2.2rem)) 0.2rem;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--p-panel);
}

.p-stock .vign img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--p-ease);
}

a.p-row:hover .vign img {
  transform: scale(1.04);
}

/* Le titre vient de l'annonce : selon le modèle il tient sur une ligne ou sur
   deux. Réserver deux lignes garde les caractéristiques et les prix alignés
   d'une fiche à l'autre — sans cela, une fiche au titre long décale tout son
   contenu vers le bas et la bande paraît bancale. */
.p-stock .p-row h3 {
  line-height: 1.3;
  min-height: 2.6em;
}

/* Mention de l'annonce (préparation, provenance…) sous l'intitulé.
   La ligne est écrite même lorsqu'elle est vide, et sa hauteur est réservée :
   sans cela, une fiche sans mention remonte ses caractéristiques d'une ligne et
   rompt l'alignement avec ses voisines. */
.p-stock .ment {
  display: block;
  margin-top: 0.3rem;
  min-height: 1.3em;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--p-muted);
}

.p-stock .body,
.p-stock .prix {
  grid-column: 1 / -1;
}

.p-stock .lbl {
  color: var(--p-faint);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}

.p-stock .spec {
  align-self: start;
  font-size: 0.92rem;
}

.p-stock .prix {
  color: var(--p-text);
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
  align-self: end;
}

.p-note {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  color: var(--p-muted);
}

.p-note a {
  color: var(--p-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-note a:hover {
  color: var(--p-red-text);
}

/* ----- Fiche prestation (page Services) ----- */
.p-doc {
  background: var(--p-bg);
  padding: clamp(1.5rem, 3vw, 2.3rem) 1.2rem;
}

.p-doc h3 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
}

.p-doc > p {
  max-width: 62ch;
  color: var(--p-muted);
  margin: 0 0 1.2rem;
}

.p-chips {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.p-chips li {
  font-size: 0.82rem;
  color: var(--p-muted);
  border: 1px solid var(--p-line-hi);
  padding: 0.35rem 0.7rem;
}

/* ----- Questions fréquentes (page Services) --------------------------------
   Des <details> natifs : ouverts ou fermés, le texte reste dans la page pour
   les moteurs, et rien ne dépend de JavaScript. */
.p-faq {
  border-top: 1px solid var(--p-line);
}

.p-faq details {
  border-bottom: 1px solid var(--p-line);
}

.p-faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0.2rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.p-faq summary::-webkit-details-marker {
  display: none;
}

.p-faq summary::after {
  content: '+';
  flex: 0 0 auto;
  font-family: var(--p-body);
  font-weight: 400;
  color: var(--p-red-text);
}

.p-faq details[open] summary::after {
  content: '\2212';
}

.p-faq summary:hover {
  color: var(--p-red-text);
}

.p-faq details > p {
  max-width: 68ch;
  margin: 0;
  padding: 0 0.2rem 1.3rem;
  color: var(--p-muted);
}

.p-faq details > p a {
  color: var(--p-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-faq details > p a:hover {
  color: var(--p-red-text);
}

/* ----- Chiffres clés : une ligne de specs, séparée par des filets ----------
   C'est le tic de présentation des constructeurs : grands chiffres, petits
   intitulés, colonnes séparées par un trait fin. */
.p-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0;
  background: none;
  border: 0;
  border-block: 1px solid var(--p-line);
}

.p-stat {
  background: none;
  text-align: center;
  padding: clamp(2rem, 4vw, 3.2rem) 1rem;
  border-left: 1px solid var(--p-line);
}

.p-stat:first-child {
  border-left: 0;
}

.p-stat dt {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--p-faint);
  margin-bottom: 0.9rem;
}

.p-stat dd {
  margin: 0;
}

.p-stat dd b {
  display: block;
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.p-stat dd span {
  display: block;
  font-size: 0.88rem;
  color: var(--p-muted);
}

/* Repères faits de mots et non de chiffres (page Partenaires) : un mot long
   comme « Quotidiennement » dépassait de sa case de 36 px à la taille des
   chiffres. Mesuré : il lui faut au plus 1/5,9 de la largeur utile. */
.p-stats--mots .p-stat dd b {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

/* Un bouton placé juste sous les repères touchait leur filet du bas. */
.p-stats + .p-hero__row {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
}

/* ----- Phrases d'accroche ----- */
.p-claims {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.8rem, 4vw, 3.2rem);
  background: none;
  border: 0;
}

.p-claims li {
  background: none;
  padding: 0;
}

.p-claims b {
  display: block;
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.p-claims b::before {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  background: var(--p-red);
  margin-bottom: 1rem;
}

.p-claims span {
  display: block;
  color: var(--p-muted);
  font-size: 0.92rem;
}

/* ----- Coordonnées en cellules ----- */
.p-contact {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--p-line);
  border: 1px solid var(--p-line);
}

/* Coordonnées de la vente, sous la bande de véhicules */
.p-contact--vente {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.6rem;
}

.p-cell {
  background: var(--p-bg);
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
}

.p-cell dt {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--p-faint);
  margin-bottom: 0.55rem;
}

.p-cell dd {
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.p-cell dd:last-child {
  margin-bottom: 0;
}

.p-cell address {
  font-style: normal;
  margin-bottom: 0.6rem;
}

.p-cell dd + dt {
  margin-top: 1.7rem;
}

/* Horaires : le jour au-dessus des heures, sur toutes les lignes, pour qu'elles
   s'alignent. Dans le balisage, chaque plage horaire est liée par des espaces
   insécables : si la colonne est étroite, la coupure tombe entre deux plages. */
.p-h,
.p-h > span {
  display: block;
}

.p-h + .p-h {
  margin-top: 0.45rem;
}

/* Un numéro ou une adresse e-mail se lit d'un bloc, sans coupure en fin de ligne. */
a[href^="tel:"],
a[href^="mailto:"] {
  white-space: nowrap;
}

.p-footer__qui {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--p-text);
}

@media (max-width: 760px) {
  /* Cibles plus confortables au doigt, et lignes moins serrées. */
  .p-cell a[href^="tel:"],
  .p-cell a[href^="mailto:"] {
    display: inline-block;
    padding-block: 0.25rem;
  }
}

.p-cell a:hover {
  color: var(--p-red-text);
}

/* ----- Horaires ----- */
.hours {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--p-line);
  border: 1px solid var(--p-line);
}

.hours__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  background: var(--p-bg);
  padding: 0.85rem 1.1rem;
  border-left: 2px solid transparent;
  font-size: 0.92rem;
}

.hours__row dt {
  color: var(--p-muted);
}

.hours__row dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hours__row--closed dd {
  color: var(--p-faint);
}

.hours__row.is-today {
  border-left-color: var(--p-red);
  background: var(--p-panel);
}

.hours__row.is-today dt {
  color: var(--p-text);
}

/* ----- Formulaire ----- */
/* Arête haute éclairée : un panneau qui prend la lumière par le haut, comme
   une surface réelle. Détail de finition, invisible mais senti. */
.p-form {
  border: 1px solid var(--p-line);
  background: var(--p-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: clamp(1.6rem, 3.2vw, 2.5rem);
}

.p-form h2 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
}

.p-form__lede {
  font-size: 0.92rem;
  color: var(--p-muted);
  margin: 0 0 1.7rem;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  color: var(--p-muted);
}

.req {
  color: var(--p-red-text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--p-bg);
  border: 1px solid var(--p-line-hi);
  border-radius: 0;
  color: var(--p-text);
  font-family: var(--p-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.8rem;
  transition: border-color 0.18s;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239a9aa6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--p-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--p-red);
}

/* Le contour n'est effacé qu'au clic. Au clavier il reste le seul repère
   fiable : le passage de bordure gris chaud à rouge brique est un simple
   changement de teinte entre deux couleurs sombres, que distingue mal une
   personne daltonienne. */
.field input:focus:not(:focus-visible),
.field select:focus:not(:focus-visible),
.field textarea:focus:not(:focus-visible) {
  outline: none;
}

.field ::placeholder {
  color: var(--p-faint);
  opacity: 1;
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.3rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--p-muted);
}

.form__consent input {
  margin-top: 0.25rem;
  accent-color: var(--p-red-solid);
}

.form__consent a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form__consent a:hover {
  color: var(--p-red-text);
}

.form__status {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.form__status[data-state='pending'] {
  color: var(--p-muted);
}

.form__status[data-state='ok'] {
  color: var(--p-text);
  border-left: 2px solid var(--p-red);
  padding-left: 0.8rem;
}

.form__status[data-state='error'] {
  color: var(--p-red-text);
}

.p-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.p-contact-grid .p-contact {
  grid-template-columns: 1fr;
}

/* Deux tableaux d'horaires : l'atelier et le showroom n'ont pas les mêmes */
.hours__titre {
  margin: 1.7rem 0 0.6rem;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--p-faint);
}

/* ----- Plan d'accès ----- */
/* ----- Itinéraires (page Contact) -------------------------------------------
   Un bouton Google Maps et une carte par adresse : l'atelier et le showroom
   ne sont pas au même endroit, et l'itinéraire est ce que l'on vient chercher
   ici. Les cartes sont celles de Google, d'où « frame-src » dans la politique
   de sécurité des pages et la mention dans la politique de confidentialité. */
.p-acces {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1px;
  background: var(--p-line);
  border: 1px solid var(--p-line);
  margin-bottom: clamp(1.2rem, 2.5vw, 1.8rem);
}

.p-acces__lieu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--p-bg);
  padding: clamp(1.3rem, 2.6vw, 1.9rem) clamp(1.1rem, 2.4vw, 1.6rem);
}

.p-acces__lieu h3 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  letter-spacing: -0.015em;
  margin: 0;
}

.p-acces__lieu address {
  font-style: normal;
  color: var(--p-muted);
  margin: 0 0 0.3rem;
}

@media (max-width: 560px) {
  .p-acces .p-cta {
    width: 100%;
    justify-content: center;
  }
}

.p-acces__carte {
  align-self: stretch;
  margin-top: 0.4rem;
  border: 1px solid var(--p-line);
  background: var(--p-panel);
}

.p-acces__carte iframe {
  display: block;
  width: 100%;
  height: clamp(280px, 42vh, 400px);
  border: 0;
}

/* ----- Texte long (mentions légales) ----- */
.p-prose {
  max-width: 66ch;
}

.p-prose h2 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--p-line-hi);
  padding-bottom: 0.5rem;
  margin: 2.6rem 0 1rem;
}

.p-prose h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--p-text);
  margin: 1.8rem 0 0.6rem;
}

.p-prose p,
.p-prose li {
  color: var(--p-muted);
  font-size: 0.95rem;
}

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

.p-prose a {
  color: var(--p-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-prose a:hover {
  color: var(--p-red-text);
}

/* ----- Page 404 ----- */
.p-404 {
  min-height: 62vh;
  min-height: 62svh;
  display: grid;
  align-content: center;
}

.p-404__code {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--p-line-hi);
  margin: 0 0 1.4rem;
}

.p-404 h1 {
  font-family: var(--p-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.p-404 .p-hero__row {
  margin-top: 2rem;
}

/* ----- Pied de page ----- */
/* Sorti de <main> pour etre expose comme repere « contentinfo » : il doit
   donc reprendre lui-meme le decalage du rail. */
.p-footer {
  border-top: 1px solid var(--p-line);
}

.p-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: clamp(1.8rem, 4vw, 3.2rem);
  padding-block: clamp(2.8rem, 5vw, 4.5rem);
  padding-inline: max(clamp(1.5rem, 5vw, 4.5rem), (100% - 1400px) / 2);
}

/* Accueils : la section Contact, juste au-dessus, donne déjà adresses,
   téléphones et horaires. Le pied de page n'y garde que ses deux colonnes de
   liens, à leur largeur habituelle plutôt qu'étirées sur toute la page. */
.p-footer__grid--liens {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 260px));
}

/* Sur téléphone, les deux colonnes de liens restent côte à côte. */
@media (min-width: 360px) and (max-width: 640px) {
  .p-footer__grid--liens {
    grid-template-columns: 1fr 1fr;
  }
}

.p-footer__cell {
  background: none;
  padding: 0;
}

.p-footer__cell h2 {
  font-weight: 500;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--p-faint);
  margin: 0 0 1.2rem;
}

.p-footer__cell address,
.p-footer__cell p {
  font-style: normal;
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  color: var(--p-muted);
}

.p-footer__cell address:last-child,
.p-footer__cell p:last-child {
  margin-bottom: 0;
}

.p-footer__cell a {
  color: var(--p-text);
  transition: color 0.18s;
}

.p-footer__cell a:hover {
  color: var(--p-red-text);
}

.p-footer__links {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.p-footer__links a {
  padding: 0.25rem 0;
}

.p-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  border-top: 1px solid var(--p-line);
  padding-block: 1rem;
  padding-inline: max(clamp(1.5rem, 5vw, 4.5rem), (100% - 1400px) / 2);
  font-size: 0.85rem;
  color: var(--p-faint);
}

.p-footer__bar p {
  margin: 0;
}

.p-footer__bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

/* Le rembourrage vertical n'est pas décoratif : sans lui ces liens font 23 px
   de haut, sous le minimum de 24 px exigé pour une cible tactile. Ce sont des
   liens de navigation et non des liens au fil d'une phrase : l'exemption
   prévue pour ces derniers ne s'applique pas ici. */
.p-footer__bar a {
  color: var(--p-muted);
  padding-block: 0.35rem;
  transition: color 0.18s;
}

.p-footer__bar a:hover {
  color: var(--p-red-text);
}

/* Les réseaux sociaux occupaient une cinquième colonne : trois liens ne
   justifient pas une colonne, ils tiennent dans la barre du bas. */
.p-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  order: 1;
}

@media (max-width: 760px) {
  .p-footer__social {
    order: 0;
    width: 100%;
  }
}

/* Les pages légales ne figurent pas dans le rail : le repère de page
   courante est porté par le pied de page. */
.p-footer__bar a[aria-current='page'] {
  color: var(--p-red-text);
}

/* Logo MotorOS, partenaire logiciel. Repris de l'en-tête de motoros.ch :
   Hanken Grotesk 700, « Motor » dans la couleur du texte, « OS » dans le bleu
   de la marque (#477fc0). Dans la barre du bas, il passe à 1,2 rem pour se
   détacher des liens voisins en 0,85 rem. */
.p-motoros {
  font-family: 'Hanken Grotesk MotorOS', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--p-text);
}

.p-motoros b {
  font-weight: 700;
  color: #477fc0;
}

.p-sec__head h2.p-motoros {
  font-family: 'Hanken Grotesk MotorOS', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
}

.p-footer__bar a.p-motoros {
  font-size: 1.2rem;
  color: var(--p-text);
}

.p-footer__bar a.p-motoros:hover {
  color: var(--p-text);
  opacity: 0.75;
}

/* Soulignement trace de gauche a droite au survol : plus feutre qu'un
   changement de couleur seul. */
.p-footer__links a,
.p-rail__sub a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.45s var(--p-ease), color 0.18s;
}

.p-footer__links a:hover,
.p-rail__sub a:hover {
  background-size: 100% 1px;
}

/* ----- Barre d'actions (mobile) ----- */
.p-quick {
  display: none;
}

/* ----- Jauge de défilement ----- */
/* ----- Débords d'iOS -------------------------------------------------------
   Quand Safari rétracte ses propres barres, la zone visible s'agrandit au-delà
   de la fenêtre de mise en page : une bande du contenu déjà défilé apparaît
   alors au-dessus de la barre haute, et une autre sous la barre d'actions.
   Ces deux bandeaux, posés juste en dehors des bords, les recouvrent. Sur tout
   autre navigateur ils restent hors de l'écran et ne coûtent rien.
   Ils ne participent pas au défilement : une boîte en position fixe n'entre pas
   dans la zone débordante du document. */
html::before,
html::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 280px;
  background: var(--p-bg);
  z-index: 250;
  pointer-events: none;
}

html::before {
  top: -280px;
}

html::after {
  bottom: -280px;
}

.p-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--p-red);
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  .p-progress {
    animation: p-grow linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes p-grow {
  to {
    transform: scaleX(1);
  }
}

/* ----- Apparitions au défilement ----- */
[data-prv] {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(5px);
  transition: opacity 1.1s var(--p-ease), transform 1.1s var(--p-ease),
    filter 1.1s var(--p-ease);
}

[data-prv].on {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Cascade : dans une meme grille, les elements entrent l'un apres l'autre
   plutot que d'un bloc. C'est ce decalage qui donne le rythme. */
.p-table[data-prv] .p-row,
.p-table[data-prv] .p-doc,
.p-claims[data-prv] li,
.p-stats[data-prv] .p-stat {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.85s var(--p-ease), transform 0.85s var(--p-ease);
}

.p-table[data-prv].on .p-row,
.p-table[data-prv].on .p-doc,
.p-claims[data-prv].on li,
.p-stats[data-prv].on .p-stat {
  opacity: 1;
  transform: none;
}


.p-table[data-prv].on .p-row:nth-child(1),
.p-table[data-prv].on .p-doc:nth-child(1),
.p-claims[data-prv].on li:nth-child(1),
.p-stats[data-prv].on .p-stat:nth-child(1) {
  transition-delay: 0.06s;
}

.p-table[data-prv].on .p-row:nth-child(2),
.p-table[data-prv].on .p-doc:nth-child(2),
.p-claims[data-prv].on li:nth-child(2),
.p-stats[data-prv].on .p-stat:nth-child(2) {
  transition-delay: 0.12s;
}

.p-table[data-prv].on .p-row:nth-child(3),
.p-table[data-prv].on .p-doc:nth-child(3),
.p-claims[data-prv].on li:nth-child(3),
.p-stats[data-prv].on .p-stat:nth-child(3) {
  transition-delay: 0.18s;
}

.p-table[data-prv].on .p-row:nth-child(4),
.p-table[data-prv].on .p-doc:nth-child(4),
.p-claims[data-prv].on li:nth-child(4),
.p-stats[data-prv].on .p-stat:nth-child(4) {
  transition-delay: 0.24s;
}

.p-table[data-prv].on .p-row:nth-child(5),
.p-table[data-prv].on .p-doc:nth-child(5),
.p-claims[data-prv].on li:nth-child(5),
.p-stats[data-prv].on .p-stat:nth-child(5) {
  transition-delay: 0.30s;
}

.p-table[data-prv].on .p-row:nth-child(6),
.p-table[data-prv].on .p-doc:nth-child(6),
.p-claims[data-prv].on li:nth-child(6),
.p-stats[data-prv].on .p-stat:nth-child(6) {
  transition-delay: 0.36s;
}

.p-table[data-prv].on .p-row:nth-child(7),
.p-table[data-prv].on .p-doc:nth-child(7),
.p-claims[data-prv].on li:nth-child(7),
.p-stats[data-prv].on .p-stat:nth-child(7) {
  transition-delay: 0.42s;
}

.p-table[data-prv].on .p-row:nth-child(8),
.p-table[data-prv].on .p-doc:nth-child(8),
.p-claims[data-prv].on li:nth-child(8),
.p-stats[data-prv].on .p-stat:nth-child(8) {
  transition-delay: 0.48s;
}

.p-hero__meta,
.p-hero h1,
.p-hero__base,
.p-hero__row,
.p-crumbs,
.p-phero h1,
.p-phero__base,
.p-404__code,
.p-404 h1 {
  animation: p-in 1.25s var(--p-ease) both;
}

.p-hero h1,
.p-phero h1,
.p-404 h1 {
  animation-name: p-devoile;
  animation-duration: 1.45s;
  animation-delay: 0.12s;
}

/* Le titre se decouvre par le bas, comme un rideau qui se leve. */
@keyframes p-devoile {
  from {
    opacity: 0;
    transform: translateY(30px);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 -12% 0);
  }
}

.p-hero__base,
.p-phero__base {
  animation-delay: 0.3s;
}

.p-hero__row {
  animation-delay: 0.45s;
}

@keyframes p-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- Adaptations ----- */
@media (max-width: 960px) {
  .p-rail {
    gap: 1rem;
    padding: 0 1.25rem;
    min-height: 64px;
  }

  .p-rail__logo img {
    height: 22px;
  }

  /* Les liens secondaires figurent aussi dans le pied de page */
  .p-rail__sub {
    display: none;
  }

  .p-rail__nav {
    margin-left: auto;
  }

  .p-rail__foot {
    gap: 0.8rem;
    margin-left: 0;
  }

  .p-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Largeur d'ordinateur ou de tablette à l'horizontale : les liens secondaires
   cèdent la place au menu principal, qui doit rester entier. Ils figurent aussi
   dans le pied de page. Les seuils viennent de la mesure de chaque page : les
   accueils ont le menu le plus long, et l'allemand les libellés les plus longs. */
@media (min-width: 961px) and (max-width: 1260px) {
  .p-rail__sub {
    display: none;
  }

  .p-rail__nav {
    margin-left: auto;
  }
}

@media (min-width: 961px) and (max-width: 1439px) {
  .p-rail:has(.p-rail__nav a[href^="#"]) .p-rail__sub {
    display: none;
  }

  .p-rail:has(.p-rail__nav a[href^="#"]) .p-rail__nav {
    margin-left: auto;
  }
}

@media (min-width: 961px) and (max-width: 1490px) {
  .p-rail:lang(de):has(.p-rail__nav a[href^="#"]) .p-rail__sub {
    display: none;
  }

  .p-rail:lang(de):has(.p-rail__nav a[href^="#"]) .p-rail__nav {
    margin-left: auto;
  }
}

/* Pages intérieures, cinq entrées depuis l'ajout de « Partenaires » : entre
   1261 et 1340 px le menu et les liens AutoScout24 ne tiennent ensemble que si
   la barre se resserre. Mesuré : il manquait jusqu'à 46 px (allemand). */
@media (min-width: 1261px) and (max-width: 1340px) {
  .p-rail:not(:has(.p-rail__nav a[href^="#"])) {
    gap: 1.4rem;
    padding: 0 1.75rem;
  }
}

/* Le menu allemand de l'accueil, le plus long, a besoin de la barre resserrée
   jusqu'à la tablette à l'horizontale. */
@media (min-width: 961px) and (max-width: 1040px) {
  .p-rail {
    gap: 1rem;
    padding: 0 1.25rem;
  }

  .p-rail__logo img {
    height: 22px;
  }
}

/* Tablette à la verticale : le menu passe sur une deuxième ligne, entier, et le
   téléphone reste dans la barre, faute de barre d'actions en bas d'écran. */
@media (min-width: 761px) and (max-width: 920px) {
  :root {
    --p-rail-h: 110px;
  }

  .p-rail {
    flex-wrap: wrap;
    min-height: 0;
    padding: 0.7rem 1.25rem;
    row-gap: 0.3rem;
  }

  .p-rail__nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .p-rail__foot {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  /* La navigation passe sur une deuxième ligne, défilable */
  .p-rail {
    flex-wrap: wrap;
    min-height: 0;
    padding: 0.7rem 1.25rem;
    row-gap: 0.3rem;
  }

  .p-rail__nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-inline: -0.15rem;
  }

  .p-rail__foot {
    margin-left: auto;
  }

  /* Le téléphone est déjà dans la barre d'actions du bas */
  .p-rail__foot > a {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 3.4rem;
  }

  .p-contact {
    grid-template-columns: 1fr;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  .p-quick {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: var(--p-line);
    border-top: 1px solid var(--p-line);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
  }

  .p-quick a {
    display: block;
    background: var(--p-bg);
    padding: 0.85rem 0.4rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--p-muted);
  }

  .p-quick a:active {
    background: var(--p-panel);
    color: var(--p-text);
  }
}

/* Sur mobile, tout champ dont le texte fait moins de 16 px déclenche un zoom
   automatique de Safari iOS dès qu'on le touche : la page s'agrandit de travers
   et le visiteur doit la remettre en place à la main. La règle ne vaut que sur
   petit écran, la taille de bureau reste inchangée. */
@media (max-width: 760px) {
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
}

/* Téléphone : cinq entrées doivent tenir sur la ligne du menu sans défilement
   sur les pages intérieures. Mesuré : il manquait 30 px à 375 px de large et
   80 px à 320 px avec la taille de bureau. */
@media (max-width: 430px) {
  .p-rail__nav {
    gap: 0.3rem;
    justify-content: space-between;
  }

  .p-rail__nav a {
    font-size: 0.82rem;
    padding-inline: 0.1rem;
  }
}

@media (max-width: 350px) {
  .p-rail__nav {
    gap: 0.2rem;
  }

  .p-rail__nav a {
    font-size: 0.75rem;
  }
}

/* Accueils, cinq entrées depuis l'ajout de « Partenaires » : là où la place
   manque, « Véhicules en vente » se réduit à « Véhicules » pour que le menu
   reste entier. Seuils mesurés par langue : il manquait jusqu'à 50 px en
   français, 57 px en anglais et 93 px en allemand. */
@media (max-width: 560px) {
  .p-nav-x {
    display: none;
  }
}

/* Téléphone étroit : l'allemand perd aussi l'article de « Die Werkstatt », et
   le menu des accueils se resserre encore d'un cran. */
@media (max-width: 460px) {
  .p-nav-y {
    display: none;
  }
}

@media (max-width: 370px) {
  .p-rail:has(.p-rail__nav a[href^="#"]) .p-rail__nav {
    gap: 0.15rem;
  }
}

@media (max-width: 350px) {
  .p-rail:has(.p-rail__nav a[href^="#"]) .p-rail__nav {
    gap: 0.1rem;
  }

  .p-rail:has(.p-rail__nav a[href^="#"]) .p-rail__nav a {
    font-size: 0.72rem;
  }
}

@media (max-width: 1060px) {
  .p-rail:lang(en) .p-nav-x {
    display: none;
  }
}

@media (max-width: 1110px) {
  .p-rail:lang(de) .p-nav-x {
    display: none;
  }
}

@media (max-width: 400px) {
  /* Logo réduit d'un cran pour que la langue reste sur la même ligne */
  .p-rail {
    gap: 0.6rem;
    padding-inline: 1rem;
  }

  .p-rail__logo img {
    height: 19px;
  }

  /* Certains intitulés sont insécables : on réduit d'un cran. */
  .p-row h3 {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }

  .p-doc h3 {
    overflow-wrap: anywhere;
  }
}

/* ----- Mouvement réduit ----- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-prv],
  .p-table[data-prv] .p-row,
  .p-table[data-prv] .p-doc,
  .p-claims[data-prv] li,
  .p-stats[data-prv] .p-stat,
  .p-hero__meta,
  .p-hero h1,
  .p-hero__base,
  .p-hero__row,
  .p-crumbs,
  .p-phero h1,
  .p-phero__base,
  .p-404__code,
  .p-404 h1 {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    animation: none !important;
    transition-delay: 0s !important;
  }

  /* Le travelling sur la photo est un mouvement continu : on le supprime. */
  .p-hero__media img {
    animation: none !important;
    transform: none !important;
  }

  .p-progress {
    display: none;
  }
}

/* ----- Impression : fond clair forcé, états finaux ----- */
@media print {
  body {
    background: #fff;
    color: #000;
    padding-bottom: 0;
  }

  body::before,
  body::after,
  .p-progress,
  .p-quick,
  .p-status,
  .p-skip,
  .p-acces__carte,
  .p-rail__sub {
    display: none !important;
  }

  /* Le séparateur dégradé et le filet d'exergue ne s'impriment pas en teinte :
     on les rend en trait plein. */
  .p-sec::after {
    background: #999;
  }

  .p-quote::before {
    background: #b3231f;
  }

  .p-sec__head::after,
  .p-hero h1::after,
  .p-phero h1::after {
    background: #b3231f;
  }

  [data-prv],
  .p-table[data-prv] .p-row,
  .p-table[data-prv] .p-doc,
  .p-claims[data-prv] li,
  .p-stats[data-prv] .p-stat,
  .p-hero__meta,
  .p-hero h1,
  .p-hero__base,
  .p-hero__row,
  .p-crumbs,
  .p-phero h1,
  .p-phero__base,
  .p-404__code,
  .p-404 h1 {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    animation: none !important;
  }

  .p-rail {
    position: static;
    width: auto;
    border: 0;
    border-bottom: 1px solid #999;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
  }

  .p-rail__logo {
    background: #1a1a1e;
    padding: 0.5rem 0.7rem;
    display: inline-block;
  }

  .p-rail__nav {
    display: none;
  }

  .p-main,
  .p-footer {
    margin-left: 0;
  }

  .p-sec,
  .p-row,
  .p-cell,
  .p-doc,
  .p-stat,
  .p-claims li,
  .p-footer__cell,
  .hours__row,
  .p-quote,
  .p-media {
    background: #fff;
    color: #000;
    border-color: #999;
  }

  .p-table,
  .p-contact,
  .p-stats,
  .p-claims,
  .hours,
  .p-footer__grid {
    background: #999;
  }

  .p-claims b::before {
    background: #b3231f;
  }

  .p-404__code {
    color: #000;
    -webkit-text-stroke: 0;
  }

  /* L'ouverture pleine page n'a pas de sens sur papier : on retire la photo
     et on rend la section à son flux normal. */
  .p-hero__media {
    display: none;
  }

  .p-hero {
    display: block;
    min-height: 0;
    padding: 2rem 0;
  }

  .p-hero__meta,
  .p-hero__base {
    color: #333;
  }

  .p-sec__head,
  .p-prose h2 {
    border-bottom-color: #000;
  }

  .p-hero__base,
  .p-phero__base,
  .p-sec__lede,
  .p-row p,
  .p-doc > p,
  .p-claims span,
  .p-prose p,
  .p-prose li,
  .p-sec__ref,
  .p-hero__meta,
  .p-crumbs,
  .p-note,
  .p-cell dt,
  .p-cell dd,
  .p-stat dt,
  .p-stat dd span,
  .hours__row dt,
  .p-quote figcaption,
  .p-media figcaption,
  .p-footer__cell,
  .p-footer__cell address,
  .p-footer__cell p,
  .p-footer__bar,
  .field label,
  .form__consent {
    color: #333;
  }

  .p-stock .prix,
  .p-phero h1 b {
    color: #b3231f;
  }

  .p-cta {
    border: 1px solid #000;
    background: #fff;
    color: #000;
  }
}
