/* ============================================================================
   COMPOSANT — Fenêtres légales
   Mentions légales, confidentialité, conditions générales de vente.
   ============================================================================ */

/* Mentions légales, Politique de confidentialité — Fenêtres légales */

.legal-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: var(--z-legal-modal);
    background: rgba(13, 13, 13, 0.6);
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    
    
}

.legal-modal.open {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.legal-dialog {
    background: var(--bg-color);
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
}

.legal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 40px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.legal-head h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.15rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding-left: 0.18em;
}

.legal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-color);
    padding: 10px 0 10px 20px;
    flex-shrink: 0;
    touch-action: manipulation;
    outline: none;
}

/* Mentions légales, Politique de confidentialité — Fenêtres légales */

.legal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 30px 40px 40px;
}

.legal-body h4 {
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-color);
    margin: 26px 0 10px;
}

.legal-body h4:first-child {
    margin-top: 0;
}

.legal-body p {
    font-weight: 300;
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--text-muted-strong);
    margin-bottom: 10px;
    overflow-wrap: break-word;
}

.legal-date {
    color: var(--text-muted-aa);
    font-size: 0.72rem;
    margin-top: 24px;
}

/* Conditions générales de vente — titres en gras sur trois niveaux, tailles décroissantes, espacés (sous-titre = niveau 0) */

.legal-body .legal-t0 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 22px;
}

.legal-body .legal-t1 {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 72px 0 24px;
}

.legal-body .legal-t2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-color);
    margin: 44px 0 12px;
}

.legal-body .legal-t3 {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-color);
    margin: 28px 0 8px;
}

@media print {
    .legal-modal {
        display: none !important;
    }
}

.legal-close:focus-visible, .legal-link:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .legal-modal.open {
        animation: none;
    }
}

@media (max-width: 768px) {
    .legal-modal {
        padding: 15px;
    }
    .legal-head {
        padding: 20px 22px 16px;
    }
    .legal-head h3 {
        font-size: 0.95rem;
    }
    .legal-body {
        padding: 22px 22px 30px;
    }
}
