/* ════════════════════════════════════════════════════════════════
   MÉCAREMAP — ui.css : COMPOSANTS UNIFIÉS (chargée en dernier sur chaque page)
   Une seule forme pour chaque type d'élément, quel que soit le module qui l'affiche :
   · boutons   : rayon --r-md, hauteur --ctl-h (40 px dans les barres), Inter 600, sans ombre
   · bordures  : 1px solid var(--line) (var(--line-strong) pour les contrôles)
   · cartes    : fond --surface, rayon --r-lg
   · pastilles : rayon --r-sm
   Les couleurs viennent des jetons de css/global.css (thèmes sombre et clair).
   Le rouge (--accent) n'apparaît que sur le bouton principal et les états actifs.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. BOUTONS ─────────────────────────────────────────────── */
:root :is(.btn, .st-btn, .rp-btn, .ft-btn, .hd-cta, .hd-tel, .rv-btn, .mr-act, .cc-pay, .calc-btn, .aix-act,
  .nav-cta, .sp-cc-go, .ft-nl-btn, .back-btn, .filter-btn, .st-card-cta, .rv-next, .gar-btn) {
  min-height: var(--ctl-h);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: 600 15px/1.2 var(--font-ui);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  text-shadow: none;
  box-shadow: none;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
:root :is(.btn, .st-btn, .rp-btn, .ft-btn, .hd-cta, .hd-tel, .rv-btn, .mr-act, .cc-pay, .calc-btn, .aix-act,
  .nav-cta, .sp-cc-go, .ft-nl-btn, .back-btn, .filter-btn, .st-card-cta, .rv-next, .gar-btn):hover {
  transform: none;
  box-shadow: none;
}
/* boutons des barres (en-tête, bandeau) : hauteur réduite */
:root :is(.hd-cta, .hd-tel, .ft-nl-btn, .st-card-cta) {
  min-height: var(--ctl-h-sm);
  padding-top: 0;
  padding-bottom: 0;
  font-size: 14px;
}

/* principal : le seul élément rouge d'un écran */
:root :is(.btn-primary, .st-btn, .rp-btn--main, .ft-btn--red, .hd-cta, .rv-btn--red, .mr-act--red, .aix-act--red,
  .cc-pay, .calc-btn, .ft-nl-btn, .nav-cta, .sp-cc-go, .rv-next) {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
:root :is(.btn-primary, .st-btn, .rp-btn--main, .ft-btn--red, .hd-cta, .rv-btn--red, .mr-act--red, .aix-act--red,
  .cc-pay, .calc-btn, .ft-nl-btn, .nav-cta, .sp-cc-go, .rv-next):hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

/* secondaire : contour neutre */
:root :is(.btn-outline, .btn-ghost, .btn-ghost-hero, .btn-gold, .st-btn--ghost, .st-btn--wa, .rp-btn--ghost,
  .ft-btn:not(.ft-btn--red), .hd-tel, .mr-act:not(.mr-act--red), .rv-btn:not(.rv-btn--red),
  .aix-act:not(.aix-act--red), .back-btn, .filter-btn, .st-card-cta, .gar-btn) {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
:root :is(.btn-outline, .btn-ghost, .btn-ghost-hero, .btn-gold, .st-btn--ghost, .st-btn--wa, .rp-btn--ghost,
  .ft-btn:not(.ft-btn--red), .hd-tel, .mr-act:not(.mr-act--red), .rv-btn:not(.rv-btn--red),
  .aix-act:not(.aix-act--red), .back-btn, .filter-btn, .st-card-cta, .gar-btn):hover {
  background: var(--tint-2);
  color: var(--text);
  border-color: var(--line-strong);
}
/* WhatsApp : même bouton secondaire, seule l'icône porte le vert de la marque */
:root :is(.st-btn--wa, .mr-act--wa, .rv-btn--wa, .aix-act--wa, .mr-btn-wa) svg { color: #25d366; }

/* boutons-icônes : carrés arrondis, même rayon que les autres boutons */
:root :is(.hd-theme, #account-btn, .hd-lang-btn, .ft-top, #nav-trigger) {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
:root :is(.hd-theme, #account-btn, .hd-lang-btn, .ft-top, #nav-trigger):hover {
  background: var(--tint-2);
  border-color: var(--line-strong);
  color: var(--text);
  transform: none;
}

/* ── 2. FOCUS CLAVIER ────────────────────────────────────────── */
:root :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ── 3. GRAPHIQUE DES COURBES DE GAINS (js/dyno-chart.js) ─────────
   Un seul axe vertical par graphique ; deux séries (origine en gris, préparation en accent) ;
   le texte garde la couleur du texte, seules les courbes portent la couleur des séries. */
.dy {
  --dy-tuned: var(--accent);
  --dy-stock: #8b909a;
  --dy-surface: var(--surface);
  font-family: var(--font-ui);
}
html[data-theme="light"] .dy { --dy-stock: #6b7280; }
.dy-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.dy-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.dy--split .dy-tabs { display: none; }
.dy-tab {
  min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-2);
  font: 600 12.5px/1 var(--font-ui); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.dy-tab:hover { color: var(--text); }
.dy-tab[aria-selected="true"] { background: var(--text); color: var(--bg); }
.dy-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font: 500 12.5px/1.2 var(--font-ui); color: var(--text-2); }
.dy-legend li { display: inline-flex; align-items: center; gap: 7px; }
.dy-legend li[hidden] { display: none; }
.dy-key { flex: none; display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--dy-stock); border-radius: 2px; }
.dy-key--tuned { border-top-color: var(--dy-tuned); }
.dy-plots { display: grid; gap: 14px; }
.dy--split .dy-plots { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dy-ptitle { margin: 0 0 4px; font: 600 12.5px/1.2 var(--font-ui); color: var(--text); }
.dy-ptitle span { font-weight: 500; color: var(--text-3); }
.dy--tabs .dy-ptitle { display: none; }
.dy-wrap { position: relative; border-radius: var(--r-sm); touch-action: pan-y; cursor: crosshair; }
.dy-svg { display: block; max-width: 100%; overflow: visible; -webkit-user-select: none; user-select: none; }
.dy-svg text { font: 500 11px var(--font-ui); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.dy-svg .dy-val { font-size: 12px; font-weight: 600; fill: var(--text); }
.dy-svg .dy-val--stock { font-weight: 500; fill: var(--text-2); }
.dy-grid, .dy-tick { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.dy-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dy-line--stock { stroke: var(--dy-stock); }
.dy-line--tuned { stroke: var(--dy-tuned); }
.dy-area { fill: var(--dy-tuned); opacity: .1; }
.dy-dot { stroke: var(--dy-surface); stroke-width: 2; }
.dy-dot--stock { fill: var(--dy-stock); }
.dy-dot--tuned { fill: var(--dy-tuned); }
.dy-cross { stroke: var(--text-3); stroke-width: 1; shape-rendering: crispEdges; }
.dy-hover { opacity: 0; pointer-events: none; }
.dy-wrap.is-hover .dy-hover { opacity: 1; }
.dy-tip {
  position: absolute; top: 4px; z-index: 2; min-width: 150px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface-2); box-shadow: var(--shadow-md);
  font: 500 12.5px/1.3 var(--font-ui); color: var(--text-2); pointer-events: none;
}
.dy-tip[hidden] { display: none; }
.dy-tip p { margin: 0; }
.dy-tip-x { padding-bottom: 5px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dy-tip-row { display: flex; align-items: center; gap: 8px; padding-top: 3px; white-space: nowrap; }
.dy-tip-row b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dy-tip .dy-tip-gain { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line); font-weight: 600; color: var(--text); white-space: nowrap; }
.dy-xunit { margin: 2px 0 0; text-align: right; font: 500 11px/1.3 var(--font-ui); color: var(--text-3); }
.dy-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dy-data { margin-top: 6px; font: 500 12.5px/1.3 var(--font-ui); color: var(--text-2); }
.dy-data summary { display: inline-block; padding: 4px 0; cursor: pointer; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.dy-data summary:hover { color: var(--text); }
.dy-scroll { max-height: 230px; margin-top: 6px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.dy-data table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dy-data th, .dy-data td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dy-data thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; color: var(--text); }
.dy-data th:first-child { text-align: left; }
.dy-data tbody th { font-weight: 500; color: var(--text-2); }
.dy-data tr:last-child th, .dy-data tr:last-child td { border-bottom: 0; }

/* ── 4. BLOCS COMMUNS DES PAGES ──────────────────────────────── */
/* Appel à l'action de fin de page (remplace l'ancien bandeau rouge) */
.cta-band { padding: clamp(40px, 6vw, 64px) 20px; text-align: center; border-top: 1px solid var(--line); background: var(--surface); }
.cta-band > div { max-width: 720px; margin: 0 auto; }
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { margin-bottom: 22px; }

/* Liens contextuels de fin de page (maillage interne) */
.rel { padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--line); background: var(--bg); position: relative; z-index: 1; }
.rel-in { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); display: grid; gap: 28px 32px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.rel-h { margin: 0 0 12px; font: 600 12.5px/1.3 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.rel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rel a { color: var(--text-2); font: 500 14.5px/1.4 var(--font-ui); text-decoration: none; }
.rel a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* Page-carrefour des zones d'intervention */
.hub { max-width: 1080px; margin: 0 auto; padding: clamp(104px, 14vw, 150px) clamp(16px, 4vw, 40px) clamp(48px, 7vw, 88px); }
.hub .page-breadcrumb { margin-bottom: 18px; }
.hub-eyebrow { margin: 0 0 10px; font: 600 12.5px/1.3 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.hub-intro { max-width: 640px; margin: 14px 0 0; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.hub-dept { margin-top: clamp(32px, 5vw, 52px); }
.hub-dept > h2 { margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font: 700 clamp(18px, 2vw, 22px)/1.2 var(--font-display); text-transform: uppercase; }
.hub-cities { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hub-cities li { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.hub-cities h3 { margin: 0 0 6px; font: 600 16px/1.3 var(--font-ui); color: var(--text); }
.hub-cities p { margin: 0; font: 400 14px/1.7 var(--font-ui); color: var(--text-3); }
.hub-cities a { color: var(--text-2); text-decoration: none; }
.hub-cities a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.hub-note { max-width: 760px; margin: clamp(28px, 4vw, 44px) 0 0; font-size: 14.5px; }

/* ── 5. GABARIT DES PAGES ─────────────────────────────────────
   Héros sobre (grille fine + motif de courbes de gains, signature de la marque), titres
   resserrés, chiffres clés, cartes et tableaux identiques sur toutes les pages. */

/* Titres : moins hauts, mieux répartis sur plusieurs lignes */
.heading-xl { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; line-height: 1.04; }
.heading-lg { font-size: clamp(1.45rem, 3.1vw, 2.5rem); font-weight: 700; line-height: 1.12; letter-spacing: 0; }
.heading-md { font-size: clamp(1.02rem, 1.5vw, 1.3rem); letter-spacing: .02em; }
:is(h1, h2, h3, .heading-xl, .heading-lg, .heading-md) { text-wrap: balance; }
:is(p, li, dd, blockquote) { text-wrap: pretty; }
.section { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }

/* Héros des pages intérieures */
.page-hero {
  min-height: 0;
  padding: clamp(112px, 12vw, 164px) clamp(16px, 5vw, 80px) clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  view-timeline: --mr-hero block;
}
:root .page-hero-bg { background: transparent; transform: none; transition: none; will-change: auto; }
:root .page-hero-bg::before { background: radial-gradient(70% 110% at 88% 0%, var(--tint-2), transparent 62%); }
:root .page-hero-bg::after {
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: right top;
  opacity: .8;
  mix-blend-mode: normal;
  -webkit-mask-image: radial-gradient(80% 100% at 86% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(80% 100% at 86% 0%, #000 0%, transparent 70%);
}
/* Motif : deux courbes (origine en gris pointillé, préparation en accent) et une aire légère */
.page-hero::before, .page-hero::after, :root .page-hero-glow {
  content: '';
  display: block;
  position: absolute;
  z-index: 3;
  inset: auto 0 0 auto;
  width: min(46vw, 640px);
  height: auto;
  aspect-ratio: 640 / 260;
  pointer-events: none;
  -webkit-mask: var(--m) right bottom / 100% 100% no-repeat;
  mask: var(--m) right bottom / 100% 100% no-repeat;
}
.page-hero::before {
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 260' preserveAspectRatio='none' fill='none'%3E%3Cpath d='M2 256C130 254 200 240 280 204C360 168 430 116 520 110C570 107 610 113 638 124' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-dasharray='2 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background: var(--text-3);
}
.page-hero::after {
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 260' preserveAspectRatio='none' fill='none'%3E%3Cpath d='M2 252C120 250 190 228 270 168C350 108 420 40 520 30C570 25 610 33 638 48' stroke='%23000' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background: var(--accent);
}
:root .page-hero-glow {
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 260' preserveAspectRatio='none'%3E%3Cpath d='M2 252C120 250 190 228 270 168C350 108 420 40 520 30C570 25 610 33 638 48V260H2Z'/%3E%3C/svg%3E");
  background: linear-gradient(to top, transparent 4%, var(--accent));
  opacity: .08;
}
@media (max-width: 859px) {
  .page-hero::before, .page-hero::after, :root .page-hero-glow { display: none; }
}
.page-hero-content::before { display: none; }
.page-breadcrumb { margin-bottom: 18px; font-size: 12.5px; letter-spacing: .04em; color: var(--text-3); flex-wrap: wrap; }
.page-title {
  max-width: 15em;
  margin-bottom: 16px;
  font-size: clamp(1.45rem, 6.6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.06;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: manual;
}
.page-subtitle { max-width: 58ch; font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.65; color: var(--text-2); }

/* Chiffres clés (héros des fiches véhicule) */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; max-width: 640px; margin: clamp(20px, 3vw, 28px) 0 0; }
.kpi > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.kpi dt { font: 600 12px/1.3 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.kpi dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin: 8px 0 0; font: 500 14px/1.2 var(--font-ui); color: var(--text-2); }
.kpi b { font: 700 clamp(22px, 2.4vw, 28px)/1 var(--font-display); letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-d {
  margin-left: auto; padding: 4px 7px; border-radius: var(--r-full);
  background: var(--tint); background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok); font: 600 12px/1 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap;
}
@media (max-width: 520px) {
  /* deux tuiles par ligne, le tarif sur toute la largeur ; l'écart passe sous la valeur */
  .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi > div:nth-child(odd):last-child { grid-column: 1 / -1; }
  .kpi dd:has(.kpi-d) { display: grid; grid-template-columns: auto 1fr; }
  .kpi-d { grid-column: 1 / -1; justify-self: start; margin: 4px 0 0; }
}

/* Questions fréquentes : casse normale, plus lisible que les capitales */
.faq-question { font: 600 clamp(15px, 1.4vw, 16.5px)/1.4 var(--font-ui); letter-spacing: 0; text-transform: none; }

/* Guides, études de cas, À propos : colonne de lecture étroite, même typographie partout */
.prose { max-width: 760px; margin: 0 auto; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: clamp(36px, 5vw, 56px); font: 700 clamp(1.25rem, 2.3vw, 1.7rem)/1.2 var(--font-display); text-transform: uppercase; color: var(--text); }
.prose h3 { margin-top: 28px; font: 600 18px/1.35 var(--font-ui); color: var(--text); }
.prose p, .prose li { font: 400 16.5px/1.75 var(--font-ui); color: var(--text-2); }
.prose strong { font-weight: 600; color: var(--text); }
.prose ul, .prose ol { display: grid; gap: 8px; padding-left: 22px; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--text); }
.prose a.btn { text-decoration: none; }
.prose-key { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.prose-key ul { margin: 0; }
.prose-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font: 400 15px/1.5 var(--font-ui); color: var(--text-2); font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { font: 600 12px/1.3 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.prose tbody th { font-weight: 600; color: var(--text); white-space: nowrap; }
.prose blockquote { margin: 20px 0 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--line-strong); font: 500 17px/1.6 var(--font-ui); color: var(--text); }
.prose .prose-note { font-size: 14px; color: var(--text-3); }
.prose h2 + .prose-note { margin-top: 6px; }
.prose-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.prose .kpi { max-width: none; }
.prose .faq-item + .faq-item { margin-top: 10px; }
.prose .dy-card { margin-top: 24px; }
a.why-card { display: block; color: inherit; text-decoration: none; }
.why-more { display: inline-block; margin-top: 12px; font: 600 14px/1 var(--font-ui); color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a.why-card:hover .why-more { text-decoration-color: var(--text); }

/* Pastille « Offert » (frais de déplacement en zone 0) */
.pill-ok {
  display: inline-block; padding: 4px 10px; border-radius: var(--r-full);
  background: var(--tint); background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok); font: 600 12.5px/1 var(--font-ui); white-space: nowrap;
}

/* Fiche véhicule : colonne de droite fixe à l'écran, graphique en pleine largeur */
@media (min-width: 901px) {
  .mp-grid { align-items: start; }
  .mp-grid > div:last-child { position: sticky; top: 96px; }
}
.sum-h { display: flex; align-items: center; gap: 10px; }
.sum-h svg { flex: none; width: 22px; height: 22px; }
.dy-card { margin-top: clamp(28px, 4vw, 44px); padding: clamp(16px, 2.4vw, 24px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.dy-card-h { margin: 0 0 4px; font: 600 clamp(16px, 1.6vw, 18px)/1.3 var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--text); }
.dy-card-sub { margin: 0 0 14px; font: 400 14px/1.5 var(--font-ui); color: var(--text-3); }
.dy-card-note { margin: 10px 0 0; font: 400 12.5px/1.5 var(--font-ui); color: var(--text-3); }
.dy-embed { min-height: 250px; }
@media (min-width: 760px) { .dy-embed { min-height: 330px; } }
.dy-card .dy { --dy-surface: var(--surface); }

/* Tableau des gains */
.gain-table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font: 500 15px/1.3 var(--font-ui); font-variant-numeric: tabular-nums; }
.gain-table th, .gain-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.gain-table thead th { font: 600 12px/1.3 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.gain-table td:first-child { color: var(--text-2); }
.gain-val { font-weight: 600; }
.gain-before { color: var(--text-2); }
.gain-after { color: var(--text); }
.gain-table td.gain-val:last-child { color: var(--ok); }
@media (max-width: 600px) { .gain-table th, .gain-table td { padding: 10px 6px; font-size: 14px; } }

/* Encadré d'économie (pages E85) */
.save-box { margin-bottom: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }

/* Cartes d'engagement */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 28px 0 0; }
.why-card {
  position: relative; overflow: hidden; padding: 22px 20px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  text-align: left; transition: border-color var(--t-fast) var(--ease);
}
.why-card:hover { border-color: var(--line-strong); transform: none; }
.why-icon {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin: 0 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--tint); color: var(--text); font-size: 0;
}
.why-icon svg { width: 20px; height: 20px; }
.why-title { margin: 0 0 6px; font: 600 15.5px/1.3 var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--text); }
.why-desc { font: 400 14px/1.6 var(--font-ui); color: var(--text-3); }

/* Cartes : même bordure, même fond, survol discret */
.card { border-color: var(--line); background: var(--surface); transition: border-color var(--t-fast) var(--ease), transform var(--t) var(--ease); }
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card:hover .icon-wrap { box-shadow: none; }

/* « Trouver ma prestation » : icônes au trait à la place des émojis */
.fmp-type-icon, .fmp-hub-cat-icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 8px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--tint); color: var(--text);
  font-size: 0; line-height: 0;
}
.fmp-hub-cat-icon { margin: 0 0 10px; }
.fmp-type-icon svg, .fmp-hub-cat-icon svg { width: 24px; height: 24px; }
.fmp-svc-icon { display: none; }
.posters-empty-icon { color: var(--text-3); line-height: 0; }
.posters-empty-icon svg { width: 40px; height: 40px; }

/* ── 7. BOUTONS FLOTTANTS : WhatsApp et Expert IA, jumeaux et discrets ──
   Même hauteur, même contour, fond neutre ; seule l'icône WhatsApp garde son vert. */
:root :is(#wa-float, .aix-launch) {
  height: 52px; min-height: 0; gap: 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-full);
  background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-md);
  font: 600 13.5px/1 var(--font-ui); animation: none;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), opacity var(--t) var(--ease), visibility var(--t) var(--ease);
}
:root #wa-float { right: 22px; bottom: 22px; padding: 0 18px 0 14px; }
:root .aix-launch { padding: 0 18px 0 6px; }
:root :is(#wa-float, .aix-launch):hover { transform: translateY(-2px); border-color: var(--text-3); box-shadow: var(--shadow-md); }
#wa-float svg { width: 22px; height: 22px; color: #25d366; }
:root .aix-orb { width: 40px; height: 40px; }
:root .aix-orb-ring { display: none; }
:root .aix-orb-core { inset: 0; background: var(--surface-3); color: var(--text); box-shadow: none; }
:root .aix-orb-core svg { width: 20px; height: 20px; }
:root .aix-orb-dot { right: 0; top: 0; width: 10px; height: 10px; border-color: var(--surface-2); }
:root .aix-launch-tx b { font: 600 13.5px/1.1 var(--font-ui); letter-spacing: 0; text-transform: none; }
.aix-launch-tx small { display: none; }
@media (max-width: 768px) {
  :root .aix-launch { width: 48px; height: 48px; padding: 0; justify-content: center; }
}
/* Snapchat : le fantôme est dessiné au trait (la silhouette pleine devenait une tache grise) ;
   au survol, le logo de la marque : fantôme blanc cerclé de noir sur fond jaune */
.mr-sn--sc svg { overflow: visible; }
.mr-sn--sc:hover svg path, .mr-sn--sc:focus-visible svg path { fill: #fff; stroke: #0b0b0b; }

/* Pages 3D, grand écran : « Passer le récit » se place au-dessus du bouton WhatsApp
   (les deux étaient au même endroit, en bas à droite, et se recouvraient) */
@media (min-width: 1101px) {
  :root .st.st-on .st-skip { right: 22px; bottom: 86px; }
}

/* ── 8. BARRE DE NAVIGATION MOBILE : la même que l'app (js/partials.js, TAB_BAR_HTML) ──
   Barre flottante arrondie ; onglet en cours : pastille teintée, icône rouge soulevée et trait
   rouge sur le bord ; au centre, le bouton « Réserver » rond et en relief avec l'emblème MR. */
#m-tab-bar { display: none; }
@media (max-width: 768px) {
  #m-tab-bar {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 1200;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr);
    height: 68px; border: 1px solid var(--line-strong); border-radius: 26px;
    background: rgba(16, 17, 22, .96); box-shadow: 0 12px 26px -6px rgba(0, 0, 0, .55);
  }
  #m-tab-bar::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 55%; border-radius: 26px 26px 0 0;
    background: linear-gradient(rgba(255, 255, 255, .06), transparent); pointer-events: none;
  }
  #m-tab-bar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 0; min-height: 0; color: var(--text-3); text-decoration: none; -webkit-tap-highlight-color: transparent;
    font: 600 11px/1.15 var(--font-ui);
  }
  #m-tab-bar a > span:last-child { flex: none; max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #m-tab-bar a:active { transform: scale(.94); }
  .mt-i svg { width: 22px; height: 22px; flex: none; transition: transform var(--t) var(--ease), color var(--t) var(--ease); }
  .mt-i.is-on { color: var(--text); }
  .mt-i.is-on svg { color: var(--accent); stroke-width: 2.2; transform: translateY(-3px) scale(1.12); }
  .mt-i.is-on::before {
    content: ''; position: absolute; inset: 7px 5px; z-index: -1; border-radius: 18px;
    border: 1px solid rgba(227, 6, 19, .3); background: rgba(227, 6, 19, .14);
  }
  .mt-i.is-on::after {
    content: ''; position: absolute; top: -1px; left: 50%; width: 22px; height: 3px; margin-left: -11px;
    border-radius: 2px; background: var(--accent); box-shadow: 0 0 6px rgba(227, 6, 19, .9);
  }
  /* bouton central en relief */
  #m-tab-bar .mt-c { justify-content: flex-end; gap: 0; padding-bottom: 10px; color: var(--text-2); }
  #m-tab-bar .mt-c.is-on { color: var(--text); }
  .mt-c-b {
    position: relative; display: grid; place-items: center; flex: none;
    width: 64px; height: 64px; margin-bottom: 7px; border-radius: 50%;
    border: 4px solid #101116; background: linear-gradient(135deg, #ff2a36, #e30613 55%, #a1040e);
    box-shadow: 0 8px 16px -2px rgba(227, 6, 19, .55);
  }
  .mt-c-b img { display: block; width: 40px; height: auto; }
  .mt-c-b::before {
    content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent);
    opacity: 0; pointer-events: none;
  }
  /* corps de page : rien ne reste caché sous la barre */
  body.has-tabbar { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  /* boutons flottants au-dessus de la barre : Expert IA à gauche, WhatsApp à droite */
  body.has-tabbar .aix-launch { bottom: calc(98px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar .aix-teaser { bottom: calc(158px + env(safe-area-inset-bottom, 0px)); }
  html body.has-tabbar #wa-float {
    right: 14px; bottom: calc(98px + env(safe-area-inset-bottom, 0px));
    width: 48px; height: 48px; padding: 0; justify-content: center;
  }
  html body.has-tabbar .wa-float-label { display: none; }
  /* résultat du configurateur : sa barre de prix prend la place de la barre de navigation */
  body.rp-mbar-on #m-tab-bar { display: none !important; }
  html body.rp-mbar-on #wa-float { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  /* prise de rendez-vous : les boutons Retour / Continuer restent au-dessus de la barre */
  body.rv-page.has-tabbar .rv-nav { bottom: calc(134px + env(safe-area-inset-bottom, 0px)); } /* 134 = 112 + sa marge basse négative (-22) */
  body.rv-page.has-tabbar .aix-launch, html body.rv-page.has-tabbar #wa-float { bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
  body.rv-page.has-tabbar .aix-teaser { bottom: calc(260px + env(safe-area-inset-bottom, 0px)); }
  /* récit 3D : le contenu du bas des scènes reste visible au-dessus de la barre */
  body.has-tabbar .st.st-on .st-scene { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  html.menu-open #m-tab-bar { opacity: 0; pointer-events: none; }
}
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  .mt-c-b::before { animation: mt-halo 2.4s cubic-bezier(.25, .46, .45, .94) infinite; }
}
@keyframes mt-halo { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }
html[data-theme="light"] #m-tab-bar { background: rgba(255, 255, 255, .97); box-shadow: 0 12px 26px -8px rgba(20, 24, 40, .22); }
html[data-theme="light"] #m-tab-bar::before { background: linear-gradient(#fff, rgba(255, 255, 255, 0)); }
html[data-theme="light"] .mt-i.is-on::before { background: rgba(227, 6, 19, .09); }
html[data-theme="light"] .mt-c-b { border-color: #fff; }

/* ── 6. MOUVEMENT ──────────────────────────────────────────────
   Tout passe par transform / opacity (aucun recalcul de mise en page), une seule fois,
   et rien ne bouge si le visiteur a demandé moins d'animations. */

/* Reflet discret qui suit le pointeur sur les cartes (souris uniquement, js/main.js) */
:is(.card, .why-card, .save-box, .hub-cities li, .kpi > div)::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: none; opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--tint-2), transparent 72%);
  transition: opacity var(--t) var(--ease);
}
:is(.save-box, .hub-cities li, .kpi > div) { position: relative; overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  :is(.card, .why-card, .save-box, .hub-cities li, .kpi > div):hover::after { opacity: 1; }
}

/* Boutons : léger enfoncement à l'appui */
:root :is(.btn, .st-btn, .rp-btn, .hd-cta, .ft-btn, .gar-btn):active { transform: scale(.98); }

@media (prefers-reduced-motion: no-preference) {
  /* le motif du héros se trace une fois au chargement */
  .page-hero::before { animation: mr-draw .9s var(--ease) .1s both; }
  .page-hero::after { animation: mr-draw 1.1s var(--ease) .25s both; }
  :root .page-hero-glow { animation: mr-fade .5s var(--ease) 1.2s both; }
  /* le texte du héros s'efface doucement quand il quitte l'écran (défilement natif, sans script) */
  @supports (animation-timeline: view()) {
    .page-hero-content { animation: mr-hero-out linear both; animation-timeline: --mr-hero; animation-range: exit 0% exit 100%; }
  }
}
@keyframes mr-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mr-fade { from { opacity: 0; } }
@keyframes mr-hero-out { 0%, 40% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-16px); } }