/**
 * ACTION DE GRÂCE - Interface Broadcast Professionnelle
 * Design moderne et harmonisé
 */

/* === VARIABLES & PALETTE === */
:root {
    /* Couleurs principales */
    --bg-primary: #1a1a1a;      /* Fond principal */
    --bg-secondary: #252525;     /* Players */
    --bg-instant: #1f1f1f;       /* Instant player */
    --bg-darker: #0f0f0f;        /* Éléments sombres */
    
    /* Nouvelles variables radio professionnelles */
    --bg-main: #1a1a1a;
    --bg-panel: #3a3a3a;
    --bg-dark: #2a2a2a;
    --led-cyan: #00ffdd;
    --led-green: #00ff00;
    --led-red: #ff0000;
    --led-amber: #ffaa00;
    --led-blue: #0099ff;
    --btn-metal: linear-gradient(180deg, #7a7a7a 0%, #5a5a5a 50%, #3a3a3a 100%);
    --btn-metal-active: linear-gradient(180deg, #5a5a5a 0%, #3a3a3a 50%, #2a2a2a 100%);
    --text-light: #e0e0e0;
    --border-dark: #2a2a2a;
    --border-light: #5a5a5a;
    
    /* Accent principal */
    --accent-green: #00ff9f;     /* Action de Grâce */
    --accent-green-dim: rgba(0, 255, 159, 0.2);
    
    /* Textes */
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-dim: #666666;
    
    /* États */
    --status-ready: #666666;
    --status-onair: #00ff9f;
    --status-pause: #ffaa00;
    --status-error: #ff6b6b;
    
    /* Bordures */
    --border-subtle: #333333;
    
    /* Ombres */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-glow-green: 0 0 20px rgba(0, 255, 159, 0.3);
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === LAYOUT PRINCIPAL === */
.broadcast-container {
    display: grid;
    grid-template-areas:
        "header header header"
        "playerA playerB timeline"
        "instant instant timeline";
    grid-template-columns: 300px 300px 1fr;
    grid-template-rows: 60px 1fr 80px;
    gap: 20px;
    height: 100vh;
    padding: 20px;
    background: var(--bg-primary);
}

/* === HEADER === */
.header-section {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    height: 60px;
}

.app-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-green);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 255, 159, 0.5);
}

.global-time {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 36px;
    font-weight: 300;
    color: white;
    letter-spacing: 1px;
}

.global-status {
    display: flex;
    gap: 30px;
    align-items: center;
}

.retard-indicator, .statut-indicator {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.retard-indicator {
    color: var(--status-error);
}

.retard-indicator span {
    color: var(--text-primary);
    font-weight: 700;
}

.statut-indicator {
    color: #ffd93d;
}

.statut-indicator span {
    color: var(--text-primary);
    font-weight: 700;
}

/* === PLAYERS A & B === */
.player-container {
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid var(--border-dark);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
}

/* PLAYER ACTIF - TRÈS VISIBLE */
.player-container.is-playing {
    border: 3px solid #00ff9f;
    background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 100%);
    box-shadow: 0 0 50px rgba(0, 255, 159, 0.5),
                0 8px 16px rgba(0,0,0,0.6),
                inset 0 0 30px rgba(0, 255, 159, 0.1);
    transform: scale(1.02);
    animation: playing-pulse 2s ease-in-out infinite;
}

@keyframes playing-pulse {
    0%, 100% {
        box-shadow: 0 0 50px rgba(0, 255, 159, 0.5),
                    0 8px 16px rgba(0,0,0,0.6),
                    inset 0 0 30px rgba(0, 255, 159, 0.1);
    }
    50% {
        box-shadow: 0 0 80px rgba(0, 255, 159, 0.8),
                    0 12px 24px rgba(0,0,0,0.7),
                    inset 0 0 50px rgba(0, 255, 159, 0.2);
    }
}

/* Indicateur ON AIR animé */
.player-container.is-playing::before {
    content: '🔴 ON AIR';
    position: absolute;
    top: -15px;
    right: 20px;
    background: linear-gradient(90deg, #ff0000, #ff3333);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    animation: on-air-blink 1.5s ease-in-out infinite;
    z-index: 10;
}

@keyframes on-air-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 40px rgba(255, 0, 0, 1);
    }
}

.player-a { grid-area: playerA; }
.player-b { grid-area: playerB; }

.player-container:hover {
    border-color: var(--border-light);
}

.player-container.active {
    border-color: var(--led-cyan);
    box-shadow: 0 0 20px rgba(0,255,221,0.3);
}

/* Header du player */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.player-header h3 {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #1a1a1a;
    color: #666;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.status-badge.on-air {
    background: #2a4a2a;
    color: var(--led-green);
    text-shadow: 0 0 5px currentColor;
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.ready {
    background: #1a1a1a;
    color: #666;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

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

/* Display du player */
.player-display {
    background: #000;
    border-radius: 5px;
    padding: 15px;
    border: 3px solid #2a2a2a;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
    position: relative;
}

/* Effet scanlines pour LED Display */
.player-display::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,255,221,0.02) 2px,
        rgba(0,255,221,0.02) 4px
    );
    pointer-events: none;
    border-radius: 5px;
}

.player-time {
    font-family: 'Courier New', monospace;
    font-size: 32px;
    font-weight: bold;
    color: var(--led-cyan);
    margin-bottom: 8px;
    letter-spacing: 3px;
    text-align: center;
    text-shadow: 0 0 10px currentColor;
}

.player-title {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--led-amber);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-green);
    width: 0%;
    transition: width 0.3s linear;
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
}

/* Contrôles du player */
.player-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 15px 0;
}

/* === TIMELINE SECTION === */
.timeline-section {
    grid-area: timeline;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-add-files {
    background: linear-gradient(180deg, #00aa66 0%, #008844 50%, #006633 100%);
    border: 2px solid #00ff9f;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 255, 159, 0.3);
}

.btn-add-files:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 255, 159, 0.5);
}

.btn-add-files:active {
    transform: translateY(0);
}

.timeline-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

.next-break {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.break-label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.break-time {
    color: var(--status-error);
    font-weight: 700;
}

.break-client {
    color: var(--text-primary);
    font-weight: 600;
}

.playlist-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
    margin-top: 10px;
}

/* === INSTANT PLAYER === */
.instant-player {
    grid-area: instant;
    background: var(--bg-instant);
    border-radius: 12px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--border-subtle);
}

.instant-player h3 {
    color: var(--accent-green);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    min-width: 140px;
}

.instant-drop-zone {
    border: 2px dashed #444;
    border-radius: 5px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    min-height: 60px;
    flex: 1;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.instant-drop-zone:hover {
    border-color: var(--led-cyan);
    color: var(--text-secondary);
    background: rgba(0, 255, 221, 0.05);
}

.instant-drop-zone.dragover {
    border-color: var(--led-cyan);
    background-color: rgba(0,255,221,0.1);
    box-shadow: inset 0 0 20px rgba(0,255,221,0.2);
    color: var(--led-cyan);
}

.instant-display {
    flex: 1;
    padding: 0 20px;
}

.instant-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.instant-time {
    font-family: 'SF Mono', monospace;
    color: var(--text-secondary);
    font-size: 14px;
}

.instant-controls {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

/* === BOUTONS MODERNISÉS === */
.player-controls button,
.instant-controls button {
    width: 50px;
    height: 50px;
    background: var(--btn-metal);
    border: 2px solid var(--border-dark);
    border-radius: 5px;
    font-size: 20px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

/* Hover et active states pour boutons */
.player-controls button:hover,
.instant-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.6);
}

.player-controls button:active,
.instant-controls button:active {
    transform: translateY(1px);
    background: var(--btn-metal-active);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5), inset 0 1px 3px rgba(0,0,0,0.5);
}

/* Styles des boutons */
.btn-play, .btn-instant-play {
    background: linear-gradient(180deg, #4a7a4a 0%, #2a5a2a 50%, #1a4a1a 100%);
}

.btn-pause {
    background: linear-gradient(135deg, #4a9eff, #2b7fd8);
}

.btn-stop, .btn-instant-stop {
    background: linear-gradient(180deg, #7a4a4a 0%, #5a2a2a 50%, #4a1a1a 100%);
}

.btn-next, .btn-instant-eject {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* LED glow sur les boutons de contrôle */
.btn-control {
    width: 60px;
    height: 60px;
    background: var(--btn-metal);
    border: 2px solid var(--border-dark);
    border-radius: 8px;
    color: #ddd;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.1s;
    font-size: 24px;
}

.btn-control:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.6);
}

.btn-control:active {
    transform: translateY(1px);
    background: var(--btn-metal-active);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5), inset 0 1px 3px rgba(0,0,0,0.5);
}

/* Bouton PLAY - TRÈS GROS et TRÈS VISIBLE */
.btn-control.btn-play {
    width: 90px;
    height: 90px;
    font-size: 42px;
    background: linear-gradient(180deg, #00dd88 0%, #00bb66 50%, #009944 100%);
    border: 3px solid #00ff9f;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 255, 159, 0.4),
                0 4px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: pulse-subtle 3s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 255, 159, 0.4),
                    0 4px 8px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 159, 0.6),
                    0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

.btn-control.btn-play:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 0 50px rgba(0, 255, 159, 0.8),
                0 8px 16px rgba(0, 0, 0, 0.5);
}

.btn-control.btn-pause {
    width: 70px;
    height: 70px;
    font-size: 32px;
    background: linear-gradient(180deg, #ffaa00 0%, #ff8800 50%, #ff6600 100%);
    border-color: #ffaa00;
}

.btn-control.btn-stop {
    width: 70px;
    height: 70px;
    font-size: 32px;
    background: linear-gradient(180deg, #aa3333 0%, #882222 50%, #661111 100%);
    border-color: #ff6666;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* === IMPORT MODAL === */
.import-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.import-overlay.hidden {
    display: none;
}

.import-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    max-width: 500px;
    width: 90%;
}

.import-modal h2 {
    color: var(--accent-green);
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.import-dropzone {
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.import-dropzone:hover {
    border-color: var(--accent-green);
    background: rgba(0, 255, 159, 0.05);
}

.import-dropzone.active {
    border-color: var(--accent-green);
    background: rgba(0, 255, 159, 0.1);
}

.import-icon {
    color: var(--text-dim);
    margin-bottom: 20px;
}

.import-text {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

.import-subtext {
    color: var(--text-dim);
    font-size: 14px;
}

.btn-import-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
}

.btn-import-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* === UTILITAIRES === */
.hidden {
    display: none !important;
}

/* === ÉTATS DISABLED === */
.player-container.disabled {
    opacity: 0.5;
    filter: grayscale(0.8);
    pointer-events: none;
}

.player-container.disabled .player-display {
    background: #1a1a1a;
}

.player-container.disabled .player-time {
    color: #444;
    text-shadow: none;
}

.player-container.disabled .player-title {
    color: #444;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.broadcast-container > * {
    animation: fadeIn 0.6s ease-out backwards;
}

.header-section { animation-delay: 0.1s; }
.player-a { animation-delay: 0.2s; }
.player-b { animation-delay: 0.3s; }
.timeline-section { animation-delay: 0.4s; }
.instant-player { animation-delay: 0.5s; }

/* === CONDUCTEUR COMPACT === */
.conducteur-header {
    display: grid;
    grid-template-columns: 80px 1fr 80px 80px 40px;
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Ligne d'élément compact */
.timeline-item {
    display: grid;
    grid-template-columns: 80px 1fr 80px 80px 40px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
    font-size: 13px;
    transition: all 0.2s;
    cursor: pointer;
    min-height: 32px;
}

.timeline-item:hover {
    background: rgba(255,255,255,0.05);
}

/* Colonne heure */
.item-time {
    color: #888;
    font-family: 'SF Mono', monospace;
    font-size: 12px;
}

/* Colonne titre */
.item-title {
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

/* Colonne catégorie */
.item-category {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
}

/* Colonne durée */
.item-duration {
    color: #888;
    font-family: 'SF Mono', monospace;
    font-size: 12px;
}

/* Bouton chain compact */
.chain-toggle {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chain-toggle:hover {
    opacity: 1;
}

/* États visuels */
.timeline-item.now-playing {
    background: rgba(0, 255, 159, 0.1);
    border-left: 3px solid var(--accent-green);
    padding-left: 9px;
}

.timeline-item.now-playing .item-title {
    color: var(--accent-green);
    font-weight: 600;
}

.timeline-item.next-to-play {
    background: rgba(255, 152, 0, 0.05);
}

/* === STYLES PUBLICITÉ === */

/* Style pour les placeholders publicitaires */
.timeline-item[data-type="AD_PLACEHOLDER"],
.timeline-item.type-ad_placeholder,
.timeline-item.type-pub {
    background: linear-gradient(135deg, #ff6b35, #ff8e53) !important;
    border-left: 4px solid #ff4500;
    color: white;
}

.timeline-item[data-type="AD_PLACEHOLDER"] .item-title,
.timeline-item.type-ad_placeholder .item-title,
.timeline-item.type-pub .item-title {
    color: white;
    font-weight: bold;
}

.timeline-item[data-type="AD_PLACEHOLDER"] .item-time,
.timeline-item.type-ad_placeholder .item-time,
.timeline-item.type-pub .item-time {
    color: #ffe0d6;
}

.timeline-item[data-type="AD_PLACEHOLDER"] .item-category,
.timeline-item.type-ad_placeholder .item-category,
.timeline-item.type-pub .item-category {
    color: #ffe0d6;
}

.timeline-item[data-type="AD_PLACEHOLDER"] .item-duration,
.timeline-item.type-ad_placeholder .item-duration,
.timeline-item.type-pub .item-duration {
    color: #ffe0d6;
}

/* Icône pour les publicités */
.timeline-item[data-type="AD_PLACEHOLDER"]::before,
.timeline-item.type-ad_placeholder::before,
.timeline-item.type-pub::before {
    content: "📺 ";
    position: absolute;
    left: 8px;
    font-size: 14px;
}

/* Animation pulse pour pub en cours */
.timeline-item[data-type="AD_PLACEHOLDER"].now-playing,
.timeline-item.type-ad_placeholder.now-playing,
.timeline-item.type-pub.now-playing {
    animation: pubPulse 2s infinite;
    border-left: 4px solid #ff4500;
}

@keyframes pubPulse {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5); 
        transform: translateX(0);
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
        transform: translateX(2px);
    }
}

/* === DRAG & DROP STYLES === */

.timeline-item.dragging {
    opacity: 0.5;
    cursor: move;
}

.timeline-item.drag-over-top {
    border-top: 3px solid #00ff9f;
    padding-top: 7px;
}

.timeline-item.drag-over-bottom {
    border-bottom: 3px solid #00ff9f;
    padding-bottom: 7px;
}

/* === INDICATEUR CUE POINT === */

.cue-point-indicator {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(255, 0, 0, 0.3);
    animation: cueGlow 2s ease-in-out infinite;
    cursor: help;
    vertical-align: middle;
}

@keyframes cueGlow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(255, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
    }
}

.timeline-item:hover .cue-point-indicator {
    animation: cueGlow 0.5s ease-in-out infinite;
}

/* === DÉCOMPTE PUBLICITÉ === */

.pub-countdown-container {
    position: fixed;
    top: 70px;
    right: 20px;
    background: linear-gradient(135deg, #ff4500, #ff6b35);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 69, 0, 0.3);
    display: none;
    z-index: 1000;
    min-width: 250px;
}

.pub-countdown-container.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.pub-countdown-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.pub-countdown-time {
    font-size: 32px;
    font-weight: bold;
    font-family: 'SF Mono', monospace;
    text-align: center;
    margin: 10px 0;
}

.pub-countdown-title {
    font-size: 14px;
    opacity: 0.9;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* États d'alerte du countdown */
.pub-countdown-container.warning {
    background: linear-gradient(135deg, #ff8e53, #ffaa00);
    animation: warningPulse 1s infinite;
}

.pub-countdown-container.critical {
    background: linear-gradient(135deg, #ff0000, #ff4500);
    animation: criticalPulse 0.5s infinite;
}

@keyframes warningPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes criticalPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* === STYLES BLOCS D'INFORMATION === */

/* Style pour les blocs d'information dans le conducteur */
.timeline-item[data-type="JOURNAL"],
.timeline-item[data-type="NEWS"],
.timeline-item[data-type="CHRONIQUE"],
.timeline-item[data-type="METEO"],
.timeline-item[data-type="BLOC_INFO"],
.timeline-item.block-element {
    background: linear-gradient(135deg, #2196F3, #64B5F6) !important;
    border-left: 4px solid #1976D2;
    color: white;
}

.timeline-item.block-element .item-title,
.timeline-item.block-element .item-time,
.timeline-item.block-element .item-category,
.timeline-item.block-element .item-duration {
    color: white;
}

/* Icône pour les blocs */
.timeline-item.block-element::before,
.timeline-item[data-type="JOURNAL"]::before,
.timeline-item[data-type="NEWS"]::before {
    content: "🎙️ ";
    position: absolute;
    left: 8px;
    font-size: 14px;
}

/* Animation handoff */
.timeline-item.block-element.handoff {
    background: linear-gradient(135deg, #4CAF50, #81C784) !important;
    animation: blockHandoff 2s infinite;
}

@keyframes blockHandoff {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
        transform: translateX(0);
    }
    50% { 
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
        transform: translateX(2px);
    }
}

/* === DÉCOMPTE BLOC D'INFORMATION === */

.block-countdown-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: 'SF Mono', 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    z-index: 1000;
    display: none;
    min-width: 300px;
}

.block-countdown-container.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.block-countdown-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.block-countdown-time {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.block-countdown-title {
    font-size: 14px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.block-countdown-status {
    font-size: 11px;
    text-transform: uppercase;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: inline-block;
}

/* États du décompte bloc */
.block-countdown-container.warning {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    animation: blockWarning 2s infinite;
}

.block-countdown-container.overtime {
    background: linear-gradient(135deg, #F44336, #EF5350);
    animation: blockOvertime 1s infinite;
}

@keyframes blockWarning {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

@keyframes blockOvertime {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ANCIENS STYLES pour compat */
.playlist-item {
    display: none;
}

/* === RESPONSIVE === */
@media (max-width: 1400px) {
    .broadcast-container {
        grid-template-columns: 280px 280px 1fr;
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 1200px) {
    .app-title {
        font-size: 24px;
    }
    
    .global-time {
        font-size: 28px;
    }
    
    .player-time {
        font-size: 24px;
    }
}

/* === SPACEBAR CONTROL INDICATOR === */
.spacebar-indicator {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    margin-left: 10px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* État actif */
.spacebar-indicator.active {
    background: linear-gradient(135deg, #00ff9f 0%, #00cc7f 100%);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
}

/* État désactivé */
.spacebar-indicator.disabled {
    background: #444;
    color: #888;
    opacity: 0.7;
}

/* Animation de déclenchement */
.spacebar-indicator.triggered {
    animation: spacebar-pulse 0.3s ease;
    background: #00ff00 !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6) !important;
}

/* Animation d'erreur */
.spacebar-indicator.error {
    animation: spacebar-shake 0.3s ease;
    background: #ff4444 !important;
    color: #fff !important;
}

@keyframes spacebar-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes spacebar-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Tooltip au survol */
.spacebar-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 15px rgba(0, 255, 159, 0.4);
}

.spacebar-indicator.active:hover::after {
    content: "Shift+Space pour désactiver";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: tooltip-fade 0.3s forwards;
}

.spacebar-indicator.disabled:hover::after {
    content: "Shift+Space pour activer";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: tooltip-fade 0.3s forwards;
}

@keyframes tooltip-fade {
    to { opacity: 1; }
}

/* === TIMELINE CONTROLS === */
.timeline-controls {
    display: flex;
    gap: 10px;
}

.btn-add-marker {
    background: linear-gradient(180deg, #ff9900 0%, #ff7700 50%, #ff5500 100%);
    border: 2px solid #ffaa00;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-add-marker:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 170, 0, 0.4);
    border-color: #ffcc00;
}

.btn-add-marker:active {
    transform: translateY(0);
}

/* === MARQUEUR TEMPOREL === */
.timeline-item.time-marker {
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.2) 0%, transparent 100%);
    border-left: 3px solid #ffaa00;
    font-weight: bold;
}

.timeline-item.time-marker .marker-time {
    color: #ffaa00;
    font-weight: bold;
}

.timeline-item.time-marker .marker-title {
    color: #ffaa00;
    text-align: center;
    letter-spacing: 2px;
    font-size: 11px;
}

/* Marqueur en retard */
.timeline-item.marker-late {
    background: linear-gradient(90deg, rgba(255, 100, 100, 0.2) 0%, transparent 100%);
    border-left: 3px solid #ff6666;
}

.timeline-item.marker-late .marker-time {
    color: #ff6666;
}

/* Marqueur en avance */
.timeline-item.marker-early {
    background: linear-gradient(90deg, rgba(0, 255, 159, 0.2) 0%, transparent 100%);
    border-left: 3px solid #00ff9f;
}

.timeline-item.marker-early .marker-time {
    color: #00ff9f;
}

/* Affichage du décalage */
.marker-delay {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin: 0 5px;
}

.delay-late {
    background: rgba(255, 100, 100, 0.3);
    color: #ff6666;
}

.delay-early {
    background: rgba(0, 255, 159, 0.3);
    color: #00ff9f;
}

/* === ITEM CONTROLS === */
.item-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
}

.btn-delete {
    background: transparent;
    border: none;
    color: #ff6666;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.btn-delete:hover {
    opacity: 1;
    background: rgba(255, 102, 102, 0.2);
    transform: scale(1.1);
}

.btn-delete:active {
    transform: scale(0.95);
}

/* Ajuster la grille pour les contrôles */
.conducteur-header {
    grid-template-columns: 80px 1fr 80px 80px 80px;
}

.timeline-item {
    grid-template-columns: 80px 1fr 80px 80px 80px;
}

/* Animation de suppression */
@keyframes item-remove {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.timeline-item.removing {
    animation: item-remove 0.3s ease forwards;
}