/**
 * Charte vitrine (business plan 2026) sur les blocs de section de l'extension :
 * accueil (`.mm-accueil`), vente praticien (`.mm-vente-bloc`), vente
 * entreprises (`.mm-entreprise-bloc`). Décision du 24/11/2026, OpenProject #583.
 *
 * Mêmes repères que vitrine.css : ouverture vert nuit à rubans courbes,
 * surtitres en capitales espacées, titres gras, boutons en pilule, cartes
 * blanches arrondies, pictogrammes dans des pastilles, texte aligné à gauche.
 * La mise en page des maquettes (grilles, visuels, calendrier, tarifs) reste
 * celle des feuilles de l'extension.
 *
 * Les feuilles des blocs arrivent APRÈS celle-ci (elles sont chargées au rendu
 * des blocs, en pied de page) : chaque règle est donc préfixée de `body` pour
 * l'emporter à classes égales. Rien ne change dans le HTML enregistré.
 */

/* ----------------------------------------------------------------- jetons */

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) {
    --mmb-nuit: var(--wp--preset--color--primary);
    --mmb-foret: var(--wp--preset--color--vert-fonce);
    --mmb-vif: var(--wp--preset--color--vert);
    --mmb-clair: #5BC27A;
    --mmb-pale: var(--wp--preset--color--vert-doux);
    --mmb-tres-pale: var(--wp--preset--color--vert-tres-doux);
    --mmb-texte: #3D3D3C;
    --mmb-bord: var(--wp--preset--color--bord);
    --mmb-rayon-grand: var(--wp--custom--rayon--grand);
    --mmb-ombre: var(--wp--custom--ombre--legere);
    --mmb-ruban: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 700' preserveAspectRatio='xMaxYMid slice' fill='none'%3E%3Cpath d='M300 -40C420 130 640 20 860 70' stroke='%2314612F' stroke-width='46'/%3E%3Cpath d='M230 760C380 470 600 400 860 250' stroke='%2314612F' stroke-width='90'/%3E%3Cpath d='M420 780C560 600 700 560 860 500' stroke='%23219B46' stroke-width='18'/%3E%3C/svg%3E");

    font-family: var(--wp--preset--font-family--poppins), sans-serif;
}

/* macmoov.css impose une police système à tout élément (`*`) : Poppins doit
   donc être posée sur chaque descendant, l'héritage n'y suffit pas. */
body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) * {
    font-family: var(--wp--preset--font-family--poppins), sans-serif;
}

/* Texte aligné à gauche : macmoov.css justifie tout paragraphe. */
body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(p, li) {
    text-align: left;
}

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(p.has-text-align-center, .mm-title-center) {
    text-align: center;
}

/* --------------------------------------------------------------- typographie */

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(h1, h2) {
    color: var(--mmb-foret);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.15;
}

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) h3 {
    color: var(--mmb-nuit);
    font-weight: 700;
}

/* Surtitres : capitales espacées, sans pastille. */
body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.mm-hero-badge, .mm-praticien-badge, .eyebrow, .mm-kicker, .mm-press-label, .mm-presse-label) {
    padding: 0;
    border: 0;
    background: none;
    color: var(--mmb-foret);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .28em;
    line-height: 1.4;
    text-transform: uppercase;
}

/* -------------------------------------------------------------------- boutons */

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.wp-block-button__link, .btn, .mm-bouton) {
    display: inline-block;
    padding: 14px 28px;
    border: 1.5px solid var(--mmb-foret);
    border-radius: 999px;
    background: var(--mmb-foret);
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.wp-block-button__link, .btn, .mm-bouton):hover {
    border-color: var(--mmb-nuit);
    background: var(--mmb-nuit);
    color: #fff;
}

/* Bouton secondaire : contour vert. */
body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.mm-bouton-secondaire .wp-block-button__link, .wp-block-button:nth-child(2) .wp-block-button__link, .btn-secondary, .mm-bouton-secondaire.mm-bouton) {
    background: transparent;
    color: var(--mmb-foret);
}

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.mm-bouton-secondaire .wp-block-button__link, .wp-block-button:nth-child(2) .wp-block-button__link, .btn-secondary, .mm-bouton-secondaire.mm-bouton):hover {
    background: var(--mmb-pale);
    color: var(--mmb-nuit);
}

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) .btn-block {
    display: block;
    text-align: center;
}

/* --------------------------------------------------------------------- cartes */

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.mm-carte, .card, .step, .pricing-card, .mm-step, .mm-benefit, .mm-app-item, .mm-audience, .mm-temoignage, .mm-media-card, .mm-family-card) {
    border: 1px solid var(--mmb-bord);
    border-radius: var(--mmb-rayon-grand);
    background: #fff;
    box-shadow: var(--mmb-ombre);
}

body .mm-vente-bloc .pricing-card.featured {
    border: 2px solid var(--mmb-foret);
}

/* Pictogrammes : pastille ronde vert vif, trait blanc. */
/* `.mm-step-icon` (pages entreprises) est déjà une pastille, sous le
   numéro d'étape : elle garde la sienne. */
body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.mm-carte-icone, .mm-benefit-icon, .mm-family-card-icon, .mm-qvct-icon) {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mmb-vif);
    color: #fff;
}

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) :is(.mm-carte-icone, .mm-benefit-icon) svg {
    color: #fff;
    stroke: #fff;
}

/* Numéros d'étapes : pastille vert forêt. */
body .mm-entreprise-bloc .mm-step-number {
    background: var(--mmb-foret);
    color: #fff;
}

/* ------------------------------------------------- ouvertures vert nuit */

/*
 * Héros de l'accueil, de la vente praticien et de la vente entreprises : vert
 * nuit et rubans courbes, comme l'ouverture des pages vitrines.
 */
body .mm-accueil.mm-hero,
body .mm-vente-bloc.mm-vente-hero,
body .mm-entreprise-bloc .mm-hero {
    position: relative;
    isolation: isolate;
    background: var(--mmb-nuit);
    color: rgba(255, 255, 255, .86);
    /* Pleine largeur, même dans le cadre du contenu : le fond déborde des
       deux côtés, coupé au bord de la fenêtre. */
    box-shadow: 0 0 0 100vmax var(--mmb-nuit);
    clip-path: inset(0 -100vmax);
}

body .mm-accueil.mm-hero::before,
body .mm-vente-bloc.mm-vente-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: min(62%, 900px);
    background: var(--mmb-ruban) right center / cover no-repeat;
    pointer-events: none;
}

body .mm-vente-bloc.mm-vente-hero .hero {
    padding-block: clamp(56px, 7vw, 96px) clamp(40px, 6vw, 80px);
}

/* Sur mobile, les rubans passent sous le texte : atténués. */
@media (max-width: 700px) {
    body .mm-accueil.mm-hero::before,
    body .mm-vente-bloc.mm-vente-hero::before,
    body .mm-entreprise-bloc .mm-final-box::before,
    body .mm-accueil.mm-praticien .mm-praticien-grille::before {
        width: 100%;
        opacity: .3;
    }
}

body :is(.mm-accueil.mm-hero, .mm-vente-bloc.mm-vente-hero, .mm-entreprise-bloc .mm-hero-content) :is(h1, h2, strong) {
    color: #fff;
}

body :is(.mm-accueil.mm-hero, .mm-vente-bloc.mm-vente-hero, .mm-entreprise-bloc .mm-hero-content) :is(p, li, .lede) {
    color: rgba(255, 255, 255, .86);
}

body :is(.mm-accueil.mm-hero, .mm-vente-bloc.mm-vente-hero, .mm-entreprise-bloc .mm-hero-content) :is(.mm-hero-badge, .eyebrow, .mm-kicker) {
    color: var(--mmb-clair);
}

/* Pastilles du héros (badges, montants) : contour blanc sur nuit. */
body .mm-vente-bloc.mm-vente-hero .hero-badges > li,
body .mm-entreprise-bloc .mm-ticket-values li {
    border-color: rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

/* Boutons sur nuit : plein blanc, contour blanc (sauf dans la carte de
   recherche, restée claire). */
body :is(.mm-accueil.mm-hero, .mm-vente-bloc.mm-vente-hero, .mm-entreprise-bloc .mm-hero-content) :is(.wp-block-button__link, .btn, .mm-bouton):not(.mm-hero-recherche *) {
    border-color: #fff;
    background: #fff;
    color: var(--mmb-nuit);
}

body :is(.mm-accueil.mm-hero, .mm-vente-bloc.mm-vente-hero, .mm-entreprise-bloc .mm-hero-content) :is(.mm-bouton-secondaire .wp-block-button__link, .wp-block-button:nth-child(2) .wp-block-button__link, .mm-bouton-secondaire.mm-bouton) {
    background: transparent;
    color: #fff;
}

/* Cartes posées sur le héros (confiance, recherche) : restent claires. */
body .mm-accueil.mm-hero :is(.mm-hero-confiance, .mm-hero-recherche) :is(p, li, h2, h3, strong, label) {
    color: var(--mmb-texte);
}

body .mm-accueil.mm-hero .mm-hero-confiance h2,
body .mm-accueil.mm-hero .mm-hero-confiance h3 {
    color: var(--mmb-foret);
}

body .mm-accueil.mm-hero .mm-hero-populaires :is(p, span, a) {
    color: rgba(255, 255, 255, .86);
}

/* Héros entreprises : la photo de fond se fond dans le vert nuit. */
body .mm-entreprise-bloc .mm-hero > .mm-hero-fond::after {
    background: linear-gradient(90deg, var(--mmb-nuit) 0%, var(--mmb-nuit) 42%, rgba(6, 46, 23, .75) 51%, rgba(6, 46, 23, .05) 72%);
}

body .mm-entreprise-bloc .mm-hero .mm-trust-card :is(p, li, a) {
    color: var(--mmb-texte);
}

body .mm-entreprise-bloc .mm-hero .mm-trust-card h3 {
    color: var(--mmb-foret);
}

/* Le bandeau d'état de la vente (essai, abonné) reste lisible sur nuit. */
body .mm-vente-bloc.mm-vente-hero .banner :is(strong, p) {
    color: var(--mmb-texte);
}

/* ------------------------------------------------ conclusions vert nuit */

body .mm-accueil.mm-praticien .mm-praticien-grille,
body .mm-entreprise-bloc .mm-final-box {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--mmb-nuit);
}

body .mm-entreprise-bloc .mm-final-box::before,
body .mm-accueil.mm-praticien .mm-praticien-grille::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: min(62%, 900px);
    background: var(--mmb-ruban) right center / cover no-repeat;
    opacity: .9;
    pointer-events: none;
}

body .mm-accueil.mm-praticien .mm-praticien-badge,
body .mm-entreprise-bloc .mm-final-box .mm-kicker {
    color: var(--mmb-clair);
}

/* Sur nuit, les boutons de conclusion passent en blanc. */
body .mm-entreprise-bloc .mm-final-box .wp-block-button__link {
    border-color: #fff;
    background: #fff;
    color: var(--mmb-nuit);
}

body .mm-entreprise-bloc .mm-final-box .wp-block-button:nth-child(2) .wp-block-button__link {
    background: transparent;
    color: #fff;
}

body .mm-accueil.mm-praticien .mm-bouton {
    border-color: #fff;
    background: #fff;
    color: var(--mmb-nuit);
}

/* ------------------------------------------------------------- liens */

body :is(.mm-accueil, .mm-vente-bloc, .mm-entreprise-bloc) p a:not(.wp-element-button):not(.btn) {
    color: var(--mmb-foret);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

body :is(.mm-accueil.mm-hero, .mm-accueil.mm-praticien, .mm-entreprise-bloc .mm-final-box) p a:not(.wp-element-button):not(.btn) {
    color: #fff;
}

/* Pages entreprises : leur feuille pose la couleur des boutons en
   `!important` ; sur le héros nuit, il faut donc l'imposer de même. */
body .mm-entreprise-bloc .mm-hero-content .mm-bouton-primaire > .wp-block-button__link {
    border-color: #fff;
    background: #fff;
    color: var(--mmb-nuit) !important;
}

body .mm-entreprise-bloc .mm-hero-content .mm-bouton-secondaire > .wp-block-button__link {
    border-color: rgba(255, 255, 255, .8);
    background: transparent;
    color: #fff !important;
}

