.confiances {
    display: flex;
    justify-content: center;
    width: 90%;
    margin: 80px auto;
    padding: 0 20px;
}

.confiances .confiances-content {
    position: relative;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 60px;
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
    overflow: hidden;
}

.confiances .confiances-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--main-color), transparent);
    opacity: 0.8;
}

.confiances-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(88, 153, 255, 0.15);
}

.confiances-content h1 {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
}

.confiances-text-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
    width: 100%;
}

.confiances-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    width: 100%;
}

/* Logo Item Container */
.logo-item {
    position: relative;
    padding-bottom: 10px;
    /* Space for the bar */
}

/* Loading Bar Pseudo-element */
.logo-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background-color: var(--main-color);
    border-radius: 2px;
    transition: width 0s;
    /* Instant reset by default */
}

.logo-item.active::after {
    width: 100%;
    transition: width 5s linear;
    /* Animate over 5s */
}

/* Pause animation on hover */
.confiances-content:hover .logo-item.active::after {
    transition-play-state: paused;
    /* Note: transition-play-state isn't standard, we might need animation instead */
}

/* Let's switch to animation for better control */
.logo-item::after {
    transition: none;
}

.logo-item.active::after {
    animation: fillBar 5s linear forwards;
}

.confiances-logo img {
    height: 100px;
    width: 200px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    padding: 15px;
}

.confiances-logo img:hover {
    transform: scale(1.15);
}

.confiances-text {
    max-width: 750px;
    margin-bottom: 50px;
    position: relative;
}

.confiances-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
    font-weight: 500;
    text-align: justify;
}

.confiances-text span {
    color: var(--main-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
}


.confiances-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    width: 100%;
}

.confiances-images img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.confiances-images img:hover {
    transform: scale(1.15);
}

/* Active Logo Style (applied to img inside active item) */
.logo-item.active img {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.confiances-text p {
    display: none;
}

.confiances-text p.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fillBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .confiances {
        width: 95%;
        margin: 40px auto;
        padding: 0;
    }

    .confiances .confiances-content {
        padding: 40px 20px;
    }

    .confiances-content h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .confiances-text p {
        font-size: 1rem;
    }

    .confiances-images {
        gap: 30px;
    }

    .confiances-images img {
        height: 40px;
    }

    .confiances-text-img {
        flex-direction: column;
        gap: 50px;
    }

}