/* =========================================================================
   0. Collision de noms de classe avec WordPress
   =========================================================================
   Le site d'origine utilisait `.page` pour ses six écrans, avec
   `.page { display:none }` et `.page.active { display:block }`.

   WordPress, lui, ajoute la classe `page` au <body> de toute page statique
   (donc de la page d'accueil). La règle d'origine masquait alors le <body>
   tout entier : page blanche, alors que le balisage et les styles étaient
   bien chargés.

   On rétablit donc l'affichage du <body>. Les conteneurs du thème restent
   des <div class="page active"> et conservent le comportement d'origine.
   ====================================================================== */

body.page,
body.page.active {
  display: block;
}

/*
 * Replix — ajouts e-commerce et utilitaires.
 *
 * Le site d'origine n'avait ni panier, ni tunnel de commande, ni compte
 * client : tout ce qui suit est nouveau. Les règles réutilisent les variables
 * de main.css (--gold, --black, --cream, --g100…) pour que WooCommerce
 * ressemble au reste du site au lieu d'imposer son habillage par défaut.
 *
 * Volontairement : aucun gabarit de panier ou de commande n'est surchargé en
 * PHP. Ces fichiers changent d'une version de WooCommerce à l'autre ; les
 * habiller en CSS évite une dette de mise à jour à chaque montée de version.
 */

/* =========================================================================
   0 bis. Fil d'Ariane
   =========================================================================
   Ces règles existaient dans product.css, qui n'est chargé que sur les
   fiches produit. Or le fil d'Ariane s'affiche aussi sur la boutique, les
   catégories, le panier et la commande : il lui faut un style ici.
   ====================================================================== */

.breadcrumb {
  background: var(--cream);
  border-bottom: 1px solid var(--g100);
  padding: .75rem 0;
}

.breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .74rem;
  color: var(--g400);
  justify-content: flex-start;
  text-align: left;
  flex-wrap: wrap;
}

.breadcrumb__inner a { color: var(--g400); transition: color var(--ease); }
.breadcrumb__inner a:hover { color: var(--gold); }
.breadcrumb__sep { color: var(--g200); }
.breadcrumb__current { color: var(--black); font-weight: 600; }

/* =========================================================================
   1. Accessibilité et utilitaires
   ====================================================================== */

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  width: auto;
  height: auto;
  clip-path: none;
  margin: 0;
  padding: .75rem 1.25rem;
  background: var(--gold);
  color: var(--black);
  font-family: var(--fb);
  font-size: .85rem;
  font-weight: 700;
  border-radius: var(--r);
}

/* Visibilité du focus clavier : absente du site d'origine. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Champ piège des formulaires : hors écran, jamais affiché à un humain. */
.replix-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================================================================
   2. Lien panier de l'entête
   ====================================================================== */

.nav__actions {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-left: 1.25rem;
}

.nav__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 168, 76, .35);
  border-radius: 50%;
  color: var(--gold);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.nav__cart:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

/*
 * Le chiffre est centré par flexbox plutôt que par line-height : la pastille
 * ayant une bordure de 2px et box-sizing: border-box, un line-height égal à
 * la hauteur totale décalait le chiffre vers le bas.
 */
.nav__cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  background: var(--gold);
  color: var(--black);
  font-family: var(--fb);
  font-size: .62rem;
  font-weight: 800;
  line-height: 1;
  border-radius: 50px;
  border: 2px solid var(--black);
}

.nav__cart:hover .nav__cart-count {
  background: var(--black);
  color: var(--gold);
  border-color: var(--gold);
}

.mobile-nav__count {
  display: inline-block;
  min-width: 20px;
  padding: 0 5px;
  margin-left: .4rem;
  background: var(--gold);
  color: var(--black);
  font-size: .7rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  border-radius: 50px;
}

@media (max-width: 900px) {
  /* Le bouton Contact et le panier laissent la place au menu burger ;
     le panier reste visible, c'est le raccourci le plus utile. */
  .nav__actions .nav__cta { display: none; }
  .nav__actions { margin-left: auto; margin-right: .75rem; }
}

/* =========================================================================
   3. Grille boutique — bouton panier des cartes
   ====================================================================== */

.prod-card__visual { display: flex; }

.prod-footer .add_to_cart_button,
.prod-footer .btn-sm {
  flex-shrink: 0;
}

.prod-footer .add_to_cart_button span { white-space: nowrap; }

.prod-footer .added_to_cart {
  font-family: var(--fb);
  font-size: .7rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: underline;
}

.prod-footer__oos {
  font-family: var(--fb);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8b1a2a;
}

/* Retour visuel pendant l'ajout en AJAX. */
.add_to_cart_button.loading { opacity: .6; pointer-events: none; }
.add_to_cart_button.added::after { content: " ✓"; }

.shop-empty {
  padding: 3rem 1rem 4rem;
  text-align: center;
}
.shop-empty p { margin-bottom: 1.5rem; color: var(--g600); }

/* =========================================================================
   4. Fiche produit — stock, réassurance, ajout au panier
   ====================================================================== */

/*
 * Galerie fixe au défilement (ordinateur uniquement).
 *
 * Le carrousel et ses miniatures suivent le défilement tant qu'on parcourt
 * la colonne d'informations, puis s'arrêtent naturellement à la fin du bloc
 * produit : `position: sticky` est borné par le parent, et ce parent
 * (.product-layout) se termine avant la section « Historique Produit ».
 * Aucun script n'est nécessaire.
 */
@media (min-width: 960px) {
  .product-layout > .carousel {
    position: sticky;
    top: calc(var(--top) + var(--nav) + 1.25rem);
    align-self: start;
    max-height: calc(100vh - var(--top) - var(--nav) - 2.5rem);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .product-layout > .carousel::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .product-layout > .carousel { position: static; max-height: none; }
}

.pinfo__short {
  margin: 1.1rem 0;
  font-size: .95rem;
  line-height: 1.75;
  color: var(--g600);
}

.pinfo__stock {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 1.1rem 0 0;
  font-family: var(--fb);
  font-size: .8rem;
  font-weight: 600;
}
.pinfo__stock--in  { color: #2a7a4f; }
.pinfo__stock--low { color: #a8601f; }
.pinfo__stock--out { color: #8b1a2a; }

/* Formulaire d'ajout au panier de WooCommerce, remis au style du site. */
.pinfo__cta form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .6rem;
  margin: 0;
}

.pinfo__cta .quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--g200);
  border-radius: var(--r);
  overflow: hidden;
}

.pinfo__cta .quantity input.qty {
  width: 64px;
  height: 100%;
  padding: .7rem .4rem;
  border: 0;
  background: var(--white);
  font-family: var(--fb);
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  color: var(--black);
  -moz-appearance: textfield;
}
.pinfo__cta .quantity input.qty::-webkit-outer-spin-button,
.pinfo__cta .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Le bouton d'ajout reprend exactement l'aspect de .btn.btn-gold. */
.pinfo__cta button.single_add_to_cart_button,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce input.button.alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .82rem 1.9rem;
  font-family: var(--fb);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: var(--r);
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--black);
  transition: all var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.pinfo__cta button.single_add_to_cart_button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce input.button.alt:hover {
  background: var(--gold-dk);
  border-color: var(--gold-dk);
  color: var(--white);
  transform: translateY(-2px);
}

/* Boutons secondaires de WooCommerce (continuer mes achats, mettre à jour…). */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.5rem;
  font-family: var(--fb);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--r);
  border: 2px solid var(--black);
  background: transparent;
  color: var(--black);
  transition: all var(--ease);
  cursor: pointer;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--black);
  color: var(--white);
}

.woocommerce a.button.disabled,
.woocommerce button.button:disabled,
.woocommerce button.button.disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.pinfo__reassurance {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--g100);
  display: grid;
  gap: .85rem;
}

.pinfo__reassurance li {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  color: var(--g600);
  font-size: .82rem;
  line-height: 1.5;
}

.pinfo__reassurance svg { flex-shrink: 0; color: var(--gold); margin-top: .1rem; }
.pinfo__reassurance strong { display: block; color: var(--black); font-weight: 600; }

/* Produits liés : on réutilise la grille produit. */
.related.products > h2,
.up-sells > h2 {
  font-family: var(--ft);
  font-size: 1.75rem;
  text-align: center;
  margin: 0 0 2rem;
}

.related.products,
.up-sells {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.related.products ul.products,
.up-sells ul.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .related.products ul.products,
  .up-sells ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .related.products ul.products,
  .up-sells ul.products { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   5. Notices WooCommerce
   ====================================================================== */

.woocommerce-notices-wrapper:empty { display: none; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1.75rem;
  border-left: 3px solid var(--gold);
  background: var(--cream);
  font-family: var(--fb);
  font-size: .86rem;
  color: var(--black);
  list-style: none;
  border-radius: 0 var(--r) var(--r) 0;
}

.woocommerce-message { border-left-color: #2a7a4f; }
.woocommerce-error   { border-left-color: #8b1a2a; }
.woocommerce-error li { list-style: none; }

.woocommerce-message .button,
.woocommerce-info .button {
  margin-left: auto;
  padding: .5rem 1.1rem;
  font-size: .7rem;
}

/* =========================================================================
   6. Panier, commande, compte client
   ====================================================================== */

.woo-page {
  max-width: 1000px;
  margin: 0 auto;
}

.woo-page .woocommerce { font-family: var(--fb); }

/* Tableaux (panier, commandes, téléchargements). */
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--g100);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 2rem;
  font-size: .88rem;
}

.woocommerce table.shop_table th {
  padding: 1rem;
  background: var(--cream);
  font-family: var(--fb);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--g600);
  text-align: left;
}

.woocommerce table.shop_table td {
  padding: 1.1rem 1rem;
  border-top: 1px solid var(--g100);
  vertical-align: middle;
}

.woocommerce table.shop_table img { width: 68px; height: auto; border-radius: var(--r); }

.woocommerce table.shop_table .product-name a {
  font-weight: 600;
  color: var(--black);
}
.woocommerce table.shop_table .product-name a:hover { color: var(--gold); }

.woocommerce table.shop_table .amount { font-weight: 600; color: var(--black); }

.woocommerce a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--g100);
  color: var(--g600) !important;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}
.woocommerce a.remove:hover { background: #8b1a2a; color: #fff !important; }

.woocommerce .quantity input.qty {
  width: 64px;
  padding: .55rem .4rem;
  border: 1px solid var(--g200);
  border-radius: var(--r);
  font-family: var(--fb);
  font-weight: 600;
  text-align: center;
}

/* Totaux du panier. */
.woocommerce .cart-collaterals .cart_totals {
  padding: 1.75rem;
  background: var(--cream);
  border-radius: var(--rl);
}

.woocommerce .cart_totals h2 {
  font-family: var(--ft);
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.woocommerce .cart_totals table.shop_table {
  border: 0;
  background: transparent;
  margin-bottom: 1.25rem;
}
.woocommerce .cart_totals table.shop_table th,
.woocommerce .cart_totals table.shop_table td {
  background: transparent;
  padding: .7rem 0;
  border-top: 1px solid var(--g200);
  text-transform: none;
  letter-spacing: 0;
  font-size: .88rem;
}
.woocommerce .cart_totals .order-total td { font-size: 1.1rem; }

.woocommerce .wc-proceed-to-checkout { padding: 0; }
.woocommerce .wc-proceed-to-checkout .button { width: 100%; }

/* Formulaires de commande et de compte. */
.woocommerce form .form-row {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1.1rem;
  padding: 0;
}

.woocommerce form .form-row label {
  font-family: var(--fb);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--g600);
}

.woocommerce form .form-row .required { color: #8b1a2a; text-decoration: none; }

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single {
  width: 100%;
  padding: .8rem .95rem;
  border: 1px solid var(--g200);
  border-radius: var(--r);
  background: var(--white);
  font-family: var(--fb);
  font-size: .9rem;
  color: var(--black);
  transition: border-color var(--ease);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--gold);
  outline: none;
}

.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: #8b1a2a; }
.woocommerce form .form-row.woocommerce-validated input.input-text { border-color: #2a7a4f; }

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
  width: 100%;
  float: none;
}

@media (min-width: 640px) {
  /*
   * Deux champs par ligne (Prénom / Nom, Code postal / Ville).
   * Les largeurs tiennent compte de la gouttière de 1rem ET de l'espace
   * inline entre deux éléments inline-flex : sans cette marge, le total
   * dépasse 100 % et le second champ repasse à la ligne.
   */
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    display: inline-flex;
    width: calc(50% - .75rem);
    vertical-align: top;
  }
  .woocommerce form .form-row-first { margin-right: 1rem; }
}

.woocommerce-checkout h3,
.woocommerce-account h2,
.woocommerce-checkout #order_review_heading {
  font-family: var(--ft);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--g100);
}

#order_review,
.woocommerce-checkout-review-order {
  padding: 1.75rem;
  background: var(--cream);
  border-radius: var(--rl);
}

.woocommerce-checkout-payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--g200);
}

.woocommerce-checkout-payment ul.payment_methods li {
  padding: .85rem 0;
  border-top: 1px solid var(--g200);
  font-size: .9rem;
}
.woocommerce-checkout-payment ul.payment_methods li:first-child { border-top: 0; }
.woocommerce-checkout-payment ul.payment_methods label { font-weight: 600; cursor: pointer; }
.woocommerce-checkout-payment ul.payment_methods img { max-height: 24px; width: auto; margin-left: .5rem; vertical-align: middle; }

.woocommerce-checkout-payment .payment_box {
  padding: .9rem 1rem;
  margin-top: .5rem;
  background: var(--white);
  border-radius: var(--r);
  font-size: .82rem;
  color: var(--g600);
}

.woocommerce-checkout-payment #place_order { width: 100%; margin-top: 1.25rem; }

.replix-checkout-notice {
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: .85rem;
  line-height: 1.6;
}
.replix-checkout-notice strong { color: var(--black); }

/* Choix du mode de livraison : retrait / expédition. */
#shipping_method {
  list-style: none;
  padding: 0;
  margin: 0;
}
#shipping_method li { padding: .3rem 0; }
#shipping_method label { font-weight: 500; cursor: pointer; }

/* Mon compte. */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: inline-block;
  padding: .5rem 1.15rem;
  border: 1px solid var(--g200);
  border-radius: 50px;
  font-family: var(--fb);
  font-size: .77rem;
  font-weight: 600;
  color: var(--g400);
  transition: all var(--ease);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

/* Confirmation de commande. */
.woocommerce-order ul.woocommerce-order-overview {
  list-style: none;
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  margin: 0 0 2rem;
  background: var(--cream);
  border-radius: var(--rl);
}

@media (min-width: 720px) {
  .woocommerce-order ul.woocommerce-order-overview { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

.woocommerce-order ul.woocommerce-order-overview li {
  font-family: var(--fb);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--g600);
}

.woocommerce-order ul.woocommerce-order-overview li strong {
  display: block;
  margin-top: .35rem;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--black);
}

/* -------------------------------------------------------------------------
   Panier et commande sur téléphone
   -------------------------------------------------------------------------
   Un tableau de panier à six colonnes déborde largement d'un écran de
   375 px. WooCommerce place un attribut data-title sur chaque cellule : on
   s'en sert pour empiler les lignes en fiches lisibles, intitulé à gauche et
   valeur à droite, sans défilement horizontal.
   ---------------------------------------------------------------------- */

@media (max-width: 767px) {
  .woocommerce table.shop_table,
  .woocommerce table.shop_table tbody,
  .woocommerce table.shop_table tr,
  .woocommerce table.shop_table td {
    display: block;
    width: 100%;
  }

  .woocommerce table.shop_table thead { display: none; }

  .woocommerce table.shop_table tr {
    position: relative;
    padding: 1rem 1rem .5rem;
    border-top: 1px solid var(--g100);
  }
  .woocommerce table.shop_table tr:first-child { border-top: 0; }

  .woocommerce table.shop_table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .4rem 0;
    border: 0;
    text-align: right;
  }

  .woocommerce table.shop_table td::before {
    content: attr(data-title);
    flex-shrink: 0;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--g400);
    text-align: left;
  }

  /* La vignette et le bouton de suppression n'ont pas d'intitulé utile. */
  .woocommerce table.shop_table td.product-thumbnail,
  .woocommerce table.shop_table td.product-remove {
    display: block;
    padding: 0;
  }
  .woocommerce table.shop_table td.product-thumbnail::before,
  .woocommerce table.shop_table td.product-remove::before { content: none; }

  .woocommerce table.shop_table td.product-thumbnail img { width: 84px; }

  .woocommerce table.shop_table td.product-remove {
    position: absolute;
    top: .8rem;
    right: .8rem;
  }

  .woocommerce table.shop_table td.product-name { text-align: left; }

  /* Les totaux gardent un rendu en deux colonnes, plus lisible ici. */
  .woocommerce .cart_totals table.shop_table tr {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
  }
  .woocommerce .cart_totals table.shop_table th {
    display: block;
    width: auto;
    padding: 0;
    background: transparent;
    text-align: left;
  }
  .woocommerce .cart_totals table.shop_table td {
    display: block;
    width: auto;
    padding: 0;
    text-align: right;
  }
  .woocommerce .cart_totals table.shop_table td::before { content: none; }

  /* Les modes de livraison restent alignés à gauche : une liste de choix
     ferrée à droite se lit mal. */
  .woocommerce .cart_totals #shipping_method,
  .woocommerce .cart_totals #shipping_method li,
  .woocommerce .cart_totals #shipping_method label { text-align: left; }

  .woocommerce .cart-collaterals .cart_totals,
  #order_review,
  .woocommerce-checkout-review-order {
    padding: 1.1rem;
  }

  /* Les actions du panier passent en pleine largeur. */
  .woocommerce .actions .button,
  .woocommerce .wc-proceed-to-checkout .button {
    width: 100%;
    margin-bottom: .6rem;
  }

  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error {
    flex-direction: column;
    align-items: flex-start;
  }
  .woocommerce-message .button,
  .woocommerce-info .button { margin-left: 0; }

  .pinfo__cta form.cart { width: 100%; }
  .pinfo__cta button.single_add_to_cart_button { flex: 1; }
}

/* =========================================================================
   7. Contenus légaux et pages éditoriales
   ====================================================================== */

.legal-content {
  max-width: 820px;
  margin: 0 auto;
}

.legal-content h2 {
  font-family: var(--ft);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}

.legal-content h3 {
  font-family: var(--ft);
  font-size: 1.2rem;
  margin: 2rem 0 .75rem;
}

.legal-content p,
.legal-content li {
  font-size: .94rem;
  line-height: 1.8;
  color: var(--g600);
}

.legal-content ul,
.legal-content ol { margin: 0 0 1.25rem 1.25rem; }
.legal-content li { margin-bottom: .45rem; }
.legal-content a { color: var(--gold-dk); text-decoration: underline; }

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .88rem;
}
.legal-content th,
.legal-content td {
  padding: .7rem .85rem;
  border: 1px solid var(--g100);
  text-align: left;
}
.legal-content th { background: var(--cream); font-weight: 700; }

.legal-updated {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--g100);
  font-size: .8rem;
  color: var(--g400);
  font-style: italic;
}

.page-intro {
  margin-bottom: 2rem;
  font-size: .95rem;
  line-height: 1.8;
  color: var(--g600);
}

/* =========================================================================
   8. Blog — navigation entre articles
   ====================================================================== */

.article-nav {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--g100);
}

@media (min-width: 720px) {
  .article-nav { grid-template-columns: 1fr 1fr; }
  .article-nav__item--next { text-align: right; }
}

.article-nav__item {
  display: block;
  padding: 1.1rem 1.25rem;
  background: var(--cream);
  border-radius: var(--rl);
  transition: background var(--ease);
}
.article-nav__item:hover { background: var(--g100); }

.article-nav__label {
  display: block;
  font-family: var(--fb);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: .35rem;
}

.article-nav__title {
  display: block;
  font-family: var(--ft);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
}

/* =========================================================================
   9. Recherche et carte au clic
   ====================================================================== */

.replix-search {
  display: flex;
  gap: .6rem;
}
.replix-search .fi {
  flex: 1;
  padding: .8rem .95rem;
  border: 1px solid var(--g200);
  border-radius: var(--r);
  font-family: var(--fb);
  font-size: .9rem;
}
.replix-search .fi:focus { border-color: var(--gold); outline: none; }

.map-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 220px;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: 8px;
  text-align: center;
}

.map-embed__note {
  margin: 0;
  font-size: .72rem;
  line-height: 1.5;
  color: var(--g400);
  max-width: 30ch;
}

/* =========================================================================
   10. Formulaires du thème — message d'erreur d'envoi
   ====================================================================== */

.form-send-error {
  margin-top: .75rem;
  font-size: .9rem;
  font-weight: 500;
  color: #c0392b;
}

/* =========================================================================
   11. Pagination
   ====================================================================== */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: 3rem;
}

.pagination .page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .65rem;
  border: 1px solid var(--g200);
  border-radius: var(--r);
  font-family: var(--fb);
  font-size: .82rem;
  font-weight: 600;
  color: var(--g600);
  background: transparent;
  transition: all var(--ease);
}

.pagination .page-btn:hover,
.pagination .page-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

.pagination .page-btn.dots {
  border-color: transparent;
  pointer-events: none;
}


/*
 * Récapitulatif du panier et de la commande : WooCommerce le rend « collant »
 * au défilement, calé à 24 px du haut de la fenêtre. Or la barre de contact
 * et le menu sont fixes et occupent déjà les 104 premiers pixels : le haut du
 * bloc — son titre et son premier article — passait dessous.
 *
 * On recale donc l'accroche sous l'en-tête. La hauteur maximale évite qu'un
 * panier de plusieurs pièces dépasse de l'écran sans pouvoir être déroulé.
 */
.wc-block-checkout__sidebar.is-sticky,
.wc-block-cart__sidebar.is-sticky {
  top: calc(var(--top) + var(--nav) + 1.5rem);
  max-height: calc(100vh - var(--top) - var(--nav) - 3rem);
  overflow-y: auto;
  scrollbar-width: thin;
}
