/* ==================== VARIABLES & RÉINITIALISATION ==================== */
:root {
    --primary-color: #FF6B35;
    --secondary-color: #800020; /* Grenat */
    --secondary-dark: #5a0016;
    --accent-color: #FFD166;
    --dark-bg: #1A1A1A;
    --light-bg: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-dark: #2D3436;
    --text-light: #FFFFFF;
    --text-muted: #636E72;
    --border-color: #E9ECEF;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}

/* ==================== UTILITAIRES ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-block;
    padding: 16px 36px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff8c61 100%);
    color: var(--text-light);
    box-shadow: 0 10px 20px -5px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(255, 107, 53, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* ==================== HEADER & NAVIGATION ==================== */
.header {
    background-color: var(--secondary-color);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    color: var(--text-light);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active::after {
    width: 100%;
}

/* ==================== MAIN CONTENT ==================== */
.main {
    min-height: calc(100vh - 200px);
}

.section {
    display: none;
    padding: 5rem 0;
    animation: fadeIn 0.6s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
    text-align: center;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ==================== HERO SECTION ==================== */
.hero {
    text-align: center;
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--text-light);
    margin-top: -80px;
    margin-bottom: 0;
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 10%),
                      radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 10%);
    pointer-events: none;
}

.hero h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero h2::after {
    display: none;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-player {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-player h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.hero-player .player-container {
    margin: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero .btn-primary {
    background: var(--text-light);
    color: var(--secondary-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero .btn-primary:hover {
    background: var(--accent-color);
    color: var(--text-dark);
    transform: translateY(-3px) scale(1.05);
}

/* ==================== FILTRES ==================== */
.filters {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 3.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px;
}

.filter-btn {
    padding: 14px 32px;
    border: none;
    background: var(--card-bg);
    color: var(--text-muted);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.filter-btn span {
    position: relative;
    z-index: 1;
}

.filter-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    color: var(--secondary-color);
}

.filter-btn.active {
    background: var(--secondary-color);
    color: var(--text-light);
    box-shadow: 0 8px 25px rgba(128, 0, 32, 0.4);
    transform: translateY(-2px);
}

.filter-btn.active:hover {
    box-shadow: 0 12px 30px rgba(128, 0, 32, 0.5);
    transform: translateY(-4px);
}

/* ==================== GRID DES ÉPISODES ==================== */
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.episode-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative;
}

.episode-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.episode-thumbnail {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #2c3e50, #4ca1af); /* Fallback gradient */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
}

/* Gradient spécifique selon le type */
.episode-card[data-type="video"] .episode-thumbnail {
    background: linear-gradient(135deg, var(--secondary-color), #2c000b);
}

.episode-card[data-type="audio"] .episode-thumbnail {
    background: linear-gradient(135deg, #1a1a1a, #333);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audio-wave {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
}

.audio-wave span {
    display: block;
    width: 6px;
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    animation: wave 1.2s ease-in-out infinite;
}

.audio-wave span:nth-child(1) { animation-delay: 0.0s; height: 40%; }
.audio-wave span:nth-child(2) { animation-delay: 0.2s; height: 70%; }
.audio-wave span:nth-child(3) { animation-delay: 0.4s; height: 100%; }
.audio-wave span:nth-child(4) { animation-delay: 0.2s; height: 70%; }
.audio-wave span:nth-child(5) { animation-delay: 0.0s; height: 40%; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.audio-icon {
    font-size: 2rem;
    color: var(--text-light);
    z-index: 2;
}

/* Modal Audio Player */
.audio-player-wrapper {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.audio-visualizer-large {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
    position: relative;
}

.audio-wave.large {
    height: 80px;
    gap: 8px;
}

.audio-wave.large span {
    width: 10px;
    background: var(--primary-color);
}

.audio-icon-large {
    font-size: 4rem;
    color: var(--text-light);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.player-container.audio-mode {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.player-container.audio-mode audio {
    height: 50px;
    border-radius: 25px;
}

.episode-thumbnail::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.1);
    transition: var(--transition);
}

.episode-card:hover .episode-thumbnail::after {
    background: rgba(0,0,0,0);
}

.episode-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.episode-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.episode-type {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(128, 0, 32, 0.1);
    color: var(--secondary-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.episode-number {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.episode-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.episode-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.episode-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
}

.btn-small {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-small:first-child {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
}

.btn-small:first-child:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background-color: rgba(128, 0, 32, 0.05);
}

.btn-small:last-child {
    background: linear-gradient(135deg, var(--secondary-color), #5a0016);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(128, 0, 32, 0.2);
}

.btn-small:last-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(128, 0, 32, 0.3);
    background: linear-gradient(135deg, var(--primary-color), #e65100);
}

/* ==================== SECTION À PROPOS ==================== */
.about-content {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.about-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background-color: var(--secondary-color);
}

.about-content h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.about-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==================== FORMULAIRE DE CONTACT ==================== */
.contact-form {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--light-bg);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.1);
}

.contact-form .btn {
    width: 100%;
    margin-top: 1rem;
}

/* ==================== LIENS SOCIAUX ==================== */
.social-links {
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--card-bg);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2vh auto;
    padding: 0;
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 95%;
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-height: 96vh;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from { transform: translateY(50px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
}

.close:hover {
    background: var(--secondary-color);
    color: var(--text-light);
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-header-custom {
    padding: 2.5rem 2.5rem 1.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02), transparent);
}

.modal-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.modal-header-custom h3 {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.modal-meta {
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    font-weight: 500;
}

.player-container {
    margin: 0;
    background: #000;
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-container iframe,
.player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-description {
    padding: 2rem 2.5rem 3rem;
    background-color: var(--card-bg);
}

.modal-description h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    max-width: 800px;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--secondary-color);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 2rem;
    text-align: center;
    margin-top: 5rem;
}

.footer p {
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 550px) {
    .header {
        padding: 0.8rem 0;
        background: var(--secondary-color);
    }

    .header .container {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .nav ul {
        gap: 1.2rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .hero {
        padding: 6rem 0 2rem;
        border-radius: 0 0 30px 30px;
    }

    .hero h2 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        padding: 0 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .hero-player {
        margin: 0 0 2rem;
        padding: 0.5rem;
        border-radius: 12px;
    }

    .section {
        padding: 3rem 0;
    }

    .section h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .episodes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-header-custom {
        padding: 1.5rem;
    }

    .modal-description {
        padding: 1.5rem;
    }

    .close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    /* Filtres défilants sur mobile */
    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        margin: 0 -1rem 2rem;
        padding: 0 1rem 1rem;
    }

    .filters::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .episode-content {
        padding: 1.25rem;
    }

    .episode-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .episode-actions button {
        width: 100%;
        padding: 12px;
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }

    /* Ajustements spécifiques pour les écrans type Pixel 7 Pro / iPhone Max */
    .container {
        padding: 0 20px;
    }
    
    .filters {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
}
