/* ==================================== */
/* 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 (Ajustement de la taille et des contrôles) */
/* ==================================== */
.carousel-container {
    position: relative;
    overflow: hidden;
    /* AUGMENTATION DE LA TAILLE : Plus large, moins comme un simple téléphone */
    width: 90%; 
    max-width: 700px; 
    margin: 40px auto;
    border-radius: 20px; 
    /* Ombre subtile, identique pour l'effet flottant */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-item {
    flex: 0 0 100%;
    padding: 30px 20px;
    box-sizing: border-box;
    text-align: center;
    background-color: #fff;
    /* Laisser une hauteur confortable */
    min-height: 550px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carousel-item img {
    /* Ajustement de la hauteur maximale pour le nouvel espace */
    max-width: 90%; 
    height: auto;
    max-height: 220px; 
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 
}

.carousel-item h3 {
    font-size: 1.8em; /* Légèrement plus grand */
    margin-bottom: 5px;
    color: var(--color-dark);
}

.carousel-item p {
    color: #6c757d;
    margin-bottom: 30px;
    max-width: 80%; /* Pour une meilleure lecture */
}

/* --- Styles des boutons CTA (Google Play) --- */

.cta-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 25px; /* Légèrement plus grand */
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    margin-top: auto;
    transition: background-color 0.3s, transform 0.1s;
    width: 85%; 
    max-width: 350px;
}

.cta-carousel.primary {
    background-color: var(--color-dark); 
    color: var(--color-light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-carousel.primary:hover {
    background-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.25);
}

.cta-carousel.secondary {
    background-color: #f0f0f0;
    color: var(--color-dark);
    border: 1px solid #ddd;
}

.cta-carousel.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f0f0f0;
    color: #888;
    box-shadow: none;
}

.cta-carousel i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* --- Styles des flèches de navigation (Trèèès discrets) --- */

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none; 
    /* Utilisation d'une couleur plus claire et moins contrastée */
    color: #888; 
    border: none; /* Suppression de la bordure pour un look plus lisse */
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    /* Rendre les flèches transparentes jusqu'au survol du carrousel-container */
    opacity: 0; 
    transition: opacity 0.3s, background-color 0.3s;
    font-size: 1.8em; /* Plus grande, mais invisible */
}

/* Affichage des flèches UNIQUEMENT au survol du conteneur parent */
.carousel-container:hover .carousel-button {
    opacity: 0.8; 
}

.carousel-button:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

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

/* Correction pour les petits écrans : les flèches sont visibles par défaut */
@media (max-width: 768px) {
    .carousel-button {
        opacity: 0.7; /* Légèrement visible en mobile pour guider l'utilisateur */
        top: auto; /* Déplacement en bas */
        bottom: 10px;
        transform: none;
        font-size: 1.5em;
        padding: 5px 10px;
        color: var(--color-dark);
        background-color: rgba(255, 255, 255, 0.8);
        border-radius: 8px;
    }

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

    .prev { left: 40%; }
    .next { right: 40%; }
}

/* ==================================== */
/* 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;
    }
}