/* Bannière de consentement aux cookies — UNYWAYS.
   Feuille de style autonome : ne dépend d'aucune classe propre à index.html, legal.css ou
   member.css (les trois familles de pages qui la chargent ont des styles très différents).
   Palette et typographie reprises des jetons du site public (navy/orange, Manrope) en dur,
   pour fonctionner identiquement quel que soit le contexte d'où elle est chargée.
   Respecte le thème sombre/clair déjà posé sur <html data-theme="..."> par le site public ;
   sur les pages qui n'ont pas ce mécanisme (espace membre), reste au rendu clair par défaut. */

.uc { position: fixed; z-index: 20000; }

.uc-bar {
  position: fixed;
  left: 16px;
  bottom: 16px;
  max-width: 420px;
  width: calc(100vw - 32px);
  background: #0A1B33;
  color: #F3F6FB;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 18px 20px;
  font-family: 'Manrope', system-ui, sans-serif;
}
.uc-has-mobile-cta .uc-bar { bottom: calc(82px + env(safe-area-inset-bottom)); }

.uc-title { font-weight: 800; font-size: 15px; margin: 0 0 6px; }
.uc-body { font-size: 13px; line-height: 1.55; color: rgba(243, 246, 251, 0.8); margin: 0 0 14px; }

.uc-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.uc-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.uc-btn-primary { background: #FF5A1F; color: #fff; }
.uc-btn-primary:hover { background: #F0480F; }
.uc-btn-ghost { background: transparent; color: #F3F6FB; border-color: rgba(255, 255, 255, 0.35); }
.uc-btn-ghost:hover { border-color: #fff; }
.uc-btn-outline { background: transparent; color: rgba(243, 246, 251, 0.85); border-color: transparent; text-decoration: underline; padding-left: 6px; padding-right: 6px; }

.uc-panel {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: calc(100vw - 32px);
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #0A1B33;
  color: #F3F6FB;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 20px;
  font-family: 'Manrope', system-ui, sans-serif;
}
.uc-has-mobile-cta .uc-panel { bottom: calc(82px + env(safe-area-inset-bottom)); }

.uc-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.uc-panel-title { font-weight: 800; font-size: 15px; margin: 0; }
.uc-close {
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #F3F6FB;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.uc-panel-intro { font-size: 12.5px; color: rgba(243, 246, 251, 0.75); margin: 8px 0 16px; }

.uc-cat { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 12px 0; }
.uc-cat:first-of-type { border-top: none; }
.uc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.uc-cat-name { font-weight: 700; font-size: 13.5px; }
.uc-cat-always { font: 600 10px 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(243, 246, 251, 0.55); }
.uc-cat-desc { font-size: 12px; line-height: 1.5; color: rgba(243, 246, 251, 0.7); margin: 6px 0 0; }

.uc-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.uc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.uc-switch span {
  position: absolute; inset: 0; background: rgba(255, 255, 255, 0.18); border-radius: 999px; transition: background 0.15s;
}
.uc-switch span::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform 0.15s;
}
.uc-switch input:checked + span { background: #FF5A1F; }
.uc-switch input:checked + span::before { transform: translateX(16px); }
.uc-switch input:focus-visible + span { outline: 2px solid #FF5A1F; outline-offset: 2px; }

.uc-privacy { font-size: 12px; margin: 14px 0 12px; }
.uc-privacy a { color: #FF8A3D; }

.uc-save { width: 100%; justify-content: center; text-align: center; }

.uc-float {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 19999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(10, 27, 51, 0.14);
  background: #fff;
  color: #0A1B33;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(10, 27, 51, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uc-float:hover { transform: translateY(-1px); }

@media (max-width: 480px) {
  .uc-bar, .uc-panel { left: 8px; width: calc(100vw - 16px); }
  .uc-float { left: 8px; bottom: 8px; }
}

/* Thème sombre du site public (data-theme="dark" ou défaut système) : la bannière est déjà en
   ton foncé par construction (cohérent avec la carte produit du hero, également navy/blanc),
   donc rien à inverser ici — seul le bouton flottant, clair par défaut, s'assombrit pour rester
   lisible sur un fond de page sombre. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .uc-float { background: #101C33; color: #F3F6FB; border-color: rgba(255, 255, 255, 0.14); }
}
html[data-theme="dark"] .uc-float { background: #101C33; color: #F3F6FB; border-color: rgba(255, 255, 255, 0.14); }
