/* ====================================
   ZIKA - COMPOSANTS STARTUP MODERNES
   ==================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-lg);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.btn-icon:hover {
    background: var(--bg-hover);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

/* Music Card */
.music-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.music-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.music-card-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.music-card-cover-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.music-card-info {
    padding: var(--space-lg);
}

.music-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-card-artist {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.music-card-stats {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.music-card-stats span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none; /* Fix: désactiver les événements par défaut */
}

.music-card:hover .play-overlay {
    opacity: 1;
    pointer-events: auto; /* Réactiver au hover */
}

.play-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Toujours cliquable */
    position: relative;
    z-index: 10; /* Au-dessus des autres éléments */
}

.play-btn:hover {
    transform: scale(1.1);
}

/* Competition Card */
.competition-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.competition-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.competition-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.competition-content {
    padding: var(--space-xl);
}

.competition-status {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-ongoing {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-upcoming {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-finished {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

/* Profile Card */
.profile-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: var(--transition);
}

.profile-card:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.profile-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.profile-type {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.tag {
    padding: 0.375rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Horizontal Scroll Container */
.scroll-container {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    padding: var(--space-md) 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-card) transparent;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.scroll-item {
    flex: 0 0 280px;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #00ff00;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 0, 0.3);
    border-radius: var(--radius-lg);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #00ff00;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: var(--space-sm);
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-lg);
}

.popup-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: popupIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.popup-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-lg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 0;
}

/* Upload Form */
.upload-form {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.type-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.type-btn {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    color: #808080;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.type-btn:hover {
    border-color: #00ff00;
    color: #00ff00;
}

.type-btn.active {
    background: #00ff00;
    border-color: #00ff00;
    color: #000000;
    font-weight: 600;
}

.file-upload-area {
    border: 2px dashed #2a2a2a;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-area:hover {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.05);
}

/* Fix iOS - Inputs file non grisés */
.file-upload-area input[type="file"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    opacity: 0 !important;
    background: transparent;
    filter: alpha(opacity=0);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #808080;
}

.upload-placeholder svg {
    color: #808080;
}

.upload-placeholder p {
    margin: 0;
    font-weight: 500;
    color: #ffffff;
}

.upload-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    width: 100%;
}

.upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.audio-file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #2a2a2a;
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

.audio-file-info div {
    text-align: left;
}

.audio-file-info p {
    margin: 0;
    font-weight: 500;
    color: #ffffff;
}

.audio-file-info span {
    font-size: 0.85rem;
    color: #808080;
}

.remove-file {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #ff0033;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-file:hover {
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #00ff00;
    color: #000000;
}

.btn-primary:hover {
    background: #00cc00;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #2a2a2a;
}

.btn-secondary:hover {
    border-color: #00ff00;
    color: #00ff00;
}

/* Unread Messages Badge */
.unread-badge-messages {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff0033 0%, #cc0028 100%);
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.4);
    animation: pulse-badge 2s infinite;
    z-index: 10;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 0, 51, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 0, 51, 0.6);
    }
}

/* Badge pour desktop - dans nav-link */
.nav-link-messages {
    position: relative;
}

.nav-link-messages .unread-badge-messages {
    top: -6px;
    right: -10px;
}

/* Badge pour mobile - dans bottom-nav */
.bottom-nav-btn {
    position: relative;
}

.bottom-nav-btn .unread-badge-messages {
    top: 8px;
    right: 8px;
}
