:root {
    /* Fond beaucoup plus sombre (0.45) pour un contraste maximal */
    --glass-bg: rgba(0, 0, 0, 0.45); 
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --text-color: #ffffff;
    /* Gradient vert conservé */
    --primary-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    height: 100vh;
    /* Changement: 100% au lieu de 100vw pour éviter le scroll horizontal accidentel */
    width: 100%;
    background: #093028;  /* Fallback */
    /* Gradient Vert Profond */
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364); 
    background: linear-gradient(to right, #134E5E, #71B280); 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Changement: Empêche le zoom double-tap sur certains navigateurs mobiles */
    touch-action: manipulation;
    position: relative;
}

/* Style de la vidéo d'arrière-plan */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1; 
    opacity: 0.3; 
    pointer-events: none;
}

/* Bouton Soutenir (Fixe en haut à droite sur Desktop) */
.support-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    text-decoration: none;
    color: #ffffff; /* Blanc pur forcé */
    background: rgba(0, 0, 0, 0.5); /* Fond plus sombre */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600; /* Texte plus gras */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8); /* Ombre texte renforcée */
}

.support-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* Formes d'arrière-plan */
.background-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0; 
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #23a6d5; 
    background: #38ef7d; 
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: #11998e; 
    animation-delay: 2s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #a8ff78; 
    opacity: 0.6;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -50px); }
}

/* Conteneur principal Glassmorphism */
.glass-container {
    position: relative;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5); /* Ombre boite renforcée */
    text-align: center;
    max-width: 800px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-height: 90vh;
    overflow-y: auto; 
}

header h1 {
    font-size: 3rem;
    color: #ffffff; /* Blanc pur */
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0,0,0,0.6); /* Ombre renforcée */
}

header p {
    color: #ffffff; 
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Ombre très sombre */
    font-weight: 600; /* Texte plus gras pour lisibilité */
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Boutons / Cartes de jeu */
.game-card {
    text-decoration: none;
    background: rgba(0, 0, 0, 0.5); /* Fond de carte assombri */
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    width: 200px;
    transition: all 0.4s ease;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover {
    transform: translateY(-10px);
    background: rgba(0, 0, 0, 0.7); /* Très sombre au survol */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.7);
}

.game-card:hover::before {
    opacity: 1;
}

.game-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600; 
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.game-card p {
    font-size: 0.9rem;
    color: #ffffff; /* Blanc pur */
    margin-bottom: 1rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.game-card .icon {
    font-size: 3rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.game-card:hover .icon {
    transform: scale(1.2) rotate(10deg);
}

#card-bridge:hover .icon { color: #a8e6cf; }
#card-barbu:hover .icon { color: #dcedc1; }
/* Ajout couleur pour le Whist */
#card-whist:hover .icon { color: #c4f0ff; }

/* Versionning Footer */
.versionning {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #ffffff; /* Blanc pur */
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 1rem;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 600px) {
    .glass-container {
        padding: 1.5rem;
        width: 95%;
        margin-top: 4rem; /* Augmenté pour laisser place au bouton centré */
    }

    header h1 {
        font-size: 2rem;
    }

    .cards-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .game-card {
        width: 100%;
        max-width: 280px;
        padding: 1.5rem;
    }

    /* Redéfinition complète du bouton sur mobile pour éviter qu'il soit tronqué */
    .support-btn {
        top: 15px;
        left: 50%; /* Position horizontale à 50% */
        right: auto; /* Annule l'alignement droite */
        transform: translateX(-50%); /* Centre parfaitement le bouton */
        padding: 8px 20px;
        font-size: 0.8rem;
        width: max-content;
        white-space: nowrap;
    }
    
    /* Maintien du centrage + petit effet au survol sur mobile */
    .support-btn:hover {
        transform: translateX(-50%) translateY(-2px);
    }
}