/* =========================================================================
   Canadian Tire — concept de refonte mobile
   Système de design partagé (jetons, base, composants, coquille).
   Mobile d’abord ; ≥ 900 px = mise en page bureau.
   ========================================================================= */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations'), url('../fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
/* Repli métrique pour limiter le décalage de mise en page pendant le chargement de la police */
@font-face {
  font-family: 'Archivo Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Roboto');
  size-adjust: 104%;
  ascent-override: 88%;
  descent-override: 22%;
}

:root {
  /* Couleurs */
  --red: #e3191f;
  --red-600: #c8121a;
  --red-700: #a30e15;
  --red-50: #fdeceb;
  --ink: #141518;
  --ink-2: #26282d;
  --ink-3: #3a3d44;
  --muted: #62656d;
  --muted-2: #8b8e96;
  --line: #e6e3de;
  --line-2: #d6d2cb;
  --bg: #f4f2ee;
  --card: #ffffff;
  --well: #efece6;
  --night: #0a0f1d;
  --green: #0b7a3b;
  --green-50: #e7f4ec;
  --amber: #a35400;
  --amber-50: #fdf1e2;
  --gold: #f2b544;
  --focus: #1a6dff;

  /* Typo */
  --font: 'Archivo', 'Archivo Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.6rem, 1.2rem + 2vw, 2.25rem);
  --fs-3xl: clamp(2.3rem, 1.4rem + 4.6vw, 4.25rem);

  /* Espace, rayons, ombres */
  --gutter: 16px;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-1: 0 1px 2px rgb(20 21 24 / 0.06), 0 2px 10px rgb(20 21 24 / 0.05);
  --shadow-2: 0 2px 6px rgb(20 21 24 / 0.08), 0 14px 34px rgb(20 21 24 / 0.12);
  --shadow-3: 0 -8px 40px rgb(10 15 29 / 0.22);

  /* Mouvement */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-1: 140ms;
  --dur-2: 260ms;
  --dur-3: 480ms;

  /* Coquille */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 56px;
  --tabbar-h: 64px;
  --content-max: 1240px;

  color-scheme: light;
  accent-color: var(--red);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 12px);
  -webkit-tap-highlight-color: transparent;
}
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  overflow-x: clip;
}
img, video, svg, picture { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection { background: var(--red); color: #fff; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none; transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: calc(12px + var(--safe-top)); }

.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 18px; height: 18px; }
.icon--xs { width: 14px; height: 14px; }
.icon--lg { width: 28px; height: 28px; }

/* ---------- Typo ---------- */
.display {
  font-weight: 850;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 0.95;
  text-wrap: balance;
}
.h1 { font-size: var(--fs-3xl); }
.h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
.h3 { font-size: var(--fs-lg); font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 750; font-stretch: 110%;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.muted { color: var(--muted); }
.lead { font-size: var(--fs-lg); line-height: 1.45; color: var(--ink-3); text-wrap: pretty; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Mise en page ---------- */
.container { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 28px; }
.section--tight { padding-block: 16px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.section-head .h2 { max-width: 22ch; }
.link-more {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  min-height: 44px; padding-inline: 4px;
  font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--red-600);
}
.link-more:hover { text-decoration: underline; }
.stack > * + * { margin-top: var(--stack, 12px); }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 750; font-size: var(--fs-md); font-stretch: 104%; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; user-select: none;
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-2), box-shadow var(--dur-2), opacity var(--dur-2);
}
.btn:active { transform: scale(0.97); }
.btn--primary { --btn-bg: var(--red); --btn-fg: #fff; box-shadow: 0 6px 18px rgb(227 25 31 / 0.32); }
.btn--primary:hover { --btn-bg: var(--red-600); }
.btn--dark:hover { --btn-bg: var(--ink-2); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn--glass {
  --btn-bg: rgb(255 255 255 / 0.14); --btn-fg: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28);
}
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: var(--fs-lg); padding-inline: 26px; }
.btn--sm { min-height: 44px; padding-inline: 14px; font-size: var(--fs-sm); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  color: inherit; position: relative; transition: background-color var(--dur-2), transform var(--dur-1);
}
.icon-btn:hover { background: rgb(20 21 24 / 0.06); }
.icon-btn:active { transform: scale(0.92); }

/* ---------- Puces / filtres ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: var(--fs-sm); font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-2), box-shadow var(--dur-2), color var(--dur-2), transform var(--dur-1);
}
.chip:active { transform: scale(0.96); }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.chip[aria-pressed='true'], .chip[aria-selected='true'], .chip.is-active {
  background: var(--ink); color: #fff; box-shadow: none;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 8px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 800; font-stretch: 108%; letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--ink); color: #fff; white-space: nowrap;
}
.badge--red { background: var(--red); }
.badge--soft { background: var(--well); color: var(--ink-2); }
.badge--green { background: var(--green-50); color: var(--green); }

/* ---------- Défilement horizontal (rails) ---------- */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--rail-col, 68%);
  gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 14px; margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail--chips { --rail-col: max-content; gap: 8px; padding-bottom: 6px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-top);
  background: rgb(20 21 24 / 0.92);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  color: #fff;
  transition: transform var(--dur-3) var(--ease-out), background-color var(--dur-2);
  will-change: transform;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__bar {
  display: flex; align-items: center; gap: 10px;
  height: var(--header-h); max-width: var(--content-max); margin-inline: auto; padding-inline: 12px 6px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; color: #fff; text-decoration: none;
}
.brand__mark { width: 30px; height: 30px; }
.brand__word {
  font-weight: 900; font-stretch: 125%; font-size: 0.82rem; letter-spacing: 0.02em; line-height: 0.95;
  text-transform: uppercase;
}
.search-pill {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px; border-radius: 999px;
  background: rgb(255 255 255 / 0.12); color: rgb(255 255 255 / 0.78);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  font-size: var(--fs-md); text-align: left;
  transition: background-color var(--dur-2);
}
.search-pill:hover { background: rgb(255 255 255 / 0.18); }
.search-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Libellé selon la place réelle de la pastille : « Rechercher » sur téléphone, libellé complet dès qu’il tient.
   L’élément masqué est en display:none, donc le nom accessible reste le texte visible. */
.search-pill { container-type: inline-size; }
.search-pill__long { display: none; }
@container (min-width: 280px) {
  .search-pill__short { display: none; }
  .search-pill__long { display: inline; }
}
/* Très petits écrans (320 px) : le triangle seul, pour laisser « Rechercher » entier */
@media (max-width: 359.98px) {
  .site-header__bar { gap: 8px; }
  .brand { min-width: 44px; justify-content: center; }
  .brand__word { display: none; }
}
.cart-btn { color: #fff; }
.count-badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; box-shadow: 0 0 0 2px var(--ink);
  font-size: 0.7rem; font-weight: 800; line-height: 19px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.count-badge:empty, .count-badge[data-count='0'] { display: none; }
.count-badge.bump { animation: bump 520ms var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }

.desk-nav { display: none; }

/* Barre magasin (non collante, discrète). Le nom du magasin n’est jamais tronqué par l’état :
   si les deux ne tiennent pas sur une ligne, l’état passe dessous, aligné sur le nom. */
.storebar {
  display: flex; flex-wrap: wrap; align-items: center;
  max-width: var(--content-max); margin-inline: auto;
  padding: 8px var(--gutter);
  font-size: var(--fs-sm);
}
/* Espaceur : pousse l’état à droite quand il tient sur la même ligne que le nom */
.storebar::after { content: ''; order: 1; flex: 1 1 0; }
.storebar__btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  flex: 0 1 auto; min-width: 0; max-width: 100%; margin-right: 8px;
  font-weight: 700; text-align: left;
}
.storebar__btn .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--line-2); }
.status-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 3px var(--green-50); flex: none; }
.status-dot.is-closed { background: var(--muted-2); box-shadow: 0 0 0 3px var(--well); }
/* Pastille centrée sous l’icône du magasin, texte aligné sur le nom quand l’état passe à la ligne ;
   marges négatives : la seconde ligne reste serrée sous le bouton de 44 px, sans décaler la ligne unique. */
.storebar__status {
  order: 2; flex: none; display: inline-flex; align-items: center; max-width: 100%;
  margin-block: -4px; padding-left: 5px;
  color: var(--muted); white-space: nowrap;
}
.storebar__status [data-store-status] { min-width: 0; padding-left: 5px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Barre d’onglets (zone du pouce) ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: rgb(255 255 255 / 0.94);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 -1px 0 var(--line), 0 -10px 30px rgb(20 21 24 / 0.06);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 44px; color: var(--muted); text-decoration: none;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.01em;
  transition: color var(--dur-2);
}
.tab .icon { width: 24px; height: 24px; transition: transform var(--dur-2) var(--spring); }
.tab:active .icon { transform: scale(0.88); }
.tab[aria-current='page'] { color: var(--ink); }
.tab[aria-current='page']::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; margin-left: -14px;
  border-radius: 0 0 4px 4px; background: var(--red);
}
.tab .count-badge { top: 5px; right: calc(50% - 22px); box-shadow: 0 0 0 2px #fff; }

/* ---------- Héros ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(calc(100svh - var(--header-h) - var(--tabbar-h) - 52px), 720px);
  display: flex; align-items: flex-end;
  background: var(--night); color: #fff;
}
.hero__media, .hero__media > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media { z-index: -2; }
/* L’image remplit le cadre comme la vidéo (même cadrage : pas de saut quand la vidéo prend le relais) */
.hero__media img, .hero__media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__media video { opacity: 0; transition: opacity 900ms var(--ease-out); }
.hero__media video.is-playing { opacity: 1; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(10 15 29 / 0.55) 0%, rgb(10 15 29 / 0) 28%),
    linear-gradient(0deg, rgb(10 15 29 / 0.92) 4%, rgb(10 15 29 / 0.55) 38%, rgb(10 15 29 / 0) 64%);
}
.hero__content { width: 100%; max-width: var(--content-max); margin-inline: auto; padding: 28px var(--gutter) 22px; }
.hero__title { font-size: var(--fs-3xl); margin-top: 12px; }
.hero__title em { font-style: normal; color: #fff; -webkit-text-stroke: 0; background: linear-gradient(90deg, #ff4b4f, #ff8a5c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin-top: 12px; max-width: 36ch; color: rgb(255 255 255 / 0.86); font-size: var(--fs-lg); line-height: 1.4; }
.hero__ctas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 20px; }
/* Téléphone (boutons pleine largeur) : un libellé personnalisé trop long (« Pneus pour Volkswagen Tiguan »)
   passe sur deux lignes équilibrées plutôt que de sortir de l’écran */
@media (max-width: 599.98px) { .hero__ctas .btn { white-space: normal; text-align: center; text-wrap: balance; line-height: 1.2; padding-block: 8px; } }
@media (max-width: 374.98px) { .hero__ctas .btn--lg { padding-inline: 18px; } }
/* Téléphones étroits : la pastille « Solde » ne passe pas sous le bouton pause (en haut à droite du héros) */
@media (max-width: 389.98px) { .hero:has(.motion-toggle) .hero__pill { margin-right: 48px; } }
.hero__pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: rgb(255 255 255 / 0.12); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: var(--fs-sm); font-weight: 650;
}
.hero__pill .badge { height: 22px; }
.motion-toggle {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: rgb(10 15 29 / 0.35); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
}

/* Compte à rebours */
.countdown { display: flex; gap: 6px; margin-top: 16px; }
.countdown__cell {
  min-width: 58px; padding: 8px 6px 6px; border-radius: 12px; text-align: center;
  background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.countdown__num { display: block; font-size: 1.45rem; font-weight: 800; font-stretch: 110%; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__lbl { display: block; margin-top: 3px; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(255 255 255 / 0.7); }

/* ---------- Tuiles de rayons ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat-tile {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  aspect-ratio: 1 / 1; border-radius: var(--radius); background: #1b1b1d; color: #fff; text-decoration: none;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2);
}
.cat-tile:active { transform: scale(0.97); }
.cat-tile picture, .cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 900ms var(--ease-out); }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0) 52%); }
.cat-tile__label { position: absolute; left: 12px; right: 12px; bottom: 10px; }
.cat-tile__name { display: block; font-weight: 800; font-stretch: 112%; font-size: 1.1rem; letter-spacing: -0.01em; }
.cat-tile__blurb { display: block; font-size: 0.75rem; color: rgb(255 255 255 / 0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Fiches produit (cartes) ---------- */
.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur-2), transform var(--dur-2) var(--ease-out);
}
.pcard:hover { box-shadow: var(--shadow-2); }
.pcard__media {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 40%, #fbfaf8 0%, var(--well) 100%);
}
.pcard__media img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 14px 18px rgb(20 21 24 / 0.16)); transition: transform var(--dur-3) var(--ease-out); }
.pcard:hover .pcard__media img { transform: translateY(-3px) scale(1.02); }
.pcard__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.pcard__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 14px; flex: 1; }
.pcard__title { font-size: 0.92rem; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard__title a { text-decoration: none; }
.pcard__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pcard__meta { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.pcard__stock { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--green); font-weight: 650; }
.pcard__stock.is-low { color: var(--amber); }
.pcard__foot { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.pcard__add {
  position: relative; z-index: 2; flex: none;
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: var(--ink); color: #fff;
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-2);
}
.pcard__add:hover { background: var(--red); }
.pcard__add:active { transform: scale(0.9); }
.pcard__add.is-done { background: var(--green); }
/* Carte étroite (grille 2 colonnes sur téléphones de 320 à 375 px) : le prix prend toute la ligne et le
   bouton + descend à droite, à côté du prix régulier ; la note reste lisible. Rien ne déborde de la carte.
   (Conteneur nommé « pcard » : la page Magasiner nomme ses cartes autrement et garde ses propres règles.) */
.pcard { container: pcard / inline-size; }
@container pcard (max-width: 169px) {
  .pcard__body { padding-inline: 10px; }
  .pcard__meta { flex-wrap: wrap; gap: 2px 5px; font-size: 0.74rem; }
  .pcard__meta .stars { width: 60px; height: 11px; }
  .pcard__meta > span:last-child { white-space: nowrap; }
  .pcard__stock { align-items: flex-start; }
  .pcard__stock .icon { margin-top: 0.15em; }
  .pcard__foot { display: grid; grid-template-columns: minmax(0, 1fr) 44px; grid-template-rows: auto auto auto 1fr; column-gap: 6px; row-gap: 0; align-items: start; }
  .pcard__foot > .price { display: contents; }
  .pcard__foot .price__now { grid-column: 1 / -1; }
  .pcard__foot .price__was, .pcard__foot .price__unit { grid-column: 1; }
  .pcard__add { grid-column: 2; grid-row: 2 / -1; align-self: center; }
  .pcard .ctmoney { align-items: flex-start; font-size: 0.7rem; line-height: 1.3; }
  .pcard .ctmoney__tri { margin-top: 0.2em; }
}
/* Bouton [data-add] avec libellé : « ✓ Ajouté » en vert, largeur conservée (voir flashAdded) */
.btn[data-add].is-done { --btn-bg: var(--green); --btn-fg: #fff; box-shadow: 0 6px 18px rgb(11 122 59 / 0.3); }

/* Prix */
.price { display: flex; flex-direction: column; line-height: 1.05; }
.price__now { font-size: 1.3rem; font-weight: 850; font-stretch: 106%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price__now.is-sale { color: var(--red-600); }
.price__was { font-size: 0.78rem; color: var(--muted); text-decoration: line-through; margin-top: 2px; }
.price__unit { font-size: 0.72rem; color: var(--muted); font-weight: 600; margin-top: 3px; }
.ctmoney {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; font-weight: 700; color: var(--red-700);
}
.ctmoney__tri { width: 12px; height: 12px; }

/* Étoiles */
.stars {
  --pct: 90%;
  position: relative; display: inline-block; width: 70px; height: 13px; flex: none;
  background: linear-gradient(90deg, var(--ink) var(--pct), var(--line-2) var(--pct));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 13'%3E%3Cg fill='%23000'%3E%3Cpath id='s' d='M6.5 0l1.9 4.1 4.5.5-3.4 3 1 4.4-4-2.3-4 2.3 1-4.4L.1 4.6l4.5-.5z'/%3E%3Cuse href='%23s' x='14.3'/%3E%3Cuse href='%23s' x='28.6'/%3E%3Cuse href='%23s' x='42.9'/%3E%3Cuse href='%23s' x='57.2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 13'%3E%3Cg fill='%23000'%3E%3Cpath id='s' d='M6.5 0l1.9 4.1 4.5.5-3.4 3 1 4.4-4-2.3-4 2.3 1-4.4L.1 4.6l4.5-.5z'/%3E%3Cuse href='%23s' x='14.3'/%3E%3Cuse href='%23s' x='28.6'/%3E%3Cuse href='%23s' x='42.9'/%3E%3Cuse href='%23s' x='57.2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- Bandeaux et cartes éditoriales ---------- */
.quick { --rail-col: max-content; }
.quick a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px 0 10px;
  border-radius: 999px; background: var(--card); box-shadow: var(--shadow-1);
  font-weight: 700; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap;
}
.quick a .q-ico { width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; background: var(--red-50); color: var(--red-600); }

.feature {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg); background: #121214; color: #fff;
}
.feature__video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #121214; }
.feature__body { padding: 18px 18px 22px; }
.feature__list { display: grid; gap: 8px; margin: 14px 0 18px; }
.feature__list li { display: flex; gap: 10px; align-items: flex-start; color: rgb(255 255 255 / 0.86); font-size: var(--fs-sm); }
.feature__list .icon { color: #ff5a5e; width: 20px; height: 20px; margin-top: 1px; }

.service-card {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg);
  background: var(--night); color: #fff; min-height: 440px; display: flex; align-items: flex-end;
}
.service-card picture, .service-card > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.service-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(10 15 29 / 0.94) 10%, rgb(10 15 29 / 0.3) 60%, rgb(10 15 29 / 0.1)); }
.service-card__body { padding: 20px 18px; width: 100%; }
.slots { display: flex; gap: 8px; margin: 14px 0 16px; overflow-x: auto; scrollbar-width: none; }
.slots::-webkit-scrollbar { display: none; }
.slot {
  flex: none; min-height: 44px; padding: 0 14px; border-radius: 12px; display: grid; place-items: center;
  background: rgb(255 255 255 / 0.12); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
  font-weight: 700; font-size: var(--fs-sm); color: #fff; text-decoration: none; font-variant-numeric: tabular-nums;
}
.slot small { display: block; font-size: 0.66rem; font-weight: 600; color: rgb(255 255 255 / 0.7); }
.slot:hover { background: rgb(255 255 255 / 0.2); }

.triangle-card {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg); padding: 22px 18px;
  color: #fff; background: radial-gradient(120% 120% at 100% 0%, #ff3b40 0%, var(--red) 34%, var(--red-700) 100%);
}
.triangle-card::before {
  content: ''; position: absolute; right: -40px; top: -30px; width: 220px; height: 200px; z-index: -1; opacity: 0.18;
  background: #fff; clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: rotate(-8deg);
}
.triangle-card .h2 { max-width: 16ch; }
.ct-bal {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 16px 0; padding: 14px; border-radius: 16px;
  background: rgb(0 0 0 / 0.18); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
}
.ct-bal__num { font-size: 1.8rem; font-weight: 850; font-stretch: 110%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }

.holiday {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg); color: #fff;
  min-height: 560px; display: flex; align-items: flex-end; background: #0b1530;
}
.holiday__media, .holiday__media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.holiday__media video { opacity: 0; transition: opacity 900ms var(--ease-out); }
.holiday__media video.is-playing { opacity: 1; }
.holiday::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(8 12 30 / 0.95) 12%, rgb(8 12 30 / 0.2) 56%, rgb(8 12 30 / 0.35)); }
.holiday__body { padding: 20px 18px; width: 100%; }
.mini-rail { --rail-col: 64%; margin-top: 14px; }
.mini {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; text-decoration: none;
  background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.mini img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: rgb(255 255 255 / 0.92); padding: 4px; flex: none; }
.mini__name { font-size: 0.82rem; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini__price { font-weight: 800; margin-top: 2px; }

.promise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.promise li { padding: 14px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-1); }
.promise .icon { color: var(--red); margin-bottom: 8px; }
.promise strong { display: block; font-size: 0.92rem; line-height: 1.25; }
.promise span { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 28px; background: var(--ink); color: rgb(255 255 255 / 0.8); padding: 28px 0 24px; font-size: var(--fs-sm); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer details { border-bottom: 1px solid rgb(255 255 255 / 0.1); }
.site-footer summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  font-weight: 750; color: #fff; list-style: none; cursor: pointer;
}
.site-footer summary::-webkit-details-marker { display: none; }
.site-footer summary .icon { transition: transform var(--dur-2) var(--ease-out); }
.site-footer details[open] summary .icon { transform: rotate(180deg); }
.site-footer details ul { padding-bottom: 12px; display: grid; gap: 2px; }
.site-footer details li a { display: flex; align-items: center; min-height: 44px; color: rgb(255 255 255 / 0.78); }
.footer-legal { margin-top: 20px; font-size: 0.75rem; color: rgb(255 255 255 / 0.55); line-height: 1.6; }
.footer-legal strong { color: rgb(255 255 255 / 0.85); }
/* Numéro fictif : texte non cliquable. Les chiffres viennent du CSS (data-num) : iOS ne les transforme pas
   en lien d’appel, même sur une page sans <meta name="format-detection">. */
.footer-tel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-height: 44px; padding-block: 12px 4px; color: rgb(255 255 255 / 0.78); }
.footer-tel__num::before { content: attr(data-num); }
.footer-tel small { font-size: 0.72rem; color: rgb(255 255 255 / 0.5); }
/* Remise à zéro de la démo (efface véhicule, panier, code promo, rendez-vous) : discrète, en fin de page */
.site-footer .footer-reset {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px;
  font-size: 0.75rem; color: rgb(255 255 255 / 0.5); text-decoration: underline; text-decoration-color: rgb(255 255 255 / 0.25); text-underline-offset: 3px;
}
.site-footer .footer-reset:hover { color: rgb(255 255 255 / 0.8); }
.concept-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.08); color: #fff; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- Feuilles (bottom sheets via <dialog>) ---------- */
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; padding: 0; border: 0;
  width: 100%; max-width: 640px; max-height: min(92dvh, 860px);
  border-radius: 24px 24px 0 0; background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-3); overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(0); opacity: 1;
  transition: transform 420ms var(--ease-out), opacity 200ms;
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet.is-closing { transform: translateY(105%); }
@starting-style { dialog.sheet[open] { transform: translateY(100%); } }
dialog.sheet::backdrop { background: rgb(10 15 29 / 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); transition: opacity 300ms; opacity: 1; }
dialog.sheet.is-closing::backdrop { opacity: 0; }
@starting-style { dialog.sheet[open]::backdrop { opacity: 0; } }
dialog.sheet--full { max-height: 100dvh; height: 100dvh; border-radius: 0; max-width: none; }
.sheet__grab { flex: none; display: grid; place-items: center; height: 22px; touch-action: none; cursor: grab; }
.sheet__grab::before { content: ''; width: 40px; height: 5px; border-radius: 99px; background: var(--line-2); }
.sheet__head { flex: none; display: flex; align-items: center; gap: 8px; padding: 2px 8px 10px 18px; }
.sheet__title { flex: 1; font-size: 1.2rem; font-weight: 800; font-stretch: 108%; letter-spacing: -0.01em; }
.sheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 18px; -webkit-overflow-scrolling: touch; }
.sheet__foot { flex: none; padding: 12px 18px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--card); }

/* Recherche : le champ occupe toute la barre (icône comprise), donc toucher n’importe où dans la barre y place le curseur */
.search-field {
  position: relative; display: flex; align-items: center; flex: 1; min-width: 0;
  height: 48px; border-radius: 14px; background: var(--well);
  transition: box-shadow var(--dur-2);
}
.search-field > .icon { position: absolute; left: 14px; top: 50%; margin-top: -9px; color: var(--muted); pointer-events: none; }
.search-field input {
  flex: 1; align-self: stretch; min-width: 0; height: 100%; margin: 0; padding: 0 12px 0 42px;
  border: 0; border-radius: inherit; outline: 0; background: transparent;
  -webkit-appearance: none; appearance: none;
  font-size: 16px; /* ≥ 16 px : pas de zoom automatique sur iOS */
}
.search-field:focus-within { box-shadow: inset 0 0 0 2px var(--ink-3); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-section { margin-top: 18px; }
.search-section h3 { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.search-results li a, .search-results li button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 0;
  text-decoration: none; text-align: left; border-bottom: 1px solid var(--line);
}
.search-results li a > .icon:last-child { margin-left: auto; } /* chevrons et flèches alignés à droite */
.search-results li a > span { line-height: 1.25; } /* nom sur deux lignes : interligne serré (sinon celui du parent, 1,5) */
.search-results img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--well); flex: none; }
.search-results .sr-name { font-weight: 600; font-size: 0.92rem; line-height: 1.25; }
.search-results .sr-name mark { background: none; color: var(--red-600); font-weight: 800; }
.search-results .sr-sub { font-size: 0.78rem; color: var(--muted); }
.search-results .sr-price { margin-left: auto; font-weight: 800; white-space: nowrap; }

/* Panier (lignes) */
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line__img { width: 72px; height: 72px; border-radius: 14px; background: var(--well); display: grid; place-items: center; }
.cart-line__img img { width: 86%; height: 86%; object-fit: contain; }
.cart-line__name { font-weight: 650; font-size: 0.9rem; line-height: 1.3; }
.cart-line__opt { font-size: 0.78rem; color: var(--muted); }
.cart-line__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.cart-line__img--svc { background: var(--ink); color: #fff; }
/* Service du Centre auto (1 par véhicule) : un simple bouton « Retirer » à la place du sélecteur de quantité */
.cart-line__rm {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: var(--fs-sm); font-weight: 700; color: var(--red-600);
}
.cart-line__rm:hover { background: var(--well); }
.stepper { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; }
.stepper button:active { background: var(--well); }
.stepper output { min-width: 28px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 99px; background: var(--well); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--red), #ff6a3d); transition: width 600ms var(--ease-out); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: var(--fs-sm); }
.summary-row--total { font-size: 1.1rem; font-weight: 850; padding-top: 10px; }
.empty { text-align: center; padding: 32px 12px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--line-2); }

/* Sélecteur de véhicule */
.vsteps { display: flex; gap: 6px; margin-bottom: 14px; }
.vstep {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--well); text-align: left;
  font-size: 0.72rem; color: var(--muted); font-weight: 700; min-height: 52px;
}
.vstep b { display: block; color: var(--ink); font-size: 0.92rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vstep[aria-current='step'] { background: var(--ink); color: rgb(255 255 255 / 0.7); }
.vstep[aria-current='step'] b { color: #fff; }
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vgrid--2 { grid-template-columns: repeat(2, 1fr); }
.vopt {
  min-height: 52px; padding: 8px; border-radius: 14px; background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; text-align: center;
  transition: box-shadow var(--dur-2), background-color var(--dur-2), transform var(--dur-1);
}
.vopt:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.vopt:active { transform: scale(0.96); }
.vopt[aria-pressed='true'] { background: var(--ink); color: #fff; box-shadow: none; }
.vresult { text-align: center; padding: 8px 0 4px; }
.vresult__size { display: inline-block; margin: 10px 0 6px; padding: 8px 14px; border-radius: 12px; background: var(--well); font-weight: 850; font-size: 1.5rem; font-stretch: 110%; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.vresult__note { font-size: 0.9rem; text-wrap: balance; }
/* minmax(0, 1fr) : la colonne ne s’élargit jamais à la largeur d’un libellé (sinon les boutons sortent de la feuille à 320 px) */
.vresult__ctas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; }
.vresult__ctas .btn { min-width: 0; }
/* Feuilles : un bouton pleine largeur dont le libellé ne tient pas passe sur deux lignes au lieu de sortir de la feuille */
dialog.sheet .btn--block { white-space: normal; text-align: center; text-wrap: balance; line-height: 1.2; padding-block: 8px; }
/* iPhone SE (320 px) : « Passer à la caisse · 1 687,94 $ », « Voir les pneus compatibles »… tiennent sur une ligne */
@media (max-width: 359.98px) {
  dialog.sheet .btn--block { padding-inline: 12px; }
  dialog.sheet .btn--lg.btn--block { font-size: var(--fs-md); }
}
.garage-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px;
  background: var(--card); box-shadow: var(--shadow-1); text-decoration: none;
}
.garage-chip .g-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; flex: none; }

/* Liste de magasins */
.store-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; text-align: left;
  border-bottom: 1px solid var(--line); min-height: 64px;
}
.store-opt[aria-pressed='true'] .store-opt__check { opacity: 1; }
.store-opt__check { margin-left: auto; color: var(--red); opacity: 0; }
.store-opt__name { font-weight: 750; }
.store-opt__meta { font-size: 0.8rem; color: var(--muted); }

/* ---------- Toast ---------- */
/* La région est un popover « manual » (couche supérieure, au-dessus des feuilles <dialog>) :
   on neutralise les styles par défaut du navigateur pour les popovers (inset: 0, marge auto, bordure, fond). */
.toast-region {
  position: fixed; inset: auto 0 calc(var(--tabbar-h) + var(--safe-bottom) + 10px) 0; z-index: 80;
  display: grid; justify-items: center; pointer-events: none;
  width: auto; height: auto; max-width: none; max-height: none; margin: 0; border: 0; padding: 0 12px;
  overflow: visible; background: none; color: inherit;
}
.toast {
  pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  width: min(100%, 460px); min-width: 0; padding: 10px 10px 10px 12px; border-radius: 16px;
  background: var(--ink); color: #fff;
  /* liseré clair de 1 px : le toast ne se fond pas dans le pied de page sombre */
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16), var(--shadow-2);
  animation: toast-in 420ms var(--spring);
}
/* Région déplacée (feuille ouverte ou fermée) pendant qu’un toast est affiché : pas de seconde entrée */
.toast-region.is-moved .toast:not(.is-leaving) { animation: none; }
.toast img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 10px; flex: none; }
/* Texte : au moins 120 px de large ; sinon les boutons passent ensemble à la ligne, alignés à droite */
.toast__txt { flex: 1 1 120px; min-width: 0; font-size: var(--fs-sm); line-height: 1.3; overflow-wrap: anywhere; }
.toast__txt b { display: block; }
.toast__acts { display: flex; gap: 8px; margin-left: auto; }
.toast .btn { min-height: 44px; }
.toast .btn--ghost { --btn-fg: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.3); }
.toast .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.7); }
.toast.is-leaving { animation: toast-out 260ms var(--ease-in-out) forwards; }
@keyframes toast-in { from { transform: translateY(24px) scale(0.96); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(16px); opacity: 0; } }

/* Vol vers le panier */
.fly { position: fixed; z-index: 90; pointer-events: none; width: 64px; height: 64px; object-fit: contain; border-radius: 14px; background: #fff; box-shadow: var(--shadow-2); }

/* ---------- Apparition au défilement ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.js-off .reveal { opacity: 1; transform: none; }

.rise > * { animation: rise 820ms var(--ease-out) both; }
.rise > *:nth-child(2) { animation-delay: 90ms; }
.rise > *:nth-child(3) { animation-delay: 180ms; }
.rise > *:nth-child(4) { animation-delay: 270ms; }
.rise > *:nth-child(5) { animation-delay: 360ms; }
.rise > *:nth-child(6) { animation-delay: 450ms; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); filter: blur(4px); } }

/* Squelettes */
.skeleton { background: linear-gradient(90deg, var(--well) 25%, #f8f6f2 50%, var(--well) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Transitions de page (navigateurs compatibles) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 280ms; }
.site-header { view-transition-name: site-header; }
.tabbar { view-transition-name: tabbar; }

/* ---------- Bureau ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { --rail-col: 40%; }
  .mini-rail { --rail-col: 40%; }
  /* Deux boutons côte à côte ; un libellé de véhicule long (« Pneus pour Ford Mustang Mach-E ») renvoie le second à la ligne */
  .hero__ctas { display: flex; flex-wrap: wrap; justify-content: flex-start; }
  .promise { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  :root { --header-h: 64px; --tabbar-h: 0px; }
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__word { font-size: 0.95rem; }
  .desk-nav { display: flex; gap: 2px; }
  .desk-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: rgb(255 255 255 / 0.85); text-decoration: none; font-weight: 650; font-size: var(--fs-sm); }
  .desk-nav a:hover, .desk-nav a[aria-current='page'] { background: rgb(255 255 255 / 0.1); color: #fff; }
  .search-pill { max-width: 460px; }
  .rail { --rail-col: calc((100% - 36px) / 4.3); }
  .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .section { padding-block: 44px; }
  .hero { min-height: 640px; }
  .hero__media img, .hero__media video { object-position: 50% 70%; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
  .feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .feature__video { height: 100%; }
  .feature__body { padding: 36px; }
  .toast-region { bottom: 24px; }
  dialog.sheet { inset: 0; margin: auto; border-radius: 24px; max-height: min(86dvh, 820px); }
  dialog.sheet.is-closing { transform: translateY(24px); opacity: 0; }
  @starting-style { dialog.sheet[open] { transform: translateY(24px); opacity: 0; } }
  dialog.sheet--full { height: auto; max-width: 720px; border-radius: 24px; }
}
@media (hover: none) {
  .pcard:hover { box-shadow: var(--shadow-1); }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__media video, .holiday__media video { display: none; }
}

/* Badge d’hébergement imposé (offre gratuite) : la barre d’onglets réserve une bande sous les onglets
   pour le badge ; barres collantes, toasts et marges suivent via --tabbar-h. Rien n’est masqué. */
html.has-host-badge { --tabbar-h: 122px; }
html.has-host-badge .tabbar { grid-template-rows: 64px; align-content: start; }
@media (min-width: 900px) { html.has-host-badge { --tabbar-h: 0px; } }
