/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-color: #0e0b15;
    --panel-color: #171323;
    --panel-hover: #241e39;
    --primary-red: #b02a1e;
    --accent-red: #d63628;
    --border-color: #494069;
    --text-white: #ffffff;
    --text-gray: #bbbbbb;
    --accent-green: #4ea346;
    --accent-green-bright: #60c956;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-white);
    font-family: 'Bricolage Grotesque', sans-serif;
    line-height: 1.6;
}

/* Fontes personnalisées */
@font-face {
    font-family: 'minecraft';
    src: url('../fonts/minecraft-ten-lowercase.ttf');
}

/* Liens */
a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

/* ==========================================================================
   2. TYPOGRAPHIE (Responsive)
   ========================================================================== */
h1, h2, h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-variation-settings: "wdth" 100;
    margin-bottom: 1rem;
}

/* Desktop Styles */
@media screen and (min-width: 992px) {
    h1 { font-size: 3.5rem; font-weight: 800; }
    h2 { font-size: 2.8rem; font-weight: 700; }
    h3 { font-size: 1.8rem; font-weight: 600; }
    p { font-size: 1.25rem; font-weight: 400; }
}

/* Mobile Styles */
@media screen and (max-width: 991px) {
    h1 { font-size: 2.8rem; font-weight: 700; }
    h2 { font-size: 2.2rem; font-weight: 700; line-height: 1.2; }
    h3 { font-size: 1.8rem; font-weight: 600; }
    p { font-size: 1.1rem; font-weight: 400; line-height: 1.6; }
}

.red { color: var(--primary-red); }
.subtitle { color: var(--text-gray); font-style: italic; }

/* ==========================================================================
   3. LAYOUT & STRUCTURE
   ========================================================================== */
.whiteband {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--border-color) 13%, var(--border-color) 87%, rgba(255,255,255,0) 100%);
    height: 1px;
    margin: 40px 8vw;
    font-size: 1px;
    color: transparent;
    transition: background 0.3s ease, opacity 0.3s ease, height 0.3s ease;
}


.whiteband-mod {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--border-color) 13%, var(--border-color) 87%, rgba(255,255,255,0) 100%);
    height: 1px;
    margin: 30px 8vw;
    font-size: 1px;
    color: transparent;
    width: 60%;
    opacity: 0.4;
}

.title-mod{
  display: flex;
    align-items: center; /* Centre le texte verticalement dans sa zone */
    justify-content: center;
    min-height: 4rem;    /* Réserve l'espace pour 2 lignes de texte */
    margin: 10px 0;
    text-align: center;
    color: var(--text-white);
}

.teammember:hover b{
    color: var(--accent-green);
}

.mod:hover b{
    color: var(--accent-green);
}

.member:hover b{
    color: var(--accent-green);
}

.teammember:hover .whiteband,
.mod:hover .whiteband-mod,
.member:hover .whiteband {
    background: linear-gradient(90deg, rgba(78,163,70,0) 0%, var(--accent-green) 13%, var(--accent-green) 87%, rgba(78,163,70,0) 100%);
    opacity: 1;
    height: 2px;
}

/* Correction écart interne des cartes (image_5a38bb.png) */
.member .whiteband, .teammember .whiteband {
    width: 60%;
    opacity: 0.4;
}

.fullscreen {
    display: block;
    margin: 5% auto 0 auto;
    width: 70%;
    max-width: 1200px;
    border-radius: 20px;
}

@media screen and (max-width: 1100px) {
    .fullscreen { width: 100%; border-radius: 0; }
    .whiteband { margin: 30px 7vw; }
}

/* Conteneurs Flex */
.boxmenu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 5% 8%;
}

.wrapbox, .homewrapbox {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    align-items: stretch; /* Hauteur uniforme */
}

/* Force les liens à s'étirer pour que les cartes soient égales */
.wrapbox > a, .homewrapbox > a {
    display: flex;
}

@media screen and (max-width: 1100px) {
    .boxmenu { flex-direction: column; text-align: center; margin: 15% 6%; }
}

/* Visibilité Mobile/PC */
@media screen and (min-width: 1101px) {
    .mobileyes { display: none !important; }
}
@media screen and (max-width: 1100px) {
    .mobileno { display: none !important; }
}

/* ==========================================================================
   4. COMPOSANTS (Cards & Buttons)
   ========================================================================== */

/* Cartes (Membres & Mods) */
.member, .teammember {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 25px 20px; /* Un peu plus de padding pour respirer */
    width: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.4s ease, background-color 0.4s ease;
}

.member:hover, .teammember:hover {
    background-color: var(--panel-hover);
    transform: translateY(-10px);
}

.member img, .teammember img {
    width: 100%;
    max-width: 180px;
    height: 130px; /* Fixé pour l'alignement */
    object-fit: contain; /* IMAGE ENTIÈRE */
    border-radius: 15px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.member p, .teammember p {
    margin: 2px 0;
}

.mod, .mod {
    background-color: transparent;
    border: none;
    border-radius: 30px;
    padding: 0;
    width: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 130px;
    text-align: center;
    transition: all 0.4s ease;
}

.mod:hover, .mod:hover {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    padding: 30px 20px;
    min-height: 300px;
    transform: translateY(-10px);
}

.mod img, .mod img {
    width: 100%;
    max-width: 180px;
    height: 130px; /* Fixé pour l'alignement */
    object-fit: contain; /* IMAGE ENTIÈRE */
    border-radius: 15px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.mod, .mod p {
    margin: 2px 0;
}

/* Hide text by default */
.mod p, .mod .title-mod, .mod .new {
    display: none;
}

/* Show text on hover */
.mod:hover p, .mod:hover .title-mod, .mod:hover .new {
    display: block;
}

.mod:hover .title-mod {
    display: flex;
}

/* Étiquette "NEW" */
.new {
    background-color: var(--primary-red);
    color: #fff;
    font-size: 0.85rem;
    font-style: italic;
    padding: 4px 15px;
    border-radius: 50px;
    display: inline-block;
    margin: 5px 0;
}

/* Description en bas */
.member p:last-child, .teammember p:last-child {
    color: var(--text-gray);
}

/* Boutons */
.buybutton {
    background-color: var(--primary-red);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    margin-top: 20px;
    transition: 0.3s;
}

.buybutton:hover {
    background-color: var(--accent-red);
    box-shadow: 0 5px 15px rgba(176, 42, 30, 0.4);
}

/* ==========================================================================
   HEADER STYLE
   ========================================================================== */
.header {
    background-color: #120e1f; /* Le violet très sombre de l'image */
    border: 1px solid #494069; /* La bordure fine visible */
    border-radius: 15px;       /* Coins arrondis type "rectangle" et non "pilule" */
    padding: 12px 30px;        /* Espacement interne */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px auto;
    width: 90%;
    max-width: 1400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Léger relief */
}

/* Conteneur des liens à droite */
.rolling-container {
    display: flex;
    gap: 30px; /* Espace entre les mots */
    align-items: center;
}

.rolling-text {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: #49b43c; /* Couleur de base verte*/
    transition: 0.3s ease;
}

/* Application des couleurs spécifiques de l'image */
/* Mods et Wallpapers restent blancs */
.rolling-container a:nth-child(1), 
.rolling-container a:nth-child(2),
.rolling-container a:nth-child(3),
.rolling-container a:nth-child(4),
.rolling-container a:nth-child(5) {
    color: #49b43c;;
}

.rolling-container a:hover {
    transform: translateY(-1px);
    color: #d2621c;; 
}

/* Logo */
.headerimage {
    height: 48px; /* Taille fidèle à la capture */
    display: block;
    width: auto;
}

/* ==========================================================================
   HEADER STYLE (Rectangle Arrondi - Fidèle à image_4b9dd1.png)
   ========================================================================== */
.header {
    background-color: #120e1f; /* Le violet très sombre de l'image */
    border: 1px solid #494069; /* La bordure fine visible */
    border-radius: 15px;       /* Coins arrondis type "rectangle" et non "pilule" */
    padding: 12px 30px;        /* Espacement interne */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px auto;
    width: 90%;
    max-width: 1400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Léger relief */
}

/* Conteneur des liens à droite */
.rolling-container {
    display: flex;
    gap: 30px; /* Espace entre les mots */
    align-items: center;
}

/* Logo */
.headerimage {
    height: 48px; /* Taille fidèle à la capture */
    display: block;
    width: auto;
}

/* Header Mobile (pour garder la cohérence) */
.mobile-header {
    background-color: #120e1f;
    border: 1px solid #494069;
    border-radius: 15px; /* Même arrondi que le desktop */
    padding: 12px 20px;
    margin: 12px auto;
    width: 92%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Menu Mobile Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--panel-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
}

.mobile-nav.open { transform: translateY(0); }

.mobile-nav .rolling-text {
    font-size: 2rem;
}

/* Style de base du bouton hamburger */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1100; /* Assure-toi qu'il reste au-dessus du menu mobile */
}

.bar {
    width: 30px;
    height: 3px;
    background-color: #ffffff; /* Couleur de tes barres */
    border-radius: 5px;
    transition: all 0.3s ease-in-out; /* Animation fluide */
}

/* --- ÉTAT OUVERT (Transformation en croix) --- */

/* La première barre descend et pivote à 45° */
.hamburger-menu.open .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

/* La barre du milieu devient invisible et glisse vers la gauche */
.hamburger-menu.open .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

/* La troisième barre monte et pivote à -45° */
.hamburger-menu.open .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.social-links img {
    height: 60px;
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.WelcomeText {
    padding-left: 100px;
}

.wlc-subtitle {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.description {
  margin-top: 0px;
}

.pf-image{
  height: 20%;
}

/* ==========================================================================
   PAGE WALLPAPERS - CSS ISOLÉ
   ========================================================================== */

/* --- Conteneur Principal --- */
.pf-container {
    padding: 10px 8vw 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.pf-header {
    text-align: center;
    margin-bottom: 40px;
}

/* --- Grille Strictement 3 colonnes --- */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 colonnes égales */
    gap: 25px;
}

.pf-item {
    background-color: var(--panel-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pf-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.pf-item img {
    width: 100%;
    height: 250px; /* Hauteur fixe pour l'unité visuelle */
    object-fit: cover; /* Recadre sans déformer */
    display: block;
}

/* --- Système de Popup (Lightbox) --- */
.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.close-hint {
    color: var(--text-white);
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.popup-img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.active .popup-img {
    transform: scale(1);
}

/* --- Footer Réparé --- */
.footer {
    width: 100%;
    margin-top: 80px;
}

.footer-wrap {
    display: flex;
    justify-content: space-between; /* Logo à gauche, Social à droite */
    align-items: center;
    padding: 2rem 8vw;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    max-width: 250px;
    height: auto;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 25px;
}

.footer-socials img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.footer-socials img:hover {
    transform: scale(1.15) translateY(-5px);
}

/* --- Responsive Adaptations --- */

/* On passe en 2 colonnes sur tablette */
@media screen and (max-width: 1100px) {
    .pf-grid { grid-template-columns: repeat(2, 1fr); }
    
    .footer-wrap {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

/* On passe en 1 colonne sur mobile */
@media screen and (max-width: 700px) {
    .pf-grid { grid-template-columns: 1fr; }
    h1 { font-size: 2.2rem; }
    
}

/* Classes de visibilité (pour matcher ton HTML) */
@media screen and (min-width: 1101px) {
    .mobileyes { display: none !important; }
}

@media screen and (max-width: 1100px) {
    .mobileno { display: none !important; }
    .wlc-subtitle {
        display: block;
        gap: 0;
    }
    .WelcomeText{
        padding: 0 30px;
    }
}

/* ==========================================================================
   MODS PAGE SPECIFIC
   ========================================================================== */

.page-title {
    margin-top: 8rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

.category-title {
    text-align: center;
    margin-bottom: 2rem;
}

/* Couleurs spécifiques pour les badges (New / Addon tags) */
.badge-delight {
    background-color: #af8f55 !important;
}

.badge-create {
    background-color: #7594f0 !important;
}

.badge-end {
    background-color: #a160c1 !important;
}

.badge-sins {
    background-color: #9c4d57 !important;
}

.badge-spelunking{
    background-color: #2e3086 !important;
}

/* Optimisation pour les grilles de mods sur mobile */
@media screen and (max-width: 600px) {
    .wrapbox {
        gap: 15px;
        padding: 10px;
    }
    .member {
        max-width: 300px;
    }
    .wlc-subtitle {
    gap: 5px;
    }
}

/* Titres de la page Mods */
.page-title { margin-top: 8rem; text-align: center; font-size: 3.5rem; }
.category-title { text-align: center; margin-top: 4rem; margin-bottom: 2rem; }

/* Couleurs des Badges d'Addons */
.badge-furniture { background-color: #a02fe2 !important; }
.badge-exoticism { background-color: #e2b22f !important; }
.badge-end { background-color: #a160c1 !important; }
.badge-ac { background-color: #2e3086 !important; }
.badge-delight { background-color: #af8f55 !important; }
.badge-create { background-color: #7594f0 !important; }
.badge-sins { background-color: #9c4d57 !important; }
.badge-spelunking { background-color: #4e9a22 !important; }

/* Footer alignement spécifique pour matcher ton design Home */
.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 8vw;
}

.ressources{
    text-align: center;
    margin-top: 4%;
}