/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Header moderne */
.header {
    background: rgba(35, 31, 32, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.header .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.header .logo {
    max-height: 60px;
    transition: transform 0.3s ease;
}

.header .logo:hover {
    transform: scale(1.05);
}

.header-title {
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(66, 153, 225, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(66, 153, 225, 0.3);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #48bb78;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Weather Bar - Compact et discret */
.weather-bar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.weather-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.weather-item-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-icon-compact {
    font-size: 2rem;
    width: 45px;
    text-align: center;
}

.weather-icon-compact.temp {
    color: #f5576c;
}

.weather-icon-compact.pressure {
    color: #4facfe;
}

.weather-icon-compact.wind {
    color: #43e97b;
}

.weather-icon-compact.humidity {
    color: #764ba2;
}

.weather-info-compact {
    flex: 1;
}

.weather-label-compact {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.weather-value-compact {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
}

.btn-graph-compact {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    display: inline-block;
}

.btn-graph-compact:hover {
    background: rgba(79, 172, 254, 0.3);
    border-color: #4facfe;
}

/* Webcam Pills - Horizontal */
.webcam-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cam-pill {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.cam-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4299e1, #667eea);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cam-pill:hover {
    border-color: #4299e1;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(66, 153, 225, 0.3);
}

.cam-pill:hover::before {
    transform: scaleX(1);
}

.cam-pill.active {
    background: rgba(66, 153, 225, 0.15);
    border-color: #4299e1;
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.2);
}

.cam-pill.active::before {
    transform: scaleX(1);
}

.cam-pill-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cam-pill-info {
    flex: 1;
}

.cam-pill-name {
    font-weight: 600;
    font-size: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.cam-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cam-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
    aspect-ratio: 16/9;
}

.viewer-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

/* Controls */
.control-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

.control-btn.active {
    background: #4299e1;
    border-color: #4299e1;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
}

/* Footer */
.info-footer {
    text-align: center;
    margin-top: 2rem;
}

.info-footer .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-footer .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.2rem;
    }

    .cam-pill {
        min-width: 100%;
    }

    .webcam-selector {
        flex-direction: column;
    }

    .control-buttons {
        flex-direction: column;
    }

    .control-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Timeline Slider */
.timeline-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

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

.timeline-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #4facfe;
}

.timeline-slider-wrapper {
    position: relative;
    width: 100%;
}

.timeline-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    transition: background 0.2s;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4facfe;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
    transition: transform 0.2s;
    margin-top: -7px;
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.timeline-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* POI Styles */
#poi-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.poi-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    background: rgba(233, 69, 96, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    transition: transform 0.2s ease, background 0.2s, border-color 0.2s;
}

.poi-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
    background: rgba(233, 69, 96, 1);
    border-color: #fff;
    color: #fff;
    z-index: 25;
}