/**
 * ═══════════════════════════════════════════════════════════════════════════
 * MENTORA IT - Mobile First CSS
 * Approche Mobile First : styles de base pour mobile, puis media queries pour desktop
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════════
   BASE MOBILE (< 768px)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Touch-friendly : minimum 44px pour les éléments cliquables */
:root {
    --touch-target-min: 44px;
}

/* Reset box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* Body */
body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-gray-800, #1f2937);
    background: var(--color-white, #ffffff);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Prevent horizontal scroll */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTONS MOBILE-FIRST
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--touch-target-min);
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--gradient-primary, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary, #6366f1);
    color: var(--color-primary, #6366f1);
}

.btn-outline:hover {
    background: var(--color-primary, #6366f1);
    color: white;
}

.btn-lg {
    min-height: 52px;
    padding: 14px 28px;
    font-size: 1.125rem;
}

.btn-xl {
    min-height: 56px;
    padding: 16px 32px;
    font-size: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOCUS STATES - Accessibilité clavier (WCAG 2.1 AA)
   ═══════════════════════════════════════════════════════════════════════════ */

.btn:focus-visible,
.mobile-cta-btn:focus-visible,
.mobile-nav-link:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary, #6366f1);
    outline-offset: 2px;
}

.btn:focus:not(:focus-visible),
.mobile-cta-btn:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Focus visible sur les inputs */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary, #6366f1);
    outline-offset: 1px;
    border-color: var(--color-primary, #6366f1);
}

.w-full {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS MOBILE-FIRST
   ═══════════════════════════════════════════════════════════════════════════ */

.section {
    padding: var(--space-12) var(--space-4);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.section-header h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--color-gray-900, #111827);
}

.section-header p {
    font-size: 1rem;
    color: var(--color-gray-600, #4b5563);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ÉTAPES HORIZONTALES (Mobile = scroll horizontal)
   ═══════════════════════════════════════════════════════════════════════════ */

.steps-horizontal {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-4) 0;
    margin: 0 calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.steps-horizontal::-webkit-scrollbar {
    display: none;
}

.steps-horizontal {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.step-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: white;
    border-radius: 16px;
    padding: var(--space-6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-gray-100, #f3f4f6);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-4);
}

.step-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-gray-900);
}

.step-card p {
    font-size: 1rem;
    color: var(--color-gray-600);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS MOBILE-FIRST
   ═══════════════════════════════════════════════════════════════════════════ */

.card {
    background: white;
    border-radius: 16px;
    padding: var(--space-6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-gray-100);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 var(--space-4);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-900);
}

.logo-icon {
    width: 36px;
    height: 36px;
}

/* Nav desktop - caché sur mobile */
.nav {
    display: none;
}

/* Menu toggle mobile */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-gray-800);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-inner {
    padding: var(--space-6);
    padding-bottom: 100px;
}

.mobile-nav-section {
    margin-bottom: var(--space-6);
}

.mobile-nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray-500);
    margin-bottom: var(--space-2);
    padding: 0 var(--space-2);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 12px var(--space-2);
    color: var(--color-gray-800);
    text-decoration: none;
    font-size: 1rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: var(--color-gray-100);
}

.mobile-nav-link.active {
    background: var(--color-primary-50);
    color: var(--color-primary);
}

.mobile-menu-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: white;
    border-top: 1px solid var(--color-gray-100);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.mobile-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    background: var(--gradient-primary, linear-gradient(135deg, #6366f1, #8b5cf6));
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.mobile-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-600);
}

.mobile-search-btn svg {
    width: 24px;
    height: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
    background: var(--color-gray-900, #111827);
    color: white;
    padding: var(--space-12) var(--space-4);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

.footer-brand {
    margin-bottom: var(--space-6);
}

.footer-brand .logo {
    color: white;
    margin-bottom: var(--space-4);
}

.footer-brand p {
    color: var(--color-gray-400);
    font-size: 1rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.footer-social a {
    color: var(--color-gray-400);
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: white;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--color-gray-400);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--color-gray-800);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    text-align: center;
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS PREMIUM
   ═══════════════════════════════════════════════════════════════════════════ */

.reveal-premium {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-premium.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET (>= 768px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .section {
        padding: var(--space-12) var(--space-6);
    }
    
    .container {
        padding: 0 var(--space-6);
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr repeat(2, 1fr);
    }
    
    .steps-horizontal {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .step-card {
        flex: 0 0 calc(50% - var(--space-4));
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP (>= 1024px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
    /* Header desktop */
    .header-inner {
        height: 80px;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-header-actions {
        display: none;
    }
    
    .nav {
        display: flex;
        align-items: center;
        gap: var(--space-6);
    }
    
    .nav-links {
        display: flex;
        align-items: center;
        gap: var(--space-4);
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .nav-link {
        color: var(--color-gray-700);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 500;
        padding: 8px 12px;
        border-radius: 8px;
        transition: color 0.2s ease, background 0.2s ease;
    }
    
    .nav-link:hover {
        color: var(--color-primary);
        background: var(--color-primary-50);
    }
    
    .nav-link.active {
        color: var(--color-primary);
    }
    
    /* Dropdown desktop */
    .nav-item {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        min-width: 240px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        padding: var(--space-2);
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s ease;
        z-index: 100;
    }
    
    .nav-item:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    
    .dropdown-menu a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        color: var(--color-gray-700);
        text-decoration: none;
        border-radius: 10px;
        transition: background 0.2s ease;
    }
    
    .dropdown-menu a:hover {
        background: var(--color-gray-50);
    }
    
    .dropdown-icon {
        width: 36px;
        height: 36px;
        background: var(--color-primary-50);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-primary);
    }
    
    .dropdown-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .dropdown-arrow {
        font-size: 0.625rem;
        margin-left: 4px;
        transition: transform 0.2s ease;
    }
    
    .nav-item:hover .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .nav-cta {
        display: flex;
        align-items: center;
        gap: var(--space-2);
    }
    
    .desktop-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-gray-600);
        border-radius: 10px;
        transition: background 0.2s ease, color 0.2s ease;
    }
    
    .desktop-search-btn:hover {
        background: var(--color-gray-100);
        color: var(--color-gray-900);
    }
    
    .desktop-search-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .header-auth-buttons {
        display: flex;
        align-items: center;
        gap: var(--space-2);
    }
    
    /* Grids desktop */
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr repeat(4, 1fr);
    }
    
    .steps-horizontal {
        gap: var(--space-6);
    }
    
    .step-card {
        flex: 0 0 calc(25% - var(--space-6));
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LARGE DESKTOP (>= 1280px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SAFE AREAS (iPhone X+)
   ═══════════════════════════════════════════════════════════════════════════ */

@supports (padding: max(0px)) {
    .header {
        padding-top: max(0px, env(safe-area-inset-top));
    }

    .footer {
        padding-bottom: max(var(--space-8), env(safe-area-inset-bottom));
    }

    .mobile-menu-cta {
        padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
    }

    /* Sticky CTA mobile - safe area pour iPhone X+ */
    .sticky-cta-mobile {
        padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
    }

    /* Modals et bottom sheets - safe area */
    .modal,
    .modal-content,
    .bottom-sheet {
        padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
    }

    /* Safe area pour éléments fixes en bas */
    [class*="fixed-bottom"],
    [class*="sticky-bottom"] {
        padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER MOBILE - Toujours visible avec fond
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sur mobile, le header doit toujours avoir un fond visible */
@media (max-width: 1023px) {
    .header::before {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-bottom-color: rgba(0, 0, 0, 0.05) !important;
    }

    .header {
        padding: var(--space-2) 0;
    }

    .header-inner {
        height: 56px;
    }

    /* Menu burger toujours noir */
    .menu-toggle span {
        background: #1f2937 !important;
    }

    /* Logo toujours visible en noir */
    .logo span {
        color: #111827 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GRILLES RESPONSIVE AUTO-FIT (comme "Les plus demandés")
   ═══════════════════════════════════════════════════════════════════════════ */

/* Grille auto-responsive - s'adapte automatiquement */
.grid,
.cards-grid,
.features-grid,
.benefits-grid,
.services-grid,
.team-grid,
.partners-grid,
.testimonials-grid,
.certifications-grid,
.metiers-grid,
.parcours-grid,
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* Sur très petits écrans, forcer 1 colonne */
@media (max-width: 320px) {
    .grid,
    .cards-grid,
    .features-grid,
    .benefits-grid,
    .services-grid,
    .team-grid,
    .partners-grid,
    .testimonials-grid,
    .certifications-grid,
    .metiers-grid,
    .parcours-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   CARTES - Responsive et flexibles
   ───────────────────────────────────────────────────────────────────────────── */
.card,
.feature-card,
.service-card,
.testimonial-card,
.certification-card,
.metier-card,
.parcours-card {
    width: 100%;
    max-width: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GRILLES MENTORS - Mobile friendly
   ───────────────────────────────────────────────────────────────────────────── */
.mentors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.mentor-card {
    max-width: 100%;
    width: 100%;
}

.mentor-card-compact {
    max-width: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRICING GRID - Scroll horizontal sur mobile
   ───────────────────────────────────────────────────────────────────────────── */
.pricing-grid {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-4);
    margin: 0 calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.pricing-grid::-webkit-scrollbar {
    display: none;
}

.pricing-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pricing-card {
    flex: 0 0 300px;
    scroll-snap-align: center;
    padding: var(--space-5);
    width: 300px;
    min-width: 280px;
}

/* Pricing cards responsive pour petits écrans */
@media (max-width: 375px) {
    .pricing-card {
        flex: 0 0 260px;
        width: 260px;
        min-width: 260px;
        padding: var(--space-4);
    }
}

@media (max-width: 320px) {
    .pricing-card {
        flex: 0 0 240px;
        width: 240px;
        min-width: 240px;
    }
}

.pricing-card.featured {
    transform: none;
    border: 2px solid var(--primary, #6366f1);
}

.pricing-card.featured:hover {
    transform: translateY(-8px);
}

/* Indicateur de scroll */
.pricing-grid::after {
    content: '';
    flex: 0 0 1px;
}

@media (min-width: 1024px) {
    .pricing-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        max-width: 1100px;
        margin: 0 auto;
        padding: 0;
        overflow-x: visible;
    }

    .pricing-grid::after {
        display: none;
    }

    .pricing-card {
        flex: none;
        width: 100%;
        min-width: auto;
        padding: var(--space-8);
    }

    .pricing-card.featured {
        transform: scale(1.05);
    }

    .pricing-card.featured:hover {
        transform: scale(1.05) translateY(-8px);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   STATS GRIDS - 2 colonnes mobile, 4 desktop
   ───────────────────────────────────────────────────────────────────────────── */
.mentors-stats,
.stats-grid,
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 640px) {
    .mentors-stats,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ÉTAPES / STEPS - Scroll horizontal sur mobile
   ───────────────────────────────────────────────────────────────────────────── */
.steps-container,
.steps-grid,
.process-steps {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-4);
    margin: 0 calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.steps-container::-webkit-scrollbar,
.steps-grid::-webkit-scrollbar,
.process-steps::-webkit-scrollbar {
    display: none;
}

.steps-container,
.steps-grid,
.process-steps {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.step-card,
.process-step {
    flex: 0 0 280px;
    min-width: 280px;
    scroll-snap-align: start;
}

/* Espace à la fin pour le scroll */
.steps-container::after,
.steps-grid::after,
.process-steps::after {
    content: '';
    flex: 0 0 1px;
}

@media (min-width: 768px) {
    .steps-container,
    .steps-grid,
    .process-steps {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        overflow-x: visible;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .steps-container::after,
    .steps-grid::after,
    .process-steps::after {
        display: none;
    }

    .step-card,
    .process-step {
        flex: none;
        min-width: auto;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   INDICATEUR DE SCROLL HORIZONTAL
   ───────────────────────────────────────────────────────────────────────────── */
.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    font-size: var(--text-xs, 0.75rem);
    color: var(--gray-400, #6b7280);
}

.scroll-hint::before,
.scroll-hint::after {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--gray-300, #d1d5db);
    border-radius: 1px;
}

@media (min-width: 768px) {
    .scroll-hint {
        display: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   TABLES RESPONSIVE - Scroll horizontal
   ───────────────────────────────────────────────────────────────────────────── */
.table-responsive,
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(-1 * var(--space-4));
    padding: 0 var(--space-4);
}

table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

@media (min-width: 768px) {
    .table-responsive,
    .table-container {
        margin: 0;
        padding: 0;
        overflow-x: visible;
    }

    table {
        min-width: auto;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   LOGOS / PARTENAIRES - Flex wrap responsive
   ───────────────────────────────────────────────────────────────────────────── */
.financement-logos,
.partner-logos,
.logo-grid,
.logos-row,
.trust-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
}

.financement-logos img,
.partner-logos img,
.logo-grid img,
.logos-row img,
.trust-logos img {
    max-width: 100px;
    height: auto;
}

@media (min-width: 768px) {
    .financement-logos img,
    .partner-logos img,
    .logo-grid img,
    .logos-row img,
    .trust-logos img {
        max-width: 140px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   FAQ - Mobile friendly
   ───────────────────────────────────────────────────────────────────────────── */
.faq-grid,
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.faq-item {
    width: 100%;
}

.faq-question {
    font-size: var(--text-sm);
    padding: var(--space-4);
}

@media (min-width: 768px) {
    .faq-question {
        font-size: var(--text-base);
        padding: var(--space-6);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   TÉMOIGNAGES - Scroll horizontal sur mobile
   ───────────────────────────────────────────────────────────────────────────── */
.testimonials-slider,
.reviews-slider {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-4);
    margin: 0 calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.testimonials-slider::-webkit-scrollbar,
.reviews-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-card,
.review-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .testimonials-slider,
    .reviews-slider {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        overflow-x: visible;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .testimonial-card,
    .review-card {
        flex: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   COLONNES 2/3 - Responsive
   ───────────────────────────────────────────────────────────────────────────── */
.two-cols,
.content-split,
.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .two-cols,
    .content-split,
    .split-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.three-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 640px) {
    .three-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .three-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO SECTIONS - Mobile padding (sélecteurs spécifiques uniquement)
   ───────────────────────────────────────────────────────────────────────────── */
/* Note: Ne pas utiliser [class*="hero"] car ça affecte trop d'éléments */

/* ─────────────────────────────────────────────────────────────────────────────
   TEXTE - Taille responsive
   ───────────────────────────────────────────────────────────────────────────── */
h1, .h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    line-height: 1.2;
}

h2, .h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.25;
}

h3, .h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    line-height: 1.3;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BOUTONS MOBILES - Plus grands et accessibles
   ───────────────────────────────────────────────────────────────────────────── */
.btn {
    min-height: 44px;
    padding: 12px 20px;
}

.btn-sm {
    min-height: 36px;
    padding: 8px 16px;
    font-size: var(--text-sm);
}

.btn-lg {
    min-height: 52px;
    padding: 14px 24px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PETITS ÉCRANS (< 380px)
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
    .container {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }

    .section {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }

    .pricing-card {
        padding: var(--space-4);
    }

    .btn {
        padding: 10px 16px;
        font-size: var(--text-sm);
    }

    .btn-lg {
        padding: 12px 20px;
    }

    /* Réduire les icônes sur très petits écrans */
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .success-icon,
    .feature-icon,
    .card-icon {
        width: 48px;
        height: 48px;
    }

    .success-icon svg,
    .feature-icon svg,
    .card-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   OPTIMISATIONS MOBILE - Réduction du scroll
   Best practices pour une meilleure lisibilité mobile
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    /* ─── Sections plus compactes ─── */
    section,
    .section {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    /* Hero sections - espace pour header fixe */
    [class*="-hero"],
    .hero,
    .hero-section {
        padding-top: 140px !important;
        padding-bottom: 48px !important;
        min-height: auto !important;
    }

    /* Réduire les titres hero */
    [class*="-hero"] h1,
    .hero h1,
    .hero-section h1 {
        font-size: clamp(1.3rem, 5.5vw, 1.75rem) !important;
        margin-bottom: 10px !important;
    }

    [class*="-hero"] p,
    .hero p,
    .hero-section p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    /* ─── Typographie plus serrée ─── */
    h1, .h1 {
        margin-bottom: 12px;
    }

    h2, .h2 {
        margin-bottom: 8px;
    }

    h3, .h3 {
        margin-bottom: 6px;
    }

    p {
        margin-bottom: 12px;
    }

    /* ─── Section headers compacts ─── */
    .section-header {
        margin-bottom: 24px !important;
    }

    .section-header h2 {
        margin-bottom: 8px !important;
    }

    .section-header p {
        font-size: 1rem;
        line-height: 1.5 !important;
    }

    /* ─── Cartes plus compactes ─── */
    .card,
    .feature-card,
    .service-card,
    .benefit-card,
    .pricing-card,
    .tarif-card {
        padding: 20px !important;
    }

    .pricing-card {
        padding: 24px 20px !important;
    }

    /* ─── Réduire les gaps entre éléments ─── */
    .cards-grid,
    .features-grid,
    .benefits-grid,
    .services-grid {
        gap: 16px !important;
    }

    /* ─── Listes de features plus compactes ─── */
    .pricing-features li,
    .tarif-feature,
    .feature-item {
        padding: 8px 0 !important;
        font-size: 0.875rem !important;
    }

    .pricing-features li svg,
    .tarif-feature svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* ─── Stats compactes ─── */
    .stat-value,
    .stat-number,
    [class*="stat"] .number {
        font-size: 1.75rem !important;
    }

    .stat-label,
    .stat-text,
    [class*="stat"] .label {
        font-size: 0.75rem !important;
    }

    /* ─── CTAs compacts ─── */
    .cta-section,
    [class*="-cta"] {
        padding: 40px 20px !important;
    }

    /* ─── Espacement des boutons ─── */
    .btn + .btn {
        margin-top: 12px;
    }

    .btn-group,
    .buttons-row {
        gap: 12px !important;
    }

    /* ─── Parcours selector compact ─── */
    .parcours-selector {
        gap: 8px !important;
    }

    .parcours-tab {
        padding: 12px 16px !important;
        min-width: 140px !important;
    }

    .parcours-tab .tab-icon {
        width: 32px !important;
        height: 32px !important;
    }

    .parcours-tab .tab-label {
        font-size: 0.8125rem !important;
    }

    .parcours-tab .tab-desc {
        font-size: 0.6875rem !important;
    }

    .parcours-hint {
        font-size: 0.8125rem !important;
        padding: 10px 16px !important;
    }

    /* ─── Trust badges compacts ─── */
    .trust-badges,
    .trust-items,
    [class*="trust"] {
        gap: 16px !important;
    }

    /* ─── FAQ compact ─── */
    .faq-question {
        padding: 16px !important;
        font-size: 1rem;
    }

    .faq-answer {
        padding: 0 16px 16px !important;
        font-size: 0.875rem !important;
    }

    /* ─── Footer compact ─── */
    .footer {
        padding: 40px 16px !important;
    }

    .footer-grid {
        gap: 24px !important;
    }

    .footer-column h4 {
        margin-bottom: 12px !important;
    }

    .footer-links li {
        margin-bottom: 8px !important;
    }

    /* ─── Images responsive ─── */
    img {
        max-width: 100%;
        height: auto;
    }

    /* ─── Masquer les éléments non essentiels sur mobile ─── */
    .desktop-only,
    .hide-mobile {
        display: none !important;
    }

    /* ─── Afficher les éléments mobiles ─── */
    .mobile-only,
    .show-mobile {
        display: block !important;
    }
}

/* ─── Très petits écrans (< 380px) - Encore plus compact ─── */
@media (max-width: 379px) {
    section,
    .section {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }

    [class*="-hero"],
    .hero,
    .hero-section {
        padding-top: 80px !important;
        padding-bottom: 32px !important;
    }

    .card,
    .feature-card,
    .pricing-card {
        padding: 16px !important;
    }

    .section-header {
        margin-bottom: 20px !important;
    }

    .parcours-tab {
        padding: 10px 12px !important;
        min-width: 110px !important;
    }

    .parcours-hint {
        font-size: 0.75rem !important;
        padding: 8px 12px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BREAKPOINT 375px - iPhone SE et petits Android
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 375px) {
    /* Containers plus serrés */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Grids en single column */
    .grid,
    .cards-grid,
    .features-grid,
    [class*="-grid"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Boutons full width */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 100%;
    }

    /* Réduction des paddings sections */
    section,
    .section {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    /* Cards plus compactes */
    .card,
    .feature-card,
    .service-card {
        padding: 16px !important;
    }

    /* Typography ajustée */
    h1, .h1 {
        font-size: 1.5rem !important;
    }

    h2, .h2 {
        font-size: 1.25rem !important;
    }

    h3, .h3 {
        font-size: 1.125rem !important;
    }

    /* Stats plus compacts */
    .stats-grid {
        gap: 12px !important;
    }

    .stat-card {
        padding: 16px !important;
    }

    /* Footer compact */
    .footer-grid {
        gap: 24px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
    .header,
    .footer,
    .mobile-menu,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CORRECTIONS CRITIQUES RESPONSIVE MOBILE
   Ajouté pour corriger overflow horizontal et problèmes d'affichage
   ═══════════════════════════════════════════════════════════════════════════ */

/* GLOBAL - Empêcher tout overflow horizontal */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

* {
    max-width: 100%;
}

@media (max-width: 768px) {
    /* ─── HERO - Corrections page d'accueil ─── */
    .hero-wao {
        padding-top: 90px !important;
        padding-bottom: 40px !important;
    }

    .hero-wao-title {
        font-size: 1.4rem !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
    }

    .hero-wao-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 20px !important;
    }

    .hero-wao-badge {
        font-size: 11px !important;
        padding: 6px 12px !important;
        margin-bottom: 12px !important;
    }

    /* ─── FORMES DÉCORATIVES - Masquer sur mobile ─── */
    .hero-bg::before,
    .hero-bg::after,
    .hero-premium::before,
    .hero-premium::after,
    .hero-wao-bg::before,
    .hero-wao-bg::after {
        display: none !important;
    }

    /* ─── FOOTER - Forcer 1 colonne ─── */
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }

    /* ─── TABLES - Scroll horizontal contrôlé ─── */
    table {
        min-width: unset !important;
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
    }

    /* ─── TESTIMONIALS - 1 colonne ─── */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* ─── SEARCH GRID - 1 colonne ─── */
    .search-quick-link {
        grid-template-columns: 1fr !important;
    }

    /* ─── PRICING CARDS - Largeur auto ─── */
    .pricing-card {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
    }

    /* ─── STEP CARDS - Largeur auto ─── */
    .step-card {
        min-width: unset !important;
        width: 100% !important;
    }

    /* ─── PADDING RÉDUITS ─── */
    .hero-stats-clean,
    .hero-accompagnement {
        padding: 20px 16px !important;
    }

    /* ─── CONTAINERS - Padding mobile ─── */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        max-width: 100% !important;
    }

    /* ─── GRIDS GÉNÉRIQUES - 1 colonne ─── */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    /* ─── MENTORS GRID ─── */
    .mentors-grid {
        grid-template-columns: 1fr !important;
    }

    .mentors-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* ─── CTA BUTTONS ─── */
    .hero-wao-cta {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .hero-wao-btn-primary,
    .hero-wao-btn-secondary {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
        font-size: 0.9rem !important;
    }

    /* ─── TRUST POINTS ─── */
    .hero-wao-trust {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .hero-wao-trust span {
        font-size: 0.8rem !important;
    }

    /* ─── STATS BOX ─── */
    .hero-wao-stats {
        padding: 16px !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-stat-value {
        font-size: 1.1rem !important;
    }

    .hero-stat-label {
        font-size: 0.65rem !important;
    }

    /* ─── IMAGES - Toujours responsive ─── */
    img, video, iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    /* ─── FLEX WRAPPING ─── */
    .flex,
    [class*="flex-"] {
        flex-wrap: wrap !important;
    }
}

/* Très petits écrans (< 400px) */
@media (max-width: 400px) {
    .hero-wao {
        padding-top: 85px !important;
    }

    .hero-wao-title {
        font-size: 1.25rem !important;
    }

    .hero-wao-stats {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .hero-stat-divider {
        display: none !important;
    }

    .hero-stat-item {
        width: 100% !important;
        text-align: center !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CORRECTIONS HEADER MOBILE + TRUST POINTS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* ─── TRUST POINTS - Centrer ─── */
    .hero-wao-trust {
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* ─── HEADER MOBILE - Structure propre ─── */
    .header-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 12px !important;
        height: 56px !important;
        position: relative !important;
    }

    /* Burger à gauche */
    .header .menu-toggle {
        order: 1 !important;
        flex: 0 0 auto !important;
        position: relative !important;
        left: auto !important;
        margin: 0 !important;
    }

    /* Logo au centre */
    .header .logo {
        order: 2 !important;
        flex: 1 1 auto !important;
        position: relative !important;
        left: auto !important;
        transform: none !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Nav caché */
    .header .nav {
        display: none !important;
    }

    /* Actions à droite (loupe + connexion) */
    .header .mobile-header-actions {
        order: 3 !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        margin-left: 0 !important;
    }

    /* Loupe - taille normale */
    .mobile-search-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 6px !important;
        flex-shrink: 0 !important;
    }

    .mobile-search-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* Bouton Connexion - plus compact */
    .mobile-cta-btn,
    .mobile-auth-btn {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
    }

    .mobile-user-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }
}

/* Très petits écrans - encore plus compact */
@media (max-width: 380px) {
    .header-inner {
        padding: 0 8px !important;
    }

    .mobile-cta-btn,
    .mobile-auth-btn {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
        min-height: 30px !important;
    }

    .mobile-search-btn {
        width: 32px !important;
        height: 32px !important;
    }
}
