/* ==========================================================================
   Auto Pièces VSP : feuille du thème enfant (2026-10-29)

   Couleurs : uniquement les variables des couleurs globales de GeneratePress
   (Customizer) : --bleu, --bleu-fonce, --bleu-clair, --jaune, --jaune-clair,
   --texte, --noir, --gris-fond, --bordure, --blanc. Les nuances manquantes sont
   obtenues par color-mix() en attendant leur ajout au Customizer.
   Contrastes vérifiés en AA.

   Spécificité : ce fichier se charge après generate-style et le kit Elementor
   (post-1129.css) ; les sélecteurs qui les croisent sont préfixés (body, deux
   classes) pour l'emporter sans !important.
   Kit Elementor : ses polices et couleurs globales sont neutralisées en 3 bis
   (variables redéfinies sur body.elementor-kit-1129) ; les tailles des pages
   Elementor (body.elementor-page) restent les leurs.

   Sommaire : 1 polices / 2 jetons / 3 base / 3 bis kit Elementor /
   3 ter pleine largeur / 4 boutons / 5 en-tête / 6 menu mobile /
   7 contenu et article / 7 bis navigation d'article / 7 ter commentaires /
   8 barre latérale et widgets / 9 pied / 10 mouvement réduit
   ========================================================================== */

/* 1. Polices locales (SIL OFL 1.1, voir assets/fonts/LICENCES.md) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Figtree : version latine officielle (~/OUTILS/Polices/figtree/SOURCE.md) depuis le 2026-10-29. */
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-variable-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sora : titres et boutons depuis le 2026-10-29 (~/OUTILS/Polices/sora/SOURCE.md). */
@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-variable-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Repli de Sora : Arial mesurée sur une phrase française (size-adjust 114,2 %). */
@font-face {
  font-family: "Sora repli";
  src: local("Arial");
  size-adjust: 114.2%;
  ascent-override: 84.9%;
  descent-override: 25.4%;
  line-gap-override: 0%;
}

/* Repli aux métriques proches, pour limiter le saut au chargement */
@font-face {
  font-family: "Manrope repli";
  src: local("Arial");
  size-adjust: 104%;
  ascent-override: 102%;
  descent-override: 29%;
}

/* Repli de Figtree : Arial mesurée sur une phrase française (size-adjust 99,6 %). */
@font-face {
  font-family: "Figtree repli";
  src: local("Arial");
  size-adjust: 99.6%;
  ascent-override: 95.4%;
  descent-override: 25.1%;
  line-gap-override: 0%;
}

/* 2. Jetons ------------------------------------------------------------------ */
:root {
  /* Retour arrière possible (Manrope encore déclarée plus haut) :
     --apv-police-titre: "Manrope", "Manrope repli", "Helvetica Neue", Arial, sans-serif; */
  --apv-police-titre: "Sora", "Sora repli", "Helvetica Neue", Arial, sans-serif;
  --apv-police-texte: "Figtree", "Figtree repli", "Helvetica Neue", Arial, sans-serif;

  /* Échelle (rapport 1,25 environ, fluide à partir du H3) */
  --apv-taille-0: 0.875rem;                                   /* 14 px : mentions */
  --apv-taille-1: 1.0625rem;                                  /* 17 px : texte */
  --apv-taille-2: 1.25rem;                                    /* 20 px : chapeau, H4 */
  --apv-taille-3: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);  /* H3 */
  --apv-taille-4: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);     /* H2 */
  --apv-taille-5: clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem);   /* H1 */
  --apv-taille-6: clamp(2.5rem, 1rem + 6.5vw, 6.5rem);        /* titre d'affiche (accueil, fiche) */
  --apv-interligne: 1.65;
  --apv-mesure: 68ch;

  /* Couleur des titres H1-H3, cartes, widgets (couleur globale « titres » du
     Customizer ; repli bleu foncé). Le bleu vif --bleu reste pour les
     surtitres, liens et icônes (demande client du 2026-10-29). */
  --apv-titres: var(--titres, var(--bleu-fonce));

  /* Formulaires : couleurs fixées dans le code, pas dans le Customizer (demande
     client du 2026-10-29). Erreur 6,6:1 et bord de champ 4,08:1 sur blanc. */
  --erreur: #b42318;
  --bordure-champ: #737f8c;

  /* Nuances dérivées (à reporter dans le Customizer : voir le rapport) */
  --apv-jaune-survol: color-mix(in srgb, var(--jaune) 90%, var(--noir));
  --apv-filet-clair: color-mix(in srgb, var(--blanc) 22%, var(--bleu-fonce));
  --apv-verre: color-mix(in srgb, var(--blanc) 72%, transparent);
  --apv-verre-dense: color-mix(in srgb, var(--blanc) 93%, transparent);
  --apv-verre-bord: color-mix(in srgb, var(--blanc) 60%, transparent);
  --apv-ombre-barre: 0 10px 30px color-mix(in srgb, var(--bleu-fonce) 16%, transparent);
  --apv-ombre-panneau: 0 18px 44px color-mix(in srgb, var(--bleu-fonce) 18%, transparent);

  /* Formes : un rayon par famille */
  --apv-rayon: 8px;          /* boutons, champs, liens du menu */
  --apv-rayon-carte: 14px;   /* cartes, widgets, panneaux, images */
  --apv-rayon-barre: 18px;   /* barre d'en-tête flottante */
  --apv-filet: 4px;          /* filet jaune, repris du logo */

  /* Mise en page */
  --apv-largeur: 76rem;
  --apv-gouttiere: clamp(0.75rem, 3vw, 2rem);
  --apv-entete: 5.5rem;      /* hauteur réservée sous la barre (ancres, colonne collante) */
  --apv-focus: 3px solid var(--bleu);

  /* Largeur du texte des sections : toute la largeur du contenu (décision client
     du 2026-10-29). Les articles (body.single-post) et les pages de lecture
     (body.apv-lecture, colonne de 720 px) gardent une largeur de lecture. */
  --apv-mesure-section: 100%;

  /* Cartes (toutes : services, garanties, blog, catalogue, stock…) sur fond
     blanc : bordure fine et ombre légère au repos ; au survol, bordure jaune,
     élévation de 3 px et ombre plus marquée, en 200 ms. Usage :
       border: var(--apv-carte-bordure); box-shadow: var(--apv-carte-ombre);
       transition: var(--apv-transition-carte);
       :hover → border-color: var(--apv-carte-bordure-survol);
                box-shadow: var(--apv-carte-ombre-survol);
                transform: translateY(var(--apv-carte-elevation));
     Mouvement réduit : --apv-carte-elevation vaut 0 (section 10). */
  --apv-carte-bordure: 1px solid var(--bordure);
  --apv-carte-bordure-survol: var(--jaune);
  --apv-carte-ombre: 0 1px 2px color-mix(in srgb, var(--bleu-fonce) 6%, transparent), 0 4px 14px color-mix(in srgb, var(--bleu-fonce) 6%, transparent);
  --apv-carte-ombre-survol: 0 4px 8px color-mix(in srgb, var(--bleu-fonce) 8%, transparent), 0 16px 32px color-mix(in srgb, var(--bleu-fonce) 14%, transparent);
  --apv-carte-elevation: -3px;
  --apv-transition-carte: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;

  /* Cartes NON cliquables (services, garanties, avantages : décision client n° 18
     du 2026-10-29) : même repos (--apv-carte-bordure, --apv-carte-ombre) ; au
     survol, seule la bordure passe à un bleu léger, sans élévation ni ombre
     renforcée. Usage (ou classe « apv-carte-fixe », blocs.css 5.3) :
       transition: var(--apv-transition-carte-fixe);
       :hover → border-color: var(--apv-carte-fixe-bordure-survol); */
  --apv-carte-fixe-bordure-survol: color-mix(in srgb, var(--bleu) 40%, var(--bordure));
  --apv-transition-carte-fixe: border-color 200ms ease;
}

/* Articles : largeur de lecture pour le texte des groupes (pages de lecture :
   blocs.css 5.8, colonne de 45 rem). */
body.single-post {
  --apv-mesure-section: var(--apv-mesure);
}

/* 3. Base ------------------------------------------------------------------- */
html {
  scroll-padding-top: calc(var(--apv-entete) + 1rem);
}

body:not(.elementor-page) {
  font-family: var(--apv-police-texte);
  font-size: var(--apv-taille-1);
  line-height: var(--apv-interligne);
  color: var(--texte);
  -webkit-font-smoothing: antialiased;
}

body:not(.elementor-page) :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--apv-police-titre);
  color: var(--apv-titres);
  line-height: 1.15;
  letter-spacing: -0.015em;
  /* « pretty » et non « balance » : un titre qui tient sur une ligne n'est
     jamais coupé en deux (décision client n° 5, 2026-10-29) */
  text-wrap: pretty;
}

body:not(.elementor-page) h1 { font-size: var(--apv-taille-5); font-weight: 800; letter-spacing: -0.03em; }
body:not(.elementor-page) h2 { font-size: var(--apv-taille-4); font-weight: 800; letter-spacing: -0.025em; }
body:not(.elementor-page) h3 { font-size: var(--apv-taille-3); font-weight: 700; }
body:not(.elementor-page) h4 { font-size: var(--apv-taille-2); font-weight: 700; }
body:not(.elementor-page) :is(h5, h6) { font-size: var(--apv-taille-1); font-weight: 700; }

body:not(.elementor-page) a {
  color: var(--bleu);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

body:not(.elementor-page) a:hover {
  color: var(--bleu-fonce);
  text-decoration-thickness: 2px;
}

body :focus-visible {
  outline: var(--apv-focus);
  outline-offset: 3px;
}

body ::selection {
  background: var(--jaune);
  color: var(--noir);
}

/* Fond de page blanc partout : pages, articles, fiches du catalogue et du stock,
   blog, catégories, archives (décisions client du 2026-10-29). Aussi réglé dans
   les défauts de GeneratePress (functions.php, background_color = base-3) ; la
   règle tient même si le Customizer enregistre un autre fond. Les cartes et les
   encarts se détachent par une bordure et une ombre légère (jetons --apv-carte-*). */
body.wp-theme-generatepress,
body:is(.page, .single, .blog, .archive, .search, .error404) {
  background-color: var(--blanc);
}

/* Liens de l'en-tête et du pied : la police vient du conteneur, jamais du kit
   (même spécificité que « .elementor-kit-1129 a », chargé avant ce fichier). */
.apv-header a,
.apv-footer a,
.apv-menu-mobile a {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

/* 3 bis. Kit Elementor : polices et couleurs globales neutralisées ----------- */
/* body.elementor-kit-1129 (0,1,1) passe devant .elementor-kit-1129 (0,1,0).
   Les couleurs du kit pointent vers celles du Customizer ; les familles vers
   Manrope (titres) et Figtree (texte). La typographie « accent » (règle
   « .elementor-kit-1129 a » : Roboto 17 px 500) reçoit une valeur invalide
   (initial) : la déclaration du kit devient « unset » et le lien hérite de la
   police, de la taille et de la graisse de son parent. */
body.elementor-kit-1129 {
  --e-global-color-primary: var(--bleu);
  --e-global-color-secondary: var(--jaune);
  --e-global-color-text: var(--texte);
  --e-global-color-accent: var(--jaune);
  --e-global-typography-primary-font-family: var(--apv-police-titre);
  --e-global-typography-secondary-font-family: var(--apv-police-titre);
  --e-global-typography-text-font-family: var(--apv-police-texte);
  --e-global-typography-accent-font-family: initial;
  --e-global-typography-accent-font-size: initial;
  --e-global-typography-accent-font-weight: initial;
  font-family: var(--apv-police-texte);
  color: var(--texte);
}

/* Survol des liens du kit : jaune sur blanc illisible ; bleu foncé à la place
   (la règle du kit lit la variable sur le lien lui-même). */
body.elementor-kit-1129 a:not(.elementor-button) {
  --e-global-color-secondary: var(--bleu-fonce);
}

/* Titres du kit (« .elementor-kit-1129 h1 » … h6 : Roboto en dur) */
body.elementor-kit-1129 :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--apv-police-titre);
}

/* Contenus Elementor : passe devant les réglages par élément
   (« .elementor-355 .elementor-element.elementor-element-xxx .elementor-heading-title »,
   spécificité 0,4,0) qui imposent encore Roboto. Les icônes (i, svg) ne sont pas visées. */
body.elementor-kit-1129 .elementor .elementor-element :is(h1, h2, h3, h4, h5, h6, .elementor-heading-title, .elementor-icon-box-title, .elementor-image-box-title, .elementor-button) {
  font-family: var(--apv-police-titre);
}

body.elementor-kit-1129 .elementor .elementor-element :is(p, li, td, th, label, blockquote, figcaption, input, textarea, select, .elementor-icon-box-description, .elementor-image-box-description) {
  font-family: var(--apv-police-texte);
}

/* 3 ter. Pleine largeur (accueil, pages, fiches : body.full-width-content) --- */
/* Les sections s'étendent bord à bord ; le texte reste dans 1200 px environ. */
body.full-width-content {
  --apv-largeur-section: 75rem; /* 1200 px */
}

body.full-width-content .site.grid-container,
body.full-width-content .site-content {
  max-width: none;
}

/* Aucun débordement horizontal (marges négatives de certains widgets) ;
   « clip » ne crée pas de conteneur de défilement : les éléments collants restent collants. */
body.full-width-content .site {
  overflow-x: clip;
}

/* Sections Elementor « pleine largeur » de premier niveau : fond bord à bord,
   contenu ramené à 1200 px par un remplissage latéral. */
body.full-width-content .elementor > .e-con.e-con-full,
body.full-width-content .elementor > .elementor-section.elementor-section-full_width > .elementor-container {
  padding-inline: max(var(--apv-gouttiere), (100% - var(--apv-largeur-section)) / 2);
}

/* Contenu non Elementor d'une page pleine largeur */
body.full-width-content:not(.elementor-page) .inside-article {
  padding-inline: 0;
}

body.full-width-content:not(.elementor-page) :is(.entry-header, .entry-content > *:not(.alignfull):not(.alignwide)) {
  max-width: min(var(--apv-largeur-section), 100% - 2 * var(--apv-gouttiere));
  margin-inline: auto;
}

/* Texte courant : toute la largeur du contenu (--apv-mesure-section, 100 %) ;
   mêmes :not() que ci-dessus, pour passer devant. */
body.full-width-content:not(.elementor-page) .entry-content > :is(p, ul, ol, blockquote, h2, h3, h4):not(.alignfull):not(.alignwide) {
  max-width: min(var(--apv-largeur-section), var(--apv-mesure-section), 100% - 2 * var(--apv-gouttiere));
}

body.full-width-content:not(.elementor-page) .entry-content > .alignwide {
  max-width: min(90rem, 100% - 2 * var(--apv-gouttiere));
  margin-inline: auto;
}

body.full-width-content:not(.elementor-page) .entry-content > .alignfull {
  max-width: none;
  margin-inline: 0;
}

/* 4. Boutons ---------------------------------------------------------------- */
/* « body » : passe devant « .elementor-kit-1129 a » (Roboto) du kit Elementor, même spécificité, chargé avant. */
body .apv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6875rem 1.375rem;
  border: 2px solid transparent;
  border-radius: var(--apv-rayon);
  font-family: var(--apv-police-titre);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Principal : jaune de la marque, texte bleu foncé (jamais de texte blanc sur le jaune) */
.apv-btn.apv-btn--primary,
body .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: var(--jaune);
  border-color: var(--jaune);
  color: var(--bleu-fonce);
}

.apv-btn.apv-btn--primary:hover,
body .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--apv-jaune-survol);
  border-color: var(--apv-jaune-survol);
  color: var(--bleu-fonce);
}

/* Secondaire : contour bleu, plein au survol */
.apv-btn.apv-btn--secondary,
body .wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  border-color: var(--bleu);
  color: var(--bleu);
}

.apv-btn.apv-btn--secondary:hover,
body .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--bleu);
  border-color: var(--bleu);
  color: var(--blanc);
}

/* Lien d'action : texte souligné, sans fond */
.apv-btn.apv-btn--lien {
  padding-inline: 0;
  background: none;
  border-color: transparent;
  color: var(--bleu);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.apv-btn.apv-btn--lien:hover {
  color: var(--bleu-fonce);
  text-decoration-thickness: 2px;
}

/* Blocs Boutons de WordPress : même gabarit que .apv-btn */
body .wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6875rem 1.375rem;
  border-width: 2px;
  border-style: solid;
  border-radius: var(--apv-rayon);
  font-family: var(--apv-police-titre);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

/* Sur fond foncé : contour jaune pour le focus */
.apv-footer :focus-visible,
.apv-menu-mobile :focus-visible {
  outline-color: var(--jaune);
}

/* 5. En-tête : barre flottante arrondie, effet verre ------------------------ */
.apv-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem var(--apv-gouttiere) 0;
}

.admin-bar .apv-header { top: 32px; }

.apv-header__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--apv-largeur);
  min-height: 4.25rem;
  margin: 0 auto;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border: 1px solid var(--apv-verre-bord);
  border-radius: var(--apv-rayon-barre);
  background-color: var(--apv-verre);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Au défilement (classe posée par theme.js dès 12 px) : fond dense, bordure, ombre */
.apv-header.is-scrolled .apv-header__inner {
  border-color: var(--bordure);
  background-color: var(--apv-verre-dense);
  box-shadow: var(--apv-ombre-barre);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .apv-header__inner,
  .apv-header.is-scrolled .apv-header__inner {
    background-color: var(--blanc);
  }
}

.apv-header__logo {
  flex: 0 0 auto;
  line-height: 0;
}

.apv-header__logo a {
  display: inline-block;
  border-radius: var(--apv-rayon);
}

.apv-header__logo img {
  display: block;
  width: auto;
  height: 2.75rem;
}

.apv-header .apv-header__site-name {
  font-family: var(--apv-police-titre);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 2.75rem;
  color: var(--bleu);
  text-decoration: none;
}

/* Menu principal (grand écran) */
.apv-header__inner .apv-nav {
  margin-inline: auto;
}

.apv-nav .apv-nav__list,
.apv-nav .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apv-header__inner .apv-nav__list {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.apv-header__inner .apv-nav__list > li {
  position: relative;
  display: flex;
  align-items: center;
}

.apv-header__inner .apv-nav__list > li > a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border-radius: var(--apv-rayon);
  font-family: var(--apv-police-titre);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--noir);
  text-decoration: none;
  transition: color 0.2s ease;
}

.apv-header__inner .apv-nav__list > li.menu-item-has-children > a {
  padding-right: 0.25rem;
}

/* Trait jaune de 2 px sous le libellé : se trace de gauche à droite au survol,
   permanent sur la page en cours. Aucun fond au survol. */
.apv-header__inner .apv-nav__list > li > a::after {
  content: "";
  position: absolute;
  right: 0.875rem;
  bottom: 0.5rem;
  left: 0.875rem;
  height: 2px;
  background-color: var(--jaune);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease-out;
}

.apv-header__inner .apv-nav__list > li.menu-item-has-children > a::after {
  right: 0.25rem;
}

.apv-header__inner .apv-nav__list > li > a:hover,
.apv-header__inner .apv-nav__list > li > a:focus-visible {
  background-color: transparent;
  color: var(--bleu);
}

.apv-header__inner .apv-nav__list > li > a:hover::after,
.apv-header__inner .apv-nav__list > li > a:focus-visible::after,
.apv-header__inner .apv-nav__list > li:is(.current-menu-item, .current-menu-ancestor, .current-menu-parent) > a::after,
.apv-header__inner .apv-nav__list > li > a[aria-current]::after {
  transform: scaleX(1);
}

/* Page en cours : texte bleu */
.apv-header__inner .apv-nav__list > li:is(.current-menu-item, .current-menu-ancestor, .current-menu-parent) > a,
.apv-header__inner .apv-nav__list > li > a[aria-current] {
  color: var(--bleu);
}

/* Contour au clavier seulement : rien au clic de la souris */
.apv-header :is(a, button):focus:not(:focus-visible) {
  outline: none;
}

/* Bouton d'ouverture du sous-menu (ajouté par theme.js) */
.apv-nav .apv-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--apv-rayon);
  background: transparent;
  color: var(--noir);
  cursor: pointer;
}

.apv-nav .apv-nav__toggle:hover,
.apv-nav .apv-nav__toggle:focus-visible {
  background-color: transparent;
  color: var(--bleu);
}

.apv-nav__toggle svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.apv-nav__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Sous-menu en panneau */
.apv-header__inner .apv-nav .sub-menu {
  position: absolute;
  top: calc(100% + 0.875rem);
  left: 0;
  z-index: 10;
  min-width: 19rem;
  padding: 0.5rem;
  border: 1px solid var(--bordure);
  border-radius: var(--apv-rayon-carte);
  background-color: var(--blanc);
  box-shadow: var(--apv-ombre-panneau);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.375rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

/* Pont invisible entre le libellé et le panneau (le survol ne se perd pas) */
.apv-header__inner .apv-nav .sub-menu::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 0.875rem;
}

.apv-header__inner .apv-nav li:hover > .sub-menu,
.apv-header__inner .apv-nav li.is-open > .sub-menu,
html:not(.apv-js) .apv-header__inner .apv-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

/* Échap ferme aussi le panneau ouvert au survol (WCAG 1.4.13) */
.apv-header__inner .apv-nav li.is-ferme:not(.is-open) > .sub-menu {
  opacity: 0;
  visibility: hidden;
}

/* Liens du sous-menu : largeur du libellé (le trait suit le texte, pas le panneau) */
.apv-header__inner .apv-nav .sub-menu a {
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--apv-rayon);
  font-family: var(--apv-police-titre);
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--noir);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Sous-menu : même traitement que la barre (trait jaune de 2 px tracé de gauche à droite,
   permanent sur la page en cours), sans encadré ni barre verticale. */
.apv-nav .sub-menu a::after {
  content: "";
  position: absolute;
  right: 0.875rem;
  bottom: 0.375rem;
  left: 0.875rem;
  height: 2px;
  background-color: var(--jaune);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease-out;
}

.apv-header__inner .apv-nav .sub-menu a:hover,
.apv-header__inner .apv-nav .sub-menu a:focus-visible {
  background-color: transparent;
  color: var(--bleu);
}

.apv-nav .sub-menu a:hover::after,
.apv-nav .sub-menu a:focus-visible::after,
.apv-nav .sub-menu .current-menu-item > a::after,
.apv-nav .sub-menu a[aria-current]::after {
  transform: scaleX(1);
}

.apv-header__inner .apv-nav .sub-menu .current-menu-item > a {
  color: var(--bleu);
}

/* Actions : téléphone, Contact, bouton Menu */
.apv-header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.apv-header__inner .apv-nav + .apv-header__actions {
  margin-left: 0;
}

.apv-header .apv-header__tel {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: var(--apv-rayon);
  font-family: var(--apv-police-titre);
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--bleu);
  text-decoration: none;
}

.apv-header .apv-header__tel:hover {
  color: var(--bleu-fonce);
  text-decoration: underline;
  text-decoration-color: var(--jaune);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* Icônes SVG (inc/icons.php) : jamais écrasées dans un conteneur flex */
.apv-icone {
  flex: 0 0 auto;
  display: block;
}

.apv-header__tel svg,
.apv-menu-mobile svg {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
}

.apv-header__menu-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Bouton menu : icône seule (libellé par aria-label), carré de 44 px */
.apv-header .apv-header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--apv-rayon);
  background-color: var(--jaune);
  color: var(--bleu-fonce);
  font-family: var(--apv-police-titre);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.apv-header .apv-header__menu-btn:hover,
.apv-header .apv-header__menu-btn:focus {
  background-color: var(--apv-jaune-survol);
  color: var(--bleu-fonce);
}

/* Masqué sans JavaScript ; affiché dès que apv-menu-js est posée dans le <head> (functions.php, point 2 bis) */
html:not(.apv-menu-js) .apv-header .apv-header__menu-btn[hidden] {
  display: none;
}

/* Grand écran : le menu est dans la barre, pas de bouton « Menu » */
@media (min-width: 1080px) {
  .apv-header .apv-header__menu-btn {
    display: none;
  }
}

/* Écrans moyens et petits : le menu passe dans la boîte de dialogue */
@media (max-width: 1079px) {
  .apv-menu-js .apv-header__inner .apv-nav {
    display: none;
  }

  /* Menu masqué : les actions (appel, menu) reviennent tout à droite, côte à côte */
  .apv-menu-js .apv-header__inner .apv-nav + .apv-header__actions {
    margin-left: auto;
  }

  /* Sans JavaScript : menu affiché à plat sous le logo */
  html:not(.apv-menu-js) .apv-header__inner {
    flex-wrap: wrap;
  }

  html:not(.apv-menu-js) .apv-header__inner .apv-nav {
    order: 3;
    width: 100%;
    margin: 0;
  }

  html:not(.apv-menu-js) .apv-header__inner .apv-nav__list,
  html:not(.apv-menu-js) .apv-header__inner .apv-nav__list > li {
    flex-wrap: wrap;
  }

  html:not(.apv-menu-js) .apv-header__inner .apv-nav .sub-menu {
    position: static;
    min-width: 0;
    padding: 0 0 0 1rem;
    border: 0;
    box-shadow: none;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@media (max-width: 782px) {
  .admin-bar .apv-header { top: 46px; }
}

@media (max-width: 600px) {
  .admin-bar .apv-header { top: 0; }
}

@media (max-width: 719px) {
  .apv-header__inner {
    min-height: 3.75rem;
    padding-left: 0.75rem;
  }

  .apv-header__logo img {
    height: 2.375rem;
  }

  .apv-header .apv-header__cta {
    display: none;
  }

  /* Téléphone : icône seule, numéro gardé pour les lecteurs d'écran */
  .apv-header .apv-header__tel {
    justify-content: center;
    padding: 0;
    background-color: var(--bleu-clair);
  }

  .apv-header__tel-num {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* 6. Menu mobile : boîte de dialogue native plein écran --------------------- */
.apv-menu-mobile {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--bleu-fonce);
  color: var(--blanc);
}

.apv-menu-mobile[open] {
  display: flex;
  flex-direction: column;
  animation: apv-tiroir 0.28s ease-out;
}

.apv-menu-mobile::backdrop {
  background: transparent;
}

@keyframes apv-tiroir {
  from { transform: translateX(100%); }
  to { transform: none; }
}

html.apv-menu-ouvert {
  overflow: hidden;
}

.apv-menu-mobile__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--apv-gouttiere);
  border-bottom: 1px solid var(--apv-filet-clair);
}

.apv-menu-mobile .apv-menu-mobile__titre {
  margin: 0;
  font-family: var(--apv-police-titre);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--blanc);
}

.apv-menu-mobile .apv-menu-mobile__fermer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 2px solid var(--blanc);
  border-radius: var(--apv-rayon);
  background: transparent;
  color: var(--blanc);
  font-family: var(--apv-police-titre);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.apv-menu-mobile .apv-menu-mobile__fermer:hover,
.apv-menu-mobile .apv-menu-mobile__fermer:focus {
  background-color: var(--blanc);
  color: var(--bleu-fonce);
}

.apv-menu-mobile__corps {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.5rem var(--apv-gouttiere) 1.5rem;
}

.apv-menu-mobile .apv-nav__list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--apv-filet-clair);
}

.apv-menu-mobile .apv-nav__list > li > a {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  font-family: var(--apv-police-titre);
  font-size: clamp(1.375rem, 1rem + 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--blanc);
  text-decoration: none;
}

.apv-menu-mobile .apv-nav__list > li > a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* Contour au clavier seulement (comme dans l'en-tête) */
.apv-menu-mobile :is(a, button):focus:not(:focus-visible) {
  outline: none;
}

.apv-menu-mobile .apv-nav li:is(.current-menu-item, .current-menu-ancestor) > a {
  color: var(--jaune);
}

.apv-menu-mobile .apv-nav .apv-nav__toggle {
  width: 3rem;
  min-height: 3rem;
  color: var(--blanc);
}

.apv-menu-mobile .apv-nav .apv-nav__toggle:hover,
.apv-menu-mobile .apv-nav .apv-nav__toggle:focus {
  background-color: var(--apv-filet-clair);
  color: var(--blanc);
}

.apv-menu-mobile .apv-nav__toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.apv-menu-mobile .apv-nav .sub-menu {
  display: none;
  width: 100%;
  padding: 0 0 0.75rem 1rem;
}

.apv-menu-mobile .apv-nav li.is-open > .sub-menu {
  display: block;
}

.apv-menu-mobile .apv-nav .sub-menu a {
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  font-family: var(--apv-police-texte);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--blanc);
  text-decoration: none;
}

/* Trait du sous-menu : liens sans remplissage latéral dans le menu mobile */
.apv-menu-mobile .apv-nav .sub-menu a::after {
  right: 0;
  bottom: 0.5rem;
  left: 0;
}

.apv-menu-mobile__bas {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem var(--apv-gouttiere) calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--apv-filet-clair);
}

.apv-menu-mobile__bas .apv-btn {
  width: 100%;
}

.apv-menu-mobile .apv-btn.apv-btn--secondary {
  border-color: var(--blanc);
  color: var(--blanc);
}

.apv-menu-mobile .apv-btn.apv-btn--secondary:hover {
  background-color: var(--blanc);
  border-color: var(--blanc);
  color: var(--bleu-fonce);
}

.apv-menu-mobile .apv-menu-mobile__infos {
  margin: 0.25rem 0 0;
  font-size: var(--apv-taille-0);
  line-height: 1.5;
  color: var(--bleu-clair);
}

/* 7. Contenu et article ----------------------------------------------------- */
body:not(.elementor-page) .entry-content > :is(p, ul, ol, blockquote, h2, h3, h4) {
  max-width: var(--apv-mesure-section);
}

body.single-post .entry-content > :is(p, ul, ol, blockquote, h2, h3, h4) {
  max-width: var(--apv-mesure);
}

/* Rythme vertical du contenu */
body:not(.elementor-page) .entry-content :is(h2, h3) {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

body:not(.elementor-page) .entry-content p {
  margin: 0 0 1em;
}

/* Premier enfant : le type dans :is() passe devant la règle des titres ci-dessus */
body:not(.elementor-page) .entry-content > :is(h2, h3, h4, p, ul, ol, figure, div, blockquote, table):first-child {
  margin-top: 0;
}

/* Trait jaune sous les H2 de section (décision client n° 4, 2026-10-29) : même
   trait que sous le titre de page (56 × 4 px, filet du logo). Pages, articles,
   sections des fiches véhicules. Spécificité nulle (:where) : les composants qui
   ont leur propre trait (bannière) gardent le leur ; jamais sur les titres des
   cartes, bannières, appels à l'action, widgets (liste ci-dessous). */
:where(body:not(.elementor-page)) :where(.entry-content, .apv-fiche__section) h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: var(--apv-filet);
  margin-top: clamp(0.625rem, 1.2vw, 0.875rem);
  border-radius: 2px;
  background-color: var(--jaune);
}

:where(body:not(.elementor-page)) :where(.entry-content, .apv-fiche__section) h2.has-text-align-center::after {
  margin-inline: auto;
}

:where(.apv-accueil, .apv-banniere, .apv-cta, .apv-carte-image, .apv-cartes-image, .apv-carte-texte, .apv-service, .apv-chiffre, .apv-carte, .apv-vehicule, .apv-info, .apv-bandeau, .apv-hero, .widget, .apv-post-nav, .comments-area, .wp-block-details, .wpforms-container) h2::after,
:where(h2.screen-reader-text)::after {
  content: none;
}

/* Fin du contenu : la dernière section n'ajoute pas sa marge à celle du pied
   (décision client n° 9, 2026-10-29). Passe devant « .wp-block-group.apv-section » (0,3,0). */
body:not(.elementor-page) .entry-content > :last-child {
  margin-bottom: 0;
}

/* Paragraphes vides laissés par l'éditeur. Les <p> qui ne contiennent qu'un <br> ou &nbsp; ne sont
   pas repérables sans risque en CSS (un <p>texte<br></p> correspond aussi à :has(> br:only-child)) :
   voir le rapport (filtre the_content proposé). */
body:not(.elementor-page) .entry-content p:empty {
  display: none;
}

body:not(.elementor-page) .entry-content h4 {
  margin-top: 1.75em;
  margin-bottom: 0.5em;
}

body:not(.elementor-page) .entry-content li + li {
  margin-top: 0.35em;
}

body:not(.elementor-page) .entry-content li::marker {
  color: var(--bleu);
}

body:not(.elementor-page) .entry-content img {
  height: auto;
  border-radius: var(--apv-rayon-carte);
}

body:not(.elementor-page) .entry-content figure {
  margin-block: 2rem;
}

body:not(.elementor-page) .entry-content figcaption {
  margin-top: 0.5rem;
  font-size: var(--apv-taille-0);
  color: var(--texte);
}

/* Citation et encadré « À noter : … » (demande client du 2026-10-29) : même
   taille et même police que le texte, italique, graisse normale ; le libellé en
   tête (strong / b) reste en gras. Filet bleu à gauche, léger fond bleu clair. */
body:not(.elementor-page) .entry-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: var(--apv-filet) solid var(--bleu);
  border-radius: 0 var(--apv-rayon) var(--apv-rayon) 0;
  background-color: var(--bleu-clair);
  font-family: var(--apv-police-texte);
  font-size: var(--apv-taille-1);
  font-weight: 400;
  font-style: italic;
  line-height: var(--apv-interligne);
  color: var(--texte);
}

body:not(.elementor-page) .entry-content blockquote :is(p, li) {
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
}

body:not(.elementor-page) .entry-content blockquote :is(strong, b) {
  font-weight: 700;
}

body:not(.elementor-page) .entry-content blockquote > :last-child {
  margin-bottom: 0;
}

body:not(.elementor-page) .entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
}

body:not(.elementor-page) .entry-content :is(th, td) {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--bordure);
  text-align: left;
}

body:not(.elementor-page) .entry-content th {
  background-color: var(--gris-fond);
  font-family: var(--apv-police-titre);
  font-weight: 700;
  color: var(--noir);
}

body:not(.elementor-page) .entry-content iframe {
  max-width: 100%;
  border-radius: var(--apv-rayon-carte);
}

/* Gabarit d'article : sur le fond blanc de la page, sans carte (décision client
   du 2026-10-29) ; le texte s'aligne sur le fil d'Ariane. */
body.single-post .inside-article {
  padding: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 0;
  background-color: var(--blanc);
}

body.single-post .entry-header {
  margin-bottom: 1.5rem;
}

/* H1 d'article : toute la largeur de la colonne (pas d'équilibrage des lignes, pas de mesure en ch) */
body.single-post h1.entry-title {
  max-width: none;
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: wrap;
}

body.single-post .entry-meta {
  font-size: var(--apv-taille-0);
  color: var(--texte);
}

/* Image à la une au-dessus du titre : largeur de la colonne, 16:9, coins arrondis */
body.single-post :is(.featured-image, .page-header-image-single, .post-image) {
  margin: 0 0 1.5rem;
  line-height: 0;
}

body.single-post :is(.featured-image, .page-header-image-single, .post-image) img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--apv-rayon-carte);
}

/* Petite image (origine < 800 px, classe posée par inc/gp-layout.php) : taille réelle, centrée dans un bloc 16:9 */
body.single-post .featured-image.apv-image-petite {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: var(--bleu-clair);
  border-radius: var(--apv-rayon-carte);
  overflow: hidden;
}

body.single-post .featured-image.apv-image-petite img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0;
}

/* 7 bis. Navigation précédent / suivant (balisage de inc/blog.php) -- */
.apv-post-nav {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0 0;
}

@media (min-width: 640px) {
  .apv-post-nav {
    grid-template-columns: 1fr 1fr;
  }

  .apv-post-nav .apv-post-nav__item--next {
    grid-column: 2;
    text-align: right;
    justify-items: end;
  }
}

body .apv-post-nav .apv-post-nav__item {
  display: grid;
  align-content: start;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 1.125rem 1.25rem;
  border: var(--apv-carte-bordure);
  border-radius: var(--apv-rayon-carte);
  background-color: var(--blanc);
  box-shadow: var(--apv-carte-ombre);
  color: var(--noir);
  text-decoration: none;
  transition: var(--apv-transition-carte);
}

/* Survol des cartes : jetons --apv-carte-* (section 2) */
body .apv-post-nav .apv-post-nav__item:hover {
  border-color: var(--apv-carte-bordure-survol);
  box-shadow: var(--apv-carte-ombre-survol);
  transform: translateY(var(--apv-carte-elevation));
  color: var(--noir);
}

/* Libellé : une seule flèche, l'icône SVG (avant pour « précédent », après pour « suivant ») */
.apv-post-nav .apv-post-nav__label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--apv-police-titre);
  font-size: var(--apv-taille-0);
  font-weight: 700;
  color: var(--bleu);
}

.apv-post-nav .apv-post-nav__item--next .apv-post-nav__label {
  flex-direction: row-reverse;
}

.apv-post-nav .apv-post-nav__label .apv-icone {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform 0.2s ease;
}

.apv-post-nav .apv-post-nav__item--prev:hover .apv-icone {
  transform: translateX(-3px);
}

.apv-post-nav .apv-post-nav__item--next:hover .apv-icone {
  transform: translateX(3px);
}

.apv-post-nav .apv-post-nav__title {
  font-family: var(--apv-police-titre);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--apv-titres);
}

.apv-post-nav .apv-post-nav__item:hover .apv-post-nav__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.apv-post-nav .apv-post-nav__cat {
  justify-self: start;
  padding: 0.125rem 0.5rem;
  border-radius: var(--apv-rayon);
  background-color: var(--bleu-clair);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--bleu-fonce);
}

.apv-post-nav .apv-post-nav__item--next .apv-post-nav__cat {
  justify-self: end;
}

@media (max-width: 639px) {
  .apv-post-nav .apv-post-nav__item--next .apv-post-nav__cat {
    justify-self: start;
  }
}

/* 7 quater. Fil d'Ariane (Rank Math dans nav.apv-fil-ariane) ---------------- */
/* Discret, 14 px, au-dessus du titre, aligné sur le bord gauche du contenu :
   1 200 px au plus sur les pages pleine largeur, le blog et les catégories ;
   largeur de la colonne dans un article et dans le conteneur du blog. */
.apv-fil-ariane {
  max-width: min(75rem, 100% - 2 * var(--apv-gouttiere));
  margin: clamp(1.25rem, 3vw, 2rem) auto clamp(0.75rem, 2vw, 1.25rem);
  font-family: var(--apv-police-texte);
  font-size: var(--apv-taille-0);
  line-height: 1.5;
  color: var(--texte);
}

body.single-post .apv-fil-ariane,
.apv-blog .apv-fil-ariane,
.entry-content .apv-fil-ariane {
  max-width: none;
  margin-inline: 0;
}

body.single-post .apv-fil-ariane {
  margin-top: 0;
}

.apv-fil-ariane .rank-math-breadcrumb p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 0.375rem;
  max-width: none;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* (0,2,2) : passe devant « body:not(.elementor-page) a » (0,2,1) */
body .apv-fil-ariane .rank-math-breadcrumb a {
  color: var(--texte);
  text-decoration: none;
  overflow-wrap: anywhere;
}

body .apv-fil-ariane .rank-math-breadcrumb a:hover {
  color: var(--bleu);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.apv-fil-ariane .rank-math-breadcrumb .separator {
  color: var(--bordure);
}

/* Page en cours : un peu plus marquée, coupée proprement si le titre est long */
.apv-fil-ariane .rank-math-breadcrumb .last {
  font-weight: 600;
  color: var(--noir);
  overflow-wrap: anywhere;
}

/* 7 ter. Commentaires (gabarit de GeneratePress) ---------------------------- */
body.single-post .comments-area {
  margin-top: 2.5rem;
}

/* .comments-area en plus : passe devant « body:not(.elementor-page) h2 » (0,2,2) */
body.single-post .comments-area :is(.comments-title, .comment-reply-title) {
  margin: 0 0 1.25rem;
  font-family: var(--apv-police-titre);
  font-size: var(--apv-taille-3);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--apv-titres);
}

body.single-post .comment-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

body.single-post .comment-list .children {
  margin: 0;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  border-left: 2px solid var(--bordure);
  list-style: none;
}

/* GeneratePress encadre aussi le texte (.comment-content : 30 px de marge et bordure) et décale les
   réponses de -30 px : les cadres s'empilaient et la colonne tombait à environ 150 px en mobile. */
body.single-post .comment-list .comment-content {
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
}

body.single-post .comment .children {
  margin-top: 0;
}

body.single-post .comment-list .comment-body {
  margin: 0 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--bordure);
  border-radius: var(--apv-rayon-carte);
  background-color: var(--blanc);
}

/* Mobile : retrait des réponses et marge des cartes réduits (après les règles de base). */
@media (max-width: 639px) {
  body.single-post .comment-list .children {
    padding-left: 0.75rem;
  }

  body.single-post .comment-list .comment-body {
    padding: 1rem;
  }
}

body.single-post .comment-list .bypostauthor > .comment-body {
  border-color: var(--bleu-clair);
  background-color: var(--gris-fond);
}

body.single-post .comment-list .avatar {
  border-radius: 50%;
}

body.single-post .comment-list .comment-author {
  font-family: var(--apv-police-titre);
  font-weight: 800;
  color: var(--noir);
}

body.single-post .comment-list .comment-author .fn,
body.single-post .comment-list .comment-author .fn a {
  font-style: normal;
  color: var(--noir);
}

body.single-post .comment-list .comment-metadata,
body.single-post .comment-list .comment-metadata a {
  font-size: var(--apv-taille-0);
  color: var(--texte);
  text-decoration: none;
}

body.single-post .comment-list .comment-content {
  margin-top: 0.75rem;
}

body.single-post .comment-list .comment-content p:last-child {
  margin-bottom: 0;
}

body.single-post .comment-list .reply {
  margin-top: 0.75rem;
}

body.single-post .comment-list .comment-reply-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--apv-police-titre);
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--bleu);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Formulaire */
body.single-post .comment-respond {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--apv-rayon-carte);
  background-color: var(--gris-fond);
}

body.single-post .comment-form :is(.comment-notes, .logged-in-as) {
  font-size: var(--apv-taille-0);
}

body.single-post .comment-form label {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--apv-police-titre);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--noir);
}

body.single-post .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--bordure);
  border-radius: var(--apv-rayon);
  background-color: var(--blanc);
  font-family: var(--apv-police-texte);
  font-size: 1rem;
  color: var(--noir);
}

body.single-post .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea):focus {
  border-color: var(--bleu);
}

body.single-post .comment-form .comment-form-cookies-consent {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

body.single-post .comment-form .comment-form-cookies-consent label {
  display: inline;
  font-family: var(--apv-police-texte);
  font-weight: 400;
}

body.single-post .comment-form .form-submit .submit {
  min-height: 2.75rem;
  padding: 0.6875rem 1.375rem;
  border: 2px solid var(--jaune);
  border-radius: var(--apv-rayon);
  background-color: var(--jaune);
  font-family: var(--apv-police-titre);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--bleu-fonce);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.single-post .comment-form .form-submit .submit:hover,
body.single-post .comment-form .form-submit .submit:focus-visible {
  border-color: var(--apv-jaune-survol);
  background-color: var(--apv-jaune-survol);
  color: var(--bleu-fonce);
}

/* 8. Barre latérale (articles) et widgets ----------------------------------- */
@media (min-width: 1025px) {
  body .is-right-sidebar .inside-right-sidebar {
    position: sticky;
    top: calc(var(--apv-entete) + 1rem);
  }

  body.admin-bar .is-right-sidebar .inside-right-sidebar {
    top: calc(var(--apv-entete) + 1rem + 32px);
  }
}

body .is-right-sidebar .widget {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  overflow: hidden;
  border: var(--apv-carte-bordure);
  border-radius: var(--apv-rayon-carte);
  background-color: var(--blanc);
  box-shadow: var(--apv-carte-ombre);
  font-size: 0.975rem;
  line-height: 1.55;
  color: var(--texte);
}

body .is-right-sidebar .widget :is(.widget-title, .wp-block-heading, h2, h3) {
  margin: 0 0 0.75rem;
  font-family: var(--apv-police-titre);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--apv-titres);
}

body .is-right-sidebar .widget p {
  margin: 0 0 0.875rem;
}

body .is-right-sidebar .widget > :last-child,
body .is-right-sidebar .widget p:last-child {
  margin-bottom: 0;
}

body .is-right-sidebar .widget a:not(.apv-btn):not(.wp-block-button__link):not(.apv-widget-contact__tel) {
  color: var(--bleu);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Image de widget : à fond perdu quand elle ouvre l'encart */
body .is-right-sidebar .widget .wp-block-image {
  margin: 0 0 1rem;
}

body .is-right-sidebar .widget > .wp-block-image:first-child,
body .is-right-sidebar .widget > .wp-block-group:first-child > .wp-block-image:first-child {
  margin: -1.5rem -1.5rem 1.25rem;
}

body .is-right-sidebar .widget .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--apv-rayon);
}

body .is-right-sidebar .widget > .wp-block-image:first-child img,
body .is-right-sidebar .widget > .wp-block-group:first-child > .wp-block-image:first-child img {
  border-radius: 0;
}

body .is-right-sidebar .widget .wp-block-image figcaption {
  font-size: var(--apv-taille-0);
}

body .is-right-sidebar .widget .wp-block-buttons {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

body .is-right-sidebar .widget .wp-block-button,
body .is-right-sidebar .widget .wp-block-button__link {
  width: 100%;
}

/* Encart sur fond de couleur de la charte (bloc Groupe avec couleur de fond) */
body .is-right-sidebar .widget .wp-block-group.has-background {
  padding: 1.25rem;
  border-radius: var(--apv-rayon);
}

body .is-right-sidebar .widget :is(.has-bleu-background-color, .has-bleu-fonce-background-color, .has-accent-background-color, .has-accent-2-background-color),
body .is-right-sidebar .widget :is(.has-bleu-background-color, .has-bleu-fonce-background-color, .has-accent-background-color, .has-accent-2-background-color) :is(h2, h3, .wp-block-heading, p, a:not(.wp-block-button__link)) {
  color: var(--blanc);
}

body .is-right-sidebar .widget :is(.has-jaune-background-color, .has-accent-3-background-color),
body .is-right-sidebar .widget :is(.has-jaune-background-color, .has-accent-3-background-color) :is(h2, h3, .wp-block-heading, p, a:not(.wp-block-button__link)) {
  color: var(--bleu-fonce);
}

/* Widget « Contact magasin » : version claire (décision client n° 5, 2026-10-29).
   Fond bleu clair, titre et numéro bleu foncé, texte gris, bouton « Nous
   contacter » jaune, « Voir les véhicules en stock » en contour bleu.
   Contrastes AA : bleu foncé / bleu clair 9,63 (titre, numéro) ; texte / bleu
   clair 7,28 ; bleu foncé / jaune 7,92 (bouton principal) ; bleu / bleu clair
   7,15 (contour et libellé du secondaire, focus bleu) ; blanc / bleu 7,92
   (secondaire survolé). */
body .is-right-sidebar .widget.apv-widget-contact-wrap {
  border-color: color-mix(in srgb, var(--bleu) 18%, var(--bleu-clair));
  background-color: var(--bleu-clair);
  color: var(--texte);
}

body .is-right-sidebar .widget.apv-widget-contact-wrap :is(.widget-title, h2, h3) {
  color: var(--bleu-fonce);
}

body .is-right-sidebar .widget.apv-widget-contact-wrap p {
  color: var(--texte);
}

body .is-right-sidebar .widget.apv-widget-contact-wrap .apv-widget-contact__tel,
body .is-right-sidebar .widget.apv-widget-contact-wrap .apv-widget-contact__tel .apv-icone {
  color: var(--bleu-fonce);
}

body .is-right-sidebar .widget.apv-widget-contact-wrap .apv-btn.apv-btn--secondary {
  border-color: var(--bleu);
  background-color: transparent;
  color: var(--bleu);
}

body .is-right-sidebar .widget.apv-widget-contact-wrap .apv-btn.apv-btn--secondary:hover {
  border-color: var(--bleu);
  background-color: var(--bleu);
  color: var(--blanc);
}

/* Bas d'article en mobile et tablette : la barre latérale passe sous le
   contenu ; 48 px d'air avant le pied (décision client n° 6, 2026-10-29). */
@media (max-width: 1024px) {
  body.single-post .is-right-sidebar .inside-right-sidebar {
    padding-bottom: 3rem;
  }

  body.single-post .is-right-sidebar .widget:last-child {
    margin-bottom: 0;
  }
}

/* Article en mobile (avec barre latérale, jusqu'à 768 px inclus, seuil où
   GeneratePress empile les colonnes) : marge latérale de 20 px, 16 px sous
   400 px, sur le fil d'Ariane (posé hors de l'article par inc/fil-ariane.php),
   l'article et la barre latérale empilée dessous. Un bloc pleine ou grande
   largeur reste dans la colonne : aucun débordement. */
@media (max-width: 768px) {
  body.single-post:not(.full-width-content) {
    --apv-marge-article: 1.25rem;
  }

  body.single-post:not(.full-width-content) :is(.apv-fil-ariane, .inside-article, .inside-right-sidebar) {
    padding-inline: var(--apv-marge-article);
  }

  body.single-post:not(.full-width-content) .entry-content > :is(.alignfull, .alignwide) {
    max-width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 399px) {
  body.single-post:not(.full-width-content) {
    --apv-marge-article: 1rem;
  }
}

/* Article à deux colonnes (dès 769 px) : marge minimale de 24 px sur le conteneur
   des colonnes, qui porte le fil d'Ariane, l'article et la barre latérale. Le
   conteneur fait au plus 75 rem : le calcul retire ce que son centrage donne
   déjà, la marge tombe à 0 dès 1248 px et le rendu reste inchangé au-dessus. */
@media (min-width: 769px) {
  body.single-post:not(.full-width-content) .site-content {
    padding-inline: max(0px, 1.5rem - (100vw - 75rem) / 2);
  }
}

body .is-right-sidebar .widget .apv-widget-contact__phone {
  margin: 0.25rem 0 1rem;
}

body .is-right-sidebar .widget .apv-widget-contact__tel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-family: var(--apv-police-titre);
  font-size: clamp(1.375rem, 0.9rem + 1vw, 1.75rem); /* numéro sur une ligne dans une colonne étroite */
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--bleu-fonce);
  text-decoration: none;
}

body .is-right-sidebar .widget .apv-widget-contact__tel:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

body .is-right-sidebar .widget .apv-widget-contact__action {
  margin: 0 0 0.5rem;
}

.apv-widget-contact .apv-widget-contact__btn {
  width: 100%;
}

/* 9. Pied de page ----------------------------------------------------------- */
.apv-footer {
  margin-top: clamp(2.5rem, 5vw, 4rem); /* respiration entre le contenu et le pied (réduite, décision client n° 9) */
  border-top: var(--apv-filet) solid var(--jaune);
  background-color: var(--bleu-fonce);
  color: var(--blanc);
  font-family: var(--apv-police-texte);
  font-size: 1rem;
  line-height: 1.6;
}

.apv-footer__appel,
.apv-footer__inner,
.apv-footer__bas {
  max-width: var(--apv-largeur);
  margin: 0 auto;
  padding-inline: var(--apv-gouttiere);
}

/* Bandeau d'appel : compact, le numéro en évidence sans écraser le pied */
.apv-footer__appel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid var(--apv-filet-clair);
}

.apv-footer__appel-texte {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.apv-footer .apv-footer__accroche {
  margin: 0;
  font-family: var(--apv-police-titre);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--blanc);
}

.apv-footer .apv-footer__grand-tel {
  display: inline-block;
  font-family: var(--apv-police-titre);
  font-size: clamp(1.75rem, 1.5rem + 0.8vw, 2rem); /* 28 à 32 px */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--jaune);
  text-decoration: none;
}

.apv-footer .apv-footer__grand-tel:hover {
  color: var(--jaune);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

.apv-footer__inner {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem;
}

/* 4 colonnes (coordonnées, navigation, gamme Ligier, liens utiles) : 2 x 2 en tablette, une ligne en bureau */
@media (min-width: 768px) {
  .apv-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .apv-footer__inner {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
  }
}

/* Logo blanc sans fond (étape 9) : plus de cadre ni d'arrondi, même largeur d'affichage qu'avant */
.apv-footer .apv-footer__logo {
  display: block;
  width: 10rem;
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
  background: none;
  border-radius: 0;
}

.apv-footer .apv-footer__titre {
  margin: 0 0 0.75rem;
  font-family: var(--apv-police-titre);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--blanc);
}

.apv-footer .apv-footer__contact {
  font-style: normal;
}

.apv-footer .apv-footer__contact p {
  margin: 0 0 0.5rem;
}

.apv-footer .apv-footer__name {
  font-family: var(--apv-police-titre);
  font-weight: 800;
}

.apv-footer .apv-footer__phone a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
  color: var(--blanc);
}

.apv-footer .apv-footer__horaires {
  color: var(--bleu-clair);
}

/* Lignes de coordonnées avec icône (repère jaune du logo) */
.apv-footer .apv-footer__ligne {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.apv-footer .apv-footer__ligne .apv-icone {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15em;
  color: var(--jaune);
}

.apv-footer .apv-footer__ligne.apv-footer__phone {
  align-items: center;
}

.apv-footer .apv-footer__ligne.apv-footer__phone .apv-icone {
  margin-top: 0;
}

/* Réseaux sociaux : 3 pastilles de 44 px, icône blanche, jaune au survol */
.apv-footer .apv-footer__reseaux {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.apv-footer .apv-footer__reseau {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--apv-filet-clair);
  border-radius: var(--apv-rayon);
  color: var(--blanc);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.apv-footer .apv-footer__reseau:hover {
  border-color: var(--jaune);
  background-color: var(--jaune);
  color: var(--bleu-fonce);
}

.apv-footer .apv-footer__reseau .apv-icone {
  width: 1.375rem;
  height: 1.375rem;
}

/* Mention de réalisation : dans la barre du bas, à la suite du copyright */
.apv-footer .apv-footer__credit a {
  color: var(--bleu-clair);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.apv-footer .apv-footer__credit a:hover {
  color: var(--jaune);
}

.apv-footer .apv-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apv-footer .apv-footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--blanc);
  text-decoration: none;
}

.apv-footer .apv-footer__list a:hover,
.apv-footer .apv-footer__phone a:hover {
  color: var(--jaune);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.apv-footer .apv-footer__list .current-menu-item > a {
  text-decoration: underline;
  text-decoration-color: var(--jaune);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.apv-footer .apv-footer__bas {
  padding-block: 1.125rem;
  border-top: 1px solid var(--apv-filet-clair);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
  color: var(--bleu-clair);
}

.apv-footer .apv-footer__bas p {
  margin: 0;
}

/* 10. Mouvement réduit ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .apv-header__inner,
  .apv-header__inner .apv-nav .sub-menu,
  .apv-header__inner .apv-nav__list > li > a,
  .apv-header__inner .apv-nav__list > li > a::after,
  .apv-nav__toggle svg,
  .apv-nav .sub-menu a,
  .apv-nav .sub-menu a::after,
  .apv-post-nav .apv-post-nav__label .apv-icone,
  .apv-footer .apv-footer__reseau,
  .apv-btn,
  body .apv-post-nav .apv-post-nav__item,
  body.single-post .comment-form .form-submit .submit {
    transition: none;
  }

  .apv-menu-mobile[open] {
    animation: none;
  }

  /* Cartes : pas d'élévation (bordure et ombre seulement), pas de transition */
  :root {
    --apv-carte-elevation: 0px;
    --apv-transition-carte: none;
  }
}

/* Mobile (moins de 768 px) — décisions client du 2026-10-29 -------------------------------------------- */
@media (max-width: 767px) {
  /* Boutons : ceux qui sont alignés à droite (ou à gauche) en bureau passent centrés, règle générale pour
     tous les groupes de boutons du contenu (blocs Boutons de WordPress, quel que soit leur réglage). */
  body .entry-content .wp-block-buttons,
  body .entry-content .wp-block-buttons.is-content-justification-right,
  body .entry-content .wp-block-buttons.is-content-justification-left,
  body .entry-content .wp-block-buttons.is-content-justification-space-between {
    justify-content: center !important;
  }

  /* Bandeau « Un renseignement, un devis ? » : texte, numéro et bouton centrés */
  .apv-footer .apv-footer__appel {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .apv-footer .apv-footer__appel-texte {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Pied : logo, coordonnées, horaires, réseaux, colonnes de liens et copyright centrés */
  .apv-footer .apv-footer__inner,
  .apv-footer .apv-footer__col,
  .apv-footer .apv-footer__contact,
  .apv-footer .apv-footer__titre,
  .apv-footer .apv-footer__list,
  .apv-footer .apv-footer__bas {
    text-align: center;
  }

  .apv-footer .apv-footer__logo {
    margin-inline: auto;
  }

  .apv-footer .apv-footer__ligne {
    justify-content: center;
    text-align: center;
  }

  .apv-footer .apv-footer__reseaux {
    justify-content: center;
  }

  .apv-footer .apv-footer__list {
    padding: 0;
    list-style: none;
  }
}

/* Menu : intitulé de groupe non cliquable (« Gamme Ligier », inc/menu.php) et ses éléments décalés.
   Bureau (sous-menu) et mobile (menu plein écran). Pas de capitales (direction artistique). */
.apv-nav .apv-menu-libelle__texte {
  display: block;
  padding: 0.625rem 0.875rem 0.25rem;
  font-family: var(--apv-police-titre);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--texte);
  cursor: default;
}

.apv-header__inner .apv-nav .sub-menu .apv-menu-groupe > a,
.apv-menu-mobile .apv-nav .sub-menu .apv-menu-groupe > a {
  padding-left: 1.75rem;
}

.apv-menu-mobile .apv-nav .apv-menu-libelle__texte {
  padding-left: 1rem;
  color: var(--bleu-clair); /* fond bleu foncé : 9,6:1 */
}

.apv-menu-mobile .apv-nav .sub-menu .apv-menu-groupe + li:not(.apv-menu-groupe) {
  border-top-color: var(--apv-filet-clair);
}

/* Séparation discrète après le groupe (avant Catalogue VSP) */
.apv-nav .sub-menu .apv-menu-groupe + li:not(.apv-menu-groupe) {
  margin-top: 0.375rem;
  padding-top: 0.375rem;
  border-top: 1px solid var(--bordure);
}
