/* ============================================= */
/*             MODALE LÉGALE NOVIABOT            */
/* ============================================= */

.modal.legal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* Ouverture */
.modal[aria-hidden="false"] {
  display: flex !important;
}

/* --------------------------------------------- */
/* PANEL — version ultra stylée                 */
/* --------------------------------------------- */
.legal-modal-panel {
  background: rgba(20,10,40,0.92);
  border: 2px solid rgba(145,70,255,0.45);
  border-radius: 22px;
  padding: 36px;
  width: min(900px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  color: #fff;
  position: relative;

  box-shadow:
    0 0 26px rgba(145,70,255,0.35),
    0 0 45px rgba(24,231,255,0.18);

  /* 🔥 Animation ultra clean PRO */
  animation: legalUltra 0.45s cubic-bezier(.22,1,.36,1);
}

@keyframes legalUltra {
  0% {
    transform: perspective(1300px) translateY(60px) scale(.82) rotateX(18deg);
    opacity: 0;
    filter: blur(8px);
  }
  50% {
    transform: perspective(1300px) translateY(-8px) scale(1.03) rotateX(0deg);
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    transform: perspective(1300px) translateY(0px) scale(1);
  }
}
#legalModal.legal-backdrop {
  opacity: 0;
  transition: opacity .45s ease !important;
}

#legalModal[aria-hidden="false"] {
  opacity: 1 !important;
}


/* --------------------------------------------- */
/* ANIMATION ULTRA CLEAN LEVEL GOD              */
/* --------------------------------------------- */
@keyframes modalUltraOpen {
  0% {
    transform: scale(.84) translateY(30px) rotateX(12deg);
    opacity: 0;
    filter: blur(6px) brightness(.6);
  }
  45% {
    transform: scale(1.04) translateY(-4px) rotateX(0deg);
    opacity: 1;
    filter: blur(0px) brightness(1);
  }
  100% {
    transform: scale(1) translateY(0px) rotateX(0deg);
  }
}

/* --------------------------------------------- */
/* CLOSE BUTTON                                 */
/* --------------------------------------------- */
.legal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  background: rgba(255,72,125,0.08);
  border: 1px solid rgba(255,72,125,0.4);
  border-radius: 10px;
  color: #ff487d;
  font-size: 30px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .25s ease;
}
.legal-close:hover {
  background: rgba(255,72,125,0.25);
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 0 12px rgba(255,72,125,0.4);
}

/* --------------------------------------------- */
/* TITRE + TABS                                 */
/* --------------------------------------------- */
.legal-title {
  font-size: 30px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 22px;
  text-shadow: 0 0 14px rgba(145,70,255,0.5);
}

.legal-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(145,70,255,0.35);
  border-radius: 10px;
  cursor: pointer;
  color: #e8eaff;
  transition: .2s ease;
  font-weight: 700;
}

.tab-btn:hover {
  background: rgba(145,70,255,0.15);
}

.tab-btn.active {
  background: linear-gradient(95deg, #9b4dff, #18e7ff);
  color: #050312;
  border-color: transparent;
  box-shadow: 0 0 12px rgba(145,70,255,0.45);
}

.legal-content {
  padding-right: 6px;
  font-size: 15px;
  line-height: 1.55;
  color: #dcd8ff;
}

/* Tabs content */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeLegal .25s ease-out;
}

@keyframes fadeLegal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Headers dans contenu */
.tab-content h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 8px rgba(145,70,255,0.4);
}

.tab-content p {
  margin-bottom: 1rem;
}

.tab-content ul {
  margin: 0.4rem 0 1.2rem 1.2rem;
}
.tab-content ul li {
  margin-bottom: 0.45rem;
}

/* Bouton Fermer */
.close-btn {
  margin-top: 2rem;
  padding: 10px 20px;
  background: rgba(145,70,255,0.45);
  border: 1px solid rgba(145,70,255,0.6);
  border-radius: 10px;
  cursor: pointer;
  transition: .2s ease;
  color: #fff;
  font-weight: 700;
}
.close-btn:hover {
  background: rgba(145,70,255,0.7);
  box-shadow: 0 0 14px rgba(145,70,255,0.5);
}

/* --------------------------------------------- */
/* Scroll lock                                   */
/* --------------------------------------------- */
body.modal-open {
  overflow: hidden !important;
  height: 100vh;
}

.legal-modal-panel,
.legal-content,
.tab-content {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.legal-backdrop {
  overflow: hidden !important;
}

/* Scroll interne */
.legal-content::-webkit-scrollbar {
  width: 8px;
}
.legal-content::-webkit-scrollbar-thumb {
  background: rgba(145,70,255,0.32);
  border-radius: 6px;
}
