/* ==================================== */
/* 0. GÉNÉRAL ET BASE                   */
/* ==================================== */
:root {
    /* Couleurs inspirées du style "Dark" de votre ancienne nav */
    --color-dark: #212529;
    --color-light: #f8f9fa;
    --color-primary: #4CAF50; /* Vert pour les CTA */
    --color-secondary: #0d6efd; /* Bleu pour Google Play (référence Bootstrap) */
}

body {
    margin: 0;
    font-family: sans-serif;
    background-color: var(--color-light);
    color: var(--color-dark);
}

.section-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 5px;
}

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 40px 0;
}

/* ==================================== */
/* 1. NAVIGATION                        */
/* ==================================== */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-dark);
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    color: var(--color-light);
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.nav-logo {
    margin-right: 8px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-link {
    color: var(--color-light);
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-light);
}

.nav-toggler {
    display: none; /* Caché sur desktop */
    background: none;
    border: none;
    color: var(--color-light);
    font-size: 1.5em;
    cursor: pointer;
}

/* Rends la navigation réactive */
@media (max-width: 768px) {
    .nav-content {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none; /* Caché par défaut en mobile */
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: #333;
        margin-top: 10px;
    }

    .nav-links li {
        margin: 0;
        border-top: 1px solid #444;
    }
    
    .nav-links li:last-child {
        border-bottom: 1px solid #444;
    }

    .nav-link {
        display: block;
        padding: 15px;
    }
    
    .nav-links.is-open {
        display: flex; /* Affiché quand la classe is-open est ajoutée par JS */
    }

    .nav-toggler {
        display: block;
    }
}


/* ==================================== */
/* 2. CARROUSEL MOBILE                  */
/* ==================================== */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 90%;
    max-width: 700px;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%; /* Prend 100% de la largeur du conteneur */
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    background-color: #fff;
}

.carousel-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.cta-carousel {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.cta-carousel.primary {
    background-color: var(--color-primary);
    color: white;
}

.cta-carousel.secondary {
    background-color: #eee;
    color: var(--color-dark);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    opacity: 0.8;
}

.carousel-button:hover {
    opacity: 1;
}

.prev { left: 10px; }
.next { right: 10px; }

/* ==================================== */
/* 3. CARTES DE JEUX DESKTOP & STORES    */
/* ==================================== */

/* Grille pour les cartes de jeux Desktop */
.game-card-grid {
    display: grid;
    /* Réutilisation de la technique auto-fit pour la réactivité */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    padding: 20px 0;
}

.game-card.desktop {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
}

.game-card.desktop img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.cta-desktop {
    display: inline-block;
    margin-top: 15px;
    background-color: var(--color-dark);
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

/* Liens vers les stores (Section "Où nous trouver") */
.store-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.store-link {
    display: block;
    width: 300px;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.store-link:hover {
    transform: translateY(-5px);
}

.store-icon {
    position: absolute;
    bottom: -5px;
    right: 10px;
    font-size: 4em;
    opacity: 0.2;
    color: #fff;
}

.google-play {
    background-color: #3DDC84; /* Vert Google Play */
}

.itch-io {
    background-color: #FA5C5C; /* Rouge Itch.io */
}

.social-x {
    background-color: var(--color-dark); /* Noir/Dark pour X */
}

/* --- Styles pour la Grille de Widgets Itch.io --- */

.itch-widget-grid {
    display: grid;
    /* Crée des colonnes qui prennent au moins 552px (la largeur de vos widgets) 
       mais s'ajustent automatiquement (auto-fit) */
    grid-template-columns: repeat(auto-fit, minmax(552px, 1fr)); 
    gap: 30px; /* Espace entre les widgets */
    justify-content: center; /* Centre les éléments dans la grille */
    padding: 20px 0;
}

/* Conteneur pour s'assurer que l'iframe s'étend à 100% de la colonne Grid */
.widget-wrapper {
    /* Cache tout débordement (même si l'iframe a une taille fixe) */
    overflow: hidden; 
    /* Permet à l'iframe d'être centré si la colonne est plus grande que 552px */
    display: flex; 
    justify-content: center;
}

.itch-widget-grid iframe {
    /* L'iframe doit conserver sa taille pour éviter les problèmes d'affichage Itch.io, 
       mais nous nous assurons que le conteneur Grid gère la réactivité. */
    width: 552px; 
    height: 167px;
    border: none;
    border-radius: 5px;
}


/* Réactivité : Sur les petits écrans, l'iframe prend toute la largeur */
@media (max-width: 600px) {
    .itch-widget-grid {
        /* Force une seule colonne et utilise minmax pour que l'iframe prenne 100% */
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    
    .itch-widget-grid iframe {
        /* L'iframe doit maintenant s'adapter à la largeur disponible */
        width: 100%; 
        max-width: 552px;
        /* Peut être utile si l'iframe est trop large par défaut */
        transform: scale(0.9); 
        transform-origin: top center;
        height: 150px; /* Ajustement de la hauteur si l'échelle change */
    }
}

/* --- NOUVEAUX STYLES DE LIENS MULTIMÉDIAS --- */

.gd-games-link {
    background-color: #211746; /* Vert anis/lime pour gd.games */
}

.discord-link {
    background-color: #5865F2; /* Le violet emblématique de Discord */
}

.youtube-channel {
    background-color: #FF0000; /* Rouge YouTube */
}

.tiktok-channel {
    background-color: #000000; /* Noir TikTok, vous pouvez utiliser un gris foncé si le fond est trop sombre */
    position: relative;
    /* Petit effet d'icône TikTok (facultatif) */
    box-shadow: 4px 0 0 #25F4EE, -4px 0 0 #FE2C55; 
}

/* ==================================== */
/* 4. PIED DE PAGE (Non-Bootstrap)      */
/* ==================================== */
#main-footer {
    background-color: #333;
    padding: 20px;
    color: #ccc;
    border-top: 5px solid var(--color-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copy {
    display: flex;
    align-items: center;
}

.footer-copy img {
    margin-right: 10px;
}

.copyright-text {
    margin-right: 20px;
}

.social-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.social-links li {
    margin-left: 15px;
}

.social-links a {
    color: #ccc;
    font-size: 1.5em;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copy {
        flex-direction: column;
        margin-bottom: 15px;
    }

    .copyright-text, .footer-email {
        margin: 5px 0;
    }

    .social-links {
        justify-content: center;
        margin-top: 15px;
    }
}