/* =====================================================
   MODULE SOS - STYLES COMPLETS
   ===================================================== */

/* Container principal */
.sos-container {
    padding: 2rem 0;
}

/* En-t�te avec gradient */
.sos-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(220, 53, 69, 0.1);
    margin-bottom: 2rem;
}

.sos-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sos-header p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.sos-header .btn {
    background: white;
    color: #dc3545;
    font-weight: 500;
    border: none;
}

.sos-header .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Cartes statistiques compactes */
.sos-stats-compact {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item-compact {
    background: white;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 3px solid;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.stat-item-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-item-compact i {
    font-size: 1.25rem;
}

.stat-item-compact strong {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 30px;
}

.stat-item-compact span {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.stat-item-compact.total {
    border-left-color: #007bff;
}

.stat-item-compact.total i {
    color: #007bff;
}

.stat-item-compact.total strong {
    color: #007bff;
}

.stat-item-compact.active {
    border-left-color: #dc3545;
}

.stat-item-compact.active i {
    color: #dc3545;
}

.stat-item-compact.active strong {
    color: #dc3545;
}

.stat-item-compact.resolved {
    border-left-color: #28a745;
}

.stat-item-compact.resolved i {
    color: #28a745;
}

.stat-item-compact.resolved strong {
    color: #28a745;
}

.stat-item-compact.false-alarm {
    border-left-color: #ffc107;
}

.stat-item-compact.false-alarm i {
    color: #ffc107;
}

.stat-item-compact.false-alarm strong {
    color: #ffc107;
}

/* Carte de filtres */
.filters-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.filters-card h5 {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Carte des alertes */
.alerts-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.alerts-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.alerts-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.alerts-card .card-body {
    padding: 0;
}

/* Table des alertes */
.alerts-table {
    overflow-x: auto;
}

.alerts-table table {
    margin-bottom: 0;
}

.alerts-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    padding: 1rem 0.75rem;
}

.alerts-table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.alert-row {
    transition: background-color 0.2s ease;
}

.alert-row:hover {
    background-color: #f8f9fa;
}

/* Badges de statut */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}

.status-active {
    background: #dc3545;
    color: white;
    animation: pulse 2s infinite;
}

.status-resolved {
    background: #28a745;
    color: white;
}

.status-pending {
    background: #ffc107;
    color: #000;
}

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

/* Badge priorit� */
.priority-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
}

.priority-high {
    background: #dc3545;
    color: white;
}

.priority-normal {
    background: #17a2b8;
    color: white;
}

/* Boutons d'action */
.action-buttons .btn {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Message vide */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Pagination */
.pagination-container {
    padding: 1.5rem;
    border-top: 2px solid #dee2e6;
}

.pagination {
    margin: 0;
}

.page-link {
    border-radius: 8px;
    margin: 0 0.25rem;
    font-weight: 500;
}

.page-item.active .page-link {
    background: #dc3545;
    border-color: #dc3545;
}

/* Modales */
.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

.modal-body {
    padding: 1.5rem;
}

.info-group {
    margin-bottom: 1.5rem;
}

.info-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.info-value {
    color: #212529;
    font-size: 1rem;
}

/* Carte Google Maps dans modale */
#mapFrame {
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

/* =====================================================
   PAGE CONFIGURATION SOS
   ===================================================== */

.config-container {
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.config-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.1);
    margin-bottom: 2rem;
}

.config-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.config-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

.config-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.config-section h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.channel-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.channel-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.channel-card.enabled {
    border-color: #28a745;
    background: #f1f9f4;
}

.channel-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.channel-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    color: white;
}

.channel-icon.icon-fcm {
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
}

.channel-icon.icon-email {
    background: linear-gradient(135deg, #EA4335 0%, #FBBC04 100%);
}

.channel-icon.icon-sms {
    background: linear-gradient(135deg, #34A853 0%, #0F9D58 100%);
}

.channel-icon.icon-webhook {
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
}

.channel-icon.icon-gps {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
}

.channel-info h6 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.channel-info small {
    color: #6c757d;
}

.channel-toggle {
    margin-left: auto;
}

.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.channel-config {
    padding-left: 66px;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn-save {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sos-header h1,
    .config-header h1 {
        font-size: 1.5rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .action-buttons .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .channel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .channel-toggle {
        margin-left: 0;
        margin-top: 1rem;
    }

    .channel-config {
        padding-left: 0;
        margin-top: 1rem;
    }
}
