* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.last-update {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Responsive : 2 colonnes sur tablettes, 1 colonne sur mobile */
@media (max-width: 1024px) {
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}

.status-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.transporter-logo {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-operational {
    background: #d4edda;
    color: #155724;
}

.status-degraded {
    background: #fff3cd;
    color: #856404;
}

.status-down {
    background: #f8d7da;
    color: #721c24;
}

.status-unknown {
    background: #e2e3e5;
    color: #383d41;
}

.status-message {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.status-time {
    color: #999;
    font-size: 12px;
}

.severity-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.severity-low { background: #28a745; }
.severity-medium { background: #ffc107; }
.severity-high { background: #fd7e14; }
.severity-critical { background: #dc3545; }

.news-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.news-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.news-meta {
    color: #999;
    font-size: 12px;
}

.refresh-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.loading {
    text-align: center;
    padding: 50px;
    color: #666;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.history-btn, .news-btn {
    flex: 1;
    padding: 8px 15px;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.history-btn {
    background: #007bff;
}

.history-btn:hover {
    background: #0056b3;
}

.news-btn {
    background: #28a745;
}

.news-btn:hover {
    background: #1e7e34;
}

/* Styles pour les actualités dans la modal */
.news-item-modal {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.news-item-modal:last-child {
    border-bottom: none;
}

.news-item-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.news-item-content {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Support du HTML dans le contenu */
.news-item-content p {
    margin: 10px 0;
    line-height: 1.6;
}

.news-item-content ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.news-item-content ol {
    margin: 10px 0;
    padding-left: 25px;
    list-style-type: decimal;
}

.news-item-content li {
    margin: 5px 0;
    line-height: 1.5;
}

.content-preview,
.content-full {
    margin-bottom: 10px;
}

/* Wrapper pour le contenu HTML des actualités */
.content-wrapper,
.content-wrapper * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.content-wrapper {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* Styles pour les tableaux dans les actualités */
.content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background-color: white;
}

.content-wrapper table th,
.content-wrapper table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.content-wrapper table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.content-wrapper table tr:nth-child(even) {
    background-color: #fafafa;
}

.content-wrapper table tr:hover {
    background-color: #f0f0f0;
}

/* Styles pour les paragraphes et titres dans le contenu */
.content-wrapper p {
    margin: 10px 0;
}

.content-wrapper h2 {
    margin: 20px 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* Bouton Afficher plus/moins */
.toggle-content-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
    display: inline-block;
}

.toggle-content-btn:hover {
    background: #0056b3;
}

.news-item-date {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.news-item-zones {
    color: #007bff;
    font-size: 12px;
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pagination-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #0056b3;
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    min-width: 120px;
    text-align: center;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.incident-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.incident-item:last-child {
    border-bottom: none;
}

.incident-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.incident-content {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.incident-date {
    color: #999;
    font-size: 12px;
}

.archived-badge {
    font-style: italic;
    color: #6c757d;
    font-weight: normal;
}

.news-item-archived {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    margin-top: 5px;
}

/* Encadrés Important dans le contenu - SEULEMENT pour "Important :" */
.news-item-content p strong {
    font-weight: bold;
}

/* Bandeau bleu uniquement pour les paragraphes contenant "Important :" */
.news-item-content p:has(strong:contains("Important")) {
    background: #e7f3ff;
    border-left: 4px solid #0066cc;
    padding: 10px 15px;
    margin: 15px 0;
}

/* Fallback pour navigateurs ne supportant pas :contains() */
.news-item-content .important-alert {
    background: #e7f3ff;
    border-left: 4px solid #0066cc;
    padding: 10px 15px;
    margin: 15px 0;
}

.news-item-content .important-alert strong {
    color: #0066cc;
}

/* Support des sous-listes */
.news-item-content ul ul {
    margin: 5px 0 5px 20px;
    padding-left: 20px;
}

.news-item-content ul ul li {
    list-style-type: circle;
}