/* HELLO WORLD !

OpenClassrooms, projet HTML, CSS : Booki

- Organisation du fichier par SECTION :

  UTILITIES | HEADER | FORM | FILTER | CARD / HOME / POP / ACT | FOOTER

- Les @media queries sont à la fin --> Tablette puis Mobile


/* UTILITIES */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    padding-inline-start: unset;
    text-decoration: none;
    list-style: none;
    font-family: 'Raleway', sans-serif;
    margin: unset;
}

html {
    scroll-behavior: smooth;
    margin: 0 auto;
    max-width: 1400px;
}

@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
        /* au click du menu : smooth scroll */
    }
}

h1,
h2 {
    font-size: 18px;
    font-weight: 700;
}


/* -- cards -- */

h3 {
    font-size: 16px;
    font-weight: 700;
}

#pop .container:hover h3 {
    font-size: 14px;
}

.container p {
    font-size: 14px;
}

.star {
    font-size: 12px;
}

@media only screen and (max-width: 1250px) {
    h3 {
        font-size: 14px;
    }

    #pop .container:hover h3 {
        font-size: 12px;
    }

    .container p {
        font-size: 12px;
    }

    .star {
        font-size: 10px;
    }
}


h4,
input,
button,
.filter p {
    font-size: 16px;
    font-weight: 700;
    /* footer / input / button */
}

.search i,
.search button {
    font-size: 18px;
}

.more {
    font-size: 18px;
    font-weight: 700;
}

.filter button {
    font-size: 17px;
}

.info i {
    font-size: 10px;
}

p {
    font-size: 16px;
    font-weight: 500;
}

.container p {
    display: block;
    transition-duration: 0.4s;
}


/* HEADER */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
    margin-inline: 30px;
}

.logo img {
    height: 19px;
}

#navigation,
#navigation ul {
    display: flex;
    height: 100%;
    align-items: center;
}

#navigation li {
    width: 140px;
    height: 100%;
    display: flex;
}

#navigation a {
    position: relative;
    display: flex;
    color: black;
    align-items: center;
    width: 100%;
    justify-content: center;
}


/* HEADER ANIMATION */

#navigation a:hover {
    color: #0065FC;
}

#navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 2px;
    background: #0065FC;
    transform: scale(0);
    transition-duration: 0.3s;
}

#navigation a:hover:before {
    transform: scale(1);
}


/* HEADLINE */

.main {
    margin-inline: 30px;
}

#headline {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
}

h1 {
    margin-bottom: 8px;
}


/* FORM */

.search {
    margin-top: 20px;
    display: flex;
}

.search span {
    background-color: #F2F2F2;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px 0px 0px 15px;
}

.search input {
    border: 1px solid #F2F2F2;
    padding-left: 16px;
}

.search button {
    pointer-events: none;
    width: 130px;
    padding: unset;
    border: none;
    border-radius: 0 15px 15px 0;
    background: #0065FC;
    color: white;
}


/* FILTER */

.filter {
    display: flex;
    flex-flow: wrap;
    align-items: center;
    margin-top: 30px;
    gap: 22px;
}

.filter button {
    height: 50px;
    padding-inline: 20px;
    background-color: unset;
    border: 2px solid #D9D9D9;
    border-radius: 25px;
    transition-duration: 0.2s;
    cursor: pointer;
}

.filter i {
    color: #0065FC;
    margin-right: 20px;
    transform: rotateZ(0deg);
    transition: transform 0.9s;
}


/* FILTER ANIMATION */

.filter button:hover {
    background-color: #DEEBFF;
}

.filter button:focus-within,
.filter button:active {
    color: white;
    background-color: #0065FC;
}

.filter button:focus-within i {
    transform: rotateZ(-360deg);
    color: white;
}

.info {
    display: flex;
    align-items: center;
    margin-top: 35px;
}

.info i {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    color: #0065FC;
    border: 1px solid #D9D9D9;
    border-radius: 15px;
    margin-right: 11px;
    flex-shrink: 0;
}


/* CARD HOME */

.flex-home-pop {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

#home {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    padding: 30px;
    width: 70%;
    background-color: #F2F2F2;
    border-radius: 20px;
    gap: 22px;
}

.flex-home {
    display: flex;
    flex-flow: nowrap;
    width: 100%;
    gap: 20px;
}

.container {
    display: flex;
    flex-direction: column;
    width: 33%;
    aspect-ratio: 5/4;
    overflow: hidden;
    border: 3px solid #FFFFFF;
    border-radius: 18px;
    transition-duration: 0.7s;
    box-shadow: 3px 2px 15px -12px;
}

.img-container {
    display: flex;
    height: 65%;
    overflow: hidden;
    transition-duration: 0.7s;
}

.img {
    object-fit: cover;
    width: 100%;
    transition-duration: 0.7s;
}

.card-container {
    height: 35%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding-left: 5%;
    background: #FFFFFF;
    transition-duration: 0.7s;
}

.star {
    display: flex;
    color: #0065FC;
    transition-duration: 1s;
    gap: 2px;
}

.gray-star {
    color: #D9D9D9;
    transition-duration: 0.7s;
}


/* ANIMATION CARDS / CARD HOME */

.container:hover {
    cursor: pointer;
    border-radius: 0;
    border-color: rgba(250, 250, 250, 0.1);
    box-shadow: 0px 0px 5px -2px;
}

.container:hover img {
    transform: scale(0.8);
}

.container:hover .img-container {
    height: 70%;
}

.container:hover .card-container {
    border-radius: 0;
    background-color: #0065FC;
    color: #FFFFFF;
    box-shadow: 3px 2px 15px -12px;
}

.container:hover .star {
    color: #DEEBFF;
    gap: 3%;
}

.card-container:hover .gray-star {
    font-size: 0;
    transform-origin: right;
}

.more {
    cursor: pointer;
    width: fit-content;
    padding: 2px;
    margin-top: 15px;
}


/* CARD POP */

#pop {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    padding: 30px;
    width: 30%;
    background-color: #F2F2F2;
    border-radius: 20px;
    gap: 22px;
}

.pop-title {
    display: flex;
    justify-content: space-between;
}

.pop-title i {
    font-size: 18px;
    color: #0065FC;
}

.flex-pop {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

#pop .container {
    flex-direction: row;
    aspect-ratio: 7/3;
    width: auto;
    height: 30%;
    align-items: center;
}

#pop .img-container {
    width: 40%;
    height: 100%;
}

#pop .card-container {
    width: 60%;
    height: 100%;
    padding: 16px 22px 12px 15px;
    justify-content: space-around;
    gap: 30%;
}

.card-pop-spec {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


/* ANIMATION CARD POP */

#pop .container:hover .img-container {
    width: 60%;
}

#pop .container:hover .card-container {
    width: 40%;
    box-shadow: 3px 2px 15px -12px;
    gap: unset;
}


/* CARD ACT */

#act {
    margin-top: 40px;
    width: 100%;
}

.flex-act {
    margin-top: 22px;
    display: flex;
    gap: 40px;
}

#act .container {
    aspect-ratio: 2/3;
    width: 25%;
    border: unset;
}

#act .img-container {
    height: 87%;
}

#act .card-container {
    height: 13%;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 19px;
    justify-content: center;

}


/* ANIMATION CARD ACT */

#act .container:hover .img {
    transform: scale(0.9);
}

#act .container:hover .card-container {
    align-items: normal;
    box-shadow: 3px 2px 15px -12px;
}


/* FOOTER */

#footer {
    display: flex;
    margin-top: 50px;
    padding: 30px;
    padding-bottom: 60px;
    background-color: #F2F2F2;
}

.footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 33%;
}

h4 {
    margin-bottom: 10px;
}


/* TABLETTE */

@media only screen and (max-width: 991px) {
    @media only screen and (max-width: 900px) {
        h3 {
            font-size: 12px;
        }

        .container p {
            font-size: 10px;
        }

        .star {
            font-size: 8px;
        }
    }

    .footer p {
        font-size: 12px;
    }

    h4 {
        font-size: 14px;
    }

    .header {
        margin-inline: 50px;
    }

    .main {
        margin-inline: 50px;
    }

    .filter button {
        padding-inline: 15px;
    }

    .filter i {
        margin-right: 15px;
    }

    .flex-home-pop {
        flex-direction: column;
    }

    #home,
    #pop {
        width: auto;
        padding: 30px;
        gap: 25px;
    }

    .flex-home {
        gap: 30px;
    }

    .container {
        border-width: 5px;
    }

    #pop {
        margin-top: unset;
    }

    .flex-pop {
        flex-direction: row;
    }

    #pop .container {
        max-width: 30%;
    }

    #pop .card-container {
        gap: unset;
        margin-bottom: 5px;
    }
}


/* MOBILE */

@media only screen and (max-width: 767px) {

    H1,
    H2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    #pop .container:hover h3 {
        font-size: 16px;
    }

    .container p {
        font-size: 16px;
    }

    .star {
        font-size: 14px;
    }
    
    @media only screen and (max-width: 450px) {

        H1,
        H2 {
            font-size: 20px;
        }

        h3 {
            font-size: 16px;
        }

        #pop .container:hover h3 {
            font-size: 14px;
        }

        .container p {
            font-size: 14px;
        }

        .star {
            font-size: 12px;
        }

        @media only screen and (max-width: 375px) {

            H1,
            H2 {
                font-size: 18px;
            }

            h3 {
                font-size: 14px;
            }

            #pop .container:hover h3 {
                font-size: 12px;
            }

            .container p {
                font-size: 12px;
            }

            .star {
                font-size: 10px;
            }
        }
    }

    .header,
    .main {
        margin: unset;
    }

    .header {
        flex-direction: column;
        height: fit-content;
        margin-inline: 0;
    }

    .logo {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    #navigation {
        width: 100%;
        justify-content: center;
    }

    #navigation li,
    #navigation ul {
        width: 100%;
        height: fit-content;
    }

    #navigation a {
        width: inherit;
        height: 80px;
    }

    /* HEADER | ANIMATION */

    #navigation a::before {
        top: unset;
        bottom: 0;
        height: 3px;
    }

    #navigation a::after {
        content: '';
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 3px;
        background: #F2F2F2;
        transform: scale(1);
        transition-duration: 0.3s;
    }

    #navigation a:hover:after {
        transform: scale(0);
    }

    .main {
        margin-top: 30px;
        margin-inline: 0;
    }

    #headline {
        margin-inline: 20px;
    }

    h1 {
        margin-bottom: 13px;
    }

    .search {
        margin-top: 36px;
        width: 100%;
        border-radius: 0 15px 15px 0;
    }

    .search input {
        width: 85%;
    }

    .search button {
        width: 50px;
        font-size: 0;
        border-radius: 15px;
        position: absolute;
        right: 20px;
        height: 50px;
    }

    .search button::after {
        font-family: "Font Awesome 5 Free";
        color: white;
        content: "\f002";
        font-size: 17px;
    }

    .filter {
        align-items: normal;
        gap: 16px;
        margin-top: 34px;
    }

    .filter p {
        width: 100%;
    }

    .filter button {
        display: flex;
        flex-flow: nowrap;
        align-items: center;
        padding: unset;
        font-size: 12px;
        width: 47%;
    }

    .filter i {
        margin-left: 15px;
        margin-right: 10px;
        font-size: 16px;
    }

    .filter button:focus-within {
        filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
    }

    .info {
        margin-top: 40px;
        align-items: flex-start;
    }

    .info i {
        font-size: 14px;
    }


    /* CARD HOME */

    .flex-home-pop {
        flex-direction: column-reverse;
        gap: unset;
    }

    #pop {
        margin-top: 30px;
        padding: 30px;
        border-radius: 0;
    }

    .flex-pop {
        flex-direction: column;
    }

    #pop .container {
        max-width: 100%;
    }

    #pop .card-container {
        gap: 30%;
    }

    #home {
        margin-top: unset;
        padding: 30px;
        background-color: white;
    }

    .flex-home {
        flex-direction: column;
    }

    #home .container {
        width: 97%;
        aspect-ratio: 9/5;
    }

    .more {
        display: none;
    }

    #act {
        margin-top: 100px;
        padding-inline: 30px;
        width: fit-content;
    }

    .flex-act {
        flex-direction: column;
        gap: 30px;
    }

    #act .container {
        aspect-ratio: 8/5;
        width: 100%;
    }

    #act .img-container {
        height: 70%;
        display: flex;
    }

    #act .card-container {
        height: 30%;
    }

    #footer {
        margin-top: 60px;
        flex-direction: column;
        padding-top: unset;
    }

    .footer {
        margin-top: 40px;
        width: 100%;
        gap: 8px;
    }
}