/* ====================================
   ZIKA - RESPONSIVE DESIGN
   ==================================== */

/* ====================================
   BOTTOM NAVIGATION - MOBILE (Style App)
   ==================================== */

/* Bottom Nav - Caché sur desktop */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(11, 11, 13, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: transparent;
    border: none;
    color: #808080;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    flex: 1;
}

.bottom-nav-btn i {
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.bottom-nav-btn span {
    font-size: 0.7rem;
    font-weight: 500;
}

.bottom-nav-btn.active {
    color: var(--primary-red);
}

.bottom-nav-btn.active i {
    transform: scale(1.1);
}

/* Badge messages non lus */
.unread-badge-messages {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ff0033;
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    animation: pulse 2s infinite;
}

/* Burger menu - Masqué complètement */
.burger-menu {
    display: none !important;
}

/* Tablet - 768px et moins */
@media (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Input File Audio - Style amélioré mobile */
    .audio-file-input {
        width: 100%;
        padding: 1rem;
        background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), rgba(0, 255, 0, 0.05));
        border: 2px dashed rgba(0, 255, 0, 0.3);
        border-radius: 12px;
        color: #fff;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .audio-file-input::-webkit-file-upload-button {
        background: linear-gradient(135deg, #00ff00, #00dd00);
        color: #000;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    }
    
    .audio-file-input:active {
        transform: scale(0.98);
        border-color: rgba(0, 255, 0, 0.6);
    }
    
    /* Header */
    .header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .header-logo h1 {
        font-size: 1.5rem;
    }
    
    /* Masquer la navigation desktop */
    .header-nav {
        display: none;
    }
    
    /* Afficher la bottom navigation */
    .bottom-nav {
        display: flex;
    }
    
    /* Ajuster le padding du main content pour le header sticky et la bottom nav */
    #main-content {
        padding: 70px var(--spacing-sm) 100px var(--spacing-sm);
    }
    
    /* Garder le username visible sur mobile */
    .user-section {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .user-name {
        font-size: 0.9rem;
        display: block;
    }
    
    .header-nav.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(11, 11, 13, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Search Bar */
    .search-container {
        margin: var(--spacing-md) auto;
    }
    
    .search-bar {
        padding: var(--spacing-sm);
        font-size: 0.95rem;
    }
    
    /* Section Headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    /* Scroll Container */
    .scroll-item {
        flex: 0 0 220px;
    }
    
    /* Cards */
    .card {
        padding: var(--spacing-sm);
    }
    
    .music-card-info {
        padding: var(--spacing-sm);
    }
    
    .music-card-title {
        font-size: 1rem;
    }
    
    .music-card-artist {
        font-size: 0.85rem;
    }
    
    /* Profile Card */
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    /* Profile Page Mobile */
    .profile-header {
        flex-direction: column;
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }
    
    .profile-photo-section {
        width: 100%;
        justify-content: center;
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Bouton caméra profil - bien visible sur mobile */
    .profile-header-responsive .btn-icon {
        position: absolute;
        bottom: -5px;
        right: -5px;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        padding: 0 !important;
        font-size: 0.9rem !important;
        border-radius: 50% !important;
        background: #00ff00 !important;
        color: #000 !important;
        border: 2px solid #0a0a0a !important;
        box-shadow: 0 2px 8px rgba(0, 255, 0, 0.3) !important;
    }
    
    .profile-info-section {
        width: 100%;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .stat-item {
        min-width: 80px;
    }
    
    .profile-actions {
        width: 100%;
        justify-content: center;
    }
    
    .profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .profile-tab {
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.95rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    /* Footer */
    #footer {
        padding: var(--spacing-md);
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    /* Popup */
    .popup-content {
        padding: var(--spacing-md);
        max-height: 80vh;
    }
}

/* Mobile - 480px et moins */
@media (max-width: 480px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Header */
    .header {
        padding: var(--spacing-sm);
    }
    
    .header-logo h1 {
        font-size: 1.25rem;
    }
    
    .header-logo img {
        height: 32px;
    }
    
    /* Section Title */
    .section-title {
        font-size: 1.25rem;
    }
    
    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Scroll Items */
    .scroll-item {
        flex: 0 0 180px;
    }
    
    /* Music Card */
    .music-card-title {
        font-size: 0.95rem;
    }
    
    .music-card-artist {
        font-size: 0.8rem;
    }
    
    .music-card-stats {
        font-size: 0.75rem;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Profile Avatar */
    .profile-avatar {
        width: 70px;
        height: 70px;
    }
    
    /* Form Elements */
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 0.95rem;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    /* Card Actions */
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions .btn {
        width: 100%;
    }
}

/* ====================================
   LAPTOP - 769px à 1199px
   ==================================== */
@media (min-width: 769px) and (max-width: 1199px) {
    /* Header optimisé laptop */
    .header-content {
        max-width: 100%;
        padding: 1rem 1.5rem;
    }
    
    .header-nav {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 0.9rem;
    }
    
    /* Main content adapté */
    #main-content {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    /* Grids optimisées pour laptop */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    /* Scroll items laptop */
    .scroll-item {
        flex: 0 0 240px;
    }
    
    /* Cards musique */
    .music-card {
        max-width: 100%;
    }
    
    .music-card-info {
        padding: 1rem;
    }
    
    .music-card-title {
        font-size: 0.95rem;
    }
    
    .music-card-artist {
        font-size: 0.85rem;
    }
    
    /* Profile laptop */
    .profile-header {
        padding: 1.5rem;
    }
    
    .profile-photo {
        width: 90px;
        height: 90px;
    }
    
    .profile-stats {
        gap: 1.5rem;
    }
    
    .stat-item {
        min-width: 90px;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Cards générales */
    .card {
        padding: 1.5rem;
    }
    
    /* Typography adaptée */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.85rem; }
    h3 { font-size: 1.5rem; }
    
    /* Search bar */
    .search-container {
        max-width: 700px;
        margin: 1.5rem auto;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.95rem;
        padding: 0.7rem 1.75rem;
    }
    
    /* Popup laptop */
    .popup-content {
        max-width: 650px;
        padding: 2rem;
    }
    
    /* Feed layout */
    .feed-container {
        max-width: 100%;
        padding: 1rem;
    }
    
    /* Profile tabs laptop */
    .profile-tabs {
        gap: 1rem;
    }
    
    .profile-tab {
        min-width: 110px;
        font-size: 0.95rem;
        padding: 0.7rem 1.25rem;
    }
}

/* Desktop Large - 1200px et plus */
@media (min-width: 1200px) {
    /* Main Content */
    #main-content {
        padding: var(--spacing-lg);
    }
    
    /* Section Title */
    .section-title {
        font-size: 2rem;
    }
    
    /* Scroll Items */
    .scroll-item {
        flex: 0 0 320px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .nav-btn,
    .btn-icon {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .music-card:hover .play-overlay {
        opacity: 0;
    }
    
    /* Show play overlay on cards by default on touch */
    .music-card .play-overlay {
        opacity: 0.8;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: var(--spacing-xs) var(--spacing-md);
    }
    
    .header-logo img {
        height: 30px;
    }
    
    #main-content {
        padding: var(--spacing-sm);
    }
    
    .popup-content {
        max-height: 85vh;
    }
}

/* Print Styles */
@media print {
    .header-nav,
    .search-container,
    #footer,
    .popup-overlay,
    .loading-spinner {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (si besoin futur) */
@media (prefers-color-scheme: dark) {
    /* Le site est déjà en dark mode par défaut */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #ff0033;
        --text-white: #ffffff;
        --text-gray: #cccccc;
    }
    
    .card,
    .form-input,
    .form-textarea,
    .form-select {
        border-width: 2px;
    }
}
