/*
 * Orvane, démonstration Weria : direction « Nuancier », dans le style du portfolio Weria (novembre 2026).
 * Fond noir, texte blanc, gris neutres et un bleu électrique en touches (rivet de l'éventail, voiture disponible,
 * page en cours, sélection) ; une seule famille, Inter Tight, titres en 600 très serrés. Les seules couleurs
 * franches sont celles des voitures : les puces de teinte.
 * Couleurs, polices, tailles et espacements viennent des variables ci-dessous. Les éléments Weria (bandeau de
 * démonstration, badge) prennent le bleu électrique du portfolio.
 */

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

:root {
  /* Couleurs : noir, blanc et gris neutres, comme le portfolio ; le bleu électrique en touches */
  --noir: #0a0a0a;
  --noir-releve: #161616;
  --noir-voile: rgb(22 22 22 / 0.82);
  --noir-profond: #111111;
  --texte: #ffffff;
  /* 7,9:1 sur le fond */
  --gris: #a3a3a3;
  /* Filets et séparateurs décoratifs */
  --gris-fonce: #5c5c5c;
  --alerte: #f87171;
  /* Bleu électrique : 4,1:1 sur le fond, pour les formes ; version claire (7,4:1) pour un texte */
  --electrique: #2563ff;
  --electrique-clair: #6e9bff;
  /* Espace de gestion (fond clair) */
  --blanc: #ffffff;
  --gris-gestion: #595959;
  --filet-clair: #e5e5e5;
  --alerte-fonce: #b42318;
  /* Éléments Weria : le bleu électrique du portfolio, texte blanc (4,9:1) */
  --weria-bleu: #2563ff;
  --weria-encre: #ffffff;
  --police-weria: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Ombres et voiles */
  --ombre-puce: 0 10px 24px rgb(0 0 0 / 0.35);
  --voile: rgb(10 10 10 / 0.94);
  --voile-gestion: rgb(10 10 10 / 0.5);

  /* Typographie */
  --police: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-titre: clamp(2.5rem, 1.35rem + 3.8vw, 4.5rem);
  --t-titre-page: clamp(2.3rem, 1.6rem + 2.6vw, 4rem);
  --t-intertitre: clamp(1.9rem, 1.45rem + 1.5vw, 3rem);
  --t-teinte-grande: clamp(2.1rem, 1.5rem + 2.4vw, 3.5rem);
  --t-teinte: 1.75rem;
  --t-prix: 2.25rem;
  --t-marque: 1.75rem;
  --t-sous-titre: 1.25rem;
  --t-texte: 1.125rem;
  --t-champ: 1.0625rem;
  --t-bouton: 1.0625rem;
  --t-petit: 0.9375rem;
  --t-puce: 0.8125rem;
  --t-mini: 0.75rem;
  --t-weria: 0.8125rem;
  --t-bloc: clamp(1.6rem, 1.3rem + 0.9vw, 2.1rem);
  --t-nano: 0.6875rem;
  --t-icone: 1.6rem;
  --t-gestion: 1rem;
  --t-titre-gestion: 2rem;
  --t-impression: 11pt;
  --police-symboles: system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Espacements */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: 3rem;
  --e-8: 4rem;
  --e-9: 6rem;
  --e-10: 8rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  --largeur: 77.5rem;
  /* Approche des petits textes : légèrement ouverte sous 14 px */
  --approche-petit: 0.012em;
  /* Retour d'appui : immédiat à l'enfoncement */
  --appui: scale(0.97);

  /* Formes et mouvement */
  --rayon-puce: 8px;
  --rayon-champ: 12px;
  --rayon-panneau: 20px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Éventail : largeur d'une puce et hauteur (proportions d'une puce de nuancier) */
  --puce-l: clamp(4.625rem, 12vw, 6.5rem);
  --puce-h: calc(var(--puce-l) * 2.75);

  color-scheme: dark;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--noir);
  color: var(--texte);
  font: 400 var(--t-texte) / 1.6 var(--police);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--electrique);
  color: var(--texte);
}

.o-wrap {
  width: min(100% - 2 * var(--gouttiere), var(--largeur));
  margin-inline: auto;
}

.o-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.o-evitement {
  position: absolute;
  left: var(--e-4);
  top: -80px;
  z-index: 100;
  padding: var(--e-3) var(--e-4);
  background: var(--texte);
  color: var(--noir);
}

.o-evitement:focus {
  top: var(--e-3);
}

.o-discret {
  color: var(--gris);
  font-size: var(--t-petit);
}

/* ------------------------------------------------------------------ */
/* Éléments Weria : bandeau de démonstration et badge                  */
/* ------------------------------------------------------------------ */

.o-demo {
  background: var(--weria-bleu);
  color: var(--weria-encre);
  font: 500 var(--t-weria) / 1.4 var(--police-weria);
}

.o-demo .o-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--e-1) var(--e-5);
  padding-block: var(--e-2);
}

.o-demo a {
  /* Cible de 44 px de haut, sans agrandir le bandeau (marges négatives) */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -0.8125rem;
  font-weight: 650;
  text-underline-offset: 3px;
}

.concept-badge {
  position: fixed;
  right: calc(var(--e-4) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--e-4) + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  min-height: 44px;
  padding: 0 var(--e-4) 0 14px;
  background: var(--weria-bleu);
  color: var(--weria-encre);
  font: 600 var(--t-weria) / 1 var(--police-weria);
  text-decoration: none;
  border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/* En-tête                                                             */
/* ------------------------------------------------------------------ */

.o-entete {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: var(--e-3);
}

/* Barre flottante, arrondie : verre sombre, filet discret (comme l'en-tête du portfolio) */
.o-entete-barre {
  display: flex;
  align-items: center;
  gap: var(--e-6);
  min-height: 4rem;
  padding-inline: var(--e-5) var(--e-2);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 18px;
  background: var(--noir-voile);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
}

@supports (backdrop-filter: blur(1px)) {
  .o-entete-barre {
    backdrop-filter: blur(14px) saturate(1.5);
  }
}

.o-marque {
  font-size: var(--t-marque);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

a.o-marque {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Symbole et nom côte à côte (en-tête, pied de page) */
.o-marque {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.o-symbole {
  flex: none;
  width: 1.2em;
  height: 1.2em;
}

.o-nav {
  flex: 1;
}

.o-nav ul {
  display: flex;
  justify-content: center;
  gap: var(--e-6);
  padding: 0;
  list-style: none;
}

.o-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gris);
  font-size: var(--t-champ);
  text-decoration: none;
}

.o-nav a[aria-current='page'] {
  color: var(--texte);
  text-decoration: underline;
  text-decoration-color: var(--electrique);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.o-menu {
  display: none;
}

@media (hover: hover) {
  .o-nav a:hover {
    color: var(--texte);
  }
}

@media (max-width: 960px) {
  .o-entete-barre {
    gap: var(--e-4);
    min-height: 4rem;
  }

  .o-marque {
    margin-right: auto;
  }

  .o-menu {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--e-4);
    border: 1px solid var(--gris);
    border-radius: 999px;
    background: transparent;
    font-size: var(--t-champ);
    cursor: pointer;
  }

  .o-nav {
    position: absolute;
    inset: 100% 0 auto;
    z-index: 1;
    background: var(--noir);
    border-bottom: 1px solid var(--gris-fonce);
    visibility: hidden;
    opacity: 0;
    transform: translateY(calc(var(--e-2) * -1));
    transform-origin: top;
    transition:
      opacity 0.18s var(--ease),
      transform 0.18s var(--ease),
      visibility 0s linear 0.18s;
  }

  .o-nav.is-ouvert {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 0.18s var(--ease),
      transform 0.18s var(--ease),
      visibility 0s;
  }

  .o-nav ul {
    flex-direction: column;
    gap: 0;
    width: min(100% - 2 * var(--gouttiere), var(--largeur));
    margin-inline: auto;
    padding-block: var(--e-2) var(--e-4);
  }

  .o-nav a {
    min-height: 52px;
    width: 100%;
    font-size: var(--t-sous-titre);
    border-bottom: 1px solid var(--gris-fonce);
  }
}

@media (max-width: 560px) {
  .o-entete .o-entete-cta {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Boutons et liens                                                    */
/* ------------------------------------------------------------------ */

.o-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--e-2) var(--e-5);
  border: 1px solid var(--gris);
  border-radius: 999px;
  background: transparent;
  color: var(--texte);
  font-weight: 600;
  font-size: var(--t-bouton);
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.o-btn-plein {
  background: var(--texte);
  border-color: var(--texte);
  color: var(--noir);
}

.o-btn:active {
  transform: var(--appui);
  transition-duration: 0.1s;
}

/* Pas de délai de double toucher sur les commandes */
a,
button,
label,
summary,
select {
  touch-action: manipulation;
}

.o-lien:active,
.o-nav a:active,
.o-pied ul a:active,
.o-voisines a:active {
  opacity: 0.7;
}

@media (hover: hover) {
  .o-btn:hover {
    border-color: var(--texte);
  }

  .o-btn-plein:hover {
    background: var(--gris);
    border-color: var(--gris);
  }
}

.o-lien {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--texte);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

.o-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-3) var(--e-4);
}

.o-actions--colonne {
  flex-direction: column;
  align-items: stretch;
}

/* ------------------------------------------------------------------ */
/* Titres de page, sections, fil d'Ariane                              */
/* ------------------------------------------------------------------ */

.o-fil ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2);
  padding: var(--e-5) 0 0;
  list-style: none;
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-fil li + li::before {
  content: '/';
  margin-right: var(--e-2);
  color: var(--gris-fonce);
}

.o-fil a {
  /* Zone de toucher de 45 px de haut, sans changer la hauteur du fil (marges négatives) */
  display: inline-block;
  padding-block: 0.9375rem;
  margin-block: -0.9375rem;
  color: var(--gris);
}

.o-tete-page {
  display: grid;
  gap: var(--e-4);
  padding-block: var(--e-7) var(--e-6);
}

.o-titre {
  font-size: var(--t-titre-page);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 22ch;
}

.o-chapo {
  max-width: 62ch;
  color: var(--gris);
}

.o-section-titre {
  font-size: var(--t-intertitre);
  line-height: 1.06;
  letter-spacing: -0.032em;
}

.o-sous-titre {
  font-size: var(--t-sous-titre);
  font-weight: 600;
  line-height: 1.25;
}

/* ------------------------------------------------------------------ */
/* État d'une voiture : forme et texte ; « disponible » en bleu électrique */
/* ------------------------------------------------------------------ */

.o-etat {
  font-size: var(--t-petit);
  color: var(--gris);
}

.o-etat > span {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  color: var(--texte);
  font-weight: 600;
}

.o-etat > span::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--texte);
}

.o-etat--disponible > span::before {
  border-color: var(--electrique);
  background: var(--electrique);
}

.o-etat--reserve > span::before {
  background: linear-gradient(90deg, var(--texte) 50%, transparent 50%);
}

.o-etat--vendu > span::before {
  border-color: var(--gris);
  background: transparent;
}

/* ------------------------------------------------------------------ */
/* Puces de teinte (éventail, bande, voisines)                          */
/* ------------------------------------------------------------------ */

.o-encre-claire {
  --encre: var(--texte);
}

.o-encre-foncee {
  --encre: var(--noir);
}

.o-plaque .o-puce-nom,
.o-plaque .o-puce-voiture,
.o-plaque.o-rang-teinte span,
.o-plaque.o-teinte-bande p {
  width: fit-content;
  padding-inline: var(--e-1);
  background: var(--texte);
  color: var(--noir);
}

/* ------------------------------------------------------------------ */
/* Accueil : ouverture et éventail                                     */
/* ------------------------------------------------------------------ */

.o-ouverture {
  padding-top: var(--e-8);
  text-align: center;
  overflow: hidden;
}

.o-ouverture .o-wrap {
  display: grid;
  justify-items: center;
  gap: var(--e-4);
}

.o-ouverture h1 {
  max-width: 15ch;
  font-size: var(--t-titre);
  line-height: 1;
  letter-spacing: -0.035em;
}

.o-ouverture .o-chapo {
  max-width: 54ch;
}

.o-eventail {
  position: relative;
  width: 100%;
  height: calc(var(--puce-h) + 3.5rem);
  margin-top: var(--e-5);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Pendant qu'on feuillette, les puces suivent le doigt sans traîner */
.o-eventail.is-feuillete {
  cursor: grabbing;
}

.o-eventail.is-feuillete .o-puce {
  transition-duration: 0.16s;
}

.o-puce {
  position: absolute;
  left: 50%;
  bottom: var(--e-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: var(--puce-l);
  height: var(--puce-h);
  margin-left: calc(var(--puce-l) / -2);
  padding: var(--e-3) var(--e-4) 0 var(--e-2);
  border: 0;
  border-radius: var(--rayon-puce);
  background: var(--teinte);
  color: var(--encre);
  text-align: left;
  overflow: hidden;
  overflow-wrap: break-word;
  cursor: pointer;
  box-shadow: var(--ombre-puce);
  transform-origin: 50% 93%;
  transform: rotate(var(--angle)) translateY(var(--leve, 0px));
  transition: transform 0.35s var(--ease);
  animation: o-ouvrir 0.82s var(--ease) backwards;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}

.o-puce[aria-checked='true'] {
  --leve: -26px;
  z-index: 5;
}

/* Appui : la puce s'enfonce vers le rivet dès le contact, avant même le relâchement */
.o-puce:active {
  --leve: 4px;
  transition-duration: 0.1s;
}

.o-puce[aria-checked='true']:active {
  --leve: -20px;
}

.o-puce:focus-visible {
  outline: 2px solid var(--texte);
  outline-offset: 3px;
}

.o-puce.o-fondue,
.o-vendue-puce.o-fondue {
  box-shadow:
    inset 0 0 0 1px var(--gris),
    var(--ombre-puce);
}

.o-puce-nom {
  font-weight: 600;
  font-size: var(--t-puce);
  line-height: 1.12;
}

/* Le nom de la voiture passe à la ligne avant la puce voisine, posée par-dessus dans l'éventail */
.o-puce-voiture {
  max-width: 4.75rem;
  font-size: var(--t-mini);
  line-height: 1.2;
}

.o-rivet {
  position: absolute;
  left: 50%;
  bottom: calc(var(--e-4) + var(--puce-h) * 0.07 - 7px);
  z-index: 9;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--electrique);
  box-shadow: 0 0 0 3px var(--noir);
  pointer-events: none;
}

@keyframes o-ouvrir {
  from {
    transform: rotate(0deg) translateY(18px);
  }
}

@media (hover: hover) {
  .o-puce:not([aria-checked='true']):hover {
    --leve: -10px;
  }
}

/* La voiture choisie, posée sous l'éventail */
.o-choisie-bande {
  background: var(--noir-profond);
}

.o-choisie {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--e-7);
  align-items: center;
  padding-block: var(--e-7);
  text-align: left;
}

.o-choisie-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--rayon-puce);
}

.o-choisie-texte {
  display: grid;
  gap: var(--e-2);
  align-content: center;
}

.o-choisie-teinte {
  font-size: var(--t-teinte);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.o-choisie-finition {
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-choisie-voiture {
  margin-top: var(--e-3);
  font-size: var(--t-sous-titre);
  font-weight: 600;
}

.o-choisie-faits {
  color: var(--gris);
}

.o-choisie-prix {
  margin-top: var(--e-2);
  font-size: var(--t-teinte);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums lining-nums;
}

.o-choisie-texte .o-actions {
  margin-top: var(--e-4);
}

/* ------------------------------------------------------------------ */
/* Accueil : sections                                                  */
/* ------------------------------------------------------------------ */

.o-section {
  padding-block: var(--e-10);
  border-top: 1px solid var(--gris-fonce);
}

.o-section-tete {
  display: grid;
  gap: var(--e-4);
  max-width: 62ch;
  margin-bottom: var(--e-7);
}

.o-section-tete p {
  color: var(--gris);
}

/* On la sort au jour : photo prise au jour, texte décalé */
.o-jour-grille {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--e-8);
  align-items: end;
}

.o-jour-grille figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--rayon-puce);
}

.o-jour-grille figcaption {
  margin-top: var(--e-3);
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-jour-texte {
  display: grid;
  gap: var(--e-4);
  padding-bottom: var(--e-6);
}

.o-jour-texte p {
  color: var(--gris);
}

.o-jour-texte p:first-of-type {
  color: var(--texte);
}

/* Avec chaque voiture : liste de définitions */
.o-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--e-7);
}

.o-services > div {
  display: grid;
  gap: var(--e-1);
  padding-block: var(--e-5);
  border-top: 1px solid var(--gris-fonce);
}

.o-services dt {
  font-weight: 600;
  font-size: var(--t-sous-titre);
}

.o-services dd {
  color: var(--gris);
}

/* Recherche par teinte : trois puces d'exemple */
.o-recherche {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--e-8);
  align-items: center;
}

.o-recherche-puces {
  display: flex;
  gap: var(--e-3);
  padding: 0;
  list-style: none;
}

.o-recherche-puces li {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  width: 5.75rem;
  height: 12.5rem;
  padding: var(--e-3) var(--e-2);
  border-radius: var(--rayon-puce);
  background: var(--teinte);
  color: var(--encre);
  box-shadow: var(--ombre-puce);
}

.o-recherche-puces li:nth-child(1) {
  transform: rotate(-6deg) translateY(8px);
}

.o-recherche-puces li:nth-child(3) {
  transform: rotate(6deg) translateY(8px);
}

.o-recherche-texte {
  display: grid;
  gap: var(--e-4);
  justify-items: start;
}

.o-recherche-texte p {
  color: var(--gris);
  max-width: 56ch;
}

/* Vendue récemment */
.o-vendue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--e-7);
  align-items: center;
}

.o-vendue-puce {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 6.5rem;
  height: 14.375rem;
  padding: var(--e-3) var(--e-2);
  border-radius: var(--rayon-puce);
  background: var(--teinte);
  color: var(--encre);
  box-shadow: var(--ombre-puce);
}

.o-vendue-texte {
  display: grid;
  gap: var(--e-3);
  justify-items: start;
}

.o-vendue-texte p {
  color: var(--gris);
  max-width: 58ch;
}

/* Le showroom */
.o-showroom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--e-8);
}

.o-showroom-texte {
  display: grid;
  gap: var(--e-4);
  align-content: start;
  justify-items: start;
}

.o-showroom-texte p {
  color: var(--gris);
  max-width: 52ch;
}

.o-adresse {
  font-size: var(--t-teinte);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-style: normal;
}

.o-horaires {
  display: grid;
  align-content: start;
}

.o-horaires div {
  display: flex;
  justify-content: space-between;
  gap: var(--e-4);
  padding-block: var(--e-3);
  border-bottom: 1px solid var(--gris-fonce);
  font-variant-numeric: tabular-nums lining-nums;
}

.o-horaires dt {
  color: var(--gris);
}

/* ------------------------------------------------------------------ */
/* Pied de page                                                        */
/* ------------------------------------------------------------------ */

.o-pied {
  margin-top: var(--e-10);
  padding-block: var(--e-8) var(--e-9);
  background: var(--noir-profond);
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-accueil .o-pied {
  margin-top: 0;
}

.o-pied-grille {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--e-6);
}

.o-pied .o-marque {
  display: block;
  margin-bottom: var(--e-3);
  color: var(--texte);
}

.o-pied h2 {
  margin-bottom: var(--e-2);
  color: var(--texte);
  font-size: var(--t-champ);
  font-weight: 600;
}

.o-pied ul {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
}

.o-pied ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gris);
}

.o-pied-bas {
  display: grid;
  gap: var(--e-2);
  margin-top: var(--e-7);
  padding-top: var(--e-5);
  border-top: 1px solid var(--gris-fonce);
}

.o-credits a {
  color: var(--gris);
}

/* ------------------------------------------------------------------ */
/* Les voitures : filtres et bande de teintes                          */
/* ------------------------------------------------------------------ */

.o-filtres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.25rem), 1fr));
  gap: var(--e-4);
  align-items: end;
  padding: var(--e-5);
  border-radius: var(--rayon-panneau);
  background: var(--noir-releve);
}

.o-filtres .o-champ {
  margin: 0;
}

.o-filtres .o-champ:has(#tri) {
  grid-column: span 2;
}

.o-filtres-fin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-2) var(--e-5);
  grid-column: 1 / -1;
}

.o-compte {
  margin: var(--e-6) 0 var(--e-4);
  color: var(--gris);
}

.o-bande {
  display: grid;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--gris-fonce);
}

.o-rang {
  position: relative;
  display: grid;
  grid-template-columns: 12.5rem 13.75rem minmax(0, 1fr) auto;
  gap: var(--e-5);
  align-items: center;
  padding-block: var(--e-4);
  border-bottom: 1px solid var(--gris-fonce);
}

.o-rang-teinte {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  min-height: 8.25rem;
  padding: var(--e-3);
  border-radius: var(--rayon-puce);
  background: var(--teinte);
  color: var(--encre);
}

.o-rang-teinte.o-fondue {
  box-shadow: inset 0 0 0 1px var(--gris);
}

.o-rang-nom {
  font-weight: 600;
  font-size: var(--t-champ);
  line-height: 1.15;
}

.o-rang-finition {
  font-size: var(--t-mini);
}

.o-rang-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--rayon-puce);
}

.o-rang-texte {
  display: grid;
  gap: var(--e-1);
}

.o-rang-titre {
  font-size: var(--t-sous-titre);
  font-weight: 600;
  line-height: 1.25;
}

.o-rang-titre a {
  text-decoration: none;
}

.o-rang-titre a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.o-rang-titre a:focus-visible {
  outline: none;
}

.o-rang:has(.o-rang-titre a:focus-visible) {
  outline: 2px solid var(--texte);
  outline-offset: 4px;
}

.o-rang-faits {
  color: var(--gris);
}

.o-rang-fin {
  display: grid;
  justify-items: end;
  gap: var(--e-1);
  text-align: right;
}

.o-rang-prix {
  font-size: var(--t-sous-titre);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.o-rang--vendue .o-rang-prix {
  color: var(--gris);
  text-decoration: line-through;
}

.o-rang-rdv {
  position: relative;
  z-index: 1;
}

/* Appui sur une ligne entière : la ligne réagit au contact */
.o-rang:active:not(:has(.o-rang-rdv:active)) {
  background: var(--noir-releve);
}

@media (hover: hover) {
  .o-rang:hover .o-rang-titre a {
    text-decoration: underline;
  }
}

.o-vide {
  display: grid;
  gap: var(--e-4);
  justify-items: start;
  padding: var(--e-6) 0;
  color: var(--gris);
}

.o-appel {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--e-5);
  margin-top: var(--e-8);
  padding: var(--e-6);
  border-radius: var(--rayon-panneau);
  background: var(--noir-releve);
}

.o-appel > div {
  display: grid;
  gap: var(--e-2);
  max-width: 60ch;
}

.o-appel p {
  color: var(--gris);
}

.o-vendues {
  margin-top: var(--e-8);
}

.o-vendues .o-section-titre {
  margin-bottom: var(--e-4);
}

/* ------------------------------------------------------------------ */
/* Fiche voiture                                                       */
/* ------------------------------------------------------------------ */

.o-teinte-bande {
  background: var(--teinte);
  color: var(--encre);
}

.o-teinte-bande.o-fondue {
  box-shadow:
    inset 0 -1px 0 var(--gris-fonce),
    inset 0 1px 0 var(--gris-fonce);
}

.o-teinte-bande .o-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--e-2) var(--e-5);
  padding-block: var(--e-7) var(--e-5);
}

.o-teinte-nom {
  font-size: var(--t-teinte-grande);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.o-teinte-finition {
  font-size: var(--t-petit);
}

.o-fiche-tete {
  display: grid;
  gap: var(--e-2);
  padding-block: var(--e-5) var(--e-6);
}

.o-fiche-faits {
  color: var(--gris);
}

.o-fiche {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--e-7);
  align-items: start;
}

.o-galerie {
  min-width: 0;
}

.o-galerie-principale {
  position: relative;
}

/* Bandes de photos : défilement natif, le doigt guide la photo et l'élan est conservé, arrêt sur chaque photo */
.o-galerie-bande,
.o-visionneuse-bande {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.o-galerie-bande::-webkit-scrollbar,
.o-visionneuse-bande::-webkit-scrollbar {
  display: none;
}

.o-galerie-bande {
  border-radius: var(--rayon-puce);
}

/* position: relative : les textes pour lecteurs d'écran (.o-sr, absolus) restent dans la bande qui défile */
.o-diapo {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.o-galerie-agrandir {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.o-galerie-agrandir img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  -webkit-user-drag: none;
}

.o-galerie-agrandir:focus-visible {
  outline-offset: -4px;
}

.o-galerie-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.o-galerie-nav:active {
  transform: var(--appui);
}

.o-galerie-vignettes button:active {
  transform: var(--appui);
}

.o-galerie-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 0;
  border-radius: 50%;
  background: var(--noir-voile);
  color: var(--texte);
  font-size: var(--t-teinte);
  line-height: 1;
  cursor: pointer;
}

.o-galerie-prec {
  left: var(--e-3);
}

.o-galerie-suiv {
  right: var(--e-3);
}

.o-galerie-compte {
  position: absolute;
  right: var(--e-3);
  bottom: var(--e-3);
  padding: 2px var(--e-2);
  border-radius: var(--rayon-champ);
  background: var(--noir-voile);
  font-size: var(--t-petit);
  font-variant-numeric: tabular-nums;
}

.o-galerie-vignettes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--e-2);
  margin-top: var(--e-2);
  padding: 0;
  list-style: none;
}

.o-galerie-vignettes button {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--rayon-champ);
  background: none;
  cursor: pointer;
  opacity: 0.7;
}

.o-galerie-vignettes button[aria-current='true'] {
  border-color: var(--texte);
  opacity: 1;
}

.o-galerie-vignettes img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
}

.o-resume {
  position: sticky;
  top: 6.25rem;
  display: grid;
  gap: var(--e-3);
  padding: var(--e-6);
  border-radius: var(--rayon-panneau);
  background: var(--noir-releve);
}

.o-prix {
  font-size: var(--t-prix);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums lining-nums;
}

.o-prix-note {
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-resume .o-actions {
  margin-block: var(--e-3);
}

.o-resume-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--e-4);
  font-size: var(--t-petit);
}

.o-resume-liens a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.o-fiche-sections {
  margin-top: var(--e-9);
}

.o-bloc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--e-6);
  padding-block: var(--e-7);
  border-top: 1px solid var(--gris-fonce);
}

.o-bloc .o-section-titre {
  font-size: var(--t-bloc);
}

.o-bloc-corps {
  display: grid;
  gap: var(--e-4);
  align-content: start;
}

.o-prose p {
  max-width: 64ch;
}

.o-accroche {
  font-size: var(--t-sous-titre);
}

.o-points,
.o-equipements {
  display: grid;
  gap: var(--e-2);
  padding-left: 1.1em;
  color: var(--gris);
}

.o-equipements {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--e-6);
}

.o-specs {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr));
  gap: var(--e-6);
}

.o-specs dl > div,
.o-recap > div {
  display: flex;
  justify-content: space-between;
  gap: var(--e-4);
  padding-block: var(--e-2);
  border-bottom: 1px solid var(--gris-fonce);
}

.o-specs dt,
.o-recap dt {
  color: var(--gris);
}

.o-specs dd,
.o-recap dd {
  text-align: right;
}

.o-specs .o-sous-titre {
  margin-bottom: var(--e-2);
}

.o-histoire {
  padding: 0;
  list-style: none;
}

.o-histoire li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--e-4);
  padding-block: var(--e-3);
  border-bottom: 1px solid var(--gris-fonce);
}

.o-histoire time {
  color: var(--gris);
  font-variant-numeric: tabular-nums lining-nums;
}

.o-histoire p {
  color: var(--gris);
}

.o-voisines {
  display: grid;
  gap: var(--e-2);
  padding: 0;
  list-style: none;
}

.o-voisines a {
  display: flex;
  align-items: center;
  gap: var(--e-4);
  min-height: 56px;
  text-decoration: none;
}

.o-voisines a strong {
  display: block;
  font-weight: 600;
}

.o-voisines a span:last-child {
  color: var(--gris);
}

.o-voisines a strong + * {
  color: var(--gris);
}

@media (hover: hover) {
  .o-voisines a:hover strong {
    text-decoration: underline;
  }
}

.o-voisine-puce {
  flex: none;
  width: 28px;
  height: 56px;
  border-radius: var(--rayon-champ);
  background: var(--teinte);
}

.o-voisine-puce.o-fondue {
  box-shadow: inset 0 0 0 1px var(--gris);
}

/* Visionneuse : un seul voile, dont l'opacité suit le geste (--voile-alpha, réglé par le script) ;
   les commandes s'effacent avec lui (filter multiplie l'opacité : une flèche désactivée reste cachée) */
.o-visionneuse {
  --voile-alpha: 0.98;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(16 17 21 / var(--voile-alpha));
  color: var(--texte);
}

.o-visionneuse::backdrop {
  background: transparent;
}

.o-visionneuse > :not(.o-visionneuse-bande) {
  filter: opacity(var(--commandes-alpha, 1));
}

/* Page figée sous la visionneuse ; la gouttière de la barre de défilement reste en place (rien ne se décale) */
html:has(.o-visionneuse[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* Le défilement horizontal reste natif (élan, arrêt sur chaque photo) ; le glisser vertical, qui ferme,
   revient au script ; le zoom à deux doigts reste possible */
.o-visionneuse-bande {
  height: 100%;
  touch-action: pan-x pinch-zoom;
}

.o-visionneuse-bande .o-diapo {
  display: grid;
  place-items: center;
  padding: var(--e-8) var(--e-4);
}

.o-visionneuse-bande img {
  width: auto;
  max-width: 100%;
  max-height: 78dvh;
  border-radius: var(--rayon-puce);
  -webkit-user-drag: none;
}

.o-visionneuse .o-galerie-nav {
  z-index: 1;
}

.o-visionneuse-fermer {
  position: absolute;
  top: var(--e-4);
  right: var(--e-4);
  min-height: 44px;
  padding: 0 var(--e-4);
  border: 1px solid var(--gris);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.o-visionneuse-legende {
  position: absolute;
  bottom: var(--e-5);
  left: var(--e-4);
  right: var(--e-4);
  color: var(--gris);
  font-size: var(--t-petit);
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Formulaires : demande et rendez-vous                                */
/* ------------------------------------------------------------------ */

.o-form-mise {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(17.5rem, 1fr);
  gap: var(--e-7);
  align-items: start;
}

.o-form {
  display: grid;
  gap: var(--e-6);
}

.o-groupe {
  display: grid;
  gap: var(--e-4);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.o-groupe legend {
  margin-bottom: var(--e-3);
  padding: 0;
  font-size: var(--t-sous-titre);
  font-weight: 600;
}

.o-groupe-mini {
  margin-bottom: var(--e-2);
}

.o-grille-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-4);
}

.o-pleine {
  grid-column: 1 / -1;
}

.o-champ {
  display: grid;
  gap: 6px;
  align-content: start;
}

.o-champ > label:not(.o-case) {
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-req {
  color: var(--texte);
}

.o-saisie,
.o-liste,
.o-zone {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--gris);
  border-radius: var(--rayon-champ);
  background: var(--noir-releve);
  color: var(--texte);
  font-size: var(--t-champ);
}

.o-zone {
  resize: vertical;
  line-height: 1.5;
}

.o-liste {
  appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gris) 50%),
    linear-gradient(135deg, var(--gris) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 52%,
    calc(100% - 14px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.o-saisie::placeholder,
.o-zone::placeholder {
  color: var(--gris);
  opacity: 0.85;
}

[aria-invalid='true'] {
  border-color: var(--alerte);
  box-shadow: inset 0 0 0 1px var(--alerte);
}

.o-erreur {
  color: var(--alerte);
  font-size: var(--t-petit);
}

.o-erreur:empty {
  display: none;
}

.o-aide {
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-case {
  display: flex;
  align-items: flex-start;
  gap: var(--e-3);
  min-height: 44px;
  padding-top: var(--e-2);
  cursor: pointer;
}

.o-case input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--texte);
}

.o-pastilles,
.o-creneaux {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2);
}

.o-pastille {
  position: relative;
  cursor: pointer;
}

.o-pastille input,
.o-jour input,
.o-motif input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.o-pastille span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--e-4);
  border: 1px solid var(--gris);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.o-pastille input:checked + span {
  background: var(--texte);
  border-color: var(--texte);
  color: var(--noir);
}

.o-pastille span,
.o-jour span,
.o-motif span {
  transition: transform 0.1s var(--ease);
}

.o-pastille:active span,
.o-jour:active span,
.o-motif:active span {
  transform: var(--appui);
}

.o-pastille input:focus-visible + span,
.o-jour input:focus-visible + span,
.o-motif input:focus-visible + span {
  outline: 2px solid var(--texte);
  outline-offset: 3px;
}

.o-pastille input:disabled + span {
  color: var(--gris);
  text-decoration: line-through;
  border-style: dashed;
  cursor: not-allowed;
}

.o-note {
  padding: var(--e-4) var(--e-5);
  border-radius: var(--rayon-panneau);
  background: var(--noir-releve);
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-note strong {
  color: var(--texte);
}

.o-aparte {
  position: sticky;
  top: 6.25rem;
  display: grid;
  gap: var(--e-3);
  padding: var(--e-6);
  border-radius: var(--rayon-panneau);
  background: var(--noir-releve);
}

.o-aparte-titre {
  font-size: var(--t-sous-titre);
  font-weight: 600;
}

.o-aparte a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--texte);
}

.o-mini {
  display: grid;
  grid-template-columns: 0.75rem 6rem minmax(0, 1fr);
  gap: var(--e-3);
  align-items: center;
}

.o-mini-teinte {
  align-self: stretch;
  border-radius: 3px;
  background: var(--teinte);
}

.o-mini-teinte.o-fondue {
  box-shadow: inset 0 0 0 1px var(--gris);
}

.o-mini img {
  width: 96px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--rayon-champ);
}

.o-mini div {
  display: grid;
  font-size: var(--t-petit);
}

.o-mini span {
  color: var(--gris);
}

/* Rendez-vous : étapes, motifs, calendrier */
.o-etapes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2) var(--e-5);
  margin: var(--e-6) 0 0;
  padding: 0;
  list-style: none;
  color: var(--gris);
}

.o-etapes li {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
}

.o-etapes span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gris);
  border-radius: 50%;
  font-size: var(--t-petit);
  font-variant-numeric: tabular-nums;
}

.o-etapes li[aria-current='step'] {
  color: var(--texte);
}

.o-etapes li[aria-current='step'] span {
  background: var(--texte);
  border-color: var(--texte);
  color: var(--noir);
}

.o-etapes li.is-fait span {
  border-color: var(--texte);
  color: var(--texte);
}

.o-etape-titre {
  font-size: var(--t-teinte);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.o-etape-titre:focus {
  outline: none;
}

.o-etape-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--e-3);
}

.o-etape-nav [hidden] + .o-btn-plein,
.o-etape-nav .o-btn-plein:only-child {
  margin-left: auto;
}

.o-motifs {
  display: grid;
  gap: var(--e-3);
}

.o-motif {
  position: relative;
  cursor: pointer;
}

.o-motif span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--e-1) var(--e-4);
  padding: var(--e-4) var(--e-5);
  border: 1px solid var(--gris);
  border-radius: var(--rayon-panneau);
}

.o-motif strong {
  font-weight: 600;
  font-size: var(--t-sous-titre);
}

.o-motif em {
  color: var(--gris);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.o-motif small {
  grid-column: 1 / -1;
  color: var(--gris);
  font-size: var(--t-petit);
}

.o-motif input:checked + span {
  border-color: var(--texte);
  box-shadow: inset 0 0 0 1px var(--texte);
  background: var(--noir-releve);
}

.o-calendrier {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr));
  gap: var(--e-6);
}

.o-mois h3 {
  margin-bottom: var(--e-3);
  font-size: var(--t-sous-titre);
  font-weight: 600;
}

.o-jours {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--e-1);
}

.o-jour-nom {
  color: var(--gris);
  font-size: var(--t-mini);
  text-align: center;
}

.o-jour {
  position: relative;
}

.o-jour span {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 48px;
  border: 1px solid var(--gris-fonce);
  border-radius: var(--rayon-champ);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.o-jour small {
  color: var(--gris);
  font-size: var(--t-nano);
}

.o-jour input:checked + span {
  background: var(--texte);
  border-color: var(--texte);
  color: var(--noir);
}

.o-jour input:disabled + span {
  border-style: dashed;
  color: var(--gris);
}

.o-jour input:not(:disabled) + span {
  border-color: var(--gris);
}

/* Confirmation */
.o-fait {
  display: grid;
  gap: var(--e-5);
}

.o-fait:focus {
  outline: none;
}

.o-fait-icone {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--texte);
  color: var(--noir);
  font: 600 var(--t-icone) / 1 var(--police-symboles);
}

.o-fait > div {
  display: grid;
  gap: var(--e-3);
}

.o-recap {
  display: grid;
}

.o-recap dd {
  white-space: pre-line;
}

/* Messages */
.o-toasts {
  position: fixed;
  left: calc(var(--e-4) + env(safe-area-inset-left, 0px));
  bottom: calc(var(--e-4) + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: grid;
  gap: var(--e-2);
  max-width: min(420px, calc(100vw - 2 * var(--e-4)));
}

.o-toast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-1) var(--e-3);
  padding: var(--e-3) var(--e-4);
  border-radius: var(--rayon-champ);
  background: var(--texte);
  color: var(--noir);
  font-size: var(--t-petit);
  box-shadow: var(--ombre-puce);
  animation: o-arrivee 0.2s var(--ease);
}

.o-toast-action {
  min-height: 2.25rem;
  padding: 0 var(--e-3);
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-weight: 600;
  cursor: pointer;
}

.o-toast-action:active {
  transform: var(--appui);
}

/* Le message repart comme il est venu : vers le bas, en fondu */
.o-toast.is-sortant {
  animation: o-depart 0.2s var(--ease) forwards;
}

@keyframes o-arrivee {
  from {
    opacity: 0;
    transform: translateY(var(--e-2));
  }
}

@keyframes o-depart {
  to {
    opacity: 0;
    transform: translateY(var(--e-2));
  }
}

@keyframes o-fondu-sortie {
  to {
    opacity: 0;
  }
}

@keyframes o-fondu {
  from {
    opacity: 0;
  }
}

.o-toast a {
  color: var(--noir);
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Espace de gestion : fond clair, outil de travail                    */
/* ------------------------------------------------------------------ */

body[data-page='gestion'] {
  background: var(--texte);
  color: var(--noir);
  font-size: var(--t-gestion);
  color-scheme: light;
}

body[data-page='gestion'] :focus-visible {
  outline-color: var(--noir);
}

.g-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--e-3);
  padding: var(--e-3) var(--gouttiere);
  background: var(--noir);
  color: var(--texte);
}

.g-brand {
  display: flex;
  align-items: center;
  gap: var(--e-3);
}

.g-brand-mark {
  width: 36px;
  height: 36px;
}

.g-brand div {
  display: grid;
  line-height: 1.2;
}

.g-brand strong {
  font-size: var(--t-sous-titre);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.g-brand span {
  color: var(--gris);
  font-size: var(--t-petit);
}

.g-pill {
  padding: 2px var(--e-2);
  border: 1px solid var(--gris);
  border-radius: 999px;
  font-size: var(--t-mini);
}

.g-top-actions {
  display: flex;
  gap: var(--e-2);
}

.g-top .g-btn {
  border-color: var(--gris);
  background: transparent;
  color: var(--texte);
}

.g-layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  min-height: calc(100dvh - 62px);
}

.g-side {
  padding: var(--e-5) var(--e-4);
  border-right: 1px solid var(--filet-clair);
  background: var(--blanc);
}

.g-side ul {
  display: grid;
  gap: var(--e-1);
  padding: 0;
  list-style: none;
}

.g-side a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--e-3);
  border-radius: var(--rayon-champ);
  color: var(--noir);
  text-decoration: none;
}

.g-side a[aria-current='page'] {
  background: var(--texte);
  font-weight: 600;
}

.g-count {
  min-width: 26px;
  padding: 0 var(--e-2);
  border-radius: 999px;
  background: var(--texte);
  font-size: var(--t-mini);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.g-count--alert {
  background: var(--noir);
  color: var(--texte);
}

.g-side-foot {
  margin-top: var(--e-6);
  color: var(--gris-gestion);
  font-size: var(--t-mini);
}

.g-main {
  padding: var(--e-6) var(--gouttiere) var(--e-9);
}

.g-main:focus {
  outline: none;
}

.g-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--e-4);
  margin-bottom: var(--e-5);
}

.g-head h1 {
  font-size: var(--t-titre-gestion);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.g-head p {
  color: var(--gris-gestion);
}

.g-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gris-gestion);
}

.g-notice {
  margin-bottom: var(--e-5);
  padding: var(--e-3) var(--e-4);
  border-radius: var(--rayon-champ);
  background: var(--blanc);
  color: var(--gris-gestion);
  font-size: var(--t-petit);
}

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--e-4);
  border: 1px solid var(--gris-gestion);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--noir);
  font-weight: 600;
  font-size: var(--t-petit);
  text-decoration: none;
  cursor: pointer;
}

.g-btn-sm {
  min-height: 44px;
  padding: 0 var(--e-3);
}

.g-btn-primary {
  border-color: var(--noir);
  background: var(--noir);
  color: var(--texte);
}

.g-btn-danger {
  border-color: var(--alerte-fonce);
  color: var(--alerte-fonce);
}

.g-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.g-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-3);
  margin-bottom: var(--e-4);
}

.g-input,
.g-select,
.g-textarea {
  min-height: 44px;
  padding: var(--e-2) var(--e-3);
  border: 1px solid var(--gris-gestion);
  border-radius: var(--rayon-champ);
  background: var(--blanc);
  color: var(--noir);
  font-size: var(--t-gestion);
}

.g-textarea {
  width: 100%;
  min-height: 6.875rem;
  resize: vertical;
}

.g-textarea--court {
  min-height: 64px;
}

.g-color {
  width: 100%;
  height: 44px;
  padding: 2px;
  border: 1px solid var(--gris-gestion);
  border-radius: var(--rayon-champ);
  background: var(--blanc);
}

.g-search {
  flex: 1 1 16.25rem;
}

.g-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-1);
}

.g-chips button {
  min-height: 44px;
  padding: 0 var(--e-3);
  border: 1px solid var(--filet-clair);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--noir);
  cursor: pointer;
}

.g-chips button[aria-pressed='true'] {
  border-color: var(--noir);
  background: var(--noir);
  color: var(--texte);
}

.g-panel {
  overflow-x: auto;
  border: 1px solid var(--filet-clair);
  border-radius: var(--rayon-panneau);
  background: var(--blanc);
}

.g-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-petit);
}

.g-table th,
.g-table td {
  padding: var(--e-3);
  border-bottom: 1px solid var(--filet-clair);
  text-align: left;
  vertical-align: middle;
}

.g-table th {
  color: var(--gris-gestion);
  font-weight: 600;
}

.g-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.g-vehicle-cell {
  display: flex;
  align-items: center;
  gap: var(--e-3);
}

.g-vehicle-cell img {
  width: 76px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 3px;
}

.g-vehicle-cell div {
  display: grid;
}

.g-vehicle-cell span:not(.g-swatch) {
  color: var(--gris-gestion);
}

/* Une référence ne se coupe jamais à son trait d'union */
.g-ref {
  white-space: nowrap;
}

.g-swatch {
  flex: none;
  width: 10px;
  height: 51px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--filet-clair);
}

/* Les deux actions restent côte à côte : la colonne du véhicule absorbe la place qui manque */
.g-row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: var(--e-2);
}

.g-empty {
  display: grid;
  gap: var(--e-1);
  padding: var(--e-6);
  color: var(--gris-gestion);
  text-align: center;
}

.g-empty strong {
  color: var(--noir);
}

.g-empty--photos {
  grid-column: 1 / -1;
}

.g-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: var(--e-5);
  align-items: start;
}

.g-editor-main {
  display: grid;
  gap: var(--e-4);
}

.g-card {
  margin: 0;
  padding: var(--e-5);
  border: 1px solid var(--filet-clair);
  border-radius: var(--rayon-panneau);
  background: var(--blanc);
  min-width: 0;
}

.g-card legend {
  padding: 0 var(--e-1);
  font-weight: 600;
  font-size: var(--t-sous-titre);
}

.g-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--e-3) var(--e-4);
}

.g-field {
  display: grid;
  gap: var(--e-1);
  align-content: start;
}

.g-field label,
.g-label {
  color: var(--gris-gestion);
  font-size: var(--t-petit);
}

.g-field .g-input,
.g-field .g-select {
  width: 100%;
}

.g-span-2 {
  grid-column: span 2;
}

.g-span-3 {
  grid-column: 1 / -1;
}

.g-hint,
.g-hint-block {
  color: var(--gris-gestion);
  font-size: var(--t-mini);
}

.g-error {
  color: var(--alerte-fonce);
  font-size: var(--t-petit);
}

.g-error:empty {
  display: none;
}

.g-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
  gap: var(--e-3);
  margin: var(--e-2) 0 var(--e-3);
  padding: 0;
  list-style: none;
}

.g-photo {
  position: relative;
  display: grid;
  gap: var(--e-1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--noir);
  text-align: left;
  cursor: pointer;
}

.g-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 3px;
}

.g-photo-main {
  position: absolute;
  top: var(--e-1);
  left: var(--e-1);
  padding: 0 var(--e-2);
  border-radius: 999px;
  background: var(--noir);
  color: var(--texte);
  font-size: var(--t-mini);
}

.g-photo-tools {
  display: flex;
  gap: var(--e-1);
}

.g-photo-tools button {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--filet-clair);
  border-radius: var(--rayon-champ);
  background: var(--blanc);
  color: var(--noir);
  cursor: pointer;
}

.g-photo-tools button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.g-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-3);
}

.g-library summary {
  min-height: 44px;
  padding-top: var(--e-3);
  color: var(--noir);
  font-weight: 600;
  cursor: pointer;
}

.g-history-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: var(--e-2);
  margin-bottom: var(--e-3);
}

.g-history-row .g-span-text {
  grid-column: 2 / 3;
}

.g-history-row textarea.g-span-text {
  grid-column: 1 / -1;
}

.g-side-panel {
  position: sticky;
  top: var(--e-4);
  display: grid;
  gap: var(--e-3);
}

.g-preview {
  display: grid;
  gap: var(--e-2);
  margin-top: var(--e-3);
  font-size: var(--t-petit);
}

.g-preview img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 3px;
}

.g-preview div {
  display: grid;
}

.g-preview div span {
  color: var(--gris-gestion);
}

.g-preview-teinte {
  display: grid;
  gap: 2px;
  min-height: 72px;
  padding: var(--e-3);
  border-radius: var(--rayon-puce);
  background: var(--teinte);
  color: var(--encre);
  font-size: var(--t-mini);
}

.g-preview-teinte strong {
  font-size: var(--t-champ);
}

.g-list {
  display: grid;
  gap: var(--e-3);
  padding: 0;
  list-style: none;
}

.g-item {
  display: grid;
  gap: var(--e-2);
  padding: var(--e-5);
  border: 1px solid var(--filet-clair);
  border-radius: var(--rayon-panneau);
  background: var(--blanc);
}

.g-item--new {
  border-color: var(--noir);
}

.g-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--e-3);
}

.g-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-1) var(--e-4);
  color: var(--gris-gestion);
  font-size: var(--t-petit);
}

.g-message {
  white-space: pre-line;
}

.g-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--e-2) var(--e-4);
  font-size: var(--t-petit);
}

.g-details dt {
  color: var(--gris-gestion);
}

.g-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2);
  margin-top: var(--e-2);
}

.g-tag {
  padding: 2px var(--e-2);
  border: 1px solid var(--gris-gestion);
  border-radius: 999px;
  font-size: var(--t-mini);
  white-space: nowrap;
}

.g-tag--new {
  border-color: var(--noir);
  background: var(--noir);
  color: var(--texte);
}

.g-date-head {
  margin: var(--e-6) 0 var(--e-3);
  font-size: var(--t-sous-titre);
  font-weight: 600;
}

.g-login {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 62px);
  padding: var(--e-6) var(--e-4);
}

.g-login-card {
  display: grid;
  gap: var(--e-4);
  width: min(100%, 420px);
  padding: var(--e-6);
  border: 1px solid var(--filet-clair);
  border-radius: var(--rayon-panneau);
  background: var(--blanc);
}

.g-login-card h1 {
  font-size: var(--t-titre-gestion);
  letter-spacing: -0.03em;
}

.g-login-card p {
  color: var(--gris-gestion);
  font-size: var(--t-petit);
}

.g-login-card .g-input {
  width: 100%;
}

.g-dialog {
  max-width: min(460px, calc(100vw - 32px));
  padding: var(--e-5);
  border: 1px solid var(--filet-clair);
  border-radius: var(--rayon-panneau);
  background: var(--blanc);
  color: var(--noir);
}

.g-dialog::backdrop {
  background: var(--voile-gestion);
}

.g-dialog form {
  display: grid;
  gap: var(--e-4);
}

.g-toasts .o-toast {
  background: var(--noir);
  color: var(--texte);
}

.g-toasts .o-toast a {
  color: var(--texte);
}


/* Petits textes : approche légèrement ouverte, pour la lisibilité */
.o-puce-voiture,
.o-rang-finition,
.o-teinte-finition,
.o-jour-nom,
.o-jour small,
.o-galerie-compte,
.g-hint,
.g-hint-block,
.g-pill,
.g-count,
.g-tag,
.g-side-foot,
.g-photo-main {
  letter-spacing: var(--approche-petit);
}

/* ------------------------------------------------------------------ */
/* Écrans moyens et petits                                             */
/* ------------------------------------------------------------------ */

@media (max-width: 1020px) {
  .o-rang {
    grid-template-columns: 9.375rem 11.25rem minmax(0, 1fr);
  }

  .o-rang-fin {
    grid-column: 3;
    justify-items: start;
    text-align: left;
  }

  /* minmax(0, 1fr) : la bande de photos ne doit pas imposer sa largeur (somme des photos) à la colonne */
  .o-fiche,
  .o-form-mise,
  .g-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .o-resume,
  .o-aparte,
  .g-side-panel {
    position: static;
  }

  .o-pied-grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .o-choisie,
  .o-jour-grille,
  .o-showroom,
  .o-bloc {
    grid-template-columns: 1fr;
  }

  .o-choisie {
    gap: var(--e-5);
  }

  .o-jour-grille {
    gap: var(--e-5);
  }

  .o-jour-texte {
    padding-bottom: 0;
  }

  .o-section {
    padding-block: var(--e-8);
  }

  .o-recherche,
  .o-vendue {
    grid-template-columns: 1fr;
    gap: var(--e-6);
  }

  .o-bloc {
    gap: var(--e-4);
    padding-block: var(--e-6);
  }

  .g-layout {
    grid-template-columns: 1fr;
  }

  .g-side {
    border-right: 0;
    border-bottom: 1px solid var(--filet-clair);
  }

  .g-side ul {
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .g-side-foot {
    display: none;
  }

  .g-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .o-ouverture {
    padding-top: var(--e-7);
  }

  /* Puces étroites : le nom de teinte seul, le modèle est dans le panneau en dessous */
  .o-puce {
    padding-right: var(--e-2);
  }

  .o-puce .o-puce-voiture {
    display: none;
  }

  .o-puce .o-puce-nom {
    font-size: var(--t-mini);
  }

  .o-rang {
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: var(--e-3) var(--e-4);
  }

  .o-rang-teinte {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    min-height: 0;
    gap: var(--e-3);
  }

  .o-rang-photo {
    grid-row: 2;
  }

  .o-rang-texte {
    grid-row: 2;
  }

  .o-rang-fin {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }

  .o-grille-form,
  .o-services,
  .o-equipements,
  .o-pied-grille,
  .g-fields {
    grid-template-columns: 1fr;
  }

  .g-span-2 {
    grid-column: auto;
  }

  .o-galerie-vignettes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .o-galerie-nav {
    display: none;
  }

  .o-histoire li {
    grid-template-columns: 5.25rem minmax(0, 1fr);
  }

  .o-resume,
  .o-aparte,
  .o-appel,
  .o-filtres {
    padding: var(--e-5);
  }

  .g-table thead {
    display: none;
  }

  .g-table tr {
    display: grid;
    gap: var(--e-2);
    padding: var(--e-3);
    border-bottom: 1px solid var(--filet-clair);
  }

  .g-table td {
    padding: 0;
    border: 0;
  }

  .g-table td[data-label]::before {
    content: attr(data-label) ' : ';
    color: var(--gris-gestion);
  }

  .g-row-actions {
    justify-content: flex-start;
  }
}

/* ------------------------------------------------------------------ */
/* Préférences du visiteur                                             */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .o-puce {
    animation: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }

  /* Pas de glissement : des fondus courts, ou rien */
  .o-nav {
    transform: none !important;
  }

  .o-toast {
    animation-name: o-fondu;
  }

  .o-toast.is-sortant {
    animation-name: o-fondu-sortie;
  }

  .o-btn:active,
  .o-toast-action:active,
  .o-galerie-nav:active,
  .o-galerie-vignettes button:active,
  .o-pastille:active span,
  .o-jour:active span,
  .o-motif:active span {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .o-entete-barre,
  .o-galerie-nav,
  .o-galerie-compte {
    background: var(--noir-releve);
    backdrop-filter: none;
  }
}

/* Contraste augmenté : textes secondaires plus clairs, filets visibles, surfaces pleines */
@media (prefers-contrast: more) {
  :root {
    --gris: #d4d4d4;
    --gris-fonce: #a3a3a3;
    --noir-voile: var(--noir-releve);
  }

  .o-entete-barre {
    border-color: var(--gris);
  }

  .o-saisie,
  .o-liste,
  .o-zone,
  .o-pastille span,
  .o-motif span {
    border-color: var(--texte);
  }
}

/* ------------------------------------------------------------------ */
/* Impression : « Télécharger la fiche »                               */
/* ------------------------------------------------------------------ */

@media print {
  .o-demo,
  .o-entete,
  .o-pied,
  .concept-badge,
  .o-fil,
  .o-galerie-nav,
  .o-galerie-compte,
  .o-galerie-vignettes,
  .o-actions,
  .o-resume-liens,
  .o-toasts,
  .o-voisines,
  .o-voisines + *,
  .o-visionneuse {
    display: none !important;
  }

  body {
    background: var(--blanc);
    color: var(--noir);
    font-size: var(--t-impression);
  }

  .o-fiche {
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
  }

  .o-resume {
    position: static;
    background: var(--blanc);
    border: 1px solid var(--filet-clair);
  }

  .o-etat > span,
  .o-chapo,
  .o-fiche-faits,
  .o-prix-note,
  .o-specs dt,
  .o-histoire time,
  .o-histoire p,
  .o-points,
  .o-equipements,
  .o-services dd {
    color: var(--gris-gestion);
  }

  .o-bloc {
    grid-template-columns: 1fr 2.5fr;
    padding: 14px 0;
    break-inside: avoid;
    border-color: var(--filet-clair);
  }

  .o-fiche-sections {
    margin-top: 16px;
  }
}
