:root {
    --primary-color: #533b78; /* Violet profond et neutre */
    --accent-color: #9274d6;  /* Violet lumineux doux */
    --cyan-glow: #cbb4ff;     /* Remplace le cyan par un halo lila/blanc élégant */
    
    /* Un vrai effet verre fumé neutre et haut de gamme */
    --glass-bg: rgba(20, 20, 25, 0.45); 
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 24px;
    
    --text-main: #ffffff;
    --text-muted: #a0a5ab;
}

/* --- 1. STICKY FOOTER SETUP --- */
body {
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #050505;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    
    /* Structure Flex pour le footer collant */
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    /* FOND ANIMÉ */
    background: linear-gradient(-45deg, #050505, #12081f, #071f1f, #000000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

main#main-content {
    flex: 1; /* Pousse le footer vers le bas */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Texture de bruit */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/noise.png'); /* Optionnel */
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- FOND ANIMÉ MATRIX / DATA STREAM --- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Reste derrière tout le contenu */
    pointer-events: none; /* Ne bloque aucun clic */
    opacity: 0.18; /* Opacité subtile et élégante (ajustable de 0.10 à 0.40) */
}

/* --- HEADER PREMIUM --- */
header {
    position: sticky;
    top: 20px;
    z-index: 1000;
    padding: 0 20px;
}

.navbar-glass {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 40px;
    vertical-align: middle;
    transition: transform 0.3s;
    display: block;
}
.logo img:hover { transform: scale(1.1); }

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
    align-items: center;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav ul li a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--cyan-glow);
    transition: all 0.3s;
    transform: translateX(-50%);
}
nav ul li a:hover::after { width: 100%; }

/* --- USER PILL (Connecté) --- */
.cta-header { display: flex; align-items: center; }

.user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 5px 5px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 42px;
}

.user-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.user-pill .username {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 100%;
}

.user-pill img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    display: block;
}

/* Dropdown Menu */
.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: #151515;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 10000;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #ccc;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* --- BOUTON DISCORD PREMIUM (Non connecté) --- */
.btn-discord-login {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(88, 101, 242, 0.1); 
    color: #e0e0e0;
    padding: 8px 24px;
    border-radius: 50px;
    border: 1px solid rgba(88, 101, 242, 0.5);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn-discord-login:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: #5fffd1;
    color: #5fffd1;
    box-shadow: 0 0 15px rgba(95, 255, 209, 0.3);
    transform: translateY(-2px);
}

.btn-discord-login svg {
    fill: currentColor;
    transition: transform 0.3s;
}

.btn-discord-login:hover svg {
    transform: scale(1.1) rotate(-5deg);
}

/* --- HERO SECTION --- */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
}

#hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    width: 100%;
}

.hero-content { flex: 1; }

.hero-content h1 {
    font-size: 4em;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    background: linear-gradient(to right, #fff, #a37acc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25em;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 550px;
}

.hero-image video {
    width: 100%;
    max-width: 650px;
    border-radius: 24px; /* Arrondis très doux */
    /* Ombre profonde de présentation */
    box-shadow: 0 25px 60px rgba(0,0,0,0.8), 0 0 40px rgba(255,255,255,0.05); 
    border: 1px solid var(--glass-border);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
}

.hero-image video:hover {
    transform: scale(1.02) translateY(-8px);
    box-shadow: 0 35px 70px rgba(0,0,0,0.9), 0 0 50px rgba(203, 180, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: opacity 0.5s ease, visibility 0.5s;
    z-index: 500;
}

.scroll-indicator.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--cyan-glow);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(95, 255, 209, 0.4);
}

.scroll-icon {
    width: 20px;
    height: 35px;
    border: 2px solid var(--cyan-glow);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 0 10px rgba(95, 255, 209, 0.2);
}

.scroll-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* --- GAME CARDS (Affiches Premium) --- */
.game-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.game-item {
    width: 280px; 
    height: 420px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    background: #111;
    display: flex;
    flex-direction: column;
}

/* 1. L'image prend 85% pour laisser la place au titre en bas */
.game-item img {
    width: 100%;
    height: 85%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.7s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* 2. Le titre prend les 15% restants, bien centré et lisible */
.game-item span {
    width: 100%;
    height: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 20, 0.95);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 10;
    transition: color 0.3s ease, background 0.3s ease;
}

/* --- EFFETS AU SURVOL --- */
.game-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.7), 0 0 30px rgba(146, 116, 214, 0.2);
    border-color: rgba(255,255,255,0.3);
}

.game-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.game-item:hover span {
    color: var(--accent-color);
    background: rgba(25, 25, 30, 0.95);
}

/* Carte En Construction (Taille identique) */
.game-item.coming-soon {
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
    border: 2px dashed rgba(255,255,255,0.1);
    align-items: center;
    justify-content: center;
    display: flex;
}

.game-item.coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255,255,255,0.2);
}

.game-item.coming-soon .content {
    text-align: center;
    padding: 20px;
    z-index: 2;
    width: 100%;
}

.game-item.coming-soon h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.game-item.coming-soon p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.game-item.coming-soon .banner {
    background: #ffc107;
    color: #000;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
}

/* Sections et Titres */
h2 { font-size: 2.5em; text-align: center; color: #fff; margin-bottom: 60px; position: relative; }
h2::after {
    content: ''; display: block; width: 60px; height: 4px; background: var(--cyan-glow);
    margin: 20px auto 0; border-radius: 2px; box-shadow: 0 0 15px var(--cyan-glow);
}

/* --- WHY US & CREATORS --- */
section { padding: 80px 0; }
.why-us-grid, .creators-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.why-us-item, .creator-card { 
    background: var(--glass-bg); 
    padding: 35px 25px; 
    border-radius: 24px; /* Plus rond, plus élégant */
    border: 1px solid var(--glass-border); 
    text-align: center; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.why-us-item:hover, .creator-card:hover { 
    transform: translateY(-10px); 
    background: rgba(30, 30, 35, 0.6); 
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(255,255,255,0.05);
}

.why-us-item img { 
    width: 64px; 
    height: 64px; 
    object-fit: contain; 
    margin-bottom: 20px; 
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.3)); 
}
.why-us-item h3 { color: #fff; margin-bottom: 15px; font-size: 1.25em; }
.why-us-item p { color: var(--text-muted); font-size: 0.95em; }

.creator-card img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--accent-color); margin-bottom: 15px; }

/* BOUTON GLOBAL PREMIUM */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 50px; /* Forme Pilule douce */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 25px rgba(146, 116, 214, 0.3); /* Halo lumineux doux */
}

.btn-primary:hover {
    background: linear-gradient(135deg, #664a93, #a68bf0);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(146, 116, 214, 0.5);
}

/* --- LAYOUT PROFIL DASHBOARD --- */
.profile-content {
    padding: 60px 0;
}

.profile-dashboard {
    display: grid;
    grid-template-columns: 350px 1fr; /* Colonne gauche fixe, droite flexible */
    gap: 40px;
    align-items: start;
}

/* Carte d'Identité (Gauche) */
.identity-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Avatar interactif */
.avatar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 25px rgba(163, 122, 204, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.avatar-wrapper:hover {
    transform: scale(1.05);
    border-color: var(--cyan-glow);
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay "Modifier" au survol */
.avatar-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay svg {
    fill: #fff;
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
}

.identity-card h2 {
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(to right, #fff, #a37acc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.identity-card h2::after { display: none; } /* Retire le soulignement global */

.identity-card .role-badge {
    display: inline-block;
    background: rgba(95, 255, 209, 0.1);
    color: var(--cyan-glow);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
    border: 1px solid rgba(95, 255, 209, 0.3);
}

/* 2. NOUVEAU BLOC "INFO COMPTE" (Gauche) */
.account-info-card {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.account-info-row:last-child {
    border-bottom: none;
}

.account-info-row span:first-child {
    color: #888;
}

.account-info-row span:last-child {
    color: #fff;
    font-weight: 600;
}

/* Panneau de Réglages (Droite) */
.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.setting-group {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 16px;
}

.setting-group h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

/* Input Group (Input + Bouton fusionnés) */
.input-group {
    display: flex;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    padding-right: 100px; /* Place pour le bouton */
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(163, 122, 204, 0.1);
}

.input-group .btn-save {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.input-group .btn-save:hover {
    background: var(--accent-color);
}

/* 3. ZONE DE DANGER (Accordéon) */
.danger-zone {
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.3);
    overflow: hidden;
}
.danger-zone h3 { color: #ea868f; border-color: rgba(220, 53, 69, 0.3); }

.danger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.danger-header:hover h3 {
    color: #ff4d4d;
}

.danger-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.danger-zone.open .danger-icon {
    transform: rotate(180deg);
}

.danger-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #dc3545;
    color: #ea868f;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}
.danger-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* --- FAT FOOTER (Correction Structure) --- */
footer {
    background: #080808; /* Fond très sombre opaque */
    border-top: 1px solid #222;
    padding: 60px 0 30px;
    margin-top: 80px;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr; /* 4 colonnes pour espacer */
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
    align-items: start;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col h4::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--cyan-glow);
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #888; font-size: 0.95rem; text-decoration: none; transition: 0.3s; display: block;}
.footer-col ul li a:hover { color: var(--cyan-glow); transform: translateX(5px); }

.footer-bottom { text-align: center; border-top: 1px solid #222; padding-top: 20px; font-size: 0.85em; color: #555; margin-top: 40px; }

/* Responsive General & Profil */
@media (max-width: 992px) {
    .navbar-glass { flex-direction: column; gap: 15px; border-radius: 20px; padding: 20px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; }
    #hero .container { flex-direction: column-reverse; text-align: center; }
    .hero-content h1 { font-size: 2.5em; }
    .hero-image video { max-width: 100%; margin-bottom: 30px; }
    .scroll-indicator { bottom: 20px; }
    
    .profile-dashboard { grid-template-columns: 1fr; }
    .identity-card { display: flex; align-items: center; gap: 20px; text-align: left; }
    .avatar-wrapper { margin: 0; width: 100px; height: 100px; }
    
    .footer-grid { text-align: center; grid-template-columns: 1fr 1fr; } /* 2 colonnes tablette */
    .footer-col h4::after { left: 50%; transform: translateX(-50%); }
}

@media (max-width: 600px) {
    .identity-card { flex-direction: column; text-align: center; }
    .avatar-wrapper { margin: 0 auto 15px; }
    .footer-grid { grid-template-columns: 1fr; } /* 1 colonne mobile */
}

/* Animation Apparition */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; border: 2px solid #050505; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* --- BOUTON RETOUR EN HAUT --- */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--cyan-glow);
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#backToTop:hover { background: var(--primary-color); color: #fff; transform: translateY(-5px); box-shadow: 0 0 20px var(--primary-color); border-color: transparent; }

/* ==========================================================================
   PAGES STATIQUES (Légal, Confidentialité, Partenaires)
   ========================================================================== */
.static-content {
    padding: 80px 0;
    background: transparent; /* Laisse voir l'animation Matrix */
}

/* Le conteneur en verre dépoli pour les textes longs */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 50px 60px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    color: var(--text-muted);
    margin: 0 auto;
    max-width: 900px;
}

.glass-panel h1 {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(to right, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
}

.glass-panel h2 {
    color: #fff;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
    font-size: 1.5rem;
}

.glass-panel p, .glass-panel ul {
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.glass-panel strong { color: #fff; }

.glass-panel a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.glass-panel a:hover {
    color: var(--cyan-glow);
    text-decoration: underline;
}

/* --- PAGE PARTENAIRES --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* On force le lien <a> à se comporter correctement dans la grille */
.partners-grid a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.partner-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto; /* On laisse la hauteur s'adapter naturellement */
}

.partner-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 30, 35, 0.6);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(255,255,255,0.05);
}

.partner-card img {
    max-width: 150px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(146, 116, 214, 0.3);
}

.partner-card h3 { color: #fff; margin-bottom: 10px; font-size: 1.5rem; }
.partner-card p { color: var(--text-muted); font-size: 0.95rem; }

.cta-partner {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 50px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    max-width: 800px;
    margin: 0 auto;
}

.cta-partner h2 { color: #fff; margin-bottom: 20px; border: none; }

/* ==========================================================================
   FENÊTRES MODALES (Pop-ups, Formulaires, etc.)
   ========================================================================== */
/* 1. Structure de base (Le fond sombre qui recouvre tout l'écran) */
.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 2. Modale active (ouverte) */
.modal.open {
    display: flex; /* Utilise Flexbox pour centrer parfaitement la fenêtre */
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* 3. La fenêtre en elle-même */
.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 30px rgba(146, 116, 214, 0.15);
    transform: translateY(-30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.open .modal-content {
    transform: translateY(0); /* Animation d'arrivée fluide */
}

/* 4. La croix de fermeture (X) */
.close-button {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-button:hover {
    color: var(--cyan-glow); /* Devient lila/blanc au survol */
}

/* --- STYLE DU FORMULAIRE À L'INTÉRIEUR --- */
.modal-content h2 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    border: none;
    font-size: 1.8rem;
}

.modal-content .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content textarea {
    width: 100%;
    padding: 14px 20px;
    background-color: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(146, 116, 214, 0.3);
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.modal-content textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-content .btn-primary {
    width: 100%;
    margin-top: 10px;
}