/* fx-fiche.css — passe « forward design » du 24/11. Périmètre : la fiche d'un vin.
   Feuille de l'expert « fiche » : chargée après toutes les feuilles de base (style.css, type.css…), qui restent gelées ;
   tout ce qui change dans ce périmètre s'écrit ici.

   La fiche se lit en trois secondes : le nom, le prix HT, « Ajouter » — tout le reste en retrait.
   1. jetons · 2. galerie · 3. zoom · 4. panneau d'achat · 5. en retrait : présentation, onglets, « À lire »
   6. île d'achat (verre) · 7. sous la fiche : « Dans le verre », « Le domaine », « À goûter aussi », le rail
   8. entrées liées au défilement
   Boutons, pilules et arrondis : la recette du chantier système (--sys-*), avec une valeur de repli si sa feuille manque.
   Mouvement : seuls transform, opacity, clip-path et filter bougent ; jetons --mm-* (transitions.css).
   Mouvement réduit, ou navigateur sans animation-timeline : les états finaux, immobiles. */

/* ── 1. Jetons de la fiche ─────────────────────────────────────────────── */
/* l'île d'achat (56 px) et sa marge du bas (12 px) : l'avis d'ajout se pose au-dessus (style.css) */
body[data-view="product"] { --mp-sticky-h: 68px; }
/* le pied de page garde la même marge tout autour, comme partout (24/11 : pas de bande sous la carte) ; l'île d'achat
   s'efface quand il arrive (product.js) */
body[data-view="product"] .site-footer { padding-bottom: var(--mmf-marge, clamp(8px, 1.1vw, 16px)); }
#product-view {
  --mp-plein: var(--sys-encre, var(--ink));                 /* bouton principal, pilule choisie : l'encre */
  --mp-sauge: #676f61;                                      /* « ajouté » : la sauge de la palette (blanc dessus : 5,2:1) */
  --mp-contour: currentColor;                               /* contour des pilules : 1 px de l'encre (la recette du système) */
  --mp-r: var(--sys-arrondi, clamp(12px, 1.2vw, 18px));     /* photos et cartes */
  --mp-r-s: clamp(8px, .8vw, 12px);                         /* miniatures */
  --mp-ctl: var(--sys-h-bouton, 40px);                      /* boutons : 40 px à la souris, 44 au doigt */
  --mp-chip: var(--sys-h-puce, 32px);                       /* pilules de choix (cible de 44 px au doigt) */
  --mp-fs-btn: var(--sys-fs-bouton, .875rem);               /* 14 px, casse normale */
  --mp-fs-chip: var(--sys-fs-puce, var(--fs-n1));           /* 12 → 12,5 px */
  --mp-pilule: var(--sys-pilule, 999px);
  --mp-verre: rgb(249 247 245 / 70%);                       /* verre dépoli : le papier à 70 % */
  --mp-flou: blur(20px) saturate(1.6);
  --mp-filet-verre: inset 0 0 0 1px rgb(255 255 255 / 46%), 0 0 0 1px rgb(24 19 15 / 8%);
  --mp-voile: rgb(24 19 15 / 18%);                          /* ce qui s'ouvre floute le reste */
  --mp-axe: clamp(32px, 3.4vw, 56px);                       /* retrait de la colonne de texte, à droite de la colonne des photos */
}
@media (max-width: 1023px), (pointer: coarse) { #product-view { --mp-ctl: var(--sys-h-bouton, 44px); } }
/* au doigt : une pilule de 32 px garde une cible de 44 px (bande invisible, comptée depuis l'intérieur du bord de 1 px) */
@media (max-width: 1023px), (pointer: coarse) {
  #product-view :is(.mp-format-chip, #mp-colors button, .mp-fleches button, #mp-close-zoom) { position: relative; }
  #product-view :is(.mp-format-chip, #mp-colors button, .mp-fleches button, #mp-close-zoom)::before {
    content: ""; position: absolute; inset: calc((var(--mp-chip) - var(--sys-cible, 44px)) / 2 - 1px) -2px;
  }
}

/* ── 2. Galerie ────────────────────────────────────────────────────────── */
#product-view :is(.mp-frame, #mp-photo-stage) { overflow: clip; }   /* rien ne dépasse du cadre (vue voisine, photo qui s'attarde) */
/* d'une photo à l'autre : la nouvelle se pose sur l'ancienne, en fondu, en glissant de 28 px dans le sens du geste */
#product-view .mp-photo-enter { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  #product-view .mp-photo-enter { animation: mp-photo-arrive var(--mm-t-view) var(--mm-ease) both; }
}
@keyframes mp-photo-arrive {
  from { opacity: 0; transform: translate3d(calc(var(--mp-de-x, 0) * var(--mm-d-m)), calc(var(--mp-de-y, 0) * var(--mm-d-m)), 0); }
}
/* au doigt : la vue voisine attend à côté du cadre et suit le doigt (product.js) */
#product-view .mp-photo-beside { transform: translate3d(100%, 0, 0); will-change: transform; }
/* quand on descend, la photo quitte l'écran moins vite que la page (liée au défilement ; en haut de page, rien ne bouge) */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    #product-view #mp-photo-stage { animation: mp-photo-reste linear both; animation-timeline: view(0px); animation-range: exit 0% exit 100%; }
  }
}
@keyframes mp-photo-reste { to { transform: translate3d(0, var(--mp-reste, 11%), 0); } }
@media (max-width: 1023px) { #product-view #mp-photo-stage { --mp-reste: 6%; } }   /* cadre plus petit : la bouteille reste entière */

/* miniatures : arrondies, petites ; un anneau glisse jusqu'à la vue choisie */
#product-view .mp-thumbs {
  --tw: 3.5rem; --th: 2.625rem; --tg: .625rem;   /* 56 × 42 (4:3), 10 px entre deux */
  top: 50%; translate: 0 -50%;
  gap: var(--tg); width: var(--tw);
}
#product-view .mp-thumbs button {
  width: var(--tw); height: var(--th); aspect-ratio: auto;
  border: 0; border-radius: var(--mp-r-s); opacity: .62;
  transition: opacity var(--mm-t-hover) var(--mm-ease);
}
#product-view .mp-thumbs button:is(:hover, :focus-visible, [aria-pressed=true]) { opacity: 1; }
#product-view .mp-thumbs::before {
  content: ""; position: absolute; z-index: 1; inset: -3px -3px auto; height: calc(var(--th) + 6px);
  border: 1px solid var(--mp-ink); border-radius: calc(var(--mp-r-s) + 3px);
  box-shadow: 0 0 0 1px rgb(249 247 245 / 55%);
  pointer-events: none;
  transform: translate3d(0, calc(var(--mp-pic, 0) * (var(--th) + var(--tg))), 0);
  transition: transform var(--mm-t-panel) var(--mm-ease);
}
@media (min-width: 1024px) and (min-height: 1101px) {
  #product-view .mp-thumbs { --th: 4.375rem; top: 50%; }   /* cadrage portrait : 56 × 70 */
  #product-view .mp-thumbs button { aspect-ratio: auto; }
}
@media (min-width: 1024px) and (max-height: 480px) {
  #product-view .mp-thumbs { --tw: 2.75rem; --th: 2.0625rem; --tg: .375rem; top: calc(50% + var(--nav-height) / 2); left: 1.25rem; width: var(--tw); gap: var(--tg); }
}
/* sans photo : une ligne discrète, sans cartouche */
#product-view .mp-archive { width: auto; padding: 0; border: 0; background: none; text-align: center; }

/* téléphone et tablette : on glisse du doigt ; des points discrets, celui de la vue choisie s'allonge et glisse */
@media (max-width: 1023px) {
  #product-view .mp-thumbs { top: auto; bottom: 0; left: 50%; translate: -50% 0; transform: none; width: auto; gap: 0; }
  #product-view .mp-thumbs button { width: 24px; height: 44px; border-radius: 0; opacity: 1; background: none; }
  #product-view .mp-thumbs button::before,
  #product-view .mp-thumbs button[aria-pressed=true]::before { width: 5px; height: 5px; background: rgb(78 73 69 / 30%); box-shadow: 0 0 0 1px rgb(249 247 245 / 45%); }
  #product-view .mp-thumbs::before {
    inset: auto auto 19.5px 5px; width: 14px; height: 5px;
    border: 0; border-radius: 999px; background: var(--mp-ink); box-shadow: 0 0 0 1px rgb(249 247 245 / 60%);
    transform: translate3d(calc(var(--mp-pic, 0) * 24px), 0, 0);
  }
}

/* ── 3. Zoom : la photo flotte, tout le reste de la page se floute ─────── */
#product-view .mp-zoom {
  inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0;
  overflow: hidden; background: transparent; color: #181714;
}
#product-view .mp-zoom[open] { display: block; }
#product-view .mp-zoom::backdrop { background: rgb(24 19 15 / 42%); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #product-view .mp-zoom::backdrop {
    background: var(--mp-voile);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
}
#product-view #mp-full-frame {
  position: absolute; inset: 64px clamp(12px, 3vw, 48px) 74px; min-height: 0;
  container-type: size; overflow: hidden; border-radius: var(--mp-r); background: none;
  cursor: default; touch-action: pinch-zoom;
}
#product-view #mp-full-frame > picture { display: grid; place-items: center; background: none; }
/* la photo garde ses proportions et ses coins arrondis : elle n'est jamais prise dans un cadre plus grand qu'elle */
#product-view #mp-full-frame .mp-main-image {
  width: min(100cqw, 100cqh * var(--r, 1.3333)); height: auto; max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: var(--mp-r); background: var(--mp-stage); cursor: zoom-in;
}
#product-view #mp-full-frame.mp-magnified .mp-main-image { cursor: grab; }
#product-view #mp-full-frame.mp-magnified:active .mp-main-image { cursor: grabbing; }
#product-view #mp-full-frame:focus-visible { outline: none; }
#product-view #mp-full-frame:focus-visible .mp-main-image { outline: 2px solid #181714; outline-offset: -2px; }
/* photo agrandie : elle remplit le cadre, l'anneau de focus passe sur le cadre */
#product-view #mp-full-frame.mp-magnified:focus-visible::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 2px #181714; pointer-events: none;
}
/* d'une vue à l'autre, l'ancienne s'efface pendant que la nouvelle arrive (elles n'ont pas la même forme) */
@media (prefers-reduced-motion: no-preference) {
  #product-view #mp-full-frame > picture:has(~ .mp-photo-enter) { animation: mp-photo-part var(--mm-t-hover) var(--mm-ease-out) both; }
  #product-view #mp-full-frame .mp-main-image { transition: transform var(--mm-t-panel) var(--mm-ease); }
}
@keyframes mp-photo-part { to { opacity: 0; } }
/* commandes : deux pilules de verre */
#product-view :is(#mp-close-zoom, .mp-zoom footer) {
  position: absolute; z-index: 1; border-radius: 999px; background: rgb(249 247 245 / 94%); box-shadow: var(--mp-filet-verre);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #product-view :is(#mp-close-zoom, .mp-zoom footer) { background: var(--mp-verre); -webkit-backdrop-filter: var(--mp-flou); backdrop-filter: var(--mp-flou); }
}
#product-view #mp-close-zoom {
  top: 16px; right: clamp(12px, 3vw, 48px); display: inline-flex; align-items: center;
  min-width: 0; min-height: var(--mp-chip); padding: 0 var(--sys-px-puce, 14px);
  font: 500 var(--mp-fs-chip)/1 var(--sans); letter-spacing: 0; text-transform: none;
}
#product-view .mp-zoom footer {
  left: 50%; bottom: 14px; translate: -50% 0; display: flex; align-items: center; justify-content: center; gap: 2px;
  min-height: calc(var(--mp-ctl) + 6px); padding: 3px;
}
#product-view .mp-zoom footer button { width: var(--mp-ctl); height: var(--mp-ctl); min-width: 0; min-height: 0; border-radius: 50%; font: 400 var(--mp-fs-btn)/1 var(--sans); }
#product-view .mp-zoom h2 { padding: 0 10px; white-space: nowrap; font: 500 var(--fs-n1)/1 var(--sans); letter-spacing: 0; font-variant-numeric: tabular-nums lining-nums; }
#product-view .mp-zoom[data-seule] footer button { display: none; }
#product-view .mp-zoom[data-seule] h2 { padding: 0 16px; }
@media (hover: hover) and (pointer: fine) {
  #product-view .mp-zoom footer button:hover { background-color: rgb(24 23 20 / 7%); }
  #product-view #mp-close-zoom:hover { background-color: rgb(249 247 245 / 94%); }
}
@media (max-width: 767px) {
  #product-view .mp-zoom { width: 100%; }
  #product-view #mp-full-frame { inset: 68px 12px 78px; }
}

/* ── 4. Panneau d'achat : nom, prix HT, « Ajouter » ────────────────────── */
#product-view .mp-panel { padding: clamp(36px, 8.5svh, 84px) var(--edge) 56px var(--mp-axe); }
@media (max-width: 1023px) { #product-view .mp-panel { padding: 24px var(--edge) 40px; } }
#product-view .mp-heading { display: block; }
#product-view #mp-origin { color: var(--mp-muted); }
#product-view #mp-name { margin: 10px 0 0; }
/* le prix : la deuxième chose qu'on lit (une taille sous le nom) ; la bouteille et le carton en petit, sur la même ligne */
#product-view .mp-unit-price { gap: 2px 16px; margin-top: 12px; }
#product-view .mp-prix { display: inline-flex; align-items: baseline; gap: 8px; }
#product-view #mp-price { font-size: var(--fs-1); line-height: var(--lh-ligne); }
#product-view #mp-case { flex-basis: auto; }

/* format et millésime : des pilules, le prix dedans ; la pilule choisie est pleine */
#product-view #mp-format { margin-top: 22px; }
#product-view .mp-format-chips { gap: 6px; }
#product-view .mp-format-chip {
  flex-direction: row; align-items: center; gap: 7px; min-height: var(--mp-chip); padding: 0 var(--sys-px-puce, 14px);
  border: 1px solid var(--mp-contour); border-radius: var(--mp-pilule); white-space: nowrap; font-size: var(--mp-fs-chip);
  transition: background-color var(--mm-t-hover) var(--mm-ease), border-color var(--mm-t-hover) var(--mm-ease), color var(--mm-t-hover) var(--mm-ease);
}
#product-view .mp-format-chip input { border-radius: 999px; }
#product-view .mp-format-chip-name { line-height: 1; }
#product-view .mp-format-chip-price { line-height: 1; transition: color var(--mm-t-hover) var(--mm-ease); }
#product-view .mp-format-chip:hover { border-color: var(--mp-plein); }
#product-view .mp-format-chip:has(input:checked) { border-color: var(--mp-plein); background: var(--mp-plein); color: #fff; }
#product-view .mp-format-chip:has(input:checked) .mp-format-chip-price { color: rgb(255 255 255 / 84%); }
/* au téléphone : toutes les pilules restent visibles (elles passent à la ligne, sans défilement caché) */
@media (max-width: 767px) {
  #product-view .mp-format-chips { flex-wrap: wrap; overflow: visible; margin-right: 0; padding: 0; }
}
@media (max-width: 1023px), (pointer: coarse) { #product-view .mp-format-chips { row-gap: 12px; } }
#product-view .mp-pack { margin-top: 0; }
#product-view .mp-format-note { margin-top: 10px; }
/* plus de six formats : une liste, dans la même pilule */
#product-view .mp-select { position: relative; display: inline-flex; max-width: 100%; }
#product-view .mp-select::after {
  content: ""; position: absolute; top: 50%; right: 16px; width: 6px; height: 6px; pointer-events: none;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-70%) rotate(45deg);
}
#product-view #mp-variant {
  appearance: none; -webkit-appearance: none; width: auto; max-width: 100%; min-height: var(--mp-ctl);
  padding: 0 40px 0 16px; border: 1px solid var(--mp-contour); border-radius: var(--mp-pilule); background: transparent;
}
@media (max-width: 1023px), (pointer: coarse) { #product-view #mp-variant { font-size: 1rem; } }   /* 16 px : iOS ne zoome pas */

/* quantité (contour) et « Ajouter » (pleine) : deux pilules de même hauteur */
#product-view .mp-actions { gap: 8px; margin-top: 12px; }
/* le contour de la quantité est un filet intérieur : « − » et « + » occupent toute la hauteur (44 px au doigt) */
#product-view .mp-stepper {
  grid-template-columns: var(--mp-ctl) minmax(1.25rem, auto) var(--mp-ctl); min-height: var(--mp-ctl);
  border: 0; border-radius: var(--mp-pilule); box-shadow: inset 0 0 0 1px var(--mp-contour);
}
#product-view .mp-stepper output { font: 500 var(--fs-0)/1 var(--sans); }
#product-view .mp-stepper button { min-width: 0; min-height: 0; border-radius: var(--mp-pilule); font: 400 var(--fs-0)/1 var(--sans); }
#product-view .mp-stepper button:disabled { opacity: .32; }
#product-view .mp-order {
  min-height: var(--mp-ctl); padding: 0 var(--sys-px-bouton, 20px); border: 1px solid var(--mp-plein); border-radius: var(--mp-pilule);
  background: var(--mp-plein); color: var(--paper);
  font: 400 var(--mp-fs-btn)/1 var(--sans); letter-spacing: 0; text-transform: none; white-space: nowrap;
}
#product-view .mp-order:hover { background: var(--mp-plein); }
#product-view .mp-order:not([data-added])::after { content: none; }   /* une pilule : pas de trait de survol dedans */
/* « ajouté » : la pilule se remplit de sauge, avec la coche (motion-controls.css) */
#product-view .mp-order[data-added] { border-color: var(--mp-sauge); }
#product-view .mp-order[data-added]::after { border-radius: inherit; background-color: var(--mp-sauge); }
/* survol, à la souris : le plein se vide (la recette du système), le voile d'encre pour « − » et « + » */
@media (hover: hover) and (pointer: fine) {
  #product-view .mp-order:hover:not([data-added]) { background: transparent; color: var(--mp-plein); }
  #product-view .mp-stepper button:not(:disabled):hover { background: rgb(78 73 69 / 8%); }
}
@media (hover: none), (pointer: coarse) {
  #product-view .mp-order:hover { background: var(--mp-plein); }
  #product-view .mp-stepper button:enabled:hover { background: transparent; }
}
#product-view .mp-subtotal { padding-top: 0; margin-top: 10px; }
#product-view .mp-unavailable { margin: 0 0 12px; color: var(--mp-muted); font: 400 var(--fs-n1)/var(--lh-petit) var(--sans); }
#product-view #mp-buy:has(.mp-unavailable) { margin-top: 14px; }
/* secondaire : pilule au contour, qui se remplit au survol */
#product-view :is(.mp-contact, .mp-missing-link) {
  display: inline-flex; align-items: center; min-height: var(--mp-ctl); padding: 0 var(--sys-px-bouton, 20px);
  border: 1px solid var(--mp-contour); border-radius: var(--mp-pilule); text-decoration: none;
  font: 400 var(--mp-fs-btn)/1 var(--sans); letter-spacing: 0;
  transition: background-color var(--mm-t-hover) var(--mm-ease), color var(--mm-t-hover) var(--mm-ease), border-color var(--mm-t-hover) var(--mm-ease);
}
@media (hover: hover) and (pointer: fine) {
  #product-view :is(.mp-contact, .mp-missing-link):hover { background: var(--mp-plein); border-color: var(--mp-plein); color: var(--paper); }
}
#product-view .mp-missing a { margin-top: 20px; }

/* ── 5. En retrait : présentation, onglets, « À lire » ─────────────────── */
#product-view .mp-intro { margin-top: 28px; font-size: var(--fs-0); color: var(--mp-muted); }
#product-view .mp-intro-caveat { margin-top: 6px; }
#product-view .mp-details { margin-top: 26px; padding: 0; border: 0; }
/* onglets : casse normale, à gauche ; un trait d'encre glisse sous l'onglet choisi, sur un filet */
#product-view .mp-tabs { position: relative; flex-wrap: nowrap; justify-content: flex-start; gap: 0 24px; box-shadow: inset 0 -1px 0 var(--mp-line); }
#product-view .mp-tabs button {
  min-height: var(--tap); padding: 0; border: 0; border-radius: 6px; color: var(--mp-muted);
  font: 500 var(--fs-n1)/var(--lh-ligne) var(--sans); letter-spacing: 0; text-transform: none; white-space: nowrap;
  transition: color var(--mm-t-hover) var(--mm-ease);
}
#product-view .mp-tabs button:is([aria-selected=true], :hover) { color: var(--mp-ink); border: 0; }
#product-view .mp-tabs::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 1px; height: 1.5px; background: var(--mp-ink); pointer-events: none;
  transform-origin: 0 50%; transform: translate3d(var(--x, 0px), 0, 0) scaleX(var(--w, 0));
  transition: transform var(--mm-t-panel) var(--mm-ease);
}
#product-view .mp-tabs.is-instant::after { transition: none; }
/* contenu : la note en voix « étiquette », les repères sur deux colonnes */
#product-view #mp-tab-panel { margin-top: 16px; min-height: 0; font-size: var(--fs-n1); line-height: 1.6; }
#product-view #mp-tab-panel p { max-width: 36rem; }
#product-view #mp-tab-panel p + p, #product-view #mp-tab-panel p + dl { margin-top: .8em; }
#product-view .mp-note-caveat { color: var(--mp-muted); }
#product-view .mp-facts { gap: 0; font: 400 var(--fs-n1)/var(--lh-petit) var(--sans); }
#product-view .mp-facts > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 16px; padding: 7px 0; }
#product-view .mp-facts > div + div { box-shadow: inset 0 1px 0 var(--mp-line); }
#product-view .mp-facts dd { text-align: left; }
/* « À lire » : une ligne, l'étiquette puis le lien ; le retour à droite */
#product-view .mp-reading { justify-content: flex-start; align-items: center; gap: 0 12px; margin-top: 18px; }
#product-view .mp-reading-label { color: var(--mp-muted); font: 400 var(--fs-n2)/var(--lh-petit) var(--mono); letter-spacing: var(--ls-etiquette); text-transform: uppercase; }
#product-view .mp-reading .mp-back { margin-left: auto; }
#product-view .mp-reading-note { color: inherit; }
/* liens (la recette du système) : un trait fin à 40 % au repos ; au survol, le trait plein se dessine de gauche à droite */
#product-view :is(.mp-reading a, .mp-domaine-lien) { position: relative; text-decoration: none; }
#product-view :is(.mp-reading a, .mp-domaine-lien)::before,
#product-view :is(.mp-reading a, .mp-domaine-lien)::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(50% + .62em); height: 1px; background: currentColor; pointer-events: none;
}
#product-view :is(.mp-reading a, .mp-domaine-lien)::before { opacity: .4; }
#product-view :is(.mp-reading a, .mp-domaine-lien)::after { transform: scaleX(0); transform-origin: 100% 50%; transition: transform var(--mm-t-panel) var(--mm-ease); }
#product-view :is(.mp-reading a, .mp-domaine-lien):is(:hover, :focus-visible)::after { transform: scaleX(1); transform-origin: 0 50%; }

/* ── 6. Barre d'achat collante : une île de verre ──────────────────────── */
#product-view #mp-sticky {
  inset: auto auto max(12px, env(safe-area-inset-bottom)) 50%; translate: -50% 0;
  width: min(100% - 24px, 46rem); min-height: 56px;
  grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; padding: 8px 8px 8px 26px;
  border-radius: 999px; background: rgb(249 247 245 / 96%); color: #181714;
  box-shadow: var(--mp-filet-verre), 0 14px 30px -18px rgb(24 19 15 / 34%);
  opacity: 0; visibility: hidden; transform: translate3d(0, calc(100% + 24px), 0);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #product-view #mp-sticky { background: var(--mp-verre); -webkit-backdrop-filter: var(--mp-flou); backdrop-filter: var(--mp-flou); }
}
#product-view #mp-sticky[data-on] { opacity: 1; visibility: visible; transform: none; }
body:has(dialog[open], .main-nav.panel-open) #product-view #mp-sticky[data-on] { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  /* elle monte en 420 ms, repart en 150 ms */
  #product-view #mp-sticky { transition: transform var(--mm-t-leave) var(--mm-ease-out), opacity var(--mm-t-leave) var(--mm-ease-out), visibility 0s linear var(--mm-t-leave); }
  #product-view #mp-sticky[data-on] { transition: transform var(--mm-t-panel) var(--mm-ease), opacity var(--mm-t-panel) var(--mm-ease), visibility 0s; }
}
/* sur le verre, le fond varie : l'encre forte de la maison, le texte secondaire à 76 % */
#product-view .mp-sticky-wine strong { line-height: var(--lh-ligne); }
#product-view .mp-sticky-wine small { margin-top: 0; color: rgb(24 23 20 / 76%); }
#product-view #mp-sticky :is(.mp-stepper, .mp-order) { min-height: var(--mp-ctl); }
#product-view #mp-sticky .mp-stepper { box-shadow: inset 0 0 0 1px rgb(24 23 20 / 50%); }
#product-view #mp-sticky .mp-order { min-width: 10.5rem; }
@media (max-width: 1023px) {
  #product-view #mp-sticky { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; }
}
@media (max-width: 767px) {
  #product-view #mp-sticky { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 6px 6px 6px 22px; }
  #product-view #mp-sticky .mp-order { min-width: 0; padding-inline: 16px; }
}

/* ── 7. Sous la fiche : une idée par écran ─────────────────────────────── */
/* 7.1 « Dans le verre » : une photo arrondie, une phrase. Ordinateur : la photo dans la colonne des photos (celle de la
   galerie), la phrase sur l'axe du panneau d'achat ; le tout tient entre l'en-tête et l'île d'achat. */
#product-view .mp-verre { padding-block: var(--section-y); }
#product-view .mp-verre-media {
  width: min(100% - 2 * var(--edge), 70svh * var(--r, .8)); margin: 0 var(--edge); aspect-ratio: var(--r, .8);
  overflow: hidden; border-radius: var(--mp-r); background: var(--bottle-backdrop);
}
#product-view .mp-verre-media img { width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }
#product-view .mp-verre-texte { padding: 20px var(--edge) 0; }
#product-view .mp-verre .mp-verre-titre { margin: 0 0 .35em; max-width: none; font-size: var(--fs-4); }
#product-view .mp-verre .mp-verre-phrase { font-size: var(--fs-2); color: var(--u-ink-2); }
@media (max-width: 1023px) { #product-view .mp-verre { padding-top: 8px; } }
@media (min-width: 1024px) {
  #product-view .mp-verre {
    grid-template-columns: minmax(0, min(58.333%, calc(100% - var(--mp-panel-min)))) minmax(0, 1fr);
    justify-content: stretch; column-gap: 0; width: min(100%, var(--mp-layout-max)); margin-inline: auto; padding-inline: 0;
  }
  #product-view .mp-verre-media {
    justify-self: end; width: auto; margin: 0 clamp(28px, 4.2vw, 72px) 0 var(--edge);
    height: min(100svh - var(--nav-height) - var(--mp-sticky-h) - 2 * var(--section-y), 44vw);
  }
  #product-view .mp-verre-media img { width: 100%; height: 100%; }
  #product-view .mp-verre-texte { padding: 0 var(--edge) 0 var(--mp-axe); }
}

/* 7.2 « Le domaine » : une carte de couleur (sauge en France, bois en Israël), une phrase ; la suite au clic */
#product-view .mp-domaine {
  --mp-marge: clamp(8px, 1.1vw, 16px);   /* la même marge que la carte du pied de page */
  /* le texte part du haut de la carte, entre deux marges égales : quand la suite s'ouvre, la phrase ne bouge pas */
  display: grid; align-content: start; gap: var(--stack);
  min-height: 0; margin: 0 var(--mp-marge);
  padding: clamp(56px, 11svh, 112px) max(12px, calc(var(--edge) - var(--mp-marge)));
  border-radius: var(--mp-r);
}
#product-view .mp-domaine.has-media { padding-block: clamp(40px, 7svh, 72px); }
/* 25/11 (Benjamin : « une coquille de design au niveau des parties ») : sans « Dans le verre », la carte venait coller
   au bas de la photo de la galerie, qui va jusqu'au bord de l'écran — ses coins arrondis et ses marges laissaient deux
   encoches de papier contre la photo. Elle se pose à la même distance de la photo que des bords : une carte encadrée
   de papier, comme celle du pied de page. */
#product-view .mp-layout + .mp-domaine { margin-top: var(--mp-marge); }
#product-view .mp-domaine-texte { max-width: 44rem; }
#product-view .mp-domaine .ed-section { margin: 0 0 14px; }
#product-view .mp-domaine-titre { margin: 0; }
#product-view .mp-domaine-suite { margin-top: 22px; }
#product-view .mp-domaine summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--mp-ctl); padding: 0 var(--sys-px-bouton, 20px);
  border: 1px solid currentColor; border-radius: var(--mp-pilule); cursor: pointer; list-style: none; text-decoration: none;
  font: 400 var(--mp-fs-btn)/1 var(--sans); letter-spacing: 0; color: var(--u-ink);
  transition: background-color var(--mm-t-hover) var(--mm-ease), color var(--mm-t-hover) var(--mm-ease);
}
#product-view .mp-domaine summary::-webkit-details-marker { display: none; }
#product-view .mp-domaine summary::after { content: "+"; font: 400 1rem/1 var(--sans); text-decoration: none; }
#product-view .mp-domaine details[open] > summary::after { content: "−"; }
@media (hover: hover) and (pointer: fine) {
  #product-view .mp-domaine-suite > summary:hover { background: var(--u-ink); color: var(--u-bg); }
}
#product-view .mp-domaine-detail { padding-top: 22px; }
#product-view .mp-domaine-recit { max-width: var(--mesure-lecture); }
#product-view .mp-domaine-reperes { gap: 16px clamp(28px, 4vw, 56px); margin: 24px 0 0; }
#product-view .mp-domaine-reperes dd { font-size: var(--fs-4); }
#product-view .mp-domaine-lien { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: 18px; font: 400 var(--fs-n1)/var(--lh-petit) var(--sans); }
/* « Sources » : un simple intitulé qui s'ouvre, sans contour */
#product-view .mp-domaine .ed-sources-mini { margin-top: 10px; }
#product-view .mp-domaine .ed-sources-mini summary { min-height: var(--tap); padding: 0; border: 0; color: var(--u-ink-2); font: 400 var(--fs-n1)/var(--lh-petit) var(--sans); text-decoration: none; }
#product-view .mp-domaine-media { overflow: hidden; border-radius: var(--mp-r); aspect-ratio: var(--r, 1.3333); max-height: 62svh; }
#product-view .mp-domaine-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { #product-view .mp-domaine-media { margin-top: 8px; } }
@media (min-width: 1024px) {
  #product-view .mp-domaine { grid-template-columns: minmax(0, 1fr); column-gap: var(--col-gap); }
  #product-view .mp-domaine-texte, #product-view .mp-domaine.has-media .mp-domaine-texte { grid-column: auto; max-width: 44rem; }
  #product-view .mp-domaine.has-media { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
  #product-view .mp-domaine.has-media .mp-domaine-media { grid-column: auto; justify-self: end; height: min(56svh, 34rem); max-height: none; max-width: 100%; }
}

/* 7.3 « À goûter aussi » : un vin, une grande photo arrondie ; le titre dans la colonne de texte de la carte */
#product-view .mp-related { margin: 0; padding: var(--section-y) var(--edge); border: 0; }
#product-view .mp-related h2.mp-related-titre { margin: 0 0 18px; }   /* taille : le rôle « titre de module » de type.css */
#product-view .mp-related-card .wine-card { grid-template-columns: minmax(0, 1fr); gap: 20px; }
#product-view .mp-related-card .wine-info { max-width: 24rem; }
@media (min-width: 768px) {
  #product-view .mp-related-card .wine-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 0 var(--col-gap); }
}
@media (min-width: 1024px) {
  #product-view .mp-related { width: min(100%, var(--mp-layout-max)); margin-inline: auto; padding-inline: 0; }
  #product-view .mp-related-card .wine-card { grid-template-columns: minmax(0, min(58.333%, calc(100% - var(--mp-panel-min)))) minmax(0, 1fr); gap: 0; }
  #product-view .mp-related-card .wine-media {
    justify-self: end; margin: 0 clamp(28px, 4.2vw, 72px) 0 var(--edge);
    width: min((100svh - var(--nav-height) - var(--mp-sticky-h) - 2 * var(--section-y)) * .8, 30vw);
  }
  #product-view .mp-related-card .wine-info { padding: 0 var(--edge) 0 var(--mp-axe); max-width: none; }
  #product-view .mp-related-card .wine-info > :not(h2) { max-width: 22rem; }
}

/* 7.4 « Compléter la commande » : le rail, sur le papier ; pilules de couleur et flèches rondes dans l'en-tête */
#product-view .mp-complete { background: transparent; }
#product-view .mp-complete header { align-items: center; }
#product-view .mp-complete-outils { display: flex; align-items: center; gap: 20px; min-width: 0; }
/* fenêtre large mais basse (ex. 1470×737) : cinq cartes au lieu de quatre, pour que la carte entière (photo, prix, bouton) tienne dans l'écran */
@media (min-width: 1280px) and (max-height: 820px) { #product-view .mp-complete { --rail-width: calc((100% - 4 * var(--col-gap)) / 5); } }
#product-view #mp-colors { gap: 6px; }
#product-view #mp-colors button {
  min-height: var(--mp-chip); padding: 0 var(--sys-px-puce, 14px); border: 1px solid var(--mp-contour); border-radius: var(--mp-pilule);
  font: 500 var(--mp-fs-chip)/1 var(--sans); letter-spacing: 0; text-transform: none;
}
#product-view #mp-colors [aria-pressed=true] { background: var(--mp-plein); border-color: var(--mp-plein); color: #fff; }
#product-view .mp-fleches { display: flex; gap: 6px; }
#product-view .mp-fleches button {
  display: grid; place-items: center; width: var(--mp-chip); height: var(--mp-chip); padding: 0;
  border: 1px solid var(--mp-contour); border-radius: 50%; font: 400 var(--mp-fs-chip)/1 var(--sans);
  transition: background-color var(--mm-t-hover) var(--mm-ease), opacity var(--mm-t-hover) var(--mm-ease);
}
#product-view .mp-fleches button:disabled { opacity: .3; }
@media (hover: hover) and (pointer: fine) {
  #product-view .mp-fleches button:not(:disabled):hover { background: rgb(78 73 69 / 8%); }
}
#product-view .mp-slider { overflow-x: clip; }
@media (max-width: 767px) {
  #product-view .mp-complete header { align-items: stretch; }
  #product-view .mp-complete-outils { display: block; }   /* les pilules défilent jusqu'au bord de l'écran (product.css) */
  #product-view #mp-colors { padding-block: 8px; margin-block: -2px; }   /* la bande tactile de 44 px des puces tient entière dans la zone qui défile */
  #product-view .mp-fleches { display: none; }
}

/* ── 8. Entrées liées au défilement ────────────────────────────────────── */
/* La photo se découvre dans son cadre arrondi et dézoome ; la phrase monte ; la carte du domaine s'élargit ; le rail glisse.
   Tout suit le défilement (animation-timeline: view()), rien ne joue tout seul. view(0px) : la course se mesure sur
   tout l'écran, sans les marges de défilement de la page (scroll-padding). */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    #product-view :is(.mp-verre-media, .mp-domaine-media, .mp-related-card .wine-media) {
      animation: mp-cadre linear both; animation-timeline: view(0px); animation-range: entry 0% cover 34%;
    }
    #product-view :is(.mp-verre-media, .mp-domaine-media) img {
      animation: mp-dezoom linear both; animation-timeline: view(0px); animation-range: entry 0% cover 50%;
    }
    #product-view :is(.mp-verre-texte, .mp-domaine-texte) {
      animation: mp-monte linear both; animation-timeline: view(0px); animation-range: entry 10% cover 30%;
    }
    #product-view .mp-domaine {
      animation: mp-carte linear both; animation-timeline: view(0px); animation-range: entry 0% cover 26%;
    }
    #product-view #mp-wines {
      animation: mp-rail linear both; animation-timeline: view(0px); animation-range: entry 0% cover 30%;
    }
  }
}
@keyframes mp-cadre { from { clip-path: inset(9% 8% 9% 8% round var(--mp-r)); } to { clip-path: inset(0 round var(--mp-r)); } }
@keyframes mp-dezoom { from { transform: scale(1.12); } to { transform: none; } }
@keyframes mp-monte { from { opacity: 0; transform: translate3d(0, var(--mm-d-m), 0); } to { opacity: 1; transform: none; } }
@keyframes mp-carte { from { clip-path: inset(0 6% 0 6% round calc(var(--mp-r) * 2)); } to { clip-path: inset(0 round var(--mp-r)); } }
@keyframes mp-rail { from { transform: translate3d(clamp(32px, 6vw, 96px), 0, 0); } to { transform: none; } }

/* Mouvement réduit : rien ne glisse */
@media (prefers-reduced-motion: reduce) {
  #product-view .mp-thumbs::before, #product-view .mp-tabs::after,
  #product-view :is(.mp-reading a, .mp-domaine-lien)::after,
  #product-view :is(.mp-format-chip, .mp-format-chip-price, .mp-thumbs button, .mp-tabs button, .mp-fleches button, .mp-domaine summary) { transition: none; }
}

/* Jury du 24/11 (avocat du diable) : les phrases des onglets (« Dégustation », « Le vin ») étaient en Fugue Mono de
   12,5 px, alors que les autres phrases de la fiche sont en Marion. Le mono reste aux étiquettes ; une phrase se lit
   dans la voix de lecture du site (texte, 15,5 px). Les repères (dl) gardent leur sans. */
#product-view #mp-tab-panel p { font: 400 var(--fs-0)/var(--lh-texte) var(--serif); letter-spacing: normal; }

/* 25/11 : au téléphone, la vue « bouteille et fruits » (photo paysage) remplit le cadre carré, sans bordures */
@media (max-width: 767px) {
  #product-view #mp-photo-stage > picture[data-large] .mp-main-image { object-fit: cover; object-position: 50% 50%; }
}

/* 25/11, 14 h 17 : plus de bandeau d'annonce (fx-entete.css). La galerie de l'ordinateur remontait sous l'en-tête ET
   sous les 30 px du bandeau (product.css) : sans lui, elle dépassait de 30 px au-dessus de l'écran et la photo perdait
   son haut. Elle remonte de la hauteur de l'en-tête seulement, comme au téléphone. */
@media (min-width: 1024px) { #product-view .mp-gallery-area { margin-top: calc(-1 * var(--nav-height)); } }
