.app-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin: var(--space-0);
    color: var(--color-text);
}

.page-title {
    font-size: var(--font-size-text);
    color: var(--color-muted);
}

.header-datetime {
    font-size: var(--font-size-text);
    color: var(--color-muted);
}

.header-user-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    text-decoration: none;
}

.header-user-link:hover {
    color: var(--color-primary);
}

.header-user-link .header-user-icon {
    display: inline-flex;
    align-items: center;
    color: var(--color-muted);
}

.header-user-link:hover .header-user-icon {
    color: var(--color-primary);
}

.header-user-link .header-user-icon svg {
    display: block;
}

.header-user {
    font-size: var(--font-size-sm);
}

.header-logout {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    text-decoration: none;
}

.header-logout:hover {
    text-decoration: underline;
}

.header-database-status {
    font-size: var(--font-size-text);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    font-size: var(--font-size-text);
    font-weight: var(--font-weight-medium);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-spacer {
    /* Espace équivalent à 2 menus (padding + contenu) */
    min-height: 5.5rem;
    flex-shrink: 0;
}

.sidebar-divider {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    background: var(--color-surface);
    border: var(--border);
    transition: var(--transition-fast);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.nav-icon svg {
    display: block;
}

.nav-link:hover {
    background: var(--color-surface-alt);
}

.nav-link.is-active {
    background: var(--color-secondary);
    color: var(--color-secondary-contrast);
    border-color: var(--color-secondary);
}

.page {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.page-heading {
    font-size: var(--font-size-lg);
    margin: var(--space-0);
}

.page-subtitle {
    margin: var(--space-0);
    color: var(--color-muted);
    font-size: var(--font-size-text);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--sidebar-width), var(--content-col)));
    gap: var(--card-gap);
}

.card {
    padding: var(--space-5);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.card-title {
    margin: var(--space-0);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

.card-value {
    margin: var(--space-0);
    font-size: var(--font-size-text);
    color: var(--color-muted);
}

.status-ok {
    color: var(--color-success);
    font-weight: var(--font-weight-semibold);
}

.status-error {
    color: var(--color-error);
    font-weight: var(--font-weight-semibold);
}

.footer-item {
    font-size: var(--font-size-text);
    color: var(--color-muted);
}

.footer-separator {
    color: var(--color-border);
    padding: var(--space-0) var(--space-2);
}

/* Légende des couleurs (sidebar, sous Paramètres) */
/* Sidebar Planning Individuel */
.sidebar-recap {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
    box-sizing: border-box;
}

.sidebar-recap-today-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: var(--border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--font-size-text);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    transition: var(--transition-fast);
}

.sidebar-recap-today-btn:hover {
    background: var(--color-surface-alt);
}

.sidebar-recap-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
}

.sidebar-recap-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    width: 100%;
}

.sidebar-recap-field label {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
}

.sidebar-recap-field select {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: var(--border);
    background: var(--color-surface);
    font-size: var(--font-size-text);
}

.sidebar-recap-actions {
    margin-top: var(--space-2);
}

.sidebar-recap-actions .btn-sm {
    width: 100%;
}

.sidebar-recap-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-recap-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: var(--space-2);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-recap-nav:hover {
    background: var(--color-surface-alt);
}

.sidebar-recap-month-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.sidebar-legend-divider {
    margin-top: var(--space-4);
}

.sidebar-planning-legend {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
}

.sidebar-legend-label {
    display: block;
    font-size: var(--font-size-text);
    font-weight: var(--font-weight-medium);
    color: var(--color-muted);
    margin-bottom: var(--space-2);
}

.sidebar-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.sidebar-legend-bubble {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--space-2);
    border-radius: 999px;
    font-size: 10px;
    font-weight: var(--font-weight-medium);
}

.sidebar-legend-bubble.legend-ferie { background: #94a3b8; color: #fff; }
.sidebar-legend-bubble.legend-cp-impose { background: #7c3aed; color: #fff; }
.sidebar-legend-bubble.legend-rtt-impose { background: #0891b2; color: #fff; }
.sidebar-legend-bubble.legend-weekend { background: #e2e8f0; color: var(--color-muted); }
.sidebar-legend-bubble.legend-travail { background: var(--color-success); color: #fff; }
.sidebar-legend-bubble.legend-cp { background: #2563eb; color: #fff; }
.sidebar-legend-bubble.legend-rtt { background: #0d9488; color: #fff; }
.sidebar-legend-bubble.legend-absence { background: var(--color-error); color: #fff; }
.sidebar-legend-bubble.legend-neutralise { background: #6b7280; color: #fff; }
.sidebar-legend-bubble.legend-maladie { background: #dc2626; color: #fff; }
.sidebar-legend-bubble.legend-css { background: #b91c1c; color: #fff; }
.sidebar-legend-bubble.legend-vt { background: #7c2d12; color: #fff; }
.sidebar-legend-bubble.legend-recuperation { background: #f59e0b; color: #1f2937; }
