@import url(https://fonts.googleapis.com/css2?family=Iceberg&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Audiowide&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Lilita+One&display=swap);

#nav {
    justify-content: center
}

#nav,
* {
    box-sizing: border-box
}

*,
body,
header {
    margin: 0
}

.footer-section ul,
.nav-list {
    list-style-type: none;
    padding: 0
}

*,
.nav-list,
header {
    padding: 0
}

* {
    cursor: url('../cursor/base.cur'), auto
}

body {
    font-family: 'Lilita One', cursive
}

.play-button,
a,
button,
input[type=submit] {
    cursor: url('../cursor/select.cur'), pointer
}

input,
textarea {
    cursor: url('../cursor/text.cur'), text
}

::selection {
    cursor: url('../cursor/select.cur'), default
}

header {
    display: flex;
    flex-direction: column-reverse;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    backdrop-filter: blur(4px);
    border-bottom: 2px solid white;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
}

.xp-bar-container {
    position: relative;
    background: #e0e0e03b;
    border-radius: 18px;
    overflow: hidden;
    height: 36px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
    margin: 1rem;
    z-index: 2;
    width: 80%;
    max-width: 768px;
    margin: 1rem auto;
}

.xp-bar {
    background: linear-gradient(90deg, #38bdf8, #7b2cbf);
    height: 100%;
    transition: width 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.xp-bar-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    pointer-events: none;
}

#nav {
    height: 100%;
    display: flex;
    align-items: center;
    box-shadow: none !important;
    padding: 0 20px;
    width: 100%;
    position: relative;
    justify-content: center
}

.nav-list {
    display: flex;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    position: relative;
    justify-content: space-around;
    max-width: 1000px;
}

.nav-list li a {
    color: #fff;
    text-decoration: none;
    display: inline-block;
    transition: transform .3s ease-in-out
}

.nav-list li a:hover {
    transform: scale(1.2)
}

.nav-list li a:after {
    content: '';
    display: block;
    margin: auto;
    height: 1px;
    width: 0;
    background: 0 0;
    transition: width .5s, background-color .5s
}

.nav-list li a:hover:after {
    width: 90%;
    background: #fff
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 21px;
    cursor: pointer;
    position: absolute;
    top: 35px;
    right: 20px;
    z-index: 1100
}

#lang-switcher,
.lang-select-wrapper {
    cursor: url('../cursor/select.cur'), pointer
}

.bar {
    height: 3px;
    background-color: #fff;
    transition: .3s
}

.menu-toggle.open .bar:first-child {
    transform: rotate(45deg) translateY(8px)
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0
}

.menu-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px)
}

nav.scrolled {
    background: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, .5));
    backdrop-filter: blur(8px);
    transition: background .4s
}

.nom-auteur {
    display: flex;
    color: #fff
}

footer {
    color: #fff;
    font-family: Iceberg, cursive;
    margin: 10% auto 0 auto;
    max-width: 768px;
    padding: 1rem;
}

.footer-sections {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.version {
    font-size:0.95em;
    opacity:0.6;
    margin: 2rem 0 0 0;
}

.nom-auteur {
    justify-content: center;
    padding: 2%
}

.footer-section {
    width: 100%;
    max-width: 360px;
}

.footer-section h1 {
    font-size: 24px;
    margin-bottom: 10px;
    position: relative
}

.footer-section h1::after {
    content: '';
    display: block;
    width: 70%;
    height: 2px;
    background-color: #fff;
    margin-top: 10px
}

.footer-section ul {
    gap: 50px
}

.footer-section ul li {
    margin-bottom: 8px
}

.footer-section a {
    color: #fff;
    text-decoration: none
}

.footer-section a:hover {
    color: gray
}

.liste-footer i {
    font-size: 24px;
    margin-right: 10px
}

.social-icons {
    display: block
}

.lang-select-wrapper {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, .1);
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 4px 8px;
    backdrop-filter: blur(4px);
    transition: .3s
}

.lang-select-wrapper:hover {
    background-color: rgba(255, 255, 255, .2);
    border-color: #00ffe7
}

.lang-select-wrapper img {
    width: 20px;
    height: 14px;
    margin-right: 6px;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(255, 255, 255, .3)
}

#lang-switcher {
    background: 0 0;
    border: none;
    color: #fff;
    font-family: Audiowide, sans-serif !important;
    font-size: .95rem;
    padding: 2px 6px;
    appearance: none;
    outline: 0
}

#lang-switcher option {
    background-color: #000;
    color: #fff;
    font-family: Iceberg, cursive
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2)
}

.profile-dropdown {
    display: flex;
    align-items: center;
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 60px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    min-width: 160px;
    z-index: 1001;
    padding: 1rem 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem
}

.profile-dropdown.open .dropdown-menu {
    display: flex
}

.dropdown-menu a,
.dropdown-menu p {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    width: 100%;
    border-radius: 6px;
    transition: background .2s;
    font-family: 'Lilita One', cursive
}

.dropdown-menu a:hover {
    background: #632eb9
}

.dropdown-menu p {
    margin: 0 0 0.5rem 0;
    font-weight: bold;
    font-size: 1.1em
}

.nav-list>.profile-dropdown~li {
    margin-right: 0
}

/* === STYLES SPÉCIFIQUES POUR LE BOUTON NOTIFICATION === */
/* Bouton notification dans le dropdown du profil */
.dropdown-menu .dropdown-username a[href*="notifications"] {
    position: relative;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0 !important;
    width: auto !important;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

/* Hover du bouton notification - éviter l'extension violette */
.dropdown-menu .dropdown-username a[href*="notifications"]:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.05);
    box-shadow: none;
}

/* Badge de notification - styles optimisés */
.dropdown-menu .dropdown-username a[href*="notifications"] span {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    z-index: 1;
}

/* === STYLES MOBILES POUR LE BOUTON NOTIFICATION === */
@media (max-width: 900px) {
    /* Réduction de la taille du bouton notification sur mobile */
    .dropdown-menu .dropdown-username a[href*="notifications"] {
        font-size: 1rem;
        min-width: 20px;
        height: 20px;
        margin-left: 4px;
    }
    
    /* Badge plus petit sur mobile */
    .dropdown-menu .dropdown-username a[href*="notifications"] span {
        width: 14px;
        height: 14px;
        font-size: 0.6rem;
        top: -6px;
        right: -6px;
    }
    
    /* Empêcher le bouton notification de prendre toute la largeur */
    .dropdown-menu .dropdown-username {
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    /* Le span du pseudo prend l'espace disponible */
    .dropdown-menu .dropdown-username span:first-child {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 8px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .dropdown-menu .dropdown-username a[href*="notifications"] {
        font-size: 0.9rem;
        min-width: 18px;
        height: 18px;
    }
    
    .dropdown-menu .dropdown-username a[href*="notifications"] span {
        width: 12px;
        height: 12px;
        font-size: 0.55rem;
        top: -5px;
        right: -5px;
    }
}

@media (max-width: 900px) {
    header {
        height: auto;
    }

    #nav {
        position: inherit;
        background-color: #000;
        border-bottom: 2px solid white;
        z-index: 1;
    }

    .xp-bar-container {
        padding: 1rem;
        margin: 1rem 0 1rem 1rem;
        justify-content: flex-start;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        top: 35px;
        right: 20px
    }

    .nav-list {
        position: absolute;
        top: 100px;
        left: 0;
        width: 100vw;
        flex-direction: column;
        background-color: #000;
        display: none;
        opacity: 0;
        transform: translateY(-10px);
        transition: .3s;
        padding: 1rem 0;
        gap: 20px;
        justify-content: center;
    }

    .nav-list.active {
        display: flex;
        opacity: 1;
        transform: translateY(0)
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin: 0
    }

    #lang-switcher {
        font-size: .8rem;
        padding: 5px 10px
    }

    .dropdown-menu {
        top: 50px;
        right: auto;
        left: 0;
        min-width: 120px
    }

    .profile-dropdown {
        position: absolute;
        right: 0;
        top: 0;
        display: flex;
        align-items: center
    }

}

@media (max-width:768px) {
    
    .footer-sections {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-section {
        margin: 0 auto;
    }

    .version {
        text-align: center;
    }

    .footer-section a i {
        display: flex;
        justify-content: center;
        align-items: center
    }

    .footer-section h1::after {
        margin: 10px auto;
    }

    .liste-footer a strong,
    iframe {
        display: none
    }
}