.category-filter {
    position: absolute;
    right: 0;
    top: -20px;
    z-index: 1;
    width: 25px;
    height: 15px;
    cursor: pointer;
    transition: all .5s ease;
}

.category-filter.hide {
    opacity: 0;
    transform: translateY(70px);   
}    

.category-filter-list > div {
    margin-bottom: 5px;
}

.category-filter-list > div:last-of-type {
    margin-bottom: 0;
}

.category-filter-icon {
    width: 20px;
    height: 3px;
    background-color: #DEDEDE;
    float: right;
    transition: width .3s ease;
}

.category-filter:hover .category-filter-icon,
.category-filter.filter-open .category-filter-icon {
    width: 24px;
}

.category-filter-icon:after {
    content: "";
    display: block;
    width: 10px;
    height: 3px;
    background-color: #DEDEDE;
    transform: translate(-5px,8px);
    transition: transform .3s ease;
}

.category-filter:hover .category-filter-icon:after, 
.category-filter.filter-open .category-filter-icon:after {
    transform: translate(4px,8px);
}

.category-filter-icon:before {
    content: "";
    display: block;
    width: 10px;
    height: 3px;
    background-color: #DEDEDE;
    transform: translate(10px,11px);
    transition: transform .3s ease;
}

.category-filter:hover .category-filter-icon:before,
.category-filter.filter-open .category-filter-icon:before {
    transform: translate(14px,11px);
}

.category-filter-list {
    background-color: #5B5B5B;
    padding: 24px 20px;
    width: 150px;
    display: none;
    position: absolute;
    right: 0;
    top: 15px;
    font-size: 13px;
    line-height: 22px;
    color: #ffffff;
    z-index: 1;
    cursor: pointer;
    transition: opacity .5s, transform .5s;
}

.category-filter-list.hide {
    transform: translateY(70px);   
    opacity: 0;
}

.category-filter-list .button.is-checked {
    color: #DEDEDE;
}

.isotope.no-transition,
.isotope.no-transition .isotope-item,
.isotope .isotope-item.no-transition {
    -webkit-transition-duration: 0s;
    -moz-transition-duration: 0s;
    -ms-transition-duration: 0s;
    -o-transition-duration: 0s;
    transition-duration: 0s;
}

.grid {
    width: calc(100% + 60px);
    margin-left: -30px;
    position: relative;
    display: block;
    overflow: hidden;
}

.grid-item {
    float: left;
    font-size: 0;
    line-height: 0;
    box-sizing:border-box;
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    overflow: hidden;
    border: 30px solid transparent;
    width: 50%;
    transition: opacity .3s;
	
}

.grid-item img {
    display: block;
    width: 100%;
    height: 400px;
	min-height: 400px;
    max-height: none;
    max-width: none;  
	object-fit: cover;	
}

.grid-sizer,
.grid-item {
    width: calc(100% / 3);
}

.grid-item.p-one {
    width: 100%;
}

.grid-item.p-one-third {
    width: calc(100% / 3);
}

.grid-item.p-two-third {
    width: calc(200% / 3);
}

.portfolio-overlay-date {
    position: absolute;
    bottom: 110px; 
    right: 0;
    height: 30px; 
    background-color: rgba(222, 222, 222, 0.90); 
	color: #5B5B5B;
    pointer-events: none; 
    z-index: 1; 
    display: flex; /* Utilisation de flexbox pour centrer verticalement le contenu */
    align-items: center; /* Centrer verticalement le contenu */
	padding: 0 10px;

}

.portfolio-presentation-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 110px; /* Hauteur de 120px pour .portfolio-presentation-overlay */
    margin-bottom: 0;
    background-color: rgba(197, 229, 255, 0.90);
    pointer-events: none; /* Permet aux clics de passer à travers le filtre vers l'image en dessous */
    padding: 15px; /* Espace à l'intérieur de la zone de texte */
    box-sizing: border-box;
    color: #05215C; /* Couleur du texte */
    z-index: 1; /* Pour placer le texte au-dessus du filtre */
}

.portfolio-text-holder {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1;
    font-size: 20px;
    background-color: #1559A4;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform .3s ease;
}

.grid-item a.item-link:hover .portfolio-text-holder,
.grid-item.portfolio-content-loading a.item-link .portfolio-text-holder {
    transform: translateX(0);
}

.grid-item.portfolio-content-loading {
    opacity: 1 !important;
}

.portfolio-text-wrapper {
    position: absolute;
}

.portfolio-date {
    font-size: 12px;
    margin-bottom: 0;
}

.portfolio-text {
    font-size: 18px;
    line-height: 100%;
    font-weight: 700;
    margin-bottom: 0;
    padding-bottom: 5px;
}

.portfolio-cat {
    font-size: 13px;
    line-height: 125%;
    margin-bottom: 0;
}

.portfolio-cat:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 1px;
    background-color: #05215C;
    vertical-align: 4px;
    margin-right: 5px;
}

.portfolio-detail {
	font-size: 18px;
    color: #ffffff;
    line-height: 125%;
    margin: 30px;
}

.portfolio-load-content-holder {
    opacity: 0;
    transform: translateY(70px);
    transition: all .5s ease;
}

.portfolio-load-content-holder.show {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-load-content-holder.show.viceversa {
    opacity: 0;
    transform: translateY(70px);
}

.portfolio-content-wrapper {
    display: none;
}

.portfolio-content-wrapper.show {
    display: block;
}

.close-icon {
    background-image: url(images/close-left-arrow.png);
    background-repeat: no-repeat;
    width: 70px;
    height: 70px;
    display: inline-block;
    background-color: rgb(243, 123, 131);
    border-radius: 5px;
    margin-bottom: 20px;
    background-size: 70px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.close-icon:hover {
    background-position: -5px 0;
}

#portfolio-grid {
    transition: all .5s ease;
    opacity: 1;
    transform: translateY(0px);
}

#portfolio-grid.hide {
    opacity: 0;
    transform: translateY(70px);    
}

.grid-item a.item-link.portfolio-content-loading:after, 
.ajax-portfolio.portfolio-content-loading .portfolio-text-holder {
    opacity: 1;
    transform: translateX(0);
}

.single-portfolio .section {
    min-height: 100vh;
}

.portfolio-content {
    padding-bottom: 1px;
}





/* Recursivité */
@media screen and (max-width: 1599px) {
	
    .grid-sizer, 
    .grid-item {
        width: 50% !important;
        border-width: 15px;
    }  
	
	.grid {
        width: calc(100% + 4vw);
        margin-left: -2vw;
    }

    .grid-item {
        border-width: 1vw;
    }

    .category-filter {
        right: -1vw;
    }

}

@media screen and (max-width: 1360px) {
   

    .portfolio-content .one-half {
        margin-bottom: 30px;
    }

}

@media screen and (max-width: 1020px) {
	
	.grid {
        width: calc(100% + 30px);
        margin-left: -15px;
    }

    .category-filter {
        right: 0;
    }  
    
    .close-icon {
        width: 60px;
        height: 60px;
        background-size: 60px;
    }
	
}

@media screen and (orientation: landscape) and (max-width: 767px){
	
	.portfolio-cat {
        font-size: 15px;
    }
	
}

@media screen and (orientation: portrait) and (max-width: 767px) { 

	.portfolio-cat {
        font-size: 13.25px;
    }
	
}

@media screen and (max-width: 767px) { 

	#portfolio-wrapper {
        margin-top: 30px;
    }
	
	.category-filter-list {        
        top: 0;
    }

    .grid {
        width: 100%;
        margin: 0;    
    }

    .category-filter {
        top: -30px;        
    }

    .grid-sizer, 
    .grid-item {
        width: 100% !important;
    }

    .grid-item {
        border: 0;
        margin-bottom: 30px;    
    }

    #portfolio-grid > div:last-of-type {
        margin-bottom: 0;
    }
	
}