/* ==========================================================================
   MENTIONSLEGALES.CSS
   - Page "à part" (Mentions légales / Confidentialité / CGV)
   - Objectif : rendu premium + lisible + cohérent avec ton thème
   - Scope : .legal-wrapper / .legal-container
   ========================================================================== */


/* ===========================
   1) WRAPPER (fond parallax)
=========================== */
.legal-wrapper {
    /* Optimisation : chemin relatif pour fonctionner en production */
    background-image: url('../MEDIA/IMG/fond.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    padding: 8rem 2rem;

    /* Correction du centrage : on garde uniquement le flex, qui gère parfaitement les marges internes */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}


/* ===========================
   2) CONTAINER PRINCIPAL (carte premium)
=========================== */
.legal-container {
    max-width: 1150px;
    /* Centrage de sécurité (fallback) */
    margin: 0 auto;
    background: rgba(214, 222, 231, 0.97);
    border-radius: 1.75rem;
    padding: 4.5rem 5rem;
    color: #0f172a;

    box-shadow:
        0 10px 40px rgba(0,0,0,0.18),
        0 0 60px rgba(59,130,246,0.18);

    backdrop-filter: blur(8px);
    border: 1px solid rgba(96,165,250,0.35);

    /* Animation douce (déjà cohérente avec ton thème) */
    animation: legalFloat 7s ease-in-out infinite;

    /* Pro : évite qu’une URL longue casse la mise en page */
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Animation flottante (si tu l'as aussi dans theme.css, ça ne casse pas) */
@keyframes legalFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


/* ===========================
   3) TITRES PRINCIPAUX
=========================== */
.legal-container h1 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    text-shadow: 0 0 6px #60a5fa;
}

/* Ligne néon sous le H1 */
.legal-container h1::after {
    content: "";
    display: block;
    width: 140px;
    height: 3px;
    margin: 0.8rem auto 0 auto;
    border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 10px #3b82f6;
    animation: pulseLine 3s infinite ease-in-out;
}

@keyframes pulseLine {
    0%,100% { width: 120px; opacity: .8; }
    50% { width: 180px; opacity: 1; }
}


/* ===========================
   4) SOUS-TITRES
=========================== */
.legal-container h2 {
    margin-top: 3.5rem;
    font-size: 1.9rem;
    position: relative;
    padding-left: 1rem;
}

/* Barre lumineuse à gauche */
.legal-container h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 26px;
    border-radius: 4px;
    background: linear-gradient(#3b82f6, #60a5fa);
    box-shadow: 0 0 8px #3b82f6;
}

.legal-container h3 {
    margin-top: 2rem;
    font-size: 1.25rem;
    color: #1e3a8a;
}


/* ===========================
   5) TEXTE / LISTES
=========================== */
.legal-container p,
.legal-container li {
    line-height: 1.8;
    margin-top: 0.8rem;
    font-size: 1.05rem;
}

/* Optimisation de la robustesse des listes */
.legal-container ul {
    margin-left: 1.4rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}


/* ===========================
   6) BOX IMPORTANTES (sécurité, liens CGV, etc.)
=========================== */
.highlight-box {
    background: linear-gradient(145deg,
        rgba(200,221,245,0.95),
        rgba(226,236,255,0.95));

    padding: 1.8rem;
    border-radius: 1.2rem;
    margin-top: 1.8rem;

    /* Optimisation contraste : force le texte en sombre */
    color: #0f172a;

    box-shadow:
        0 0 20px rgba(59,130,246,0.25),
        inset 0 0 10px rgba(255,255,255,0.4);

    border: 1px solid rgba(96,165,250,0.4);

    transition: transform .35s, box-shadow .35s;
}

.highlight-box:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 30px rgba(59,130,246,0.35),
        inset 0 0 12px rgba(255,255,255,0.5);
}


/* ===========================
   7) SÉPARATEUR (si tu l’utilises un jour)
=========================== */
.legal-separator {
    margin: 5rem auto;
    height: 1px;
    width: 70%;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    box-shadow: 0 0 8px #3b82f6;
}


/* ===========================
   8) LIENS (pro + accessible)
=========================== */
.legal-container a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.legal-container a:hover {
    text-decoration: underline;
    color: #3b82f6;
}

/* Focus clavier (accessibilité pro) */
.legal-container a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
    border-radius: 4px;
}


/* ===========================
   9) RESPONSIVE (en bas)
=========================== */
@media (max-width: 900px) {

    .legal-container {
        padding: 3rem 2.2rem;
    }

    .legal-container h1 {
        font-size: 2.2rem;
    }

    .legal-container h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 500px) {

    .legal-wrapper {
        padding: 5rem 1rem;
    }

    .legal-container {
        padding: 2.5rem 1.5rem;
        border-radius: 1.2rem;
    }
}

/* ===========================
   10) PREFERS REDUCED MOTION (pro)
=========================== */
@media (prefers-reduced-motion: reduce) {
    .legal-container,
    .legal-container h1::after,
    .highlight-box {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}