* { box-sizing: border-box; }
:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172b35;
    background: #f2f7f6;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --brand: #0d776f;
    --brand-dark: #075b56;
    --muted: #647780;
    --line: #dce7e5;
}
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    padding: 32px 18px;
    background:
        radial-gradient(ellipse at 12% 0%, rgba(13, 119, 111, .10), transparent 34rem),
        #f2f7f6;
}
main {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 42px 48px;
    background: #fff;
    border: 1px solid rgba(220, 231, 229, .8);
    border-radius: 20px;
    box-shadow: 0 18px 55px rgba(27, 62, 67, .08);
}
main.etroit { max-width: 760px; }
main.large { max-width: 1300px; }
.install-app { display: flex; flex-direction: column; align-items: flex-end; margin: -20px 0 14px; }
.install-button {
    display: inline-flex;
    width: auto;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 13px;
    border: 1px solid #b9d8d3;
    border-radius: 999px;
    background: #f5fbfa;
    color: var(--brand-dark);
    font-size: .84rem;
}
.install-button:hover { background: #e6f4f1; }
.install-button[hidden] { display: none; }
.install-status { max-width: 300px; margin: 7px 0 0; color: var(--muted); font-size: .8rem; text-align: right; }
.form-header { text-align: center; }
.brand-mark {
    display: inline-grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    background: #e6f4f1;
    color: var(--brand);
    font-size: 1.35rem;
    font-weight: 800;
}
.eyebrow {
    margin: 18px 0 7px;
    color: var(--brand);
    font-size: .73rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(1.55rem, 4vw, 2rem); letter-spacing: -.04em; }
.intro { max-width: 480px; margin: 12px auto 30px; color: var(--muted); line-height: 1.6; }
.form-section { padding-top: 23px; border-top: 1px solid var(--line); }
.form-section + .form-section { margin-top: 24px; }
.form-section h2 { margin: 0 0 4px; font-size: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.field-wide { grid-column: 1 / -1; }
.form-grid > div { min-width: 0; }
label { display: block; margin: 16px 0 7px; color: #344a52; font-size: .88rem; font-weight: 650; }
label.required::after { content: " *"; color: #b3261e; }
input, select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #cbd9d7;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #172b35;
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder { color: #9aa9ad; }
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 119, 111, .13); }
input:user-invalid, select:user-invalid { border-color: #c33d3d; }
.ts-wrapper { width: 100%; min-height: 48px; }
.ts-wrapper.single .ts-control {
    min-height: 48px;
    padding: 11px 42px 11px 13px;
    border: 1px solid #cbd9d7;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    color: #172b35;
    font: inherit;
}
.ts-wrapper.single .ts-control::after { right: 15px; }
.ts-wrapper.focus .ts-control { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 119, 111, .13); }
.ts-wrapper.single.dropdown-active .ts-control { border-radius: 10px 10px 0 0; }
.ts-wrapper .ts-control > input { color: #172b35; font: inherit; }
.ts-wrapper .ts-control > input::placeholder { color: #9aa9ad; }
.ts-dropdown { z-index: 20; border-color: #cbd9d7; color: #172b35; font: inherit; }
.ts-dropdown .option { padding: 10px 13px; }
.ts-dropdown .active { background: #e6f4f1; color: #172b35; }
.ts-dropdown .no-results { padding: 10px 13px; color: var(--muted); }
.required-note { margin: 19px 0 0; color: var(--muted); font-size: .8rem; }
.required-note span { color: #b3261e; }
button {
    width: 100%;
    min-height: 52px;
    margin-top: 18px;
    padding: 12px 18px;
    border: 0;
    border-radius: 11px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}
button:hover { background: var(--brand-dark); }
button:active { transform: translateY(1px); }
button.is-loading::after, input[type="submit"].is-loading::after {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 9px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    vertical-align: -.15em;
    animation: button-spinner .7s linear infinite;
}
button:disabled, input[type="submit"]:disabled { cursor: wait; opacity: .75; }
@keyframes button-spinner { to { transform: rotate(360deg); } }
button:focus-visible, a:focus-visible { outline: 3px solid #6abbb3; outline-offset: 3px; }
.submit-button { display: flex; align-items: center; justify-content: space-between; }
.submit-button span:last-child { font-size: 1.3rem; }
ul { padding-left: 18px; color: #b3261e; }
.erreur { padding: 12px 14px; border-radius: 9px; background: #fff0ef; color: #a32620; }
.succes { padding: 13px 15px; border: 1px solid #b9e2cd; border-radius: 10px; background: #eaf8ef; color: #20643e; }
footer { margin-top: 25px; text-align: center; font-size: .86rem; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
.defilement { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-actions, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-actions { margin: 18px 0; }
.action-link, .button-secondary, .button-small {
    display: inline-flex;
    width: auto;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #b9d8d3;
    border-radius: 9px;
    background: #f5fbfa;
    color: var(--brand-dark);
    font-size: .85rem;
    font-weight: 650;
    text-decoration: none;
}
.admin-actions .button-secondary { font: inherit; font-size: .85rem; }
.action-link:hover, .button-secondary:hover { background: #e6f4f1; }
.button-small { min-height: 34px; padding: 6px 9px; font-size: .78rem; white-space: nowrap; }
.button-small svg, .action-logout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.button-small svg { width: 17px; height: 17px; }
.row-actions { min-width: 290px; }
.row-actions button + button { margin-left: 4px; }
.action-clinops { border-color: #d8cdf7; background: #f4f0ff; color: #5b35a2; }
.action-clinops:hover { border-color: #c5b5ed; background: #e9e0ff; color: #492889; }
.action-complete { border: 1px solid #b9e2cd; background: #eaf8ef; color: #20643e; }
.action-complete:hover { border-color: #8bcaa8; background: #d6f0e0; color: #174c2f; }
.row-actions .action-view { border-color: #b9e1d2; background: #effaf5; color: #16734b; }
.row-actions .action-view:hover { background: #def4e9; }
.row-actions .action-edit { border-color: #bed6f5; background: #eff6ff; color: #1558a6; }
.row-actions .action-edit:hover { background: #dcecff; }
.row-actions .action-delete { border-color: #f0c5c0; background: #fff2f0; color: #b42318; }
.row-actions .action-delete:hover { background: #ffe3df; }
.action-logout { border-color: #f2d19a; background: #fff8eb; color: #8a4b08; }
.action-logout:hover { background: #ffefcf; }
.button-danger { border: 1px solid #e7b9b6; background: #fff4f3; color: #a32620; }
.button-danger:hover { background: #ffe7e5; }
.status-pill { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eaf8ef; color: #20643e; font-size: .78rem; white-space: nowrap; }
.status-pill.status-done { background: #e3f2fd; color: #14558a; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 20px 0 6px; }
.pagination a, .pagination-disabled { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 12px; border: 1px solid #b9d8d3; border-radius: 9px; background: #f5fbfa; font-size: .88rem; font-weight: 650; text-decoration: none; }
.pagination a:hover { background: #e6f4f1; }
.pagination-disabled { border-color: var(--line); background: #f7f9f9; color: #9aa9ad; }
.pagination-current { color: var(--muted); font-size: .88rem; }
.stats-section { margin: 22px 0 26px; }
.stats-section h2 { margin: 0 0 12px; font-size: 1.05rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { display: flex; min-height: 142px; flex-direction: column; justify-content: space-between; padding: 18px; border: 1px solid #dce7e5; border-top: 4px solid #0d776f; border-radius: 15px; background: linear-gradient(145deg, #fff, #f7fbfa); box-shadow: 0 8px 24px rgba(27, 62, 67, .06); }
.stat-card strong { color: #172b35; font-size: 2rem; line-height: 1; letter-spacing: -.04em; }
.stat-card-label { color: #344a52; font-size: .9rem; font-weight: 700; }
.stat-card-foot { color: var(--muted); font-size: .78rem; }
.stat-card-total { border-top-color: #0d776f; }
.stat-card-non_marque { border-top-color: #647780; }
.stat-card-a_enregistrer { border-top-color: #5b35a2; }
.stat-card-enregistre { border-top-color: #16734b; }
.remember-label, .password-toggle-label { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.remember-label { margin-top: 14px; }
.password-toggle-label { margin-top: 8px; font-size: .84rem; }
.remember-label input, .password-toggle-label input { display: inline-block; width: 17px; min-height: 17px; margin: 0; padding: 0; accent-color: var(--brand); }
.suggestion-rouge { display: block; margin-top: 3px; color: #b42318; font-weight: 700; overflow-wrap: anywhere; }
.suggestion-rouge small { display: block; margin-top: 2px; color: #b42318; font-size: .68rem; font-weight: 500; }
.muted { color: var(--muted); }
.confirmation-dialog, .edit-dialog, .details-dialog {
    width: min(560px, calc(100% - 28px));
    max-height: min(90vh, 850px);
    overflow: auto;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: inherit;
    box-shadow: 0 24px 80px rgba(22, 46, 49, .25);
}
.confirmation-dialog::backdrop, .edit-dialog::backdrop, .details-dialog::backdrop { background: rgba(14, 35, 39, .55); }
.confirmation-dialog h2, .edit-dialog h2, .details-dialog h2 { margin: 0 0 12px; font-size: 1.25rem; }
.details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 0; }
.details-list > div { min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.details-list dt { margin-bottom: 4px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.details-list dd { margin: 0; overflow-wrap: anywhere; }
.confirmation-dialog p { line-height: 1.55; }
.dialog-actions { justify-content: flex-end; margin-top: 18px; }
.dialog-actions button { width: auto; min-width: 110px; margin: 0; }
.edit-form input, .edit-form select { min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
    body { padding: 14px 10px; }
    main { padding: 29px 21px; border-radius: 16px; }
    .install-app { margin-top: -12px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .details-list { grid-template-columns: minmax(0, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { min-height: 125px; padding: 14px; }
    .field-wide { grid-column: auto; }
    .intro { margin-bottom: 24px; }
}
@media (max-width: 380px) { .stats-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
