:root {
    --atlas-bg: #f5f6f8;
    --atlas-surface: #ffffff;
    --atlas-text: #1d2330;
    --atlas-muted: #6b7280;
    --atlas-border: #e3e6eb;
    --atlas-primary: #2b5fd9;
    --atlas-primary-ink: #ffffff;
    --atlas-success: #1a8f4c;
    --atlas-warning: #c77d00;
    --atlas-danger: #c0392b;
    --atlas-radius: 10px;
}
* { box-sizing: border-box; }
body.atlas {
    margin: 0;
    background: var(--atlas-bg);
    color: var(--atlas-text);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--atlas-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.atlas-brand {
    font-weight: 700; font-size: 16px; color: var(--atlas-text); letter-spacing: .04em;
    display: block; padding: 4px 10px 20px;
}
.atlas-brand-standalone { padding: 20px 24px; }

.atlas-shell { display: flex; align-items: flex-start; min-height: 100vh; }
.atlas-sidebar {
    width: 236px; flex: none; min-height: 100vh; background: var(--atlas-surface);
    border-right: 1px solid var(--atlas-border); padding: 16px 12px; display: flex; flex-direction: column;
    position: sticky; top: 0;
}
.atlas-sidebar-nav { display: flex; flex-direction: column; margin-bottom: 4px; }
.atlas-sidebar-section { margin-top: 18px; }
.atlas-sidebar-label { margin: 0 0 4px; padding: 0 10px; font-size: 12px; color: var(--atlas-muted); }
.atlas-sidebar-item {
    display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px;
    color: var(--atlas-text); font-size: 13.5px; line-height: 1.3;
}
.atlas-sidebar-item:hover { background: var(--atlas-bg); text-decoration: none; }
.atlas-sidebar-item.is-active { background: #e9effc; color: var(--atlas-primary); font-weight: 600; }
.atlas-sidebar-item-plain { color: var(--atlas-muted); }
.atlas-sidebar-item-plain.is-active { color: var(--atlas-primary); background: #e9effc; }
.atlas-sidebar-item-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-sidebar-avatar {
    width: 20px; height: 20px; border-radius: 50%; background: #e9effc; color: var(--atlas-primary);
    font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.atlas-sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--atlas-border); }
.atlas-sidebar-user { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.atlas-sidebar-user .atlas-sidebar-item-label { flex: 1; font-size: 13px; color: var(--atlas-text); }
.atlas-sidebar-logout { color: var(--atlas-muted); font-size: 15px; flex: none; }
.atlas-sidebar-logout:hover { color: var(--atlas-danger); text-decoration: none; }

.atlas-sidebar-toggle {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 30; width: 38px; height: 38px;
    border-radius: 8px; border: 1px solid var(--atlas-border); background: var(--atlas-surface);
    flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.atlas-sidebar-toggle span { width: 16px; height: 2px; background: var(--atlas-text); border-radius: 2px; }
.atlas-sidebar-backdrop { display: none; }

.atlas-shell-main { flex: 1; min-width: 0; }
.atlas-main { max-width: 1080px; margin: 28px auto; padding: 0 20px; }
.atlas-card {
    background: var(--atlas-surface); border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius); padding: 22px 24px; margin-bottom: 20px;
}
.atlas-card h1 { margin: 0 0 14px; font-size: 22px; }
.atlas-card h2 { margin: 0 0 12px; font-size: 17px; }
.atlas-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.atlas-flash { padding: 12px 16px; border-radius: var(--atlas-radius); margin-bottom: 18px; }
.atlas-flash-success { background: #e8f6ee; color: var(--atlas-success); }
.atlas-flash-error { background: #fbeae8; color: var(--atlas-danger); }
.atlas-flash-info { background: #e9effc; color: var(--atlas-primary); }

.atlas-btn {
    display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--atlas-primary);
    background: var(--atlas-primary); color: var(--atlas-primary-ink); font-weight: 600; cursor: pointer;
}
.atlas-btn:hover { text-decoration: none; filter: brightness(.95); }
.atlas-btn-secondary { background: var(--atlas-surface); color: var(--atlas-primary); }
.atlas-btn-danger { background: var(--atlas-danger); border-color: var(--atlas-danger); }
.atlas-btn-sm { padding: 5px 10px; font-size: 13px; }

.atlas-form { display: grid; gap: 14px; max-width: 560px; }
.atlas-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.atlas-form input[type=text], .atlas-form input[type=email], .atlas-form input[type=password],
.atlas-form input[type=url], .atlas-form select, .atlas-form textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--atlas-border); border-radius: 8px; font: inherit;
}
.atlas-form textarea { min-height: 110px; }
.atlas-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.atlas-hint { color: var(--atlas-muted); font-size: 13px; }

.atlas-table { width: 100%; border-collapse: collapse; }
.atlas-table th, .atlas-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--atlas-border); }
.atlas-table th { color: var(--atlas-muted); font-weight: 600; font-size: 13px; }
.atlas-table tr:last-child td { border-bottom: 0; }

.atlas-pill {
    display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: #e9effc; color: var(--atlas-primary);
}
.atlas-pill-cadrage { background: #eef0f3; color: var(--atlas-muted); }
.atlas-pill-maquette { background: #f3e8fb; color: #7a3db5; }
.atlas-pill-developpement { background: #e9effc; color: var(--atlas-primary); }
.atlas-pill-recette { background: #fff3e0; color: var(--atlas-warning); }
.atlas-pill-en_ligne { background: #e8f6ee; color: var(--atlas-success); }
.atlas-pill-termine { background: #e8f6ee; color: var(--atlas-success); }

.atlas-progress { height: 8px; background: var(--atlas-border); border-radius: 999px; overflow: hidden; }
.atlas-progress > span { display: block; height: 100%; background: var(--atlas-primary); }

.atlas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.atlas-project-card { display: block; color: inherit; }
.atlas-project-card:hover { text-decoration: none; border-color: var(--atlas-primary); }
.atlas-project-card h3 { margin: 0 0 8px; font-size: 16px; }
.atlas-project-card .atlas-meta { color: var(--atlas-muted); font-size: 13px; margin-top: 8px; }

.atlas-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--atlas-border); margin-bottom: 18px; }
.atlas-tabs a { padding: 10px 14px; color: var(--atlas-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.atlas-tabs a.is-active { color: var(--atlas-text); border-color: var(--atlas-primary); }
.atlas-tabs a:hover { text-decoration: none; color: var(--atlas-text); }

.atlas-status-form { display: inline-flex; gap: 8px; align-items: center; }
.atlas-status-form select { padding: 6px 10px; border: 1px solid var(--atlas-border); border-radius: 8px; font: inherit; }

.atlas-login { max-width: 400px; margin: 60px auto; }
.atlas-inline-actions { display: flex; gap: 8px; align-items: center; }
.atlas-muted { color: var(--atlas-muted); }
details.atlas-archived summary { cursor: pointer; color: var(--atlas-muted); }

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

@media (max-width: 880px) {
    .atlas-sidebar-toggle { display: flex; }
    .atlas-sidebar {
        position: fixed; top: 0; left: 0; height: 100vh; z-index: 31; width: 260px;
        transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 0 0 9999px transparent;
    }
    .atlas-shell.is-sidebar-open .atlas-sidebar { transform: translateX(0); }
    .atlas-shell.is-sidebar-open .atlas-sidebar-backdrop {
        display: block; position: fixed; inset: 0; background: rgba(20, 24, 33, .35); z-index: 29;
    }
    .atlas-shell-main { width: 100%; }
    .atlas-main { padding-top: 56px; }
}
