/**
 * Styles pour le plugin Séismes Caraïbes
 */

.seismes-caraibes-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* En-tête */
.seismes-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2196F3;
}

.seismes-header h2 {
    margin: 0;
    font-size: 2em;
    color: #1565C0;
}

.zone-description {
    color: #666;
    font-size: 1.1em;
    margin-top: 10px;
}

/* Contrôles */
.seismes-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #333;
}

.periode-select,
.filter-select,
.search-input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.periode-select:hover,
.filter-select:hover,
.search-input:hover {
    border-color: #2196F3;
}

.btn-refresh,
.btn-export {
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-refresh:hover,
.btn-export:hover {
    background: #1976D2;
}

.auto-refresh {
    margin-left: auto;
}

/* Alerte tsunami */
.tsunami-alert {
    padding: 15px;
    background: #FFF3CD;
    border: 2px solid #FFC107;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #856404;
    font-weight: 600;
}

.tsunami-alert strong {
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
}

/* Statistiques rapides */
.statistiques-rapides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
}

/* Carte */
.carte-container {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carte-seismes {
    width: 100%;
    z-index: 1;
}

/* Popups sur la carte */
.seisme-popup h4 {
    margin: 0 0 10px 0;
    color: #1565C0;
    font-size: 1.2em;
}

.seisme-popup p {
    margin: 5px 0;
}

.seisme-popup strong {
    color: #333;
}

.tsunami-warning {
    color: #DC143C;
    font-weight: bold;
    margin-top: 10px;
}

.volcan-popup,
.faille-popup {
    min-width: 250px;
}

.volcan-marker {
    font-size: 24px;
    text-align: center;
    animation: pulse 2s infinite;
}

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

/* Badges de source */
.badge-source {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

.badge-source.usgs {
    background: #4CAF50;
    color: white;
}

.badge-source.ovsm {
    background: #FF9800;
    color: white;
}

/* Légende */
.legende-carte {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.legende-carte h3 {
    margin-top: 0;
    color: #1565C0;
}

.legende-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.legende-section h4 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legende-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.couleur-mag {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.icone-epicentre,
.icone-volcan {
    font-size: 1.5em;
}

.ligne-faille {
    width: 30px;
    height: 4px;
}

/* Volcans */
.volcans-section,
.failles-section {
    margin-bottom: 30px;
}

.volcans-section h3,
.failles-section h3 {
    color: #1565C0;
    margin-bottom: 20px;
}

.volcans-liste,
.failles-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.volcan-card,
.faille-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.volcan-card:hover,
.faille-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.volcan-card h4,
.faille-card h4 {
    margin: 0 0 10px 0;
    color: #DC143C;
}

.volcan-info,
.faille-info {
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
}

.statut-volcan {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    margin: 5px 0;
}

/* Tableau */
.tableau-section {
    margin-bottom: 30px;
}

.tableau-section h3 {
    color: #1565C0;
    margin-bottom: 20px;
}

.tableau-filtres {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tableau-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tableau-seismes {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.tableau-seismes thead {
    background: #1565C0;
    color: white;
}

.tableau-seismes th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.tableau-seismes td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.tableau-seismes tbody tr:hover {
    background: #f5f5f5;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 20px;
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    margin: 20px 0;
}

/* Section pédagogique */
.info-pedagogique {
    background: #E3F2FD;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
}

.info-pedagogique h3 {
    color: #1565C0;
    margin-top: 0;
}

.info-content {
    line-height: 1.8;
}

.info-content ul {
    margin: 10px 0;
    padding-left: 25px;
}

.info-content li {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .seismes-caraibes-container {
        padding: 15px;
    }
    
    .seismes-header h2 {
        font-size: 1.5em;
    }
    
    .seismes-controls {
        flex-direction: column;
    }
    
    .statistiques-rapides {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .legende-sections {
        grid-template-columns: 1fr;
    }
    
    .volcans-liste,
    .failles-liste {
        grid-template-columns: 1fr;
    }
    
    .tableau-filtres {
        flex-direction: column;
    }
    
    .tableau-seismes {
        font-size: 0.85em;
    }
    
    .tableau-seismes th,
    .tableau-seismes td {
        padding: 8px;
    }
}
