body {
    background-color: #000000;
    height: 100%;
    margin: 0;
    position: relative;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

p {
    color: white;
    font-family: 'PTSansNarrow-Regular', sans-serif;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

#background img {
    position: absolute;
    object-fit: cover;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    will-change: transform;
}

#gradient {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 5%, #0a0a0a 34%);
    width: 100%;
    min-height: 100vh;
    flex-grow: 1;
    position: relative;
    z-index: 0;
}

/* ==========================================================================
   TOPBAR & NAVIGATION
   ========================================================================== */
#topbar {
    position: sticky;
    top: 20px;
    z-index: 1000;
    width: calc(100% - 40px);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 30px;
    box-sizing: border-box;
    margin: 10px auto;
    border-radius: 16px;
    background: rgba(10, 10, 10, 0.747);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    flex-wrap: nowrap;
}

#logo {
    width: 180px;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
    margin-top: 5px;
    cursor: pointer;
}

#logo:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Conteneur des liens */
.nav-links {
    display: flex;
    gap: 40px;
    flex-grow: 1;
    justify-content: center;
}

.nav-links a,
.nav-links p {
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    margin: 0;
    color: #ffffff;
    text-decoration: none;
    font-family: 'PTSansNarrow-Regular', sans-serif;
}

/* Animation soulignement */
.nav-links a::after,
.nav-links p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, rgb(190, 16, 170), rgb(190, 16, 53));
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links p:hover::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links p:hover {
    color: rgba(190, 16, 77, 1);
}

/* BOUTON BURGER */
#burger-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

#burger-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

#burger-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

#burger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

#burger-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* SLOGAN */
#slogan {
    position: relative;
    z-index: 2;
    margin-top: 150px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

#slogan_p {
    color: white;
    font-size: 78px;
    font-weight: bold;
    font-family: 'Poetsen One', 'Mooli', sans-serif;
    text-align: left;
    margin: 0 0 5px 0;
}

#slogan_boost {
    font-size: 28px;
    font-family: 'PTSansNarrow-Regular', sans-serif;
    font-weight: normal;
    color: white;
    text-align: left;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.godot-engine {
    background-color: #478cbf;
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 900;
    font-style: italic;
    font-size: 28px;
}

/* RÉSEAUX SOCIAUX */
#medias {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 80px auto 0;
    padding: 0 20px;
    text-transform: uppercase;
}

.medias_p {
    font-size: 35px;
    margin-bottom: 15px;
    text-align: left;
    font-weight: bold;
    font-family: 'ADLaM Display', sans-serif !important;
    background: linear-gradient(to top right, #be104d, rgb(190, 16, 53));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#social_buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
}

#discord,
#youtube,
#github {
    cursor: pointer;
    padding: 12px;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(15, 15, 15, 0.377);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

#discord:hover,
#youtube:hover,
#github:hover {
    background: rgba(190, 16, 77, 0.3);
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(190, 16, 77, 0.6);
    box-shadow: 0 15px 30px rgba(190, 16, 77, 0.4);
}

#discord_img,
#youtube_img,
#github_img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

#discord:hover img,
#youtube:hover img,
#github:hover img {
    transform: scale(1.1);
}

/* ===========================
   SECTION PROJETS
   =========================== */
#projects {
    position: relative;
    z-index: 2;
    margin-top: 100px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

#projects_p {
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: left;
    font-family: 'ADLaM Display', sans-serif !important;
    text-transform: uppercase;
    background: linear-gradient(to top right, #be104d, rgb(190, 16, 53));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 30px;
}

.project-card-link {
    display: block;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.project-card-link:hover {
    transform: scale(1.02);
}

.project-card-link:hover .project-card {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.project-card {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.project-card:hover {
    transform: scale(1.03);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    border-radius: 12px;
    filter: brightness(0.6);
    transition: filter 0.3s ease;
}

.project-card:hover .project-image {
    filter: brightness(0.8);
}

.project-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.project-title {
    font-size: 28px;
    color: #ffff00;
    font-family: 'Poetsen One', sans-serif;
    margin: 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
}

.project-description,
.project-tag {
    display: none;
}

.project-card::after {
    content: attr(data-title);
    position: absolute;
    bottom: -20px;
    left: 5px;
    color: white;
    font-size: 12px;
    font-family: 'PTSansNarrow-Regular', sans-serif;
    font-weight: bold;
}

/* À PROPOS */
#about_us {
    position: relative;
    z-index: 2;
    color: white;
    margin-top: 100px;
    padding: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#about_us_p {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
    font-family: 'PTSansNarrow-Regular', sans-serif;
}

#about_us_text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 20px;
    font-family: 'PTSansNarrow-Regular', sans-serif;
}

#about_us ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#about_us ul li {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 2;
    padding-left: 25px;
    position: relative;
    font-family: 'PTSansNarrow-Regular', sans-serif;
}

#about_us ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: rgba(190, 16, 77, 1);
    font-weight: bold;
}

/* FOOTER */
#footer {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 30px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* DROPDOWN (LANGUE) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: rgba(10, 10, 10, 0.747);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    color: white;
    font-family: 'PTSansNarrow-Regular', sans-serif;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.dropbtn:hover {
    border-color: rgba(190, 16, 77, 1);
    background-color: rgba(190, 16, 77, 0.2);
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    padding-top: 10px;
    min-width: 150px;
    z-index: 1000;
    flex-direction: column;
}

.dropdown-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
}

.dropdown-content button {
    width: 100%;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    color: white;
    padding: 12px 16px;
    text-align: center;
    font-family: 'PTSansNarrow-Regular', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
}

.dropdown-content button:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
}

.dropdown-content button:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-content button:hover {
    background-color: rgba(190, 16, 77, 0.5);
    color: white;
}

.dropdown:hover .dropdown-content {
    display: flex;
}

.arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    border: none;
    outline: none;
}

/* ==========================================================================
   RESPONSIVE - TABLETTE (1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE (900px)
   ========================================================================== */
@media (max-width: 900px) {
    #topbar {
        position: relative;
    }

    #burger-btn {
        display: flex;
    }

    /* CACHE LE MENU PAR DÉFAUT */
    .nav-links-wrapper {
        position: static;
        display: none;
    }

    .nav-links {
        display: none !important;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        width: 100%;
        
        /* --- GLASSMORPHISME (COMME LA TOPBAR) --- */
        background: rgba(10, 10, 10, 0.747);
        backdrop-filter: blur(15px) saturate(180%);
        -webkit-backdrop-filter: blur(15px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
        border-radius: 0 0 16px 16px;
        /* --- FIN GLASSMORPHISME --- */
        
        padding: 30px 0;
        text-align: center;
        gap: 25px;
        z-index: 999;
    }

    /* AFFICHE LE WRAPPER QUAND C'EST OUVERT */
    .nav-links-wrapper.mobile-open {
        display: contents;
    }

    /* AFFICHE LE MENU QUAND LE WRAPPER EST OUVERT */
    .nav-links-wrapper.mobile-open .nav-links {
        display: flex !important;
        animation: slideDown 0.3s ease;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RESPONSIVE - TRÈS MOBILE (650px)
   ========================================================================== */
@media (max-width: 768px) {
    #slogan_p {
        font-size: 48px;
    }

    #slogan_boost {
        font-size: 18px;
    }

    #projects_p,
    .medias_p {
        font-size: 28px;
    }

    #about_us_p {
        font-size: 24px;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .project-card {
        margin-bottom: 20px;
    }

    #social_buttons {
        gap: 20px;
    }

    #discord,
    #youtube,
    #github {
        width: 60px;
        height: 60px;
    }

    #discord_img,
    #youtube_img,
    #github_img {
        width: 40px;
        height: 40px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
