/* ==========================================================
   TARTEAUCITRON CSS - dondorganes.fr
   ========================================================== */

#tarteaucitronRoot * {
  box-sizing: border-box;
  font-family: neometric, arial, helvetica, sans-serif;
}

#tarteaucitronBack {
  display: none;
}
#tarteaucitronBack[style*="display: block"],
#tarteaucitronBack[style*="display:block"] {
  display: block !important;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: auto !important; min-height: 100vh;
  background: rgba(0,0,0,0.45) !important;
  opacity: 1 !important;
  z-index: 9990;
  appearance: none; border: none; border-radius: 0;
  padding: 0; cursor: default;
}

#tarteaucitron {
  display: none;
}

#tarteaucitron,
#tarteaucitron[style*="display: block"] {
  position: fixed;
  z-index: 10000;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  max-width: 680px;
  width: 90%;
  max-height: 82vh;
  overflow: hidden;
  flex-direction: column;
}

#tarteaucitron[style*="display: block"] {
  display: flex !important;
}

#tarteaucitronRoot #tarteaucitronAlertBig,
#tarteaucitronRoot #tarteaucitronAlertBig.tarteaucitronAlertBigTop,
#tarteaucitronRoot #tarteaucitronAlertBig.tarteaucitronAlertBigBottom {
  position: fixed !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: #ffffff;
  border-bottom: none;
  border-top: 3px solid #4a93cc;
  box-shadow: 0 -4px 24px rgba(74,147,204,0.12);
  padding: 1rem max(2rem, calc((100% - 1400px) / 2));
  z-index: 9995;
  display: flex !important;        /* sinon le JS injecte display:block inline → éléments empilés */
  align-items: center;
  justify-content: center;         /* tout centré : texte + boutons en bloc au milieu */
  gap: 1.25rem;
  flex-wrap: nowrap;
}

body:has(.sf-toolbar) #tarteaucitronRoot #tarteaucitronAlertBig {
  bottom: 2.5rem !important;
}

#tarteaucitronAlertBig .tarteaucitronAlertBigWrapper {
  display: contents;
}

#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
  flex: 0 1 auto;
  max-width: 520px;
  color: #303030;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: left;                /* desktop : aligné à gauche ; overridé en tablette/mobile */
}
#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert::after {
  content: ".";
  margin-left: -0.25em;
}

/* ── BOUTONS GÉNÉRIQUES ─────────────────────────────────── */
#tarteaucitronRoot button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  border-radius: 1.375rem;
  font-family: neometric, arial, helvetica, sans-serif;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Tout accepter */
#tarteaucitronRoot .tarteaucitronAllow,
#tarteaucitronRoot #tarteaucitronAllAllowed {
  background-color: #4a93cc;
  border-color: #4a93cc;
  color: #ffffff;
}
#tarteaucitronRoot .tarteaucitronAllow:hover,
#tarteaucitronRoot #tarteaucitronAllAllowed:hover {
  background-color: #3a7ab0; border-color: #3a7ab0;
}
#tarteaucitronRoot .tarteaucitronAllow:active,
#tarteaucitronRoot #tarteaucitronAllAllowed:active {
  background-color: #2d5f8a; border-color: #2d5f8a;
}

/* Tout refuser */
#tarteaucitronRoot .tarteaucitronDeny,
#tarteaucitronRoot #tarteaucitronAllDenied {
  background-color: #ffffff;
  border-color: #b3d4ef;
  color: #303030;
}
#tarteaucitronRoot .tarteaucitronDeny:hover,
#tarteaucitronRoot #tarteaucitronAllDenied:hover {
  background-color: #d6eaf8; border-color: #4a93cc; color: #3a7ab0;
}
#tarteaucitronRoot .tarteaucitronDeny:active,
#tarteaucitronRoot #tarteaucitronAllDenied:active {
  background-color: #b3d4ef; border-color: #2d5f8a; color: #2d5f8a;
}

/* Personnaliser (bannière) = #tarteaucitronCloseAlert */
#tarteaucitronRoot #tarteaucitronCloseAlert {
  background-color: transparent;
  border-color: transparent;
  color: #303030;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.8125rem;
  height: auto;
  padding: 0;
  flex-shrink: 0;
}
#tarteaucitronRoot #tarteaucitronCloseAlert:hover { color: #4a93cc; }

/* Politique de confidentialité (bannière) */
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
  background-color: transparent;
  border-color: transparent;
  color: #4a93cc;
  font-size: 0.8125rem;
  font-weight: 400;
  text-decoration: underline;
  height: auto;
  padding: 0;
  flex-shrink: 0;
}
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl:hover { color: #3a7ab0; }

/* Croix fermeture bannière — juste le X, pas le texte natif */
#tarteaucitronAlertBig #tarteaucitronCloseCross {
  background-color: transparent;
  border: none;
  color: #666;
  font-size: 0;
  line-height: 1;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
#tarteaucitronAlertBig #tarteaucitronCloseCross::before {
  content: "✕";
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
}
#tarteaucitronAlertBig #tarteaucitronCloseCross:hover {
  color: #303030;
  background-color: #f0f0f0;
}

/* ── PANEL — STRUCTURE ─────────────────────────────────── */

/* Bouton Fermer */
#tarteaucitronClosePanel {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: transparent;
  border: none;
  color: #4a93cc;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  height: 1.75rem;
  padding: 0;
  cursor: pointer;
  z-index: 1;
}
#tarteaucitronClosePanel:hover { color: #3a7ab0; }

#tarteaucitronServices {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1 auto;
}

#tarteaucitron #tarteaucitronMainLineOffset.tarteaucitronLine {
  background-color: #d6eaf8;
  padding: 3.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid #b3d4ef;
  border-radius: 1rem 1rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.75rem;
  position: relative;
}

#tarteaucitron #tarteaucitronMainLineOffset .tarteaucitronH1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #303030;
  white-space: normal;
  padding-right: 4rem;
  line-height: 1.3;
  margin: 0;
  display: block;
}

#tarteaucitron #tarteaucitronMainLineOffset #tarteaucitronInfo {
  font-size: 0.8125rem;
  color: #555;
  line-height: 1.5;
  width: 100%;
}
#tarteaucitron #tarteaucitronMainLineOffset #tarteaucitronInfo p { margin: 0; }
#tarteaucitron #tarteaucitronMainLineOffset #tarteaucitronInfo br { display: none; }

/* Lien politique dans le panel */
#tarteaucitronPrivacyUrlDialog {
  background: none;
  border: none;
  color: #4a93cc;
  text-decoration: underline;
  font-size: 0.8125rem;
  padding: 0;
  height: auto;
  cursor: pointer;
}
#tarteaucitronPrivacyUrlDialog:hover { color: #3a7ab0; }

/* Masquer "Préférences pour tous les services" */
#tarteaucitron #tarteaucitronMainLineOffset .tarteaucitronName {
  display: none;
}

/* Boutons Tout accepter / Tout refuser dans le header */
#tarteaucitron #tarteaucitronMainLineOffset #tarteaucitronScrollbarAdjust {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  width: 100%;
}

#tarteaucitronAllAllowed {
  background-color: #4a93cc !important;
  border-color: #4a93cc !important;
  color: #fff !important;
  height: 2.5rem;
  padding: 0 1.5rem;
  font-size: 0.875rem;
}
#tarteaucitronAllAllowed:hover { background-color: #3a7ab0 !important; border-color: #3a7ab0 !important; }

#tarteaucitronAllDenied {
  background-color: #ffffff !important;
  border-color: #b3d4ef !important;
  color: #303030 !important;
  height: 2.5rem;
  padding: 0 1.5rem;
  font-size: 0.875rem;
}
#tarteaucitronAllDenied:hover { background-color: #d6eaf8 !important; border-color: #4a93cc !important; color: #3a7ab0 !important; }

#tarteaucitronAlertBig .tarteaucitronCTAButton {
  height: 2.25rem;
  padding: 0 1.25rem;
  font-size: 0.8125rem;
}

/* Zone scrollable */
.tarteaucitronBorder {
  overflow-y: auto;
  flex: 1 1 auto;
  padding: 0 1.5rem 1rem;
}

/* ── PANEL — LISTE DES SERVICES ─────────────────────────── */

/* Badge catégorie */
#tarteaucitronServices .tarteaucitronTitle {
  display: block;
  background: none;
  padding: 1rem 0 0.5rem;
  border-radius: 0;
  margin-bottom: 0;
}
#tarteaucitronServices .tarteaucitronTitle .catToggleBtn,
#tarteaucitronServices .tarteaucitronTitle button {
  background-color: #d6eaf8;
  border-color: transparent;
  color: #4a93cc;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 1rem;
  padding: 0.2rem 0.75rem;
  height: auto;
  display: inline-flex;
  align-items: center;
}
#tarteaucitronServices .tarteaucitronTitle .catToggleBtn:hover,
#tarteaucitronServices .tarteaucitronTitle button:hover { background-color: #b3d4ef; }

#tarteaucitronServices .tarteaucitronPlus { display: none; }

/* Ligne de service */
#tarteaucitronServices .tarteaucitronLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
  background-color: transparent;
  gap: 1rem;
}
#tarteaucitronServices .tarteaucitronLine:last-child { border-bottom: none; }

#tarteaucitronServices .tarteaucitronName { flex: 1 1 auto; }
#tarteaucitronServices .tarteaucitronName .tarteaucitronH3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #303030;
  display: block;
  margin: 0;
}

#tarteaucitronServices .tarteaucitronAsk {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

#tarteaucitronServices .tarteaucitronAllow {
  height: 2rem;
  padding: 0 1rem;
  font-size: 0.75rem;
  border-radius: 1rem;
  background-color: #4a93cc !important;
  border-color: #4a93cc !important;
  color: #fff !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
#tarteaucitronServices .tarteaucitronAllow:hover {
  background-color: #3a7ab0 !important;
  border-color: #3a7ab0 !important;
}

#tarteaucitronServices .tarteaucitronDeny {
  height: 2rem;
  padding: 0 1rem;
  font-size: 0.75rem;
  border-radius: 1rem;
  background-color: #fff !important;
  border-color: #b3d4ef !important;
  color: #303030 !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
#tarteaucitronServices .tarteaucitronDeny:hover {
  background-color: #d6eaf8 !important;
  border-color: #4a93cc !important;
  color: #3a7ab0 !important;
}

#tarteaucitronServices .tarteaucitronIsDenied .tarteaucitronAllow {
  background-color: #fff !important;
  border-color: #b3d4ef !important;
  color: #303030 !important;
}
#tarteaucitronServices .tarteaucitronIsDenied .tarteaucitronAllow:hover {
  background-color: #d6eaf8 !important;
  border-color: #4a93cc !important;
  color: #3a7ab0 !important;
}
#tarteaucitronServices .tarteaucitronIsDenied .tarteaucitronDeny {
  background-color: #4a93cc !important;
  border-color: #4a93cc !important;
  color: #fff !important;
}
#tarteaucitronServices .tarteaucitronIsDenied .tarteaucitronDeny:hover {
  background-color: #3a7ab0 !important;
  border-color: #3a7ab0 !important;
  color: #fff !important;
}

#tarteaucitronServices .tarteaucitronStatusInfo {
  display: none !important;
}

/* Bouton "Gestion des services" */
#tarteaucitronServices .tarteaucitron-toggle-group {
  background-color: transparent;
  border-color: #d6eaf8;
  color: #4a93cc;
  font-size: 0.75rem;
  font-weight: 400;
  height: auto;
  padding: 0.15rem 0.6rem;
  border-radius: 0.5rem;
}

/* Pied du panel — Enregistrer */
#tarteaucitronSave {
  padding: 1rem 1.5rem;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fff;
}
#tarteaucitronSaveButton {
  background-color: #4a93cc !important;
  border-color: #4a93cc !important;
  color: #fff !important;
  width: 100%;
  height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 1.375rem;
}
#tarteaucitronSaveButton:hover { background-color: #3a7ab0 !important; border-color: #3a7ab0 !important; }

/* ── WIDGET FLOTTANT ────────────────────────────────────── */
#tarteaucitronIcon {
  position: fixed;
  bottom: 0; right: 0;
  z-index: 9996;
}
body:has(.sf-toolbar) #tarteaucitronIcon {
  bottom: 2.5rem;
}
#tarteaucitronRoot #tarteaucitronManager {
  background-color: transparent;
  color: inherit;
  border-radius: 0;
  padding: 0.25rem 0;
  border: none;
  height: auto;
  box-shadow: none;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
#tarteaucitronRoot #tarteaucitronManager:hover { background-color: transparent; opacity: 0.85; }

/* ── RESPONSIVE ─────────────────────────────────────────── */

/* TABLETTE : 768px → 1100px */

@media screen and (min-width: 768px) and (max-width: 1100px) {
  #tarteaucitronRoot #tarteaucitronAlertBig,
  #tarteaucitronRoot #tarteaucitronAlertBig.tarteaucitronAlertBigTop,
  #tarteaucitronRoot #tarteaucitronAlertBig.tarteaucitronAlertBigBottom {
    padding: 0.75rem 3rem !important;   /* padding latéral SYMÉTRIQUE (3rem chaque côté) */
    gap: 0.75rem;
    flex-wrap: wrap !important;
  }

  /* Texte sur toute la largeur, au-dessus des boutons (centré, pas de margin-right auto) */
  #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
    max-width: 100%;
    flex: 1 1 100%;
    margin-right: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: center;
  }

  /* Boutons centrés sur leur ligne */
  #tarteaucitronAlertBig .tarteaucitronCTAButton,
  #tarteaucitronAlertBig #tarteaucitronCloseAlert,
  #tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
    flex: 0 0 auto;
  }

  /* Croix : positionnée en absolute top-right */
  #tarteaucitronAlertBig #tarteaucitronCloseCross {
    position: absolute !important;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media screen and (max-width: 767px) {
  #tarteaucitronRoot #tarteaucitronAlertBig,
  #tarteaucitronRoot #tarteaucitronAlertBig.tarteaucitronAlertBigTop,
  #tarteaucitronRoot #tarteaucitronAlertBig.tarteaucitronAlertBigBottom {
    padding: 0.75rem 1rem 0.75rem 1rem !important;
    gap: 0.5rem;
    flex-wrap: wrap !important;
    padding-top: 2.25rem !important;
  }

  #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
    max-width: 100%;
    flex: 1 1 100%;
    margin-right: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: center;
  }

  #tarteaucitronAlertBig #tarteaucitronCloseAlert,
  #tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
    flex: 0 0 auto;
    align-self: center;
  }

  #tarteaucitronAlertBig #tarteaucitronAllAllowed,
  #tarteaucitronAlertBig #tarteaucitronAllDenied {
    width: 100%;
    flex: 1 1 100%;
    justify-content: center;
  }

  #tarteaucitronAlertBig #tarteaucitronCloseCross {
    position: absolute !important;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
  }

  #tarteaucitron,
  #tarteaucitron[style*="display: block"] {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 60px);
    left: 0;
    transform: none;
    border-radius: 0;
  }
  #tarteaucitron #tarteaucitronMainLineOffset.tarteaucitronLine { border-radius: 0; }
  #tarteaucitronIcon { right: 0; }
}