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

/* ── CSS Custom Properties (fallbacks for mobile nav) ── */
:root {
  --gold: #c8a84b;
  --gold-light: #dfc06e;
  --text2: #999;
  --text3: #666;
}

/* ── Reset & Base ── */
body.memodule-page,
body.memodule-front {
        margin: 0;
        padding: 0;
        overflow-x: clip;
        background: #000;
        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:hover .nav-dropdown-menu,
.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-sectors-dropdown:hover .nav-dropdown-arrow,
.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;
}

.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: 22px;
        backdrop-filter: 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(255, 255, 255, 0.055);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 22px;
        backdrop-filter: 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;
}

/* ── Blog ── */
.mm-blog-listing {
        max-width: 100%;
        margin: 0 auto;
        padding: 40px 24px;
}

.mm-blog-header {
        text-align: center;
        margin-bottom: 48px;
}

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

.mm-blog-filters {
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
}

.mm-filter-link {
        padding: 8px 20px;
        border-radius: 100px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #f4f4f6;
        text-decoration: none;
        transition: background 0.3s, border-color 0.3s;
}

.mm-filter-link:hover,
.mm-filter-link.active {
        background: rgba(200, 168, 75, 0.2);
        border-color: #c8a84b;
        color: #c8a84b;
}

.mm-blog-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 32px;
}

.mm-blog-card {
        background: rgba(255, 255, 255, 0.055);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 22px;
        overflow: hidden;
        transition: transform 0.3s, box-shadow 0.3s;
}

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

.mm-blog-card-image img {
        width: 100%;
        height: 200px;
        object-fit: cover;
}

.mm-blog-card-content {
        padding: 20px;
}

.mm-blog-card-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
}

.mm-blog-card-title a {
        color: #f4f4f6;
        text-decoration: none;
        transition: color 0.3s;
}

.mm-blog-card-title a:hover {
        color: #c8a84b;
}

.mm-blog-card-sectors {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 12px;
}

.mm-blog-sector-tag {
        padding: 4px 12px;
        border-radius: 100px;
        background: rgba(200, 168, 75, 0.15);
        color: #c8a84b;
        font-size: 12px;
        text-decoration: none;
        transition: background 0.3s;
}

.mm-blog-sector-tag:hover {
        background: rgba(200, 168, 75, 0.3);
}

.mm-blog-card-excerpt {
        color: #999;
        font-size: 14px;
        margin-bottom: 12px;
}

.mm-blog-card-date {
        color: #666;
        font-size: 13px;
}

.mm-blog-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 24px;
        margin-top: 48px;
        padding: 24px 0;
}

.mm-pagination-prev,
.mm-pagination-next {
        padding: 10px 24px;
        border-radius: 100px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #f4f4f6;
        text-decoration: none;
        transition: background 0.3s, border-color 0.3s;
}

.mm-pagination-prev:hover,
.mm-pagination-next:hover {
        background: rgba(200, 168, 75, 0.2);
        border-color: #c8a84b;
        color: #c8a84b;
}

.mm-pagination-info {
        color: #999;
        font-size: 14px;
}

.mm-blog-empty {
        text-align: center;
        padding: 80px 24px;
        color: #999;
}

/* ── 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 .mm-blog-card {
        background: rgba(0,0,0,.02) !important;
        border-color: rgba(0,0,0,.06) !important;
}
body.light-mode .mm-blog-card-title a { color: #1d1d1f !important; }
body.light-mode .mm-blog-card-excerpt { color: #6e6e73 !important; }
body.light-mode .mm-blog-card-date { color: #8e8e93 !important; }
body.light-mode .mm-filter-link {
        border-color: rgba(0,0,0,.1) !important;
        color: #424245 !important;
}
body.light-mode .mm-filter-link:hover, body.light-mode .mm-filter-link.active {
        background: rgba(200,168,75,.15) !important;
        color: #c8a84b !important;
}
body.light-mode .mm-pagination-prev, body.light-mode .mm-pagination-next {
        border-color: rgba(0,0,0,.1) !important;
        color: #424245 !important;
}
body.light-mode .mm-blog-empty { color: #8e8e93 !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 {
        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; }

/* ── Responsive ── */
@media (max-width: 768px) {
        .mm-blog-grid {
                grid-template-columns: 1fr;
        }

        .section {
                padding: 48px 16px;
        }

        .mm-blog-listing {
                padding: 24px 16px;
        }

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

/* ── Dynamic Navigation Overflow ── */
.nav-links-wrapper {
        display: flex;
        align-items: center;
        gap: 0;
        position: relative;
        overflow: hidden;
        flex: 1;
        justify-content: flex-end;
}
.nav-links-wrapper .nav-links {
        display: flex;
        gap: 28px;
        list-style: none;
        margin: 0;
        padding: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
}
.nav-links-wrapper .nav-links::-webkit-scrollbar { display: none; }
.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); }
