:root {
    --color-primary: #578E72;
    --color-primary-dark: #245B3F;
    --color-primary-light: #A4DBBF;
    --color-secondary: #F3F1EA;
    --color-secondary-dark: #CDCBC4;
    --color-accent: #BDF4D8;
    --color-white: #FFFFFF;
    --color-bg: #FBFAF7;
    --color-surface: #F3F1EA;
    --color-card: #FFFFFF;
    --color-text: #1C1917;
    --color-heading: #1C1917;
    --color-text-muted: #6B6660;
    --color-border: #E7E3DA;
    --color-gray-50: #F3F1EA;
    --color-gray-100: #EDEAE2;
    --color-gray-200: #E7E3DA;
    --color-gray-300: #BCB7AF;
    --color-gray-400: #908C85;
    --color-gray-500: #6B6660;
    --color-gray-600: #4F4B46;
    --color-gray-700: #3C3834;
    --color-gray-800: #2C2826;
    --color-gray-900: #1C1917;
    --font-family: 'Lora', Georgia, 'Times New Roman', serif;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --radius-sm: 0.188rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.375rem;
    --radius-xl: 0.5rem;
    --radius-2xl: 0.75rem;
    --radius-full: 9999px;
    --radius-btn: 0;
    --radius-scale: 0.5;
    --radius-btn-scale: 0;
    --nav-bg: #FFFFFF;
    --nav-text: #3C3834;
    --nav-border: rgba(0,0,0,0.08);
    --nav-logo: #578E72;
    --nav-link-hover: #578E72;
    --nav-menu-bg: #FFFFFF;
    --footer-bg: #FFFFFF;
    --footer-text: #1C1917;
    --footer-muted: #6B6660;
    --footer-border: #E7E3DA;
    --container-max: 1200px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); font-size: 1rem; line-height: 1.6; color: var(--color-gray-800); background-color: var(--color-white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.15s; }
ul { list-style: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

/* Widgets en colonnes */
.widgets-container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.widget-wrapper { box-sizing: border-box; }
.page-main-content.widgets-container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
@media (max-width: 768px) {
    .widget-wrapper { width: 100% !important; }
}

.navbar { position: fixed; top: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.98); box-shadow: 0 1px 3px rgba(0,0,0,0.08); z-index: 1000; transition: all 0.3s; }
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; min-height: 70px; }
.logo { display: flex; align-items: center; gap: 0; font-weight: 700; color: var(--color-primary); transition: transform 0.15s; flex-shrink: 0; }
.logo:hover { transform: scale(1.02); }
.logo-img { height: 50px; width: auto; object-fit: contain; max-width: 180px; }
.logo-text { font-size: 1.25rem; font-weight: 800; }
.nav-menu { display: flex; align-items: center; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.nav-menu li { margin: 0; padding: 0; }
.nav-link { font-weight: 500; color: var(--color-gray-700); position: relative; padding: 0.5rem 0.75rem; transition: color 0.15s; font-size: 0.875rem; display: block; text-decoration: none; }
.nav-link:hover, .nav-link.active { color: var(--color-primary); }
.btn-connection { background: var(--color-primary); color: white !important; border-radius: calc(0.5rem * var(--radius-btn-scale,1)); padding: 0.625rem 1.25rem !important; font-weight: 600; white-space: nowrap; }
.btn-connection:hover { background: var(--color-primary-dark); transform: translateY(-1px); }

/* Megamenu */
.nav-item-dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 0.25rem; }
.dropdown-arrow { font-size: 0.625rem; transition: transform 0.2s; }
.mega-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--color-card,#FFFFFF); border-radius: calc(1rem * var(--radius-scale,1)); box-shadow: 0 20px 40px rgba(0,0,0,0.15); padding: 1.5rem; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 1001; min-width: 500px; }
.nav-item-dropdown:hover .mega-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-item-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }
.mega-menu-content { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.mega-menu-column { }
.mega-menu-title { font-size: 0.75rem; font-weight: 700; color: var(--color-gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.75rem; }
.mega-menu-links { display: flex; flex-direction: column; gap: 0.25rem; }
.mega-menu-link { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem; border-radius: calc(0.5rem * var(--radius-scale,1)); transition: background 0.15s; }
.mega-menu-link:hover { background: var(--color-gray-50); }
.mega-menu-icon { font-size: 1.25rem; }
.mega-menu-link strong { display: block; font-weight: 600; color: var(--color-gray-900); margin-bottom: 0.125rem; }
.mega-menu-link span { font-size: 0.75rem; color: var(--color-gray-500); }

.mobile-menu-toggle { 
    display: none; 
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    gap: 6px; 
    background: var(--color-gray-50); 
    border: 1px solid var(--color-gray-200); 
    border-radius: calc(8px * var(--radius-scale,1));
    cursor: pointer; 
    padding: 10px; 
    z-index: 1002;
    width: 48px;
    height: 48px;
}
.mobile-menu-toggle span { 
    width: 24px; 
    height: 2px; 
    background: var(--color-gray-700); 
    transition: all 0.3s ease; 
    border-radius: calc(2px * var(--radius-scale,1));
    display: block;
}
.mobile-menu-toggle.active { background: var(--color-primary); border-color: var(--color-primary); }
.mobile-menu-toggle.active span { background: var(--color-card,#FFFFFF); }
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 968px) {
    .nav-wrapper { min-height: 60px; padding: 0.5rem 0; }
    .logo-img { height: 40px; max-width: 140px; }
    .logo-text { font-size: 1.125rem; }
    .mobile-menu-toggle { display: flex; }
    .nav-menu { 
        position: fixed; 
        top: 0; 
        left: 0; 
        right: 0; 
        bottom: 0;
        background: var(--color-card,#FFFFFF); 
        flex-direction: column; 
        padding: 80px 1.5rem 2rem; 
        transform: translateX(100%); 
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
        gap: 0; 
        overflow-y: auto;
        z-index: 1001;
        list-style: none;
    }
    .nav-menu.active { transform: translateX(0); }
    .nav-menu li { width: 100%; }
    .nav-link { 
        font-size: 1rem; 
        padding: 1rem 0; 
        border-bottom: 1px solid var(--color-gray-100); 
        display: block; 
        width: 100%;
        color: var(--color-gray-800);
    }
    .nav-link:hover { color: var(--color-primary); background: none; }
    .nav-item-dropdown { width: 100%; }
    .mega-menu { 
        position: static; 
        transform: none !important; 
        opacity: 1; 
        visibility: visible; 
        box-shadow: none; 
        min-width: auto; 
        padding: 0.5rem 0 1rem 1rem; 
        background: var(--color-gray-50);
        border-radius: calc(0.5rem * var(--radius-scale,1));
        margin: 0.5rem 0;
    }
    .mega-menu-content { grid-template-columns: 1fr; gap: 0.25rem; }
    .mega-menu-link { padding: 0.625rem 0.75rem; }
    .mega-menu-link strong { font-size: 0.875rem; }
    .btn-connection { 
        width: 100%; 
        text-align: center; 
        margin-top: 1.5rem; 
        padding: 1rem !important; 
        font-size: 1rem; 
        border-radius: 0.75rem !important;
    }
}

.footer { background: var(--color-gray-900); color: var(--color-white); padding: 3rem 0 1rem; margin-top: 4rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section { }
.footer-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }
.footer-description { font-size: 0.875rem; opacity: 0.8; line-height: 1.6; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.875rem; opacity: 0.7; }

/* BUTTONS */
.btn { display: inline-block; padding: 0.75rem 1.5rem; font-weight: 600; border-radius: calc(0.5rem * var(--radius-btn-scale,1)); transition: all 0.15s ease-in-out; cursor: pointer; border: none; font-size: 1rem; text-align: center; text-decoration: none; }
.btn-primary { background: #FFFFFF; color: var(--color-primary); }
.btn-primary:hover { background: #F3F4F6; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.btn-secondary { background: transparent; color: #FFFFFF; border: 2px solid #FFFFFF; }
.btn-secondary:hover { background: #FFFFFF; color: var(--color-primary); }
.btn-large { padding: 1rem 2rem; font-size: 1.125rem; }

/* SECTIONS */
section { padding: 3rem 0; }
.section-header { text-align: center; margin-bottom: 2rem; }
.section-title { font-size: 1.875rem; font-weight: 800; color: var(--color-gray-900); margin-bottom: 0.75rem; }
.section-subtitle { font-size: 1rem; color: var(--color-gray-600); max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* HERO */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 3rem; overflow: hidden; }

/* FAQ */
.faq-item { background: var(--color-surface,#F9FAFB); border-radius: calc(0.75rem * var(--radius-scale,1)); margin-bottom: 1rem; overflow: hidden; border: 1px solid var(--color-border,#E5E7EB); }
.faq-question { padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.3s; gap: 1rem; }
.faq-question:hover { background: var(--color-gray-100,#F3F4F6); }
.faq-question h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--color-text,#111827); flex: 1; }
.faq-question span { font-size: 1.5rem; font-weight: 300; width: 30px; min-width: 30px; text-align: center; transition: transform 0.3s ease; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; }
.faq-answer p { color: var(--color-gray-700,#374151); line-height: 1.8; font-size: 0.95rem; margin: 0; padding: 0 1.5rem 1.5rem; }
.faq-item.active .faq-answer { max-height: 2000px; }
.faq-item.active .faq-question span { transform: rotate(45deg); }
.faq-item.active .faq-question { background: rgba(var(--color-primary-rgb), 0.05); }

/* ANIMATIONS */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

.loading { text-align: center; padding: 2rem; color: var(--color-gray-500); }

/* Cookie Banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(17, 24, 39, 0.97); backdrop-filter: blur(10px); z-index: 999999; padding: 1rem; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); animation: slideUp 0.4s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookie-content { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.cookie-text { display: flex; align-items: flex-start; gap: 1rem; flex: 1; min-width: 280px; color: var(--color-border,#E5E7EB); }
.cookie-icon { font-size: 2rem; color: var(--color-secondary); flex-shrink: 0; }
.cookie-text strong { display: block; font-size: 1rem; font-weight: 700; color: white; margin-bottom: 0.25rem; }
.cookie-text p { font-size: 0.875rem; line-height: 1.5; margin: 0; }
.cookie-text a { color: var(--color-secondary); text-decoration: underline; }
.cookie-text a:hover { color: white; }
.cookie-buttons { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-btn { padding: 0.625rem 1.25rem; border-radius: calc(0.5rem * var(--radius-btn-scale,1)); font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: all 0.2s; border: none; }
.cookie-btn-primary { background: var(--color-secondary); color: white; }
.cookie-btn-primary:hover { background: var(--color-primary); transform: translateY(-1px); }
.cookie-btn-secondary { background: transparent; color: var(--color-gray-400,#9CA3AF); border: 1px solid var(--color-gray-600,#4B5563); }
.cookie-btn-secondary:hover { background: #374151; color: white; }
@media (max-width: 640px) { .cookie-content { flex-direction: column; align-items: stretch; } .cookie-buttons { justify-content: stretch; } .cookie-btn { flex: 1; text-align: center; } }

/* Mobile Navigation Bar */
.mobile-nav-bar { 
    display: none; 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: var(--color-card,#FFFFFF); 
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12); 
    z-index: 99998; 
    padding: 0; 
    border-top: 1px solid var(--color-border,#E5E7EB);
    height: auto;
    min-height: 60px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav-content { 
    display: flex; 
    justify-content: space-around; 
    align-items: stretch; 
    min-height: 60px;
    max-width: 100%; 
    margin: 0; 
    padding: 8px 0; 
}
.mobile-nav-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    gap: 4px; 
    color: var(--color-text-muted,#6B7280); 
    text-decoration: none; 
    padding: 8px 12px; 
    transition: all 0.2s; 
    flex: 1; 
    min-width: 0;
    border-top: 3px solid transparent;
    min-height: 50px;
}
.mobile-nav-item i { 
    font-size: 1.25rem; 
    transition: all 0.2s; 
    line-height: 1;
}
.mobile-nav-item span { 
    font-size: 0.625rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.mobile-nav-item:hover, .mobile-nav-item.active { 
    color: var(--color-primary); 
    background: linear-gradient(to top, rgba(var(--color-primary-rgb, 60, 47, 139), 0.08), transparent);
    border-top-color: var(--color-primary);
}
.mobile-nav-item.active i { 
    transform: scale(1.1); 
}

/* ============================================ */
/* RESPONSIVE - TABLET (max 968px) */
/* ============================================ */
@media (max-width: 968px) {
    .container { padding: 0 1.5rem; }
    section { padding: 3rem 0; }
    .section-title { font-size: 1.75rem; }
    .section-subtitle { font-size: 0.9375rem; }
    
    /* Hero */
    .hero { min-height: auto; padding: 6rem 0 4rem; }
    .hero-content { text-align: center; }
    .hero h1 { font-size: 2rem !important; }
    .hero p { font-size: 1rem !important; }
    .hero-buttons { flex-direction: column; gap: 1rem; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 300px; }
    
    /* Stats */
    .stats-grid, [class*='stats'] > div { 
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 1.5rem !important; 
    }
    
    /* Footer */
    .footer-content { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

/* ============================================ */
/* RESPONSIVE - MOBILE (max 768px) */
/* ============================================ */
@media (max-width: 768px) {
    html { font-size: 15px; }
    body { 
        padding-bottom: 75px !important; 
        padding-bottom: calc(75px + env(safe-area-inset-bottom, 0)) !important;
    }
    .container { padding: 0 1rem; max-width: 100%; }
    section { padding: 2.5rem 0; overflow-x: hidden; }
    
    /* Mobile Nav Bar visible */
    .mobile-nav-bar { display: block; }
    .cookie-banner { bottom: 85px; }
    
    /* Hero adjustments */
    .hero { min-height: auto; padding: 5rem 1rem 3rem; }
    .hero h1 { font-size: 1.75rem !important; line-height: 1.3 !important; }
    .hero p { font-size: 0.9375rem !important; }
    
    /* Hide hero stats box on mobile */
    .hero-stats-box { display: none !important; }
    
    /* Section titles */
    .section-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .section-subtitle { font-size: 0.875rem; }
    
    /* Grids to single column */
    .formation-grid, 
    .catalogue-grid,
    .features-grid,
    .services-grid,
    [class*='-grid'] { 
        display: grid !important;
        grid-template-columns: 1fr !important; 
        gap: 1.25rem !important; 
    }
    
    /* Stats 2 columns on mobile */
    .stats-grid, [class*='stats'] > div { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 1rem !important; 
    }
    .stat-item, [class*='stat-'] { 
        padding: 1rem !important; 
    }
    .stat-item h3, [class*='stat-'] h3 { font-size: 1.75rem !important; }
    .stat-item p, [class*='stat-'] p { font-size: 0.75rem !important; }
    
    /* Cards */
    .formation-card, .category-card, .session-card {
        margin: 0 !important;
    }
    
    /* Page with Sidebar - CRITICAL FIX */
    .page-with-sidebar,
    .page-layout,
    [style*='display: grid'][style*='grid-template-columns'] {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }
    .page-with-sidebar > .main-content,
    .page-layout > .main-content,
    .page-with-sidebar > div:first-child,
    .page-layout > div:first-child {
        order: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    .page-with-sidebar > .page-sidebar,
    .page-with-sidebar > aside,
    .page-layout > aside,
    .page-with-sidebar > div:last-child:not(.main-content),
    .page-layout > div:last-child:not(.main-content) {
        order: 2 !important;
        width: 100% !important;
        position: static !important;
        margin-top: 1.5rem !important;
    }
    .page-sidebar {
        position: static !important;
        top: auto !important;
    }
    
    /* Contact info */
    .contact-info-grid { 
        grid-template-columns: 1fr !important; 
        gap: 1rem !important;
    }
    .contact-item { 
        flex-direction: row !important; 
        gap: 1rem !important;
        padding: 1rem !important;
    }
    
    /* Legal sections */
    .legal-section, .legal-content section { 
        padding: 1.25rem !important; 
        margin-bottom: 1.5rem !important;
    }
    
    /* Footer */
    .footer { padding: 2.5rem 0 1rem; margin-top: 2rem; }
    .footer-content { 
        grid-template-columns: 1fr !important; 
        gap: 1.5rem; 
        text-align: center; 
    }
    .footer-section { margin-bottom: 1rem; }
    .footer-bottom { padding-top: 1.5rem; font-size: 0.8125rem; }
    
    /* Buttons */
    .btn { padding: 0.875rem 1.5rem; font-size: 0.9375rem; }
    .btn-large { padding: 1rem 1.75rem; font-size: 1rem; }
    
    /* CTA blocks */
    .cta-section, [class*='cta'] {
        padding: 2rem 1.5rem !important;
    }
    .cta-section h2, [class*='cta'] h2 { font-size: 1.375rem !important; }
    
    /* FAQ */
    .faq-question { padding: 1rem; }
    .faq-question h3 { font-size: 0.9375rem; }
    .faq-answer p { padding: 0 1rem 1rem; font-size: 0.875rem; }
    
    /* Process steps */
    .process-steps, [class*='processus'] > div {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    /* Session cards */
    .session-card-header { flex-direction: column; gap: 0.75rem; }
    .session-details { flex-direction: column; gap: 0.5rem; }
    
    /* Highlights */
    .highlight-box, [class*='highlight'] {
        padding: 1.5rem !important;
    }
    .highlight-box h1, .highlight-box h2 { font-size: 1.5rem !important; }
    
    /* Breadcrumb */
    .breadcrumb { font-size: 0.8125rem; flex-wrap: wrap; gap: 0.25rem; }
    
    /* Images */
    img { max-width: 100%; height: auto; }
    
    /* Prevent horizontal overflow */
    * { max-width: 100vw; }
    [style*='width:'] { max-width: 100% !important; }
}

/* ============================================ */
/* RESPONSIVE - SMALL MOBILE (max 480px) */
/* ============================================ */
@media (max-width: 480px) {
    html { font-size: 14px; }
    .container { padding: 0 0.75rem; }
    section { padding: 2rem 0; }
    
    .hero h1 { font-size: 1.5rem !important; }
    .hero p { font-size: 0.875rem !important; }
    
    .section-title { font-size: 1.25rem; }
    
    /* Stats single column on very small */
    .stats-grid, [class*='stats'] > div { 
        grid-template-columns: 1fr !important; 
    }
    
    .btn { padding: 0.75rem 1.25rem; font-size: 0.875rem; }
    .btn-large { padding: 0.875rem 1.5rem; font-size: 0.9375rem; }
    
    .footer-content { gap: 1.25rem; }
    
    /* Mobile nav - keep it usable on small screens */
    .mobile-nav-bar { 
        min-height: 56px; 
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mobile-nav-content {
        min-height: 56px;
        padding: 6px 0;
    }
    .mobile-nav-item { 
        padding: 6px 8px; 
        gap: 3px;
        min-height: 44px;
    }
    .mobile-nav-item i { font-size: 1.125rem; }
    .mobile-nav-item span { 
        font-size: 0.5625rem; 
        letter-spacing: 0; 
    }
}

/* ============================================ */
/* FORMATIONS CATALOGUE PAGE - PRO DESIGN */
/* ============================================ */
.formations-catalogue { width: 100%; }
.formations-grid { display: grid; gap: 1.5rem; }

/* Card hover effects */
.formation-card { cursor: pointer; }
.formation-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.12); 
    border-color: var(--color-primary);
}
.formation-card:hover .card-image img { transform: scale(1.08); }
.formation-card:hover .card-overlay { opacity: 1; }
.formation-card:hover .card-cta { 
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary)); 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.4);
}

/* View toggle buttons */
.view-btn { transition: all 0.2s; }
.view-btn:hover { background: var(--color-gray-50); }
.view-btn.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* Sidebar */
.catalogue-sidebar .filter-label:hover { background: var(--color-gray-50); }
.catalogue-sidebar input[type='radio']:checked + span { color: var(--color-primary); font-weight: 600; }

/* List view */
.formations-grid.list-view { grid-template-columns: 1fr !important; }
.formations-grid.list-view .formation-card { 
    flex-direction: row; 
    max-height: 220px;
}
.formations-grid.list-view .card-image { 
    width: 280px; 
    min-width: 280px; 
    height: 100%; 
}
.formations-grid.list-view .card-content { 
    padding: 24px; 
}
.formations-grid.list-view .card-meta { 
    grid-template-columns: repeat(4, auto); 
    justify-content: flex-start;
}

@media (max-width: 992px) {
    .formations-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
    .formations-grid { grid-template-columns: 1fr !important; }
    .catalogue-sidebar { margin-bottom: 1.5rem; }
    .formations-grid.list-view .formation-card { flex-direction: column; max-height: none; }
    .formations-grid.list-view .card-image { width: 100%; height: 180px; min-width: auto; }
    .formations-grid.list-view .card-meta { grid-template-columns: repeat(2, 1fr); }
    .catalogue-header { flex-direction: column; gap: 1rem; align-items: stretch !important; }
}

/* ============================================ */
/* PAGE LAYOUT IMPROVEMENTS */
/* ============================================ */
.page-layout, .page-with-sidebar {
    display: grid;
    gap: 2rem;
}
.page-layout.sidebar-left { grid-template-columns: 280px 1fr; }
.page-layout.sidebar-right { grid-template-columns: 1fr 280px; }
.page-layout.sidebar-left .page-sidebar { order: 0; }
.page-layout.sidebar-right .page-sidebar { order: 1; }

@media (max-width: 968px) {
    .page-layout, .page-with-sidebar {
        display: flex !important;
        flex-direction: column !important;
    }
    .page-layout .page-sidebar,
    .page-with-sidebar .page-sidebar,
    .page-layout aside,
    .page-with-sidebar aside {
        order: 10 !important;
        width: 100% !important;
        position: static !important;
    }
    .page-layout .main-content,
    .page-with-sidebar .main-content {
        order: 0 !important;
        width: 100% !important;
    }
}

/* ============================================ */
/* FORMATIONS CATALOGUE - OVERFLOW FIX */
/* ============================================ */
.catalogue-container {
    min-width: 0;
}
.catalogue-container > * {
    min-width: 0;
}
.page-main-content { 
    min-width: 0; 
    overflow: hidden;
    width: 100%;
}
.formations-catalogue { 
    width: 100%; 
    min-width: 0;
    overflow: visible;
}
.formations-grid {
    min-width: 0;
    width: 100%;
}
.formation-card {
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.formation-card .card-content {
    min-width: 0;
}
.formation-card h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive catalogue container */
@media (max-width: 968px) {
    .catalogue-container {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }
    .catalogue-container > aside,
    .catalogue-container > .catalogue-sidebar {
        order: -1;
        width: 100% !important;
        position: static !important;
        margin-bottom: 1.5rem;
    }
    .catalogue-container > main,
    .catalogue-container > .page-main-content {
        width: 100% !important;
    }
}

/* ============================================ */
/* UTILITY CLASSES FOR OVERFLOW */
/* ============================================ */
.overflow-hidden { overflow: hidden !important; }
.w-full { width: 100% !important; }
.max-w-full { max-width: 100% !important; }

body { background-color: var(--color-bg); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
.container { max-width: var(--container-max); }
.navbar { background: var(--nav-bg); }
.navbar .nav-link { color: var(--nav-text); }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--nav-link-hover); }
.navbar .nav-link.btn-connection { color: #fff; }
.navbar .logo { color: var(--nav-logo); }
@media (max-width: 968px) {
    .navbar .nav-menu { background: var(--nav-menu-bg); }
    .navbar .nav-link { border-bottom-color: var(--nav-border); }
}
.footer { background: var(--footer-bg); color: var(--footer-text); }
.footer a, .footer .footer-links a { color: var(--footer-muted); }
.footer a:hover, .footer .footer-links a:hover { color: var(--footer-text); }
.footer .footer-bottom { border-top-color: var(--footer-border); }
.footer .footer-title, .footer .footer-subtitle, .footer .footer-logo { color: var(--footer-text); }
.footer .social-link { background: var(--footer-border); }
.btn, .btn-primary, .btn-secondary, .btn-connection, .hero-btn, .cta-btn, .btn-outline { border-radius: var(--radius-btn); }
/* Fond de section choisi dans l'éditeur : le fond peint par le widget lui-même s'efface */
.widget-wrapper.lfws-bg > section, .widget-wrapper.lfws-bg > div, .widget-wrapper.lfws-bg > header, .widget-wrapper.lfws-bg > article, .widget-wrapper.lfws-bg > footer, .element-content.lfws-bg > section, .element-content.lfws-bg > div, .element-content.lfws-bg > header { background: transparent !important; }
/* Encre claire sur fond sombre / couleur principale : les jetons sont re-scopés, les widgets suivent */
.lfws-on-dark { color: #FFFFFF; --color-text: #FFFFFF; --color-heading: #FFFFFF; --color-gray-900: #FFFFFF; --color-gray-800: rgba(255,255,255,0.95); --color-gray-700: rgba(255,255,255,0.9); --color-gray-600: rgba(255,255,255,0.85); --color-text-muted: rgba(255,255,255,0.78); --color-gray-500: rgba(255,255,255,0.78); --color-gray-400: rgba(255,255,255,0.6); --color-gray-300: rgba(255,255,255,0.3); --color-border: rgba(255,255,255,0.18); --color-gray-200: rgba(255,255,255,0.18); --color-gray-100: rgba(255,255,255,0.1); --color-surface: rgba(255,255,255,0.07); --color-gray-50: rgba(255,255,255,0.07); --color-card: rgba(255,255,255,0.09); --color-white: rgba(255,255,255,0.09); }
@media (max-width: 768px) { .lfws-hide-mobile { display: none !important; } }
@media (min-width: 769px) { .lfws-hide-desktop { display: none !important; } }
.lfws-anim { opacity: 0; transform: translateY(0); transition: opacity .6s ease, transform .6s ease; }
.lfws-anim-up { transform: translateY(24px); }
.lfws-anim-left { transform: translateX(-24px); }
.lfws-anim-right { transform: translateX(24px); }
.lfws-anim-zoom { transform: scale(.96); }
.lfws-anim.lfws-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lfws-anim { opacity: 1; transform: none; transition: none; } }
