.groupe-encadres {
    display: flex;
    flex-wrap: wrap;
}

.encadre {
    flex: 1 1 334px;
    margin: 1rem;
    margin-top:3rem;
    padding: 1rem;
    border: 1px solid var(--color-gold);
    border-radius: 0.375em;
    background: var(--color-white);
    position: relative;
    text-decoration: none;
    color: inherit;
}



/* Shrink-wrap to content but don't let text wrap; allow flex item but keep min-width based on content */
.encadre-thin {
    display: block; /* behave as block so inline text doesn't flow beside it */
    width: -moz-fit-content;
    width: fit-content; /* shrink-wrap the element to its contents */
    min-width: min-content; /* ensure minimum equals content width */
    white-space: nowrap; /* prevent text wrapping inside the box */
    max-width: 100%;
}

/* If .encadre is the flex item, prevent it from forcing .encadre-thin to expand
   when the thin modifier is applied */
.encadre.encadre-thin {
    flex: 0 0 auto;
}

@media screen and (max-width: 900px) {
    .encadre-thin {
        width: 100%;
        min-width: 0;
        white-space: normal;
        box-sizing: border-box;
    }

    .encadre.encadre-thin {
        flex: 1 1 100%;
    }
}

.encadre-grow:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.encadre .icone {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    padding: 5px;
    border-radius: 100%;
    border: 1px solid var(--color-gold);
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: var(--color-gold);
}

.encadre h2 {
    color: var(--primary);
    text-align: center;
}



.encadre-simple {
    position: relative;
    flex: 1 1 500px;
    margin: 1rem;
    margin-top:3rem;
    padding: 0;
    border: 2px solid var(--color-gold);
    border-radius: 0.375em;
    background: var(--color-white);
    text-decoration: none;
    color: inherit;
}

.encadre-simple h3 {
    color: var(--color-gold);
    text-align: center;
    padding: 1em;
    padding-bottom: 0;
    margin: 0;
    font-size: 1.3em;
    font-weight: normal;
}

.encadre-title-emphasis {
    font-weight: bold;
    text-decoration: underline;
}   