/**
 * 📜 STYLES MODALS JURIDIQUES - Mots Mêlés Plus
 * Style identique à la modal cookies (80vh, slide-up, néon gaming)
 */

/* ============================================
   OVERLAY
   ============================================ */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0;
    margin: 0;
}

.legal-modal-overlay.show {
    opacity: 1;
}

/* ============================================
   CONTAINER MODAL
   ============================================ */
.legal-modal-container {
    background: linear-gradient(
        135deg,
        rgba(30, 36, 68, 0.98) 0%,
        rgba(26, 31, 58, 0.95) 100%
    );
    border-top: 1px solid rgba(0, 240, 255, 0.3);
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 100%;
    height: 80vh;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 240, 255, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.legal-modal-overlay.show .legal-modal-container {
    transform: translateY(0);
}

/* Desktop */
@media (min-width: 481px) {
    .legal-modal-container {
        max-width: 600px;
        border-radius: 20px 20px 0 0;
    }
}

@media (min-width: 768px) {
    .legal-modal-container {
        max-width: 700px;
    }
}

/* ============================================
   HEADER
   ============================================ */
.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px;
    background: linear-gradient(
        135deg,
        rgba(0, 240, 255, 0.1) 0%,
        rgba(0, 200, 212, 0.05) 100%
    );
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    flex-shrink: 0;
}

.legal-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-modal-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #00f0ff 0%, #b000ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-modal-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

.legal-modal-close {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.legal-modal-close:hover {
    background: rgba(255, 0, 110, 0.5);
    border-color: #ff006e;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
}

/* ============================================
   DATE D'ENTREE EN VIGUEUR
   ============================================ */
.legal-effective-date {
    width: 100%;
    text-align: left;
    font-size: 0.78rem;
    color: rgba(0, 240, 255, 0.5);
    font-style: italic;
    margin: 8px 0 0 0;
    padding: 0;
    letter-spacing: 0.3px;
}

/* ============================================
   CONTENT
   ============================================ */
.legal-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scroll-behavior: smooth;
    color: #b8c5d6;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Scrollbar personnalisée */
.legal-modal-content::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.legal-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00f0ff 0%, #00b8cc 100%);
    border-radius: 4px;
}

.legal-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00f0ff 0%, #00e0f0 100%);
}

/* ============================================
   TYPOGRAPHIE DU CONTENU
   ============================================ */
.legal-modal-content h2 {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.8rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    background: linear-gradient(135deg, #00f0ff 0%, #00c8d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-modal-content h2:first-child {
    margin-top: 0;
}

.legal-modal-content h3 {
    color: #e0e6ed;
    font-size: 1rem;
    font-weight: 600;
    margin: 1.2rem 0 0.6rem 0;
}

.legal-modal-content h4 {
    color: #c0c8d4;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
}

.legal-modal-content p {
    margin: 0.8rem 0;
}

.legal-modal-content ul,
.legal-modal-content ol {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
}

.legal-modal-content li {
    margin: 0.4rem 0;
}

.legal-modal-content strong {
    color: #ffffff;
    font-weight: 600;
}

.legal-modal-content a {
    color: #00f0ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-modal-content a:hover {
    color: #00c8d4;
    text-decoration: underline;
}

/* ============================================
   TABLEAUX
   ============================================ */
.legal-modal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.legal-modal-content th,
.legal-modal-content td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-modal-content th {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-modal-content tr:last-child td {
    border-bottom: none;
}

.legal-modal-content tr:hover td {
    background: rgba(0, 240, 255, 0.05);
}

/* ============================================
   CODE
   ============================================ */
.legal-modal-content code {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE - ACCESSIBILITÉ 45-90 ANS
   ============================================ */
@media (max-width: 480px) {
    .legal-modal-content {
        padding: 20px 16px;
        font-size: 1rem;
        line-height: 1.8;
    }

    .legal-modal-content h2 {
        font-size: 1.1rem;
    }

    .legal-modal-content h3 {
        font-size: 1rem;
    }

    .legal-modal-title h3 {
        font-size: 1.1rem;
    }

    .legal-modal-content table {
        font-size: 0.85rem;
    }

    .legal-modal-content th,
    .legal-modal-content td {
        padding: 10px 8px;
    }
}

/* Grande taille pour accessibilité */
@media (min-width: 768px) {
    .legal-modal-content {
        font-size: 1rem;
        padding: 28px 32px;
    }

    .legal-modal-content h2 {
        font-size: 1.25rem;
    }

    .legal-modal-title h3 {
        font-size: 1.3rem;
    }
}
