/* Importation des polices */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* Variables */
:root {
    /* Couleurs Cyberpunk */
    --primary-color: #FFFF00;       /* Jaune Pac-Man/Cyberpunk */
    --secondary-color: #FFFFFF;     /* Blanc cassé */
    --background-color: #000000;    /* Noir */
    --accent-color: #00FFFF;        /* Cyan pour les accents */
    --code-color: #FF00FF;          /* Magenta */

    /* Card */
    --card-bg: rgba(0, 0, 0, 0.6);
    --card-border: #222;

    /* Tailles */
    --max-width: 1200px;
}

/* ==========================================================================
   Styles Généraux
   ========================================================================== */
body {
    font-family: 'VT323', monospace;
    background-color: var(--background-color);
    color: var(--secondary-color);
    margin: 0 auto;
    max-width: var(--max-width);
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Press Start 2P', monospace;
    font-weight: normal;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}



/* ==========================================================================
   Hero Section
   ========================================================================== */
   .hero {
    height: 80vh; /* Augmenté pour plus d'espace */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden; /* Pour s'assurer que l'image de fond ne déborde pas */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/fond.jpeg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(50%); /* Assombrit l'image de fond */
    z-index: -1;
}

.hero * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4.5rem; /* Légèrement plus grand */
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.2em;
    animation: flicker 2s linear infinite;
}

.hero p {
    font-size: 2rem; /* Légèrement plus grand */
    margin-bottom: 2.5rem;
    color: var(--secondary-color);
    max-width: 800px; /* Limite la largeur du texte pour une meilleure lisibilité */
}

.hero .btn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: var(--background-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero .btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Media Queries pour la responsivité */
@media screen and (max-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    .hero p {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 768px) {
    .hero {
        height: 70vh;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        height: 60vh;
        padding: 1rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
    .hero .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Styles de base pour les cartes */
.highlight-card,
.deal-card,
.review-card {
    background-color: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 600px; /* Limite la largeur maximale */
    margin: 1rem auto; /* Centre chaque carte horizontalement */
    font-family: Arial, sans-serif; /* Police homogène */
}

.highlight-card:hover,
.deal-card:hover,
.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Styles pour les images */
.highlight-card img,
.deal-card img {
    width: 100%; /* L'image prend toute la largeur de la carte */
    height: auto; /* Garde le ratio d'origine de l'image */
    max-height: 300px; /* Limite la hauteur maximale */
    object-fit: cover; /* Ajuste l'image pour qu'elle remplisse l'espace sans déformation */
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Effet de survol sur les images */
.highlight-card:hover img,
.deal-card:hover img {
    transform: scale(1.05); /* Zoom léger */
    filter: brightness(1.1); /* Légère augmentation de la luminosité */
}

/* Styles pour le contenu des cartes */
.highlight-card h3,
.deal-card h3,
.review-card h3 {
    font-size: 1.5rem;
    margin: 1rem;
    line-height: 1.3;
    text-align: center; /* Centre le texte des titres */
}

.highlight-card p,
.deal-card p,
.review-card p {
    font-size: 1rem;
    padding: 0 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    text-align: center; /* Centre le texte des descriptions */
}

/* Conteneur pour centrer toutes les cartes */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centre les cartes horizontalement */
    gap: 20px; /* Espacement entre les cartes */
}

/* Media queries pour la responsivité */
@media (max-width: 768px) {
    .highlight-card,
    .deal-card,
    .review-card {
        max-width: 100%; /* Les cartes occupent toute la largeur sur petits écrans */
        margin-left: auto;
        margin-right: auto; /* Centre les cartes sur petits écrans */
    }

    .highlight-card h3,
    .deal-card h3,
    .review-card h3 {
        font-size: 1.3rem; /* Réduit légèrement la taille des titres sur petits écrans */
        text-align: center;
    }

    .highlight-card p,
    .deal-card p,
    .review-card p {
        font-size: 0.9rem; /* Réduit légèrement la taille du texte sur petits écrans */
        text-align: center;
    }
}


/* ==========================================================================
   Boutons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--code-color);
    color: var(--background-color);
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 0.1em;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Liste des jeux (Game Listing)
   ========================================================================== */
.game-listing {
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Search & Filter Bar (Game Listing)
   ========================================================================== */
.search-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.search-bar {
    flex: 1;
    display: flex;
    margin-right: 1rem;
}

#game-search {
    width: 70%;
    max-width: 500px;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    color: var(--secondary-color);
    background-color: var(--background-color);
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.6);
}

#game-search::placeholder {
    color: var(--accent-color);
}

.search-btn {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: 2px solid var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 0.1em;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.search-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.7);
}

.filter-options {
    display: flex;
    align-items: center;
}

.filter-options label {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.filter-options select {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* ==========================================================================
   Grille des jeux (Game Grid)
   ========================================================================== */
   .game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.game-image {
    width: 100%;
    height: 200px; /* Hauteur fixe pour toutes les images */
    object-fit: contain; /* Affiche toute l'image sans la couper */
    background-color: #000; /* Ajoute un fond noir pour les espaces vides autour de l'image */
    transition: filter 0.3s ease, transform 0.3s ease;
    filter: brightness(50%) grayscale(80%);
}

/* Effet au survol */
.game-card:hover .game-image {
    filter: brightness(100%) grayscale(0%);
}

.game-info {
    padding: 1rem;
}

.game-title {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.game-year,
.game-description {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    color: var(--secondary-color);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--accent-color);
}



/* ==========================================================================
   Responsive Design
   ========================================================================== */
/* Pour les écrans de taille moyenne */
@media screen and (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Pour les petits écrans */
@media screen and (max-width: 768px) {
    .hero {
        height: 40vh;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .page-title {
        font-size: 2.5rem;
    }

    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        margin-bottom: 1rem;
    }

    .filter-options {
        justify-content: space-around;
    }
}

/* Pour les très petits écrans */
@media screen and (max-width: 480px) {
    .hero {
        height: 30vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .filter-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-options label {
        margin-bottom: 0.3rem;
    }

    #game-search,
    .search-btn {
        border-radius: 5px;
    }
}
