:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-bg: #1e293b;
    --card-border: #334155;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 20%);
}

header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Grid des jeux */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Carte de jeu */
.game-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.game-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .card-image img {
    transform: scale(1.05);
}

/* Overlay "Jouer" */
.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .play-overlay {
    opacity: 1;
}

.card-content {
    padding: 1.5rem;
}

.card-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* Bouton GitHub */
.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 12px;
    background: #24292e;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    justify-content: center;  /* Centre le texte horizontalement */
    text-align: center; 
}

.github-link:hover {
    background: #2f363d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Ajustement de la carte pour inclure le bouton */
.game-card {
    display: flex;
    flex-direction: column;
}

.game-card > a:first-child {
    flex: 1;
}

.github-link::before {
    content: "⚙️ ";  /* ou "💻 " ou "🔗 " */
    margin-right: 6px;
}
