/* ================================================================
   Maison de la Truffe, la fiche produit (refonte du 14/10/2026), d'après
   la maquette de fiche validée le 14/10 :
   - une grille de douze colonnes alignée sur les marges de l'en-tête (la
     colonne de 1 280 px de .t-col est levée sur la fiche) ;
   - sans fil d'Ariane (demande du 14/10, comme Kaspia) ;
   - la galerie sur les colonnes 1 à 7, fixe sous la barre au bureau pendant
     tout le défilement de la colonne de droite ;
   - à droite, le nom, le prix, un menu déroulant par attribut, la quantité et
     l'ajout, le résumé (description courte mot pour mot), la réassurance,
     puis les rangées à filets empilées ; le bloc d'achat défile avec la page ;
   - les produits similaires sur la grille, le retour à la boutique sur la
     ligne du titre.
   Jetons de theme.json seulement : aucun hex. Les blocs WooCommerce prennent
   leur dessin des styles globaux ; ce fichier vise les
   classes du gabarit (t-fiche-*) et le balisage public (éléments, rôles,
   états ARIA), jamais une classe interne de WooCommerce.
   ================================================================ */

/* ----- Les marges : la fiche les pose elle-même ----- */
main.t-fiche {
  margin-block: 0;
}
main.t-fiche > *,
.t-fiche .wp-block-group > * {
  margin-block: 0;
}

/* La colonne de la fiche : les marges de la barre (gut-g, gut-d), sans le
   plafond de 1 280 px de .t-col, pour que la grille tombe sur les bords de
   l'en-tête à toute largeur. */
.t-fiche .t-col-barre {
  max-width: none;
}

/* Le texte réservé aux lecteurs d'écran (la virgule entre les lignes d'un
   nom coupé à ses tirets). */
.t-fiche .t-sr,
.wp-block-pol-galerie .t-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   1. Le premier écran
   ================================================================ */
/* En mobile, dans l'ordre du gabarit : le nom, la galerie, l'achat et le
   texte, à --t-boite l'un de l'autre. Au bureau, la galerie sur les colonnes
   1 à 7, le nom puis le reste sur les colonnes 8 à 12. */
.t-fiche .t-fiche-ecran {
  row-gap: var(--wp--preset--spacing--boite);
  padding-top: var(--wp--preset--spacing--boite);
  padding-bottom: var(--wp--preset--spacing--temps);
}
.t-fiche .t-fiche-ecran > .t-fiche-titre,
.t-fiche .t-fiche-ecran > .t-fiche-resume {
  min-width: 0;
}
/* Sous 900 px, la fiche suit la référence mobile de Ruben du 25/11 (fiche produit de
   Zara) : la galerie sous la barre, au seul écart des blocs, puis le nom, le prix collé
   au nom (--t-souffle au lieu de --t-boite), les formats et le bouton d’ajout. Le cadre de la
   galerie garde son format carré. */
@media (max-width: 899px) {
  .t-fiche .t-fiche-ecran {
    padding-top: 0;
  }
  .t-fiche .t-fiche-ecran > .wp-block-pol-galerie {
    order: 1;
  }
  .t-fiche .t-fiche-ecran > .t-fiche-titre {
    order: 2;
  }
  .t-fiche .t-fiche-ecran > .t-fiche-resume {
    order: 3;
    margin-top: calc(var(--wp--preset--spacing--souffle) - var(--wp--preset--spacing--boite));
  }
}
@media (min-width: 900px) {
  .t-fiche .t-fiche-ecran {
    row-gap: 0;
    padding-top: var(--wp--preset--spacing--pause);
  }
  .t-fiche .t-fiche-ecran > .t-fiche-titre {
    grid-column: 8 / span 5;
    grid-row: 1;
  }
  .t-fiche .t-fiche-ecran > .t-fiche-resume {
    grid-column: 8 / span 5;
    grid-row: 2;
    padding-top: var(--wp--preset--spacing--boite);
  }
  /* La galerie fixe sous la barre (collante), à --t-boite d'elle, tant que
     la colonne de droite défile. */
  .t-fiche .t-fiche-ecran > .wp-block-pol-galerie {
    position: sticky;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--nb-hauteur) + var(--wp--preset--spacing--boite));
    grid-column: 1 / span 7;
    grid-row: 1 / span 2;
    align-self: start;
  }
}

/* ----- Un packshot sur fond blanc rangé en photographie (24/11) -----
   Le blanc du fichier se fond dans l'ivoire de la page, dans la galerie et
   ses vignettes, au lieu d'un carré blanc ; une photographie n'en change
   pas à l'œil. Le cadre porte l'ivoire pour que la fusion le trouve. */
.t-fiche .wp-block-pol-galerie .t-galerie-cadre.t-mode-photo {
  background: var(--wp--preset--color--fond);
}
.t-fiche .wp-block-pol-galerie .t-galerie-cadre.t-mode-photo img {
  mix-blend-mode: multiply;
}

/* ----- Le nom et le latin ----- */
.t-fiche .t-fiche-nom {
  margin: 0;
}
.t-fiche .t-fiche-nom .t-ligne {
  display: block;
}
.t-fiche .t-fiche-titre > .t-fiche-latin {
  margin-top: var(--wp--preset--spacing--souffle);
  color: var(--wp--preset--color--noir-doux);
}

/* ----- La colonne de droite : achat, résumé, réassurance, rangées ----- */
/* --t-boite entre deux parties ; --t-temps avant les rangées. */
.t-fiche .t-fiche-resume > * + * {
  margin-top: var(--wp--preset--spacing--boite);
}
.t-fiche .t-fiche-resume > .t-fiche-rangees {
  margin-top: var(--wp--preset--spacing--temps);
}
.t-fiche .t-fiche-achat-bloc > .t-fiche-prix + * {
  margin-top: var(--wp--preset--spacing--boite);
}

/* Le prix du format choisi, à la marche de la valeur en casse courante :
   styles du bloc woocommerce/product-price (theme.json). */
.t-fiche .t-fiche-prix {
  margin: 0;
}

/* Le bloc d'achat de WooCommerce : ses parties se posent à --t-boite. */
.t-fiche .t-fiche-selecteur,
.t-fiche .t-fiche-ligne-achat {
  margin-top: var(--wp--preset--spacing--boite);
}
.t-fiche .t-fiche-selecteur,
.t-fiche .t-fiche-attribut {
  display: block;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

/* Le libellé de l'attribut (« Quantité ») : sous-titre noir-doux, styles du
   bloc (theme.json). */
.t-fiche .t-fiche-attribut-nom {
  display: block;
  margin: 0;
  padding: 0;
}

/* ----- Le menu déroulant des formats (woocommerce/dropdown) ----- */
/* Un menu par attribut : le libellé en sous-titre (styles du bloc,
   theme.json), le menu à 8 px dessous, sur toute la largeur de la colonne,
   filet noir, 44 px de haut, la lettre de navigation, le chevron du thème. */
.t-fiche .t-fiche-attribut {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.t-fiche .t-fiche-formats {
  position: relative;
  margin: 0;
}
.t-fiche .t-fiche-formats fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.t-fiche .t-fiche-formats select,
.wp-block-pol-barre-achat select {
  width: 100%;
  min-height: var(--wp--custom--cible);
  margin: 0;
  padding: 0 2.5rem 0 0.75rem;
  border: 1px solid var(--wp--preset--color--noir);
  border-radius: 0;
  background: var(--wp--preset--color--fond);
  color: var(--wp--preset--color--noir);
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--caps);
  font-weight: 700;
  line-height: var(--wp--custom--interligne--caps);
  letter-spacing: var(--wp--custom--interlettrage--caps);
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.t-fiche .t-fiche-formats select:focus-visible,
.wp-block-pol-barre-achat select:focus-visible {
  outline: 2px solid var(--wp--preset--color--noir);
  outline-offset: 3px;
}
.t-fiche .t-fiche-formats select option,
.wp-block-pol-barre-achat select option {
  background: var(--wp--preset--color--fond);
  color: var(--wp--preset--color--noir);
}
.t-fiche .t-fiche-formats::after,
.wp-block-pol-barre-achat .t-barre-achat-format::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
/* L'anneau que la barre d'achat pose 1,2 s sur le bloc d'achat. */
.t-fiche .t-signal .t-fiche-formats select {
  outline: 2px solid var(--wp--preset--color--noir);
  outline-offset: 3px;
}

/* La rangée d'achat : la quantité à filet filet-or, 44 px par case, puis
   l'ajout plein noir sur le reste de la largeur, 12 px entre eux. */
.t-fiche .t-fiche-ligne-achat {
  display: flex;
  align-items: stretch;
  gap: var(--wp--custom--fiche--achat-ecart);
}
.t-fiche .t-fiche-ligne-achat > * {
  margin: 0;
}
.t-fiche .t-fiche-quantite {
  display: flex;
  flex-shrink: 0;
  margin: 0;
}
.t-fiche .t-fiche-quantite[hidden] {
  display: none;
}

/* Ni quantité, et deux boutons (retours de Ruben du 25/11, en mobile puis au bureau :
   « chaque clic sur ajout au panier est la quantité », « rajoute les 2 boutons comme
   Zara »). La quantité ne s'affiche plus : le champ reste à 1 dans le formulaire, chaque
   ajout porte une unité. « Acheter maintenant » se tient à côté de l'ajout, les deux à
   parts égales sur la rangée, à filet noir (l'ajout reste plein) ; en mobile, les deux
   libellés se resserrent pour tenir sur la demi-largeur. */
.t-fiche .t-fiche-quantite {
  display: none;
}
.t-fiche .t-fiche-ligne-achat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.t-fiche .t-fiche-acheter {
  display: flex;
  min-height: var(--wp--custom--cible);
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (max-width: 899px) {
  .t-fiche .t-fiche-acheter,
  .t-fiche .t-fiche-ajout button,
  .t-fiche .t-fiche-ajout a {
    padding-inline: 0.25rem;
    letter-spacing: var(--wp--custom--interlettrage--h-3);
  }
}
.t-fiche .t-fiche-quantite button {
  display: inline-flex;
  width: var(--wp--custom--cible);
  min-height: var(--wp--custom--cible);
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--wp--preset--color--noir);
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--corps);
  line-height: var(--wp--custom--interligne--corps);
  opacity: 1;
  cursor: pointer;
}
.t-fiche .t-fiche-quantite button:disabled,
.t-fiche .t-fiche-quantite button[aria-disabled="true"] {
  color: var(--wp--preset--color--noir-doux);
  opacity: 1;
  cursor: not-allowed;
}
.t-fiche .t-fiche-quantite input {
  width: var(--wp--custom--fiche--quantite-champ);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--wp--preset--color--noir);
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--corps);
  font-weight: 400;
  line-height: var(--wp--custom--interligne--corps);
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.t-fiche .t-fiche-quantite input::-webkit-inner-spin-button,
.t-fiche .t-fiche-quantite input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
/* L'ajout plein noir sur le reste de la largeur (attribut width du bloc à
   100 %) : le fond, l'encre, la lettre et le survol viennent du bouton du
   thème (élément button de theme.json), la marge intérieure des styles du
   bloc (theme.json). La lettre de navigation tient son interligne par le
   conteneur, dont le bouton hérite. */
.t-fiche .t-fiche-ajout {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  margin: 0;
  line-height: var(--wp--custom--interligne--caps);
}
/* Une quantité hors bornes rend l'ajout inactif (assets/fiche-achat.js de
   pol-truffe-blocs pose aria-disabled) : filet noir, sans remplissage ni
   transparence, curseur interdit, comme la maquette. */
.t-fiche .t-fiche-ajout button[aria-disabled="true"],
.t-fiche .t-fiche-ajout a[aria-disabled="true"] {
  background: transparent;
  color: var(--wp--preset--color--noir);
  opacity: 1;
  cursor: not-allowed;
}

/* Les messages sous la rangée d'achat (bloc pol/fiche, partie « ajout »).
   Le message d'une quantité hors bornes en note noire, à --t-souffle ;
   l'avis d'ajout en corps à --t-souffle, puis « Voir le panier » en bouton à
   filet noir sur toute la largeur, à --t-souffle. */
.t-fiche .t-fiche-messages {
  margin: 0;
}
.t-fiche .t-fiche-erreur {
  margin: var(--wp--preset--spacing--souffle) 0 0;
  color: var(--wp--preset--color--noir);
}
.t-fiche .t-fiche-erreur[hidden],
.t-fiche .t-fiche-avis-ajout[hidden] {
  display: none;
}
.t-fiche .t-fiche-avis-ajout {
  margin-top: var(--wp--preset--spacing--souffle);
}
.t-fiche .t-fiche-avis-texte {
  margin: 0;
}
.t-fiche .t-fiche-voir-panier {
  display: block;
  width: 100%;
  min-height: var(--wp--custom--cible);
  margin-top: var(--wp--preset--spacing--souffle);
  text-align: center;
  cursor: pointer;
}
/* Les avis du serveur (ajout sans JavaScript), à --t-souffle quand il y en a. */
.t-fiche .t-fiche-avis-serveur {
  margin: 0;
}
.t-fiche .t-fiche-avis-serveur:has(:not(:empty)) {
  margin-top: var(--wp--preset--spacing--souffle);
}

/* ----- La réassurance ----- */
/* L'étiquette en sous-titre noir-doux, puis ses lignes en corps, sans marge
   entre elles ; --t-boite d'un bloc au suivant ; aucun filet. */
.t-fiche .t-fiche-reassurance {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--boite);
}
.t-fiche .t-fiche-reass-bloc > * {
  margin: 0;
}
.t-fiche .t-fiche-etiquette {
  color: var(--wp--preset--color--noir-doux);
}

/* ----- Les avis du restaurant, quand ils existent ----- */
.t-fiche .t-fiche-avis-liste {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--boite);
  margin-top: var(--wp--preset--spacing--souffle);
}
.t-fiche .t-fiche-avis-liste figure,
.t-fiche .t-fiche-avis-liste blockquote {
  margin: 0;
}
.t-fiche .t-fiche-avis-liste figcaption {
  margin-top: var(--wp--preset--spacing--souffle);
}

/* ----- Le résumé : la description courte mot pour mot ----- */
.t-fiche .t-fiche-resume-texte > * {
  margin: 0;
}
.t-fiche .t-fiche-resume-texte > * + * {
  margin-top: 1rem;
}

/* ================================================================
   2. Les rangées à filets
   ================================================================ */
/* Un filet or au-dessus de chaque rangée et un filet de clôture ; --t-boite
   dedans ; l'intitulé en sous-titre, le contenu à 1 rem dessous. */
.t-fiche .t-fiche-rangees {
  border-bottom: 1px solid var(--wp--preset--color--filet-or);
}
.t-fiche .t-fiche-rangee {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-block: var(--wp--preset--spacing--boite);
  border-top: 1px solid var(--wp--preset--color--filet-or);
}
.t-fiche .t-fiche-rangee > *,
.t-fiche .t-fiche-rangee-titre {
  max-width: 70ch;
  margin: 0;
}
.t-fiche .t-fiche-rangee-titre {
  color: var(--wp--preset--color--noir);
}
.t-fiche .t-fiche-rangee > p + p {
  margin-top: -0.5rem;
}

/* Les champs INCO sous la description : l'étiquette en sous-titre noir-doux,
   la valeur en corps, --t-boite d'un champ au suivant. */
.t-fiche .t-fiche-champs {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--boite);
}
.t-fiche .t-fiche-champs dt {
  color: var(--wp--preset--color--noir-doux);
}
.t-fiche .t-fiche-champs dd {
  margin: 0;
}

/* Les formats et leurs prix : une ligne par format, le format en capitales
   à gauche, le prix à droite, 28 rem au plus. */
.t-fiche .t-fiche-formats-liste {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}
.t-fiche .t-fiche-formats-liste > div {
  display: flex;
  max-width: 28rem;
  justify-content: space-between;
  gap: var(--wp--custom--grille--colonne);
}
.t-fiche .t-fiche-formats-liste dt,
.t-fiche .t-fiche-formats-liste dd {
  margin: 0;
}

/* Le renvoi des conseils vers les recettes : lien en capitales souligné. */
.t-fiche .t-fiche-renvoi a {
  display: inline-flex;
  min-height: var(--wp--custom--cible);
  align-items: center;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

/* Le texte : les paragraphes à --t-souffle l'un de l'autre, un intertitre
   à --t-boite de ce qui le précède ; une liste sans puce ni numéro. */
.t-fiche .t-fiche-texte > * {
  margin: 0;
}
.t-fiche .t-fiche-texte > * + * {
  margin-top: var(--wp--preset--spacing--souffle);
}
.t-fiche .t-fiche-texte > * + .t-fiche-intertitre {
  margin-top: var(--wp--preset--spacing--boite);
}
.t-fiche .t-fiche-liste {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--souffle);
  padding: 0;
  list-style: none;
}
.t-fiche .t-fiche-texte a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
/* La frise de saison sous le texte. */
.t-fiche .t-fiche-rangee > .wp-block-pol-saison {
  max-width: none;
}

/* ================================================================
   3. Les produits similaires
   ================================================================ */
/* Le titre en H3 et « Retour à la boutique » sur la même ligne, alignés sur
   leur ligne de base ; en mobile, le retour passe sous le titre. Puis les
   cartes de la longue page (t-boutique-grille, t-carte-*) : quatre de
   trois colonnes au bureau, deux en mobile, la gouttière de la grille entre
   elles. */
.t-fiche .t-fiche-lies-tete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--wp--custom--grille--colonne);
}
.t-fiche .t-fiche-lies-tete h2 {
  margin: 0;
}
.t-fiche .t-fiche-cartes {
  margin: var(--wp--preset--spacing--boite) 0 0;
}
.t-fiche .t-fiche-lies .t-boutique-grille {
  --t-colonnes: 2;
}
@media (min-width: 900px) {
  .t-fiche .t-fiche-lies .t-boutique-grille {
    --t-colonnes: 4;
  }
}
.t-fiche .t-fiche-cartes img {
  max-width: 100%;
}
.t-fiche .t-fiche-retour {
  margin: 0;
}
.t-fiche .t-fiche-retour a {
  display: inline-flex;
  min-height: var(--wp--custom--cible);
  align-items: center;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.4em;
}

/* Le bouton Apple Pay ou Google Pay de Stripe (accord de Ruben du 25/11), posé par
   assets/fiche-portefeuille.js du plugin. Tant qu'il n'est pas prêt, le conteneur de
   Stripe se tient hors de la vue, à la largeur d'un bouton de la rangée, pour que son
   bouton se dessine ; prêt, il prend la place d'« Acheter maintenant » dans la rangée. Le
   séparateur « ou » de Stripe ne s'affiche pas sur la fiche. */
.t-fiche .t-fiche-achat-bloc #wc-stripe-express-checkout-element:not(.t-fiche-portefeuille) {
  position: absolute !important;
  left: -10000px;
  width: 12rem;
  margin: 0 !important;
}
.t-fiche .t-fiche-portefeuille {
  display: flex !important;
  min-width: 0;
  min-height: var(--wp--custom--cible);
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--noir);
  background: var(--wp--preset--color--noir);
}
/* Retour de Ruben du 25/11 : « il faut que ça s'affiche fond noir dans le bouton que l'on
   a fait ». Le bouton de Stripe, noir (thème « dark » du réglage), se tient dans un cadre
   de nos boutons : angles droits, filet, fond noir, à la hauteur de l'ajout ; ses coins
   arrondis se fondent dans le noir du cadre. */
.t-fiche .t-fiche-portefeuille [hidden],
.t-fiche .t-fiche-acheter[hidden],
.t-fiche #wc-stripe-express-checkout-button-separator {
  display: none !important;
}
/* La feuille de Stripe donne à chaque bouton 260 px au moins et le centre : dans la
   demi-rangée, il déborderait sur l'ajout. Il prend la largeur de sa case. */
.t-fiche .t-fiche-portefeuille > div {
  flex: none;
  width: calc(100% + 16px);
  min-width: 0 !important;
  margin-inline: -8px;
}
/* Le bouton de Stripe en grande taille (55 px, réglage « large ») et 16 px plus large que
   le cadre : son filet arrondi déborde et le cadre le rogne ; reste le noir et le logo. */
