/* ---  BACKGROUND --- */

.all_vitrine {
    position: relative;
    background: url("../img/fond_bois2.jpg");
    background-size: 100% auto; /* Conserve la même taille que ton code initial */
    background-position: center;
    padding: 2rem;
    margin-top: 80px;
}

.all_vitrine::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.521);
    z-index: 1;
}

.all_vitrine > * {
    position: relative;
    z-index: 2;
}



/* --- TITRE --- */
.titre {
    /* margin-top: 80px; */
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2rem 0;
}

.titre h1 {
    text-transform: uppercase;
    text-align: center; /* Centre le texte même si le contenu passe sur plusieurs lignes */
    word-wrap: break-word; /* Force les mots longs à se couper si nécessaire */
    font-size: 2.8rem;
}

.titre h2 {
    text-align: center; /* Centre le texte même si le contenu passe sur plusieurs lignes */
    word-wrap: break-word; /* Force les mots longs à se couper si nécessaire */
    font-size: 1.7rem;
}


/* ------ MENU DE SELECTION ------ */

.selection .btn-vitrine1 {
    padding: 0.65rem 2.4rem;
    text-decoration: none;
    color: #2f1b0f;
    font-weight: 600;
    background:
        linear-gradient(135deg, rgba(222, 221, 214, 0.8) 0%, rgba(194, 193, 185, 0.8) 100%),
        url("../img/texture_bois.jpg");
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    border-radius: 0;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    border: 1px solid #7b4f2c;
    cursor: pointer;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
    line-height: 1.2;
    position: relative;
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selection .btn-vitrine1:hover {
    background:
        linear-gradient(135deg, rgba(211, 210, 204, 0.82) 0%, rgba(175, 174, 167, 0.82) 100%),
        url("../img/texture_bois.jpg");
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
}

.selection {
    gap: 2rem;
    display: flex;
    justify-content: center; /* Centre les boutons horizontalement */
    align-items: center; /* Aligne les boutons verticalement */
    position: relative;
    z-index: 20;
}



/* Les 2 menus déroulants */
.dropdown{
    position: relative;
    /* margin-left : 1rem; */

    /* box-shadow: 0 6px 12px rgba(0, 0, 0, 0.9), 0 3px 6px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.7); */
}


.dropdown-menu {
    position: absolute;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
    background:
        linear-gradient(135deg, rgba(222, 221, 214, 0.8) 0%, rgba(194, 193, 185, 0.8) 100%),
        url("../img/texture_bois.jpg");
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: scaleY(0);
    transform-origin: top;
    transition: max-height 0.45s ease, opacity 1s ease, transform 0.5s ease, visibility 0.5s ease;
    z-index: 20;
}

.dropdown-menu ul {
    padding: 0;
    margin: 0;
    border-radius: 0;
    border: 1px solid #7b4f2c;
    box-shadow: 0 8px 16px rgba(27, 20, 11, 0.35);
}



.dropdown-menu li {
    width: 100%; 
    padding: 10px; 
    margin: 0; 
    box-sizing: border-box; /* Inclut le padding et les bordures dans la largeur */
    cursor: pointer;
    transition: background-color 0.3s ease;
    background: transparent;
    border-top: rgba(123, 79, 44, 0.6) solid 1px;
}


.dropdown-menu li:hover {
    background-color: rgba(43, 26, 11, 0.12);
}

.dropdown-menu a {
    text-decoration: none;
    text-align: center;
    justify-content: center;
    color: #2f1b0f;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    min-height: 32px;
    line-height: 1.2;
    width: 100%;
    padding: 0;
    margin: 0;
}


.dropdown-menu li:hover a {
    font-weight: bold;
    color: #2f1b0f;
}


.logo_deroulant {
    max-width: 15px;
    float: none;
}

.dropdown-menu li.selected {
    background-color: rgba(43, 26, 11, 0.18);
}

/* Bouton Catégories */
.btn-vitrine1{
    width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-clou {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    /* opacity: 0.9; */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.btn-clou.left {
    left: 6px;
}

.btn-clou.right {
    right: 6px;
}

.btn-label {
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 1.2;
}

@supports (-webkit-touch-callout: none) {
    .btn-label {
        position: relative;
        top: 2px;
    }

    .dropdown-menu a {
        position: relative;
        top: 2px;
    }
}

.dropdown_categorie{
    background: transparent;
    border: none;
    width: 100%;
}

.dropdown.open .dropdown-menu {
    max-height: 360px;
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
}




/* ------ VITRINE ------ */
.vitrine {
    /* border-top: solid black; */
    padding-top: 1rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-top: 2rem;
    margin-right: auto;
    justify-content: center;
    display: flex;
    gap: 30px;
    max-width: 1200px;
    flex-wrap: wrap;
    align-items: space;
    position: relative;
    z-index: 1;
}

td,th {
    border: 1px solid rgb(214, 214, 214);
    padding: 15px;
    font-size: 120%;
}

.vitrine a {
    color: black;
}

.vitrine .photo {
    background-color: white;
    max-width: 330px;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    padding-top: 5px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.9), 0 3px 6px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.7);
}

/*-- Effet punaises --*/

.vitrine .photo::before, 
.vitrine .photo::after {
    content: '';
    position: absolute;
    width: 30px; /* Ajustez la taille selon vos besoins */
    height: 30px;
    background-image: url('../img/icon/punaise.png'); /* Chemin vers l'image de la punaise */
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 10; /* Assure que les punaises apparaissent au-dessus */
}

.vitrine .photo::before {
    top: -10px; /* Positionnement au-dessus du conteneur */
    left: -5px; /* Coin supérieur gauche */
}

.vitrine .photo::after {
    top: -10px; /* Positionnement au-dessus du conteneur */
    right: -10px; /* Coin supérieur droit */
}



/* --- 1 MEUBLE --- */
.photo a{
    position: relative;
    flex-direction: column;
    align-items: center;
    margin: auto;
    display: flex;
    height: 370px;
}


.photo:hover .titre_img {
    color: rgba(0, 0, 0, 0.788);
}

.mado_image {
    height: 300px;
    width: 300px;
    margin: 10px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo:hover .mado_image {
    transform: scale(1.05);  /*Effet léger de zoom au survol  */
} 

.photo .légende_img {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    display: flex;
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
}

.légende_img .vendu {
    color: rgb(211, 102, 0);
    font-weight: bold;
}

.légende_img .disponible {
    color: rgb(0, 117, 0);
    font-weight: bold;
}

.légende_img .titre_img {
    font-weight: 600;
}

#loading-icon {
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}


/* ----- PAGINATION ----- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    /* gap: 0.5rem; */
    /* margin: auto; */
}

.pagination a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: white;
    font-weight: initial;
    background-color: black;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #555;
}

.pagination span {
    padding-left: 0.5rem;
    border-radius: 5px;
    font-weight: bold;
}


@media (max-width: 950px) {
    .titre h1 { 
        font-size: xx-large;
    }
    .titre h2 { 
        font-size: x-large;
    }

}


@media (max-width: 768px) {
    .titre h2 { 
        font-size: 1.3rem;
    }

}

@media (max-width: 640px) {

    .titre h1 { 
        font-size: 1.6rem;
    }

    .pagination a, .pagination span{
        font-size: medium;
    }

    .selection {
        gap: 1rem;
    }  
}

@media (max-width: 600px) {
    .selection button, 
    .selection .btn-vitrine1 {
        font-size: 0.9rem; /* Réduit la taille du texte pour s'adapter */
        padding: 0.4rem 0.8rem; /* Réduit les marges internes */
    }

    .dropdown-menu a {
        font-size: 0.9rem;
    }

    .titre h1 { 
        font-size: 1.3rem;
    }

    .titre h2 { 
        font-size: 1rem;
    }
}



@media (max-width: 500px) {

    .pagination a, .pagination span{
        font-size: small;
    }

    /* .selection button, 
    .selection .btn-vitrine1,
    .dropdown-menu a {
        font-size: 0.8rem;
    } */

    .selection {
        gap: 0.5rem; 
    }

    .logo_deroulant {
        max-width: 10px;
    }

}



@media (max-width: 440px) {
    /* .selection button, 
    .selection .btn-vitrine1,
    .dropdown-menu a {
        font-size: 0.6rem;
    } */

    .selection {
        gap: 0.4rem;
    }
}

@media (max-width: 400px){
    .all_vitrine {
        padding: 1rem;
    }

    
}

@media (max-width: 360px) {
    .mado_image {
        height: 270px;
        width: 270px;
    }

    .photo a{
        height: 340px;
    }
    
}


@media (max-width: 350px) {

    .logo_deroulant {
        max-width: 8px;
    }

    .pagination a{
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 360px) {
    .mado_image {
        height: 260px;
        width: 260px;
    }

    .photo a{
        height: 330px;
    }
}


@media (max-width: 320px) {
    .pagination a, .pagination span{
        font-size: x-small;
    }

    .mado_image {
        height: 200px;
        width: 200px;
    }

    .photo a{
        height: 280px;
    }
}

@media (max-width: 265px) {
    .mado_image {
        height: 180px;
        width: 180px;
    }

    .photo a{
        height: 260px;
    }
}






