/* styles.css - Styles pour la page replaysai.php */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.breadcrumb-text {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.search-input {
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 16px;
    background: transparent;
    width: 300px;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Navigation Styles */
.category-nav {
    margin-bottom: 40px;
}

.nav-tabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link, .plus-btn {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 20px;
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    min-width: unset;
    max-width: 100%;
    text-decoration: none;
}

.plus-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
    margin-left: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.plus-btn:focus {
    outline: 2px solid #764ba2;
}

.nav-item.active .nav-link {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-link:hover {
    color: #667eea;
    background: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.2);
}

/* Grid Styles */
.emissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.emission-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.emission-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.emission-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.emission-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.emission-card:hover .emission-image img {
    transform: scale(1.1);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.emission-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    font-size: 24px;
    color: #667eea;
    margin-left: 3px;
}

.emission-info {
    padding: 20px;
    background: white;
}

.emission-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.emission-category {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    padding: 4px 12px;
    background: #f8f9fa;
    border-radius: 15px;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .breadcrumb-text {
        font-size: 20px;
        text-align: center;
    }
    
    .search-container {
        justify-content: center;
    }
    
    .search-input {
        width: 250px;
    }
    
    .nav-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 8px;
    }
    
    .nav-link {
        padding: 10px 18px;
        white-space: nowrap;
    }
    
    .emissions-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .emission-image {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 200px;
        font-size: 14px;
    }
    
    .emissions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-tabs {
        gap: 5px;
    }
    
    .nav-link {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emission-card {
    animation: fadeInUp 0.6s ease-out;
}

.emission-card:nth-child(even) {
    animation-delay: 0.1s;
}

.emission-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Loading States */
.emission-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
}

.emission-image img {
    position: relative;
    z-index: 2;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Content Header */
.content-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.content-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-indicator {
    font-size: 18px;
    font-weight: 400;
    color: #667eea;
}

.clear-search {
    color: #e74c3c;
    text-decoration: none;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.clear-search:hover {
    color: #c0392b;
    transform: scale(1.1);
}

.content-subtitle {
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}

/* Navigation avec icônes */
.nav-link i {
    margin-right: 8px;
    font-size: 14px;
}

/* Overlays vidéo */
.video-duration, .video-views {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 3;
    backdrop-filter: blur(10px);
}

.video-duration {
    bottom: 15px;
    left: 15px;
}

.video-views {
    bottom: 15px;
    right: 60px;
}

/* Badges colorés */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
}

.badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
}

.badge-musique {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

.badge-emission {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.badge-debat {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.badge-default {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
}

/* Description des émissions */
.emission-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
    margin: 8px 0;
}

/* Métadonnées des émissions */
.emission-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
    font-size: 13px;
    color: #6c757d;
}

.emission-category, .emission-presenter {
    display: flex;
    align-items: center;
    gap: 6px;
}

.emission-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #95a5a6;
    margin: 10px 0;
}

/* Cards cliquables */
.emission-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.emission-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.emission-card:active {
    transform: translateY(-4px) scale(0.98);
}

/* Modal d'informations vidéo */
.video-info-modal h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    line-height: 1.6;
}

.video-details {
    margin: 20px 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item i {
    color: #667eea;
    width: 20px;
}

.modal-actions {
    text-align: center;
    margin-top: 25px;
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-watch:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Actions des émissions */
.emission-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-play {
    flex: 1;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-info {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.btn-info:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Messages d'état */
.no-content, .no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.no-content i, .no-results i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-content h3, .no-results h3 {
    font-size: 24px;
    color: #495057;
    margin-bottom: 10px;
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

/* Formulaire de recherche */
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Animation de chargement des images */
.emission-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.emission-image img.loaded {
    opacity: 1;
}

/* Custom Scrollbar */
.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.nav-tabs::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
}

/* Responsive pour les nouveaux éléments */
@media (max-width: 768px) {
    .content-title {
        font-size: 22px;
        flex-direction: column;
        gap: 5px;
    }
    
    .search-indicator {
        font-size: 16px;
    }
    
    .emission-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-info {
        align-self: center;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 200px;
        font-size: 14px;
    }
    
    .emissions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .dropdown-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .emission-title {
        font-size: 14px;
        min-height: 35px;
    }
    
    .emission-actions {
        gap: 6px;
    }
}

/* Navigation avec icônes */
.nav-link i, .dropdown-toggle i:first-child {
    margin-right: 6px;
    font-size: 14px;
}

/* Custom Scrollbar pour navigation mobile */
.nav-container::-webkit-scrollbar {
    height: 4px;
}

.nav-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.nav-container::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.nav-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emission-card {
    animation: fadeInUp 0.6s ease-out;
}

.emission-card:nth-child(even) {
    animation-delay: 0.1s;
}

.emission-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Loading States */
.emission-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
}

.emission-image img {
    position: relative;
    z-index: 2;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Modal Plus Catégories */
.plus-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(40, 40, 60, 0.45);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
}

.plus-modal.show,
.plus-modal[style*="display: block"] {
    display: flex !important;
}

.plus-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px 24px 24px;
    min-width: 320px;
    max-width: 95vw;
    max-height: 70vh;
    box-shadow: 0 12px 40px rgba(102,126,234,0.18);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
}

.plus-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-plus-modal {
    position: absolute;
    top: 18px;
    right: 24px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}
.close-plus-modal:hover {
    color: #e74c3c;
}

.plus-modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 45vh;
}

.plus-modal-item {
    margin-bottom: 8px;
}

.plus-modal-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
    background: #f8f9fa;
    transition: background 0.2s, color 0.2s;
}

.plus-modal-item.active .plus-modal-link,
.plus-modal-link:hover {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
}

@media (max-width: 600px) {
    .plus-modal-content {
        min-width: 90vw;
        padding: 18px 8px 12px 8px;
    }
    .plus-modal-title {
        font-size: 18px;
    }
    .plus-modal-link {
        font-size: 15px;
        padding: 10px 10px;
    }
}