/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

/* Réinitialisation et styles de base */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--body-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #0a58ca;
    text-decoration: none;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

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

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

/* En-tête */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern.png') repeat;
    opacity: 0.1;
    pointer-events: none;
}

/* Cartes */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.card-body {
    flex: 1;
    padding: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* Boutons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Liste des médias */
.media-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.media-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.media-item:last-child {
    border-bottom: none;
}

.media-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.media-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
}

.media-link:hover {
    color: var(--primary-color);
}

.media-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.media-content {
    flex: 1;
}

.media-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.media-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Lecteur audio/vidéo */
.media-player {
    width: 100%;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.media-player audio,
.media-player video {
    width: 100%;
    outline: none;
}

.media-player-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
}

.media-player-body {
    padding: 1.5rem;
}

.media-player-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.media-player-meta {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Grille des médias */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.media-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background-color: var(--card-bg);
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.media-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.media-card-body {
    padding: 1.25rem;
}

.media-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Pied de page */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact i {
    width: 20px;
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 3rem;
    text-align: center;
    color: #adb5bd;
    font-size: 0.875rem;
}

/* Page de détail */
.media-detail {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.media-detail-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.media-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.media-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.media-detail-body {
    padding: 1.5rem;
}

.media-detail-description {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.media-detail-player {
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 575.98px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .media-card-img {
        height: 200px;
    }
    
    .media-detail-title {
        font-size: 1.5rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Utilitaires */
.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.shadow-sm {
    box-shadow: var(--box-shadow) !important;
}

/* Personnalisation du lecteur audio */
audio::-webkit-media-controls-panel {
    background-color: var(--primary-color);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    background-color: white;
    border-radius: 50%;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: white;
}

/* Personnalisation de la barre de défilement */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}
