/**
 * EMOCARD - Modal Premium pour Mentions Légales et Politique de Confidentialité
 * Style cohérent avec le design system EMOCARD
 */

/* 🎯 MODAL OVERLAY */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 🎨 MODAL CONTAINER */
.legal-modal {
    background: #ffffff;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(170, 123, 76, 0.1);
    transform: scale(0.9) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.legal-modal-overlay.active .legal-modal {
    transform: scale(1) translateY(0);
}

/* 🎯 HEADER - Pillule simple fond blanc */
.legal-modal-header {
    padding: 24px 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.legal-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 12px 32px;
    border-radius: 50px;
    color: #aa7b4c;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(170, 123, 76, 0.1);
}

.legal-modal-icon {
    font-size: 1.3rem;
}

/* ❌ CLOSE BUTTON */
.legal-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #aa7b4c;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.legal-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg) scale(1.1);
}

/* 📄 CONTENT */
.legal-modal-content {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    color: #2c2c2c;
}

/* Custom scrollbar */
.legal-modal-content::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.legal-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #aa7b4c, #d4a574);
    border-radius: 10px;
}

.legal-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8b6238, #aa7b4c);
}

/* Typography dans le contenu */
.legal-modal-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #aa7b4c;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0e8dc;
}

.legal-modal-content h2:first-child {
    margin-top: 0;
}

.legal-modal-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-modal-content p {
    margin-bottom: 1rem;
}

.legal-modal-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-modal-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.legal-modal-content li::marker {
    color: #aa7b4c;
}

.legal-modal-content strong {
    color: #aa7b4c;
    font-weight: 600;
}

.legal-modal-content a {
    color: #aa7b4c;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.legal-modal-content a:hover {
    border-bottom-color: #aa7b4c;
}

/* 📌 BADGES */
.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(170, 123, 76, 0.1), rgba(212, 165, 116, 0.1));
    border: 1px solid rgba(170, 123, 76, 0.3);
    color: #aa7b4c;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.5rem 0.5rem 0.5rem 0;
}

/* 🔒 SECURITY INDICATOR */
.security-note {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    border-left: 4px solid #4caf50;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.security-note strong {
    color: #4caf50;
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .legal-modal {
        max-height: 90vh;
        border-radius: 20px;
        margin: 10px;
    }
    
    .legal-modal-header {
        padding: 24px 20px;
    }
    
    .legal-modal-title {
        font-size: 1.4rem;
    }
    
    .legal-modal-content {
        padding: 24px 20px;
    }
    
    .legal-modal-content h2 {
        font-size: 1.3rem;
    }
    
    .legal-modal-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .legal-modal {
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .legal-modal-header {
        padding: 20px 16px;
    }
    
    .legal-modal-title {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .legal-modal-icon {
        font-size: 1.2rem;
    }
    
    .legal-modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .legal-modal-content {
        padding: 20px 16px;
    }
    
    .legal-badge {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* ✨ ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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