/* ============================================================
   NOPA Trading & Solutions - Gestionnaire de consentement cookies
   v1.0 - Charte : navy #050a30, rouge #c81020, accent #4a5fc1
   Fichier autonome, aucune dependance.
   ============================================================ */

.nopa-cc-hidden { display: none !important; }

/* Verrou du scroll de la page (compense la barre de defilement en JS) */
body.nopa-cc-lock { overflow: hidden !important; }

/* ---------- Overlay ---------- */
.nopa-cc-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 10, 48, 0.72);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ---------- Modale ---------- */
.nopa-cc-modal {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 680px;
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(5, 10, 48, 0.35);
  font-family: 'Cabin', Arial, sans-serif;
  color: #2d3450;
}

/* En-tete fixe */
.nopa-cc-header {
  position: relative;
  flex: 0 0 auto;
  padding: 1.1rem 3.2rem;
  border-bottom: 1px solid #e6e9f2;
}
.nopa-cc-title {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #050a30;
  text-align: center;
  margin: 0;
  letter-spacing: 0.5px;
}
.nopa-cc-title:focus { outline: none; }
.nopa-cc-close {
  position: absolute;
  top: 50%; right: 0.9rem;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border: none;
  background: transparent;
  color: #c81020;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.nopa-cc-close:hover { background: rgba(200, 16, 32, 0.08); }

/* Corps defilable */
.nopa-cc-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1.5rem;
}
.nopa-cc-intro p {
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0 0 0.9rem;
}
.nopa-cc-policy-link {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}
.nopa-cc-policy-link a,
.nopa-cc-placeholder a {
  color: #4a5fc1;
  text-decoration: underline;
}
.nopa-cc-policy-link a:hover { color: #050a30; }

/* Categories */
.nopa-cc-cat {
  border-top: 1px solid #e6e9f2;
  padding: 1.05rem 0;
}
.nopa-cc-cat:last-child { padding-bottom: 0.4rem; }
.nopa-cc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.nopa-cc-cat-title {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: #050a30;
  margin: 0;
}
.nopa-cc-cat-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #4a5568;
  margin: 0;
}
.nopa-cc-badge {
  background: #eef1fb;
  color: #4a5fc1;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Interrupteurs (role=switch) */
.nopa-cc-switch {
  position: relative;
  width: 52px; height: 28px;
  flex: 0 0 auto;
  border: 2px solid #aab2c8;
  border-radius: 999px;
  background: #e2e6f0;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nopa-cc-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.nopa-cc-switch[aria-checked="true"] {
  background: #c81020;
  border-color: #c81020;
}
.nopa-cc-switch[aria-checked="true"]::after { transform: translateX(24px); }

/* Pied fixe (zone d'actions toujours visible) */
.nopa-cc-footer {
  flex: 0 0 auto;
  border-top: 1px solid #e6e9f2;
  padding: 1rem 1.5rem;
  background: #ffffff;
}
.nopa-cc-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.nopa-cc-btn {
  flex: 1 1 0;
  min-width: 150px;
  min-height: 46px;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nopa-cc-btn-navy { background: #050a30; color: #ffffff; }
.nopa-cc-btn-navy:hover { background: #101b56; }
.nopa-cc-btn-accent { background: #4a5fc1; color: #ffffff; }
.nopa-cc-btn-accent:hover { background: #3a4da8; }
.nopa-cc-btn-red { background: #c81020; color: #ffffff; }
.nopa-cc-btn-red:hover { background: #a50d1a; }
.nopa-cc-note {
  font-size: 0.8rem;
  color: #69708c;
  text-align: center;
  margin: 0.7rem 0 0;
  line-height: 1.5;
}

/* Focus visible (accessibilite) */
.nopa-cc-btn:focus-visible,
.nopa-cc-switch:focus-visible,
.nopa-cc-close:focus-visible,
.nopa-cc-body a:focus-visible {
  outline: 3px solid #4a5fc1;
  outline-offset: 2px;
}

/* ---------- Placeholder contenus externes (Livestorm) ---------- */
.nopa-cc-placeholder {
  background: #050a30;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.nopa-cc-placeholder h3 {
  font-family: 'Oswald', Arial, sans-serif;
  font-size: 1.2rem;
  color: #ffffff;
  margin: 0 0 0.8rem;
}
.nopa-cc-placeholder p {
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Cabin', Arial, sans-serif;
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 1.3rem;
}
.nopa-cc-placeholder .nopa-cc-btn {
  flex: none;
  display: inline-block;
  width: auto;
}
.nopa-cc-placeholder .nopa-cc-ph-link {
  margin: 1.1rem auto 0;
  font-size: 0.88rem;
}
.nopa-cc-placeholder a { color: #9fb0ff; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .nopa-cc-overlay { padding: 12px; }
  .nopa-cc-modal { max-height: 92vh; }
  .nopa-cc-header { padding: 1rem 3rem; }
  .nopa-cc-body, .nopa-cc-footer { padding-left: 1rem; padding-right: 1rem; }
  .nopa-cc-actions { flex-direction: column; }
  .nopa-cc-btn { width: 100%; flex: none; }
}
