:root{
    --default-color : var(--occasion-color,#46a27d);
}

/* Animation */

@keyframes spin {
    from { transform: rotate(0) }
    to   { transform: rotate(360deg); }
}
@keyframes emptyBin {
    0% { transform: translateX(0) rotate(0); }
    20% { transform: translateX(0) rotate(100deg)  }
    30% { transform: translateX(5px) rotate(100deg) ; }
    40% { transform: translateX(0) rotate(100deg) ; }
    50% { transform: translateX(10px) rotate(100deg) ; }
    60% { transform: translateX(0) rotate(100deg) ; }
    70% { transform: translateX(10px) rotate(100deg) ; }
    100% { transform: translateX(0) rotate(0); }
} 
@keyframes leaf {
    0% { transform: rotate(0); }
    20% { transform: rotate(15deg); }
    60% { transform: rotate(-15deg); }
    80% { transform: rotate(15deg)translateX(0); opacity: 1; }
    100% { transform: rotate(0) translateX(-50px); opacity: 0;}
} 
@keyframes key {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(45deg); }
    15% { transform: rotate(30deg); }
    30% { transform: rotate(15deg); }
    45% { transform: rotate(0deg); }
    60% { transform: rotate(-15deg); }
    75% { transform: rotate(-30deg); }
    85% { transform: rotate(-42deg); }
    90% { transform: rotate(-44deg); }
    93% { transform: rotate(-43deg); }
    96% { transform: rotate(-44.5deg); }
    98% { transform: rotate(-43.5deg); }
    100% { transform: rotate(-45deg); }
}
@keyframes shield {
    0% { transform: rotateY(0) translateY(0);}
    50% { transform: rotateY(360deg) translateY(-4px);}
    100% { transform: rotateY(720deg) translateY(0); }
}


.categorie{
    margin: 10px;
    /*padding: 15px;*/
    border-radius: 5px;
    width: 30%;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    background-color: var(--state-color, #ddd);
}
.categorie:hover {
    transform: scale(1.03);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
.categorie i {
    font-size: 3em;
}
.categorie h3 {
    font-size: 1.7em;
    color: white;
}
.categorie p {
    color: white;
    font-size: 0.9em;
}

.categorie.inline {
    display: flex;
    width: auto;
    padding: 10px;
}

.icon {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
@media screen and (max-width: 800px) {
    .categorie {
        margin: 5px;
    }
    .categorie i {
        font-size: 2em;
    }
    .categorie h3 {
        font-size: 0.7em;
    }
    .categorie p {
        display: none;
    }
    .icon {
        margin: 10px 0;
    }
}
.occasion {
    --state-color: #2a9d8f;
}
.categorie.occasion i {
    color: white;
}

.neuf {
    --state-color: #ecae17;
}
.categorie.neuf i {
    color: white;
}

.destockage {
    --state-color: #335f70;
}
.categorie.destockage i {
    color: white;
}

.state-descr {
    color: var(--state-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
    padding: 0 10px;
    border-bottom: 2px solid var(--state-color);
    justify-content: end;
    text-align: right;
}
.state-descr i {
    font-size: 2.5em;
}

.container-info{
    padding-top: 35px;
    text-align: left;
    width: 50%;
}
.container-info p b{
    color: var(--default-color);
}
@media screen and (max-width: 600px) {
    .container-info {
        width: 90%;
    }
    .state-descr {
        justify-content: start;
        text-align: left;
    }
    .state-descr i {
        order: -1;
    }
}

.action{
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 10px 0;
}
.action i{
    font-size: 1.5em;
    color: var(--default-color);
}
.text-action p{
    margin: 0;
}
.text-action .description{
    color : #868686;
    font-size: 0.8em;
}

.contact-button{
    margin-top: 20px;
    display: inline-block;
    color: var(--default-color);
    font-weight: normal;
    font-size: 1.1em;
    padding: 8px;
    border-radius: 5px;
    border: 2px solid var(--default-color);
}
.contact-button:hover{
    background: var(--default-color);
    color: #fff;
}

.occasion .titre{
    font-size: 1.8em;
}
.occasion .titre.big{
    font-size: 2.3em;
}
.occasion .list-product{
    display: flex;
    overflow: hidden;
}

.occasion .product-item{
    width: 25%;
    padding: 10px;
}
@media screen and (max-width: 600px) {
    .occasion .list-product{
        flex-wrap: wrap;
        overflow: initial;
    }
    .occasion .product-item {
        width: 50%;
    }
    .occasion .product-item:last-child {
        display: none;
    }
}

.maker-logo-lst{
    width: 4em;
}

.occasion .product-item a{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 5px;
    box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
    -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
    -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
}

.occasion .product-item:hover a{
    box-shadow: 0px 0px 5px 3px rgba(0,0,0,0.3);
    -webkit-box-shadow: 0px 0px 5px 3px rgba(0,0,0,0.3);
    -moz-box-shadow: 0px 0px 5px 3px rgba(0,0,0,0.3);
}

.occasion .product-item img{
    max-width: 100%;
    border-radius: 5px;
}    

.occasion .product-item h3{
    font-size: 1.2em;
    margin-bottom: 5px;
    text-align: center;
    color: black;
}

.occasion .product-item p{
    text-align: center;
}

.occasion .product-item .state{
    margin: 0;
    padding-bottom: 3px;
    color: var(--color, green);
    font-weight: normal;
    border-bottom: 3px solid;
    border-radius: 5px;
}

.occasion .reconditionnement-img {
    border-radius: 15px;
    width: 80%;
    margin-left: 15px;
}

@media screen and (max-width: 600px) {
    .occasion .reconditionnement-img {
        display: none;
    }
}

.occasion .process-item {
    background: #fff;
    border-radius: 5px;
    padding: 10px;
    width: 14%;
    transition: transform 0.3s ease;
}

.occasion .process-item:hover{
    transform: scale(1.05);
}

.occasion .process-item i {
    font-size: 3em;
    color: var(--default-color);
    margin: 10px 0;
}

.occasion .process-item .name{
    margin: 0;
    font-weight: bold;
}

.occasion .process-item .descr{
    font-size: 0.8em;
    text-align: left;
    color: #2c2c2c;
    margin: 0;
}

.occasion .process-list {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0 15px;
}

@media screen and (max-width: 600px) {
    .occasion .process-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .occasion .process-item {
        width: 30%;
        overflow: hidden;
    }
}

.recycle-logo {
    font-size: 7em;
    color: var(--default-color);
}

.occasion .soustitre{
    font-size: 1.2em;
}

.occasion .grey-bg{
    background: #efefef;
    border-radius: 5px;
}

/* Animation on hover for actions */
.action.rotate:hover i {
    animation: spin 1s
}

.action.bin:hover i {
    animation: emptyBin 1.2s;
}

.action.leaf:hover i {
    animation: leaf 1s; 
}

.action.key:hover i {
    transform-origin: 76% 26%;
    animation: key 0.5s; 
    animation-iteration-count:2;
}

.action.shield:hover i {
    animation: shield 1s; 
}

/* Occasion Images */
.occasion-images img {
    width: 130px;
    max-height: 150px;
    border-radius: 5px;
    margin-right: 15px;
}

@media (max-width: 1000px) {
    .occasion-images img {
        width: 100px;
        max-height: 100px;
    }
}

/* Occasion Product */
.occasion-product {
    display: flex;
    border: solid 1px #e5e5e5;
    border-radius: 10px;
    background: white;
    width: 48%;
    padding: 15px;
    justify-content: space-between;
}

.occasion-product:hover {
    filter: brightness(0.9);
}

@media (max-width: 1000px) {
    .occasion-product {
        width: 100%;
    }
}

/* Occasion Text */
.occasion-txt {
    color: black;
    font-weight: normal;
    font-size: 18px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.occasion-txt .maker {
    font-size: 16px;
    color: #D81E35;
    margin: 0;
}

.occasion-txt .description{
    font-size: 0.7em;
}
.occasion-txt .type{
    font-size: 16px;
    color: #5e5e5e;
    margin: 0;
    margin-top: -6px;
}

.occasion-product .rub {
    font-size: 14px;
    color: var(--default-category-name-font-color);
    font-weight: normal;
}

/* List Occasion */
.list-ocas {
    display: flex;
    flex-wrap: wrap;
}

.list-ocas-rubrique{
    display: flex;
    flex-wrap: wrap;
    width: 90%;
}


@media (max-width: 576px) {
    .list-ocas {
        width: 100%;
    }

    .list-ocas-rubrique{
        width: 100%;
    }
}

/* Occasion Filter */
.ocas-filter {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 10px;
}

@media (max-width: 576px) {
    .right-panel {
        display: none;
    }
}


/* Button Filter */
.button-filter {
    background: #d7d7d7;
    padding: 5px;
    border-radius: 5px;
    border: none;
    color: black;
}
.button-filter:focus-visible {
    outline: 2px solid #000;
}
.button-filter:focus-visible,
.button-filter:hover .button-brand-name,
.button-filter.active .button-brand-name,
.button-filter:hover,
.button-filter.active {
    cursor: pointer;
    background: var(--default-block-category-color);
    color: white;
}

.button-brand-name {
    font-size: .6em;
    color: #D81E35;
    margin: 0;
}

/* Price */
.price {
    color: black; /* Confirmed: var(--default-block-category-color) was commented out */
    font-size: 23px;
    margin: 0;
}

.price.old {
    color: #5b5b5b;
    font-size: 18px;
    margin-left: 10px;
}

/* Occasion Rubrique */
.occasion-rubrique {
    background: #ddd;
    padding: 10px;
    border-radius: 5px;
    color: black;
    font-weight: normal;
    font-size: 15px;
}

.occasion-rubrique img {
    max-height: 150px;
}

.occasion-rubrique:hover {
    filter: brightness(0.8);
    color: black;
}

/* Occasion Images Layout */
.ocassion-images {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 15px;
}

.ocassion-images .image {
    width: 25%;
    align-self: center;
    height: 10vh;
    padding: 1px;
}

.ocassion-images .image:hover {
    border: 1px solid gray;
    border-radius: 5px;
    cursor: pointer;
}

.image img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: contain;
}

.ocassion-images .image:first-child {
    width: 100%;
    margin-bottom: 10px;
    height: 40vh;
    display: flex;
    align-items: center;
    cursor: zoom-in;
}
.ocassion-images .image:first-child:hover {
    border:none;
}

/* More Images */
.more-images {
    background: #dfdfdf;
    width: 25%;
    border: gray solid 3px;
    font-size: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Search Occasion */
#search-occasion {
    background: #e8e8e8;
    border: none;
    margin-top: 10px;
    padding: 20px 10px;
}

/* Etat */
.etat {
    color: green;
    font-size: 14px;
}

.occasion-description{
    font-size: 15px;
    color: #5b5b5b;
}

.w-sm-80 {
    width: 100%;
}

.exProdDescr{
    font-size: 0.9em;
    color: #393939;
    font-weight: normal;
}

.shortDescription {
    font-size: 20px;
    color: #333;
    background: #e6e6e6;
    padding: 5px;
    border-radius: 5px;
    margin: 0;
}

.line-filter{
    width: 0; 
    height: 1px;
    background:var(--default-color);
    transition: width 0.3s ease;
}
.line-filter.active{
    width: 100%;
}


.allFilter {
    display: flex;
    flex-wrap: wrap;
    max-height: 0;
    gap: 10px;
    overflow-y: hidden;
    padding-top: 0;
    justify-content: center;
    transition: max-height 0.3s ease, padding-top 0.3s ease;
}
.allFilter.active {
    max-height: 175px;
    padding-top: 1rem;
}

@media (min-width: 576px) {
    .w-sm-80 {
        width: 80%;
    }
}
