/* ==========================================================================
   RC CONSENT BANNER STYLES - LOCALSTAR.CH
   ========================================================================== */

.rc-consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999999;
  display: none;
}

.rc-consent {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  max-width: 740px;
  width: calc(100% - 24px);
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1000000;
  display: none;
  font-family: inherit;
  box-sizing: border-box;
  /* ⚠️ Sur un petit écran, la fenêtre est plus haute que l'écran : son haut sortait du cadre et
     devenait inatteignable. Elle se limite donc à la hauteur visible et défile (demande Romano,
     23.10.2026). */
  max-height: calc(100vh - 32px);
  /* `dvh` = la hauteur RÉELLEMENT visible : sur un téléphone, `vh` compte la barre d'adresse et la
     fenêtre reste coupée en haut. Les deux lignes se suivent, la seconde gagne quand elle est connue. */
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rc-consent h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #c4c4c4;
}

.rc-consent p {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.rc-consent a {
  color: #2ea3f2;
  text-decoration: underline;
}

.rc-consent .rc-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.rc-consent .rc-cat {
  flex: 1 1 220px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 12px 14px;
}

.rc-consent .rc-cat h4 {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  color: #c4c4c4;
}

.rc-consent .rc-cat p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.rc-consent .rc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  align-items: center;
  justify-content: center;
}

.rc-consent button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.02s ease;
}

.rc-btn-accept {
  background: #22c55e;
  color: #041b0d;
}
.rc-btn-accept:hover {
  background: #64e894;
}

.rc-btn-reject {
  background: #ff4242;
  color: #ffffff;
  border: 1px solid #ef4444;
}
.rc-btn-reject:hover {
  background: #ff8a8a;
}

.rc-btn-save {
  background: #2ea3f2;
  color: #0b2447;
}
.rc-btn-save:hover {
  background: #8aceff;
}

.rc-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* L'input est le contrôle accessible (invisible) ; le rendu passe par .rc-slider,
   car les pseudo-éléments ::after ne s'affichent pas de façon fiable sur un <input>. */
.rc-switch input {
  position: absolute;
  width: 46px;
  height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.rc-slider {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  background: #ff4242;
  border-radius: 999px;
  transition: background 0.2s;
}

.rc-slider::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #0f172a;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
}

.rc-switch input:checked + .rc-slider {
  background: #22c55e;
}

.rc-switch input:checked + .rc-slider::after {
  left: 23px;
}

.rc-consent-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 6px;
  display: none;
  z-index: 1000000;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

/* État réduit : pastille discrète mais toujours cliquable */
.rc-consent-fab.rc-mini {
  width: 42px;
  height: 42px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 999px;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.rc-consent-fab.rc-mini .rc-fab-label {
  display: none;
}

.rc-consent-fab.rc-mini:hover,
.rc-consent-fab.rc-mini:focus-visible {
  opacity: 1;
}
