/* ============================================================
   Action Pro Bat - Hub Dashboard
   Charte alignée sur actionprobat.fr :
   - Fond : bleu nuit profond (logo background)
   - Accent : ocre / jaune moutarde
   - Texte : blanc
   - Style sérieux artisanal moderne
   ============================================================ */

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

:root {
    --bg: #1c2538;           /* bleu nuit logo */
    --bg-elev: #232d44;      /* bleu nuit légèrement plus clair */
    --bg-card: #2a3552;      /* cards */
    --bg-hover: #344063;
    --border: #3a4666;
    --border-strong: #4a5680;
    --text: #ffffff;
    --text-muted: #b5bcc9;
    --text-dim: #7d869a;
    --accent: #d4a44a;       /* ocre / jaune moutarde du logo */
    --accent-hover: #e6b85c;
    --accent-soft: rgba(212, 164, 74, 0.12);
    --green: #4ade80;
    --red: #f87171;
    --yellow: #facc15;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

html, body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-feature-settings: 'kern' 1, 'liga' 1, 'cv11' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   Header
   ============================================================ */

header {
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--border);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand-mark {
    width: 88px;
    height: 88px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    padding: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text);
}

.tagline {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 1.5px;
    margin-top: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

.tagline .since {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
}

.status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s ease-in-out infinite;
}

.status-pill.degraded .dot {
    background: var(--yellow);
    box-shadow: 0 0 8px var(--yellow);
}

.status-pill.down .dot {
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
}

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

/* ============================================================
   Main / Sections
   ============================================================ */

main {
    padding: 56px 0 80px;
}

.section {
    margin-bottom: 72px;
}

.section-header {
    margin-bottom: 28px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    color: var(--text);
}

.section-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.section-header code {
    background: var(--bg-elev);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--accent);
}

/* ============================================================
   Cards (outils)
   ============================================================ */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, var(--accent-soft) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    background: var(--bg-hover);
}

.card:hover::before {
    opacity: 1;
}

.card.primary {
    border-left: 3px solid var(--accent);
}

.card-icon {
    font-size: 30px;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.card-content p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.card-meta {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.card-arrow {
    color: var(--text-dim);
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

.card:hover .card-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* ============================================================
   Status grid
   ============================================================ */

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 18px;
}

.status-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.status-card.ok .status-dot {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.status-card.warn .status-dot {
    background: var(--yellow);
    box-shadow: 0 0 6px var(--yellow);
}

.status-card.down .status-dot {
    background: var(--red);
    box-shadow: 0 0 6px var(--red);
}

.status-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.status-detail {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.status-meta {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}

/* ============================================================
   Priorities
   ============================================================ */

.section.subtle {
    background: var(--bg-elev);
    margin: 56px -32px 0;
    padding: 56px 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.section.subtle .section-header {
    text-align: center;
    margin-bottom: 32px;
}

.priorities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.priority {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.priority-num {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.priority p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 24px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

footer p {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-meta {
    color: var(--text-dim);
    font-size: 12px;
}

footer .footer-tagline {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }

    header {
        padding: 32px 0 24px;
    }

    .brand h1 {
        font-size: 22px;
    }

    .brand-mark {
        width: 64px;
        height: 64px;
    }

    .section.subtle {
        margin-left: -20px;
        margin-right: -20px;
        padding: 40px 20px;
    }

    main {
        padding: 40px 0 60px;
    }

    .section {
        margin-bottom: 56px;
    }
}
