/*
 * Ajouts 09/2026 (campagne Phasix QoL + SEO), hors build Sass.
 * - Ancres de section sous le header fixe
 * - Introduction : style "Bannière mise en avant"
 * - Text colonne : style "Checklist"
 * - Titres passés en h3 : même rendu que le h2 du bloc
 */

/* ---------- Ancres : ne pas arriver sous le header fixe (102px) ---------- */

.flx[id] {
    scroll-margin-top: 110px;
}

@media screen and (max-width: 1023px) {
    .flx[id] {
        scroll-margin-top: 90px;
    }
}

/* ---------- Menu principal : libellés sur deux lignes ----------
 * Le thème fixe line-height:102px sur les liens du menu : un libellé qui passe
 * à la ligne sort du header. Les nouveaux libellés (saisie/09-menu.md) passent
 * à la ligne dès 1440px. Ici le lien reste haut de 102px et centre son texte.
 * Sans effet à 1280px et plus avec les libellés actuels.
 */

@media screen and (min-width: 1024px) {
    header .wrapper nav .nav_container #primary-menu li:not(.button) a {
        display: flex;
        align-items: center;
        height: 100%;
        line-height: 1.15;
    }
}

/* ---------- Introduction : bannière mise en avant ---------- */

.flx-introduction.is-highlight {
    padding: 70px 0;
    background-color: #ffffff;
}

.flx-introduction.is-highlight .highlight {
    display: flex;
    align-items: center;
    gap: 48px;
}

.flx-introduction.is-highlight .highlight-panel {
    flex: 0 0 54%;
    max-width: 54%;
    min-height: 325px;
    display: flex;
    align-items: center;
    background-color: #1d74ff;
    border-radius: 0 190px 190px 0 / 0 50% 50% 0;
    /* aligne le texte sur le .wrapper du site (1183px centré) */
    padding: 56px 120px 56px max(20px, calc((100% - 1183px) / 2));
}

.flx-introduction.is-highlight .highlight-panel-inner {
    max-width: 480px;
}

.flx-introduction.is-highlight .highlight-panel h2,
.flx-introduction.is-highlight .highlight-panel h3.h2 {
    max-width: none;
    margin: 0;
    padding-left: 0;
    border-left: 0;
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: 0.8px;
}

.flx-introduction.is-highlight .highlight-subtitle {
    margin: 48px 0 0;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.3;
}

.flx-introduction.is-highlight .highlight-content {
    flex: 1;
    padding-right: max(20px, calc((100% - 1183px) / 2));
}

.flx-introduction.is-highlight .highlight-content .wysiwyg {
    max-width: 440px;
}

.flx-introduction.is-highlight .highlight-content .wysiwyg > *:first-child {
    margin-top: 0;
}

.flx-introduction.is-highlight .highlight-content .cta {
    margin-top: 24px;
}

@media screen and (max-width: 1023px) {
    .flx-introduction.is-highlight {
        padding: 40px 0;
    }

    .flx-introduction.is-highlight .highlight {
        display: block;
    }

    .flx-introduction.is-highlight .highlight-panel {
        max-width: none;
        width: calc(100% - 20px);
        min-height: 0;
        padding: 40px 70px 40px 20px;
        border-radius: 0 110px 110px 0 / 0 50% 50% 0;
    }

    .flx-introduction.is-highlight .highlight-panel h2,
    .flx-introduction.is-highlight .highlight-panel h3.h2 {
        font-size: 24px;
        letter-spacing: 0.4px;
    }

    .flx-introduction.is-highlight .highlight-subtitle {
        margin-top: 16px;
        font-size: 18px;
    }

    .flx-introduction.is-highlight .highlight-content {
        padding: 30px 20px 0;
    }

    .flx-introduction.is-highlight .highlight-content .wysiwyg {
        max-width: none;
    }

    .flx-introduction.is-highlight .highlight-content .wysiwyg p {
        font-size: 18px;
    }
}

/* ---------- Text colonne : checklist (liste de la colonne de gauche) ---------- */

.flx-text_colonne.is-checklist .col {
    align-items: center;
}

.flx-text_colonne.is-checklist .col::before {
    display: none;
}

.flx-text_colonne.is-checklist .col > .wysiwyg:first-child ul {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 440px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.flx-text_colonne.is-checklist .col > .wysiwyg:first-child ul li {
    position: relative;
    display: block;
    min-height: 60px;
    margin: 0;
    padding: 18px 82px 18px 26px;
    border-radius: 60px;
    background-color: #f8f4f1;
    color: #060a3d;
    font-size: 20px;
    line-height: 1.2;
}

.flx-text_colonne.is-checklist .col > .wysiwyg:first-child ul li::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 4px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #7786ca url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23060a3d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 30px;
}

.flx-text_colonne.is-checklist .col > .wysiwyg:first-child ul li sup {
    margin-left: 1px;
    font-size: 60%;
}

.flx-text_colonne.is-checklist .col .wysiwyg h2,
.flx-text_colonne.is-checklist .col .wysiwyg h3 {
    margin-bottom: 32px;
}

.flx-text_colonne.is-checklist .col .wysiwyg p strong {
    font-size: inherit;
    line-height: inherit;
}

@media screen and (max-width: 1023px) {
    .flx-text_colonne.is-checklist .col > .wysiwyg:first-child ul {
        max-width: none;
        gap: 12px;
    }

    .flx-text_colonne.is-checklist .col > .wysiwyg:first-child ul li {
        min-height: 52px;
        padding: 15px 70px 15px 22px;
        font-size: 17px;
    }

    .flx-text_colonne.is-checklist .col > .wysiwyg:first-child ul li::after {
        width: 44px;
        height: 44px;
        background-size: 24px;
    }

    .flx-text_colonne.is-checklist .col .wysiwyg h2,
    .flx-text_colonne.is-checklist .col .wysiwyg h3 {
        margin-bottom: 20px;
    }
}

/* ---------- Titres passés en h3 (champ "Niveau du titre") ----------
 * Le h3 porte la classe .h2 du thème. On recopie ici les règles
 * que le thème applique aux h2 de chaque bloc (sélecteurs sur la balise h2).
 * Dans un bloc Image + Texte, le titre est dans l'éditeur : écrire
 * <h3 class="h2">...</h3> dans l'onglet Texte (un h3 sans classe garde
 * le style h3 du thème, en gras et sans filet).
 */

.flx-image_texte .wysiwyg h3.h2 {
    font-weight: 400;
}

.flx-introduction .wrapper h3.h2 {
    max-width: 600px;
    font-size: 36px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0;
    margin-bottom: 0;
}

@media screen and (max-width: 1023px) {
    .wysiwyg h3.h2 {
        font-size: 20px;
        font-style: normal;
        font-weight: 400;
        line-height: 120%;
        letter-spacing: 0.4px;
        margin-bottom: 20px;
    }

    .flx-image_texte .wrapper .wysiwyg h3.h2 {
        font-size: 20px;
        font-weight: 400;
        line-height: 120%;
        letter-spacing: 0.4px;
        padding-left: 35px;
        margin-bottom: 30px;
    }

    .flx-introduction .wrapper h3.h2 {
        font-size: 20px;
        line-height: normal;
        max-width: 265px;
        margin-top: 13px;
        margin-bottom: 33px;
    }

    .flx-video_slider .wrapper h3.h2 {
        font-size: 20px;
        line-height: 120%;
        letter-spacing: 0.4px;
        margin-bottom: 20px;
    }

    .flx-text_colonne .wrapper h3.h2 {
        position: relative;
        display: flex;
        align-items: center;
        max-width: 278px;
        min-height: 42px;
        padding-left: 47px;
        margin-bottom: 20px;
        font-size: 20px;
        line-height: 120%;
        letter-spacing: 0.4px;
    }

    .flx-video_single .wrapper .wysiwyg h3.h2 {
        max-width: 271px;
        margin-bottom: 20px;
    }

    h3.h2.style-circle {
        position: relative;
        padding-left: 45px;
    }

    h3.h2.style-circle:before {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* ---------- Nav block (cartes du hub) : libellés longs ----------
 * Les libellés "See ... hernia repair" dépassent la carte sous 1440px :
 * la pastille est plus large que la carte et ses bords sont coupés.
 * On réduit la marge intérieure puis la taille, largeur par largeur.
 * Les états de survol du thème (plus spécifiques) ne changent pas.
 */

@media screen and (min-width: 1024px) and (max-width: 1439px) {
    .flx-nav_block a span.btn {
        padding-left: 32px;
        padding-right: 32px;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1365px) {
    .flx-nav_block a span.btn {
        font-size: 20px;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1279px) {
    .flx-nav_block a span.btn {
        font-size: 18px;
        padding-left: 22px;
        padding-right: 22px;
    }
}

/* ---------- CAWR : témoignages patients sur fond blanc (maquette QoL) ---------- */

#patient-testimonials.flx-video_slider {
    background-color: #ffffff;
}

/* ---------- Video slider : légende sous chaque vidéo (champ Légende, Prevention) ----------
 * Seuls les sliders dont au moins une vidéo a une légende reçoivent .has-captions.
 * Desktop : la légende de la vidéo active s'affiche sous elle, sans toucher aux dimensions
 * du slider ; la marge sous le slider lui réserve la place. Mobile : sous la vidéo courante.
 */

.flx-video_slider .video-caption {
    margin: 0;
    color: #1d74ff;
    font-size: 18px;
    font-weight: 700;
    line-height: 130%;
    text-align: center;
}

@media screen and (min-width: 1024px) {
    .flx-video_slider.has-captions .swiper {
        margin-bottom: 48px;
    }

    .flx-video_slider.has-captions .swiper .swiper-slide.swiper-slide-active {
        overflow: visible;
    }

    .flx-video_slider.has-captions .swiper .video-caption {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding-top: 16px;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .flx-video_slider.has-captions .swiper .swiper-slide-active .video-caption {
        opacity: 1;
    }
}

@media screen and (max-width: 1023px) {
    .flx-video_slider .videos-liste-mobile .video-caption {
        flex: 0 0 100%;
        box-sizing: border-box;
        padding: 12px 30px 6px;
        font-size: 16px;
    }
}
