/* ============================================================
   NOVIABOT MODALS - VERSION NETTOYÉE ET ORGANISÉE
   ============================================================ */

/* ========== BASE MODALES (STYLES GÉNÉRIQUES) ========== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: var(--z-modal, 4000);
}

.modal[aria-hidden="false"] {
  display: block !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  margin: 6vh auto;
  max-height: calc(100dvh - 12vh);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 18px 16px;
  background: #0e0b1a;
  border: 1px solid rgba(24, 231, 255, 0.25);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 30px;
  line-height: 1;
  padding: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.25s ease;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: rotate(90deg) scale(1.08);
}

.modal__intro {
  color: #a8c6ff;
  margin: 6px 0 12px;
}

.modal__actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ========== BOUTONS GÉNÉRIQUES ========== */

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(24, 231, 255, 0.35);
  font-weight: 900;
  letter-spacing: 0.2px;
  transition: transform 0.08s ease, box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(24, 231, 255, 0.18), rgba(122, 43, 255, 0.18));
  color: #fff;
}

.btn-primary:hover {
  border-color: #18e7ff;
  box-shadow: 0 0 0 4px rgba(24, 231, 255, 0.12);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #e6f4ff;
}

.btn-outline:hover {
  color: #18e7ff;
  border-color: #18e7ff;
  box-shadow: 0 0 0 3px rgba(24, 231, 255, 0.10);
}

/* Boutons texte style NOVIABOT */
.novia-text-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 0;
  text-align: center;
  width: 100%;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.novia-text-btn:hover {
  color: #18e7ff;
  text-shadow: 0 0 6px rgba(24, 231, 255, 0.35);
}

.novia-text-btn.close-btn {
  margin-top: 10px;
  opacity: 0.8;
}

.novia-text-btn.close-btn:hover {
  opacity: 1;
  color: #18e7ff;
}

/* ============================================================
   MODALE BETA - ACCÈS BETA
============================================================ */

.beta-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.beta-backdrop[aria-hidden="false"],
.beta-backdrop.is-open {
  display: flex !important;
}

/* Au-dessus du gate (10000) et du volet « explication » (10001) — sinon le gate capte le tactile et la modale ne scroll pas */
#betaModal.beta-backdrop[aria-hidden="false"] {
  z-index: 10150 !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
  overscroll-behavior: contain;
}

#betaModal[aria-hidden="false"] .beta-modal {
  max-height: min(calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 92dvh);
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

.beta-modal {
  position: relative;
  width: min(750px, 95vw);
  max-height: calc(100dvh - 40px);
  min-height: 0;
  flex: 0 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: rgba(20, 10, 40, 0.80);
  border: 2px solid rgba(145, 70, 255, 0.4);
  box-shadow: 0 0 32px rgba(145, 70, 255, 0.4);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 36px 48px;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
}

.beta-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beta-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #18e7ff;
  transform: rotate(90deg) scale(1.08);
}

.beta-title {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 12px;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 0 12px rgba(24, 231, 255, 0.35);
}

.beta-intro {
  font-size: 17px;
  color: #e8eaff;
  text-align: center;
  line-height: 1.55;
  margin-bottom: 24px;
}

.beta-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.beta-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.beta-field:nth-child(1),
.beta-field:nth-child(2),
.beta-field:nth-child(3),
.beta-field:nth-child(7),
.beta-explain,
.beta-consent,
.beta-status,
.beta-actions {
  grid-column: 1 / -1;
}

.beta-field label {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.beta-field input,
.beta-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 11px 15px;
  font-size: 15px;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: all 0.2s ease;
}

.beta-field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

.beta-field input::placeholder,
.beta-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.beta-field input:focus,
.beta-field textarea:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #18e7ff;
  box-shadow: 0 0 0 3px rgba(24, 231, 255, 0.15);
}

.beta-field input:invalid:not(:placeholder-shown),
.beta-field textarea:invalid:not(:placeholder-shown) {
  border-color: #ff487d;
}

.beta-field input:valid:not(:placeholder-shown),
.beta-field textarea:valid:not(:placeholder-shown) {
  border-color: rgba(24, 231, 255, 0.5);
}

.beta-explain {
  font-size: 13px;
  color: #c8d0ff;
  line-height: 1.5;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
}

.beta-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #e8eaff;
  margin: 4px 0 0;
}

.beta-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.beta-status {
  min-height: 20px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #18e7ff;
  margin: 6px 0;
}

.beta-actions {
  display: flex;
  justify-content: flex-end;
  gap: 32px;
  margin-top: 12px;
  padding-top: 8px;
}

.beta-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.beta-btn:hover {
  color: #18e7ff;
  text-shadow: 0 0 6px rgba(24, 231, 255, 0.35);
}

.beta-btn-primary {
  color: #ffffff;
  font-weight: 800;
}

.beta-btn-primary:hover:not(:disabled) {
  color: #18e7ff;
  text-shadow: 0 0 8px rgba(24, 231, 255, 0.4);
}

.beta-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.beta-btn-secondary {
  color: rgba(255, 255, 255, 0.8);
}

/* Lien Discord (modale bêta) : même logique que .beta-btn — texte seul, pas de cadre ni fond */
.beta-btn-discord {
  color: #a5b4fc;
}
.beta-btn-discord:hover {
  color: #c7d2fe;
  text-shadow: 0 0 6px rgba(165, 180, 252, 0.35);
}
.beta-btn-discord.is-linked {
  color: #86efac;
  font-weight: 700;
}
.beta-btn-discord.is-linked:hover {
  color: #bbf7d0;
  text-shadow: 0 0 6px rgba(134, 239, 172, 0.25);
}

.beta-modal::-webkit-scrollbar {
  width: 8px;
}

.beta-modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.beta-modal::-webkit-scrollbar-thumb {
  background: rgba(24, 231, 255, 0.3);
  border-radius: 10px;
}

.beta-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 231, 255, 0.5);
}

/* ============================================================
   MODALE STARTER
============================================================ */

#starterModal,
#starterModal.starter-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

#starterModal[aria-hidden="false"] {
  display: flex !important;
}

.starter-modal-panel {
  position: relative;
  width: min(620px, 95vw);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(20, 10, 40, 0.80);
  border: 2px solid rgba(145, 70, 255, 0.4);
  box-shadow: 0 0 32px rgba(145, 70, 255, 0.40);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 36px 48px;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  animation: starterFade 0.22s ease-out;
}

@keyframes starterFade {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.starter-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.starter-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #18e7ff;
  transform: rotate(90deg) scale(1.08);
}

.starter-title {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 12px;
  text-align: center;
  text-shadow: 0 0 12px rgba(24, 231, 255, 0.35);
}

.starter-intro {
  font-size: 17px;
  color: #e8eaff;
  line-height: 1.55;
  text-align: center;
  margin-bottom: 26px;
}

.starter-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
  padding: 0 10px;
}

.starter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #ffffff;
}

.starter-ico {
  width: 24px;
  text-align: center;
  font-weight: 900;
  font-size: 18px;
  color: #18e7ff;
}

.starter-ico.bad {
  color: #ff487d;
}

.starter-actions {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-top: 8px;
}

.starter-btn-primary,
.starter-btn-secondary {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.starter-btn-primary:hover {
  color: #18e7ff;
  text-shadow: 0 0 6px rgba(24, 231, 255, 0.35);
}

.starter-btn-secondary {
  opacity: 0.8;
}

.starter-btn-secondary:hover {
  opacity: 1;
  color: #18e7ff;
}

/* ============================================================
   MODALE PLAN (SÉLECTEUR DE PÉRIODE)
============================================================ */

#planModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
}

#planModal[aria-hidden="false"] {
  display: flex !important;
}

#planModal .modal__panel {
  width: min(1200px, 92vw);
  max-height: calc(100dvh - 36px);
  padding: 2rem;
  border-radius: 16px;
  background: #0f1724;
  border: 1px solid rgba(24, 231, 255, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#planModal .pm-bg {
  position: absolute;
  inset: -2%;
  opacity: 0.40;
  z-index: 0;
  pointer-events: none;
  filter: brightness(0.95) saturate(1) blur(0.5px);
}

#planModal .pm-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#planModal .pm-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(1000px 480px at 20% 0%, rgba(11, 15, 40, 0.55), transparent 55%),
    linear-gradient(180deg, rgba(11, 15, 40, 0.25), rgba(11, 15, 40, 0.55));
}

#planModal .pm-content {
  position: relative;
  z-index: 1;
}

#planModal .pm-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

#planModal .pm-title {
  margin: 0 0 0.5rem;
  font-weight: 900;
  font-size: 1.7rem;
  text-align: center;
  color: #fff;
}

#planModal .pm-grid {
  display: grid;
  gap: 18px;
  margin-top: 4px;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

#planModal .pm-card {
  background: #101828;
  border: 1px solid rgba(24, 231, 255, 0.22);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.06s;
}

#planModal .pm-card:hover {
  background: #162238;
  border-color: #18e7ff;
  transform: translateY(-1px);
}

#pm-monthly:checked + label,
#pm-quarterly:checked + label,
#pm-semi:checked + label,
#pm-annual:checked + label {
  background: #18263f;
  border-color: #18e7ff;
}

#planModal .pm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  margin-top: 8px;
}

#planModal .pm-actions .btn {
  border: none;
  background: none;
  font-weight: 900;
  font-size: 1.06rem;
  cursor: pointer;
  color: #fff;
}

#planModal .pm-actions .btn[type="submit"] {
  color: #18e7ff;
}

/* ============================================================
   MODALE OFFER
============================================================ */

.offer-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal, 4000);
}

.offer-modal[aria-hidden="false"] {
  display: flex !important;
}

.offer-modal__panel {
  width: min(980px, 92vw);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #0f1724;
  border: 1px solid rgba(24, 231, 255, 0.28);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.offer-modal__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.offer-option {
  background: #101828;
  border: 1px solid rgba(24, 231, 255, 0.22);
  border-radius: 10px;
  padding: 14px 12px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.offer-option:hover {
  background: #162238;
  border-color: #18e7ff;
}

.offer-option.active {
  background: #18263f;
  border-color: #18e7ff;
}

.offer-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 14px;
}

.offer-modal__actions .btn-primary,
.offer-modal__actions .btn-outline {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 900;
  cursor: pointer;
  font-size: 1.05rem;
}

.offer-modal__actions .btn-primary {
  color: #18e7ff !important;
}

/* ============================================================
   MODALE MODÉRATION
============================================================ */

.modal-modo .modo-panel {
  width: 540px;
  max-width: 94vw;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 32px 40px;
  background: rgba(20, 10, 40, 0.80);
  border: 2px solid rgba(145, 70, 255, 0.4);
  box-shadow: 0 0 32px rgba(145, 70, 255, 0.4);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  text-align: center;
}

.modo-title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 18px;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(24, 231, 255, 0.35);
}

.modo-text {
  font-size: 17px;
  color: #e8eaff;
  line-height: 1.55;
  margin-bottom: 26px;
}

.modo-command-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #18e7ff;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 18px;
  margin-bottom: 24px;
  text-align: center;
}

.modo-btn {
  width: 100%;
  padding: 14px 0;
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(90deg, #18e7ff, #b978f7);
  color: #0a031d;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: opacity 0.15s;
}

.modo-btn:hover {
  opacity: 0.85;
}

.modal-close-btn {
  background: transparent;
  color: #fff;
  font-size: 16px;
  margin-top: 6px;
  cursor: pointer;
  opacity: 0.7;
  border: none;
}

.modal-close-btn:hover {
  opacity: 1;
}

/* ============================================================
   MODALE CONTACT
============================================================ */

.contact-panel {
  width: 540px;
  max-width: 94vw;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 42px 50px;
  background: rgba(20, 10, 40, 0.80);
  border: 2px solid rgba(145, 70, 255, 0.4);
  box-shadow: 0 0 32px rgba(145, 70, 255, 0.4);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  text-align: center;
  color: #fff;
  animation: contactFade 0.2s ease-out;
}

@keyframes contactFade {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.contact-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(24, 231, 255, 0.35);
}

.contact-subtext {
  font-size: 20px;
  color: #e8eaff;
  line-height: 1.6;
  margin-bottom: 34px;
}

.contact-separator {
  display: none;
}

.contact-option {
  width: 100%;
  border: none;
  background: none;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  padding: 20px 14px;
  margin: 14px auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-option:hover {
  color: #18e7ff;
  transform: translateY(-2px);
}

.contact-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  margin: 0;
}

.contact-option span {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  line-height: 1;
}

/* ============================================================
   MODALE LÉGALE - VERSION FINALE UNIFIÉE
============================================================ */

#legalModal.legal-backdrop,
.legal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  z-index: 99999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#legalModal[aria-hidden="true"],
.legal-backdrop[aria-hidden="true"] {
  display: none !important;
}

#legalModal[aria-hidden="false"],
.legal-backdrop[aria-hidden="false"],
.legal-backdrop.open {
  display: flex !important;
  opacity: 1 !important;
}

.legal-modal-panel {
  position: relative;
  width: min(900px, 95vw);
  max-height: calc(100dvh - 40px);
  padding: 34px 42px;
  background: rgba(20, 10, 40, 0.92);
  border: 2px solid rgba(145, 70, 255, 0.45);
  backdrop-filter: blur(18px);
  box-shadow: 0 0 18px rgba(145, 70, 255, 0.25);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: legalPop 0.25s ease;
}

@keyframes legalPop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.legal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 72, 125, 0.4);
  background: rgba(255, 72, 125, 0.15);
  color: #ff487d;
  font-size: 30px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.25s ease;
  z-index: 50;
}

.legal-close:hover {
  background: rgba(255, 72, 125, 0.25);
  transform: rotate(90deg) scale(1.08);
}

.legal-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 22px;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 12px rgba(24, 231, 255, 0.35);
}

.legal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(145, 70, 255, 0.25);
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: none;
  cursor: pointer;
  color: #cfd0ff;
  transition: 0.2s;
  font-weight: 600;
  font-size: 14px;
}

.tab-btn:hover {
  background: rgba(145, 70, 255, 0.15);
  color: #fff;
}

.tab-btn.active {
  background: rgba(24, 231, 255, 0.20);
  color: #18e7ff;
  font-weight: 700;
}

.legal-content {
  flex: 1;
  overflow-y: auto !important;
  padding: 10px 6px 20px;
  padding-right: 14px;
  color: #ffffffd9;
  line-height: 1.65;
  font-size: 1.05rem;
  letter-spacing: 0.15px;
  margin-top: 1.8rem;
}

.legal-content::-webkit-scrollbar {
  width: 8px;
}

.legal-content::-webkit-scrollbar-thumb {
  background: rgba(145, 70, 255, 0.45);
  border-radius: 6px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInLegal 0.25s ease;
}

@keyframes fadeInLegal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.legal-content h3 {
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  font-size: 1.32rem;
  font-weight: 800;
  color: #ffffff !important;
  text-shadow: 0 0 14px rgba(145, 70, 255, 0.45);
  padding-top: 10px;
}

.legal-content p,
.legal-content li {
  margin-bottom: 1.15rem;
  color: #d4d1ff !important;
  font-weight: 500;
}

.legal-content section {
  padding: 1.2rem 0 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.legal-content section:last-of-type {
  border-bottom: none;
}

.legal-content ul {
  margin: 0.4rem 0 1.3rem 1.2rem;
  padding-left: 0;
}

.legal-content ul li {
  margin-bottom: 0.5rem;
  color: #dcd8ff !important;
}

.legal-content strong {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(24, 231, 255, 0.3);
}

/* ============================================================
   RESPONSIVE - MEDIA QUERIES
============================================================ */

@media (max-width: 1024px) {
  #planModal .pm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .offer-modal__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .beta-backdrop,
  #starterModal.starter-backdrop {
    align-items: flex-start;
    padding: 12px;
  }

  .beta-modal {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 28px 24px;
    border-radius: 18px;
  }

  .beta-form {
    grid-template-columns: 1fr;
  }

  .beta-title {
    font-size: 24px;
  }

  .beta-intro {
    font-size: 15px;
  }

  .beta-actions {
    flex-direction: column-reverse;
    align-items: center;
    gap: 16px;
  }

  .beta-btn {
    font-size: 17px;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}

@media (max-width: 600px) {
  .modal__panel {
    width: min(96vw, 560px);
    margin: 8px auto;
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
    padding: 16px 14px 14px;
  }

  .modal-modo .modo-panel,
  .contact-panel,
  .starter-modal-panel {
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
    padding: 18px 14px;
  }

  /* Modale Contact : centrée verticalement sur mobile (au lieu d'être collée tout en haut). */
  .contact-modal[aria-hidden="false"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  .contact-modal .modal__panel,
  .contact-modal .contact-panel {
    margin: auto;
    max-height: calc(100dvh - 32px);
  }

  .starter-modal-panel {
    padding: 22px 16px;
  }

  .starter-title {
    font-size: 22px;
  }

  .starter-intro {
    font-size: 14px;
  }

  .starter-list {
    margin-bottom: 18px;
    gap: 10px;
    padding: 0;
  }

  .starter-item {
    align-items: flex-start;
    font-size: 14px;
  }

  .starter-actions {
    flex-direction: column;
    gap: 10px;
  }

  .contact-title {
    font-size: 23px;
    margin-bottom: 12px;
  }

  .contact-subtext {
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.45;
  }

  .contact-option {
    font-size: 16px;
    padding: 10px 8px;
    margin: 6px 0;
    gap: 10px;
  }

  .contact-option span {
    font-size: 16px;
    line-height: 1.25;
  }

  .contact-icon {
    width: 28px;
    height: 28px;
  }

  .modo-title {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .modo-text {
    font-size: 14px;
    line-height: 1.42;
    margin-bottom: 14px;
  }

  .modo-command-box {
    font-size: 14px;
    margin-bottom: 12px;
    padding: 9px 10px;
  }

  .novia-text-btn {
    font-size: 15px;
    line-height: 1.3;
  }

  .beta-title {
    font-size: 22px;
    line-height: 1.2;
  }

  .beta-intro {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 14px;
  }

  .beta-form {
    gap: 10px;
  }

  .beta-field label {
    font-size: 13px;
  }

  .beta-field input,
  .beta-field textarea {
    font-size: 14px;
    padding: 9px 11px;
  }

  .beta-field textarea {
    min-height: 72px;
  }

  .beta-explain {
    font-size: 12px;
    line-height: 1.42;
    padding: 9px 10px;
  }

  .beta-consent {
    font-size: 12px;
    gap: 8px;
  }

  .beta-consent input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  .beta-actions {
    gap: 8px;
    margin-top: 6px;
    padding-top: 2px;
  }

  .beta-btn {
    font-size: 15px;
  }

  .legal-backdrop,
  #legalModal.legal-backdrop {
    padding: 8px;
    align-items: flex-start;
  }

  .legal-modal-panel {
    width: 100%;
    max-height: calc(100dvh - 16px);
    padding: 16px 12px 12px;
    border-radius: 16px;
  }

  .legal-close {
    top: 6px;
    right: 8px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .legal-title {
    font-size: 20px;
    margin-bottom: 10px;
    padding-right: 32px;
  }

  .legal-tabs {
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .tab-btn {
    font-size: 12px;
    padding: 8px 6px;
  }

  .legal-content {
    margin-top: 0.8rem;
    padding: 6px 4px 10px;
    padding-right: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .legal-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.45rem;
    font-size: 1.02rem;
  }
}

@media (max-width: 520px) {
  .offer-modal__grid {
    grid-template-columns: 1fr;
  }

  .offer-modal,
  #planModal {
    align-items: flex-start;
    padding: 8px;
  }

  .offer-modal__panel,
  #planModal .modal__panel {
    width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
    padding: 14px 12px;
  }

  #planModal .pm-title {
    font-size: 1.22rem;
    padding-right: 28px;
  }

  #planModal .pm-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #planModal .pm-actions,
  .offer-modal__actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

@media (max-height: 740px) {
  .beta-backdrop,
  #starterModal.starter-backdrop,
  .legal-backdrop,
  #legalModal.legal-backdrop,
  .offer-modal,
  #planModal {
    align-items: flex-start;
    padding: 8px;
  }

  .beta-modal,
  .starter-modal-panel,
  .modal-modo .modo-panel,
  .contact-panel,
  .legal-modal-panel,
  #planModal .modal__panel,
  .offer-modal__panel {
    max-height: calc(100dvh - 16px);
  }
}

/* Modale Contact : centrée verticalement sur mobile ET tablette (évite l'ancrage tout en haut).
   Règle en fin de fichier → gagne la cascade sur `.modal[aria-hidden="false"]{display:block}`. */
@media (max-width: 1024px) {
  .contact-modal[aria-hidden="false"] {
    display: flex !important;
    align-items: safe center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
  }
  .contact-modal .modal__panel,
  .contact-modal .contact-panel {
    margin: auto !important;
    max-height: calc(100dvh - 32px);
  }
}
