/* Together Tracking — bandeau cookies (FR/EN).
   Le [hidden] natif est écrasé par un display:flex auteur (et parfois par Divi) :
   on force donc display:none !important sur [hidden] / .tg-is-hidden. */

.tg-consent[hidden],
.tg-consent .tg-is-hidden,
.tg-consent [hidden],
#together-consent-banner [hidden],
#together-consent-banner .tg-is-hidden,
.tg-consent-prefs[hidden],
.tg-consent-prefs.tg-is-hidden,
.tg-btn[hidden],
.tg-btn.tg-is-hidden {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}

/* Barre basse compacte, pleine largeur (desktop). */
.tg-consent{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:10050;
  background:#FAF7F2;
  color:#302519;
  border-top:1px solid #E1CFBD;
  box-shadow:0 -8px 32px rgba(48,37,25,.14);
  font-family:inherit,Arial,sans-serif;
}
.tg-consent-inner{
  max-width:1120px;
  margin:0 auto;
  padding:12px 20px 14px;
  padding-bottom:max(14px,env(safe-area-inset-bottom));
}
.tg-consent h2{
  margin:0 0 4px;
  font-size:16px;
  line-height:1.25;
  font-weight:700;
  color:#302519;
}
.tg-consent-text{
  margin:0 0 10px;
  font-size:13px;
  line-height:1.4;
  color:#302519;
}
.tg-consent-prefs{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:0 0 10px;
  padding:10px 12px;
  background:#fff;
  border:1px solid #E1CFBD;
  border-radius:10px;
}
.tg-consent-opt{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:13px;
  cursor:pointer;
}
.tg-consent-opt input{margin-top:2px;accent-color:#C8643C;flex-shrink:0}
.tg-consent-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
/* CNIL : Tout accepter / Tout refuser, même taille et même graisse. */
.tg-btn{
  appearance:none;
  border-radius:10px;
  padding:10px 16px;
  font-weight:700;
  font-size:14px;
  line-height:1.2;
  cursor:pointer;
  border:2px solid transparent;
  font-family:inherit;
  min-height:42px;
  box-sizing:border-box;
}
.tg-btn-primary{
  background:#C8643C;
  color:#fff;
  border-color:#C8643C;
}
.tg-btn-primary:hover,.tg-btn-primary:focus{background:#A84C28;border-color:#A84C28}
.tg-btn-secondary{
  background:#fff;
  color:#C8643C;
  border-color:#C8643C;
}
.tg-btn-secondary:hover,.tg-btn-secondary:focus{background:#F0E9E1}
.tg-btn-ghost{
  background:transparent;
  color:#6F543B;
  border-color:#E1CFBD;
}
.tg-btn-ghost:hover,.tg-btn-ghost:focus{background:#F0E9E1}
.tg-btn:focus-visible{outline:2px solid #302519;outline-offset:2px}
.tg-consent-policy{
  margin-left:auto;
  font-size:13px;
  color:#C8643C;
  text-decoration:underline;
  padding:8px 0;
}
.tg-consent-policy:hover{color:#A84C28}

/* Bouton « Cookies » : uniquement après un choix, petit, bas-gauche
   (TGM pastille : bas-droite desktop / bas-gauche mobile). */
.tg-consent-reopen{
  position:fixed;
  left:16px;
  bottom:16px;
  z-index:9980;
  background:#fff;
  color:#6F543B;
  border:1px solid #E1CFBD;
  border-radius:999px;
  padding:6px 10px;
  font-size:11px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(48,37,25,.12);
  font-family:inherit;
}
.tg-consent-reopen:hover,.tg-consent-reopen:focus{background:#FAF7F2;color:#302519}
.tg-consent-reopen:focus-visible{outline:2px solid #C8643C;outline-offset:2px}
.tg-consent-reopen[hidden],
.tg-consent-reopen.tg-is-hidden{
  display:none !important;
}

/* Mobile : bottom sheet compact, boutons empilés, max ~45vh. */
@media (max-width:780px){
  .tg-consent{
    max-height:45vh;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    border-radius:16px 16px 0 0;
    border-top:1px solid #E1CFBD;
  }
  .tg-consent-inner{padding:12px 16px 12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .tg-consent h2{font-size:15px}
  .tg-consent-text{font-size:12.5px;margin-bottom:8px}
  .tg-consent-actions{flex-direction:column;align-items:stretch;gap:6px}
  .tg-consent-policy{margin-left:0;text-align:center;padding:4px 0}
  .tg-btn{width:100%;min-height:40px;padding:9px 14px}
  .tg-consent-reopen{left:12px;bottom:72px;padding:5px 9px;font-size:11px}
  /* Premier calque reste à 45vh ; le panneau Personnaliser a besoin d’un peu plus
     pour que « Enregistrer mes choix » reste visible sans scroller. */
  .tg-consent.is-customizing{max-height:62vh}
}


.together-cookies-page{max-width:760px}
.together-cookies-page table{width:100%;border-collapse:collapse;margin:1em 0;font-size:15px}
.together-cookies-page th,.together-cookies-page td{border:1px solid #E1CFBD;padding:8px 10px;text-align:left;vertical-align:top}
.together-cookies-page th{background:#FAF7F2}
.together-cookies-page .tg-btn{margin:12px 0;width:auto}

html.together-consent-open .tg-consent-reopen{
  display:none !important;
}

/* 1.0.4 : bouton flottant Cookies retiré -> la pastille TGM redescend.
   Desktop : au-dessus de la bulle Chatbase (bas-droite). Mobile : tout en bas à gauche. */
html body #tgm-pill{bottom:96px!important}
@media (max-width:780px){html body #tgm-pill{bottom:16px!important}}
/* 1.0.6 : sur ordinateur, le formulaire déplié TGM ne doit pas passer sous la bulle Chatbase. */
@media (min-width:781px){html body #tgm-panel{bottom:96px!important;max-height:min(calc(100vh - 140px),640px)!important}}
