/* ============================================================
   AVANTAGES 10 — ENGAGEMENTS NUMEROTES
   Composition 5/7. A gauche, un portrait de detail detoure en arche, et une
   courte legende en italique. A droite, sur-titre, titre, description, puis
   les points en liste numerotee 01, 02, 03… separes par des filets.

   Le numero n'est pas une icone : c'est un engagement qu'on compte. Il est
   donc typographique, dans la serif du titre, et reste discret.

   SIGNATURE — chaque filet se dessine de gauche a droite, puis le numero et
   le texte apparaissent en cascade. Le script pose l'etat de depart ; sans
   lui (JS absent, mouvement reduit, export), tout est deja en place.

   FOND — surface douce (sable) par defaut, pour alterner avec un hero clair.
   `--avantages-10-fond` se redefinit dans le theme.
   ============================================================ */

.avantages-10 {
    --avantages-10-fond: color-mix(in srgb, var(--secondary) 24%, var(--white));
    --avantages-10-filet: color-mix(in srgb, var(--black) 14%, transparent);
    --avantages-10-doux: color-mix(in srgb, var(--gray-dark) 78%, var(--black));
    --avantages-10-courbe: cubic-bezier(0.22, 1, 0.36, 1);

    padding: clamp(4.5rem, 10vw, 8.5rem) 5%;
    background: var(--avantages-10-fond);
    color: var(--black);
}

.avantages-10--bandeau {
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.avantages-10__inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6.5rem);
    max-width: 1280px;
    margin: 0 auto;
}

.avantages-10--sans-visuel .avantages-10__inner {
    grid-template-columns: minmax(0, 1fr);
    max-width: 880px;
}

/* ---------- Le visuel : une arche, pas un rectangle ---------- */

.avantages-10__visuel {
    margin: 0;
}

.avantages-10__cadre {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 999px 999px clamp(16px, 2vw, 26px) clamp(16px, 2vw, 26px);
    background: color-mix(in srgb, var(--secondary) 40%, var(--white));
}

.avantages-10__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avantages-10__legende {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    max-width: 34ch;
    margin: clamp(1rem, 2vw, 1.5rem) 0 0;
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.3vw, 1.1875rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.45;
    color: var(--avantages-10-doux);
}

.avantages-10__legende::before {
    content: "";
    flex: none;
    width: 1.75rem;
    height: 1px;
    background: var(--avantages-10-filet);
    transform: translateY(-0.3em);
}

/* Le texte est UN seul élément flex : rendu nu, chaque morceau de la phrase et
   le .mcl-accent devenaient des éléments flex distincts, alignés en colonnes. */
.avantages-10__legende-texte {
    min-width: 0;
    color: var(--avantages-10-doux);
}

.avantages-10__legende .mcl-accent {
    font-style: italic;
    color: var(--black);
}

/* ---------- Le texte ---------- */

.avantages-10__tete {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 1.8vw, 1.5rem);
    margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.avantages-10__surtitre {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--avantages-10-doux);
}

.avantages-10__titre,
.avantages-10__titre:hover {
    max-width: 18ch;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.125rem, 4vw, 3.5rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--black);
}

.avantages-10__titre .mcl-accent {
    font-style: italic;
    color: inherit;
}

.avantages-10__intro {
    max-width: 48ch;
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.0625rem);
    font-weight: 400;
    line-height: 1.85;
    color: var(--avantages-10-doux);
}

.avantages-10__masque,
.avantages-10__masque:hover {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    color: var(--black);
}

/* ---------- La liste numerotee ---------- */

.avantages-10__points {
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--avantages-10-filet);
}

.avantages-10__point {
    position: relative;
    display: grid;
    grid-template-columns: clamp(2.75rem, 5vw, 4.25rem) minmax(0, 1fr);
    align-items: baseline;
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    margin: 0;
    padding: clamp(1.25rem, 2.2vw, 1.75rem) 0;
}

/* Le filet est un pseudo-element : c'est lui qui se dessine, pas une bordure. */
.avantages-10__point::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--avantages-10-filet);
    transform-origin: left center;
}

.avantages-10__numero {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.8vw, 1.625rem);
    font-weight: 400;
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 1;
    color: var(--avantages-10-doux);
}

.avantages-10__point-titre,
.avantages-10__point-titre:hover {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.9vw, 1.625rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--black);
}

.avantages-10__point-titre .mcl-accent {
    font-style: italic;
    color: inherit;
}

.avantages-10__point-texte {
    max-width: 52ch;
    margin: 0.5rem 0 0;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--avantages-10-doux);
}

/* ---------- Signature : filet, puis numero, puis texte ---------- */

.avantages-10--anime .avantages-10__point::before {
    transform: scaleX(0);
    transition: transform 0.9s var(--avantages-10-courbe);
}

.avantages-10--anime .avantages-10__numero,
.avantages-10--anime .avantages-10__corps {
    opacity: 0;
    transform: translateY(0.6rem);
    transition: opacity 0.7s var(--avantages-10-courbe), transform 0.7s var(--avantages-10-courbe);
}

.avantages-10--anime .avantages-10__numero {
    transition-delay: 0.35s;
}

.avantages-10--anime .avantages-10__corps {
    transition-delay: 0.5s;
}

.avantages-10--anime .avantages-10__point.is-visible::before {
    transform: scaleX(1);
}

.avantages-10--anime .avantages-10__point.is-visible .avantages-10__numero,
.avantages-10--anime .avantages-10__point.is-visible .avantages-10__corps {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .avantages-10__inner {
        grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
        align-items: start;
    }
}

@media (max-width: 768px) {
    .avantages-10__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .avantages-10__visuel {
        width: min(100%, 22rem);
    }

    .avantages-10__cadre {
        aspect-ratio: 5 / 5.4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .avantages-10--anime .avantages-10__point::before,
    .avantages-10--anime .avantages-10__numero,
    .avantages-10--anime .avantages-10__corps {
        transition: none;
    }
}
