/* Zone « Où acheter » des fiches marque (wp-content/themes/vp2021/ou-acheter.php, /assets/js/ou-acheter.js).
   Chargée seulement sur les fiches qui affichent la zone. Reprise de la maquette validée (version 11), aux couleurs du site.
   Espacements sur une échelle de 4 px : 4 dans un groupe, 8 entre voisins, 16 entre blocs, 24 avant la mention. */
.oa, .oa-generique {
  --oa-encre: #232221; --oa-discret: #8d8781; --oa-trait: #e4ded8; --oa-fond: #fffdfb; --oa-carte: #fffefd;
  --oa-sable: #ecbc90; --oa-sable-survol: #efc6a1; --oa-sable-pale: #fbf1e7; --oa-lien: #b8916d; --oa-lien-survol: #a78a70;
  --oa-raye: rgba(18, 17, 16, .05); --oa-nuit: #121110; --oa-rose: #ec9092; --oa-sur-rose: #3a1416; --oa-vert: #2a6a4b;
  --oa-e1: 4px; --oa-e2: 8px; --oa-e3: 12px; --oa-e4: 16px; --oa-e5: 24px;
  --oa-col-bouton: 17.5rem;  /* colonne des boutons, la même dans la zone et dans le bloc générique */
}
.oa { display: grid; margin-top: 3rem; }  /* la zone suit le bloc générique : même écart que les sections .mt-5 de la fiche */
.oa + section { margin-top: 3rem; }  /* la section qui suit la zone (ventes manquées) garde le même écart (demande de Max, 12/11/2026) */
.oa h3 { margin-bottom: var(--oa-e1); text-wrap: balance; }
.oa-muted { color: var(--oa-discret); }
.oa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.oa-sous { font-size: 14px; color: var(--oa-discret); margin: 0; }
.oa-fraicheur { display: inline-flex; align-items: center; gap: var(--oa-e1); font-weight: 600; color: var(--oa-vert); }
.oa-fraicheur svg { flex: none; }

/* Le filtre unique de la zone (T-333) : « Pour qui », un choix parmi quatre ; puis la seconde rangée, en puces chiffrées ; puis
   la phrase qui dit la sélection. Il commande les tuiles et les boutiques, et reste collé sous le menu du site (56 px) le temps
   de la zone. */
.oa-filtre { position: sticky; top: 56px; z-index: 1010; display: grid; gap: var(--oa-e3); margin-top: var(--oa-e4);
  padding: var(--oa-e3) 0; background: var(--oa-fond); border-bottom: 1px solid var(--oa-trait); }
.oa-f-ligne { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--oa-e2) var(--oa-e3); align-items: center; }
.oa-f-ligne[hidden] { display: none; }
.oa-f-nom { display: flex; align-items: center; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--oa-discret); }
.oa-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: 34rem; padding: 3px; gap: 3px;
  border: 1px solid #cfc8c0; border-radius: 12px; background: var(--oa-carte); }
.oa-seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 4px 6px; border: 0;
  border-radius: 9px; background: transparent; color: var(--oa-encre); font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.oa-seg button span { font-size: 11.5px; font-weight: 500; color: var(--oa-discret); font-variant-numeric: tabular-nums; }
.oa-seg button[aria-checked="true"] { background: var(--oa-nuit); color: #fffefd; }
.oa-seg button[aria-checked="true"] span { color: #cfc8c0; }
.oa-puces { display: flex; flex-wrap: wrap; gap: var(--oa-e2); min-width: 0; }
.oa-puce { border: 1px solid var(--oa-trait); background: var(--oa-carte); color: var(--oa-encre); border-radius: 99px; padding: 0 14px; min-height: 36px;
  font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.oa-puce[hidden] { display: none; }
.oa-puce span { color: var(--oa-discret); font-weight: 500; font-variant-numeric: tabular-nums; font-size: 13px; }
.oa-puce[aria-pressed="true"] { background: var(--oa-sable); border-color: var(--oa-sable); color: var(--oa-nuit); }
.oa-puce[aria-pressed="true"] span { color: #5b4632; }
.oa-puce.oa-autres { border-style: dashed; color: var(--oa-lien); }
.oa-f-res { display: flex; flex-wrap: wrap; gap: var(--oa-e1) var(--oa-e3); align-items: center; margin: 0; font-size: 14px; color: #645e58; }
.oa-f-res b { color: var(--oa-encre); font-weight: 700; font-variant-numeric: tabular-nums; }
.oa-f-chemin { color: var(--oa-encre); font-weight: 600; }
.oa-f-res .oa-lien-btn { min-height: 0; }

/* Les deux blocs sous le filtre : « Par type de produit » (1-recherche-vitrine.php), « Par boutique ». */
.oa-bloc { display: grid; margin-top: var(--oa-e5); }
.oa-bloc-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--oa-e1) var(--oa-e4); margin-bottom: var(--oa-e3); }
.oa .oa-bloc-tete h4 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.oa-bloc-tete p { margin: 0; font-size: 13px; color: var(--oa-discret); }
.oa-ici { display: inline-block; margin-left: var(--oa-e1); padding: 1px 7px; border-radius: 4px; background: #e3f1e8; color: var(--oa-vert);
  font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: 3px; white-space: nowrap; }
.oa-absentes { margin: var(--oa-e2) 2px 0; font-size: 13.5px; color: var(--oa-discret); }

/* Les lignes partagent les colonnes de la liste (subgrid) : tous les boutons prennent la largeur du plus long. */
.oa-lignes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; border-top: 1px solid var(--oa-trait); }
.oa-ligne { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: var(--oa-e2) var(--oa-e4); align-items: center;
  padding: var(--oa-e4); border-bottom: 1px solid var(--oa-trait); position: relative; }
.oa-ligne[hidden] { display: none; }
.oa-ligne:nth-child(odd) { background: var(--oa-raye); }
.oa-logo { width: 88px; height: 48px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 10.5px; letter-spacing: .02em;
  text-align: center; line-height: 1.1; padding: var(--oa-e1); background: #efe9e2; color: var(--oa-encre); overflow-wrap: normal; }
/* Logo de la boutique, fond blanc (logos_boutiques.py) : un filet le détache des lignes rayées. Sans fichier, le nom court. */
.oa-logo-img { padding: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--oa-trait); overflow: hidden; }
.oa-logo-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.oa-info { min-width: 0; display: grid; gap: var(--oa-e1); }
.oa-info h4 { margin: 0; font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
.oa-chiffres { font-size: 14.5px; display: flex; flex-wrap: wrap; gap: var(--oa-e1) var(--oa-e3); align-items: center; }
.oa-action { display: grid; gap: var(--oa-e2); justify-items: end; min-width: var(--oa-col-bouton); }
.oa-promos { display: flex; flex-wrap: wrap; gap: var(--oa-e2); align-items: center; justify-content: flex-end; font-size: 14px; font-weight: 600; }
.oa-remise { display: inline-block; padding: .35em .65em; font-size: .75em; font-weight: 700; line-height: 1; border-radius: .25rem;
  background: var(--oa-rose); color: var(--oa-sur-rose); white-space: nowrap; }
.oa-promos-info { font-weight: 600; color: var(--oa-encre); }
.oa a { color: var(--oa-lien); }

/* Toute la ligne mène à la sortie du bouton : son ::after la couvre. Promotions, code et copie passent au-dessus.
   Les sorties sont des boutons qui soumettent un formulaire en POST, jamais des liens : rien à suivre pour un robot. */
.oa-voir::after { content: ""; position: absolute; inset: 0; }
.oa-promos button, .oa-code button, .oa-code-val { position: relative; z-index: 1; }

/* Code promo : jamais écrit dans la page avant le clic, qui ouvre la boutique par le lien suivi. */
.oa-code { display: flex; align-items: center; gap: var(--oa-e2); flex-wrap: wrap; font-size: 14px; margin-top: var(--oa-e1); }
.oa-code-texte { font-weight: 600; }
.oa .oa-code-voir { display: inline-flex; align-items: center; border: 1.5px dashed var(--oa-lien); color: var(--oa-nuit); text-decoration: none;
  background: repeating-linear-gradient(135deg, var(--oa-sable-pale) 0 7px, #f6e6d6 7px 14px); border-radius: 6px; padding: 0 14px; min-height: 36px;
  font-weight: 700; font-size: 14px; letter-spacing: .02em; font-family: inherit; cursor: pointer; }
.oa-code-val { font: 500 14px/1 ui-monospace, Menlo, Consolas, monospace; border: 1.5px solid var(--oa-lien); background: var(--oa-carte); padding: 10px 12px;
  border-radius: 6px; letter-spacing: .06em; user-select: all; }
.oa-lien-btn { border: 0; background: transparent; color: var(--oa-lien); text-decoration: underline; cursor: pointer; padding: 0 2px; font-weight: 600;
  font-size: 13.5px; min-height: 36px; font-family: inherit; }
.oa-promos-voir { font-size: 14px; }
.oa .oa-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; width: 100%; background: var(--oa-sable);
  color: var(--oa-nuit); border-radius: .25rem; padding: 0 var(--oa-e4); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap;
  border: 1px solid var(--oa-sable); font-family: inherit; line-height: 1.25; cursor: pointer; }
@supports not (grid-template-columns: subgrid) {
  .oa-ligne { grid-template-columns: 88px minmax(0, 1fr) auto; }
  .oa .oa-btn { width: auto; min-width: var(--oa-col-bouton); }
}
.oa-repli { justify-self: start; margin-top: var(--oa-e2); }
/* Quota de sorties atteint (?oa_limite=1) : le visiteur sait pourquoi il est revenu sur la fiche. */
.oa-alerte { margin: 0 0 var(--oa-e4); padding: var(--oa-e3) var(--oa-e4); border-left: 4px solid var(--oa-rose); border-radius: 6px;
  background: #fdf0f0; color: var(--oa-sur-rose); font-size: 14.5px; font-weight: 600; line-height: 1.45; }

/* Bloc générique « Les e-commerçants … recommandés », au-dessus de la zone (Max, 11/11/2026). Ses lignes viennent du composant Vue
   shops-list, commun à tout le site : seule cette feuille, chargée sur les fiches de la zone, leur donne la mesure des lignes de la zone
   (case du logo, titre, sous-titre, bouton de la largeur de la colonne des boutons). */
.oa-generique .table { margin: 0; border-top: 1px solid var(--oa-trait); }
.oa-generique .table > tbody > tr { display: grid; grid-template-columns: 88px minmax(0, 1fr) var(--oa-col-bouton); gap: var(--oa-e2) var(--oa-e4);
  align-items: center; padding: var(--oa-e4); border-bottom: 1px solid var(--oa-trait); }
.oa-generique .table > tbody > tr:nth-of-type(odd) { background: var(--oa-raye); }
.oa-generique .table > tbody > tr > * { padding: 0; border: 0; box-shadow: none; background: transparent; min-width: 0; }
.oa-generique .logo { display: block; width: 88px; height: 48px; object-fit: contain; border: 1px solid var(--oa-trait); border-radius: 6px !important; background: #fff; }
.oa-generique h4 { margin: 0 0 var(--oa-e1); font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
.oa-generique td:not(:last-child) { font-size: 14.5px; line-height: 1.5; color: var(--oa-encre); }
.oa-generique .btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; padding: 0 var(--oa-e4);
  font-size: 15px; font-weight: 600; border-radius: .25rem; white-space: nowrap; }
.oa-mention { font-size: 12.5px; color: var(--oa-discret); margin: var(--oa-e5) 0 0; }

/* Recherche produits (V2, mu-plugin 1-recherche-produits.php) : la vitrine en tête de la zone, écrite par des règles à partir des
   chiffres du jour ; ses boutons et « Chercher parmi ses produits » soumettent le formulaire #rp-entree (POST, sans adresse). */
.rp-vitrine { display: grid; gap: var(--oa-e3); margin: 0 0 var(--oa-e4); padding: var(--oa-e4) var(--oa-e4) var(--oa-e3); background: var(--oa-sable-pale);
  border: 1.5px solid var(--oa-sable); border-radius: 12px; }
.rp-v-sur { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8c6b4a; }
.oa .rp-v-titre { margin: 0; font-size: 1.45rem; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.rp-v-titre em { font-style: normal; background: var(--oa-rose); color: var(--oa-sur-rose); border-radius: 8px; padding: 0 8px; white-space: nowrap; }
.rp-v-phrase { margin: 0; font-size: 15px; max-width: 62ch; }
.rp-v-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--oa-e2); }
.rp-v-stat { display: grid; gap: 1px; align-content: start; min-height: 76px; padding: 10px 12px; text-align: left; font-family: inherit; color: var(--oa-encre);
  background: var(--oa-carte); border: 1px solid #ead9c8; border-radius: 10px; cursor: pointer; }
.rp-v-gros { font-size: 1.35rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rp-v-quoi { font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rp-v-detail { font-size: 13px; color: #645e58; font-variant-numeric: tabular-nums; }
.rp-v-gestes { display: flex; flex-wrap: wrap; gap: var(--oa-e2) var(--oa-e4); align-items: center; }
.oa .rp-v-fort { width: auto; gap: 6px; background: var(--oa-nuit); border-color: var(--oa-nuit); color: #fffefd; }
.rp-v-second { font-size: 14px; }
.rp-v-ou { margin: 0; font-size: 13.5px; color: #645e58; }
.rp-ici { position: relative; z-index: 1; font-size: 13.5px; }

@media (hover: hover) and (pointer: fine) {
  .rp-v-stat:hover { border-color: #8c6b4a; }
  .oa .rp-v-fort:hover { background: #2b2927; }
  .oa-puce:hover { border-color: var(--oa-sable); }
  .oa-ligne:hover { background: var(--oa-sable-pale); box-shadow: inset 3px 0 0 var(--oa-sable); }
  .oa-ligne:hover .oa-btn, .oa .oa-btn:hover, .oa .oa-code-voir:hover { background: var(--oa-sable-survol); }
  .oa-lien-btn:hover { color: var(--oa-lien-survol); }
}
/* Pas de transform sur .oa-btn : une transformation fait du bouton le repère de son ::after, qui se réduirait alors au bouton
   pendant l'appui, et le clic relâché sur le fond de la ligne serait perdu. */
@media (prefers-reduced-motion: no-preference) {
  .oa-btn { transition: background-color 150ms ease; }
  .oa-puce, .oa-code-voir { transition: transform 160ms cubic-bezier(.23, 1, .32, 1), background-color 150ms ease; }
  .oa-puce:active, .oa-code-voir:active { transform: scale(.97); }
  .oa-ligne { transition: background-color 150ms ease, box-shadow 150ms ease; }
}

/* Téléphone (point de rupture du thème) : logo et nom en haut, bouton sur toute la largeur, facettes sur une ligne qui défile. */
@media (max-width: 575.98px) {
  .oa-filtre { gap: var(--oa-e2); padding: var(--oa-e2) 0; }
  .oa-f-ligne { grid-template-columns: minmax(0, 1fr); gap: var(--oa-e1); }
  .oa-seg { max-width: none; }
  .oa-seg button { min-height: 42px; font-size: 14px; }
  .oa-puces { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 2px; scrollbar-width: none; }
  .oa-puce { min-height: 40px; flex: none; }
  .oa-bloc-tete { margin-bottom: var(--oa-e2); }
  .oa-lignes { grid-template-columns: auto minmax(0, 1fr); }
  .oa-ligne { padding: var(--oa-e3); gap: var(--oa-e3); align-items: start; }
  .oa-logo { width: 72px; height: 40px; font-size: 8.5px; letter-spacing: 0; overflow-wrap: normal; hyphens: none; }
  .oa-action { grid-column: 1 / -1; justify-items: stretch; min-width: 0; }
  .oa .oa-btn { min-height: 44px; white-space: normal; text-align: center; }
  .oa-generique .table > tbody > tr { grid-template-columns: 72px minmax(0, 1fr); padding: var(--oa-e3); gap: var(--oa-e3); align-items: start; }
  .oa-generique .table > tbody > tr > th.d-none { display: block !important; }  /* le logo, masqué par le composant sur téléphone */
  .oa-generique .logo { width: 72px; height: 40px; }
  .oa-generique td:last-child { grid-column: 1 / -1; }
  .oa-generique .btn { min-height: 44px; white-space: normal; }
  .oa-promos { justify-content: flex-start; }
  .oa .rp-v-titre { font-size: 1.25rem; }
  .rp-v-stats { grid-template-columns: minmax(0, 1fr); }
  .rp-v-stat { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--oa-e3); align-items: center; min-height: 56px; }
  .rp-v-gros { grid-row: span 2; min-width: 68px; }
  .rp-v-gestes .oa-btn { flex: 1 1 100%; min-height: 44px; }
}
