/* ============================================
   RESPONSIVE ENHANCEMENTS
   Améliorations pour tous les écrans
   ============================================ */

/* ============================================
   MOBILE FIRST - Extra Small (320px - 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Header responsive */
    header .header-right {
        flex-direction: column;
        gap: 8px !important;
    }

    .notification-toggle-btn {
        width: 100%;
        font-size: 12px;
        padding: 8px 12px;
    }

    .notification-toggle-btn span {
        display: none;
    }

    .notification-toggle-btn i {
        margin: 0;
    }

    /* Progress header */
    #progressHeader {
        display: none !important; /* Cacher sur très petit écran */
    }

    /* Tool cards */
    .tool-card-modern {
        padding: 16px !important;
    }

    .tool-icon-large {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
    }

    .tool-title {
        font-size: 16px !important;
    }

    .tool-description {
        font-size: 13px !important;
    }

    /* Badge grid */
    .badge-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
        gap: 12px !important;
    }

    .badge-item {
        padding: 12px 8px !important;
    }

    .badge-icon {
        font-size: 24px !important;
    }

    .badge-name {
        font-size: 10px !important;
    }

    /* Stats cards */
    .stats-card-modern {
        padding: 16px !important;
    }

    .stats-value {
        font-size: 24px !important;
    }

    .stats-label {
        font-size: 11px !important;
    }

    /* Process page header */
    header[style*="position: fixed"] {
        padding: 12px 16px !important;
    }

    header[style*="position: fixed"] > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
    }

    header[style*="position: fixed"] .header-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================
   SMALL DEVICES (481px - 768px)
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    .notification-toggle-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .tool-card-modern {
        padding: 20px;
    }

    .badge-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    #progressHeader {
        min-width: 200px;
    }
}

/* ============================================
   TABLET (769px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .tool-card-modern {
        padding: 24px;
    }

    .badge-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ============================================
   TOUCH DEVICES
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Améliorer les zones tactiles */
    .notification-toggle-btn,
    .tool-card-modern,
    .badge-item,
    button,
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Désactiver les effets hover sur mobile */
    .tool-card-modern:hover {
        transform: none;
    }

    .tool-card-modern:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.15);
    }

    .badge-item:active {
        transform: scale(0.95);
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    header[style*="position: fixed"] {
        padding: 8px 16px !important;
    }

    .process-page {
        padding-top: 80px !important;
    }

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

/* ============================================
   HIGH DPI DISPLAYS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tool-icon-large,
    .badge-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   DARK MODE SUPPORT (si jamais ajouté)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Déjà en dark mode par défaut */
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .notification-toggle-btn,
    header,
    .badge-item,
    .tool-card-modern {
        display: none !important;
    }
}
