/********Global********/

body {
    background-color: #2d3748;
    width: 100%;
}

h1, h2, h3, h4, h5, h6, p, a, label, td, th {
    color: #FFFFFF;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Lato, sans-serif;
}

p, a, label, td, th {
    font-family: Nunito, sans-serif;
}

@font-face {
    font-family: 'Nunito';
    src: url("../fonts/Nunito-regular.ttf") format('truetype');
}

@font-face {
    font-family: 'Lato';
    src: url("../fonts/Lato-regular.ttf") format('truetype');
}

@font-face {
    font-family: 'Montserrat';
    src: url("../fonts/Montserrat-Regular.ttf") format('truetype');
}

/********NavBar********/

header {
    display: flex;
    flex-direction: row;
    background-color: #1a202c;
    align-items: center;
}

header > p {
    margin: 1em;
}

nav > ul {
    list-style-type: none;
    padding: 0 0 0 1em;

    border-left: 1px #FFFFFF solid;
}

nav > ul > li {
    display: inline;
    margin-right: 1em;
}

nav > ul > li > a {
    white-space: nowrap;
    text-decoration: none;
}

nav > ul > li > a:hover {
    text-decoration: underline;
}

.active {
    text-decoration: underline;
}

/********Liste comptes********/
table {
    border-collapse: collapse;
    width: 30em;
    max-width: 100%;
}

tr {
    width:100%;
    background-color: #252f3b;
    &:nth-of-type(odd) {
        background-color: #4f5f79;
    }
}

th {
    background-color: #1a202c;
    padding: 0.5em;
}

td {
    padding: 0.5em;
}

/********Accueil********/

.scrollDiv {
    position: relative;
    margin-bottom: 2em;
    overflow: visible;
}

@media only screen and (max-width: 767px) { /*Téléphones*/
    .scrollDiv:hover > .scrollButtons {
        display: none;
    }
}

@media only screen and (min-width: 767px) {
    .scrollDiv:hover > .scrollButtons {
        display: flex;
    }
}

.NoFilmSelected {
    margin: 2em;
    font-size: 1.5em;
}


.scrollButtons {
    display: none;
    transition: opacity 0.3s ease;
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    justify-content: space-between;
}
.scrollButtons > button {
    height: 1.2em;
    background-color: rgba(235, 235, 235, 0.5);
    color: black;
    border: none;
    font-size: 3em;
    cursor: pointer;
    pointer-events: auto;
    z-index: 15;
    position: relative;
    padding: 0 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.scrollButtons > button:hover {
    background-color: rgba(235, 235, 235, 0.8);
}
.previous {
    border-radius: 0 0.4em 0.4em 0;
}

.next {
    border-radius: 0.4em 0 0 0.4em;
}

.displayFilms {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-color: #1a202c #2d3748;
    width: 100%;
    padding: 0.5em 0;
    height: 30em; /* Increased to accommodate the hover effect */
    align-items: center;
    position: relative;
    z-index: 1;
}

.filmPoster {
    width: 17em;
    position: relative;
    margin-right: 0.6em;
    transition: all 0.3s ease;
    border-radius: 1em;
    overflow: visible;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.filmPoster .filmPosterBg {
    display: block;
    border-radius: 1em;
    overflow: hidden;
}

.filmPoster-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.filmPoster:hover .filmPoster-actions {
    opacity: 1;
    transform: translateY(0);
}

.filmPoster-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.filmPoster-action:hover {
    background-color: rgba(85, 153, 255, 0.8);
    transform: scale(1.1);
}

.filmPoster-action.save-film {
    color: white;
}

.filmPoster-action.save-film.active {
    color: #5599ff;
}

.filmPoster:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(85, 153, 255, 0.2);
}

.filmPoster:hover .filmInfos {
    display: flex;
    opacity: 1;
}

.filmPosterBg > img {
    width: 17em;
    height: 25.5em;
    border-radius: 1em;
    display: block;
    object-fit: cover;
}

.filmInfos {
    display: none;
    transition: all 0.3s ease;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-end;
    height: 25.5em;
    width: 100%;
    align-items: flex-start;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 1em;
    box-sizing: border-box;
    border-radius: 1em;
    color: white;
    opacity: 0;
    z-index: 5;
    overflow: hidden;
}
.bottomDisplayInfos {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: space-between;
    margin-top: 0.8em;
}

.oneInfosDisplay {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0.4em;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.4em 0.6em;
    border-radius: 4px;
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 6;
    position: relative;
}

.oneInfosDisplay img {
    width: 1.5em;
    margin-right: 0.4em;
}

.oneInfosDisplay > p{
    margin: 0;
}

.filmTitle {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 0.5em 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    width: 100%;
    z-index: 6;
    position: relative;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 3.1em;
}

@media only screen and (max-width: 480px) {
    .filmTitle {
        font-size: 1em;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-height: 2.6em;
    }
}

.filmMetaInfo {
    margin-top: auto;
    width: 100%;
    z-index: 6;
    position: relative;
}

.filmMetaInfo > .oneInfosDisplay {
    width: fit-content;
    max-width: 100%;
}

/********Film********/

@media only screen and (min-width: 768px) { /*PC, Tablettes*/
    .setting {
        margin-top: 0.5em;
        margin-right: 0.2em;
        z-index: 2;
        display: none;
        position: relative;
        left: -6%;
        top: -31.5%;
        width: 0;
    }

    .setting > img {
        height: 3em;
    }

    .filmBanner:hover ~ .setting, .setting:hover {
        display: block;
    }

    .filmContainer {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 40em;
        width: 98.5%;
    }

    .verticalCenter {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .filmBanner{
        width: 55em;
        border-radius: 1.5em;
        min-height: 30em;
        box-shadow: 0 0 150px -45px rgba(255, 255, 255, 0.9);
        display: flex;
        transition: all 0.4s;
        position: relative;
        margin: 100px auto;
        overflow: hidden;
    }

    .filmBanner:hover {
        transform: scale(1.05);
        box-shadow: 0 0 150px -75px rgba(255, 255, 255, 0.9);
    }

    .filmBanner > div {
        position: relative;
        background-blend-mode: multiply;
        z-index: 2;
        padding: 2em;
        width: 38em;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: linear-gradient(to right, #1a202c 75%, transparent 100%);
        border-radius: 1.5em;
    }

    .genderList > a {
        margin-left: 0.2em;
        color: grey;
        text-decoration: none;
    }

    .filmBanner > img {
        border-radius: 0 1.5em 1.5em 0;
        position: absolute;
        top: 0;
        left: 30%;
        z-index: 1;
        height: 100%; right: 0;
        background-size: cover;
    }

    .infosContainer > div {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .infosContainer > p {
        width: 80%;
    }

    .infosContainer > div > h1, .infosContainer > div > p {
        margin: 0;
    }

    .duration {
        padding-left: 1em;
        color: #979797;
        font-style: italic;
    }

    .filmName {
        font-family: Montserrat, sans-serif;
        font-weight: normal;
    }

    .filmsActions > a {
        margin-right: 1em;
    }

    .filmsActions > a > svg {
        fill: white;
        width: 2em;
        height: 2em;
    }

    .returnBack {
        text-decoration: none;
        margin-left: 0.5em;
    }
}

@media only screen and (max-width: 767px) { /*Téléphones*/
    .setting {
        margin-top: 0.5em;
        margin-right: 0.2em;
        z-index: 3;
        position: relative;
        left: -18%;
        top: -190px;
        width: 0;
    }

    .setting > img {
        height: 3em;
    }

    .filmContainer {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 40em;
        width: 98.5%;
    }

    .verticalCenter {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .filmBanner{
        width: 90%;
        border-radius: 1.5em;
        box-shadow: 0 0 150px -45px rgba(255, 255, 255, 0.5);
        display: flex;
        transition: all 0.4s;
        position: relative;
        margin: 100px auto;
        overflow: hidden;
    }

    .filmBanner > div {
        position: relative;
        background-blend-mode: multiply;
        z-index: 2;
        padding: 5em 2em 2em 2em;
        width: 90%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: linear-gradient(to top, #1a202c 75%, transparent 100%);
        border-radius: 1.5em;
    }

    .genderList > a {
        margin-left: 0.2em;
        color: grey;
        text-decoration: none;
    }

    .filmBanner > img {
        position: absolute;
        left: 0;
        width: 100%;
        z-index: 1;
        background-size: cover;
    }

    .infosContainer > div {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .infosContainer > div > h1, .infosContainer > div > p {
        margin: 0;
    }

    .duration {
        padding-left: 1em;
        color: #979797;
        font-style: italic;
    }

    .filmName {
        font-family: Montserrat, sans-serif;
        font-weight: normal;
    }

    .filmsActions > a {
        margin-right: 1em;
    }

    .filmsActions > a > svg {
        width: 2em;
        fill: white;
    }

    .returnBack {
        text-decoration: none;
        margin-left: 0.5em;
    }
}



/********Search********/

.searchContainer {
    display: flex;
    flex-direction: row;
    border-bottom: 1px #FFFFFF solid;
    width: 100%;
    margin: 1em 0;
    justify-content: center;
}

.searchForm {
    display: flex;
    flex-direction: column;
    padding: 1em;
    width: 85%;
    justify-content: space-between;
    background-color: #1a202c;
    border-radius: 1em;
    margin-bottom: 1em;
}

.searchForm > div{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 0.1em;
}

.searchForm > div > input[type="text"]{
    width: 75%;
}

.searchForm > div > div > select{
    background-color: #2d3748;
    color: #FFFFFF;
    margin-left: 0.4em;
}

.searchButton{
    background-color: transparent;
    color: #FFFFFF;
    border-radius: 1em;
    width: fit-content;
    border: 2px #FFFFFF solid;
    padding: 0.4em;
}

.searchForm > div > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0.1em;
}

.displayFilmsResearch {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-evenly;
    position: relative;
    z-index: 1;
    padding: 0.5em;
}

.displayFilmsResearch > .filmPoster {
    margin-bottom: 2.5em;
    margin-right: 1em;
    margin-left: 1em;
}

@media only screen and (max-width: 767px) {
    .displayFilmsResearch > .filmPoster {
        margin-right: 0.5em;
        margin-left: 0.5em;
    }
}

@media only screen and (max-width: 480px) {
    .displayFilmsResearch {
        justify-content: center;
    }
    
    .displayFilmsResearch > .filmPoster {
        margin-right: 0;
        margin-left: 0;
    }
}

/********Administration********/

.adminNav {
    display: flex;
}

.adminNav > p{
    margin: 1em;
}

/********Authentification********/

.authFormContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.authForm {
    display: flex;
    flex-direction: column;
    background-color: #252525;
    padding: 40px;
    margin-top: 20px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(85, 153, 255, 0.1);
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(85, 153, 255, 0.2);
}

.authForm > h1 {
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.authForm > h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #5599ff, #3377dd);
    border-radius: 2px;
}

.authForm > a {
    margin-top: 20px;
    color: #5599ff;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s ease;
}

.authForm > a:hover {
    color: #77aaff;
    text-decoration: underline;
}

.authForm > form > div {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.authForm > form > div > label {
    margin-bottom: 8px;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.authForm > form > div > label i {
    color: #5599ff;
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.authForm > form > div > input[type="text"],
.authForm > form > div > input[type="email"],
.authForm > form > div > input[type="password"] {
    background-color: #1e1e1e;
    color: #FFFFFF;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.authForm > form > div > input[type="text"]:focus,
.authForm > form > div > input[type="email"]:focus,
.authForm > form > div > input[type="password"]:focus {
    background-color: #2a2a2a;
    border-color: #5599ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(85, 153, 255, 0.15), 0 0 15px rgba(85, 153, 255, 0.1);
}

.authForm > form > input[type='submit'] {
    background: linear-gradient(135deg, #5599ff, #3377dd);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(85, 153, 255, 0.2);
}

.authForm > form > input[type='submit']:hover {
    background: linear-gradient(135deg, #66aaff, #4488ee);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 153, 255, 0.4);
}

.authForm > form > input[type='submit']:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(85, 153, 255, 0.3);
}

/********Change input********/

.filmCard {
    margin: 1.5em;
    display: flex;
    padding: 1em;
    width: 17em;
    border-radius: 1em;
    justify-content: space-between;
    background-color: #1a202c;
}

.filmCard > div > img {
    height: 12em;
}

.filmCard > div {
    margin: 0 0.4em;
    display: flex;
    flex-direction: row;
}

.filmCard > div > div {
    width: 100%;
}

.currentInputDisplay {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.ChangeInputChoices {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 2em;
}

.AChoice {
    padding: 0.7em;
    display: flex;
    background-color: #212934;
    border-radius: 1em;
    margin: 0.5em;
}

.AChoice > input {
    margin: 0;
}

.AChoice > label > p{
    margin: 0;
    padding-left: 0.5em;
}

/********Alerts********/

.alerteSucess > p, .alerteError > p {
    font-family: Lato, sans-serif;
    margin: 0;
    color: white;
}

.alerteSucess {
    background-color: #0b540b;
    border: 2px #008f00 solid;
    border-radius: 1em;
    padding: 1em;
    margin: 1em;
}

.alerteError {
    background-color: #730000;
    border: 2px #940000 solid;
    border-radius: 1em;
    padding: 1em;
    margin: 1em;
}

/********Dropdown********/

.dropbtn {
    border: none;
    cursor: pointer;
    margin: 0;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    color: #FFFFFF;
    position: absolute;
    background-color: #242c3a;
    min-width: 160px;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color: #3b455e
}

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

