:root {
    /* Dark Mode */
    
    /* Couleurs principales */
    --primary-purple: #FFD700;
    --primary-blue-dark: #0A1931;
    
    /* Dégradé des boutons */
    --button-gradient-start: #FFD700;
    --button-gradient-end: #ff8c00;
    
    /* Halo */
    --glow-color: rgba(255, 215, 0, 0.6); 

    /* Arrière-plans */
    --background-main: #0A1931; 
    --background-card: #112240;
    --section-bg-alt: #112240; 
    
    /* Textes */
    --text-primary: #EDEEF2;
    --text-secondary: #a0acd0;
    
    /* Header & Footer */
    --header-bg: #0A1931; 
    --footer-bg: #02060d; 
    --header-height: 80px;
    --footer-text: #ccd6f6;
    --footer-text-muted: #8892b0;

    --footer-profile: #000000;

    /* Menu Déroulant */
    --dropdown-bg: #112240;
    --dropdown-hover: #1d345e;

    /* Divers */
    --card-shadow: 0 4px 12px rgba(0,0,0,0.5);
    --scroll-arrow-color: #FFD700;
    --error: #e74c3c;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Général */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--header-bg);

    align-items: center;
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

    height: var(--header-height);
    
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.nav-left {
    justify-self: start;
    display: flex;
    align-items: center;
}

.desktop-links {
    display: flex;
    gap: 2rem;
}

b {
    color: var(--text-primary);
    text-transform: uppercase;
}

/* Boutons de navigation */
.hamburger-btn, .profile-icon, .lang-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Avatar de l'utilisateur connecté */
.user-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0px 10px var(--glow-color);
    border: 2px solid var(--primary-purple);
}

.hamburger-btn:hover, .profile-icon:hover, .lang-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-purple);
    transform: translateY(-2px);
}

.hamburger-btn {
    display: block;
    border: none;
    font-size: 1.5rem;
}

.profile-container {
    justify-self: end;
    position: relative;
}

.profile-icon {
    font-size: 2rem;
}

/* Logo dans le header */
.header-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-purple);
    text-decoration: none;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    letter-spacing: +10px;

    white-space: nowrap;
}

.header-logo.logo-hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}
.header-logo.logo-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Styles du Menu (anciennement mobile c'est pour ça le nom des classes) */
.mobile-menu-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - 75px);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    background-color: var(--header-bg);
    padding: 1rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateY(0);
}


.mobile-link {
    padding: 15px 2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-link:hover {
    background-color: var(--dropdown-hover);
    color: var(--primary-purple);
    padding-left: 2.5rem;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background-color: var(--dropdown-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.active {
    display: block;
    animation: fadeInDropdown 0.2s ease;
}

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

.dropdown-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--dropdown-hover);
    color: var(--primary-purple);
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(255,255,255,0.1);
    margin: 0;
}

/* Contenu principal */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
    text-align: center;
}

h1 {
    font-size: 4.5rem;
    color: var(--primary-purple);
    font-weight: 900;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: +10px;
    line-height: 1.1;
}

.v-icon {
    max-height: 1.2em;
    width: auto;
    vertical-align: middle;
    display: inline-block;
    
    margin-bottom: 0.2em; 
    margin-left: 5px;
    
    filter: drop-shadow(0 0 5px var(--glow-color));
    transition: transform 0.3s ease;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 650px;
    line-height: 1.6;
    margin: 0 auto 3rem auto;
}

/* Call To Action */
.cta-button {
    background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
    color: var(--background-card); 
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    
    box-shadow: 0 4px 15px var(--glow-color);
    
    transition: translate 0.3s ease, box-shadow 0.3s ease;
    animation: cta-pulse 2s ease-in-out infinite;
}

.cta-button:hover {
    translate: 0 -5px; 
}

@keyframes cta-pulse {
    0% {
        scale: 1;
        box-shadow: 0 4px 15px var(--glow-color);
    }
    50% {
        scale: 1.05;
        box-shadow: 0 4px 30px 5px var(--glow-color); 
    }
    100% {
        scale: 1;
        box-shadow: 0 4px 15px var(--glow-color);
    }
}

/* Autres boutons */
.other-button {
    background: linear-gradient(135deg, var(--button-gradient-start), var(--button-gradient-end));
    color: var(--background-main); 
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    
    margin: 20px auto 0 auto;
    transition: translate 0.3s ease, box-shadow 0.3s ease;
}

.other-button:hover {
    translate: 0 -5px; 
}

/* --- Boutons de la page d'accueil --- */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Bouton secondaire (Discord) */
.secondary-outline-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--text-secondary);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.secondary-outline-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

/* Section cartes */
.cards-container {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 5rem;
    flex-wrap: wrap;
}

.card {
    background: var(--background-card);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    width: 320px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Indicateur de scroll */
.scroll-indicator-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.scroll-indicator-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--scroll-arrow-color);
    background: var(--header-bg);
    border: 2px solid var(--scroll-arrow-color);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    
    box-shadow: 0 0 10px var(--glow-color);
    
    animation: bounce 2s infinite, shadow-pulse 2s infinite;
    cursor: pointer;
}

@keyframes shadow-pulse {
    0% { box-shadow: 0 0 5px var(--glow-color); }
    50% { box-shadow: 0 0 20px var(--glow-color); }
    100% { box-shadow: 0 0 5px var(--glow-color); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Section presentation */
.info-section {
    width: 100%;
    max-width: none;
    background-color: var(--section-bg-alt);
    padding: 8rem 2rem;
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%); /* penché */
}

.info-section-content {
    max-width: 1100px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.info-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.info-block.reverse {
    flex-direction: row-reverse;
}

.info-text {
    flex: 1;
    text-align: left;
}

.info-section h2 {
    font-size: 3rem;
    color: var(--text-primary);
    margin: 2rem 0 5rem 0;
    font-weight: 900; 
    text-transform: uppercase;
    letter-spacing: +10px;
    line-height: 1.1;
    text-align:center;
}

.info-text h3 {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 800;
    padding-bottom: 10px; /* Espace pour la barre */
}

/* On crée une petite barre jaune moderne en dessous */
.info-section h3::after {
    content: '';
    display: block;
    width: 60px; /* Une petite barre courte, pas tout le texte */
    height: 4px;
    background: var(--primary-purple); /* Doré */
    margin-top: 10px;
    border-radius: 2px;
}

.info-text p {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
}

/* Style des listes avec icônes */
.info-list li, .info-list-ladder li {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    list-style-type: none;
}

.info-list li {
    font-weight: 600;
}

.info-list i, .info-list-ladder i {
    color: var(--button-gradient-start);
    margin-right: 12px;
}

.info-text li {
    display: flex;
    align-items: flex-start; 
}

.info-text li i {
    flex-shrink: 0;
    margin-top: 3px; 
}

/* Liste pour page classement */
.ladder-li {
    display: block;
    text-align: justify;
}

.link-arrow {
    color: var(--button-gradient-start);
    text-decoration: none;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    padding-top: 20px;
}

.link-arrow:hover {
    text-decoration: underline;
    transform: translateY(-3px);
}

del {
    color: var(--text-secondary);
    text-decoration-color: var(--text-primary);
}

/* Images dans les sections d'info */
/* Conteneurs */
.info-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* CLASSEMENT EXPLICATION */

.ladder-main h1 {
    color: var(--text-primary);
}

.process-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 4rem;
    width: 100%;
    max-width: 1000px;
}

.process-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--background-card);
    box-shadow: var(--card-shadow);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    border-color: var(--primary-purple);
}

.step-icon {
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 1rem;
    background: rgba(255, 215, 0, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.process-step h3 {
    margin: 10px 0;
    color: #fff;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.process-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* La flèche entre les étapes */
.process-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    font-size: 2rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Images */
.feature-img {
    width: 100%; 
    max-width: 600px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Survol de l'image */
.feature-img:hover {
    transform: scale(1.02);
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 5rem 2rem 2rem;
    margin-top: 5%;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.profile-footer {
    margin-top: 0 !important;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: left;
}

.footer-col h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--button-gradient-start);
    font-weight: 900;
    text-transform: uppercase;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--footer-text);
    font-weight: 700;
}

.footer-col ul a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
}

.footer-col ul a:hover {
    color: var(--button-gradient-start);
    padding-left: 5px;
}

.footer-col ul li {
    list-style: none;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1.5rem;
    margin-top: 2rem;
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-bottom p {
    color: var(--footer-text-muted);
    font-size: 0.8rem;
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--footer-text);
    font-size: 1.5rem;

    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--button-gradient-start);
    color: #000;
    transform: translateY(-3px);
}

/* --------------------- Authentification (ancien système) --------------------- */

/* Ancien avatar quand pas discord */
.user-avatar {
    width: 35px;
    height: 35px;
    background-color: var(--primary-purple);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    border: 2px solid var(--header-bg);
}

/* Conteneur des formulaires Login/Signup */
.auth-main {
    justify-content: center;
    min-height: 80vh;
}

.auth-card {
    background: var(--background-card);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-card h2 {
    color: var(--primary-purple);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--background-main);
    color: var(--text-primary);
}

.auth-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: bold;
}

.auth-links a:hover {
    text-decoration: underline;
}

.password-requirements {
    list-style: none;
    margin-top: 10px;
    padding-left: 5px;
    text-align: left;
}

.password-requirements li {
    font-size: 0.85rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.password-requirements li.invalid {
    color: var(--text-secondary);
}
.password-requirements li.invalid i {
    color: #ccc;
}

.password-requirements li.valid {
    color: #2ecc71;
    font-weight: 600;
}
.password-requirements li.valid i {
    color: #2ecc71;
}

input:invalid {
    border-color: #888888;
}
input:focus:invalid {
    border-color: #e74c3c;
    outline: none;
}
input:valid {
    border-color: #2ecc71;
}

/* ----------------------------------------------------------------------------- */

/* Page 404*/

.error-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.error-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    max-width: 900px;
    width: 100%;
    align-items: center;
}

.error-icon-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.robot-wrapper {
    position: relative;
    font-size: 10rem;
    color: var(--text-secondary);
    animation: floatRobot 3s ease-in-out infinite;
}

.card-overlay {
    position: absolute;
    bottom: 10px;
    right: -20px;
    font-size: 4rem;
    color: #e74c3c;
    transform: rotate(15deg);
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
    animation: shakeCard 2s infinite;
}

.error-text-col {
    text-align: left;
}

.error-text-col h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-weight: 900;
    letter-spacing: -2px;
}

.error-text-col h2 {
    font-size: 1.8rem;
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.error-text-col p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 500px;
}

/* Animations 404 */
@keyframes floatRobot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes shakeCard {
    0%, 100% { transform: rotate(15deg); }
    50% { transform: rotate(25deg); }
}

/* ------------------- DASHBOARD ------------------- */

.dashboard-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-container h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 900; 
}

/* ------------------ PAGE SETTINGS PROFIL ------------------ */

.profile-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem;
    min-height: 80vh;
}

.profile-main h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-top: 1rem;
    font-weight: 900; 
}

.profile-settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

/* Style des Cartes Profil */
.profile-card {
    background: var(--background-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Style du Formulaire */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--primary-purple);
}

.input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--background-main);
    border: 1px solid rgb(from var(--text-primary) r g b / 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(106, 13, 173, 0.3);
}

.danger-zone {
    border: 1px solid rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.05);
    text-align: left;
}

.delete-btn {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    gap: 8px;

    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 0 auto;

    width: fit-content;
    min-width: 200px;
}

.delete-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* Messages d'alerte */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.alert.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.alert.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* --------- POPUP VIE PRIVEE --------- */

/* Fond */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 49, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* La boîte principale */
.modal-box {
    max-height: 60vh; 
    display: flex;
    flex-direction: column;
    background: #0f2038;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
}

.modal-header,
.modal-footer {
    flex-shrink: 0; 
}

.modal-footer {
    margin-bottom: 15px;
}

.modal-body {
    overflow-y: auto; 
    padding: 25px;
    
    scrollbar-width: thin;
    scrollbar-color: var(--primary-purple) var(--background-main);

    color: var(--text-primary);
    line-height: 1.6;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
.modal-body::-webkit-scrollbar-thumb {
    background-color: var(--primary-purple);
    border-radius: 4px;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

/* En-tête */
.modal-header {
    background: linear-gradient(90deg, var(--button-gradient-end), var(--button-gradient-start));
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--background-main);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 15px 15px 0 0;
}

.data-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: justify;
}

.data-list li {
    margin-bottom: 12px;

    display: grid;
    grid-template-columns: 25px 110px 1fr; 
    align-items: baseline;
    gap: 10px;
    font-size: 0.95rem;
}

.data-list li strong {
    text-align: left;
    white-space: nowrap;
}

.data-list li i {
    text-align: center;
    color: var(--primary-purple);
}

.small-text {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 15px;
    text-align: center;
        color: var(--text-secondary);
}

.links-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    font-size: 0.9rem;
    margin-top: 10px;
    margin-bottom: 20px;
}

.text-link {
    color: var(--text-primary);
    font-weight: bold;
    transition: color 0.3s;
}

.text-link:hover {
    color: var(--primary-purple);
    text-decoration: dotted underline;
}

/* Boutons */
.modal-footer {
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Bouton Annuler */
.ghost-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s;
}

.ghost-btn:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- PAGE PROFIL PUBLIC --- */
/* --- OSU STYLE PROFILE LAYOUT --- */

.osu-layout {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: var(--background-card);
    border-radius: 20px;
    padding-bottom: 5%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    margin-bottom: 20px;
}

/* 1. HEADER (The Horizontal Card) */
.osu-profile-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    
    background: rgba(15, 32, 56, 0.95); /* Dark Blue bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    padding: 30px;
    
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Gradient line at the top */
.osu-profile-header::before {
    content: '';
    position: absolute;
    top: 98%; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--button-gradient-start), var(--button-gradient-end));
}

/* --- LEFT: AVATAR --- */
.header-avatar-section {
    flex-shrink: 0;
    margin-right: 30px;
}

.osu-avatar {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* --- MIDDLE: INFO --- */
.header-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 8px;
}

.name-row {
    display: flex;
    align-items: baseline;
    gap: 15px;
    flex-wrap: wrap;
}

.osu-username {
    font-size: clamp(1.3rem, 2.5vw, 2.5rem);
    font-weight: 900;
    color: #fff;
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    white-space: nowrap
}

.truncated-dots {
    font-size: 0.3em; /* Un peu plus petit que le pseudo */
    color: var(--text-primary);
    letter-spacing: 1px;
    margin-left: -15px; /* Collé */
}

.osu-grade {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Badges Row */
.badges-row {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.badge-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: default;
}
.badge-pill i { color: var(--primary-purple); }

/* Bio Row */
.bio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.osu-bio {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    margin: 0;
    max-width: 500px;
}

.mini-edit-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
    transition: color 0.3s;
}
.mini-edit-btn:hover { 
    color: var(--primary-purple); 
    transform: scale(1.2);
    transition: all 0.2s ease;
}


/* --- RIGHT: STATS --- */
.header-stats-section {
    display: flex;
    gap: 20px;
    margin-left: 30px;
    padding-left: 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-purple);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 5px;
}

/* --- 2. BODY (Field Section) --- */
.osu-body-section {
    width: 100%;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15%;
}

.section-title {
    font-size: 1rem;
    font-weight: 800;
    text-align: left;
    margin: 10px 20px 20px 40px;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--primary-purple);
    margin-top: 5px;
    border-radius: 2px;
}

.team-name-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    font-style: italic;
    text-align: left;
}

.formation-tag {
    background: var(--button-gradient-start);
    color: #000;
    padding: 5px 15px;
    margin: 5px 0 0 0;
    border-radius: 20px;
    font-weight: bold;
    width:fit-content;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.formation-selector-wrapper {
    position: relative;
}

/* Select Invisible */
.ghost-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    appearance: none;
}

/* Effet au survol */
.formation-selector-wrapper:hover .formation-tag {
    background: rgba(255, 215, 0, 0.6);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Animation du petit crayon */
.formation-selector-wrapper:hover .fa-pencil-alt {
    opacity: 1 !important;
    transform: scale(1.2);
    transition: all 0.2s ease;
}

/* --- MOBILE RESPONSIVE POUR PROFIL.PHP --- */
@media (max-width: 900px) {
    .profile-viewer-main {
        padding: 2rem 0 2rem 0 !important;
    }

    .osu-profile-header::before {
    top: 99%; left: 0; right: 0;
    }

    .osu-profile-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
        padding: 30px 20px;
    }

    .header-avatar-section {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .header-info-section {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .name-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .osu-username {
        font-size: clamp(1.5rem, 2.5vw, 2.5rem);
        text-align: center !important;
        margin: auto;
        text-indent: 10px !important;
    }

    .osu-grade {
        font-size: 0.9rem;
    }
    
    .badges-row {
        justify-content: center;
    }

    .bio-row {
        justify-content: center;
        flex-direction: column;
    }

    .header-stats-section {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 20px;
        padding-top: 20px;
        width: 100%;
        justify-content: center;
    }
    
    .team-header {
        padding: 20px;
    }

    .team-name-title {
        font-size: 1.5rem;
        text-align: left;
    }

    .section-title {
        margin: 20px;
    }

    .formation-tag {
        font-size: 0.9rem;
    }
}

.profile-viewer-main {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: radial-gradient(circle at top, #1a253a 0%, #050a14 100%);
}

/* Effet de fond */
.player-card::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: var(--primary-purple);
    filter: blur(80px);
    opacity: 0.3;
    z-index: 0;
}

/* --- AVATAR --- */
.player-avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px auto;
    z-index: 1;
}

.player-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--background-card);
    box-shadow: 0 0 0 3px var(--primary-purple);
}

/* Centre bio */
.player-bio-container {
    margin: 20px 0;
    padding: 0 10px;
    text-align: center;
}

.player-bio {
    display: inline-block;
    position: relative;

    /* Sauts de lignes */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    font-style: italic;
    max-width: 80%;
    text-align: left;
}

.player-bio.empty-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.player-bio::before {
    content: '\201C'; 
    
    position: absolute;
    left: -40px;
    top: -15px;
    
    /* Police adaptée */
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-style: italic;
    
    font-size: 5rem;
    color: var(--text-primary);
    opacity: 0.5;
    line-height: 1;
}

/* Badge (pour le rang ou statut) */
.rank-badge {
    position: absolute;
    bottom: 0;
    right: 5px;
    background: var(--primary-purple);
    color: var(--background-card);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--background-card);
    font-size: 0.9rem;
}

/* Tooltip */

.tooltip {
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    
    background: var(--background-card);
    border: 1px solid var(--primary-purple);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    font-family: 'Segoe UI', sans-serif;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: var(--primary-purple);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- TEXTE & INFOS --- */
.player-info {
    position: relative;
    z-index: 1;
}

.player-name {
    margin: 0;
    font-size: 2rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.player-title {
    color: var(--text-secondary);
    margin-top: 5px;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 25px;
}

.player-stats-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.stat-pill {
    background: rgb(from var(--text-primary) r g b / 0.05);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgb(from var(--text-primary) r g b / 0.1);
}

.stat-pill.highlight {
    background: rgb(from var(--primary-purple) r g b / 0.1);
    color: var(--primary-purple);
    border-color: rgb(from var(--primary-purple) r g b / 0.3);
}

.card-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* --- FORMULAIRE ÉDITION --- */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    color: var(--primary-purple);
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.edit-textarea {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    padding: 12px;
    font-family: inherit;
    resize: none;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.edit-textarea:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

.char-count-wrapper {
    text-align: right;
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

/* ----------------------------------------- TEAM BUILDING ----------------------------------------- */
.builder-container {
    width: 70%;
    margin: 0 auto;
    text-align: center;
}

/* Terrain */
.soccer-field {
    background: linear-gradient(180deg, #2c8f2c 0%, #1a5c1a 100%);
    border: 4px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    height: 700px; 
    position: relative;
    display: flex;
    margin: 0 auto;
    flex-direction: column;
    justify-content: space-around;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Décoration */
.soccer-field::before, .soccer-field::after {
    pointer-events: none;
}
.soccer-field::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0;
    height: 2px; background: rgba(255,255,255,0.2);
}
.soccer-field::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 100px; height: 100px;
    border: 2px solid rgba(255,255,255,0.2); border-radius: 50%;
}

.field-line {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    z-index: 10;
}

/* Slots joueurs */
.player-slot {
    width: 70px; height: 70px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; position: relative;
    transition: transform 0.2s;
}
.player-slot:hover {
    z-index: 9999;
    background: rgba(255, 215, 0, 0.2);
    border-color: #f1c40f;
}
.position-label {
    position: absolute; bottom: -20px;
    font-size: 0.8rem; font-weight: bold;
    background: rgba(0,0,0,0.6); padding: 2px 6px;
    border-radius: 4px; pointer-events: none;
}
.gk-slot { border-color: #e67e22; }

/* Coach */
.coach-section { margin-top: 20px;}
.coach-slot { width: 60px; height: 60px; border-radius: 10px; margin: 0 auto;}

/* Modale */
#playerSelectorModal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-box-team {
    background: var(--background-card);
    color: var(--text-primary);
    width: 90%; max-width: 450px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    text-align: left;
}

#modalTitle {
    padding: 0 0 20px 0;
}

.close-btn {
    position: absolute; top: 10px; right: 15px;
    color: var(--text-primary);
    font-size: 24px; cursor: pointer; border: none; background: none;
}

/* Recherche */
#playerSearchInput {
    width: 100%; padding: 10px; box-sizing: border-box;
    margin-bottom: 10px; font-size: 16px;
    background: var(--background-card);
    border: 1px solid var(--primary-purple);
    color: var(--text-primary);
}

#playerSearchInput::placeholder {
    color: var(--text-secondary);
}

#playerSearchInput:focus {
    border-color: var(--primary-purple);
    outline: none; 
    
    box-shadow: 0 0 10px rgb(from var(--primary-purple) r g b / 0.4);
}

.results-grid {
    max-height: 300px; overflow-y: auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}
.search-card {
    cursor: pointer; text-align: center; padding: 5px;
    border: 1px solid #eee; border-radius: 5px;
}
.search-card:hover { background-color: #f0f0f0; }
.search-card img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.search-card span { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; }

/* Profil d'un autre */
.readonly-mode .player-slot {
    cursor: default;
    border-color: rgba(255,255,255,0.1);
}

.readonly-mode .player-slot:hover {
    background: rgba(0, 0, 0, 0.4);
}

.player-slot.is-readonly {
    cursor: default !important;
}

.player-slot.is-readonly:hover {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: none !important;
}

/* Editable */
.editable-mode .player-slot {
    cursor: pointer;
}
.editable-mode .player-slot:hover {
    border-color: #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

/* --- BASE --- */
.soccer-field { position: relative; display: block; }
.soccer-field .player-slot { 
    position: absolute; 
    transform: translate(-50%, -50%); 
    transition: all 0.5s ease; 
}
/* Le Gardien (Toujours fixe) */
.soccer-field [data-slot="1"] { top: 90%; left: 50%; }


/* =========================================
   4-4-2 DIAMANT
   ========================================= */
/* Défense */
.formation-4-4-2-diamant [data-slot="2"] { top: 60%; left: 20%; }
.formation-4-4-2-diamant [data-slot="3"] { top: 75%; left: 40%; }
.formation-4-4-2-diamant [data-slot="4"] { top: 75%; left: 60%; }
.formation-4-4-2-diamant [data-slot="5"] { top: 60%; left: 80%; }
/* Losange */
.formation-4-4-2-diamant [data-slot="6"] { top: 40%; left: 25%; }
.formation-4-4-2-diamant [data-slot="7"] { top: 55%; left: 50%; }
.formation-4-4-2-diamant [data-slot="8"] { top: 25%; left: 50%; }
.formation-4-4-2-diamant [data-slot="9"] { top: 40%; left: 75%; }
/* Attaque */
.formation-4-4-2-diamant [data-slot="10"] { top: 15%; left: 20%; }
.formation-4-4-2-diamant [data-slot="11"] { top: 15%; left: 80%; }


/* =========================================
   4-4-2 BOÎTE
   ========================================= */
/* Défense */
.formation-4-4-2-boite [data-slot="2"] { top: 70%; left: 15%; }
.formation-4-4-2-boite [data-slot="3"] { top: 85%; left: 25%; }
.formation-4-4-2-boite [data-slot="4"] { top: 85%; left: 75%; }
.formation-4-4-2-boite [data-slot="5"] { top: 70%; left: 85%; }
/* Carré */
.formation-4-4-2-boite [data-slot="6"] { top: 55%; left: 65%; }
.formation-4-4-2-boite [data-slot="7"] { top: 55%; left: 35%; }
.formation-4-4-2-boite [data-slot="8"] { top: 35%; left: 80%; }
.formation-4-4-2-boite [data-slot="9"] { top: 35%; left: 20%; }
/* Attaque */
.formation-4-4-2-boite [data-slot="10"] { top: 15%; left: 35%; }
.formation-4-4-2-boite [data-slot="11"] { top: 15%; left: 65%; }


/* =========================================
   3-5-2 LIBERTÉ
   ========================================= */
/* Défense */
.formation-3-5-2-liberte [data-slot="2"] { top: 70%; left: 75%; }
.formation-3-5-2-liberte [data-slot="3"] { top: 70%; left: 25%; }
.formation-3-5-2-liberte [data-slot="4"] { top: 75%; left: 50%; }
/* Milieu */
.formation-3-5-2-liberte [data-slot="5"] { top: 55%; left: 30%; }
.formation-3-5-2-liberte [data-slot="6"] { top: 40%; left: 20%; }
.formation-3-5-2-liberte [data-slot="7"] { top: 55%; left: 70%; }
.formation-3-5-2-liberte [data-slot="8"] { top: 40%; left: 80%; }
.formation-3-5-2-liberte [data-slot="9"] { top: 35%; left: 50%; }
/* Attaque */
.formation-3-5-2-liberte [data-slot="10"] { top: 15%; left: 30%; }
.formation-3-5-2-liberte [data-slot="11"] { top: 15%; left: 70%; }


/* =========================================
   4-3-3 TRIANGLE
   ========================================= */
/* Défense */
.formation-4-3-3-triangle [data-slot="2"] { top: 60%; left: 20%; }
.formation-4-3-3-triangle [data-slot="3"] { top: 75%; left: 40%; }
.formation-4-3-3-triangle [data-slot="4"] { top: 75%; left: 60%; }
.formation-4-3-3-triangle [data-slot="5"] { top: 60%; left: 80%; }
/* Milieu */
.formation-4-3-3-triangle [data-slot="6"] { top: 45%; left: 30%; }
.formation-4-3-3-triangle [data-slot="7"] { top: 35%; left: 50%; }
.formation-4-3-3-triangle [data-slot="8"] { top: 15%; left: 50%; }
/* Attaque */
.formation-4-3-3-triangle [data-slot="9"] { top: 45%; left: 70%; }
.formation-4-3-3-triangle [data-slot="10"]  { top: 20%; left: 20%; }
.formation-4-3-3-triangle [data-slot="11"] { top: 20%; left: 80%; }


/* =========================================
   4-3-3 DELTA
   ========================================= */
/* Défense */
.formation-4-3-3-delta [data-slot="2"] { top: 75%; left: 60%; }
.formation-4-3-3-delta [data-slot="3"] { top: 60%; left: 20%; }
.formation-4-3-3-delta [data-slot="4"] { top: 75%; left: 40%; }
.formation-4-3-3-delta [data-slot="5"] { top: 60%; left: 80%; }
/* Milieu */
.formation-4-3-3-delta [data-slot="6"] { top: 60%; left: 50%; } 
.formation-4-3-3-delta [data-slot="7"] { top: 40%; left: 35%; }
.formation-4-3-3-delta [data-slot="8"]  { top: 20%; left: 20%; }
/* Attaque */
.formation-4-3-3-delta [data-slot="9"] { top: 40%; left: 65%; }
.formation-4-3-3-delta [data-slot="10"] { top: 15%; left: 50%; }
.formation-4-3-3-delta [data-slot="11"] { top: 20%; left: 80%; }


/* =========================================
   4-5-1 ÉQUILIBRÉ
   ========================================= */
/* Défense */
.formation-4-5-1-equilibre [data-slot="2"] { top: 60%; left: 20%; }
.formation-4-5-1-equilibre [data-slot="3"] { top: 75%; left: 40%; }
.formation-4-5-1-equilibre [data-slot="4"] { top: 75%; left: 60%; }
.formation-4-5-1-equilibre [data-slot="5"] { top: 60%; left: 80%; }
/* Milieu */
.formation-4-5-1-equilibre [data-slot="6"] { top: 45%; left: 30%; }
.formation-4-5-1-equilibre [data-slot="7"] { top: 35%; left: 50%; }
.formation-4-5-1-equilibre [data-slot="8"]  { top: 25%; left: 20%; }
.formation-4-5-1-equilibre [data-slot="9"] { top: 45%; left: 70%; } 
.formation-4-5-1-equilibre [data-slot="10"] { top: 25%; left: 80%; }
/* Attaque */
.formation-4-5-1-equilibre [data-slot="11"] { top: 15%; left: 50%; }


/* =========================================
   3-6-1 HEXA
   ========================================= */
/* Défenseurs */
.formation-3-6-1-hexa [data-slot="2"] { top: 75%; left: 75%; }
.formation-3-6-1-hexa [data-slot="3"] { top: 75%; left: 25%; }
.formation-3-6-1-hexa [data-slot="4"] { top: 75%; left: 50%; }
/* Hexagone */
.formation-3-6-1-hexa [data-slot="5"] { top: 40%; left: 20%; } 
.formation-3-6-1-hexa [data-slot="6"] { top: 60%; left: 60%; } 
.formation-3-6-1-hexa [data-slot="7"] { top: 60%; left: 40%; } 
.formation-3-6-1-hexa [data-slot="8"] { top: 25%; left: 30%; } 
.formation-3-6-1-hexa [data-slot="9"] { top: 40%; left: 80%; } 
.formation-3-6-1-hexa [data-slot="10"] { top: 25%; left:70%; } 
/* Attaque */
.formation-3-6-1-hexa [data-slot="11"] { top: 15%; left: 50%; }


/* =========================================
    5-4-1 DOUBLE VOLANTE
   ========================================= */
/* Défense */
.formation-5-4-1-double-volante [data-slot="2"] { top: 60%; left: 25%; } 
.formation-5-4-1-double-volante [data-slot="3"] { top: 75%; left: 30%; }
.formation-5-4-1-double-volante [data-slot="4"] { top: 75%; left: 50%; }
.formation-5-4-1-double-volante [data-slot="5"] { top: 75%; left: 70%; }
.formation-5-4-1-double-volante [data-slot="6"]  { top: 25%; left: 30%; }
/* Milieu */
.formation-5-4-1-double-volante [data-slot="7"] { top: 60%; left: 75%; }
.formation-5-4-1-double-volante [data-slot="8"] { top: 45%; left: 60%; }
.formation-5-4-1-double-volante [data-slot="9"] { top: 45%; left: 40%; }
.formation-5-4-1-double-volante [data-slot="10"] { top: 15%; left: 50%; }
/* Attaque */
.formation-5-4-1-double-volante [data-slot="11"] { top: 25%; left: 70%; }

/* --- SÉLECTEUR DE FORMATION --- */

/* --- AJUSTEMENT DU COACH --- */
.coach-slot {
    margin: 0 !important;
    flex-shrink: 0;
}

/* --- STYLES DES GRADES --- */
.pseudo-stylised {
    font-weight: bold;
    transition: text-shadow 0.3s ease;
}

/* --- STYLES DES BADGES --- */
.badge-stylised {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2); /* Fond légèrement assombri */
}

/* Scrollbar personnalisée pour les menus */
.scrollable-menu::-webkit-scrollbar { width: 8px; }
.scrollable-menu::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.scrollable-menu::-webkit-scrollbar-thumb { background-color: var(--primary-purple); border-radius: 4px; }

/* --- MESSAGERIE GLOBALE --- */
.global-chat-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: rgba(11, 25, 44, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    display: flex;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.global-chat-panel.active { right: 0; }

@media (max-width: 900px) {
    .global-chat-panel { width: 100%; right: -100%; }
}

/* Colonne de gauche (Liste des amis) */
.chat-sidebar {
    width: 75px;
    background: rgba(0,0,0,0.3);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    overflow-y: auto;
    gap: 15px;
}
.chat-friend-avatar {
    width: 45px; height: 45px; border-radius: 50%; object-fit: cover;
    cursor: pointer; border: 2px solid transparent; transition: all 0.2s;
    opacity: 0.5;
}
.chat-friend-avatar:hover { opacity: 1; transform: scale(1.1); }
.chat-friend-avatar.active { opacity: 1; border-color: var(--primary-purple); box-shadow: 0 0 10px var(--glow-color); }

/* Zone de Tchat principale */
.chat-main { flex: 1; display: flex; flex-direction: column; height: 100%; }
.chat-header {
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.chat-header h3 { margin: 0; font-size: 1.2rem; color: #fff; }
.close-chat-btn { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.close-chat-btn:hover { color: #e74c3c; }

.chat-messages-area {
    flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble {
    max-width: 80%; padding: 10px 15px; border-radius: 15px; font-size: 0.95rem; line-height: 1.4; word-break: break-word;
}
.chat-bubble.received { background: rgba(255,255,255,0.1); align-self: flex-start; border-bottom-left-radius: 2px; }
.chat-bubble.sent { background: var(--primary-purple); color: #000; align-self: flex-end; border-bottom-right-radius: 2px; font-weight: 500;}

.chat-input-area {
    padding: 15px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; gap: 10px;
}
.chat-input-area input {
    flex: 1; padding: 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3); color: #fff; outline: none;
}
.chat-input-area input:focus { border-color: var(--primary-purple); }
.chat-input-area button {
    background: var(--primary-purple); color: #000; border: none; border-radius: 50%;
    width: 42px; height: 42px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.chat-input-area button:hover { transform: scale(1.1); }

/* Languette pour ouvrir/fermer le tchat globalement */
.chat-toggle-btn {
    position: fixed; 
    bottom: 30px; 
    right: -10px;
    padding-right: 10px;
    background: var(--button-gradient-start);
    color: #000; 
    width: 50px;
    height: 60px; 
    border-radius: 10px 0 0 10px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer;
    z-index: 10000; 
    box-shadow: -2px 0 10px rgba(0,0,0,0.3); 
    transition: transform 0.2s;
    font-size: 1.2rem;
}

.chat-toggle-btn:hover { 
    transform: translateX(-10px);
}

.retour-accueil {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.retour-accueil:hover {
    text-decoration: underline;
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #FFD700;
    border-radius: 10px;
    border: none;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #e6c200;
}

/* --- LANDING PAGE: CLIENT HIGHLIGHT --- */
.client-highlight-block {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(10, 25, 49, 0) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: inset 0 0 50px rgba(255, 215, 0, 0.02);
}

.client-glowing-img {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

/* --- LANDING PAGE: ROADMAP SECTION --- */
.roadmap-section {
    padding: 6rem 2rem;
    background-color: var(--background-main);
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.roadmap-section h2 {
    font-size: 3rem;
    color: var(--text-primary);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 1rem;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.roadmap-card {
    background: var(--background-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.roadmap-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.roadmap-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 215, 0, 0.3);
}

.roadmap-card:hover::before {
    background: linear-gradient(90deg, var(--button-gradient-start), var(--button-gradient-end));
}

.roadmap-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.roadmap-card:hover .roadmap-icon {
    color: var(--primary-purple);
}

.roadmap-card h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.roadmap-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
    
    main { 
        padding: 3rem 1rem; 
    }
    h1 { 
        font-size: 2.5rem; 
    }

    .header-text {
        display: none;
    }

    .header-logo {
        font-size: 2rem;
    }

    .subtitle { font-size: 1rem; }

    .cta-button {
        font-size: 0.9rem;
        padding: 1rem 1rem;
    }
    
    .info-block, .info-block.reverse {
        flex-direction: column;
        gap: 3rem;
    }

    .info-section h2 {
        font-size: 1.8rem;
    }

    .info-text h3 {
        font-size: 1.4rem;
    }

    .info-visual {
        padding: 10px 0;
        width: 100%;
    }
    
    .cards-container {
        gap: 1.5rem;
    }
    
    .card {
        width: 100%;
        max-width: 350px;
    }

    .footer-container {
        text-align: center;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .social-links { 
        justify-content: center; 
    }

    /* --- Responsive Classement --- */
    .ladder-main h1 {
        font-size: 2rem;
    }

    /* --- Responsive dashboard --- */
    .dashboard-container h1 {
    font-size: 2rem;
}

    /* --- Responsive 404 --- */
    .error-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .error-text-col {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .robot-wrapper {
        font-size: 8rem;
    }

    /* --- Responsive page classement logged out --- */
    .process-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .process-arrow {
        transform: rotate(90deg); 
        height: auto;
        margin: -10px 0;
    }
    
    .process-step {
        width: 100%;
        max-width: 350px;
    }

    /* --- Responsive page profil --- */
    .profile-main h1 {
        font-size: 2rem;
    }

    .profile-main .subtitle {
        font-size: 1rem;
    }

    .delete-btn {
        margin: 20px auto 0 auto;
    }

    /* Responsive popup */

    .modal-footer .other-button {
    font-size: 0.8rem;
    padding: 1rem 2rem ;
    }

    .builder-container {
        width: 95%;
    }

    /* Responsive buttons */
    .hero-actions {
        flex-direction: column;
        gap: 2rem;
    }

    .cta-button {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .secondary-outline-btn {
        padding: 0.8rem 1.3rem;
        font-size: 0.8rem;
    }

    /* New landing page */
    .client-highlight-block {
        padding: 1.5rem;
    }

    .roadmap-section h2 {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .cta-section-button {
    margin: auto !important;
    }


}