/*!
 * Memodule Frontend CSS v2.0.0
 * Styles essentiels pour le rendu des pages Memodule
 */

/* A11Y-001 fix v2.5.3 : focus visible pour la navigation clavier (WCAG 2.4.7 AA).
   Avant : aucun :focus ou :focus-visible → les utilisateurs clavier ne pouvaient pas
   voir quel élément avait le focus. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.mm-sector-form input:focus-visible,
.mm-sector-form textarea:focus-visible,
.mm-sector-form select:focus-visible {
        outline: 2px solid #c8a84b;
        outline-offset: 2px;
        border-radius: 4px;
}
/* Inputs avec fond sombre — outline blanc pour visibilité */
.mm-sector-form input:focus-visible,
.mm-sector-form textarea:focus-visible,
.mm-sector-form select:focus-visible {
        outline-color: #dfc07a;
}
/* Skip link pour l'accessibilité (WCAG 2.4.1) */
.mm-skip-link {
        position: absolute;
        top: -100px;
        left: 0;
        background: #c8a84b;
        color: #000;
        padding: 12px 20px;
        text-decoration: none;
        font-weight: 700;
        border-radius: 0 0 8px 0;
        z-index: 999999;
        transition: top 0.2s;
}
.mm-skip-link:focus {
        top: 0;
}

/* ── CSS Custom Properties (fallbacks) ── */
:root {
  --gold: #c8a84b;
  --gold-light: #dfc07a;
  --text2: #999;
  --text3: #666;
  --radius: 22px;
  --radius-md: 22px;
  --card-border-color: rgba(255,255,255,0.1);
  --card-border-width: 1px;
  --card-bg-color: rgba(255,255,255,0.055);
  --card-bg-r: 255;
  --card-bg-g: 255;
  --card-bg-b: 255;
  --card-blur: 16px;
  --card-opacity: 0.055;
  --bg-image: none;
  --bg-opacity: 1;
}

/* ── Reset & Base ── */
body.memodule-page,
body.memodule-front {
        margin: 0;
        padding: 0;
        overflow-x: clip;
        background: #000;
        background-image: var(--bg-image, none);
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        background-repeat: no-repeat;
        color: #f4f4f6;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'DM Sans', 'Inter', system-ui, sans-serif;
        font-size: 15px;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
}
/* Fallback for browsers without overflow-x:clip support */
@supports not (overflow-x: clip) {
        body.memodule-page,
        body.memodule-front {
                overflow-x: hidden;
        }
}

/* ── Navigation ── */
#nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 10000;
        transition: background 0.4s, backdrop-filter 0.4s;
}

/* ── Navigation Dropdowns / Submenus ── */
.nav-item.has-submenu { position: relative; }
.nav-dropdown-menu,
.nav-submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        min-width: 220px;
        background: rgba(0,0,0,.92);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255,255,255,.1);
        border-radius: 12px;
        padding: 8px 0;
        z-index: 10001;
        box-shadow: 0 16px 48px rgba(0,0,0,.5);
        list-style: none;
}
.nav-item.has-submenu:hover .nav-submenu,
.nav-item.has-submenu.force-open .nav-submenu { display: block; }
.nav-sectors-dropdown.force-open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li,
.nav-submenu li { list-style: none; }
.nav-dropdown-menu a,
.nav-submenu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 20px;
        font-size: 14px;
        font-weight: 500;
        color: rgba(244,244,246,.7);
        transition: all .2s;
        white-space: nowrap;
}
.nav-dropdown-menu a:hover,
.nav-submenu a:hover { background: rgba(201,168,76,.12); color: #dfc07a; padding-left: 24px; }
.nav-dropdown-arrow { font-size: 10px; opacity: .7; transition: transform .3s; }
.nav-item.has-submenu:hover .nav-dropdown-arrow { transform: rotate(180deg); }
body.light-mode .nav-dropdown-menu,
body.light-mode .nav-submenu {
        background: rgba(255,255,255,.96);
        border-color: rgba(0,0,0,.08);
        box-shadow: 0 16px 48px rgba(0,0,0,.12);
}
body.light-mode .nav-dropdown-menu a,
body.light-mode .nav-submenu a { color: #424245; }
body.light-mode .nav-dropdown-menu a:hover,
body.light-mode .nav-submenu a:hover { background: rgba(201,168,76,.08); color: #c8a84b; }

.nav-logo {
        cursor: pointer;
        text-decoration: none;
}

.nav-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
        height: 60px;
}

/* ── Hero Section ── */
.hero,
.hero-section {
        position: relative;
        min-height: 80vh;
        display: flex;
        align-items: center;
        justify-content: center;
}

/* ── Article Slideshow: background-image based, zero layout shift ── */
.article-hero {
        min-height: 75vh;
        position: relative;
        display: flex;
        align-items: flex-end;
        overflow: hidden;
}
.slideshow-slide {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
}
.slideshow-slide video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
}

/* ═══ VIDEO MUTE TOGGLE BUTTON ═══ */
.mm-video-mute-btn {
        position: absolute;
        bottom: 12px;
        right: 12px;
        z-index: 15;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(0,0,0,.55);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,.18);
        color: #fff;
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .3s, visibility 0s .3s, background .2s, transform .2s;
}
.mm-video-mute-btn:hover {
        background: rgba(201,168,76,.5);
        border-color: rgba(201,168,76,.6);
        transform: scale(1.1);
}
/* Show on hover of parent containers */
.slideshow-slide:hover > .mm-video-mute-btn,
.slideshow-slide.active > .mm-video-mute-btn,
.super-gallery-item:hover > .mm-video-mute-btn,
.card-media:hover > .mm-video-mute-btn,
.gslide.active .mm-video-mute-btn,
.gslide:hover .mm-video-mute-btn,
.mm-video-mute-btn:focus-within {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity .3s, visibility 0s, background .2s, transform .2s;
}
/* Always visible in editor mode */
body.mm-editor .mm-video-mute-btn {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
}
/* Muted state icon */
.mm-video-mute-btn.is-muted::after { content: '🔇'; }
.mm-video-mute-btn.is-unmuted::after { content: '🔊'; }
/* Strikethrough line for muted state */
.mm-video-mute-btn .mute-slash {
        position: absolute;
        width: 2px;
        height: 60%;
        background: #e53e3e;
        transform: rotate(-45deg);
        border-radius: 1px;
        display: none;
}
.mm-video-mute-btn.is-muted .mute-slash { display: block; }

.hero-overlay {
        position: absolute;
        inset: 0;
}

.hero-content {
        position: relative;
        z-index: 2;
        text-align: center;
}

/* ── Sections ── */
.section {
        padding: 80px 24px;
        max-width: 100%;
        margin: 0 auto;
}

.section-title {
        font-size: clamp(28px, 5vw, 44px);
        font-weight: 700;
        margin-bottom: 16px;
}

/* ── Cards ── */
.card {
        border-radius: var(--radius-md, 22px);
        border: var(--card-border-width, 1px) solid var(--card-border-color, rgba(255, 255, 255, 0.1));
        background: rgba(var(--card-bg-r, 255), var(--card-bg-g, 255), var(--card-bg-b, 255), var(--card-opacity, 0.055));
        backdrop-filter: blur(var(--card-blur, 16px));
        -webkit-backdrop-filter: blur(var(--card-blur, 16px));
        overflow: hidden;
        transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ── Chapter / Encart Cards ── */
.chapter-card,
.encart-card {
        cursor: pointer;
        transition: transform 0.3s, box-shadow 0.3s;
}

.chapter-card:hover,
.encart-card:hover {
        transform: translateY(-2px);
}

/* ── Glassmorphism ── */
.glass-card {
        background: rgba(var(--card-bg-r, 255), var(--card-bg-g, 255), var(--card-bg-b, 255), var(--card-opacity, 0.055));
        border: var(--card-border-width, 1px) solid var(--card-border-color, rgba(255, 255, 255, 0.1));
        border-radius: var(--radius-md, 22px);
        backdrop-filter: blur(var(--card-blur, 16px));
        -webkit-backdrop-filter: blur(var(--card-blur, 16px));
}

/* ── Reveal Animations ── */
.reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s, transform 0.7s;
}

.reveal.active {
        opacity: 1;
        transform: translateY(0);
}

/* ── Footer ── */
.mm-footer {
        padding: 40px 24px;
        text-align: center;
}

/* ── Client Portal ── */
.mm-portal {
        max-width: 100%;
        margin: 0 auto;
        padding: 40px 24px;
}

/* ═══════════════════════════════════════════
   LIGHT MODE — Complete theme
   ═══════════════════════════════════════════ */
body.light-mode,
body.light-mode.memodule-page {
        background: #ffffff !important;
        color: #1d1d1f !important;
}
body.light-mode .section-title,
body.light-mode h1, body.light-mode h2, body.light-mode h3,
body.light-mode h4, body.light-mode h5, body.light-mode h6 { color: #1d1d1f !important; }
body.light-mode .section-subtitle, body.light-mode p,
body.light-mode .hero-desc, body.light-mode .module-desc,
body.light-mode .nfc-text, body.light-mode .stat-label,
body.light-mode .footer-desc { color: #424245 !important; }
body.light-mode #nav.scrolled {
        background: rgba(255,255,255,.82) !important;
        border-bottom: 1px solid rgba(0,0,0,.08) !important;
}
body.light-mode .nav-links a { color: #424245 !important; }
body.light-mode .nav-links a:hover { color: #1d1d1f !important; }
body.light-mode .nav-mobile {
        background: rgba(255,255,255,.96) !important;
        border-bottom: 1px solid rgba(0,0,0,.06) !important;
}
body.light-mode .nav-mobile a { color: #424245 !important; border-bottom-color: rgba(0,0,0,.06) !important; }
body.light-mode .feature-card, body.light-mode .module-card, body.light-mode .stat-cell {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.light-mode .feature-card:hover, body.light-mode .module-card:hover, body.light-mode .stat-cell:hover {
        border-color: rgba(200,168,75,.3) !important;
        box-shadow: 0 24px 64px rgba(0,0,0,.08) !important;
}
body.light-mode .feature-card .card-overlay,
body.light-mode .module-card .module-overlay,
body.light-mode .stat-cell .stat-overlay {
        background: linear-gradient(180deg,rgba(255,255,255,.15) 0%,rgba(255,255,255,.92) 100%) !important;
}
body.light-mode .feature-card h4, body.light-mode .module-title,
body.light-mode .stat-number { color: #1d1d1f !important; }
body.light-mode .feature-card p, body.light-mode .module-desc,
body.light-mode .stat-label { color: #424245 !important; }
body.light-mode .glass, body.light-mode .glass-card {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.light-mode .chapter-card .chapter-overlay {
        background: linear-gradient(180deg,rgba(255,255,255,.15) 0%,rgba(255,255,255,.9) 100%) !important;
}
body.light-mode .chapter-card .chapter-label { color: #1d1d1f !important; }
body.light-mode .encart-card {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.light-mode .encart-card .encart-overlay {
        background: linear-gradient(180deg,rgba(255,255,255,.1) 0%,rgba(255,255,255,.9) 100%) !important;
}
body.light-mode .encart-label { color: #1d1d1f !important; }
body.light-mode .encart-category { color: #c8a84b !important; }
body.light-mode .timeline-card-body {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.light-mode .timeline-card-title { color: #1d1d1f !important; }
body.light-mode .timeline-card-text { color: #424245 !important; }
body.light-mode #footer {
        background: #f5f5f7 !important;
        border-top-color: rgba(0,0,0,.06) !important;
}
body.light-mode .footer-desc { color: #6e6e73 !important; }
body.light-mode .footer-col a, body.light-mode .footer-col p { color: #424245 !important; }
body.light-mode .footer-bottom { border-top-color: rgba(0,0,0,.06) !important; color: #6e6e73 !important; }
body.light-mode .btn-secondary {
        background: rgba(0,0,0,.05) !important;
        border-color: rgba(0,0,0,.1) !important;
        color: #1d1d1f !important;
}
body.light-mode .section { background: transparent !important; }

/* ═══════════════════════════════════════════
   ALT-SECTIONS MODE — Alternating dark/light
   ═══════════════════════════════════════════ */
body.alt-sections .section:nth-child(odd) { background: transparent !important; }
body.alt-sections .section:nth-child(even) {
        background: #ffffff !important;
        color: #1d1d1f !important;
}
body.alt-sections .section:nth-child(even) .section-title,
body.alt-sections .section:nth-child(even) h1,
body.alt-sections .section:nth-child(even) h2,
body.alt-sections .section:nth-child(even) h3,
body.alt-sections .section:nth-child(even) h4 { color: #1d1d1f !important; }
body.alt-sections .section:nth-child(even) .section-subtitle,
body.alt-sections .section:nth-child(even) p,
body.alt-sections .section:nth-child(even) .hero-desc,
body.alt-sections .section:nth-child(even) .module-desc,
body.alt-sections .section:nth-child(even) .nfc-text,
body.alt-sections .section:nth-child(even) .stat-label { color: #424245 !important; }
body.alt-sections .section:nth-child(even) .feature-card,
body.alt-sections .section:nth-child(even) .module-card,
body.alt-sections .section:nth-child(even) .stat-cell {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.alt-sections .section:nth-child(even) .feature-card .card-overlay,
body.alt-sections .section:nth-child(even) .module-card .module-overlay,
body.alt-sections .section:nth-child(even) .stat-cell .stat-overlay {
        background: linear-gradient(180deg,rgba(255,255,255,.15) 0%,rgba(255,255,255,.92) 100%) !important;
}
body.alt-sections .section:nth-child(even) .feature-card h4,
body.alt-sections .section:nth-child(even) .module-title { color: #1d1d1f !important; }
body.alt-sections .section:nth-child(even) .feature-card p,
body.alt-sections .section:nth-child(even) .module-desc,
body.alt-sections .section:nth-child(even) .stat-label { color: #424245 !important; }
body.alt-sections .section:nth-child(even) .glass,
body.alt-sections .section:nth-child(even) .glass-card {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.alt-sections .section:nth-child(even) .chapter-card .chapter-overlay {
        background: linear-gradient(180deg,rgba(255,255,255,.15) 0%,rgba(255,255,255,.9) 100%) !important;
}
body.alt-sections .section:nth-child(even) .chapter-card .chapter-label { color: #1d1d1f !important; }
body.alt-sections .section:nth-child(even) .encart-card {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.alt-sections .section:nth-child(even) .encart-card .encart-overlay {
        background: linear-gradient(180deg,rgba(255,255,255,.1) 0%,rgba(255,255,255,.9) 100%) !important;
}
body.alt-sections .section:nth-child(even) .encart-label { color: #1d1d1f !important; }
body.alt-sections .section:nth-child(even) .encart-category { color: #c8a84b !important; }
body.alt-sections .section:nth-child(even) .timeline-card-body {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.alt-sections .section:nth-child(even) .timeline-card-title { color: #1d1d1f !important; }
body.alt-sections .section:nth-child(even) .timeline-card-text { color: #424245 !important; }
body.alt-sections .section:nth-child(even) .price-card {
        background: linear-gradient(180deg,rgba(201,168,75,.04) 0%,rgba(0,0,0,.02) 40%) !important;
        border-color: rgba(201,168,75,.15) !important;
}
body.alt-sections .section:nth-child(even) .price-card:hover {
        border-color: rgba(201,168,76,.4) !important;
}
body.alt-sections .section:nth-child(even) .btn-secondary {
        background: rgba(0,0,0,.05) !important;
        border-color: rgba(0,0,0,.1) !important;
        color: #1d1d1f !important;
}
body.alt-sections .section:nth-child(odd) { background: #000000 !important; }
body.alt-sections .section:nth-child(odd) .section-title,
body.alt-sections .section:nth-child(odd) h1,
body.alt-sections .section:nth-child(odd) h2,
body.alt-sections .section:nth-child(odd) h3 { color: #f4f4f6 !important; }
body.alt-sections .section:nth-child(odd) .section-subtitle,
body.alt-sections .section:nth-child(odd) p { color: #e8e8ed !important; }
/* Footer always light in alt-sections */
body.alt-sections #footer {
        background: #f5f5f7 !important;
        border-top-color: rgba(0,0,0,.06) !important;
        color: #1d1d1f !important;
}
body.alt-sections .footer-desc { color: #6e6e73 !important; }
body.alt-sections .footer-col a, body.alt-sections .footer-col p { color: #424245 !important; }
body.alt-sections .footer-bottom { border-top-color: rgba(0,0,0,.06) !important; color: #6e6e73 !important; }
body.alt-sections #footer .footer-logo,
body.alt-sections #footer .footer-logo span,
body.alt-sections #footer .footer-desc,
body.alt-sections #footer .footer-col a,
body.alt-sections #footer .footer-col p,
body.alt-sections #footer .footer-bottom,
body.alt-sections #footer .footer-bottom p {
        color: #1d1d1f !important;
        -webkit-text-fill-color: currentColor !important;
        background-image: none !important;
}
body.alt-sections #footer .footer-col-title { color: #8a6f1e !important; }
body.alt-sections #footer .footer-social-icons .social-icon,
body.alt-sections #footer .footer-social-link {
        background: rgba(0,0,0,.05) !important;
        border-color: rgba(0,0,0,.12) !important;
}
.footer-social-link img,
.social-icon img,
.footer-social-icons-row img {
        width: 22px;
        height: 22px;
        object-fit: contain;
        display: block;
}

/* ── Position & Largeur du conteneur de texte ── */
/* S'applique à l'élément édité (pas à .section-inner) : seul le texte bouge, pas les images.
   L'alignement du texte (text-align) est contrôlé séparément par la barre Word. */
[data-mm-align="left"]   { margin-left: 0   !important; margin-right: auto !important; }
[data-mm-align="center"] { margin-left: auto !important; margin-right: auto !important; }
[data-mm-align="right"]  { margin-left: auto !important; margin-right: 0    !important; }
/* Largeur du conteneur de texte — pas de !important pour que le curseur inline surcharge */
[data-mm-width="narrow"] { max-width: 600px; }
[data-mm-width="medium"] { max-width: 800px; }
[data-mm-width="wide"]   { max-width: 1000px; }
[data-mm-width="full"]   { max-width: 100%; }
/* ── Mode Pleine Largeur (body.mm-full-width) ── */
body.mm-full-width .section-inner,
body.mm-full-width .nav-inner,
body.mm-full-width .footer-inner,
body.mm-full-width .footer-bottom,
body.mm-full-width .blog-filters-inner,
body.mm-full-width .article-content,
body.mm-full-width .article-tags-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
}
body.mm-full-width .section,
body.mm-full-width #hero,
body.mm-full-width #footer {
        width: 100% !important;
        box-sizing: border-box !important;
}
[data-mm-margin-left],
[data-mm-margin-right] { box-sizing: border-box; }

/* ── Comparateur Gallery inline media display fix ── */
.mm-comparateur-gallery-section .compare-bg {
        position: absolute;
        inset: 0;
        overflow: hidden;
}
.mm-comparateur-gallery-section .compare-bg img,
.mm-comparateur-gallery-section .compare-bg video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
}
.mm-comparateur-gallery-section .compare-content {
        position: absolute;
        inset: 0;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: center;
}
.mm-comparateur-gallery-section .compare-slide {
        position: absolute;
        inset: 0;
        opacity: 0;
        visibility: hidden;
        transition: opacity .5s;
}
.mm-comparateur-gallery-section .compare-slide.active {
        opacity: 1;
        visibility: visible;
}

/* ── Responsive ── */
@media (max-width: 768px) {
        .section {
                padding: 48px 16px;
        }

        .section-inner { max-width: 100% !important; }

        /* Navigation mobile fixes */
        .nav-links { display: none !important; }
        .nav-hamburger { display: flex !important; cursor: pointer !important; -webkit-tap-highlight-color: transparent !important; }
        .nav-mobile {
                display: block !important;
                position: fixed !important;
                left: 0 !important;
                right: 0 !important;
                background: rgba(0,0,0,.95) !important;
                backdrop-filter: blur(24px) !important;
                -webkit-backdrop-filter: blur(24px) !important;
                padding: 24px !important;
                border-bottom: 1px solid rgba(255,255,255,.06) !important;
                z-index: 9999 !important;
                max-height: calc(100vh - 70px) !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch !important;
                opacity: 0 !important;
                visibility: hidden !important;
                transform: translateY(-10px) !important;
                transition: all .35s cubic-bezier(.23,.1,.25,1) !important;
        }
        .nav-mobile.active {
                opacity: 1 !important;
                visibility: visible !important;
                transform: translateY(0) !important;
        }
        body.light-mode .nav-mobile {
                background: rgba(255,255,255,.96) !important;
                border-bottom-color: rgba(0,0,0,.06) !important;
        }
        body.light-mode .nav-mobile a { color: #424245 !important; border-bottom-color: rgba(0,0,0,.06) !important; }
        .nav-inner { padding: 0 16px !important; }
        #nav { padding: 0 !important; }
        .nav-logo { font-size: 18px !important; }

        /* Hero responsive */
        .hero-content { padding: 80px 16px 40px !important; }
        .hero, .hero-section { min-height: 60vh !important; }
        .hero-h1, h1.hero-h1 { font-size: clamp(32px, 8vw, 52px) !important; }

        /* Cards responsive */
        .card, .glass-card { border-radius: 16px !important; }

        /* Gallery controls responsive */
        .gal-hud { padding: 80px 16px 0 !important; }
        .gslide-body { left: 16px !important; right: 16px !important; bottom: 60px !important; max-width: none !important; }
        .gal-segs { bottom: 16px !important; }

        /* Footer responsive */
        .footer-inner { flex-direction: column !important; gap: 24px !important; text-align: center !important; }
        .footer-col { min-width: auto !important; }

        /* Section titles responsive */
        .section-title, .sec-title { font-size: clamp(24px, 5vw, 36px) !important; }

        /* Prevent overflow on mobile */
        .section, .sec { overflow-x: hidden !important; }
        img { max-width: 100% !important; height: auto !important; }

        /* Comparateur gallery mobile */
        #gal-before .compare-content, #gal-after .compare-content { max-width: calc(50% - 20px) !important; }
        .compare-side-label { font-size: 10px !important; }
        .cs-h2 { font-size: clamp(18px, 3vw, 28px) !important; }

        /* Immo gallery mobile */
        .gslide-half { width: 100% !important; }

        /* Universal overflow prevention for all containers */
        body.memodule-page, body.memodule-front { overflow-x: clip !important; max-width: 100vw !important; }
        /* v2.5.10.7 FIX-GALLERY-SCROLL : sur mobile, on ne met PAS overflow-x: hidden sur main
           car cela crée un scroll container qui empêche position:fixed de fonctionner pour
           le JS pinning de la galerie horizontale. Le overflow-x: clip sur body suffit à
           empêcher le scroll horizontal parasite. */
        main { max-width: 100vw !important; }
        .section-inner { max-width: 100% !important; box-sizing: border-box !important; }
        table { max-width: 100% !important; overflow-x: auto !important; display: block !important; }
        pre, code { max-width: 100% !important; overflow-x: auto !important; word-wrap: break-word !important; }
}

@media (max-width: 480px) {
        .section { padding: 32px 12px; }
        .nav-inner { height: 52px !important; }
        .hero-content { padding: 60px 12px 30px !important; }
        .cs-desc { display: none !important; }
        .cs-pills { flex-wrap: wrap !important; }
}

/* ── Dynamic Navigation Overflow ── */
.nav-overflow-item {
        position: relative;
}
.nav-overflow-toggle {
        font-size: 13px !important;
        font-weight: 600 !important;
        opacity: .8;
}
.nav-overflow-menu {
        right: 0 !important;
        left: auto !important;
        transform: none !important;
}
.nav-item-active > a {
        color: var(--gold) !important;
}
.nav-link-active {
        color: var(--gold) !important;
}
.nav-link-active::after {
        width: 100% !important;
}
body.light-mode .nav-item-active > a,
body.light-mode .nav-link-active {
        color: var(--gold) !important;
}

/* Mobile nav with dynamic pages */
.nav-mobile .nav-mobile-page-item {
        display: flex;
        flex-direction: column;
}
.nav-mobile .nav-mobile-page-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 0;
        font-size: 16px;
        font-weight: 500;
        color: var(--text2);
        border-bottom: 1px solid rgba(255,255,255,.06);
        transition: color .25s;
}
.nav-mobile .nav-mobile-page-link:hover { color: var(--gold-light); }
.nav-mobile .nav-mobile-sections {
        display: none;
        padding-left: 16px;
}
.nav-mobile .nav-mobile-page-item.expanded .nav-mobile-sections {
        display: block;
}
.nav-mobile .nav-mobile-section-link {
        display: block;
        padding: 8px 0;
        font-size: 14px;
        color: var(--text3);
        border-bottom: 1px solid rgba(255,255,255,.03);
        transition: color .25s;
}
.nav-mobile .nav-mobile-section-link:hover { color: var(--gold-light); }

/* ── Pricing cards (Stripe checkout) ──
   Audit C-1 / M-2 : Les styles conditionnels premium sont gérés via classes CSS
   (et non plus via des styles inline PHP non échappés). */
.mm-pricing-card {
        background: rgba(255,255,255,.05);
        border: 1px solid rgba(255,255,255,.1);
}
.mm-pricing-card--premium {
        background: linear-gradient(180deg, rgba(200,168,75,.06) 0%, rgba(255,255,255,.05) 40%);
        border: 1px solid rgba(200,168,75,.3);
}
.mm-stripe-checkout-btn {
        background: rgba(255,255,255,.06);
        color: #f4f4f6;
        border: 1px solid rgba(255,255,255,.1);
}
.mm-stripe-checkout-btn--premium {
        background: linear-gradient(135deg, #c8a84b, #dfc07a);
        color: #000;
        border: 1px solid transparent;
}
.mm-stripe-checkout-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(0,0,0,.18);
}


/* ═══ v2.4.0 — Responsive Improvements ═══ */

/* Container fluid on mobile */
@media (max-width: 768px) {
    .mm-container,
    .memodule-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }

    /* Typography scaling */
    .mm-hero-title,
    .hero-title,
    h1.mm-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .mm-section-title,
    h2.mm-section-title {
        font-size: clamp(1.5rem, 4vw, 2rem) !important;
        line-height: 1.25 !important;
    }

    /* Stack columns vertically */
    .mm-grid,
    .mm-row,
    .mm-columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }

    .mm-grid > *,
    .mm-row > *,
    .mm-columns > * {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Cards full width */
    .mm-card,
    .blog-card,
    .mm-pricing-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 16px !important;
    }

    /* Buttons touch-friendly */
    .mm-btn,
    .btn,
    .mm-stripe-checkout-btn {
        display: inline-block !important;
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px 24px !important;
        font-size: 16px !important;
        touch-action: manipulation !important;
    }

    /* WCAG 2.5.5 Target Size: icon-only buttons need >= 44x44px touch target.
       v2.5.10.28 FIX-WCAG-2.5.5: .slideshow-arrow was 36x36, below the 44px threshold.
       Use body.memodule-page prefix for higher specificity than inline <style> rules in
       default-*.html. The visual circle stays 36px via inner padding/box-sizing trick. */
    body.memodule-page .slideshow-arrow,
    body.memodule-front .slideshow-arrow,
    body.memodule-memorial .slideshow-arrow,
    .slideshow-arrow {
        min-height: 44px !important;
        min-width: 44px !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        touch-action: manipulation !important;
    }

    /* Tables scrollable */
    .mm-table,
    table.mm-table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Images responsive */
    .mm-content img,
    .memodule-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Forms stack */
    .mm-form-row,
    .mm-form-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* Navigation mobile */
    .mm-nav-mobile {
        display: block !important;
    }

    .mm-nav-desktop {
        display: none !important;
    }

    /* Modal full screen on mobile */
    .mm-modal,
    .modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .mm-container,
    .memodule-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .mm-hero-title {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }

    /* Hide non-essential decorative elements */
    .mm-decoration,
    .mm-ornament {
        display: none !important;
    }

    /* Stack pricing cards */
    .mm-pricing-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .mm-grid-3-cols,
    .mm-columns-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Print styles */
@media print {
    .mm-nav,
    .mm-footer,
    .mm-sidebar,
    .mm-cta,
    .mm-pricing-card {
        display: none !important;
    }

    .mm-content {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Editor responsive improvements */
@media (max-width: 768px) {
    .mm-editor-toolbar {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .mm-editor-toolbar button {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 8px 12px !important;
    }

    .mm-editor-iframe-container {
        width: 100% !important;
        height: calc(100vh - 120px) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * FIX-CRITICAL v2.5.10.68 (merge audit) : 2 ajouts critiques
 * ═══════════════════════════════════════════════════════════════════════════
 *
 * 1) .mm-script-ph — placeholders pour les <script> extraits avant wp_kses.
 *    Si le script est correctement réinséré, le div est remplacé. Sinon, il
 *    reste invisible grâce à display:none.
 *
 * 2) @media (prefers-reduced-motion: reduce) — Conformité WCAG 2.2.2 A
 *    Obligation légale FR (loi du 28 mai 2021 sur l'accessibilité numérique).
 *    Les utilisateurs avec sensibilité vestibulaire peuvent avoir des crises
 *    d'épilepsie, vertiges ou nausées face aux animations continues.
 *    Sans cette media query, le plugin violait WCAG 2.2.2 A (Pause, Stop, Hide)
 *    et WCAG 2.3.3 AAA (Animation from Interactions).
 */

/* 1) Hide script placeholders by default */
.mm-script-ph { display: none !important; }

/* 2) Disable all animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
                -webkit-animation-duration: 0.01ms !important;
                -webkit-animation-iteration-count: 1 !important;
                -webkit-transition-duration: 0.01ms !important;
        }

        /* Désactiver spécifiquement les animations en boucle */
        .heroGradient,
        .iconFloat,
        .gradient-shift,
        .slideshow,
        .marquee,
        .mm-pulse,
        .mm-blink,
        .mm-floating,
        .mm-shimmer,
        .mm-rotate,
        .mm-bounce,
        .mm-fade-infinite,
        .mm-slideshow,
        .reveal {
                animation: none !important;
                transition: none !important;
        }

        /* Forcer la visibilité du contenu révélé (pas de fade-in) */
        .reveal {
                opacity: 1 !important;
                transform: none !important;
        }

        html.mm-js .reveal {
                opacity: 1 !important;
                transform: none !important;
        }

        html {
                scroll-behavior: auto !important;
        }
}
