@media (max-width: 900px) {
    /* --- NAVIGATION MOBILE --- */
    .nav-links {
        position: fixed; top: 0; right: 0; height: 100vh; width: 100%;
        background-color: var(--white); display: flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 30px;
        transform: translateX(100%); transition: transform 0.4s ease-in-out;
        z-index: 2000; padding-bottom: 50px;
    }
    .nav-links.nav-active { transform: translateX(0%); display: flex; }
    .nav-links a { font-size: 1.5rem; color: var(--text-slate-900); opacity: 1; }
    
    .nav-links .lang-dropdown { display: block; position: relative; margin-top: 20px; }
    .nav-links .lang-btn { padding: 12px 25px; font-size: 1.1rem; border: 2px solid #e2e8f0; width: auto; }
    .nav-links .lang-content {
        top: auto; bottom: 115%; left: 50%; transform: translateX(-50%);
        width: 200px; max-height: 300px; overflow-y: auto;
        box-shadow: 0 -5px 25px rgba(0,0,0,0.1); z-index: 2500;
    }
    .nav-links .lang-content.show {
        bottom: 100% !important; top: auto !important;
        margin-bottom: 15px; opacity: 1 !important;
        transform: translateX(-50%) !important;
        animation: none !important; transition: none !important;
    }
    
    .lang-dropdown { display: none; } 
    .burger { display: flex; z-index: 3000; }
    
    /* --- LAYOUT GÉNÉRAL --- */
    .hero { padding: 140px 0 80px; }
    .main-title { font-size: 2.2rem; }
    .cta-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
    .split-layout, .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .form-row { grid-template-columns: 1fr; }

    /* --- SECTION ROADMAP & CARROUSEL (FIX DÉBORDEMENT) --- */
    .roadmap-split-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 40px;
        padding: 0 5px; /* Ajout d'une marge de sécurité sur les côtés */
        margin: 0;
        overflow: visible; /* CRUCIAL : On ne coupe plus les icônes/ombres */
    }

    .roadmap-container {
        width: 100%;
        max-width: 100%;
        padding: 20px 0; /* Un peu d'air pour les icônes */
        margin: 0;
    }

    /* Aligner la ligne verticale avec les icônes mobiles */
    .roadmap-container::before { 
        inset-inline-start: 20px; 
    }

    .roadmap-item { 
        gap: 15px; 
        width: 100%;
        overflow: visible;
    }

    .roadmap-dot { 
        margin-inline-start: 0; 
        width: 40px; 
        height: 40px; 
        min-width: 40px; 
        margin-top: 5px;
        z-index: 2; /* S'assure que l'icône est au-dessus de la ligne */
    }

    .roadmap-content {
        flex: 1;
        min-width: 0;
        padding: 15px;
        word-wrap: break-word;
        box-sizing: border-box;
    }
    
    .roadmap-content h3 { font-size: 1.1rem; }

    .patient-highlight-box {
        width: 100% !important;
        max-width: 100%;
        margin: 0;
        padding: 15px; /* Gain de place */
        box-sizing: border-box; /* Inclut le padding dans les 100% */
    }

    .patient-carousel {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9; /* Garde le format vidéo propre */
    }

    /* --- MODALES & DIAGRAMMES --- */
   dialog.modal[open] { 
        width: 92%; 
        max-height: 85vh; 
        max-height: 85dvh; 
        margin: auto; 
        display: flex; /* Active le flex seulement à l'ouverture */
        flex-direction: column;
        border: none;
        border-radius: 24px;
        background: white;
    }

    /* Assurez-vous que le contenu prend bien toute la place */
    .modal-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden; 
        width: 100%;
    }

    .modal-header { 
        padding: 20px; 
        flex-shrink: 0; 
        border-bottom: 1px solid #f1f5f9;
    }

    .modal-body { 
        padding: 20px; 
        flex-grow: 1; 
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch; 
    }

    /* Espacer le bouton de fermeture en bas du contenu */
    .modal-body .btn-primary {
        margin-top: 30px;
        margin-bottom: 10px;
    }
    
    .inheritance-diagram { flex-direction: column; gap: 10px; }
    .arrow { transform: rotate(90deg); }
    
    /* --- LOGOS & BURGER --- */
    .burger.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .burger.toggle .line2 { opacity: 0; }
    .burger.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
    
    .desktop-only-logo { display: none !important; }
    .mobile-only-logo { display: flex !important; justify-content: center; width: 100%; margin-top: 40px; margin-bottom: 20px; }
    .mobile-only-logo svg { height: 100px !important; max-width: 80%; display: block; }
    .footer-logo svg { max-width: 200px; height: auto; display: block; }
}

/* --- ANIMATIONS --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes navLinkFade { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }