/* ===== Variables ===== */
:root {
    --clr-bg: #ffffff;
    --clr-section: rgba(255, 255, 255, 0);
    --clr-text: #111;
    --clr-primary: #e00;
    --clr-secondary: #000000;
    --clr-muted: rgba(136, 136, 136, 0.91);
    --font-base: 'Poppins', sans-serif;
}

/* ===== Reset & global ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-base), sans-serif;
    background: var(--clr-bg);
    color: var(--clr-text);
    scroll-behavior: smooth;
    overflow-x: hidden;
    background: url('https://r4.wallpaperflare.com/wallpaper/1005/778/557/star-wars-darth-vader-emperor-palpatine-stormtrooper-wallpaper-ca40b0359be0727024af78b27952860a.jpg') no-repeat center center fixed;
    background-size: cover;
}
.containerhd {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 10px 10px
}
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
    background-color: rgb(255, 255, 255);
    border-radius: 10px 10px 0 0;
}

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--clr-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.4s ease;
}
#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid var(--clr-muted);
    border-top: 6px solid var(--clr-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--clr-section);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.site-header > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}
.logo {
    height: 40px;
}

/* Menu mobile : slide-in avec hauteur auto */
.nav-toggle {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
}

.main-nav {
    position: fixed;
    top: 70px;
    right: -100%;
    height: auto;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    transition: right 0.3s ease;
    z-index: 1001;

    width: auto;
    min-width: 200px;
    max-width: 280px;
    box-sizing: border-box;
}
.main-nav.open {
    right: 0;
    background: white;
}

/* Menu liens : taille normale */
.main-nav a {
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--clr-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}
.main-nav a:hover {
    background: rgba(255, 255, 255, 0);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    margin-top: 73px;
    min-height: 60vh;
    background: url('assets/banner.png') no-repeat center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}
.hero-content {
    position: relative;
    text-align: center;
    max-width: 90%;
}
body .hero .hero-content h1 {
    font-family: 'Lobster', cursive;
    font-size: 100px;
    margin-bottom: 0.5rem;
    color: rgba(165, 6, 6, 0.91);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}
.hero-content p {
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: transform 0.2s, background 0.3s;
    text-align: center;
    cursor: pointer;
    user-select: none;
    width: 100%;
    max-width: 220px;
    box-sizing: border-box;
}

/* Icone dans bouton */
.btn-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    margin: 0;
}

/* Couleurs spécifiques par bouton */
.btn-discord {
    background-color: #5865F2;
    color: white;
}
.btn-discord:hover {
    background-color: #4752C4;
}

.btn-soon {
    background-color: var(--clr-muted);
    color: white;
    cursor: default;
}

.btn-minecraft {
    background-color: #62B653;
    color: white;
}

.btn-league {
    background-color: #0070FF;
    color: white;
    cursor: default;
}
.btn-hd2 {
    background-color: #000000;
    color: white;
    cursor: default;
}

.btn-vrchat {
    background-color: #ffffff;
    color: #000000;
    cursor: default;
}

.btn-jdr {
    background-color: #5a0303;
    color: white;
    cursor: default;
}
/* Texte secondaire sous le bouton */
.sub {
    font-size: 0.85rem;
    color: rgba(255 255 255 / 0.8);
    line-height: 1.2;
}

/* ===== Sections ===== */
.section {
    background: var(--clr-section);
    padding: 3rem 1.5rem;
    text-align: center;
}
.section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--clr-secondary);
}

.section h3 {
    margin-top: 35px;
    font-style: oblique;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--clr-secondary);
}
.section p,
.section li {
    line-height: 1.6;
}

/* ===== About layout ===== */
.about-container {
    display: flex;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: flex-start;
    padding: 1rem 15px;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.about-poster {
    flex: 0 0 350px;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    object-fit: cover;
}

.about-texts-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text {
    width: 100%;
    max-width: none;
    text-align: left;
    font-size: 1rem;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

/* ===== Map Section ===== */
#map {
    background: var(--clr-section);
    padding: 3rem 1.5rem;
    text-align: center;
}

#map h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--clr-primary);
}

#map p {
    font-size: 1rem;
    color: var(--clr-text);
    margin-bottom: 2rem;
}

.map-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.map-container iframe {
    border: none;
    max-width: 100%;
    width: 860px;
    height: 580px;
}

/* Grid “Nos communautés” */

.links-grid {
    display: block;
    grid-template-columns: repeat(auto-fit, minmax(1200px, 1fr));
    max-width: 800px;
    margin: 65px auto 0;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}


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

.gallery figure {
    margin: 0; /* supprime marge par défaut */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery figure a {
    text-decoration: none;
    color : black;
    transition: transform 0.2s;
}
.gallery figure a:hover{
    text-decoration: underline;
    transform: scale(1.05);
}

.gallery img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    transition: transform 0.2s;
}

.gallery img:hover {
    transform: scale(1.05);
}

.gallery figcaption {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--clr-muted);
    text-align: center;
    user-select: none;
}
/* ===== Vidéastes ===== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-container iframe {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0);
}

.video-container p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--clr-muted);
    text-align: center;
}
.twitch-section {
    background-color: rgba(30, 30, 30, 0);
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
}

.twitch-section h2 {
    color: #000000; /* Couleur Twitch */
    font-size: 2rem;
    margin-bottom: 2rem;
}

.twitch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.twitch-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(145, 70, 255, 0);
    background-color: rgb(0, 0, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.twitch-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

.twitch-container p {
    margin: 0.8rem 0 1rem;
    font-size: 1.1rem;
    color: #ccc;
    font-style: italic;
}


/* ===== Footer ===== */
.site-footer {
    background: var(--clr-section);
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--clr-secondary);
}

.footer-content ul {
    list-style-type: none;
    padding: 0;
}

.footer-content ul li {
    display: inline;
    margin-right: 20px;
    list-style-type: none;
}

.footer-link {
    color: var(--clr-primary);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}


/* ===== Responsive ≥768px ===== */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .main-nav {
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        right: 0;
        flex-wrap: nowrap;
        text-align: center;
    }

    .main-nav a {
        border: none;
        margin-left: 1.5rem;
        padding: 0;
        white-space: normal;
        color: var(--clr-text);
        text-decoration: none;
    }

    .main-nav a:first-child {
        margin-left: 0;
    }

    .main-nav a:hover {
        text-decoration: none;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .about-container {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        max-width: 900px;
        padding: 3rem 0;
    }

    .about-poster {
        width: 350px;
    }

    .about-text {
        max-width: none;
        width: auto;
        text-align: left;
    }
}
