/* ====================================
   ZIKA - STYLE UNIFORME
   ==================================== */

:root {
    /* Couleurs Zika */
    --zika-bg: #0a0a0a;
    --zika-card: #1a1a1a;
    --zika-border: #2a2a2a;
    --zika-green: #00ff00;
    --zika-white: #ffffff;
    --zika-gray: #808080;
    --zika-red: #ff0033;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--zika-bg) !important;
    color: var(--zika-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1;
    width: 100%;
    padding: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--zika-white);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    color: var(--zika-gray);
}

a {
    color: var(--zika-green);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: var(--zika-white);
}

/* Header */
.zika-header {
    background: transparent;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.header-logo img {
    height: 28px;
    width: auto;
}

.header-logo span {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--zika-white);
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--zika-white);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.nav-link:hover {
    color: var(--zika-green);
}

.nav-link.active {
    color: var(--zika-green);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-section:hover {
    background: var(--zika-border);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--zika-green);
}

.user-name {
    color: var(--zika-white);
    font-weight: 500;
    font-size: 0.95rem;
}

.login-btn {
    background: transparent;
    border: 2px solid var(--zika-green);
    color: var(--zika-green);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.login-btn:hover {
    background: var(--zika-green);
    color: #000000;
}

/* Feed Header Icons */
.feed-header-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feed-header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-header-icon-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    transform: scale(1.1);
}

/* Pastille rouge sur icône tags dans header */
.feed-icon-tags-header .feed-tags-indicator,
.feed-header-icon-btn .feed-tags-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: #ff0033;
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    animation: pulse 2s infinite;
    z-index: 10;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Barre recherche full header */
.header-search-full {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0 2rem;
}

.header-search-back,
.header-search-clear {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-back:hover,
.header-search-clear:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-search-input-full {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
}

.header-search-input-full:focus {
    outline: none;
    border-color: #00ff00;
    background: rgba(255, 255, 255, 0.08);
}

.header-search-input-full::placeholder {
    color: #808080;
}

/* Cards */
.card {
    background: var(--zika-card);
    border: 1px solid var(--zika-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s;
}

.card:hover {
    border-color: var(--zika-green);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--zika-white);
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--zika-card);
    border: 1px solid var(--zika-border);
    border-radius: 8px;
    color: var(--zika-white);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-select {
    background: #000000;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--zika-green);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--zika-gray);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--zika-red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 0, 51, 0.1);
    border-radius: 6px;
    border: 1px solid var(--zika-red);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--zika-green);
    color: #000000;
}

.btn-primary:hover {
    background: #00cc00;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--zika-white);
    border: 2px solid var(--zika-border);
}

.btn-secondary:hover {
    border-color: var(--zika-green);
    color: var(--zika-green);
}

.btn-danger {
    background: var(--zika-red);
    color: var(--zika-white);
}

.btn-danger:hover {
    background: #cc0029;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner.hidden {
    display: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--zika-border);
    border-top-color: var(--zika-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.popup-overlay.hidden {
    display: none;
}

.popup-content {
    background: var(--zika-card);
    border: 1px solid var(--zika-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: popupIn 0.3s ease-out;
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--zika-gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.popup-close:hover {
    color: var(--zika-white);
    background: var(--zika-border);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--zika-white);
}

.text-gray {
    color: var(--zika-gray);
}

.text-green {
    color: var(--zika-green);
}

.text-red {
    color: var(--zika-red);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--zika-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--zika-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--zika-border);
}

/* Responsive */
@media (max-width: 1024px) {
    .header-content {
        padding: 0.75rem 1rem;
    }
    
    .header-nav {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
    
    #main-content {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem;
    }
    
    .header-logo img {
        height: 24px;
    }
    
    .header-logo span {
        font-size: 1.1rem;
    }
    
    .header-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    
    .user-avatar {
        width: 26px;
        height: 26px;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .login-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    #main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.6rem 0.5rem;
        gap: 0;
        flex-wrap: nowrap;
    }
    
    .header-logo {
        gap: 0.4rem;
        flex-shrink: 0;
    }
    
    .header-logo img {
        height: 20px;
    }
    
    .header-logo span {
        font-size: 0.95rem;
    }
    
    .header-nav {
        gap: 0.15rem;
        flex: 1;
        justify-content: center;
        padding: 0 0.25rem;
    }
    
    .nav-link {
        font-size: 0.7rem;
        padding: 0.4rem 0.35rem;
        white-space: nowrap;
        font-weight: 600;
    }
    
    .user-section {
        padding: 0.25rem;
        gap: 0;
        flex-shrink: 0;
    }
    
    .user-avatar {
        width: 26px;
        height: 26px;
        border-width: 1.5px;
    }
    
    .user-name {
        display: none;
    }
    
    .login-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }
}

/* Responsive Extra Small (très petits écrans) */
@media (max-width: 360px) {
    .header-content {
        padding: 0.5rem 0.3rem;
    }
    
    .header-logo img {
        height: 18px;
    }
    
    .header-logo span {
        font-size: 0.85rem;
    }
    
    .header-nav {
        gap: 0.1rem;
    }
    
    .nav-link {
        font-size: 0.65rem;
        padding: 0.35rem 0.25rem;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .login-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
    }
}

/* Notification Badges */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff0033;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid var(--zika-bg);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-link-wrapper,
.bottom-nav-btn-wrapper {
    position: relative;
    display: inline-block;
}

/* Badge messages non lus */
.unread-badge-messages {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff0033;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid var(--zika-bg);
    animation: badgePulse 2s infinite;
}

/* Position du badge pour nav-link messages */
.nav-link-messages {
    position: relative;
}

.nav-link-messages .unread-badge-messages {
    top: 2px;
    right: -8px;
}

/* Position du badge pour bottom nav */
.bottom-nav-btn {
    position: relative;
}

.bottom-nav-btn .unread-badge-messages {
    top: 4px;
    right: 8px;
}

/* Profile Responsive */
.profile-info-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .profile-container {
        padding: 1rem !important;
        margin: 1rem auto !important;
    }
    
    /* Header responsive mobile */
    .profile-header-responsive {
        flex-direction: row !important;
        align-items: center !important;
        gap: 1rem !important;
    }
    
    .profile-header-responsive > div:first-child {
        flex-shrink: 0;
    }
    
    .profile-info-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .profile-edit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .profile-header-responsive img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .profile-header-responsive h1 {
        font-size: 1.2rem !important;
    }
    
    .profile-stats {
        justify-content: flex-start !important;
        margin-top: 0.5rem !important;
    }
    
    .profile-tabs > div {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-tabs .btn {
        padding: 0.6rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    /* Cards musique responsive */
    .music-card {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .profile-header-responsive img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .profile-header-responsive h1 {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }
    
    .profile-stats {
        flex-direction: row !important;
        gap: 1.5rem !important;
    }
    
    .profile-tabs .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    .grid-3 {
        grid-template-columns: 1fr !important;
    }
}

/* Music Cards */
.music-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.music-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 255, 0, 0.2);
}

.music-card-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.music-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay .play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #00ff00;
    border: none;
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.play-overlay .play-btn:hover {
    transform: scale(1.1);
}

.music-card-info {
    padding: 1rem;
}

.music-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-card-artist {
    font-size: 0.85rem;
    color: #808080;
    margin: 0 0 0.75rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #808080;
}

.music-card-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Login Info Popup */
.login-info-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.15), rgba(0, 255, 0, 0.05));
    border-top: 2px solid var(--zika-green);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 2500;
    backdrop-filter: blur(10px);
    animation: slideUpFade 0.5s ease-out;
}

@keyframes slideUpFade {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-info-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.login-info-content i {
    color: var(--zika-green);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.login-info-text {
    color: var(--zika-white);
    font-size: 0.95rem;
    line-height: 1.5;
}

.login-info-text strong {
    color: var(--zika-green);
    font-weight: 600;
}

.login-info-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--zika-white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.login-info-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Responsive Login Info Popup */
@media (max-width: 768px) {
    .login-info-popup {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        bottom: 70px;
        border-radius: 12px 12px 0 0;
    }
    
    .login-info-content {
        width: 100%;
    }
    
    .login-info-content i {
        font-size: 1.2rem;
    }
    
    .login-info-text {
        font-size: 0.9rem;
    }
    
    .login-info-close {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .login-info-popup {
        padding: 1rem 0.75rem;
        bottom: 65px;
    }
    
    .login-info-content {
        gap: 0.75rem;
    }
    
    .login-info-content i {
        font-size: 1.1rem;
    }
    
    .login-info-text {
        font-size: 0.85rem;
    }
    
    .login-info-close {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}
