/* ===== Widgets Mimosas — composants autoportants (réutilisent les tokens du Design System) ===== */

/* ----------------------------------------------------------------------------
   1) BLOC ALTERNÉ : image + texte, image à gauche (défaut) ou à droite
---------------------------------------------------------------------------- */
.mw-altblock {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-3xl);
    padding-block: var(--space-2xl);
}
.mw-altblock__media img {
    width: 100%;
    aspect-ratio: var(--mw-alt-ratio, 4 / 3);
    object-fit: cover;
    display: block;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-medium);
}
.mw-altblock--right .mw-altblock__media { order: 2; }
.mw-altblock__overline {
    color: var(--orange);
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    margin: 0 0 var(--space-sm);
}
.mw-altblock__title {
    font-family: var(--font-display);
    color: var(--bleu);
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 var(--space-sm);
}
.mw-altblock__text { color: var(--gris-fonce); line-height: 1.8; }
.mw-altblock__text > :last-child { margin-bottom: 0; }
.mw-altblock__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-lg);
    padding: 12px 28px;
    background: transparent;
    color: var(--orange);
    border: 2px solid var(--orange);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
}
.mw-altblock__btn:hover { background: var(--orange); color: var(--blanc); }
@media (max-width: 1024px) {
    .mw-altblock { grid-template-columns: 1fr; gap: var(--space-xl); }
    .mw-altblock--right .mw-altblock__media { order: 0; }
}

/* ----------------------------------------------------------------------------
   2) BANDEAU VIDÉO : façade YouTube (poster + bouton play), chargement au clic.
   Réutilise .lite-youtube (JS du DS), .lyt-play (style du DS), .floating-tag.
---------------------------------------------------------------------------- */
.mw-hero-video { position: relative; width: 100%; }
.mw-hero-video__frame {
    position: relative;
    width: 100%;
    height: var(--mw-hv-h, 480px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-lg);
}
.lite-youtube.mw-hero-video__frame { cursor: pointer; }
.mw-hero-video__frame--full { border-radius: 0; }
@media (max-width: 768px) { .mw-hero-video__frame { height: 320px; } }
.mw-hero-video__poster { position: absolute; inset: 0; }
.mw-hero-video__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mw-hero-video .mw-hero-video__play {
    /* identique au bouton de la home (.elementor-custom-embed-play) : grande icône blanche
       (fin cercle + triangle), sans fond ni bordure, légère ombre, centrée.
       !important + préfixe conteneur : neutralise le style de bouton du kit (fond orange) qui
       s'applique à tout <button> avec une spécificité (0,1,1) supérieure. */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 96px;
    height: 96px;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff;
    opacity: .85;
    filter: drop-shadow(1px 2px 6px rgba(0, 0, 0, .35));
    cursor: pointer;
    transition: opacity .3s ease, transform .3s ease;
}
.mw-hero-video .mw-hero-video__play svg { width: 100%; height: 100%; display: block; }
.mw-hero-video .lite-youtube:hover .mw-hero-video__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
    background: transparent !important;
}
.mw-hero-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ----------------------------------------------------------------------------
   3) HERO D'ARTICLE : grand bandeau image + dégradé + titre en surimpression
---------------------------------------------------------------------------- */
.mw-arthero {
    position: relative;
    width: 100%;
    height: var(--mw-arthero-h, 460px);
    min-height: 240px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}
.mw-arthero--full { border-radius: 0; }
.mw-arthero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mw-arthero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.45) 100%);
}
.mw-arthero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-xl);
}
.mw-arthero__overline {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.92);
    color: var(--bleu);
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    margin: 0 0 var(--space-md);
}
.mw-arthero__title {
    color: var(--blanc);
    font-family: var(--font-display);
    font-size: clamp(30px, 4.2vw, 52px);
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.mw-arthero__subtitle {
    color: rgba(255,255,255,.95);
    font-size: 18px;
    line-height: 1.6;
    margin: var(--space-md) 0 0;
    max-width: 760px;
    text-shadow: 0 1px 10px rgba(0,0,0,.3);
}

/* ----------------------------------------------------------------------------
   4) CARTE CITATION : citation manuscrite + auteur, grand guillemet orange
---------------------------------------------------------------------------- */
.mw-citation {
    position: relative;
    background: var(--papier);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-soft);
    margin: var(--space-lg) auto 0;
    max-width: 820px;
    transition: transform .5s ease, box-shadow .4s ease;
}
.mw-citation:hover { transform: translateY(-6px); box-shadow: var(--shadow-medium); }
.mw-citation::before {
    content: "\201C";
    position: absolute;
    top: -30px;
    left: 20px;
    font-family: var(--font-display);
    font-size: 140px;
    line-height: 1;
    color: var(--orange);
    opacity: .3;
}
.mw-citation__text {
    position: relative;
    z-index: 1;
    font-family: var(--font-script);
    font-size: 26px;
    font-weight: 600;
    color: var(--gris-fonce);
    line-height: 1.5;
    margin: 0 0 var(--space-lg);
}
.mw-citation__author {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--orange);
    font-size: 17px;
}

/* ----------------------------------------------------------------------------
   5) CARTE : image + titre + texte + lien (toute la carte cliquable)
---------------------------------------------------------------------------- */
.mw-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    color: inherit;
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}
.mw-card * { text-decoration: none; }
a.mw-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lifted); }
.mw-card__img { aspect-ratio: 16 / 10; overflow: hidden; }
.mw-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
a.mw-card:hover .mw-card__img img { transform: scale(1.05); }
.mw-card__body { padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-sm); flex: 1; }
.mw-card__title { font-family: var(--font-display); color: var(--noir-doux); font-size: 22px; margin: 0; }
.mw-card__text { color: var(--gris-fonce); line-height: 1.7; margin: 0; flex: 1; }
.mw-card__link { color: var(--orange); font-family: var(--font-display); font-weight: 700; margin-top: var(--space-sm); }

/* ----------------------------------------------------------------------------
   6) ÉTAPE DE PARCOURS : pastille ronde + numéro + icône colorée + titre + texte
---------------------------------------------------------------------------- */
.mw-step { position: relative; text-align: center; }
.mw-step__icon {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    background: var(--blanc);
    box-shadow: var(--shadow-medium);
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.mw-step:hover .mw-step__icon { transform: scale(1.1) rotate(-5deg); }
.mw-step__icon::after {
    content: attr(data-step);
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: var(--orange);
    color: var(--blanc);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}
.mw-step__icon i, .mw-step__icon svg { font-size: 44px; width: 44px; height: 44px; fill: currentColor; }
.mw-step__icon--orange { color: var(--orange); }
.mw-step__icon--rose   { color: var(--rose); }
.mw-step__icon--bleu   { color: var(--bleu); }
.mw-step__icon--vert   { color: var(--vert); }
.mw-step__icon--teal   { color: var(--teal); }
.mw-step__icon--jaune  { color: var(--jaune); }
.mw-step__title {
    font-family: var(--font-display);
    margin: 0 0 var(--space-sm);
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--noir-doux);
}
.mw-step__text { font-size: 14px; color: var(--gris-fonce); line-height: 1.7; margin: 0; }

/* ----------------------------------------------------------------------------
   7) BLOC TEXTE RICHE : chapô + corps WYSIWYG (largeur lecture, H2 bleu / H3 teal)
---------------------------------------------------------------------------- */
.mw-richtext { max-width: 820px; margin: 0 auto; }
.mw-richtext--center { text-align: center; max-width: 1040px; }
.mw-richtext__lead {
    font-size: 20px;
    line-height: 1.7;
    color: var(--gris-fonce);
    font-weight: 500;
    margin: 0 0 var(--space-xl);
}
.mw-richtext__body { color: var(--gris-fonce); }
.mw-richtext__body p { font-size: 17px; line-height: 1.8; margin: 0 0 var(--space-lg); }
.mw-richtext__body h2, .mw-richtext__body h3 { font-family: var(--font-display); }
.mw-richtext__body h2 { margin: var(--space-2xl) 0 var(--space-md); color: var(--bleu); font-size: 28px; }
.mw-richtext__body h3 { margin: var(--space-xl) 0 var(--space-md); color: var(--teal); font-size: 22px; }
.mw-richtext__body ul, .mw-richtext__body ol { margin: 0 0 var(--space-lg) var(--space-xl); line-height: 1.8; }
.mw-richtext__body li { margin-bottom: var(--space-xs); }
.mw-richtext__body a { color: var(--orange); text-decoration: underline; }
.mw-richtext__body > :last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------------------
   8) IMAGE PLEIN CADRE : image large arrondie, ratio réglable
---------------------------------------------------------------------------- */
.mw-fullimg { margin: 0; }
.mw-fullimg img {
    width: 100%;
    aspect-ratio: var(--mw-fullimg-ratio, 21/9);
    object-fit: cover;
    display: block;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lifted);
}

/* ----------------------------------------------------------------------------
   9) CARTE CTA : carte centrée image + titre + texte + bouton
---------------------------------------------------------------------------- */
.mw-feature {
    max-width: 480px;
    margin: var(--space-2xl) auto;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    text-align: center;
}
.mw-feature__img { aspect-ratio: 16 / 10; overflow: hidden; }
.mw-feature__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mw-feature__body { padding: var(--space-xl); display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
.mw-feature__title { font-family: var(--font-display); color: var(--noir-doux); font-size: 24px; margin: 0; }
.mw-feature__text { color: var(--gris-fonce); line-height: 1.7; margin: 0; }
.mw-feature__btn { margin-top: var(--space-sm); }

/* ----------------------------------------------------------------------------
   10) CHIFFRES CLÉS : rangée de chiffres + légendes
---------------------------------------------------------------------------- */
.mw-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3xl);
    text-align: center;
}
.mw-stats__item { flex: 1 1 140px; max-width: 240px; }
.mw-stats__num {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1;
    color: var(--orange);
}
.mw-stats__num--orange { color: var(--orange); }
.mw-stats__num--bleu   { color: var(--bleu); }
.mw-stats__num--vert   { color: var(--vert); }
.mw-stats__num--teal   { color: var(--teal); }
.mw-stats__num--rose   { color: var(--rose); }
.mw-stats__label { display: block; margin-top: var(--space-sm); color: var(--gris-fonce); font-weight: 600; font-size: 16px; }

/* ----------------------------------------------------------------------------
   11) BOUTON MIMOSAS : conteneur d'alignement (le bouton réutilise .btn du DS)
---------------------------------------------------------------------------- */
.mw-btnwrap { display: block; }

/* ----------------------------------------------------------------------------
   SURCHARGE DE SPÉCIFICITÉ — le kit applique `.elementor-kit-N h1..h3` (0,1,1)
   sur la couleur ET la taille des titres, ce qui battait nos règles `.mw-*__title`
   (0,1,0) : tous les titres de widgets repassaient en noir-doux à la taille du kit.
   On repasse au-dessus en préfixant par le conteneur (spécificité 0,2,x).
---------------------------------------------------------------------------- */
.mw-arthero .mw-arthero__title {
    color: var(--blanc);
    font-size: clamp(40px, 5.5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
}
.mw-altblock .mw-altblock__title {
    color: var(--bleu);
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    line-height: 1.15;
}
.mw-richtext .mw-richtext__body h2 { color: var(--bleu); font-size: 28px; }
.mw-richtext .mw-richtext__body h3 { color: var(--teal); font-size: 22px; }
.mw-card .mw-card__title { color: var(--noir-doux); font-size: 22px; }
.mw-feature .mw-feature__title { color: var(--noir-doux); font-size: 24px; }
.mw-step .mw-step__title { color: var(--noir-doux); font-size: 16px; }

/* Carte citation : le margin:auto de la figure est neutralisé par le reset `* { margin:0 }`
   du DS (la colonne Elementor n'est pas un contexte de centrage). On centre via le conteneur
   du widget (flex) — robuste quel que soit le contexte. */
.elementor-widget-mimosas-citation .elementor-widget-container { display: flex; justify-content: center; }
.elementor-widget-mimosas-citation .mw-citation { width: 100%; }
