/* ============================================================
   TARTEAUCITRON — SKIN MAISON (dev auto-hébergé + live hébergé)
   Les deux versions rendent le MÊME DOM (mêmes ids/classes) → une
   seule feuille pour les deux environnements.

   Design validé :
   - Mobile : bottom-sheet ≥ 50% de l'écran (assez présent pour
     provoquer un choix), desktop : carte en bas à droite.
   - « Tout accepter » = bouton principal rose + checkmark SVG.
   - « Personnaliser » = bouton secondaire, AU-DESSUS d'accepter.
   - Refus = lien souligné en HAUT À GAUCHE, relabellisé en
     « Continuer sans accepter » (remplacement via ::after).
   - Croix de fermeture masquée (le refus explicite la remplace).

   IMPORTANT — ne JAMAIS forcer `display` sur #tarteaucitronAlertBig :
   le moteur pilote l'affichage en inline style ; un display !important
   rendrait la bannière impossible à fermer (bug déjà vécu). On ne
   s'applique que quand le moteur l'affiche, via [style*="display: block"].
   ============================================================ */

/* ── Box-sizing : le CSS du moteur est en content-box → nos boutons en
   width:100% + padding DÉBORDAIENT du conteneur. border-box partout. ── */
#tarteaucitronRoot #tarteaucitronAlertBig,
#tarteaucitronRoot #tarteaucitronAlertBig * {
  box-sizing: border-box !important;
}

/* ── Conteneur : layout colonne, uniquement quand le moteur l'affiche ── */
#tarteaucitronRoot #tarteaucitronAlertBig[style*="display: block"],
#tarteaucitronRoot #tarteaucitronAlertBig[style*="display:block"] {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  background: #fff !important;
  color: #1f2937 !important;
  text-align: left !important;
  padding: 20px 20px 24px !important;
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.25) !important;
  z-index: 2147483600 !important;
  max-height: 85vh !important; /* texte long → jamais plus grand que l'écran */
  overflow-y: auto !important;
}

/* Mobile : bottom-sheet pleine largeur, ≥ 50% de l'écran */
@media screen and (max-width: 767px) {
  #tarteaucitronRoot #tarteaucitronAlertBig[style*="display: block"],
  #tarteaucitronRoot #tarteaucitronAlertBig[style*="display:block"] {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    min-height: 55vh !important;
    border-radius: 20px 20px 0 0 !important;
  }
}

/* Tablette (768-1023) : carte en bas à droite, un peu plus compacte */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  #tarteaucitronRoot #tarteaucitronAlertBig[style*="display: block"],
  #tarteaucitronRoot #tarteaucitronAlertBig[style*="display:block"] {
    position: fixed !important;
    left: auto !important;
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    width: 460px !important;
    max-width: calc(100vw - 40px) !important;
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    padding: 22px 22px 24px !important;
  }
}

/* Desktop (≥1024) : carte en bas à droite */
@media screen and (min-width: 1024px) {
  #tarteaucitronRoot #tarteaucitronAlertBig[style*="display: block"],
  #tarteaucitronRoot #tarteaucitronAlertBig[style*="display:block"] {
    position: fixed !important;
    left: auto !important;
    right: 24px !important;
    bottom: 24px !important;
    top: auto !important;
    width: 480px !important;
    max-width: calc(100vw - 48px) !important;
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    padding: 24px 24px 26px !important;
  }

  /* Sur grand écran le texte long reste lisible sans carte géante */
  #tarteaucitronRoot #tarteaucitronDisclaimerAlert {
    font-size: 14px !important;
  }
}

/* ── 1. Refus : lien souligné en haut à gauche, « Continuer sans accepter » ── */
#tarteaucitronRoot #tarteaucitronAllDenied2 {
  order: 1 !important;
  align-self: flex-start !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  font-size: 0 !important; /* masque le libellé d'origine (« Tout refuser ») */
  color: #6b7280 !important;
  cursor: pointer !important;
}

#tarteaucitronRoot #tarteaucitronAllDenied2::after {
  content: "Continuer sans accepter";
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#tarteaucitronRoot #tarteaucitronAllDenied2:hover::after {
  color: #1f2937;
}

#tarteaucitronRoot #tarteaucitronAllDenied2 .tarteaucitronCross {
  display: none !important;
}

/* ── 2. Texte d'information ── */
#tarteaucitronRoot #tarteaucitronDisclaimerAlert {
  order: 2 !important;
  flex: 1 1 auto !important;
  display: block !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: #1f2937 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── 3. « Personnaliser » : bouton secondaire, AU-DESSUS d'accepter ── */
#tarteaucitronRoot #tarteaucitronCloseAlert {
  order: 3 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  background: #fff !important;
  color: #e62ca1 !important;
  border: 2px solid #e62ca1 !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-align: center !important;
  cursor: pointer !important;
}

#tarteaucitronRoot #tarteaucitronCloseAlert:hover {
  background: #fff5fb !important;
  color: #c91f8a !important;
  border-color: #c91f8a !important;
}

/* ── 4. « Tout accepter » : bouton principal rose + checkmark SVG ── */
#tarteaucitronRoot #tarteaucitronPersonalize2 {
  order: 4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 16px 18px !important;
  background: #e62ca1 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-align: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(230, 44, 161, 0.35) !important;
}

#tarteaucitronRoot #tarteaucitronPersonalize2:hover {
  background: #c91f8a !important;
}

/* Le moteur injecte un caractère ☐ (case vide, \2610) en ::before sur la
   coche → c'était le « rectangle » visible à côté de notre SVG. On le retire. */
#tarteaucitronRoot #tarteaucitronPersonalize2 .tarteaucitronCheck::before,
#tarteaucitronRoot #tarteaucitronPersonalize2 .tarteaucitronCheck::after {
  content: none !important;
  display: none !important;
}

/* Checkmark SVG blanc à gauche (remplace la coche par défaut du moteur) */
#tarteaucitronRoot #tarteaucitronPersonalize2 .tarteaucitronCheck {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  border: none !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  flex-shrink: 0 !important;
}

/* ── 5. Politique de confidentialité : petit lien discret ── */
#tarteaucitronRoot #tarteaucitronPrivacyUrl {
  order: 5 !important;
  align-self: center !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  font-size: 12px !important;
  color: #9ca3af !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  cursor: pointer !important;
}

/* ── 6. Croix de fermeture masquée : le choix passe par les 3 options ── */
#tarteaucitronRoot #tarteaucitronCloseCross {
  display: none !important;
}

/* ============================================================
   ICÔNE DE RÉOUVERTURE (petit macaron cookie)
   Sur mobile il chevauchait la sticky bar « Ajouter au panier »
   des fiches produit → on le remonte au-dessus.
   ============================================================ */
/* Icône TOUJOURS à droite (quel que soit le réglage moteur/dashboard) —
   c'est ICI que se gère sa position horizontale */
#tarteaucitronRoot #tarteaucitronIcon {
  left: auto !important;
  right: 16px !important;
}

@media screen and (max-width: 991px) {
  /* Fiches produit : au-dessus de la sticky bar (plus haute depuis l'ajout
     du bandeau de réassurance ; ~165px produit simple, ~220px avec variantes) */
  .single-product #tarteaucitronRoot #tarteaucitronIcon {
    bottom: 162px !important;
  }

  /* Autres pages : léger décalage pour ne pas coller au bord */
  body:not(.single-product) #tarteaucitronRoot #tarteaucitronIcon {
    bottom: 10px !important;
  }
}

/* ============================================================
   ICÔNE FLOTTANTE MASQUÉE — remplacée par un lien dans le footer
   (voir pdc_tarteaucitron_footer_link dans functions.php).
   L'icône jaune se superposait au contenu sur toutes les pages, en
   particulier au-dessus de la sticky bar produit et du checkout.
   ============================================================ */
#tarteaucitronIcon,
#tarteaucitronRoot #tarteaucitronIcon {
  display: none !important;
}

/* Le lien du footer : même apparence que les autres liens légaux */
.pdc-tac-link a,
a#tarteaucitronManager {
  cursor: pointer;
}

/* Surcharge renforcée : tarteaucitron injecte ses styles dans un <style> du
   <head> À L'EXÉCUTION, donc APRÈS les feuilles du thème. À importance et
   spécificité égales, c'est lui qui gagnait. On préfixe par html body pour
   l'emporter, et on couvre les différents noms selon les versions / le mode
   (auto-hébergé en dev, CDN tarteaucitron.io en prod). */
html body #tarteaucitronIcon,
html body #tarteaucitronRoot #tarteaucitronIcon,
html body #tarteaucitronManagerIcon,
html body .tarteaucitronIconBottomRight,
html body .tarteaucitronIconBottomLeft,
html body .tarteaucitronIconTopRight,
html body .tarteaucitronIconTopLeft {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
