/* CORRECTIONS MOBILE URGENTES - À AJOUTER APRÈS LE CSS PRINCIPAL */

@media screen and (max-width: 768px) {
    /* Reset complet pour mobile */
    * {
        box-sizing: border-box !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 14px !important;
    }
    
    /* RALENTIR ET RÉDUIRE TOUTES LES ANIMATIONS */
    .logo-cube,
    .cube-face,
    .logo-3d {
        animation-duration: 8s !important;
        animation-timing-function: ease-in-out !important;
        transform: scale(0.7) !important;
    }
    
    /* Désactiver les animations trop rapides */
    .particles-container,
    .floating-elements,
    .hologram-container,
    .hologram-ring,
    .particle,
    .floating-icon {
        display: none !important;
        animation: none !important;
    }
    
    /* Ralentir toutes les autres animations */
    * {
        animation-duration: 2s !important;
        transition-duration: 0.5s !important;
        animation-timing-function: ease-in-out !important;
    }
    
    /* Header mobile fixe */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        padding: 0.8rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .nav-container {
        padding: 0 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        max-width: 100% !important;
    }
    
    .logo {
        font-size: 0.9rem !important;
        transform: scale(0.8) !important;
    }
    
    .logo-cube {
        width: 30px !important;
        height: 30px !important;
        transform: scale(0.7) !important;
    }
    
    .logo-text {
        font-size: 0.9rem !important;
        margin-left: 0.3rem !important;
    }
    
    /* Menu hamburger */
    .hamburger {
        display: flex !important;
        flex-direction: column !important;
        cursor: pointer !important;
        padding: 0.5rem !important;
        z-index: 10000 !important;
    }
    
    .hamburger span {
        width: 25px !important;
        height: 3px !important;
        background: #ffffff !important;
        margin: 3px 0 !important;
        transition: 0.3s !important;
        border-radius: 2px !important;
    }
    
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        left: -100% !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding-top: 3rem !important;
        transition: left 0.3s ease !important;
        z-index: 9998 !important;
        display: flex !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
    
    .nav-menu li {
        margin: 1.5rem 0 !important;
        width: 80% !important;
    }
    
    .nav-menu a {
        font-size: 1.3rem !important;
        padding: 1.5rem !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-menu a:hover {
        background: rgba(239, 68, 68, 0.1) !important;
        color: #ef4444 !important;
    }
    
    /* Hero section mobile - TOUT RÉDUIRE */
    .hero {
        padding: 5rem 0.5rem 2rem !important;
        margin-top: 0 !important;
        text-align: center !important;
        min-height: auto !important;
    }
    
    .hero h1 {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        padding: 0 0.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0 1rem !important;
        line-height: 1.4 !important;
    }
    
    /* Hero features en colonne - PLUS COMPACT */
    .hero-features {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
        margin: 1.5rem 0 !important;
        padding: 0 0.5rem !important;
    }
    
    .feature-highlight-item {
        padding: 0.8rem 0.5rem !important;
        font-size: 0.7rem !important;
        text-align: center !important;
        min-height: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .feature-icon-3d {
        margin-bottom: 0.3rem !important;
        font-size: 1rem !important;
        transform: scale(0.8) !important;
    }
    
    /* Boutons hero - PLUS PETITS */
    .hero-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
        margin-top: 1.5rem !important;
        padding: 0 1rem !important;
    }
    
    .btn {
        width: 100% !important;
        max-width: 250px !important;
        padding: 0.8rem 1.5rem !important;
        font-size: 0.8rem !important;
        min-height: 44px !important;
        text-align: center !important;
    }
    
    /* App preview mobile - BEAUCOUP PLUS PETIT */
    .app-preview-3d {
        width: 90% !important;
        max-width: 280px !important;
        margin: 1.5rem auto !important;
        transform: scale(0.6) !important;
    }
    
    .app-window-3d {
        transform: rotateX(0deg) rotateY(0deg) scale(0.8) !important;
    }
    
    /* OFF Systems section - PLUS COMPACT */
    .systems-deactivation {
        padding: 2rem 0.5rem !important;
    }
    
    .deactivation-title {
        text-align: center !important;
        margin-bottom: 2rem !important;
    }
    
    .deactivation-title h3 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .deactivation-title p {
        font-size: 0.8rem !important;
        padding: 0 0.5rem !important;
    }
    
    .systems-flow {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    
    .system-unit {
        height: auto !important;
        min-height: 120px !important;
        padding: 1rem 0.8rem !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
    
    .system-name {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
        font-weight: bold !important;
    }
    
    .system-description {
        font-size: 0.7rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    .system-visual {
        height: 40px !important;
        margin: 0.8rem 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .cross-out {
        width: 30px !important;
        height: 30px !important;
    }
    
    .module-label {
        font-size: 0.6rem !important;
        margin: 0.5rem 0 0.3rem 0 !important;
        color: #06b6d4 !important;
    }
    
    .system-status {
        font-size: 0.6rem !important;
        margin-top: 0.3rem !important;
        font-weight: bold !important;
        color: #10b981 !important;
    }
    
    /* Demo section */
    .demo-section {
        padding: 4rem 1rem !important;
    }
    
    .demo-header {
        text-align: center !important;
        margin-bottom: 4rem !important;
    }
    
    .demo-header h2 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .demo-header p {
        font-size: 1rem !important;
        padding: 0 1rem !important;
    }
    
    .demo-showcase {
        grid-template-columns: 1fr !important;
        gap: 4rem !important;
    }
    
    .demo-item {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }
    
    .demo-content h3 {
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .demo-content p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
        padding: 0 0.5rem !important;
    }
    
    /* Trading chart */
    .trading-chart {
        width: 100% !important;
        max-width: 300px !important;
        height: 200px !important;
        margin: 0 auto !important;
        padding: 1rem !important;
    }
    
    .chart-header {
        margin-bottom: 1rem !important;
    }
    
    .chart-title {
        font-size: 0.9rem !important;
    }
    
    .chart-value {
        font-size: 1rem !important;
    }
    
    .chart-bars {
        gap: 1px !important;
    }
    
    .bar {
        width: 14px !important;
    }
    
    /* Database visualization */
    .database-visualization {
        padding: 2rem 1rem !important;
    }
    
    .database-core {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto !important;
    }
    
    /* Server Files section */
    .server-files {
        padding: 4rem 1rem !important;
    }
    
    .server-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        margin-bottom: 4rem !important;
    }
    
    .stat-item {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
    
    .server-interface {
        margin: 3rem 0 !important;
    }
    
    .search-filters {
        flex-direction: column !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .search-bar {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }
    
    .filter-buttons {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: center !important;
    }
    
    .filter-btn {
        padding: 0.8rem 1.2rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
    }
    
    .file-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .file-item {
        padding: 1.5rem !important;
    }
    
    .server-features {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        margin-top: 4rem !important;
    }
    
    /* Contact section */
    .contact {
        padding: 4rem 1rem !important;
    }
    
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }
    
    .contact-form {
        padding: 2rem !important;
    }
    
    .form-group {
        margin-bottom: 2rem !important;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 1rem !important;
        font-size: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Footer */
    .footer {
        padding: 3rem 1rem !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 3rem !important;
    }
    
    .footer-section h4 {
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-section ul li {
        margin-bottom: 1rem !important;
    }
    
    /* Désactiver les animations lourdes */
    .particles-container,
    .floating-elements,
    .hologram-container,
    .hologram-ring {
        display: none !important;
    }
    
    /* Optimiser les performances */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* Améliorer la lisibilité générale - TOUT PLUS PETIT */
    p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    h1 {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }
    
    /* Réduire TOUS les éléments */
    .demo-section {
        padding: 2rem 0.5rem !important;
    }
    
    .demo-item {
        padding: 1rem 0.5rem !important;
    }
    
    .trading-chart {
        width: 100% !important;
        max-width: 250px !important;
        height: 150px !important;
        margin: 0 auto !important;
        padding: 0.5rem !important;
    }
    
    .database-core {
        width: 150px !important;
        height: 150px !important;
        margin: 0 auto !important;
    }
    
    .server-files {
        padding: 2rem 0.5rem !important;
    }
    
    .contact {
        padding: 2rem 0.5rem !important;
    }
    
    .footer {
        padding: 1.5rem 0.5rem !important;
    }
    
    /* Réduire les marges partout */
    .demo-header {
        margin-bottom: 2rem !important;
    }
    
    .demo-showcase {
        gap: 2rem !important;
    }
    
    .server-stats {
        margin-bottom: 2rem !important;
    }
    
    .contact-content {
        gap: 1.5rem !important;
    }
    
    .footer-content {
        gap: 1.5rem !important;
    }
    
    /* Touch targets */
    .hamburger,
    .btn,
    .nav-menu a,
    .filter-btn,
    .stage-option,
    .file-item {
        min-height: 44px !important;
        min-width: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* CORRECTIONS POUR TRÈS PETITS ÉCRANS */
@media screen and (max-width: 480px) {
    /* Encore plus petit pour petits mobiles */
    .hero h1 {
        font-size: 1.2rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.7rem !important;
    }
    
    .feature-highlight-item {
        padding: 0.6rem 0.4rem !important;
        font-size: 0.6rem !important;
        min-height: 50px !important;
    }
    
    .btn {
        max-width: 200px !important;
        padding: 0.7rem 1rem !important;
        font-size: 0.7rem !important;
    }
    
    .app-preview-3d {
        transform: scale(0.5) !important;
        max-width: 250px !important;
    }
    
    .system-unit {
        min-height: 100px !important;
        padding: 0.8rem 0.6rem !important;
    }
    
    .system-name {
        font-size: 0.8rem !important;
    }
    
    .system-description {
        font-size: 0.6rem !important;
    }
    
    .trading-chart {
        max-width: 200px !important;
        height: 120px !important;
    }
    
    .database-core {
        width: 120px !important;
        height: 120px !important;
    }
    
    h2 {
        font-size: 1rem !important;
    }
    
    h3 {
        font-size: 0.9rem !important;
    }
    
    p {
        font-size: 0.7rem !important;
    }
}
