
@import "reset.css";
@import "colors.css";
@import "site_variables.css";
@import "ui.css";
@import "style.css";

body {
    font-family: 'Poppins', sans-serif;
    font-optical-sizing: auto;
    background-color: var(--bgclr_body);

    display: grid;
    min-height: 100dvh;
}

/*-------------------------------------
    SITE WRAPPER
--------------------------------------*/
.site {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /*min-block-size: 100vb; -> nouvelle unité */
}

/*-------------------------------------
    HEADER
--------------------------------------*/
.header {
    padding: 0 6rem;
    position: relative;
}

.header_logo {
    position: absolute;
    left: 6rem;
    top: 50%;
    transform: translateY(-50%);
}

.header_right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.8rem;
    height: 3.8rem;
}

@media screen and (max-width: 900px) {
    .header {
        padding: 0 2rem;
    }
    .header_logo {
        left: 3rem;
    }
}

@media screen and (max-width: 360px) {
    .header_right {
        gap: 1.2rem;
    }
    .header_logo {
        left: 2rem;
    }
}

/*-------------------------------------
    HEADER - LOGO
--------------------------------------*/
.header_logo img {
    width: 4rem;
    transition: transform var(--transition_base);
}

.header_logo img:hover {
    transform: rotate(10deg);
}

@media screen and (max-width: 700px) {
    .header_logo img {
        width: 2.5rem;
    }
}

/*-------------------------------------
    HEADER - CART
--------------------------------------*/
.header_cart a {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.header_cart .icon svg {
    fill: var(--clr_primary);
    width: 1.7rem;
    height: 1.7rem;
}

.header_cart_content {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    font-weight: 400;
    color: var(--clr_primary);
    transform: translateY(.15rem);
}

@media screen and (max-width: 450px) {
    .header_cart_item {
        display: none;
    }
}

/*-------------------------------------
    HEADER - BURGER ICON
--------------------------------------*/
#burger_btn {
    position: relative;
    display: none;
    width: 1.6rem;
    height: 1.2rem;

    transition: var(--transition_base);
    cursor: pointer;
    z-index: var(--z_index_burger);
}

#burger_btn span {
    position: absolute;
    width: 100%;
    height: 3px;
    border-radius: 2rem;
    background-color: var(--clr_primary);
    transition: var(--transition_base);
}

#burger_btn span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%);
}

#burger_btn span:nth-child(2) {
    top: 0;
}

#burger_btn span:nth-child(3) {
    bottom: 0;
}

#burger_btn.active {
    transform: rotate(180deg);
}

#burger_btn.active span {
    background-color: white;
}

#burger_btn.active span:nth-child(1) {
    display: none;
}

#burger_btn.active span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

#burger_btn.active span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

@media screen and (max-width: 700px) {
    #burger_btn {
        display: block;
    }
}

/*-------------------------------------
    HEADER - MENU
--------------------------------------*/
.header_menu {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3.3rem;
    z-index: var(--z_index_menu);
}

.header_menu ul {
    display: flex;
    align-items: center;
}

.header_menu ul li {
    padding: 0 .4rem;
}

.header_menu ul li a {
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: 0.7px;
    color: var(--clr_text_accent);
    border-radius: .4rem;
    padding: 0.4rem 1.4rem;
    transition: var(--transition_base);
}

.header_menu ul li a:hover {
    background-color: var(--clr_primary_100);
}

.header_menu ul li a.active {
    background-color: var(--clr_primary);
    color: white;
}

.header_menu_close_btn {
    display: none;
}

@media screen and (max-width: 700px) {
    .header_menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 60%;
        height: 100dvh;
        border-top-left-radius: 0.8rem;
        border-bottom-left-radius: 0.8rem;

        background-color: var(--clr_zinc_500);
        overflow: hidden;
        transform: translateX(105%);
        transition: transform var(--transition_base);
    }
    .header_menu.is_open {
        transform: translateX(0);
    }
    .header_menu ul {
        flex-direction: column;
        width: 100%;
    }
    .header_menu ul li {
        width: 90%;
        padding: 0;
    }
    .header_menu ul li a {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem 0;
        font-size: 1.1rem;
        color: white;
    }
    .header_menu ul li a:hover {
        color: var(--clr_text_accent);
    }
}

@media screen and (max-width: 550px) {
    .header_menu {
        width: 90%;
    }
}

@media screen and (max-width: 310px) {
    .header_menu {
        width: 98%;
    }
}

/*-------------------------------------
    FOOTER
--------------------------------------*/
.footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1.5rem 5rem;
    background-color: var(--clr_primary_200);
}

.footer_copyright p {
    font-size: .8rem;
    font-weight: 400;
    color: var(--clr_text_accent);
    text-align: center;
}

/*-------------------------------------
    MAIN
--------------------------------------*/


/*-------------------------------------
    AUTH PAGE
--------------------------------------*/
.auth_page {
    display: grid;
    gap: 4rem;
    width: min(550px, 100%);
    margin: 0 auto;
    padding: 3rem .5rem;
}

.auth_page_title {
    display: flex;
    justify-content: center;
}

.auth_page_title p {
    position: relative;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--clr_text_accent);
    text-align: center;
}

.auth_page_title p::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 50%;
    border-bottom: 3px dotted var(--clr_secondary);
}

.auth_page form {
    display: grid;
    gap: 2rem;
    border-radius: 0.9rem;
    background-color: var(--bgclr_lowest);
    padding: 1.8rem 2rem 3rem 2rem;
    box-shadow: var(--shadow_form);
}

.auth_page_form_title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06rem;
    color: var(--clr_primary);
}

.auth_page .input_submit input {
    width: 200px;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.auth_page .links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

    font-size: 0.85rem;
    font-weight: 400;
    color: var(--clr_primary);
    text-decoration: underline;
    padding-top: 1rem;
}

.auth_page .links a:nth-child(2) {
    text-align: right;
}

.auth_page .links a:hover {
    color: var(--clr_primary_700);
}

@media screen and (max-width: 500px) {
    .auth_page {
        gap: 2rem;
        padding: 2rem .5rem;
    }
}

@media screen and (max-height: 800px) {
    .auth_page {
        gap: 2rem;
        padding: 2rem .5rem;
    }
}

/*-------------------------------------
    HOME PAGE
--------------------------------------*/
.home_page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-top: 4rem;
}

.home_page_section_title {
    position: relative;
    display: flex;
    justify-content: center;
    width: fit-content;
    color: var(--clr_text_site_title);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.home_page_section_title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 5rem;
    border-bottom: 3px dotted var(--clr_secondary);
}

.home_page_section_title h3 {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.06rem;
}

/*-------------------------------------
    HOME PAGE - HERO
--------------------------------------*/
.home_hero {
    display: flex;
    align-items: center;
    gap: 6rem;

    width: 1200px;
    margin-bottom: 3rem;
}

.home_hero_image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home_hero_image img {
    width: 100%;
    height: auto;
    max-width: 350px;
}

.home_hero_title {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
}

.home_hero_title h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--clr_text_site_title);
    line-height: 1.3;
}

.home_hero_title p {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--clr_text_site_title);
    line-height: 1.6;
}

@media screen and (max-width: 1200px) {
    .home_hero {
        width: 95%;
        gap: 6rem;
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .home_page {
        padding-top: 3rem;
    }
    .home_hero {
        flex-direction: column;
        gap: 1.8rem;
        text-align: center;
    }
    .home_hero_title h2 {
        font-size: 2rem;
    }
    .home_hero_title p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .home_page {
        padding-top: 2rem;
    }
    .home_hero {
        margin-bottom: 1rem;
    }
    .home_hero_title h2 {
        font-size: 1.75rem;
    }
    .home_hero_title p {
        font-size: 1rem;
    }
    .home_hero_image {
        width: 60%;
    }
}

/*-------------------------------------
    HOME PAGE - SEARCH BAR
--------------------------------------*/
.home_search {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;

    width: 100%;
    padding: 2rem 2rem 3rem 2rem;
    margin-bottom: 3rem;
    background-color: var(--clr_primary_100);
}

.home_search .search_form {
    display: grid;
    grid-template-columns: 300px 300px 180px;
    align-items: flex-end;
    gap: 2rem;
}

.home_search .select_field_wrapper {
    /*width: 300px;*/
}

.home_search .select_field_header {
    background-color: var(--bgclr_lowest);
}

.home_search .select_field_header .select_field_arrow {
    background-color: var(--clr_primary);
}

.home_search .select_field_header .select_field_arrow .icon svg {
    fill: var(--bgclr_lowest);
}

.home_search .input_submit input {
    width: 100%;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

@media (max-width: 910px) {
    .home_search .search_form {
        grid-template-columns: 300px 300px;
    }
    .home_search .input_submit {
        grid-column: 2; /* place le bouton sous le 2e input */
    }
}

@media (max-width: 690px) {
    .home_search {
        padding: 2rem 2rem 3rem 2rem;
        margin-bottom: 1rem;
    }
    .home_search .search_form {
        width: 90%;
        grid-template-columns: 1fr;
    }
    .home_search .input_submit {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .home_search {
        padding: 2rem 1rem 3rem 1rem;
    }
    .home_search .search_form {
        width: 100%;
        gap: 1rem;
    }
    .home_search .input_submit {
        padding-top: 1.8rem;
    }

}
/*-------------------------------------
    HOME PAGE - NEW ARRIVALS
    - home_news
    --- home_page_section_title
    --- home_news_swiper_container
--------------------------------------*/
.home_news {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;

    padding: 2rem 3rem 1rem 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 460px) {
    .home_news {
        padding: 1rem .5rem 0 .5rem;
        margin-bottom: 1rem;
    }
}

/*-------------------------------------
    HOME PAGE - NEW ARRIVALS - CARD
--------------------------------------*/
.home_news_card.swiper-slide {
    /* La largeur doit être définie ici pour que Swiper puisse calculer correctement la largeur du conteneur */
    width: 250px;
    /* Essentielle pour slidesPerView: 'auto' */
    flex-shrink: 0;
}

.home_news_card a {
    display: grid;
    grid-template-rows: 180px 1fr;
    width: 100%;

    background-color: var(--bgclr_lowest);
    padding: 0.3rem;
    border-radius: .7rem;
    user-select: none;
    transition: var(--transition_base);
}

.home_news_card_img {
    border-top-left-radius: .4rem;
    border-top-right-radius: .4rem;
    overflow: hidden;
}

.home_news_card_img img {
    width: 100%;
    object-fit: cover;
    object-position: center;
    /*aspect-ratio: 4 / 3;*/
    transition: var(--transition_base);
}

.home_news_card:hover .home_news_card_img img {
    transform: scale(1.05);
}

.home_news_card_content {
    display: grid;
    justify-content: center;
    padding: .5rem .8rem;
}

.home_news_card_content div {
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    color: var(--clr_text_accent);

    white-space: nowrap;
    overflow: hidden;
    text-overflow : ellipsis;
}

.home_news_card_content div:nth-child(1) {
    text-transform: uppercase;
}

.home_news_card_content div:nth-child(3) {
    font-size: .85rem;
    font-weight: 500;
}

/*-------------------------------------
    HOME PAGE - NEW ARRIVALS - SWIPER
    1-- home_news_swiper_container
    2---- home_news_swiper = swiper
    3------ swiper-wrapper
    4-------- home_news_card = swiper-slide
    2---- swiper-pagination
    2---- news_swiper_btn_prev
    2---- news_swiper_btn_next
--------------------------------------*/
.home_news_swiper_container {
    position: relative;
    width: 80vw;
    padding-bottom: 3rem;
}

/* Pagination */
.home_news_swiper_container .swiper-pagination-bullet {
    background: var(--clr_primary);
    height: .9rem;
    width: .9rem;
}

/* Navigation buttons */
.news_swiper_btn_prev, .news_swiper_btn_next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    cursor: pointer;
    /*z-index: 1000;*/
}

.news_swiper_btn_prev {
    left: -3.5rem;
}

.news_swiper_btn_next {
    right: -3.5rem;
}

.news_swiper_btn_prev svg, .news_swiper_btn_next svg {
    width: 3rem;
    height: 3rem;
    fill: var(--clr_primary);
    transition: var(--transition_0_2);
}

.news_swiper_btn_prev:hover svg, .news_swiper_btn_next:hover svg {
    width: 3.4rem;
    height: 3.4rem;
    fill: var(--clr_primary_600);
}

.news_swiper_btn_prev:hover svg {
    transform: translateX(-.2rem);
}

.news_swiper_btn_next:hover svg {
    transform: translateX(.2rem);
}

@media (max-width: 460px) {
    .home_news_swiper_container {
        width: 95vw;
    }
    .news_swiper_btn_prev, .news_swiper_btn_next {
        display: none;
    }
}

/*-------------------------------------
    HOME PAGE - PRO
--------------------------------------*/
.home_pro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;

    width: 900px;
    border: 2px dashed var(--clr_primary_200);
    border-radius: .8rem;
    padding: 2rem 2rem 2rem 2rem;
    margin-bottom: 4rem;
}

.home_pro_content_text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--clr_text_accent);
    /*text-align: center;*/
    line-height: 2;
    margin-bottom: 2rem;
}

.home_pro_content_button {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home_pro_content_button a {
    width: 200px;
}

@media (max-width: 910px) {
    .home_pro {
        width: 95vw;
    }
}

/*-------------------------------------
    SELLER JOIN PAGE
--------------------------------------*/
.seller_join_page {
    display: grid;
    gap: 4rem;
    margin: 0 auto;
    max-width: 500px;
    padding-top: 4rem;
}

.seller_join_page form {
    display: grid;
    gap: 2rem;
    border-radius: 0.9rem;
    background-color: var(--bgclr_lowest);
    padding: 1.8rem 2rem 3rem 2rem;
    box-shadow: var(--shadow_form);
}


/*-------------------------------------
    SELLER JOIN PAGE
--------------------------------------*/
.site_part_show {

}
