/* ============================================================
   SITE V2 — étape 2 : boutons et liens
   Chargée par _partials/site-v2.tpl (jamais sur le tunnel de commande).
   Les boutons et liens du thème prennent l'apparence de ceux de l'accueil
   (.home-v2__btn de home-v2.css) : terracotta plein ou contour sable,
   Karla grasse en petites capitales espacées, rayon de 2 px, sans ombre.
   Le jaune #FFC600 du thème disparaît des boutons.

   Spécificité : chaque règle reprend le sélecteur du thème (spécificité égale,
   cette feuille chargée après l'emporte). Les exclusions passent par
   :not(:where(…)), qui ne compte pas dans la spécificité :
   - .home-v2 *  : l'accueil garde ses propres boutons et liens (home-v2.css) ;
   - #header *   : header déjà restylé (header-v2.css) ;
   - .btn-product : icônes favoris / comparer / panier des cartes produits
                    (étape « listes » ; le panier des cartes est repris plus bas).
   ============================================================ */


/* ============================================================
   BOUTON PLEIN (terracotta)
   Le thème l'emploie sous trois noms :
   - .btn-primary  : connexion, inscription, contact, connexion rapide, panier de la fiche ;
   - .btn-outline  : malgré son nom, c'est l'appel principal jaune du thème
                     (« Commander » du panier, « Filtre », « Tous les produits »,
                     nouveau mot de passe) ;
   - .btn-inverse  : variante jaune du thème.
   ============================================================ */

:is(.btn-primary, .btn-outline, .btn-inverse):not(:where(.btn-product, .home-v2 *, #header *)) {
  padding: 14px 22px;
  border: 1px solid #B05315;
  border-radius: 2px;
  background: #B05315;
  color: #FFF8F0;
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* theme.css : .btn-outline { border-radius: 50px !important } (pilule) —
   seul un !important peut la ramener au rayon de l'accueil */
.btn-outline:not(:where(.btn-product, .home-v2 *, #header *)) {
  border-radius: 2px !important;
}

/* Survol, focus, appui (thème : bleu #0e6ce4 ou jaune inchangé) */
:is(.btn-primary, .btn-outline, .btn-inverse):not(:where(.btn-product, .home-v2 *, #header *)):is(:hover, :focus, :active, .active) {
  border-color: #8F4210;
  background: #8F4210;
  color: #FFF8F0;
  text-decoration: none;
}

/* Bootstrap : .btn-primary:active:hover, .btn-primary.active:focus… (3 classes) */
:is(.btn-primary, .btn-outline, .btn-inverse):not(:where(.btn-product, .home-v2 *, #header *)):is(:active, .active):is(:hover, :focus) {
  border-color: #8F4210;
  background: #8F4210;
  color: #FFF8F0;
}

/* Icônes Material dans les boutons : couleur du texte */
:is(.btn-primary, .btn-outline, .btn-inverse):not(:where(.btn-product, .home-v2 *, #header *)) .material-icons {
  color: inherit;
}


/* ============================================================
   BOUTON SECONDAIRE (contour sable, comme .home-v2__btn--ghost)
   .btn-secondary : « OK » des filtres en mobile, « Fermer » de la connexion rapide,
   « Continuer mes achats » ; .btn-default : bouton du thème sans couleur propre ;
   .btn-tertiary : petit bouton PrestaShop (garde sa taille et sa casse).
   ============================================================ */

:is(.btn-secondary, .btn-default):not(:where(.btn-product, .home-v2 *, #header *)) {
  padding: 14px 22px;
  border: 1px solid #C0AC92;
  border-radius: 2px;
  background: transparent;
  color: #332720;
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-tertiary:not(:where(.btn-product, .home-v2 *, #header *)) {
  border: 1px solid #C0AC92;
  border-radius: 2px;
  background: transparent;
  color: #332720;
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  box-shadow: none;
}

:is(.btn-secondary, .btn-default, .btn-tertiary):not(:where(.btn-product, .home-v2 *, #header *)):is(:hover, :focus, :active, .active) {
  border-color: #B05315;
  background: transparent;
  color: #A1480F;
  text-decoration: none;
  box-shadow: none;
}

:is(.btn-secondary, .btn-default, .btn-tertiary):not(:where(.btn-product, .home-v2 *, #header *)):is(:active, .active):is(:hover, :focus) {
  border-color: #B05315;
  background: transparent;
  color: #A1480F;
}

:is(.btn-secondary, .btn-default, .btn-tertiary):not(:where(.btn-product, .home-v2 *, #header *)) .material-icons {
  color: inherit;
}


/* ============================================================
   BOUTON DÉSACTIVÉ
   Thème : gris #acaaa6 à 65 % d'opacité (texte blanc illisible, 2,2:1).
   Sable foncé et texte brun, opaques (4,9:1) : on lit ce qui n'est pas encore possible.
   ============================================================ */

:is(.btn-primary, .btn-outline, .btn-inverse, .btn-secondary, .btn-default):not(:where(.btn-product, .home-v2 *, #header *)):is(.disabled, :disabled),
:is(.btn-primary, .btn-outline, .btn-inverse, .btn-secondary, .btn-default):not(:where(.btn-product, .home-v2 *, #header *)):is(.disabled, :disabled):is(:hover, :focus) {
  border-color: #EADFCB;
  background: #EADFCB;
  color: #6B5B4E;
  opacity: 1;
  cursor: not-allowed;
}


/* ============================================================
   BOUTONS « AJOUTER AU PANIER »
   ============================================================ */

/* Fiche produit (thème : pilule jaune, texte noir, blanc au survol).
   Garde sa largeur et sa disposition (flex) ; seule l'apparence change. */
.product-actions .product-add-to-cart .add .add-to-cart {
  min-height: 52px;
  padding: 16px 24px;
  border: 1px solid #B05315;
  border-radius: 2px;
  background-color: #B05315;
  color: #FFF8F0;
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  align-items: center;
}

.product-actions .product-add-to-cart .add .add-to-cart:is(:hover, :focus) {
  border-color: #8F4210;
  background-color: #8F4210;
  color: #FFF8F0;
}

/* Hors stock ou déclinaison indisponible : PrestaShop pose disabled */
.product-actions .product-add-to-cart .add .add-to-cart:disabled,
.product-actions .product-add-to-cart .add .add-to-cart:disabled:is(:hover, :focus) {
  border-color: #EADFCB;
  background-color: #EADFCB;
  color: #6B5B4E;
  opacity: 1;
}

/* Cartes produits, liste par défaut de leofeature (thème : pilule jaune, texte noir).
   La section « Nos produits phares » de l'accueil n'est pas concernée : ses cartes
   n'ont pas de .thumbnail-container (home-v2.css, .home-v2__pick-buy). */
.leo-plist-style-default .thumbnail-container .product-meta .button-container .leo-bt-cart {
  padding: 13px 22px;
  border: 1px solid #B05315;
  border-radius: 2px;
  background-color: #B05315;
  color: #FFF8F0;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.leo-plist-style-default .thumbnail-container .product-meta .button-container .leo-bt-cart:is(:hover, :focus) {
  border-color: #8F4210;
  background-color: #8F4210;
  color: #FFF8F0;
}

.leo-plist-style-default .thumbnail-container .product-meta .button-container .leo-bt-cart .leo-bt-cart-content .name-btn-product {
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.leo-plist-style-default .thumbnail-container .product-meta .button-container .leo-bt-cart .leo-bt-cart-content i {
  color: inherit;
}

/* Fenêtre « Produit ajouté au panier » : « Commander » (jaune, noir au survol)
   et « Continuer mes achats » (gris, noir au survol) */
#blockcart-modal .cart-content .cart-content-btn a {
  border-color: #B05315;
  background-color: #B05315;
  color: #FFF8F0;
}

#blockcart-modal .cart-content .cart-content-btn a:hover {
  border-color: #8F4210;
  background-color: #8F4210;
  color: #FFF8F0;
}

#blockcart-modal .cart-content .cart-content-btn button {
  border-color: #C0AC92;
  background-color: transparent;
  color: #332720;
}

#blockcart-modal .cart-content .cart-content-btn button:hover {
  border-color: #B05315;
  background-color: transparent;
  color: #A1480F;
}

/* Bloc d'abonnement de la fiche produit (custom.css : jaune, texte noir) */
#subscription_products .btn-primary {
  border-color: #B05315;
  border-radius: 2px;
  background-color: #B05315;
  color: #FFF8F0;
}

#subscription_products .btn-primary:hover {
  border-color: #8F4210;
  background-color: #8F4210;
}


/* ============================================================
   AUTRES BOUTONS JAUNES DU THÈME
   ============================================================ */

/* Formulaire de contact : bouton « Envoyer » (thème : .contact-form .form-footer input, jaune).
   Désactivé tant que la case de consentement n'est pas cochée : même état
   désactivé que les autres boutons (le sélecteur du thème est plus fort que le commun). */
.contact-form .form-footer input[type=submit] {
  background-color: #B05315;
}

.contact-form .form-footer input[type=submit]:is(:hover, :focus) {
  background-color: #8F4210;
}

.contact-form .form-footer input[type=submit]:disabled,
.contact-form .form-footer input[type=submit]:disabled:is(:hover, :focus) {
  border-color: #EADFCB;
  background-color: #EADFCB;
  color: #6B5B4E;
  opacity: 1;
}

/* Recherche du contenu (page introuvable…) et newsletter du thème :
   pilules jaunes, texte noir. Header exclu (header-v2.css). */
:is(.search-widget, .block_newsletter) form button[type=submit]:not(:where(#header *)) {
  border: 1px solid #B05315;
  border-radius: 2px;
  background: #B05315;
  color: #FFF8F0;
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

:is(.search-widget, .block_newsletter) form button[type=submit]:not(:where(#header *)) .material-icons {
  color: inherit;
}

:is(.search-widget, .block_newsletter) form button[type=submit]:not(:where(#header *)):is(:hover, :focus),
.block_newsletter form .btn:hover {
  border-color: #8F4210;
  background: #8F4210;
  color: #FFF8F0;
}

/* Fenêtre newsletter (popnewsletter) : couleurs et police écrites en style="" dans
   le module (fond noir, Arial) — seul un !important passe devant un style en ligne.
   La largeur (70 %) reste celle du module. */
#popnewsletter_submit {
  border: 1px solid #B05315 !important;
  border-radius: 2px !important;
  background-color: #B05315 !important;
  color: #FFF8F0 !important;
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#popnewsletter_submit:is(:hover, :focus) {
  border-color: #8F4210 !important;
  background-color: #8F4210 !important;
}

/* Avis produits (leofeature) : bouton jaune, gris au survol */
.leo-modal-review .btn {
  border-color: #B05315;
  border-radius: 2px;
  background-color: #B05315;
  color: #FFF8F0;
}

.leo-modal-review .btn:hover {
  border-color: #8F4210;
  background-color: #8F4210;
  color: #FFF8F0;
}

/* Liste d'envies (leofeature) : « Déplacer vers » jaune */
.wishlist-product-action .leo-wishlist-button-dropdown .move-wishlist-item {
  background: #B05315;
  color: #FFF8F0;
}

/* Retour en haut de page (thème : carré jaune, gris très foncé au survol) */
#back-top a {
  border-radius: 2px;
  background: #B05315;
  color: #FFF8F0;
}

#back-top a:hover {
  background-color: #8F4210;
  color: #FFF8F0;
}

/* Pied de page : « Commencer » (accompagnement), pilule blanche à flèche jaune.
   Le pied de page est sombre : bouton terracotta plein, flèche couleur du texte. */
.box14-h1 .desc-footer .sign-up {
  border: 1px solid #B05315;
  border-radius: 2px;
  padding: 14px 22px;
  background-color: #B05315;
  color: #FFF8F0;
  font-family: "Karla", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.box14-h1 .desc-footer .sign-up:is(:hover, :focus) {
  border-color: #8F4210;
  background-color: #8F4210;
  color: #FFF8F0;
}

.box14-h1 .desc-footer .sign-up::after { color: inherit; }


/* ============================================================
   LIENS TEXTE
   Thème : noir, jaune #FFC600 au survol et au focus (illisible sur fond clair, 1,6:1).
   Liens de navigation (listes, fil d'Ariane…) : encre, terracotta au survol.
   Liens dans un paragraphe : terracotta souligné (repérables sans la couleur).
   ============================================================ */

a:not(:where(.home-v2 *, #header *)) {
  color: #332720;
}

a:not(:where(.home-v2 *, #header *)):is(:hover, :focus) {
  color: #A1480F;
  text-decoration: none;
}

/* Liens dans le texte courant (pied de page sombre exclu : traité plus bas).
   Terracotta texte : 6,1:1 sur blanc, 5,7:1 sur crème. */
:is(p, .forgot-password, .no-account) a:not(:where(.btn, .home-v2 *, #header *, .footer-container *)) {
  color: #A1480F;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(161, 72, 15, 0.45);
}

:is(p, .forgot-password, .no-account) a:not(:where(.btn, .home-v2 *, #header *, .footer-container *)):is(:hover, :focus) {
  color: #8F4210;
  text-decoration-color: currentColor;
}

/* Pied de page (fond sombre) : survol en terracotta clair au lieu du jaune */
.footer-container li a:hover,
.box13-h1 .sv-col .sv-content .sv-text p a:hover,
.footer-copy-right .copy-left a:hover {
  color: #E9B48A;
}

/* Téléphone du pied de page : en jaune dans le thème */
.box13-h1 .sv-phone .block_content p a {
  color: #E9B48A;
}

.box13-h1 .sv-phone .block_content p a:hover { color: #FFF8F0; }


/* ============================================================
   FOCUS CLAVIER
   Le thème supprime le contour (a:focus, button:focus { outline: none }) et,
   sur .btn, avec !important (.btn:focus { outline: none !important }) :
   le contour des .btn ne peut revenir qu'avec !important.
   Accueil et header exclus : ils ont leur propre contour.
   ============================================================ */

:is(a, button, input[type=submit], input[type=button], [role=button]):not(:where(.home-v2 *, #header *)):focus-visible {
  outline: 2px solid #B05315;
  outline-offset: 3px;
}

.btn:not(:where(.home-v2 *, #header *)):focus-visible {
  outline: 2px solid #B05315 !important;
  outline-offset: 3px;
}

/* Pied de page sombre : contour clair */
.footer-container :is(a, button):focus-visible {
  outline-color: #FFF8F0;
}


/* ============================================================
   ANIMATIONS RÉDUITES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  :is(.btn-primary, .btn-outline, .btn-inverse, .btn-secondary, .btn-default):not(:where(.btn-product, .home-v2 *, #header *)),
  .leo-plist-style-default .thumbnail-container .product-meta .button-container .leo-bt-cart,
  :is(.search-widget, .block_newsletter) form button[type=submit],
  .box14-h1 .desc-footer .sign-up {
    transition: none;
  }
}
