/* ===== SHOW.CSS - STYLES SPÉCIFIQUES AU PLANNING ===== */

/* ===== PLANNING SECTION ===== */
.planning-section {
    padding: 80px 0;
    background: #000000;
    position: relative;
    z-index: 3;
}

.planning-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    color: #ffffff;
    min-height: 80vh;
    width: 100%;
    margin: 0;
    max-width: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2);
    display: flex;
    flex-direction: column;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.planning-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    color: #000000;
    padding: 20px;
    text-align: center;
    position: relative;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.week-title {
    color: #000000;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.week-subtitle {
    color: rgba(0, 0, 0, 0.7);
    font-size: 14px;
}

.flash-info-btn {
    background: #dc143c;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flash-info-btn:hover {
    background: #8b0000;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.live-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
}

.date-selector {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    overflow: hidden;
    background: rgba(255, 215, 0, 0.05);
}

.date-button {
    min-width: 80px;
    padding: 12px 8px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    user-select: none;
}

.date-button:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.date-button.selected {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    color: #000000;
    border-color: #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    font-weight: bold;
}

.date-button.today {
    position: relative;
}

.date-button.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
}

.date-button.today.selected::after {
    background: #000000;
}

.weekday {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    opacity: 0.8;
}

.date-button.selected .weekday {
    color: #000000;
}

.day-number {
    font-size: 16px;
    font-weight: bold;
}

.now-playing {
    margin: 16px;
    padding: 12px;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.5);
    border-radius: 12px;
}

.now-playing-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.live-text {
    color: #ffd700;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.now-playing-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.now-playing-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.program-summary {
    margin: 16px;
    padding: 12px;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.summary-title {
    color: #ffd700;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
}

.summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.summary-tag {
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 6px;
}

.program-list {
    padding: 16px;
    flex: 1;
}

.program-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid;
    transition: all 0.3s;
}

.program-card:nth-child(even) {
    background: #1e1e1e;
}

.program-card:nth-child(odd) {
    background: #282828;
}

.program-card.current {
    background: rgba(0, 0, 139, 1) !important;
    border-color: #ffd700 !important;
    border-width: 1.5px;
}

.program-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid transparent;
}

.program-card.current .program-image {
    border-color: #ffd700;
}

.program-image-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 12px;
    border: 2px solid transparent;
}

.time-slot {
    padding: 8px;
    background: #1a1a1a;
    border-radius: 8px;
    color: #ffd700;
    font-weight: bold;
    font-size: 12px;
    min-width: 100px;
    text-align: center;
    margin-right: 16px;
}

.program-card.current .time-slot {
    background: rgba(255, 193, 7, 0.1);
}

.program-info {
    flex: 1;
}

.program-title {
    color: #ffffff;
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 4px;
}

.program-card.current .program-title {
    font-weight: bold;
}

.category-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.program-icon {
    margin-left: 8px;
    font-size: 20px;
}

.program-card.current .program-icon::before {
    content: '●';
    color: #fff;
    font-size: 14px;
}

/* Couleurs des catégories */
.category-concert { 
    background: rgba(220, 20, 60, 0.2); 
    color: #ff6b6b; 
    border: 1px solid rgba(220, 20, 60, 0.3);
}
.category-annees { 
    background: rgba(255, 215, 0, 0.2); 
    color: #ffd700; 
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.category-history { 
    background: rgba(138, 43, 226, 0.2); 
    color: #ba68c8; 
    border: 1px solid rgba(138, 43, 226, 0.3);
}
.category-special { 
    background: rgba(255, 140, 0, 0.2); 
    color: #ff8c00; 
    border: 1px solid rgba(255, 140, 0, 0.3);
}
.category-studio { 
    background: rgba(50, 205, 50, 0.2); 
    color: #32cd32; 
    border: 1px solid rgba(50, 205, 50, 0.3);
}

.program-card { border-color: rgba(129, 199, 132, 0.3); }
.program-card.category-concert { border-color: rgba(229, 115, 115, 0.3); }
.program-card.category-annees { border-color: rgba(100, 181, 246, 0.3); }
.program-card.category-history { border-color: rgba(186, 104, 200, 0.3); }
.program-card.category-special { border-color: rgba(255, 213, 79, 0.3); }

/* ===== FLASH INFO MODAL ===== */
.flash-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.flash-modal.show {
    display: flex;
}

.flash-info-content {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border: 2px solid #ffd700;
    padding: 20px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.flash-info-title {
    color: #ffd700;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: bold;
}

.flash-info-text {
    color: #fff;
    line-height: 1.6;
}

.flash-info-text p {
    margin-bottom: 10px;
}

.flash-info-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.flash-info-close:hover {
    color: #ffd700;
}

/* ===== RESPONSIVE PLANNING ===== */

/* Desktop et grands écrans */
@media (min-width: 1025px) {
    .planning-widget {
        max-height: none;
        min-height: 90vh;
    }
    
    .program-list {
        padding: 16px;
        flex: 1;
        max-height: none;
        overflow: visible;
    }
    
    .date-selector {
        justify-content: center;
        gap: 20px;
    }
    
    .date-button {
        min-width: 100px;
        padding: 12px 16px;
    }
}

/* Tablettes */
@media (max-width: 1024px) and (min-width: 769px) {
    .planning-header {
        padding: 10px !important;
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    .week-title {
        font-size: 13px !important;
        line-height: 1.2 !important;
        margin-bottom: 4px !important;
        word-wrap: break-word !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 5px !important;
        display: block !important;
    }
    
    .week-subtitle {
        font-size: 11px !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 5px !important;
        display: block !important;
    }
    
    .flash-info-btn {
        margin-top: 8px !important;
        font-size: 10px !important;
        padding: 6px 12px !important;
        flex-shrink: 0 !important;
    }
    
    .date-selector {
        gap: 8px;
        padding: 12px;
    }
    
    .date-button {
        min-width: 70px;
        padding: 10px 6px;
    }
    
    .weekday {
        font-size: 11px;
    }
    
    .day-number {
        font-size: 15px;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .planning-section {
        padding: 40px 0;
    }

    /* Container principal - SOLUTION CLÉE */
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .planning-widget {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 10px;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        
        /* S'assurer que le conteneur suit le flux normal */
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .planning-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }

    /* DATE SELECTOR - ÉVITER LA BARRE DE DÉFILEMENT */
    .date-selector {
        display: flex;
        justify-content: space-between;
        gap: 2px !important;
        padding: 12px 4px !important;
        overflow: hidden !important;
        background: rgba(255, 215, 0, 0.05);
        flex-wrap: nowrap;
    }
    
    .date-button {
        flex: 1 !important;
        min-width: 40px !important;
        max-width: none !important;
        padding: 8px 2px !important;
        font-size: 11px !important;
        margin: 0 !important;
    }
    
    .weekday {
        font-size: 9px !important;
        margin-bottom: 2px;
        line-height: 1;
    }
    
    .day-number {
        font-size: 13px !important;
        line-height: 1;
    }
    
    /* Program summary AVANT EN DIRECT */
    .program-summary {
        margin: 8px 8px !important;
        padding: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        box-sizing: border-box !important;
        order: 1 !important; /* S'affiche en premier */
    }
    
    /* EN DIRECT section APRÈS program-summary - CORRIGER LE POSITIONNEMENT */
    .now-playing {
        /* Réinitialiser tout positionnement */
        position: static !important; /* Pas de position absolute/fixed */
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        
        /* Layout normal */
        margin: 8px 8px !important;
        padding: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        display: block !important;
        
        /* S'assurer qu'il suit le flux normal */
        float: none !important;
        clear: both !important;
        
        /* Empêcher toute transformation qui pourrait le déplacer */
        transform: none !important;
        
        /* Dans le flux normal du document */
        order: 2 !important;
    }
    
    .now-playing-title {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: block !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin: 0 0 6px 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .now-playing-header {
        margin-bottom: 6px !important;
    }
    
    .now-playing-details {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    /* Program list APRÈS EN DIRECT */
    .program-list {
        padding: 5px 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        flex: 1;
        order: 3 !important; /* S'affiche en dernier */
    }
    
    /* Program cards */
    .program-card {
        margin: 0 8px 6px 8px !important;
        padding: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .time-slot {
        flex: 0 0 70px !important;
        margin-right: 8px !important;
        margin-bottom: 0;
        min-width: 70px !important;
        max-width: 70px !important;
        font-size: 10px !important;
        padding: 4px !important;
    }

    .program-image,
    .program-image-placeholder {
        flex: 0 0 45px !important;
        width: 45px !important;
        height: 45px !important;
        margin-right: 8px !important;
        margin-bottom: 0;
    }
    
    .program-info {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 130px) !important;
        overflow: hidden !important;
    }
    
    .program-title {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        margin-bottom: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .flash-info-content {
        max-width: 95%;
        margin: 20px;
        padding: 15px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .container {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    
    .planning-widget {
        margin: 0 !important;
    }
    
    .date-button {
        padding: 6px 1px !important;
        min-width: 40px !important;
    }
    
    .weekday {
        font-size: 8px !important;
    }
    
    .day-number {
        font-size: 12px !important;
    }
    
    .now-playing,
    .program-summary {
        padding: 6px 3px !important;
    }
    
    .program-card {
        padding: 6px 3px !important;
    }
    
    .now-playing-title {
        font-size: 12px !important;
    }
    
    .program-title {
        font-size: 11px !important;
    }
    
    .program-info {
        max-width: calc(100% - 115px) !important;
    }
    
    .time-slot {
        flex: 0 0 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        font-size: 9px !important;
    }
    
    .program-image,
    .program-image-placeholder {
        width: 40px !important;
        height: 40px !important;
    }
}