/* Layout fullscreen avec carte à gauche et infos à droite */

.page-carte-regions {
    display: flex;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Container de la carte - 60% de la largeur */
#map-container {
    flex: 0 0 60%;
    height: 100%;
    position: relative;
    min-width: 0;
}

/* Panneau d'information à droite - 40% de la largeur */
.sidebar-info {
    flex: 0 0 40%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

/* Header du sidebar */
.sidebar-header {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-header h1 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.sidebar-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 14px;
}

/* Search box */
.search-box {
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Region info panel */
#region-info-panel {
    padding: 30px;
    flex: 1;
}

.default-info {
    text-align: center;
    padding: 60px 20px;
}

.default-info h2 {
    color: #1e293b;
    font-size: 24px;
    margin-bottom: 15px;
}

.default-info p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

/* Card région sélectionnée */
.region-selected-card {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.region-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.region-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.region-desc {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Stats */
.region-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

/* Bouton voir fichier */
.btn-voir-fichier {
    display: block;
    width: 100%;
    padding: 16px 24px;
    text-align: center;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-voir-fichier:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

/* Bouton reset */
.btn-reset {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #f8fafc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Détails de la région */
.region-details {
    animation: slideIn 0.3s ease-out;
}

.region-details h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 0;
}

.region-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.stat-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.stat-badge .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-badge .stat-text {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-buttons .btn {
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.action-buttons .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.action-buttons .btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.action-buttons .btn-secondary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    text-decoration: none;
    color: #667eea;
}

/* Stats globales en bas */
.sidebar-stats {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stats-grid .stat-item {
    background: white;
    padding: 15px;
}

.stats-grid .stat-value {
    font-size: 20px;
}

.stats-grid .stat-label {
    font-size: 11px;
}

/* Description texte */
.sidebar-description {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-description h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-description p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-info {
        flex: 0 0 45%;
    }
    
    #map-container {
        flex: 0 0 55%;
    }
}

@media (max-width: 768px) {
    .page-carte-regions {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    #map-container {
        width: 100%;
        height: 500px;
        min-height: 500px;
        flex: none;
        order: 1;
    }
    
    .sidebar-info {
        width: 100%;
        flex: none;
        box-shadow: none;
        order: 2;
    }
    
    .sidebar-header {
        padding: 20px;
    }
    
    .sidebar-header h1 {
        font-size: 20px;
    }
    
    .sidebar-description {
        padding: 15px 20px;
    }
    
    #region-info-panel {
        padding: 20px;
    }
    
    .btn-reset {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .stats-grid .stat-item {
        padding: 12px 8px;
    }
    
    .stats-grid .stat-value {
        font-size: 16px;
    }
    
    .stats-grid .stat-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    #map-container {
        height: 400px;
        min-height: 400px;
    }
    
    .sidebar-header h1 {
        font-size: 18px;
    }
    
    .sidebar-description p {
        font-size: 11px;
    }
}

/* Override styles pour cette page spécifique */
.page-carte-regions .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.page-carte-regions .section80 {
    padding: 0;
    margin: 0;
}
