.temoignages-container {
    width: 100%;
    padding: 0 2rem;
}

.temoignages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding-top: 0;
}

.temoignage-item {
    width: 30rem;
    height: 30rem;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 3rem 0 3rem 0;
}

.temoignage-content {
    height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease;
}

.temoignage-item:nth-child(3n + 1) .temoignage-content {
    background-color: #4F80FF;
}

.temoignage-item:nth-child(3n + 2) .temoignage-content {
    background-color: #FF8C61;
}

.temoignage-item:nth-child(3n) .temoignage-content {
    background-color: #9D69A3;
}

.temoignage-item:hover {
    cursor: pointer;
}

.temoignage-item:hover .temoignage-content {
    background-color: #232323;
}

.temoignage-header {
    display: flex;
    align-items: center;
    height: 25%;
    flex-shrink: 0;
}

.temoignage-title-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    flex-shrink: 0;
    flex-grow: 0;
    width: 75%;
}

/* When there's no portrait, use full width */
.temoignage-title-container.no-portrait {
    width: 100%;
}

.temoignage-title-line1,
.temoignage-title-line2 {
    color: #FFF;
    text-align: center;
    font-size: 1.1em;
    text-transform: uppercase;
    line-height: 1.2;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: none;
    font-family: 'Unbounded', sans-serif;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    width: 100%;
}

/* Alternative approach using CSS Grid */
.temoignage-title-grid {
    display: grid;
    grid-template-rows: 1fr 1fr;
    height: calc(1.2em * 2);
    overflow: hidden;
}

/* JavaScript-managed text wrapping */
.temoignage-title-js {
    display: block;
    line-height: 1.2;
    max-height: calc(1.2em * 2);
    overflow: hidden;
    text-overflow: ellipsis;
}

.temoignage-title-with-image {
    width: 75%;
}

.temoignage-title-without-image {
    width: 100%;
}

.temoignage-portrait {
    position: absolute;
    top: 0;
    right: 0;
    width: 25%;
    height: 25%;
    border-radius: 0 0 0 3rem;
    overflow: hidden;
    flex-shrink: 0;
    align-self: flex-start;
}

.temoignage-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.temoignage-text {
    height: 75%;
    color: #FFF;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Open Sans', sans-serif;
    padding: 0 2rem 2rem 2rem;
    position: absolute;
    top: 8rem;
    display: -webkit-box;
    -webkit-line-clamp: 9;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-word;
    max-height: calc(1.2em * 9);
    line-height: 1.2;
}

.temoignage-content .btn {
    width: auto;
    align-self: center;
}