/* Styles personnalisés pour WebRadio Player */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Layout général */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Styles pour la page d'accueil */
.feature-item {
    text-align: center;
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.display-4 {
    font-weight: 700;
}

/* ===== MODERN AUDIO PLAYER STYLES ===== */

/* Lecteur audio moderne */
.modern-audio-player {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
    background: #000000;
    border: 2px solid var(--primary-color);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Header du player */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background-color: #10B981;
}

.status-dot.offline {
    background-color: #EF4444;
}

.status-text {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: #1e1b09;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Titre de la radio */
.radio-title {
    text-align: center;
    margin-bottom: 16px;
}

.radio-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* Égaliseur animé */
.equalizer-container {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 4px;
    margin-bottom: 24px;
    height: 64px;
    padding: 16px 8px;
}

.equalizer-bar {
    width: 6px;
    background: var(--primary-color);
    border-radius: 2px;
    min-height: 8px;
    animation: equalizerPulse 0.8s infinite ease-in-out;
    transform-origin: bottom;
}

@keyframes equalizerPulse {
    0%, 100% { 
        transform: scaleY(1);
    }
    25% { 
        transform: scaleY(1.8);
    }
    50% { 
        transform: scaleY(0.5);
    }
    75% { 
        transform: scaleY(1.3);
    }
}

/* Section pochette */
.cover-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.cover-container {
    position: relative;
    width: 176px;
    height: 176px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

.play-btn {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.9;
    z-index: 10;
}

.play-btn:hover {
    transform: translateX(-50%) scale(1.05);
    opacity: 1;
}

/* Info piste */
.track-info {
    text-align: center;
    padding: 0 16px;
}

.track-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 14px;
    color: #ffffff;
    opacity: 0.8;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contrôle de volume */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.volume-icon {
    color: var(--primary-color);
    font-size: 24px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-track {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.volume-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 70%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.2s ease;
}

.volume-thumb {
    position: absolute;
    top: 50%;
    left: 70%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 2px solid #000000;
    border-radius: 50%;
}

.volume-value {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
    min-width: 32px;
}

/* Section onglets */
.tabs-section {
    margin-bottom: 12px;
}

.tab-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: space-between;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.tab-btn.active {
    background: var(--primary-color);
    color: #000000;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
}

.tab-content {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
}

.tab-placeholder {
    color: #ffffff;
    opacity: 0.7;
    font-style: italic;
}

/* ===== MODERN COLOR PICKERS ===== */

.modern-color-picker {
    margin-bottom: 24px;
}

.color-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.color-picker-container {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
    min-height: 56px;
}

.color-picker-container:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    transform: translateY(-1px);
}

.color-preview {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.color-icon {
    color: var(--primary-color);
    font-size: 18px;
}

.color-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.dropdown-icon {
    color: #6c757d;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.color-picker-container:hover .dropdown-icon {
    transform: rotate(180deg);
}

.hidden-color-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* ===== MODERN SAVE BUTTON ===== */

.modern-save-btn {
    position: relative;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.modern-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0056b3, var(--primary-color));
}

.modern-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.modern-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.modern-save-btn:hover .btn-glow {
    left: 100%;
}

.modern-save-btn .fas {
    font-size: 16px;
}

.modern-save-btn span {
    position: relative;
    z-index: 1;
}

/* Indicateur de statut */
.status-indicator {
    display: flex;
    align-items: center;
}

.status-indicator i {
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Formulaires */
.form-control-color {
    max-width: 60px;
    padding: 0.375rem 0.25rem;
}

.input-group .form-control-color + .form-control {
    border-left: none;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 2rem;
}

/* Boutons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
    border: none;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease;
}

/* Toast personnalisés */
.toast {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .audio-player-container {
        min-height: 250px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .feature-item {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
    
    .audio-player {
        max-width: 280px;
    }
}

/* Styles pour les contrôles de couleur */
.color-input-group {
    position: relative;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Loading states */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    margin-top: auto;
}

/* Navigation active states */
.navbar-nav .nav-link.active {
    font-weight: 600;
    color: rgba(255, 255, 255, 1) !important;
}

/* Custom scrollbar pour les textarea */
textarea {
    resize: vertical;
}

textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
