/* Bridge Capital Investment Group - Style Blackstone */

/* Import Google Fonts - Tinos pour le texte principal et Source Sans pour les titres */
@import url('https://fonts.googleapis.com/css2?family=Tinos:ital,wght@0,400;0,700;1,400;1,700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root {
    /* Palette Blackstone - Fond blanc */
    --color-primary: #000000;
    --color-secondary: #1a1a1a;
    --color-dark: #ffffff;
    --color-dark-light: #fafafa;
    --color-text-primary: #000000;
    --color-text-secondary: #333333;
    --color-text-muted: #666666;
    --color-text-light: #999999;
    --color-border: #e5e5e5;
    --color-accent: #0066cc;

    /* Typographie */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; /* Pour BRIDGE CAPITAL */
    --font-guardian: 'Tinos', 'Georgia', serif; /* Police Tinos pour le texte principal */
    --font-source: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; /* Pour les éléments UI */

    /* Transitions */
    --transition-base: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Focus visible amélioré */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* Skip link pour accessibilité */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--color-primary);
    color: var(--color-dark);
    text-decoration: none;
    font-family: var(--font-sans);
}

.skip-link:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

body {
    font-family: var(--font-guardian); /* Tinos pour le corps */
    background: var(--color-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    position: relative;
    line-height: 1.6;
    font-weight: 400; /* Poids normal pour Tinos */
    overflow-x: hidden; /* Empêche le scroll horizontal */
    overflow-y: hidden; /* Empêche le scroll vertical sur mobile */
}

/* Container principal */
.container {
    max-width: 1200px;
    width: 90%;
    padding: 60px 20px;
    text-align: center;
    position: fixed; /* Fixe le container pour éviter le scroll */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Logo avec animation séquentielle */
.logo-container {
    margin-bottom: 0;
    display: inline-block;
    position: relative;
}

.logo-svg {
    width: 120px;
    height: 120px;
    margin-bottom: 0px; /* Collé à BRIDGE CAPITAL */
}

/* Animation séquentielle des triangles - Effet fondu doux */
.triangle-1,
.triangle-2,
.triangle-3,
.triangle-4,
.triangle-5,
.triangle-6,
.triangle-7 {
    fill: #2a2a2a;
    opacity: 0;
    animation: triangleSoftFade 8s infinite cubic-bezier(0.4, 0, 0.6, 1);
    transition: opacity 0.5s ease;
}

.triangle-1 { animation-delay: 0s; }
.triangle-2 { animation-delay: 0.2s; }
.triangle-3 { animation-delay: 0.4s; }
.triangle-4 { animation-delay: 0.6s; }
.triangle-5 { animation-delay: 0.8s; display: block !important; }
.triangle-6 { animation-delay: 1.0s; }
.triangle-7 { animation-delay: 1.2s; }

@keyframes triangleSoftFade {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    20% {
        opacity: 0.05;
        transform: scale(0.99);
    }
    40% {
        opacity: 0.10;
        transform: scale(1);
    }
    50%, 60% {
        opacity: 0.15;
        transform: scale(1);
    }
    70% {
        opacity: 0.10;
        transform: scale(1);
    }
    85% {
        opacity: 0.05;
        transform: scale(0.99);
    }
    100% {
        opacity: 0;
        transform: scale(0.98);
    }
}

/* Lignes du cube */
.cube-outline {
    stroke: var(--color-text-primary);
    stroke-width: 1;
    opacity: 1;
}

.cube-inner-line {
    stroke: var(--color-text-secondary);
    stroke-width: 0.5;
    opacity: 0.3;
}

/* Typographie principale - GARDE LE STYLE ORIGINAL */
.company-name {
    font-family: var(--font-sans); /* Police sans-serif comme l'original */
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 600; /* Poids original conservé */
    letter-spacing: 3px; /* Espacement original */
    margin-top: 0; /* Supprimé le margin négatif */
    margin-bottom: 5px; /* Réduit de 10px à 5px */
    /* Dégradé subtil en noir au lieu de blanc */
    background: linear-gradient(90deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 1s ease-out 0.5s both;
}

/* Ligne de séparation sous BRIDGE CAPITAL */
.divider-line {
    width: 280px; /* Largeur fixe correspondant à BRIDGE CAPITAL */
    height: 1px;
    background: #c0c0c0; /* Gris clair visible */
    margin: 8px auto 8px auto; /* Réduit de 15px à 8px */
    animation: fadeIn 1s ease-out 0.6s both;
}

.tagline {
    font-family: var(--font-sans); /* Même police que BRIDGE CAPITAL */
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    letter-spacing: 3px; /* Espacement comme BRIDGE CAPITAL */
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 25px; /* Encore réduit */
    font-weight: 400;
    animation: fadeIn 1s ease-out 0.7s both;
}

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

/* Message principal */
.main-message {
    margin-top: 10px; /* Rapproche le texte du logo */
    margin-bottom: 60px;
    animation: fadeIn 1s ease-out 0.9s both;
}

.construction-title {
    font-family: var(--font-guardian); /* Tinos */
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700; /* Bold pour Tinos */
    margin-bottom: 20px;
    color: var(--color-text-secondary);
}

.construction-subtitle {
    font-family: var(--font-guardian); /* Tinos */
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--color-text-muted);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    font-weight: 400;
}

/* Ligne de séparation élégante au lieu de progress bar */
.progress-container {
    width: 100%;
    max-width: 100px;
    margin: 60px auto;
    animation: fadeIn 1s ease-out 1.1s both;
}

.progress-bar {
    width: 100%;
    height: 1px;
    background: var(--color-border);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    display: none; /* Pas d'animation de chargement */
}

/* Menu de langue style Blackstone avec hamburger */
.language-menu {
    position: fixed; /* Fixe le menu pour qu'il reste visible */
    top: 40px;
    right: 40px;
    z-index: 9000; /* Augmenté pour rester au-dessus */
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all var(--transition-base);
    border-radius: 50%;
    padding: 0;
    position: relative;
}

.menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Lignes du hamburger */
.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-smooth);
    display: block;
}

/* Animation hamburger actif */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.language-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--color-dark);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 8px 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-smooth);
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 1px;
    width: 100%;
    text-align: left;
    display: block;
    text-transform: uppercase;
    font-weight: 400;
}

.lang-option:hover {
    background: var(--color-dark-light);
    color: var(--color-text-primary);
}

.lang-option.active {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* Footer style Blackstone */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    animation: fadeIn 1s ease-out 1.3s both;
    padding: 15px 40px 10px; /* Réduit de 30/20 à 15/10 */
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.footer-main {
    padding-bottom: 10px; /* Réduit de 20px à 10px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px; /* Réduit de 20px à 10px */
}

.footer-text {
    font-family: var(--font-guardian); /* Tinos */
    font-size: 0.85rem; /* Réduit légèrement */
    color: #ffffff;
    margin-bottom: 3px; /* Réduit de 5px à 3px */
    font-weight: 500;
}

.location {
    font-family: var(--font-guardian); /* Tinos */
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem; /* Réduit légèrement */
    letter-spacing: 1px;
    margin-bottom: 5px; /* Réduit de 10px à 5px */
    font-weight: 400;
}

.license-text,
.registration-text,
.vat-text {
    font-family: var(--font-guardian); /* Tinos */
    font-size: 0.7rem; /* Réduit légèrement */
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    margin-bottom: 2px; /* Réduit de 3px à 2px */
    font-weight: 400;
    line-height: 1.2; /* Ligne plus compacte */
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all var(--transition-base);
    letter-spacing: 0.5px;
    font-weight: 400;
    padding: 5px 10px;
    border-radius: 3px;
}

.footer-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Bannière de cookies style Blackstone */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-dark);
    border-top: 1px solid var(--color-border);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform var(--transition-smooth);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 20px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-primary);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-btn:hover {
    background: var(--color-text-primary);
    color: var(--color-dark);
}

.cookie-btn-accept {
    background: var(--color-text-primary);
    color: var(--color-dark);
}

.cookie-btn-accept:hover {
    background: var(--color-text-secondary);
    border-color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    /* Option : Cacher certains éléments pour un footer ultra minimal */
    .registration-text,
    .vat-text {
        display: none; /* Cache les infos secondaires sur mobile */
    }

    html, body {
        overflow: hidden !important;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height pour iOS */
        position: fixed;
        width: 100%;
    }

    .container {
        padding: 40px 15px;
        max-height: 100vh;
        overflow: hidden;
    }

    .logo-svg {
        width: 80px;
        height: 80px;
    }

    .company-name {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .divider-line {
        width: 200px; /* Plus court sur mobile */
        margin: 5px auto 5px auto; /* Encore plus proche sur mobile */
    }

    .tagline {
        letter-spacing: 2px;
        margin-bottom: 20px; /* Encore plus proche sur mobile */
    }

    .main-message {
        margin-top: 5px; /* Encore plus proche sur mobile */
    }

    .language-menu {
        position: fixed !important;
        top: 20px;
        right: 20px;
        z-index: 9999;
    }

    .footer {
        bottom: 0; /* Collé en bas sur mobile */
        padding: 8px 15px 5px; /* Ultra compact sur mobile */
    }

    .footer-main {
        padding-bottom: 5px;
        margin-bottom: 5px;
    }

    .footer-text {
        font-size: 0.7rem; /* Plus petit sur mobile */
        margin-bottom: 2px;
        font-weight: 400;
    }

    .location {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }

    .license-text,
    .registration-text,
    .vat-text {
        font-size: 0.6rem; /* Très petit sur mobile */
        margin-bottom: 1px;
        line-height: 1.1;
    }

    .footer-links {
        gap: 10px;
    }

    .footer-link {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .separator {
        font-size: 0.6rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo-svg {
        width: 70px;
        height: 70px;
        margin-bottom: 30px;
    }

    .company-name {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 0.8rem;
        margin-bottom: 50px;
    }

    .construction-subtitle {
        font-size: 0.9rem;
    }

    /* Footer ultra compact pour très petit écran */
    .footer {
        padding: 5px 10px 3px !important;
        background: rgba(0, 0, 0, 0.85) !important;
    }

    .location,
    .registration-text,
    .vat-text {
        display: none !important; /* Cache les infos non essentielles */
    }

    .footer-text {
        font-size: 0.6rem !important;
        margin-bottom: 1px !important;
    }

    .license-text {
        font-size: 0.55rem !important;
        margin-bottom: 2px !important;
    }

    .footer-main {
        border: none !important;
        padding-bottom: 2px !important;
        margin-bottom: 3px !important;
    }

    .footer-links {
        gap: 8px !important;
    }

    .footer-link {
        font-size: 0.6rem !important;
        padding: 2px 4px !important;
    }
}

/* Mode impression */
@media print {
    .language-menu,
    .progress-container,
    .cookie-banner {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* Préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Classe helper pour screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animation de changement de langue */
.lang-transition {
    animation: langChange 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes langChange {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    40% {
        opacity: 0.3;
        transform: translateY(-5px) scale(0.98);
        filter: blur(2px);
    }
    60% {
        opacity: 0.3;
        transform: translateY(3px) scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Alternative: Effet de fade croisé */
.fade-transition {
    transition: opacity 0.3s ease;
}

.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.fade-in {
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Styles pour les cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-dark);
    border-top: 1px solid var(--color-border);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    margin: 0;
    color: var(--color-text-primary);
    font-size: 14px;
    line-height: 1.6;
    font-family: var(--font-guardian); /* Tinos */
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 24px;
    border: 1px solid var(--color-text-primary);
    background: transparent;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-source); /* Source Sans pour les boutons */
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cookie-btn:hover {
    background: var(--color-text-primary);
    color: var(--color-dark);
    transform: translateY(-1px);
}

.cookie-btn-accept {
    background: var(--color-text-primary);
    color: var(--color-dark);
}

.cookie-btn-accept:hover {
    background: var(--color-text-secondary);
    border-color: var(--color-text-secondary);
}

.cookie-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
    padding: 5px;
    line-height: 1;
}

.cookie-close:hover {
    color: var(--color-text-primary);
}

/* Modale des param\u00e8tres de cookies */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.cookie-modal-overlay.show {
    opacity: 1;
}

.cookie-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--color-dark);
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-modal-content {
    padding: 40px;
    position: relative;
}

.cookie-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
    padding: 5px;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    color: var(--color-text-primary);
    transform: rotate(90deg);
}

.cookie-modal h2 {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--color-text-primary);
    letter-spacing: 1px;
}

.cookie-category {
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

.cookie-category:last-of-type {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category h3 {
    font-family: var(--font-guardian);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin: 0;
}

.cookie-category p {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Switch style pour les cookies */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border);
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--color-text-primary);
}

.cookie-switch input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

.cookie-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
}

.cookie-modal-buttons .cookie-btn {
    min-width: 120px;
}

/* Responsive pour la modale */
@media (max-width: 600px) {
    .cookie-modal-content {
        padding: 30px 20px;
    }

    .cookie-modal h2 {
        font-size: 20px;
    }

    .cookie-modal-buttons {
        flex-direction: column;
    }

    .cookie-modal-buttons .cookie-btn {
        width: 100%;
    }
}

/* Styles pour les modales légales */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.legal-modal-overlay.show {
    opacity: 1;
}

.legal-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--color-dark);
    border: 1px solid var(--color-border);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    max-width: 900px;
    width: 90%;
    height: 85vh;
    max-height: 85vh;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.legal-modal.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.legal-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.legal-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--color-dark);
    border: 1px solid var(--color-border);
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

.legal-modal-close:hover {
    color: var(--color-text-primary);
    transform: rotate(90deg);
    background: var(--color-dark-light);
}

.legal-modal-title {
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 600;
    padding: 40px 40px 20px;
    margin: 0;
    color: var(--color-text-primary);
    letter-spacing: 1px;
    border-bottom: 1px solid var(--color-border);
}

.legal-modal-body {
    flex: 1 1 auto;
    overflow-y: scroll; /* Force scroll toujours visible */
    overflow-x: hidden;
    padding: 30px 40px;
    font-family: var(--font-guardian); /* Tinos */
    color: var(--color-text-secondary);
    line-height: 1.8;
    min-height: 0; /* Important pour Firefox */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling sur iOS */
}

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

.legal-modal-body::-webkit-scrollbar-track {
    background: var(--color-dark-light);
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

.legal-modal-body section {
    margin-bottom: 30px;
}

.legal-modal-body h3 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 25px 0 15px 0;
    letter-spacing: 0.5px;
}

.legal-modal-body p {
    margin: 0 0 15px 0;
    font-size: 15px;
}

.legal-modal-body ul {
    margin: 0 0 15px 20px;
    padding-left: 20px;
}

.legal-modal-body li {
    margin-bottom: 8px;
    font-size: 15px;
}

.legal-modal-body strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.legal-modal-body a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-modal-body a:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}

.legal-intro {
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 20px !important;
}

.legal-modal-footer {
    padding: 20px 40px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    background: var(--color-dark-light);
    flex-shrink: 0; /* Empêche le footer de rétrécir */
}

.legal-modal-btn {
    padding: 12px 32px;
    border: 1px solid var(--color-text-primary);
    background: var(--color-text-primary);
    color: var(--color-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-guardian);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.legal-modal-btn:hover {
    background: var(--color-text-secondary);
    border-color: var(--color-text-secondary);
    transform: translateY(-1px);
}

/* Responsive pour les modales légales */
@media (max-width: 768px) {
    .legal-modal {
        max-width: 95%;
        max-height: 95vh;
    }

    .legal-modal-title {
        font-size: 22px;
        padding: 30px 30px 15px;
    }

    .legal-modal-body {
        padding: 20px 30px;
    }

    .legal-modal-body h3 {
        font-size: 16px;
    }

    .legal-modal-body p,
    .legal-modal-body li {
        font-size: 14px;
    }

    .legal-modal-footer {
        padding: 15px 30px;
    }

    .legal-modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .legal-modal-title {
        padding: 25px 20px 12px;
        font-size: 20px;
    }

    .legal-modal-body {
        padding: 15px 20px;
    }

    .legal-modal-footer {
        padding: 12px 20px;
    }

    .legal-modal-btn {
        width: 100%;
        padding: 14px;
    }
}