/*
 * Agency typeface (Bricolage Grotesque, SIL Open Font License), self-hosted: variable weight 200–800.
 */
@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/bricolage-grotesque-latin-ext-E7qegro.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/bricolage-grotesque-latin-ZzKOOYL.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Design tokens, from the agency charter (Figma "StudioJuillet-site", page Composants: couleurs/*, espaces/*,
 * radius/*). Black and white, the logo's pink-to-orange gradient as the only ornament; components only use
 * these tokens.
 */
:root {
    --color-bg: #f5f5f5;            /* gris-1 */
    --color-surface: #ffffff;       /* blanc */
    --color-text: #000000;          /* noir */
    --color-muted: #6e6e6e;         /* gris-3 */
    --color-line: #dfdfdf;          /* gris-2 */
    --color-accent: #000000;
    --color-accent-strong: #000000;
    --color-on-accent: #ffffff;
    --color-alert: #b3261e;
    --color-alert-bg: #fdecea;
    --color-success: #1f6b3d;
    --color-success-bg: #e3f2e8;
    --color-watch: #8a5a00;
    --color-watch-bg: #fbf0d9;
    --color-head-bg: #f5f5f5;
    --color-accent-soft: #fff1e4;   /* accent-3 #fdb876, very light */

    /* accent-1 … accent-5 */
    --brand-pink: #f98493;
    --brand-salmon: #ffa99b;
    --brand-apricot: #fdb876;
    --brand-orange: #ffa14a;
    --brand-tangerine: #fe7939;
    --gradient-horizontal: linear-gradient(90deg, var(--brand-tangerine), var(--brand-orange) 25%, var(--brand-apricot) 50%, var(--brand-salmon) 75%, var(--brand-pink));
    --gradient-vertical: linear-gradient(180deg, var(--brand-pink), var(--brand-salmon) 27%, var(--brand-apricot) 54%, var(--brand-orange) 78%, var(--brand-tangerine));

    --font-body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --radius: 10px;                 /* radius/10: panels, tables, cards */
    --radius-input: 5px;            /* radius/5: fields */
    --radius-full: 100px;           /* radius/full: buttons, filters */
    --space: 16px;
    /* Height of every single-line control (inputs, selects, buttons), so they line up in a row: the charter's
       small size (10 px padding, 20 px line). */
    --control-height: 40px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    font-optical-sizing: auto;
}

::placeholder {
    color: var(--color-muted);
    opacity: 1;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-text);
}

.placeholder {
    max-width: 640px;
    margin: 15vh auto 0;
    padding: 0 var(--space);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.placeholder h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.placeholder p {
    margin: 0;
    color: var(--color-muted);
}

.placeholder .placeholder__brand {
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-accent);
}

.placeholder .placeholder__account {
    font-size: 14px;
}

a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: var(--color-muted);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

a:hover {
    text-decoration-color: currentColor;
}

/* Sign-in page: the charter's blurred gradient behind a white panel. */
.auth-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--color-surface);
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: auto -10% -35% -10%;
    height: 70%;
    background: var(--gradient-horizontal);
    filter: blur(120px);
    opacity: .55;
    pointer-events: none;
}

.auth {
    position: relative;
    max-width: 440px;
    margin: 0 auto;
    padding: 12vh max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px));
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.auth__panel {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth__panel h2 {
    margin: 0;
    font-size: 18px;
}

.auth__panel p {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}

.alert {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--color-alert-bg);
    color: var(--color-alert);
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--control-height);
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

/*
 * Single-line form controls share one height; textareas and multiple selects keep theirs. Specific rules
 * further down may set the padding: the height (border-box) wins and the text stays centred.
 */
input:is([type="text"], [type="email"], [type="url"], [type="tel"], [type="password"], [type="search"], [type="number"], [type="date"], [type="time"]),
select:not([multiple]) {
    height: var(--control-height);
    padding-block: 0;
    line-height: normal;
}

/* Plain: black; on hover a gradient ring (3 px in the charter's small size). */
.btn-primary {
    background: var(--color-text);
    color: var(--color-on-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    border: 3px solid transparent;
    padding-inline: 13px;
    background: linear-gradient(var(--color-text), var(--color-text)) padding-box, var(--gradient-horizontal) border-box;
}

/* Application shell: the charter's header (logo, centred menu), with the signed-in person on the right. */
.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px 24px;
    padding: 14px max(20px, env(safe-area-inset-right, 0px)) 14px max(20px, env(safe-area-inset-left, 0px));
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
}

/* Logo: the gradient disc, "Cockpit" in place of the agency name, the agency underneath, smaller. */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    color: var(--color-text);
    text-decoration: none;
}

.brand__mark {
    width: 40px;
    height: 40px;
    flex: none;
}

.brand__name {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand__product {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.brand__agency {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-muted);
}

.brand--large .brand__mark {
    width: 64px;
    height: 64px;
}

.brand--large .brand__product {
    font-size: 32px;
}

.brand--large .brand__agency {
    font-size: 14px;
}

.topbar__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Menu items: 20 px around, underlined in black on hover and for the current page. */
.topbar__nav a {
    padding: 6px 14px;
    color: var(--color-text);
    font-size: 16px;
    text-decoration: none;
}

.topbar__nav a:hover,
.topbar__nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--color-text);
    text-underline-offset: 6px;
}

.topbar__user {
    justify-self: end;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 16px;
    font-size: 14px;
}

@media (max-width: 860px) {
    .topbar {
        grid-template-columns: 1fr auto;
    }

    .topbar__nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        margin-inline: -14px;
    }
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px));
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-head h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.page-head p {
    margin: 4px 0 0;
}

.breadcrumb {
    font-size: 14px;
}

h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

h3 {
    margin: 16px 0 6px;
    font-size: 15px;
}

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

.small {
    font-size: 13px;
}

.strong {
    font-weight: 600;
}

.late {
    color: var(--color-alert);
    font-weight: 600;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.flash {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
}

.flash--success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.flash--error {
    background: var(--color-alert-bg);
    color: var(--color-alert);
}

/* Outlined: black line; on hover, filled black. */
.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--color-text);
    color: var(--color-on-accent);
}

button.btn {
    font: inherit;
    font-size: 15px;
    line-height: 20px;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    font-size: 14px;
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.segmented a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-size: 15px;
    line-height: 20px;
    text-decoration: none;
}

.segmented a:hover {
    background: var(--color-head-bg);
}

.segmented a[aria-current="true"] {
    background: var(--color-text);
    color: var(--color-on-accent);
}

.segmented a[aria-current="true"]::after {
    content: "";
    width: 14px;
    height: 8px;
    margin: -3px 0 0 2px;
    border: solid currentColor;
    border-width: 0 0 1.5px 1.5px;
    transform: rotate(-45deg);
}

/* Versions of a site */
.version-switch {
    margin-top: 12px;
}

.segmented a[aria-current="true"] .muted {
    color: inherit;
}

.panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.panel__head h2 {
    margin: 0;
}

.table tr[aria-current="true"] td {
    background: var(--color-accent-soft);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.table th,
.table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--color-line);
}

.table th {
    background: var(--color-head-bg);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-muted);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table .num {
    text-align: right;
    white-space: nowrap;
}

.table .actions {
    text-align: right;
}

.table--compact th,
.table--compact td {
    padding: 6px 10px;
}

.empty,
.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 20px;
}

.empty p {
    margin: 0 0 4px;
}

/* Weather and status badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge--ok {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge--watch {
    background: var(--color-watch-bg);
    color: var(--color-watch);
}

.badge--alert {
    background: var(--color-alert-bg);
    color: var(--color-alert);
}

.badge--none {
    background: var(--color-head-bg);
    color: var(--color-muted);
}

.badge--stale {
    opacity: .6;
}

.status {
    font-weight: 600;
}

/* Project sheet */
.facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.fact {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.fact__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-muted);
}

.fact__value {
    font-size: 18px;
    font-weight: 600;
}

.columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
}

/* A column holding several panels stacks them with the same gap. */
.columns > div {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.history {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history li {
    border-top: 1px solid var(--color-line);
    padding-top: 10px;
}

.history p {
    margin: 6px 0 0;
    font-size: 14px;
}

.quote {
    border-top: 1px solid var(--color-line);
    padding: 10px 0;
}

.quote summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    cursor: pointer;
}

.quote summary .num {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.quote .table-wrap {
    margin-top: 8px;
}

@media (max-width: 820px) {
    .facts,
    .columns {
        grid-template-columns: 1fr;
    }
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.form-grid--wide {
    grid-template-columns: 1fr;
}

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

.form label,
.form legend,
.inline-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 400;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="url"],
.form input[type="tel"],
.form input[type="password"],
.form input[type="date"],
.form input[type="time"],
.form input[type="number"],
.form select,
.form textarea,
.inline-form select,
.inline-form input[type="date"] {
    width: 100%;
    padding: 8px 15px;
    font: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-text);
    border-radius: var(--radius-input);
}

.form input:disabled,
.form select:disabled {
    background: var(--color-head-bg);
    color: var(--color-muted);
}

.form fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/* Symfony renders input, label, input, label… as siblings: the space goes after each label, not between all. */
.choice-list,
.choice-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
}

.choice-list label,
.choice-inline label {
    display: inline;
    font-weight: 400;
    margin: 0 20px 0 6px;
}

.form .help-text,
.form [id$="_help"] {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 4px;
}

.form ul {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    color: var(--color-alert);
    font-size: 13px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.inline-form label {
    flex-basis: 100%;
}

/* A select placed directly in the row grows to fill it. Only direct children: in a labelled column
   (.inline-form > div, a column flex box), a flex-basis would become a height. */
.inline-form > select {
    flex: 1 1 260px;
    width: auto;
}

.btn-danger {
    background: var(--color-surface);
    color: var(--color-alert);
    border: 1px solid var(--color-alert);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: var(--color-alert-bg);
}

.search {
    display: flex;
    gap: 8px;
    flex: 1 1 280px;
}

.search input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 6px 15px;
    font: inherit;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-input);
    background: var(--color-surface);
    color: var(--color-text);
}

.form > ul,
.form-errors {
    color: var(--color-alert);
}

.form input[type="checkbox"] + label,
.form label + input[type="checkbox"] {
    display: inline;
}

/* Project sections */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    border-bottom: 1px solid var(--color-line);
}

.tabs a {
    padding: 8px 0;
    color: var(--color-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tabs a:hover {
    color: var(--color-text);
}

.tabs a[aria-current="page"] {
    color: var(--color-text);
    border-bottom-color: var(--color-text);
}

.stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.stepper__step a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-top: 4px solid var(--color-line);
    background: var(--color-surface);
    border-radius: 0 0 var(--radius) var(--radius);
    color: var(--color-muted);
    text-decoration: none;
    min-width: 0;
}

.stepper__label {
    font-weight: 600;
    font-size: 14px;
}

.stepper__meta {
    font-size: 12px;
}

.stepper__step.is-done a {
    border-top-color: var(--color-success);
    color: var(--color-text);
}

.stepper__step.is-current a {
    border-image: var(--gradient-horizontal) 1;
    color: var(--color-text);
}

@media (max-width: 680px) {
    .stepper {
        grid-template-columns: 1fr;
    }
}

.phase--done {
    opacity: .85;
}

.phase__head,
.milestone__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin-bottom: 12px;
}

.phase__head h2,
.milestone__head h2 {
    margin: 0;
}

.phase__count {
    margin-left: auto;
}

.criteria {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.criterion {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.criterion form {
    margin: 0;
}

.criterion.is-checked .criterion__label {
    color: var(--color-muted);
}

.criterion__delete {
    margin-left: auto !important;
}

.check {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--color-line);
    border-radius: 5px;
    background: var(--color-surface);
    color: var(--color-on-accent);
    font-size: 14px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.is-checked .check {
    background: var(--color-success);
    border-color: var(--color-success);
}

span.check {
    cursor: default;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 14px;
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: var(--color-muted);
    text-underline-offset: 4px;
    cursor: pointer;
}

.link-button:hover {
    text-decoration-color: currentColor;
}

.link-button--danger {
    color: var(--color-alert);
}

.phase__actions,
.milestone__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--color-line);
    font-size: 14px;
}

.phase__actions .inline-form {
    flex: 1 1 320px;
}

.phase__actions input[type="text"] {
    flex: 1 1 200px;
    padding: 6px 15px;
    font: inherit;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-input);
    background: var(--color-surface);
    color: var(--color-text);
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.inline-action {
    display: inline;
    margin: 0;
}

.milestone__status {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    font-size: 14px;
}

.milestone--done h2 {
    color: var(--color-muted);
}

.deliverables {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.milestone-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.milestone-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.milestone-list__date {
    margin-left: auto;
    font-size: 14px;
    display: inline-flex;
    gap: 8px;
    align-items: baseline;
}

.form input[type="file"] {
    font: inherit;
    font-size: 14px;
}

.phase__actions select {
    padding: 6px 15px;
    font: inherit;
    font-size: 14px;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-input);
    background: var(--color-surface);
    color: var(--color-text);
}

/* Tasks and kanban */
.board {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.board__column {
    background: var(--color-head-bg);
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.board__column h2 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.board__cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
    flex: 1;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.card[data-move-url] {
    cursor: grab;
}

.card--late {
    border-left: 3px solid var(--color-alert);
}

.card--ghost {
    opacity: .4;
}

.card__title {
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.card__title:hover {
    text-decoration: underline;
}

.card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 12px;
    color: var(--color-muted);
}

.card__assignee {
    font-size: 12px;
}

.badge--task-todo {
    background: var(--color-head-bg);
    color: var(--color-muted);
}

.badge--task-in_progress {
    background: var(--color-watch-bg);
    color: var(--color-watch);
}

.badge--task-review {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.badge--task-done,
.badge--task-to_invoice {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge--task-estimate,
.badge--task-on_hold {
    background: var(--color-surface);
    color: var(--color-muted);
    border: 1px dashed var(--color-line);
}

.badge--task-closed {
    background: var(--color-head-bg);
    color: var(--color-success);
}

/* Ticket type and priority: only what stands out (évolution, anomalie; above normal priority). */
.badge--type-evolution {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.badge--type-bug {
    background: var(--color-alert-bg);
    color: var(--color-alert);
}

.badge--priority-3 {
    background: var(--color-watch-bg);
    color: var(--color-watch);
}

.badge--priority-4,
.badge--priority-5 {
    background: var(--color-alert);
    color: var(--color-on-accent);
}

.ticket-number {
    color: var(--color-muted);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

/* Kanban: En attente and Fermé are folded until their column reveals them. */
.board__column:not(.board__column--unfold) .card[data-folded] {
    display: none;
}

.board__statuses {
    margin: -6px 0 0;
}

.board__column > .link-button {
    align-self: flex-start;
}

.form select[multiple] {
    min-height: 8em;
}

section > h2 .small {
    font-weight: 400;
    margin-left: 8px;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 4px 24px;
}

.choice-grid label {
    display: inline;
    font-weight: 400;
    margin: 0 0 0 6px;
}

/* Gantt */
:root {
    --phase-scoping: #64748b;
    --phase-design: #8155c2;
    --phase-production: #2b6dbd;
    --phase-acceptance: #bf800b;
    --phase-delivery: #28834f;
}

.panel--alert {
    border-color: var(--color-alert);
    background: var(--color-alert-bg);
}

.panel ul {
    margin: 0 0 12px;
    padding-left: 18px;
    font-size: 14px;
}

.gantt-scroll {
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
}

.gantt {
    --hd: 10px;
    --day: calc(var(--hd) * 2);
    --label: 240px;
    position: relative;
    width: calc(var(--label) + var(--day) * var(--days));
    font-size: 13px;
}

.gantt__layer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--label);
    right: 0;
    pointer-events: none;
}

.gantt__off {
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--day);
    background: var(--color-head-bg);
}

.gantt__off--holiday {
    background: #ece4f5;
}

.gantt__today,
.gantt__target {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px solid var(--color-accent);
}

.gantt__target {
    border-left: 2px dashed var(--color-alert);
}

.gantt__row {
    display: flex;
    height: 40px;
    border-bottom: 1px solid var(--color-line);
}

.gantt__row--head,
.gantt__row--days {
    height: 22px;
}

.gantt__row--phase {
    height: 26px;
    background: color-mix(in srgb, var(--color-head-bg) 60%, transparent);
}

.gantt__label {
    position: sticky;
    left: 0;
    z-index: 3;
    flex: none;
    width: var(--label);
    padding: 2px 10px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-line);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.gantt__label a,
.gantt__label span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Room for descenders: overflow hidden would otherwise clip them. */
    line-height: 1.4;
}

.gantt__row--phase .gantt__label {
    font-weight: 600;
    background: var(--color-head-bg);
}

.gantt__row--head .gantt__label,
.gantt__row--days .gantt__label {
    font-size: 11px;
    color: var(--color-muted);
}

.gantt__track {
    position: relative;
    flex: none;
    width: calc(var(--day) * var(--days));
}

.gantt__week,
.gantt__day {
    position: absolute;
    top: 3px;
    font-size: 11px;
    color: var(--color-muted);
    white-space: nowrap;
}

/* Week labels start on Monday: a small gap keeps them apart from the previous day. */
.gantt__week {
    padding-left: 4px;
}

.gantt__day {
    width: var(--day);
    text-align: center;
    font-size: 10px;
}

.gantt__day.is-today {
    color: var(--color-accent);
    font-weight: 700;
}

.gantt__bar {
    position: absolute;
    top: 12px;
    height: 16px;
    border-radius: 4px;
    z-index: 1;
}

.gantt__bar--scoping { background: var(--phase-scoping); }
.gantt__bar--design { background: var(--phase-design); }
.gantt__bar--production { background: var(--phase-production); }
.gantt__bar--acceptance { background: var(--phase-acceptance); }
.gantt__bar--delivery { background: var(--phase-delivery); }

.gantt__bar.is-done {
    opacity: .45;
}

.gantt__bar.is-point {
    width: var(--hd) !important;
    transform: rotate(45deg) scale(.8);
    border-radius: 2px;
}

.gantt__baseline {
    position: absolute;
    top: 31px;
    height: 4px;
    border-radius: 2px;
    background: var(--color-muted);
    opacity: .5;
}

.gantt__baseline.is-late {
    background: var(--color-alert);
    opacity: .7;
}

.gantt__absence {
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--hd);
    z-index: 2;
}

.gantt__absence--leave {
    background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--color-alert) 70%, transparent) 0 2px, transparent 2px 5px);
}

.gantt__absence--pending {
    background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--color-watch) 55%, transparent) 0 1.5px, transparent 1.5px 5px);
}

.gantt__absence--off {
    background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--color-muted) 35%, transparent) 0 1px, transparent 1px 3px);
}

.gantt__milestone {
    position: absolute;
    top: 13px;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    background: var(--color-text);
    transform: rotate(45deg);
    z-index: 2;
}

.gantt__milestone.is-done {
    background: var(--color-success);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 12px;
    color: var(--color-muted);
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 2px;
}

.swatch--baseline {
    height: 4px;
    background: var(--color-muted);
}

.swatch--milestone {
    width: 9px;
    height: 9px;
    background: var(--color-text);
    transform: rotate(45deg);
}

.toolbar form {
    margin: 0;
}

.inline-form > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inline-form > div label {
    flex-basis: auto;
}

.inline-form input[type="number"],
.inline-form input[type="date"] {
    padding: 6px 15px;
    font: inherit;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-input);
    background: var(--color-surface);
    color: var(--color-text);
}

/* Phases and criteria editing (lot 1 feedback) */
.inline-form input[type="text"] {
    flex: 1 1 200px;
    min-width: 0;
    padding: 6px 15px;
    font: inherit;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-input);
    background: var(--color-surface);
    color: var(--color-text);
}

.phase__edit {
    flex-basis: 100%;
    font-size: 14px;
}

.phase__edit summary {
    display: inline;
    list-style: none;
}

.phase__edit summary::-webkit-details-marker,
.criterion__edit summary::-webkit-details-marker {
    display: none;
}

.phase__edit-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 8px;
}

.phase__edit-body .inline-form {
    flex: 1 1 320px;
}

.criterion__handle {
    cursor: grab;
    color: var(--color-muted);
    user-select: none;
}

.criterion.is-ghost {
    opacity: .4;
}

.criterion__actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-left: auto;
    font-size: 14px;
}

.criterion__edit summary {
    display: inline;
    list-style: none;
}

.criterion__edit[open] {
    flex-basis: 100%;
    order: 10;
}

.criterion__edit .inline-form {
    margin-top: 6px;
}

.icon-button {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.icon-button:disabled {
    opacity: .35;
    cursor: default;
}

/* Tasks of a criterion */
.task-links {
    margin: 0;
    padding-left: 18px;
}

.task-links li + li {
    margin-top: 4px;
}

.task-rows td {
    vertical-align: top;
}

.task-rows input[type="text"] {
    width: 100%;
    min-width: 220px;
}

.task-rows input[type="number"] {
    width: 90px;
}

.task-rows tr.has-error td {
    background: var(--color-alert-bg);
}

.form-error {
    color: var(--color-alert);
    font-size: 14px;
}

.checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-weight: 400 !important;
}

/* Planning revisions */
.early {
    color: var(--color-success);
    font-weight: 600;
}

.page-intro {
    margin: 0 0 16px;
}

.page-intro h2 {
    margin: 0 0 4px;
}

.page-intro p {
    margin: 0 0 4px;
}

.revision__comment {
    display: block;
    margin-top: 4px;
    max-width: 60ch;
}

.reference-picker {
    margin: 0 0 12px;
}

/* Gantt tooltips and critical chain */
.gantt__bar.is-critical {
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-alert);
}

.swatch--critical {
    background: var(--color-surface);
    box-shadow: inset 0 0 0 2px var(--color-alert);
}

.tooltip {
    position: fixed;
    z-index: 50;
    max-width: min(340px, calc(100vw - 16px));
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgb(0 0 0 / .16);
    font-size: 13px;
    line-height: 1.4;
}

.tooltip[hidden] {
    display: none;
}

.tooltip__title {
    font-size: 14px;
}

.tooltip__slip {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--color-line);
}

.slip-detail summary {
    cursor: pointer;
    font-weight: 600;
}

.slip-detail[open] summary {
    margin-bottom: 8px;
}

/* Meetings and decisions */
.meetings {
    list-style: none;
    margin: 0;
    padding: 0;
}

.meeting-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    padding: 10px 0;
    border-top: 1px solid var(--color-line);
}

.meeting-row:first-child {
    border-top: 0;
}

.meeting-row__date {
    flex: 0 0 11em;
    color: var(--color-muted);
    font-size: 14px;
}

.meeting-row__main {
    flex: 1 1 16em;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prose {
    margin: 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.decisions {
    margin: 0 0 12px;
    padding-left: 22px;
}

.decisions li {
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.decisions .inline-action {
    display: inline;
    margin-left: 8px;
}

.decision-log {
    list-style: none;
    margin: 0;
    padding: 0;
}

.decision-log__head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    font-size: 16px;
}

.decision-log__head span {
    color: var(--color-muted);
    font-weight: 400;
    font-size: 14px;
}

.meeting-action summary {
    cursor: pointer;
}

.meeting-action[open] summary {
    margin-bottom: 8px;
}

/* Meeting participants: the project team checked in a list, the rest of the agency folded. */
.participants .choice-list {
    margin-bottom: 8px;
}

.participants > .muted {
    margin: 0 0 4px;
}

.participants__more summary {
    margin-bottom: 6px;
}

.participant-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

/* Time spent and budget */
.facts--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .facts--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.meter {
    display: block;
    height: 6px;
    margin: 4px 0;
    border-radius: 3px;
    background: var(--color-head-bg);
    overflow: hidden;
}

.meter__bar {
    display: block;
    height: 100%;
    background: var(--gradient-horizontal);
}

.meter__bar.is-alert {
    background: var(--color-alert);
}

.time-form__fields {
    display: grid;
    grid-template-columns: minmax(0, 10em) minmax(0, 7em) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

@media (max-width: 640px) {
    .time-form__fields {
        grid-template-columns: 1fr 1fr;
    }

    .time-form__fields > :last-child {
        grid-column: 1 / -1;
    }
}

.time-form {
    margin-top: 12px;
}

.time-entries .actions {
    white-space: nowrap;
    text-align: right;
}

.time-entries .actions > * {
    display: inline-block;
    margin-left: 8px;
}

.time-entries td:first-child {
    white-space: nowrap;
}

/* "Temps": a project's row heads its tickets. */
.time-report__project > * {
    background: var(--color-head-bg);
    font-weight: 600;
}

.time-report__project th {
    text-align: left;
}
