/* The Art Newspaper Style CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Header - The Art Newspaper style */
.header {
    background: #000;
    color: #fff;
    padding: 20px 0;
    border-bottom: 3px solid #e60012;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: -1px;
}

.date {
    font-size: 14px;
    color: #ccc;
}

/* Article header */
.article-header {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.category {
    color: #e60012;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.main-title {
    font-size: 42px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #000;
}

.subtitle {
    font-size: 20px;
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
}

.byline {
    font-size: 14px;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Interactive map section */
.map-section {
    background: #f8f8f8;
    border: 1px solid #ddd;
    padding: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
    border-bottom: 2px solid #e60012;
    padding-bottom: 10px;
}

/* Controls */
.controls {
    margin-bottom: 30px;
}

.controls h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    padding: 8px 16px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    background: #000;
    color: #fff;
}

button.active {
    background: #e60012;
    color: #fff;
    border-color: #e60012;
}

/* External controls */
.external-controls {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Map container - CORRIGÉ avec heatmap à gauche */
.map-container {
    background: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    position: relative;
    height: 550px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#france-map {
    width: 100%;
    height: 100%;
    max-width: 500px;
    max-height: 500px;
    position: relative;
    margin-left: 240px; /* Espace pour la heatmap à gauche */
}

#france-map svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

/* Sidebar */
.sidebar {
    background: #fff;
    border: 1px solid #ddd;
    padding: 30px;
    height: fit-content;
}

.info-box h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000;
}

#region-info {
    font-size: 14px;
    line-height: 1.5;
}

#region-info h4 {
    color: #e60012;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Heatmap styling - REPOSITIONNÉE À GAUCHE */
#heatmap-container {
    position: absolute !important;
    top: 50% !important;
    left: -50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid #999 !important;
    border-radius: 0 !important;
    padding: 12px !important;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2) !important;
    width: 200px !important;
    max-height: 450px !important;
    font-family: Georgia, serif !important;
    font-size: 11px !important;
    z-index: 100 !important;
    overflow-y: auto !important;
}

#heatmap-container h4 {
    font-size: 12px !important;
    font-weight: bold !important;
    color: #000 !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Article text */
.article-text {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.article-text p {
    margin-bottom: 20px;
}

.article-text h2 {
    font-size: 24px;
    font-weight: bold;
    margin: 30px 0 15px 0;
    color: #000;
}

/* Debug panel styling */
.debug-panel {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 15px;
    margin-top: 20px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.debug-panel h4 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid #ccc;
    width: 90%;
    max-width: 600px;
    position: relative;
    font-family: Georgia, serif;
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #e60012;
}

#modal-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
    padding-right: 60px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.stat-row:last-of-type {
    border-bottom: none;
}

.stat-row span {
    color: #666;
}

.stat-row strong {
    color: #000;
    font-weight: bold;
}

.correlation-box {
    background: #e60012;
    color: white;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.correlation-box strong {
    font-size: 18px;
    display: block;
    margin-bottom: 10px;
}

.correlation-box small {
    font-size: 14px;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
    
    .map-container {
        height: 400px;
    }
    
    #france-map {
        margin-left: 0; /* Pas de marge sur mobile */
    }
    
    #heatmap-container {
        position: relative !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        max-height: 200px !important;
        margin-bottom: 15px !important;
        font-size: 10px !important;
    }
}