/* === Fonts === */
@font-face {
    font-family: 'WuWaFont';
    src: url('assets/font/H7GBKHeavy.woff2') format('woff2');
    font-style: normal;
    font-weight: normal;
}



/* === Global Styles === */
body {
    background-image: url(assets/img/background/Wuthering-Waves-Background.webp);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-family: 'WuWaFont', sans-serif;
    margin: 0;
}

h1,
h2,
h3 {
    font-weight: normal;
}

/* === Header === */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 10px;
}

.home-button,
.switch-games-button {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.home-icon,
.switch-games-icon {
    height: 3.7rem;
}

.wuwa-logo {
    height: 6.75rem;
    margin-left: 2rem;
}

.switch-wrapper {
    position: relative;
    margin-left: 1.25rem;
}

.genshin-button {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translate(-20px, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
    height: 7vw;
    max-height: 100px;
}

.genshin-button.active {
    transform: translate(10px, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.genshin-button:hover {
    transform: translate(10px, -50%) scale(1.05);
}

.switch-games-button:hover,
.home-button:hover {
    transform: scale(1.1);
}

.switch-games-active {
    filter: invert(1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* === Filters Box === */
.filters-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: auto;
    width: fit-content;
    font-family: 'WuWaFont', sans-serif;
    background-color: #ffffff70;
    backdrop-filter: blur(2px);
    border-radius: 30px;
    margin-bottom: 10px;
}

.filters-box h1 {
    margin-top: 15px;
    margin-left: 20px;
    margin-bottom: 0;
    font-size: 1.4rem;
    padding-bottom: 0.5rem;
}

.filters-box h2 {
    font-size: 1.1rem;
    text-align: right;
    padding-right: 0.6rem;
}

.filter-arrow {
    position: absolute;
    top: 12%;
    left: 19%;
    transform: translateX(-50%);
    width: 20px;
}

.insideFilters {
    position: relative;
    margin-left: 6rem;
    display: grid;
    grid-template-columns: 100px 1fr;
}

.elementFilters,
.weaponFilters,
.rarityFilters {
    place-self: center;
    justify-self: left;
    display: flex;
    gap: 1.5rem;
    background: none;
    border: none;
    margin: 0.5rem 0;
}

.elementFilter,
.weaponFilter,
.rarityFilter {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.elementFilter:hover,
.weaponFilter:hover,
.rarityFilter:hover {
    transform: scale(1.1);
}

/* Images inside filters */
.elementFilters img,
.weaponFilters img {
    height: 2.25rem;
    width: 2.25rem;
    background-color: rgb(235, 235, 235);
    border-radius: 50%;
    padding: 0.1rem;
}

.rarityFilters img {
    height: 1.5rem;
    background-color: rgb(235, 235, 235);
    border-radius: 1rem;
    padding: 0.2rem 0.4rem;
}

.insideFilters img:hover {
    background-color: #7e7e7e;
}

/* Active filter style */
.active-filter-img {
    background-color: #494949 !important;
    transform: scale(1.1);
}

.reset-filters {
    position: absolute;
    top: 80%;
    left: 87%;
    /* z-index: 1; */
}

.reset-button:hover {
    transform: scale(1.05);
    background-color: #7e7e7e;

    h2 {
        filter: brightness(0) invert(1);

    }
}

.reset-button {
    display: flex;
    background-color: #EFF8FF;
    width: 75px;
    height: 2.1rem;
    border-radius: 38px;
    border: none;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;

}

.reset-button h2 {
    padding: 0;
    font-family: WuWaFont;
}

/* === Characters Box === */
.characters-box {
    position: relative;
    margin: auto;
    max-width: 1000px;
}

.interact {
    display: flex;
    justify-content: right;
    align-items: center;
    margin-bottom: 10px;
    padding-right: 10px;
}

.add {
    width: 5rem;
}

.add-character-card {
    background-color: #D9D9D9 !important;
    border: none;
    transition: transform 0.3s ease;
}

.add-button:hover {
    .add {
        filter: brightness(0) invert(0.25);
    }

    transform: scale(1.025);
    cursor: pointer;
}

/* Searchbar */
.searchbar_style {
    width: fit-content;
    background: #EFF8FF;
    border-radius: 38px;
    display: flex;
}

.searchbar_style input {
    all: unset;
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    opacity: 0.5;
    font-family: Inter, sans-serif;
    width: 130px;
    font-family: WuWaFont;
}

.searchbar-input::placeholder {
    font-family: 'WuWaFont';
    font-size: 0.8rem;
}

.magnifying-glass {
    height: 1.5rem;
    width: 1.5rem;
    align-self: center;
    margin-right: 0.5rem;
}

/* Characters grid */
.insideCharacters,
.previewInsideCharacters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    justify-items: center;
    max-width: 1000px;
}

/* Character card */
.character-card,
.add-character-card,
.previewCharacter-card {
    position: relative;
    width: 220px;
    height: 220px;
    background-color: #ffffff99;
    backdrop-filter: blur(2px);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.element-image {
    position: absolute;
    width: 250px;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 15%;
    opacity: 0.70;
    /* height: 100%; */
    z-index: 0;
}

/* Character image */
.character-card .character-image,
.previewCharacter-card .character-image {
    position: relative;
    width: auto;
    /* prend toute la largeur possible */
    height: 100%;
    /* prend toute la hauteur possible */
    object-fit: cover;
    /* couvre la zone sans déformation */
    display: block;
    transition: transform 0.3s ease;

}

.character-card:hover .character-image,
.previewCharacter-card:hover .character-image {
    transform: scale(1.08);

}

/* Figure base */
figure {
    margin: 0;
    padding: 0;
    justify-items: center;
}

/* Positionnement de la légende par-dessus l'image */
.character-card figcaption,
.previewCharacter-card figcaption {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 80%;
    left: 50%;
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

figcaption h2,
figcaption h3 {
    margin: 0;
}

figcaption h2 {
    font-size: 1.2rem;
}

.rarity-image {
    width: 100px;
}

.popupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup {
    background: rgb(160, 160, 160);
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    height: fit-content;
    text-align: center;
}

.popup h2 {
    margin-top: 0;
    font-size: 2rem;
    font-family: WuWaFont;
}

.contentPopup {
    position: relative;
}

.characterForm {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.characterForm label {
    margin-bottom: 10px;
}

.characterForm input,
.characterForm select {
    margin-bottom: 20px;
}

input[type=file][id=characterImageForm]::file-selector-button {
    background-color: #EFF8FF;
    border-radius: 38px;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

input[type=file][id=characterImageForm]::file-selector-button:hover {
    background-color: #E4D4BA;
}

.preview {
    border: rgb(133, 133, 133) solid 2px;
    width: 220px;
    border-radius: 10px;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 42.5%;
    left: 80%;
}

#previewName {
    font-size: 1.5rem;
}

.abby {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 40%;
    left: 40%;
    width: 200px;
    z-index: 1;
}

.submit-button {
    background-color: #EFF8FF;
    width: 200px;
    height: 2.25rem;
    border-radius: 38px;
    border: none;
    cursor: pointer;
    align-items: center;
    transition: transform 0.3s ease;
    position: absolute;
    top: 71%;
    left: 63.5%;
    font-family: WuWaFont;
    font-size: 1.1rem;
}

.submit-button:hover {
    transform: scale(1.05);
    background-color: #E4D4BA;
}

.closePopup {
    all: unset;
    background-color: #EFF8FF;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.closePopup:hover {
    background-color: #5e5e5e;
    transform: scale(1.05);
}

input[type=text][id=name] {
    width: 150px;
    height: 30px;
    border-radius: 10px;
    border: black solid 1px;
    padding-left: 10px;
    font-size: 0.9rem;
    font-family: WuWaFont;
}

.selectForm {
    width: 130px;
    height: 30px;
    border-radius: 10px;
    border: black solid 1px;
    padding-left: 10px;
    font-size: 0.9rem;
    font-family: WuWaFont;
}

footer {
    background: linear-gradient(to bottom, #00000000 0%, #000000ff 20%);
    margin-top: 50px;
    height: 250px;
    display: grid;
    grid-template-columns: 1fr 300px 1fr;
    grid-template-rows: 250px;
    position: relative;
    color: white;

    a:hover {
        color: #8e8e8e !important;
        text-decoration: none;
    }
}

.left {
    margin-top: 50px;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;

    .designed {
        font-size: 12px;
        margin-top: 30px;
    }

    .victor {
        font-size: 15px;
        margin-top: 10px;
        color: #ffffff;
    }
}

.image-footer {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    position: relative;
}

.abby-footer {
    height: 180px;
    position: absolute;
    bottom: 0;
    left: 50%;
    translate: -50% 0;
}

.right {
    margin-top: 60px;
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;


    a,
    p {
        margin-left: 40px;
    }

    a {
        margin-top: 20px;
        margin-bottom: 20px;
        color: #ffffff;
        display: inline-block;
    }

     a:hover {
        color: #8e8e8e;
        text-decoration: none;
    }
}

.ARR-footer {
    justify-self: end;
    font-size: 10px;
    margin-top: auto;
}

/* === ANIMATION AU SCROLL === */
.fade-in-up-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(1px);
    transition: all 0.8s ease-out;
}

/* Lorsque visible, animation vers l'état normal */
.fade-in-up-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.delay-0 {
    transition-delay: 0s;
}

.delay-1 {
    transition-delay: 0.3s;
}

.delay-2 {
    transition-delay: 0.6s;
}