main{
    min-height:100vh;
    max-width:95%;
    text-align: center;
    width:100%;
    margin: 0 auto 150px ;
    display: flex;
    justify-content: center;
}

main section.contentPage{
    display: flex;
    flex-direction: column;
    gap:50px;
    margin-top:calc(150px + 80px);
    width:90%;
    max-width:1440px;
}




main section.contentPage h1.title:not(.productInfo .title, #paymentConfirmationContainer h1.title){
    font-size: 2rem;
    text-transform: uppercase;
    line-height: 2.5rem;
}

#paymentConfirmationContainer h1.title{
    font-size: 2rem;
    text-transform: uppercase;
}

main.homePage{
    align-items: center;
}

main.homePage .welcomeContainer{
    display: flex;
    flex-direction: column;
    gap:15px;
    background-color: var(--light-color);
    padding:30px;
    max-width:500px;
    width:90%;
    height:max-content;
    border-radius: 10px;
}

.welcomeContainer .logo{
    width:50%;
    margin: 0 auto ;
}

@media screen and (max-width: 500px) {
    main.homePage .welcomeContainer, .errorDocumentContainer{
        height:max-content;
        margin:150px auto;
        gap:20px;
    }

    main section.contentPage{
    margin-top:calc(100px + 80px);
    width:90%;
}
}


.welcomeContainer h1, .errorDocumentContainer h1{
    line-height: 2.5rem;
}

main.homePage .welcomeContainer p{
    hyphens: none;
    line-height: 1.5rem;
}


.btnContainer{
    display:flex;
    flex-direction: column;
    gap:10px;
}

#filter-section{
    width:100%;
    display: flex;
    flex-direction: row;
    height:40px;
    gap:15px;
    justify-content: space-between;
}

#filter-section #searchBar{
    width:100%;
    border-bottom:1px solid var(--primary-color);
    border-radius: 0;
}

#filter-section details{
    background-color: var(--light-color);
    text-align: left;
    height: fit-content;
    width:100%;
    padding:10px;
    z-index:10;
    min-height:40px;
    position:relative;
    max-height:300px;
    overflow-y:auto;
}

#filter-section details[open]{
        box-shadow: 0px 2px 5px var(--secondary-color);
}

#toggle-filter-section{
    display: none;
}

#filter-section details button{
    width:100%;
    margin-top:10px;
}

#filter-section .toHideInBigScreen{
        display:none;
    }

#filter-section button{
    height:100%;
    border-radius: 0;
}

#filter-section .icons{
    cursor: pointer;
    height:100%;
    transform: scale(0.5) rotate(0deg);
    margin-left:-10px;
    margin-right:-15px;
    transition: transform 0.2s ease-out;
}

#filter-section .icons:hover{
    transform: scale(0.5) rotate(-45deg);
}

#filter-section details div.checkboxFilterContainer{
    display: flex;
    gap:5px;
    align-items: center;
    margin-top:5px;
    justify-content: left;
    background-color: var(--light-color);
}

#filter-section details div.checkboxFilterContainer label{
    margin:0;
}


#filter-section details div.checkboxFilterContainer:nth-of-type(1){
    display: flex;
    gap:5px;
    margin-top:15px;
}


#filter-section details div.checkboxFilterContainer input{
    width:15px;
    height:15px;
    border:1px solid var(--primary-color);
}


#products-container{
width:100%;
grid-template-columns: repeat(4, 1fr);
grid-template-areas: "cartMessage cartMessage cartMessage cartMessage";
display: grid;
gap:50px;
margin:0 auto;
height:fit-content;
}

.thumbnail-wrapper {
    position:relative;
}

/* Container principal du skeleton de détails */
.skeleton-details {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Colonne Image (Gauche) */
.skeleton-image-side {
    flex: 1;
    height: 500px;
    background: #eee;
    border-radius: 10px;
}

/* Colonne Infos (Droite) */
.skeleton-info-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skeleton-text {
    height: 20px;
    background: #eee;
    border-radius: 4px;
    width: 100%;
}

.skeleton-title { height: 40px; width: 70%; }
.skeleton-price { height: 30px; width: 30%; }
.skeleton-button { height: 50px; width: 100%; margin-top: 20px; }

/* Animation Shimmer (réutilisée) */
.skeleton-details div {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Le style du skeleton */
.skeleton-card {
    background: #f6f7f8;
    background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-repeat: no-repeat;
    background-size: 800px 104px;
    display: inline-block;
    position: relative;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 100%;
    height: 300px; /* Ajustez selon la hauteur de vos cartes réelles */
}

/* Cache l'image tant qu'elle n'est pas chargée */
.product-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image.loaded {
    opacity: 1;
}

.thumbnail-wrapper .thumb-nav-container{
    position:relative;
    width:100%;
    display: flex;
    flex-direction: row;
    gap:5px;
    justify-content: right;
    margin-top:15px;
    margin-bottom:-5px;
}

.thumbnail-wrapper .thumb-nav-container .thumb-nav{
    all:unset;
    background-color: var(--light-color);
    width:25px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    height:25px;
    text-align: center;
    line-height: 25px;
}


.button-slideshow-container button{
    all:unset;
    background-color: var(--light-color);
    width:40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    height:40px;
    text-align: center;
    line-height: 40px; 
}

.thumbnail-wrapper .thumb-nav-container .thumb-nav:hover:not(.disabled), .button-slideshow-container button:hover:not(.disabled){
    background-color: var(--accent-color) !important;
}

.thumbnail-wrapper .thumb-nav-container .thumb-nav.disabled, .button-slideshow-container button.disabled{
    opacity: 0.3;
}

.thumbnail-wrapper .thumb-nav-container .thumb-nav.disabled:hover, .button-slideshow-container button.disabled:hover{
    background-color: var(--light-color);
    opacity: 0.3;
    cursor:default;
}

@media screen and (max-width: 1220px) {
    #products-container{
        grid-template-columns: repeat(3, 1fr);
        grid-template-areas: "cartMessage cartMessage cartMessage";
    }
}

@media screen and (max-width: 1080px) {
    #products-container{
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas: "cartMessage cartMessage";
        position:relative;
    }

    
    #toggle-filter-section{
        display: flex;
        height:50px;
        width:100%;
        align-items: center;
        gap:10px;
        padding:20px;
        background-color: var(--light-color);
        justify-content: space-between;
        cursor:pointer;
        font-weight: bold;

    }

    #toggle-filter-section.open{
        margin-bottom:-50px;
    }

    #toggle-filter-section img{
        width:20px;
        height:20px;
    }

#filter-section {
    /* Retrait du border-top direct */
    width: 100%;
    display: none;
    flex-direction: column;
    height: auto;
    gap: 20px;
    background-color: var(--light-color);
    padding:20px 20px;
    justify-content: space-between;
    
    /* AJOUT : Nécessaire pour positionner la ligne par rapport à cette section */
    position: relative;
}

/* AJOUT : La nouvelle bordure avec retrait de 10px */
#filter-section::before {
    content: "";
    position: absolute;
    top: 0;         /* Placé tout en haut */
    left: 20px;     /* Retrait à gauche */
    right: 90%;    /* Retrait à droite */
    height: 2px; 
       /* Épaisseur de ta bordure */
    background-color: var(--primary-color);
}

    #filter-section #searchBar{
        width:100%;
        border-bottom:1px solid var(--primary-color);
        border-radius: 0;
    }

    #filter-section details{
        background-color: var(--readonly-color);
        text-align: left;
        height: auto;
        width:100%;
        padding:10px;
        min-height:40px;
        max-height:300px;
        overflow-y:auto;
    }

    #filter-section details[open]{
        box-shadow: none;
}


    #filter-section details button{
        margin-top:10px;
        height:40px;
        display: none;
    }


    #filter-section button{
        height:50px;
        border-radius: 0;
    }

    #filter-section .toHideInBigScreen{
        display:flex;
       align-items: center;
       justify-content: center;
    }

    #filter-section .icons{
        display: none;
        cursor: pointer;
        height:25px;
        width:25px;
        transform: scale(0.5) rotate(0deg);
        margin-left:-10px;
        margin-right:-15px;
        transition: transform 0.2s ease-out;
    }

    #filter-section .icons:hover{
        transform: scale(0.5) rotate(-45deg);
    }

    #filter-section details div.checkboxFilterContainer{
        display: flex;
        gap:5px;
        align-items: center;
        margin-top:5px;
        justify-content: left;
        background-color: transparent;
    }

    #filter-section details div.checkboxFilterContainer label{
        margin:0;
    }


    #filter-section details div.checkboxFilterContainer:nth-of-type(1){
        display: flex;
        gap:5px;
        margin-top:15px;
    }


    #filter-section details div.checkboxFilterContainer input{
        width:15px;
        height:15px;
        border:1px solid var(--primary-color);
    }
    
}

@media screen and (max-width: 700px) {
    .skeleton-card {
        display: block; /* Prend toute la largeur de la colonne unique */
        height: 400px; /* Tu peux augmenter la hauteur si tes images sont plus grandes en solo */
    }
    #products-container{
        grid-template-columns: repeat(1, 1fr);
        grid-template-areas: "cartMessage";
    }

    .thumbnail-wrapper .thumb-nav-container{
        gap:10px;
    }
    .thumbnail-wrapper .thumb-nav-container .thumb-nav{
        width:40px;
        height:40px;
    }


}

#products-container .product-card img{
    width: 100%; 
    height: auto; 
    display: block; 
    background-color: white;
}


#products-container .product-card h3{
    font-weight:600;
}

#products-container .product-card{
    width:100%;
    margin:0 auto;
    text-align: left;
    gap:10px;
    cursor:pointer;
    display: flex;
    flex-direction: column;
    align-items: left;
}

.product-card.notActive {
    position: relative; /* Indispensable pour le positionnement absolute du badge */
    opacity: 0.7; /* Optionnel : rend la carte légèrement transparente */
}

.product-card.notActive::before {
    content: 'Inactif'; /* Correction de l'orthographe */
    background-color: var(--error-color);
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 0 5px 5px 0;
    font-weight: bold;
    z-index: 10;
}


#product-details-container{
    width:100%;
    max-width: 1440px;
    margin:50px auto;

    
}

#product-details-container .product-card{
    display: grid;
    grid-template-columns: 50% 50%;
    width:100%;
    margin:0 auto;
    gap:50px;
}

@media screen and (max-width: 1040px) {
.skeleton-details {
        flex-direction: column; /* Aligne l'image au-dessus du texte */
        padding: 10px; /* Réduit l'espace sur mobile */
    }

    .skeleton-image-side {
        height: 350px; /* Réduit la hauteur de l'image pour les petits écrans */
        width: 100%;
    }
    
    .skeleton-info-side {
        width: 100%;
    }
#product-details-container .product-card{
    display: grid;
    grid-template-columns: 100%;
    width:100%;
    margin:0 auto;
    gap:50px;
}
}

#product-details-container .product-card .slideshowContainer{
    width:100%;
    margin-bottom: 15px;
}

#product-details-container .product-card .productInfo{
    text-align: left;
    gap:20px;
    display: flex;
    flex-direction: column;
}

#colorThumbnailsContainer{
    width:100%;
    display: flex;
    gap:10px;
}

#colorThumbnailsContainer img.color-thumbnail-image{
    width:25px;
    height:25px;
    border:1px solid var(--light-color);
    border-radius: 100%;
}

#colorThumbnailsContainer img.color-thumbnail-image:hover{
    border:2px solid var(--accent-color);
}




.productInfo .title{
    font-size: 2rem;
}


.productInfo #technicalInfo{
    display: flex;
    flex-direction: column;
    gap:15px;
    background-color: rgba(0, 0, 0, 0.05);
    padding:15px;
}

.productInfo #technicalInfo .light{
    color:var(--secondary-color);
}

.productInfo #technicalInfo .alert{
    color:var(--error-color);
}

.slideshowWrapper{
    display: flex;
    height:fit-content;
    align-items: center;
    position:relative;
}

.slideshowContainer img{
    width:100%;    
}

.button-slideshow-container{
    position:absolute;
    width:100%;
    display: flex;
    flex-direction: row;
    gap:10px;
    justify-content: right;
    bottom:-50px;
    margin-bottom:15px;
}

.product-sizes{
    display:flex;
    flex-direction: row;
    gap:10px;
    overflow-x: auto;
    scrollbar-width: normal;
    scrollbar-color:  var(--primary-color);
}

.product-sizes div{
    display: flex;
    flex-direction: column;
    min-width:125px;
    gap:3px;
}

.lightText{
    opacity: 0.5;
}

#add-to-cart-container{
    display: none;
}

#cart-container{
    display: flex;
    flex-direction: column;
    gap:20px;
    margin:0 auto;
    text-align: right;
    justify-content: right;
    align-items: right;
    z-index:10;
}

.cart-product-container{
    display: flex;
    flex-direction: column;
    text-align: left;
    background-color: var(--light-color);
    padding:10px;
    border-radius: 10px;
}



.cart-product-container summary::before{
    transform: rotate(90deg);
    margin-left:-20px;
    position: absolute;
}


.cart-product-container.active summary::before{
    transform: rotate(180deg);
    margin-left:-20px;
}


.cart-product-container summary{
    display: flex;
    justify-content: space-between;
    cursor:pointer;
    margin:10px 10px 10px 30px;
    font-weight: bold;
    padding:10px;
    align-items: center;

}

.editableSizesContainer{
    display: none;
    flex-direction: column;
    gap:20px;
    margin:-10px 10px 10px;
    padding:10px;
}

.cart-product-container .size-row{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgb(197, 197, 197);
    padding-bottom:5px;
}


.size-row div:nth-child(1){
    gap:2px;
    display: flex;
}




.size-row .size-prices{
    display: flex;
    flex-direction: column;
    align-items: right;
    text-align: right;
    gap:2px;
}

.size-row .size-prices span:nth-child(2){
    opacity: 0.5;
    font-size: 0.9rem;
}



#totalPriceContainer{
    text-align: right;
    margin:0 auto;
    width:100%;
    display: flex;
    gap:5px;
    margin-top:15px;
    flex-direction: column;
}

#profileContent{
    display:flex;
    gap:50px;
    width:100%;
}

#paymentStep{
    display:flex;
    gap:50px;
}

@media screen and (max-width: 1040px) {
    #paymentStep, #profileContent{
        display:flex;
        flex-direction: column;
        gap:50px;
        width:100%;
    }

    .cart-product-actions, .update-cart-container{
        display: flex;
        flex-direction: column;
        gap:20px;
    }

    #paymentForm, #loginForm{
        margin-top:0px;
        max-width: unset !important;
        width:100%;
    }
    

}

.cartMessage{
    margin-top:-10px;
    background-color: var(--light-color);
    width:100%;
    text-align: center;
    padding:30px;
    grid-area: cartMessage;
    border-radius: 10px;
}

#paymentStep #loginForm{
    width:100%;
    margin-top:0px;
    max-width: 500px;
}

#add-to-cart-error-container{
    margin:-15px auto 0;
    width:100%;
}

#paymentForm{
    width:100%;
    max-width: 500px;
    margin-top:-10px;
}

#paymentStep #cart-container{
    width:100%;
    min-width: 0;
}

.product-error-message{
    background-color: var(--light-error-color);
    padding:10px;
    border-radius: 10px;
    margin-top:15px;
}

.product-error-message p{
    color:white;
}


.cartErrorMessage{
    padding:20px;
    background-color: var(--light-error-color);
    border-radius: 10px;
    margin-bottom:-30px;
}

.cartErrorMessage p{
    color:white;
}

.cartMessageOrange{
    padding:20px;
    background-color: var(--accent-color);
    border-radius: 10px;
    color:white !important;
    margin-bottom:-25px;
}

#paymentConfirmationContainer{
    display: flex;
    flex-direction: column;
    gap:25px;
}


#paymentConfirmationContainer p.important{
    background-color: var(--accent-color);
    padding:20px;
    border-radius: 10px;
    color:white;
}



.dash-container{
    background-color: var(--light-color);
    width:100%;
    padding:30px;
    margin:10px auto;
    text-align: left;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap:25px;
}

#dash-usersContainer.dash-container{
    gap:15px;
}

#dash-usersContainer .table-scroll-wrapper{
    margin-top:0;    
}

#ordersList{
    width:100%;
    margin:10px auto;
    text-align: left;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap:25px;
}

.dash-container .order-card{
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding:20px;
}

.dash-container .order-card p.orderId{
    font-weight: bold;
}

.dash-container .order-card p.date{
    opacity: 0.7;
    margin-top:5px;
}


.dash-container .order-card:hover{
    background-color:var(--accent-color);
    cursor: pointer;
}

.dash-container .order-card:hover p{
    color:white;
}


#order-details-container{
    width:100%;
    margin:20px auto;
    display: flex;
    flex-direction: column;
    gap:25px;
    text-align: left;
    position:relative;
}

#orderInformationContainer{
    display: flex;
    gap:50px;
    width: 100%;
}

@media screen and (max-width: 1080px) {
    #orderInformationContainer{
    display: flex;
    flex-direction: column;
    gap:10px;
    width: 100%;
    }
        .actionsContainer{
    flex-direction: column;
        }

}

#selledTo, #shippedTo{
    background-color: var(--light-color);
    padding:20px;
    border-radius: 5px;
    width:100%;
    display: flex;
    flex-direction: column;
    gap:5px;
}

#selledTo h1, #shippedTo h1{
    margin-bottom: 15px;
    font-weight: bold;
}


#orderProductsContainer{
    display: flex;
    flex-direction: column;
    gap:20px;
    width:100%;
    border-radius: 5px;
}

#order-details-container .order-product-group{
    display: flex;
    flex-direction: row;
    padding:20px 0;
    justify-content: space-between;
    border-bottom:1px solid var(--light-color);
}

.personalization-detail{
    margin-top:-10px;
    color:var(--secondary-color);
    font-size:1rem;
}
#order-details-container .order-product-group .name-and-details{
    display: flex;
    flex-direction: column;
    gap:10px;
    text-align: left;
}

#order-details-container .order-product-group .price-and-subtotal{
    display: flex;
    flex-direction: column;
    gap:10px;
    text-align: right;
}

#orderTotalsContainer{
    display:flex;
    flex-direction: column;
    gap:5px;
    text-align: right;
}

#order-details-container h1{
    text-align: center;
}

.errorDocumentContainer{
    display: flex;
    gap:25px;
    flex-direction: column;
    width:80%;
    max-width:500px;
}

.errorDocumentContainer h1{
    font-size: 2rem;
    text-transform: uppercase;
}

#viewSelectorContainer{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom:4px solid var(--light-color);
    width:1000px;
    max-width: 100%;
    margin:0 auto;
}

#viewSelectorContainer div{
    width:100%;
    padding:20px;
}

#viewSelectorContainer div.active, #viewSelectorContainer div:hover{
    background-color: var(--light-color);
    cursor: pointer;
}

.notSelectedView{
    display: none !important;
}



#pages-section{
    display: flex;
    gap:20px;
    justify-content: right;
    align-items: center;
    width:120%;
    margin-left:calc(-10% - 20px);
}


#pages-section a{
    text-decoration: none;

}

#pages-section a.active, #pages-section a:hover{
    text-decoration: underline;
}


.actionsContainer{
    display: flex;
    justify-content: left;
    gap:15px;
    margin-top: 25px;
    width:100%;
}

#hidenPaymentForm{
    display:none;
}

#addPoductBtn{
    background-color: var(--light-color);
    width:50px;
    height:50px;
    position: fixed;
    bottom:50px;
    right:50px;
}

#filterView{
    display: flex;
    flex-direction: column;
    gap:20px;
    padding:15px 0 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}


.table-scroll-wrapper {
    overflow-x: auto; /* Active le défilement horizontal si le contenu déborde */
    max-width: 100%; /* S'assure que le conteneur ne dépasse pas son parent */
    margin-top: 15px; /* Déplace la marge du tableau vers l'enveloppe si vous le souhaitez */
    scrollbar-width: thin;
    scrollbar-color:  var(--default-scrollbar-color) transparent;
    padding-bottom:15px;
}

.product-summary-table{
    width:100%;
    border-collapse: collapse;
    background-color: white;   
    word-wrap: break-word;
}

.product-summary-table th, .product-summary-table td{
    border:1px solid rgba(0, 0, 0, 0.3);
    padding:10px;
    word-break: break-all;
    white-space: nowrap;
}

.product-summary-table thead{
    background-color: rgba(0, 0, 0, 0.2);
}

/* 🦓 NOUVEAU : Style pour les lignes paires */
.product-summary-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.08); /* J'ai mis 0.05 pour que ce soit plus subtil que la bordure */
}

/* 💡 Optionnel : Assurez-vous que les lignes impaires (odd) soient blanches si le tableau de base n'a pas de fond uni */
.product-summary-table tbody tr:nth-child(odd) {
    background-color: white;
}

#orderStatusContainer{
    width:100%;
    display:flex;
    flex-direction: column; 
    justify-items: center;
    margin:-10px auto;
}


#orderStatusContainer div{
    display: flex;
    flex-direction: row-reverse;
    gap:10px;
    align-items: center;
    justify-content: left;
}

#orderStatusContainer div label{
    margin-top:-15px;
}

#orderStatusContainer input{
    width:15px;
    height:15px;
}

#statusAction{
    width:fit-content;
    border:1px solid var(--secondary-color);
    padding:0px 20px;
    cursor: pointer;
    position:relative;
    float: right;
    justify-content: right;
}

#shippingInfoContainer{
    background-color: var(--light-accent-color);
    padding:20px;
    display: flex;
    flex-direction: column;
    gap:10px;
    border-radius:5px;
}




