/* ============================================================
   CONSENT.CSS — Bandeau de consentement aux cookies de mesure
   Recommandations CNIL : refuser aussi simple qu'accepter,
   aucun choix pré-coché, retrait possible à tout moment.
   Bandeau blanc (thème clair, refonte oct. 2026).
   ============================================================ */

.cc {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 999;
  background: #FFFFFF;
  border-top: 1px solid rgba(31, 31, 31, .08);
  box-shadow: 0 -18px 50px -24px rgba(31, 31, 31, .35);
  color: #1F1F1F;
  font-family: var(--tw-font-body, 'Poppins', sans-serif);
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Le panneau de réglage fin peut être haut : sur petit écran il défile
     dans le bandeau plutôt que de déborder hors de l'écran. */
  max-height: 85vh; overflow-y: auto; overscroll-behavior: contain;
  animation: cc-in .38s cubic-bezier(.22, .8, .3, 1) both;
}
.cc[hidden] { display: none; }
@keyframes cc-in { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cc-in {
  max-width: 1180px; margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; gap: 20px 32px; flex-wrap: wrap;
}
.cc-main { flex: 1 1 420px; min-width: 0; }
.cc-title {
  font-family: var(--tw-font-display, 'Poppins', sans-serif);
  font-size: 17px; font-weight: 700; color: #1F1F1F; line-height: 1.2; margin-bottom: 4px;
}
.cc-text { color: #4A4A4A; font-weight: 400; font-size: 13.5px; line-height: 1.55; max-width: 76ch; }
.cc-text a { color: #E3241B; text-decoration: underline; text-underline-offset: 3px; }

/* Refuser et accepter : strictement le même poids visuel. */
.cc-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cc-btn {
  font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: .01em;
  color: #E3241B; background: #fff;
  border: 1.5px solid #E3241B; border-radius: 999px;
  padding: 11px 24px; min-width: 142px; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cc-btn:hover, .cc-btn:focus-visible { border-color: #E3241B; background: #E3241B; color: #fff; }
.cc-link {
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: #4A4A4A;
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px;
}
.cc-link:hover, .cc-link:focus-visible { color: #E3241B; }

/* ---- Panneau de réglage fin ---- */
.cc-panel {
  border-top: 1px solid rgba(31, 31, 31, .08);
  max-width: 1180px; margin: 0 auto; padding: 6px 32px 26px;
}
.cc-panel[hidden] { display: none; }
.cc-row {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid rgba(31, 31, 31, .08);
}
.cc-row:last-of-type { border-bottom: 0; }
.cc-row-txt { flex: 1; min-width: 0; }
.cc-row-txt b { display: block; font-size: 14.5px; font-weight: 700; color: #1F1F1F; margin-bottom: 3px; }
.cc-row-txt span { color: #4A4A4A; font-weight: 400; font-size: 13.5px; }

.cc-sw { position: relative; flex: none; display: inline-flex; align-items: center; cursor: pointer; }
.cc-sw input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.cc-sw i {
  width: 46px; height: 26px; border-radius: 999px;
  background: #D9D9D9; border: 1px solid #CFCFCF;
  position: relative; transition: background .22s ease, border-color .22s ease;
}
.cc-sw i::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .22s ease;
}
.cc-sw input:checked + i { background: #E3241B; border-color: #E3241B; }
.cc-sw input:checked + i::after { transform: translateX(20px); }
.cc-sw input:focus-visible + i { outline: 2px solid #E3241B; outline-offset: 3px; }
.cc-sw input:disabled { cursor: default; }
.cc-sw input:disabled + i { background: #E8A9A5; border-color: #E8A9A5; opacity: .6; }

.cc-panel-actions { margin-top: 20px; display: flex; justify-content: flex-end; }

.cc .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Point d'entrée de retrait, dans les pieds de page. */
.cc-reopen {
  font-family: inherit; font-size: inherit; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.cc-reopen:hover, .cc-reopen:focus-visible { color: var(--primary, #E3241B); }

/* Le bouton d'appel flottant ne doit pas chevaucher le bandeau. */
body.cc-open .floating-call { opacity: 0; pointer-events: none; }

/* Sur mobile le bandeau recouvrait le premier champ du formulaire des landing
   pages : 220 px sur un écran de 812, soit plus du quart. Version compacte à
   partir de 1024 px, qui garde les deux boutons de même poids (recommandation
   CNIL) et la phrase de finalité, et n'abandonne que la phrase de réassurance,
   qui n'est pas une mention obligatoire. */
@media (max-width: 1024px) {
  .cc-in { padding: 12px 16px; gap: 10px 16px; align-items: center; }
  .cc-panel { padding: 4px 16px 20px; }
  .cc-main { flex: 1 1 100%; }
  .cc-title { font-size: 15px; margin-bottom: 1px; }
  .cc-text { font-size: 12.5px; line-height: 1.45; }
  .cc-more { display: none; }
  .cc-actions { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .cc-btn { flex: 1 1 0; min-width: 0; padding: 10px 8px; font-size: 13px; }
  .cc-link { flex: 0 0 auto; padding: 10px 2px; font-size: 12.5px; }
  .cc-panel-actions { justify-content: stretch; }
  .cc-panel-actions .cc-btn { width: 100%; flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .cc-btn { font-size: 12.5px; padding: 10px 6px; }
  .cc-link { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc { animation: none; }
  .cc-sw i, .cc-sw i::after, .cc-btn { transition: none; }
}
