/* my ArtWhere — styles (2026-10-15 10:19:34) */
:root {
    --bg: #f6f6f3;
    --surface: #ffffff;
    --surface-2: #fafaf8;
    --text: #1d1d1b;
    --muted: #6b6b66;
    --border: #e4e3de;
    --accent: #0077b6;
    --brand: #00a1e8;
    --accent-ink: #ffffff;
    --accent-soft: #e6f5fc;
    --ok: #15803d;
    --ok-soft: #e8f5ec;
    --warn: #a16207;
    --warn-soft: #fdf6e3;
    --danger: #b91c1c;
    --danger-soft: #fdecec;
    --info-soft: #eef2f8;
    --code-bg: #f1f0ec;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .03);
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0; }

code {
    background: var(--code-bg);
    padding: .1em .35em;
    border-radius: 4px;
    font: .88em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
    word-break: break-all;
}

code.copy { cursor: copy; }
code.copied { outline: 2px solid var(--ok); }

.muted { color: var(--muted); }

/* --- Barre supérieure --- */
.topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.brand-center { justify-content: center; font-size: 1.2rem; margin: 40px 0 24px; }

.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a, .nav .soon {
    padding: 6px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav .soon { opacity: .45; cursor: default; }

.user { display: flex; align-items: center; gap: 12px; white-space: nowrap; }

/* --- Mise en page --- */
.container { max-width: 1200px; margin: 0 auto; padding: 28px 24px 64px; }
.narrow { max-width: 420px; margin: 0 auto; padding: 0 16px 64px; }

.page-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* --- Boutons & formulaires --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 6px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    padding: 8px 16px; border-radius: 8px; font: inherit; font-weight: 550; cursor: pointer;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #00669c; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

input, select, textarea {
    width: 100%;
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }

.stack { display: grid; gap: 14px; }
.stack label { display: grid; gap: 4px; font-weight: 550; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; color: var(--muted); white-space: nowrap; }

/* --- Messages --- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: #cde9d5; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #f5cccc; }
.flash-info { background: var(--info-soft); color: #334; }
.flash-warn { background: var(--warn-soft); color: var(--warn); }

pre.detail { background: var(--code-bg); padding: 12px; border-radius: 8px; white-space: pre-wrap; font-size: .85em; }

/* --- Pastilles --- */
.pill, .badge {
    display: inline-block; font-size: .78rem; font-weight: 600;
    padding: 2px 8px; border-radius: 999px; white-space: nowrap;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: #cde9d5; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: #f0e2b6; }
.pill-todo { background: var(--danger-soft); color: var(--danger); border-color: #f5cccc; }

/* --- Tuiles --- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.tile {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px; display: grid; gap: 4px; color: var(--text); box-shadow: var(--shadow);
}
a.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile-label { color: var(--muted); font-size: .9rem; }
.tile-value { font-size: 2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile-warn .tile-value { color: var(--warn); }

/* --- Checklist --- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.check {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
    display: grid; place-items: center; font-size: .8rem; color: #fff; flex: none;
}
.is-done .check { background: var(--ok); border-color: var(--ok); }
.is-done a { color: var(--muted); }

/* --- Paramètres --- */
.settings-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.settings-toc {
    position: sticky; top: 80px; display: grid; gap: 2px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px;
}
.settings-toc a {
    display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 550;
}
.settings-toc a .pill { align-self: flex-start; }
.settings-toc a:hover, .settings-toc a.current { background: var(--surface-2); text-decoration: none; }
.settings-section { scroll-margin-top: 80px; }
.intro { color: var(--muted); margin: 0 0 20px; }

.field {
    display: grid; grid-template-columns: 220px 1fr; gap: 6px 20px;
    padding: 16px 0; border-top: 1px solid var(--border);
}
.field > label { font-weight: 600; padding-top: 8px; }
.field-input { display: flex; gap: 12px; align-items: center; }
.field .help { grid-column: 2; color: var(--muted); font-size: .9rem; }
.help ol, .help ul { margin: 6px 0; padding-left: 20px; }
.help li { margin: 4px 0; }
.req { color: var(--danger); }
.form-actions { padding-top: 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.section-actions { margin-top: 20px; padding: 16px; background: var(--surface-2); border-radius: 8px; border: 1px dashed var(--border); }
.section-actions h3 { margin: 0 0 8px; font-size: 1rem; }

/* --- Tableaux --- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

@media (max-width: 860px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-toc { position: static; }
    .field { grid-template-columns: 1fr; }
    .field .help { grid-column: 1; }
    .topbar { padding: 0 16px; gap: 12px; }
    .container { padding: 20px 16px 48px; }
    .user .muted { display: none; }
}

.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions form { margin: 0; }

.brand-logo { width: 30px; height: 30px; border-radius: 6px; display: block; }
.brand-center .brand-logo { width: 44px; height: 44px; border-radius: 8px; }

/* --- Debug & journaux --- */
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.debug-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .88rem;
}
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-err { color: var(--danger); font-weight: 600; }
.debug-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.debug-filters input[type=search] { flex: 1; min-width: 220px; }
.debug-list { padding: 0; overflow: hidden; }
.debug-row { border-bottom: 1px solid var(--border); }
.debug-row:last-child { border-bottom: 0; }
.debug-row summary {
    display: grid; grid-template-columns: 96px 92px 18px 1fr 56px 64px; gap: 10px; align-items: center;
    padding: 8px 14px; cursor: pointer; list-style: none; font-size: .9rem;
}
.debug-row summary::-webkit-details-marker { display: none; }
.debug-row summary:hover { background: var(--surface-2); }
.debug-row[open] summary { background: var(--surface-2); }
.debug-row.is-error summary { box-shadow: inset 3px 0 0 var(--danger); }
.d-time { font: .82rem ui-monospace, Consolas, monospace; color: var(--muted); }
.d-chan { justify-self: start; }
.d-dir { color: var(--muted); }
.d-target { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-error { color: var(--danger); margin-left: 8px; }
.d-status { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.d-status.ok { color: var(--ok); }
.d-status.err { color: var(--danger); }
.d-ms { text-align: right; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.debug-detail { padding: 8px 14px 16px; background: var(--surface-2); }
.debug-detail h4 { margin: 12px 0 6px; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.debug-detail pre {
    margin: 0; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
    font: .8rem/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow: auto;
}
.debug-detail pre.err { color: var(--danger); }
.debug-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dl.meta { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; margin: 0; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }
.mail-preview { width: 100%; height: 480px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

@media (max-width: 860px) {
    .debug-row summary { grid-template-columns: 80px 1fr 56px; }
    .d-chan, .d-dir, .d-ms { display: none; }
    .debug-cols { grid-template-columns: 1fr; }
    dl.meta { grid-template-columns: 1fr; }
}
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }

/* --- Clients --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + section { margin-top: 20px; }
.client-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -12px 0 20px; font-size: .9rem; }
.client-meta { align-items: center; }
.client-meta-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.client-meta-actions form { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 550; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-count { font-size: .78rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; margin-left: 4px; color: var(--muted); }
.tab-count.warn { background: var(--warn-soft); color: var(--warn); border-color: #f0e2b6; }
.type-1 { background: #eef4ff; color: #3451b2; border-color: #d7e1fb; }
.type-2 { background: var(--accent-soft); color: var(--accent); border-color: #c5e6f7; }
.type-3 { background: #f3effd; color: #6b46c1; border-color: #e2d9fa; }
.type-choice { display: grid; gap: 8px; }
.type-option { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.type-option:hover { border-color: var(--accent); }
.type-option.is-selected, .type-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.type-option input { margin-top: 3px; }
.type-option > span { display: grid; gap: 2px; }
.stack label .small { font-weight: 400; }
.toggle {
    border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
    border-radius: 999px; padding: 2px 12px; font: inherit; font-size: .85rem; cursor: pointer;
}
.toggle.on { background: var(--ok-soft); color: var(--ok); border-color: #cde9d5; }
tr.is-muted td { color: var(--muted); }
tr.is-deleted td { color: var(--muted); text-decoration: line-through; }
tr.is-deleted td .pill { text-decoration: none; }
.month-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.month-stats > div { display: grid; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; min-width: 120px; }
.month-stats strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
input.is-invalid, select.is-invalid { border-color: var(--danger); background: var(--danger-soft); }

@media (max-width: 960px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-2 > .card { margin-bottom: 20px; }
}
.type-choice > .btn, .stack > .btn { justify-self: start; }
.type-choice p { margin: 4px 0; }

/* --- Index alphabétique & pagination --- */
.alpha { display: flex; flex-wrap: wrap; gap: 2px; margin: -4px 0 14px; }
.alpha-item {
    min-width: 30px; height: 30px; padding: 0 6px; display: inline-grid; place-items: center;
    border-radius: 6px; color: var(--text); font-weight: 600; font-size: .88rem;
}
a.alpha-item:hover { background: var(--surface); text-decoration: none; box-shadow: inset 0 0 0 1px var(--border); }
.alpha-item.is-current { background: var(--accent); color: var(--accent-ink); }
.alpha-item.is-empty { color: var(--border); cursor: default; }
.list-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: -8px; }
.pager { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pager-item {
    min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
    font-weight: 550; font-variant-numeric: tabular-nums;
}
a.pager-item:hover { border-color: var(--accent); text-decoration: none; }
.pager-item.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pager-item.is-disabled { color: var(--border); }
.pager-gap { padding: 0 4px; color: var(--muted); }
.text-warn { color: var(--warn); }
select.is-suggested { border-color: var(--warn); background: var(--warn-soft); }
.falco-refresh { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.toggle { text-align: center; min-width: 84px; }
button { text-align: center; }
details.raw { margin-top: 4px; }
details.raw summary { cursor: pointer; color: var(--accent); }
details.raw pre {
    max-width: 520px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word;
    background: var(--code-bg); padding: 8px; border-radius: 6px; font: .75rem/1.4 ui-monospace, Consolas, monospace; color: var(--text);
}

/* --- Périodes --- */
.status-open { background: var(--info-soft); color: #3a4a6b; border-color: #d8e0ef; }
.status-to_validate { background: var(--warn-soft); color: var(--warn); border-color: #f0e2b6; }
.status-validated { background: var(--ok-soft); color: var(--ok); border-color: #cde9d5; }
.period-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 20px; }
.anomaly-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.anomaly-list > li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.anomaly-warn { background: var(--warn-soft) !important; }
.anomaly-icon {
    flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; font-size: .8rem; background: var(--info-soft); color: #3a4a6b;
}
.anomaly-warn .anomaly-icon { background: var(--warn); color: #fff; }
.anomaly-list details { margin-top: 4px; font-size: .88rem; }
.anomaly-list details summary { cursor: pointer; color: var(--accent); }
.anomaly-list details ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }


/* --- Timesheet (beau tableau, partagé back-office / portail) --- */
.ts-card { padding: 32px; }
.ts { --ts-line: #ebeae5; font-variant-numeric: tabular-nums; }
.ts-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 2px solid var(--text); }
.ts-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); }
.ts-client { font-size: 1.7rem; margin: 4px 0 6px; letter-spacing: -.02em; }
.ts-sub { color: var(--muted); }
.ts-dates { display: block; font-size: .88rem; margin-top: 2px; }
.ts-issuer { display: flex; gap: 12px; align-items: flex-start; font-size: .85rem; color: var(--muted); text-align: right; }
.ts-issuer strong { color: var(--text); }
.ts-logo { width: 40px; height: 40px; border-radius: 8px; order: 2; }
.ts-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.ts-stat { border: 1px solid var(--ts-line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; background: var(--surface); }
.ts-stat span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ts-stat strong { font-size: 1.35rem; font-weight: 650; }
.ts-stat small { color: var(--muted); }
.ts-stat-accent { background: var(--accent-soft); border-color: #c5e6f7; }
.ts-stat-accent strong { color: var(--accent); }
.ts-progress { grid-column: 1 / -1; position: relative; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--ts-line); overflow: hidden; }
.ts-progress-bar { position: absolute; inset: 0 auto 0 0; background: var(--brand); opacity: .35; }
.ts-progress-bar.is-high { background: var(--warn); opacity: .45; }
.ts-progress span { position: relative; display: block; text-align: center; line-height: 24px; font-size: .82rem; font-weight: 600; }
.ts-table-wrap { overflow-x: auto; }
.ts-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ts-table th, .ts-table td { padding: 9px 10px; border-bottom: 1px solid var(--ts-line); vertical-align: top; }
.ts-table thead th { border-bottom: 2px solid var(--text); font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ts-group-head th { background: var(--surface-2); color: var(--text); font-size: .9rem; text-transform: none; letter-spacing: 0; border-top: 12px solid var(--surface); }
.ts-group-head th:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.ts-ticket { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.ts-table tbody tr:not(.ts-group-head):hover td { background: #fbfbf9; }
.ts-c-date { white-space: nowrap; color: var(--muted); width: 56px; }
.ts-c-user { white-space: nowrap; width: 1%; }
.ts-profile { display: block; font-size: .78rem; color: var(--muted); }
.ts-muted { color: var(--muted); }
.ts-negative td { color: var(--danger); }
.ts-tag { display: block; margin-top: 3px; font-size: .78rem; color: var(--muted); font-style: italic; }
.ts-tag-warn { color: var(--warn); }
.ts-table tfoot th { border-top: 2px solid var(--text); border-bottom: 0; font-size: 1rem; padding-top: 12px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ts-empty { text-align: center; color: var(--muted); padding: 28px !important; }
.ts-h3 { margin: 28px 0 8px; font-size: 1rem; }
.ts-compact { max-width: 640px; }
.ts-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--ts-line); font-size: .8rem; color: var(--muted); }

@media (max-width: 860px) {
    .ts-card { padding: 18px; }
    .ts-summary { grid-template-columns: 1fr 1fr; }
    .ts-issuer { text-align: left; }
    .ts-logo { order: 0; }
    .adjust-form { grid-template-columns: 1fr; }
}
@media print {
    .topbar, .period-bar, .anomalies, #adjustments, .page-head a, .flash { display: none !important; }
    .card { box-shadow: none; border: 0; padding: 0; }
    body { background: #fff; }
}
.prepaid-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 16px; }
.prepaid-form label { display: grid; gap: 4px; font-weight: 550; font-size: .9rem; }
.mini-progress { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 2px; }
.mini-progress > div { height: 100%; background: var(--brand); }
.mini-progress > div.is-high { background: var(--warn); }
@media (max-width: 860px) { .prepaid-form { grid-template-columns: 1fr; } }

/* Bandeau d'environnement Falco */
.env-badge {
    flex: none; white-space: nowrap; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 4px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); border: 1px solid #f0e2b6;
}
.env-badge:hover { text-decoration: none; background: #fbeccb; }
.waiting-list { margin: 6px 0 0; padding-left: 18px; }
.waiting-list li { margin: 2px 0; }

/* Alerte forte en tête d'écran */
.alert-block {
    background: var(--danger-soft); border: 1px solid #f5cccc;
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; color: var(--text);
}
.alert-title { font-weight: 700; color: var(--danger); margin-bottom: 4px; }
.alert-block p { margin: 4px 0 8px; }
.alert-block ul { margin: 6px 0 0; padding-left: 18px; }
.alert-block li { margin: 3px 0; }
a.pill { display: inline-block; margin-top: 4px; }
a.pill:hover { text-decoration: none; filter: brightness(.97); }
.btn-sm { padding: 3px 10px; font-size: .82rem; font-weight: 550; }
.anomaly-list details summary.btn { list-style: none; color: var(--text); margin-top: 6px; }
.anomaly-list details summary.btn::-webkit-details-marker { display: none; }
.anomaly-list details[open] summary.btn { background: var(--surface-2); }
.page-head-actions { align-items: center; }
.page-head-end { margin-left: auto; }

/* Connexion */
.btn-google { width: 100%; justify-content: center; gap: 10px; padding: 10px 16px; font-weight: 600; }
.btn-google.btn-auto { width: auto; }
.login-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 16px 0; }
.login-sep::before, .login-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Double authentification */
.steps { padding-left: 20px; margin: 12px 0; }
.steps li { margin: 6px 0; }
.qr-box { display: grid; place-items: center; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin: 8px 0 12px; }
.qr-box img, .qr-box canvas { display: block; }
.manual-key summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.manual-key p { margin: 8px 0 0; }
.otp-input { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.recovery-codes code { font-size: 1.05rem; padding: 8px 10px; text-align: center; }

/* Paramètres en onglets (avec l'état de chaque section) */
.settings-menu { position: sticky; top: 76px; display: grid; gap: 6px; }
.settings-menu-group { font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 4px 0; }
.settings-menu-group:first-child { margin-top: 0; }
.settings-menu-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-weight: 550; font-size: .92rem;
}
.settings-menu-btn:hover { border-color: var(--accent); text-decoration: none; }
.settings-menu-btn > span:first-child { white-space: nowrap; }
.settings-layout:has(.settings-menu) { grid-template-columns: 262px minmax(0, 1fr); }
.admin-row .inline-edit input { min-width: 110px; }
.admin-row .inline-edit .btn-sm { display: none; }
.admin-row .inline-edit:focus-within .btn-sm, tr.admin-row.is-dirty .inline-edit .btn-sm { display: inline-flex; visibility: visible; }
.admin-row td:last-child .row-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
.settings-menu-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.status-dot.status-ok { background: var(--ok); }
.status-dot.status-warn { background: var(--warn); }
.status-dot.status-todo { background: var(--danger); }
.settings-menu-btn.active .status-dot { box-shadow: 0 0 0 2px var(--accent-ink); }
.section-body h3, .admins-invite h3 { margin: 0 0 10px; font-size: 1rem; }
.rates-blocks { display: grid; gap: 28px; }

/* --- Graphiques du tableau de bord --- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --chart-axis: #cfcdc6; }
.s1 { background: var(--series-1); }
.s2 { background: var(--series-2); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.chart-key { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.chart-key i { width: 10px; height: 10px; border-radius: 2px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.chart-block { min-width: 0; }
.chart-block h3 { margin: 0; font-size: 1rem; }
.chart-block > p { margin: 2px 0 12px; }
.chart-filter { margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.chart-filter select { width: auto; }
.vchart { --plot: 180px; position: relative; padding-left: 52px; margin-top: 8px; }
.vchart-grid { position: absolute; left: 52px; right: 0; top: 0; height: var(--plot); pointer-events: none; }
.vchart-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.vchart-tick.base { border-top-color: var(--chart-axis); }
.vchart-tick span { position: absolute; right: calc(100% + 8px); top: -.62em; font-size: .75rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vchart-cols { position: relative; display: flex; }
.vchart-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; border-radius: 6px; }
.vchart-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vchart-area { position: relative; width: 100%; height: var(--plot); display: flex; align-items: flex-end; justify-content: center; }
.vchart-stack { width: min(24px, 60%); display: flex; flex-direction: column; gap: 2px; }
.vchart-stack i { display: block; min-height: 1px; }
.vchart-stack i:first-child { border-radius: 4px 4px 0 0; }
.vchart-col:hover .vchart-stack, .vchart-col:focus-visible .vchart-stack { filter: brightness(1.12); }
.vchart-cap { position: absolute; left: 0; right: 0; text-align: center; font-size: .78rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vchart-label { padding-top: 6px; font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.25; white-space: nowrap; }
.vchart-label small { display: block; font-size: .7rem; }
.hchart { display: grid; gap: 2px; margin-top: 8px; }
.hchart-row { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: 12px; align-items: center; padding: 4px 6px; border-radius: 6px; }
.hchart-row:hover, .hchart-row:focus-visible { background: var(--surface-2); }
.hchart-row:focus-visible { outline: 2px solid var(--accent); }
.hchart-label { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hchart-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hchart-stack { display: flex; gap: 2px; height: 14px; min-width: 2px; }
.hchart-stack i { display: block; min-width: 1px; }
.hchart-stack i:last-child { border-radius: 0 4px 4px 0; }
.hchart-row:hover .hchart-stack, .hchart-row:focus-visible .hchart-stack { filter: brightness(1.12); }
.hchart-value { font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-data { margin-top: 12px; }
.chart-data[open] summary { margin-bottom: 8px; }
.chart-data table { font-size: .85rem; }
.chart-tip {
    position: absolute; z-index: 60; min-width: 170px; max-width: 280px; padding: 8px 10px; pointer-events: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, .08); font-size: .82rem;
}
.chart-tip-title { color: var(--muted); margin-bottom: 4px; }
.chart-tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip-row strong { font-variant-numeric: tabular-nums; }
.chart-tip-row span { color: var(--muted); }
.chart-tip-key { width: 12px; height: 2px; flex: none; border-radius: 1px; }
.chart-tip-foot { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); color: var(--muted); }
.chart-tip-foot + .chart-tip-foot { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 860px) {
    .chart-row { grid-template-columns: 1fr; }
    .vchart-label small { display: none; }
}
@media (forced-colors: active) {
    .vchart-stack i, .hchart-stack i, .chart-key i, .chart-tip-key { forced-color-adjust: none; }
}
.rates-block + .rates-block { padding-top: 20px; border-top: 1px solid var(--border); }
.rates-table td:first-child input { min-width: 220px; }
.rates-table td:nth-child(2) input { width: 120px; }
.rates-users select { max-width: 320px; }
.admins-invite { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); max-width: 720px; }
@media (max-width: 860px) {
    .settings-menu { position: static; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .settings-menu-group { grid-column: 1 / -1; }
}
.settings-tabs {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
}
.settings-tab {
    display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; min-width: 150px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
}
.settings-tab:hover { border-color: var(--accent); text-decoration: none; }
.settings-tab.active { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); background: var(--accent-soft); }
.settings-tab-title { font-weight: 600; font-size: .92rem; }
.settings-tab .pill { align-self: flex-start; font-size: .72rem; }
@media (max-width: 860px) {
    .settings-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .settings-tab { flex: none; }
}
.inline-edit { display: flex; gap: 6px; align-items: center; }
.inline-edit input { max-width: 220px; padding: 5px 8px; }
.inline-edit .btn-sm { visibility: hidden; }
.inline-edit:focus-within .btn-sm, .inline-edit.is-dirty .btn-sm { visibility: visible; }
.invite-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.invite-form label { display: grid; gap: 4px; font-weight: 550; }
@media (max-width: 860px) { .invite-form { grid-template-columns: 1fr; } }

/* Édition des entrées de temps */
.entries-table td { vertical-align: middle; }
.entry-input { padding: 5px 8px; }
.entry-duration { width: 82px; text-align: right; font-variant-numeric: tabular-nums; }
.entry-form .btn-sm { visibility: hidden; }
tr.is-dirty .entry-form .btn-sm { visibility: visible; }
tr.is-dirty td { background: var(--warn-soft); }
.alt-emails { display: block; margin-top: 4px; padding: 4px 8px; font-size: .85rem; max-width: 300px; }
tr.admin-row.is-dirty .inline-edit .btn-sm { visibility: visible; }
tr.admin-row.is-dirty td { background: var(--warn-soft); }
.trust-device { color: var(--text); font-size: .92rem; }
.entry-desc { resize: vertical; min-height: 34px; line-height: 1.4; font: inherit; overflow: hidden; }
.ts-desc { white-space: normal; }

/* Timesheet éditable en ligne (back-office) */
.ts-desc .entry-desc { width: 100%; display: block; background: transparent; border-color: transparent; padding: 4px 6px; margin: -4px -6px; }
.ts-desc .entry-desc:hover { border-color: var(--border); background: var(--surface); }
.ts-desc .entry-desc:focus { border-color: var(--accent); background: var(--surface); }
.ts-table .entry-duration { width: 74px; background: transparent; border-color: transparent; padding: 3px 6px; margin: -3px -6px 0 0; }
.ts-table .entry-duration:hover { border-color: var(--border); background: var(--surface); }
.ts-table .entry-duration:focus { border-color: var(--accent); background: var(--surface); }
.ts-billed { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.ts-desc .entry-form { margin-top: 6px; }
.ts-desc .entry-form .btn-sm { display: none; }
tr.is-dirty .ts-desc .entry-form .btn-sm { display: inline-flex; }
.ts-table tr.is-dirty td { background: var(--warn-soft); }
.move-pick { display: flex; margin-top: 6px; font-size: .8rem; color: var(--danger); font-weight: 600; }
tr.ts-misplaced td { background: #fff7f7; }
.ts-billed { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 3px; font-weight: 600; color: var(--text); font-size: .8rem; }
.ts-arrow { color: var(--brand); flex: none; }

/* Validation & facturation : onglets + filtre client */
.tabs-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs-bar .tabs { border-bottom: 0; margin-bottom: -1px; }
.client-filter { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; }
.client-filter select { width: auto; min-width: 220px; padding: 6px 10px; }
.client-filter select.is-active { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* Onglets : pas de marge négative (elle créait un défilement vertical dans le conteneur à défilement horizontal) */
.tabs { overflow-x: auto; overflow-y: hidden; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--border); }
.tab { margin-bottom: 0; }
.tabs-bar { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--border); }
.tabs-bar .tabs { box-shadow: none; margin-bottom: 0; }
/* Tableaux avec boutons : contenu centré verticalement */
.table-middle td, .table-middle th { vertical-align: middle; }
/* Petits boutons : proportions et arrondi cohérents avec les boutons normaux */
.btn-sm { padding: 5px 12px; font-size: .85rem; border-radius: 7px; line-height: 1.3; }

/* Boutons entièrement arrondis (pilule), partout */
.btn, .btn-sm, .toggle { border-radius: 999px; }
.btn { padding: 8px 18px; }
.btn-sm { padding: 5px 14px; }
/* Arrondi intermédiaire : plus marqué que les coins d'origine, sans aller jusqu'à la pilule */
.btn { border-radius: 12px; }
.btn-sm, .toggle { border-radius: 10px; }
.portal-hint { margin: 0 0 14px; }

/* Contacts du portail (fiche client) : édition en ligne */
.contacts-table th.center, .contacts-table td.center { text-align: center; }
.contacts-table input:not([type=checkbox]) { padding: 5px 8px; width: 100%; max-width: 260px; }
.contacts-table input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.contacts-table form { display: inline-flex; margin: 0; }
.contact-save { visibility: hidden; margin-right: 6px; }
tr.contact-row.is-dirty .contact-save { visibility: visible; }
tr.contact-row.is-dirty td { background: var(--warn-soft); }
.contact-email { display: flex; align-items: center; gap: 8px; }

/* Connexions Google / Apple */
.social-buttons { display: grid; gap: 8px; }
.btn-social { width: 100%; justify-content: center; gap: 10px; padding: 10px 16px; font-weight: 600; }
.btn-social.btn-auto { width: auto; }
.btn-apple { background: #000; border-color: #000; color: #fff; }
.btn-apple:hover { background: #222; border-color: #222; color: #fff; }
.identity-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.identity-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.identity-list form { margin: 0 0 0 auto; }
.identity-main { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.identity-icon { display: inline-flex; flex: none; }
.identity-badge { display: inline-flex; flex: none; cursor: help; }
.identity-badge svg { width: 16px; height: 16px; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; }

/* ---------- Écrans d'accès (connexion, 2FA, invitation, portail) ---------- */
body.auth {
    --auth-surface: #0b2236;
    --auth-on-surface: #f4f8fb;
    min-height: 100vh; display: flex; flex-direction: column; background: #eef0f1;
}
.auth-topbar {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    height: 64px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.auth-topbar .brand { font-size: 1.05rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth-split { flex: 1; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }

/* Panneau de marque */
.auth-hero {
    position: relative; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; align-items: center; row-gap: 28px;
    padding: clamp(32px, 7vh, 72px) 40px 24px; overflow: hidden; text-align: center;
    background: var(--auth-surface); color: var(--auth-on-surface);
}
.auth-hero-body { max-width: 28rem; position: relative; z-index: 1; }
.auth-hero-title, .auth-hero-slogan { margin: 0; font-weight: 650; line-height: 1.1; letter-spacing: -.02em; }
.auth-hero-title { font-size: clamp(2.1rem, 3.3vw, 2.9rem); color: var(--auth-on-surface); }
.auth-hero-slogan { margin-top: 20px; font-size: clamp(1.6rem, 2.5vw, 2.2rem); color: var(--brand); }
.auth-hero-text { margin: 24px auto 0; max-width: 24rem; font-size: .95rem; line-height: 1.6; color: rgba(244, 248, 251, .82); }
/* trois timesheets translucides empilées sous le texte */
.auth-hero-cards { position: relative; width: 272px; height: 152px; pointer-events: none; }
.auth-hero-card {
    position: absolute; display: grid; align-content: start; gap: 9px; width: 184px; height: 128px; padding: 18px 16px;
    border: 1px solid rgba(0, 161, 232, .45); border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 161, 232, .32), rgba(0, 161, 232, .10));
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
}
.auth-hero-card i { display: block; height: 6px; border-radius: 3px; background: rgba(244, 248, 251, .28); }
.auth-hero-card i:nth-child(1) { width: 55%; background: rgba(244, 248, 251, .5); }
.auth-hero-card i:nth-child(2) { width: 90%; }
.auth-hero-card i:nth-child(3) { width: 75%; }
.auth-hero-card i:nth-child(4) { width: 40%; margin-left: auto; background: rgba(0, 161, 232, .7); }
.auth-hero-card:nth-child(1) { left: 0; top: 24px; transform: rotate(-5deg); opacity: .6; }
.auth-hero-card:nth-child(2) { left: 52px; top: 0; transform: rotate(3deg); opacity: .8; }
.auth-hero-card:nth-child(3) { left: 92px; top: 16px; transform: rotate(10deg); }
.auth-hero-footer { margin: 0; font-size: .8rem; color: rgba(244, 248, 251, .7); }

/* Carte */
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-box {
    width: 100%; max-width: 32rem; padding: 40px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px -18px rgba(11, 34, 54, .35);
}
.auth-title { margin: 0 0 4px; font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; }
.auth-subtitle { margin: 0 0 20px; font-size: .95rem; color: var(--muted); }
.auth-form { display: grid; gap: 20px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label { font-size: .95rem; font-weight: 700; }
.auth-field input, .auth-form > input { height: 42px; }
.auth-form .otp-input { height: 52px; }
.auth-submit { width: 100%; height: 42px; font-weight: 700; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; cursor: pointer; }
.auth-hint { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
.auth-form .auth-hint { margin: -8px 0 0; }
.auth-back { margin: 18px 0 0; font-size: .9rem; }
.auth-box .login-sep { margin: 22px 0; }
.auth-box .social-buttons .btn-social { height: 42px; }
.auth-password { position: relative; }
.auth-password input { padding-right: 44px; }
.auth-password-toggle {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.auth-password-toggle:hover { color: var(--text); }
.auth-password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-password-toggle .icon-eye-off, .auth-password-toggle[aria-pressed="true"] .icon-eye { display: none; }
.auth-password-toggle[aria-pressed="true"] .icon-eye-off { display: block; }

@media (max-width: 991px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    /* Sans le panneau de marque : la carte se place en haut, pas au milieu de l'écran */
    .auth-panel { align-items: flex-start; padding-top: 28px; }
}
@media (max-width: 575px) {
    .auth-panel { padding: 16px 12px; }
    .auth-box { padding: 28px 20px; }
    .lang-code { display: none; }
}

/* Encart d'information (aperçu non validé) */
.info-block {
    display: grid; grid-template-columns: 28px 1fr; column-gap: 12px;
    background: var(--accent-soft); border: 1px solid #c7e6f5;
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; color: var(--text);
}
.info-block::before {
    content: "i"; grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-style: italic; font-family: Georgia, serif;
}
.info-title { font-weight: 700; color: var(--accent); margin: 3px 0 4px; }
.info-block ul { margin: 0; padding-left: 18px; }
.info-block li { margin: 3px 0; }

/* Période validée : état de la publication, du PDF, de Falco, du projet et des emails */
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.status-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.status-list li > .pill { min-width: 84px; text-align: center; }
.status-list form { margin: 0; }
.status-list .block { display: block; }
ul.tight { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Icônes, langue, menu mobile ---------- */
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
    padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; display: block; }
.lang-menu { position: relative; flex: none; }
.lang-menu summary {
    list-style: none; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; font-size: .85rem; font-weight: 600;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after {
    content: ""; width: 6px; height: 6px; margin-left: 1px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg); opacity: .55;
}
.lang-list {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 170px; padding: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .3);
}
.lang-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.lang-list a:hover { background: var(--surface-2); text-decoration: none; }
.lang-list a.is-current { background: var(--accent-soft); font-weight: 650; }
.nav-toggle { display: none; }
.user-email, .user-link { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 860px) {
    .topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 8px 14px; gap: 8px 10px; }
    .topbar .brand { margin-right: auto; }
    .topbar .nav { order: 10; flex-basis: 100%; }
    .topbar .user { gap: 6px; }
    .user-email, .user-link { max-width: 150px; }
    /* Back-office : menu replié derrière le bouton ☰ */
    .nav-toggle { display: inline-flex; order: 5; }
    .topbar.has-toggle .nav { display: none; flex-direction: column; gap: 2px; padding: 4px 0 8px; overflow: visible; }
    .nav-toggle-input:checked ~ .nav { display: flex; }
    .topbar.has-toggle .nav a { padding: 10px 12px; }
    .env-badge { font-size: .75rem; padding: 3px 8px; }
}
@media (max-width: 520px) {
    .user-email, .user-link { display: none; }
    .lang-code { display: none; }
    .lang-menu summary { padding: 0 8px; }
}

/* Client sans client Falco : très visible */
.alert-big { padding: 18px 22px; }
.alert-big .alert-title { font-size: 1.08rem; }
.alert-big .btn { margin-top: 4px; }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: #f5cccc; font-weight: 650; }
a.pill-danger:hover { text-decoration: none; background: #fbdada; }
tr.row-alert td { background: #fff6f6; }
.tab-count.danger { background: var(--danger); color: #fff; border-color: var(--danger); font-weight: 700; }
.lang-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
/* Logo bien visible : dans le panneau de gauche ; sur petit écran (panneau masqué), en tête de la carte */
.auth-hero-logo { display: flex; justify-content: center; }
.auth-hero-logo img { width: 160px; height: 160px; border-radius: 32px; display: block; box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .65); }
.auth-logo { display: none; align-items: center; gap: 14px; font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
/* En-tête de la carte : logo (petits écrans) à gauche, langue à droite */
.auth-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.auth-box-head .lang-menu { margin-left: auto; }
.auth-logo img { width: 64px; height: 64px; border-radius: 14px; display: block; box-shadow: 0 6px 18px -8px rgba(11, 34, 54, .45); }
@media (max-width: 991px) { .auth-logo { display: flex; } }
/* Écrans peu hauts : les timesheets décoratives passeraient sous le texte */
@media (max-height: 880px) { .auth-hero-cards { display: none; } }
@media (max-height: 700px) { .auth-hero-logo img { width: 120px; height: 120px; border-radius: 26px; } }
.icon-btn.icon-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Invalidation d'une période */
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; border-color: #991b1b; }
.btn-danger-outline { color: var(--danger); border-color: #f0b4b4; }
.btn-danger-outline:hover { background: var(--danger-soft); text-decoration: none; }
.invalidate-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.invalidate-list li { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); }
.invalidate-danger { background: var(--danger-soft); border-color: #f5cccc !important; color: var(--danger); font-weight: 600; }
.invalidate-warn { background: var(--warn-soft); border-color: #f0e2b6 !important; }
.invalidate-info { background: var(--surface-2); }
/* Case à cocher + texte sur la même ligne, y compris dans un formulaire .stack (dont les libellés sont en colonne) */
.stack label.check-line, label.check-line { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; cursor: pointer; }
label.check-line input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.stack label.auth-check { display: flex; }

.client-meta .lang-badge { vertical-align: middle; }
.check-mark { color: var(--ok); font-weight: 700; }
td.center, th.center { text-align: center; }
/* Plusieurs timesheets en cours : une par ligne */
.ts-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ts-links .btn { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.grid-table { margin-top: 6px; }
.grid-table td { padding: 4px 8px; }
.grid-table input { max-width: 110px; text-align: right; padding: 4px 8px; }
/* Modèles de projets */
.tpl-name { font-size: 1.1rem; font-weight: 650; max-width: 420px; }
.tpl-pattern { width: 100%; min-width: 260px; }
.tpl-items td { vertical-align: top; }
.tpl-new td { background: var(--surface-2); }
/* Projets récurrents (modèle ou client) */
.items-table td { vertical-align: top; }
.items-table th:first-child { width: 55%; }
.items-table .tpl-pattern { width: 100%; min-width: 320px; }
.items-add { margin-top: 10px; }
.items-table td.center { padding-top: 20px; }
.items-table td.num .icon-btn { margin-top: 3px; }
.items-table td.item-grid-cell { padding-top: 12px; }
.prepaid-table td:first-child { width: 45%; }
.prepaid-name, .project-name { width: 100%; }
.prepaid-terms { margin-top: 6px; flex-wrap: wrap; }
.prepaid-terms label { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); }
.prepaid-terms input { width: 90px; text-align: right; padding: 4px 8px; }
.project-name input { flex: 1; min-width: 280px; max-width: none; padding: 6px 10px; }
.prepaid-name input { flex: 1; min-width: 300px; max-width: none; padding: 8px 10px; }
.prepaid-form .prepaid-title { grid-column: 1 / -1; }
.prepaid-form label.prepaid-title { margin-bottom: -6px; }
.prepaid-name-row { display: flex; gap: 8px; }
.prepaid-name-row input { flex: 1; }
.prepaid-name-row select { width: auto; max-width: 45%; }
.prepaid-new { margin-top: 16px; }
.prepaid-new summary { list-style: none; }
.prepaid-new summary::-webkit-details-marker { display: none; }
.prepaid-new[open] summary { display: none; }
.prepaid-new .prepaid-form { margin-top: 0; }
.loader-overlay {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    background: rgba(29, 29, 27, .45); backdrop-filter: blur(2px);
}
.loader-overlay[hidden] { display: none; }
.loader-box {
    display: grid; justify-items: center; gap: 10px; min-width: 280px; max-width: 420px; padding: 28px 32px;
    background: var(--surface); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); text-align: center;
}
.loader-spinner {
    width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent);
    animation: loader-spin .8s linear infinite;
}
.loader-text { font-weight: 650; font-size: 1.05rem; }
.loader-sub { color: var(--muted); font-size: .85rem; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader-spinner { animation-duration: 2.4s; } }
.waiting-list { margin: 6px 0 12px; padding-left: 20px; }
tr.row-warn td { background: var(--danger-soft); }
.row-alert { margin-top: 3px; color: var(--danger); font-weight: 650; font-size: .88rem; }
.sub-head { margin: 22px 0 8px; font-size: 1rem; }
#projets .card-head + .sub-head { margin-top: 4px; }
.projects-table td:first-child { width: 46%; }
.prepaid-table td:first-child { width: 46%; }
.prepaid-table .mini-progress { width: 160px; margin: 4px 0 2px; }
.prepaid-table td .muted.small { white-space: nowrap; }
.projects-table .pill { margin-top: 4px; }
.row-tools { display: inline-flex; align-items: flex-start; gap: 6px; }
.closed-projects { margin-top: 18px; }
.closed-projects summary { list-style: none; }
.closed-projects summary::-webkit-details-marker { display: none; }
.closed-projects table { margin-top: 8px; font-size: .9rem; }
.prepaid-new summary { margin-top: 10px; }
.items-foot .row-actions { align-items: center; }
.items-foot .items-add { margin-top: 0; }
.insert-box { display: inline-flex; }
.insert-box summary { list-style: none; }
.insert-box summary::-webkit-details-marker { display: none; }
.insert-box[open] { display: inline-flex; gap: 8px; align-items: center; }
.insert-box[open] summary { display: none; }
.merge-box summary { list-style: none; }
td.num .merge-box, td.num .inline-form { display: inline-block; vertical-align: top; }
.inline-form { margin: 0; }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.merge-box summary::-webkit-details-marker { display: none; }
.merge-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-top: 8px; }
.merge-form select { width: 340px; max-width: 100%; }
.item-grid summary { list-style: none; }
.item-grid summary::-webkit-details-marker { display: none; }
.item-grid[open] { padding: 8px 10px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.item-grid-table { width: auto; margin: 8px 0 4px; }
.item-grid-table td { padding: 2px 6px 2px 0; border: 0; font-size: .85rem; white-space: nowrap; }
.item-grid-table input { width: 84px; text-align: right; padding: 4px 8px; }
.items-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.items-insert { display: flex; gap: 8px; align-items: center; margin: 0; }
.items-insert select { width: auto; max-width: 420px; }
.items-help { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.billing-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.billing-label { font-weight: 550; margin-bottom: 6px; }
.billing-cols .grid-table { width: 100%; margin-top: 0; }
.billing-cols .grid-table input { max-width: 120px; }
@media (max-width: 860px) { .billing-cols { grid-template-columns: 1fr; } }
.tpl-clients { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.tpl-clients h3 { margin: 0 0 8px; font-size: 1rem; }
.tpl-client-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.tpl-client-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.tpl-client-list li:last-child { border-bottom: 0; }
.tpl-client-select { max-width: 420px; }

