/* Banner de cookies — RGPD / LOPD-GDD / LSSI */
#sialweb-cookie-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.sialweb-cookie-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sialweb-cookie-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 32rem;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(10, 15, 30, 0.25);
  border: 1px solid rgba(79, 142, 247, 0.2);
  padding: 1.5rem 1.35rem 1.35rem;
}

@media (min-width: 480px) {
  .sialweb-cookie-modal {
    padding: 1.75rem 1.75rem 1.5rem;
  }
}

.sialweb-cookie-modal h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: #0a0f1e;
  line-height: 1.25;
}

.sialweb-cookie-modal > p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #3a4460;
}

.sialweb-cookie-modal a {
  color: #4f8ef7;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sialweb-cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

@media (min-width: 420px) {
  .sialweb-cookie-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sialweb-cookie-actions .sialweb-cookie-btn--secondary {
    order: 1;
    flex: 1 1 auto;
  }
  .sialweb-cookie-actions .sialweb-cookie-btn--ghost {
    order: 2;
    flex: 1 1 auto;
  }
  .sialweb-cookie-actions .sialweb-cookie-btn--primary {
    order: 3;
    width: 100%;
  }
}

.sialweb-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.sialweb-cookie-btn:focus-visible {
  outline: 2px solid #4f8ef7;
  outline-offset: 2px;
}

.sialweb-cookie-btn--primary {
  background: linear-gradient(135deg, #4f8ef7 0%, #3d7ae8 100%);
  color: #fff;
  border-color: transparent;
}
.sialweb-cookie-btn--primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.sialweb-cookie-btn--secondary {
  background: #fff;
  color: #0a0f1e;
  border-color: rgba(79, 142, 247, 0.45);
}
.sialweb-cookie-btn--secondary:hover {
  background: rgba(79, 142, 247, 0.06);
  border-color: #4f8ef7;
}

.sialweb-cookie-btn--ghost {
  background: transparent;
  color: #3a4460;
  border-color: rgba(10, 15, 30, 0.12);
}
.sialweb-cookie-btn--ghost:hover {
  background: rgba(10, 15, 30, 0.04);
}

#sialweb-cookie-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(79, 142, 247, 0.15);
}

#sialweb-cookie-panel[hidden] {
  display: none !important;
}

.sialweb-cookie-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(10, 15, 30, 0.06);
}

.sialweb-cookie-row:last-of-type {
  border-bottom: none;
}

.sialweb-cookie-row strong {
  display: block;
  font-size: 0.9rem;
  color: #0a0f1e;
  margin-bottom: 0.2rem;
}

.sialweb-cookie-row span {
  font-size: 0.8rem;
  color: #5a6785;
  line-height: 1.45;
}

.sialweb-cookie-toggle {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  accent-color: #00b389;
  cursor: pointer;
}

.sialweb-cookie-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sialweb-cookie-panel-actions {
  margin-top: 1rem;
}

#sialweb-cookie-fab {
  position: fixed;
  z-index: 2147482000;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #3a4460;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(79, 142, 247, 0.25);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(10, 15, 30, 0.1);
  cursor: pointer;
  transition: box-shadow 0.2s, color 0.2s;
}

#sialweb-cookie-fab:hover {
  color: #0a0f1e;
  box-shadow: 0 6px 24px rgba(79, 142, 247, 0.15);
}

#sialweb-cookie-fab:focus-visible {
  outline: 2px solid #4f8ef7;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .sialweb-cookie-btn {
    transition: none;
  }
}
