:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent-color: #0284c7;
    --accent-light: #e0f2fe;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
}

/* Variables du mode sombre */
.dark-mode {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --accent-light: #0369a1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    transition: background-color 0.3s, color 0.3s;
}

header {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 480px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s;
}

.logo-container {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-accent {
    color: var(--accent-color);
    text-shadow: 0 0 12px rgba(2, 132, 199, 0.2);
}

main {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
    transition: background-color 0.3s, border-color 0.3s;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Badge d'impact */
.impact-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.impact-moderate {
    background: #fef3c7;
    color: #d97706;
}

.dark-mode .impact-moderate {
    background: #78350f;
    color: #fcd34d;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
    100% { transform: scale(0.95); opacity: 1; }
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.apology-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 1.5rem;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 8px;
}

.dark-mode .apology-text {
    background: #334155;
    color: #cbd5e1;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.countdown-box {
    background: #f1f5f9;
    padding: 0.6rem;
    border-radius: 12px;
    min-width: 65px;
}

.dark-mode .countdown-box {
    background: #334155;
}

.countdown-num {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
}

.countdown-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Grille des applications modernisée */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: left;
}

.dark-mode .service-card {
    background: #1e293b;
}

.service-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online { background-color: var(--success-color); }
.status-dot.offline { background-color: var(--danger-color); }
.status-dot.maintenance { background-color: var(--warning-color); }

#toggle-details {
    display: none;
}

.details-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem;
    background: #f1f5f9;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.dark-mode .details-trigger {
    background: #334155;
}

.details-trigger:hover {
    background: #e2e8f0;
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    text-align: left;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.dark-mode .details-content {
    background: #1e293b;
}

#toggle-details:checked ~ .details-content {
    max-height: 500px;
    padding: 1.25rem;
    margin-top: -4px;
    border: 1px solid var(--border-color);
    border-top: none;
}

#toggle-details:checked ~ .details-trigger {
    border-radius: 12px 12px 0 0;
    background: #e2e8f0;
}

.timeline {
    position: relative;
    padding-left: 1.25rem;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.timeline-time {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
}

.timeline-title {
    font-size: 0.8rem;
    font-weight: 600;
}

.support-links {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.support-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.support-links a:hover {
    text-decoration: underline;
}

.services-status {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.dark-mode .services-status {
    background: #1e293b;
}
