@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/archivo-latin-ext.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: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/archivo-latin.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;
}

:root {
    --ink: #0a0a0a;
    --paper: #ffffff;
    --board: #f3f3f3;
    --rule: #e1e1e1;
    --rule-strong: #0a0a0a;
    --muted: #5c5c5c;
    --rail-muted: #9a9a9a;
    --field-line: #c9c9c9;
    --danger: #b3131b;
    --radius: 2px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --font: "Archivo", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scrollbar-color: #bdbdbd transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 420;
    line-height: 1.5;
    letter-spacing: -0.005em;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--ink);
    color: var(--paper);
}

a {
    color: inherit;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

button,
input,
textarea,
select {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
}

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

h1 {
    margin: 0;
    font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
    font-weight: 780;
    font-stretch: 82%;
    line-height: 1.05;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

h2 {
    margin: 0;
}

.lead {
    margin: 10px 0 0;
    max-width: 60ch;
    color: var(--muted);
}

/* Brand */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 800;
    font-stretch: 78%;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mark {
    width: 22px;
    height: 22px;
    flex: none;
}

/* Buttons */

button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--paper);
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.primary:hover {
    background: var(--paper);
    color: var(--ink);
}

.primary:disabled {
    cursor: progress;
    opacity: 0.6;
}

.primary.is-wide {
    width: 100%;
    height: 48px;
    margin-top: 8px;
}

.ghost {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 140ms var(--ease-out);
}

.ghost:hover {
    background: var(--board);
}

.danger-text {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 600;
    transition: border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.danger-text:hover,
.danger-text:focus-visible {
    border-color: var(--danger);
    color: var(--danger);
    outline-color: var(--danger);
}

/* Fields */

.field {
    display: grid;
    gap: 6px;
}

.field > span,
.field > label {
    font-size: 0.74rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink);
}

input,
textarea,
select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    background: var(--paper);
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
    caret-color: var(--ink);
    transition: border-color 140ms var(--ease-out);
}

textarea {
    height: auto;
    min-height: 96px;
    padding: 10px 12px;
    line-height: 1.5;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #6b6b6b;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #8f8f8f;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--ink);
    outline-offset: -1px;
    border-color: var(--ink);
}

input[readonly] {
    background: var(--board);
    border-color: transparent;
    color: var(--muted);
}

input[aria-invalid="true"] {
    border-color: var(--danger);
}

input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    box-shadow: inset 0 0 0 1000px var(--paper);
}

.choice input,
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    padding: 0;
    accent-color: var(--ink);
}

input[type="file"] {
    height: auto;
    padding: 10px 0;
    background: transparent;
    border: 0;
}

input[type="file"]::file-selector-button {
    height: 36px;
    margin-right: 12px;
    padding: 0 14px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.password {
    position: relative;
    display: block;
}

.password input {
    padding-right: 84px;
}

.password .ghost {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
}

.choices {
    display: grid;
    gap: 10px;
}

.choice {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.form-error {
    padding: 12px 14px;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    color: var(--danger);
    font-weight: 550;
}

.form-error p {
    margin: 0;
}

.form-error p + p {
    margin-top: 4px;
}

.field-error {
    margin: 0;
    color: var(--danger);
    font-size: 0.86rem;
    font-weight: 600;
}

abbr {
    color: var(--ink);
    text-decoration: none;
}

/* Status and empty */

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px;
    padding: 12px 14px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    font-weight: 550;
}

.status::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: none;
    background: var(--ink);
}

.empty,
.drop-hint {
    display: grid;
    justify-items: start;
    gap: 8px;
    margin: 0;
    padding: 28px 20px;
    border: 1px dashed var(--field-line);
    border-radius: var(--radius);
    color: var(--muted);
}

.drop-hint {
    justify-items: center;
    text-align: center;
}

.empty p {
    margin: 0;
}

.empty a {
    color: var(--ink);
    font-weight: 650;
    text-decoration: underline;
}

/* App shell */

.app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

.rail {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
    height: 100vh;
    padding: 24px 16px 20px;
    background: var(--ink);
    color: var(--paper);
}

.rail ::selection {
    background: var(--paper);
    color: var(--ink);
}

.rail :focus-visible {
    outline-color: var(--paper);
}

.rail .brand {
    padding: 0 8px;
}

.side-nav {
    display: grid;
    gap: 2px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding: 0 8px;
    border-radius: var(--radius);
    color: var(--rail-muted);
    font-weight: 550;
    text-decoration: none;
    transition: color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex: none;
}

.side-nav a:hover {
    color: var(--paper);
    background: #1a1a1a;
}

.side-nav a.is-active {
    background: var(--paper);
    color: var(--ink);
}

.rail-foot {
    display: grid;
    gap: 6px;
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid #262626;
}

.who {
    overflow: hidden;
    color: var(--rail-muted);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-foot form {
    margin: 0;
}

.rail-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: var(--paper);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.rail-logout:hover {
    text-decoration-thickness: 2px;
}

.rail-logout .nav-icon {
    width: 18px;
    height: 18px;
}

.workspace-main {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 52px;
    padding: 0 40px;
    border-bottom: 1px solid var(--rule);
}

.crumb,
.today {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.content {
    max-width: 1320px;
    padding: 40px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

/* Dashboard board */

.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 2px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    background: var(--board);
}

.board-cell {
    display: grid;
    align-content: space-between;
    gap: 28px;
    min-height: 196px;
    padding: 20px 24px 22px;
}

.board-cell + .board-cell {
    border-left: 1px solid var(--rule-strong);
}

.board-label {
    font-size: 0.74rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.board-figure {
    display: flex;
    font-size: clamp(3.5rem, 2rem + 4vw, 6rem);
    font-weight: 820;
    font-stretch: 68%;
    line-height: 0.9;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums lining-nums;
}

.flap {
    display: block;
    height: 0.9em;
    overflow: hidden;
}

.flap-strip {
    display: flex;
    flex-direction: column;
    line-height: 0.9;
    transform: translateY(calc(var(--digit) * -0.9em));
    transition: transform 900ms var(--ease-out);
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 40px;
    margin-top: 48px;
}

.ledger-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rule-strong);
}

.ledger-head h2 {
    font-size: 1.05rem;
    font-weight: 750;
    font-stretch: 85%;
    letter-spacing: -0.01em;
}

.ledger-head a {
    font-size: 0.86rem;
    font-weight: 600;
}

.ledger-rows {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ledger-rows .empty,
.ledger .empty {
    margin-top: 16px;
}

.ledger-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 64px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    transition: background-color 140ms var(--ease-out);
}

a.ledger-row:hover {
    background: var(--board);
}

.ledger-main {
    display: grid;
    gap: 2px;
    min-width: 0;
    transition: transform 220ms var(--ease-out);
}

a.ledger-row:hover .ledger-main {
    transform: translateX(8px);
}

.ledger-name {
    overflow: hidden;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ledger-meta,
.ledger-time {
    color: var(--muted);
    font-size: 0.84rem;
}

.ledger-time {
    flex: none;
}

.ledger-figure {
    flex: none;
    font-size: 1.75rem;
    font-weight: 800;
    font-stretch: 70%;
    line-height: 1;
}

/* Tables */

.table-wrap {
    overflow: auto;
    border-top: 2px solid var(--rule-strong);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--rule);
}

th {
    padding-block: 12px;
    border-bottom-color: var(--rule-strong);
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

th:first-child,
td:first-child {
    padding-left: 4px;
}

tbody tr {
    transition: background-color 140ms var(--ease-out);
}

tbody tr:hover {
    background: #fafafa;
}

.num {
    text-align: right;
}

.cell-name {
    font-weight: 620;
}

td.figure {
    font-size: 1.35rem;
    font-weight: 800;
    font-stretch: 70%;
}

.lien,
.actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lien input {
    height: 34px;
    min-width: 240px;
    font-size: 0.84rem;
}

.actions form {
    margin: 0 0 0 20px;
}

.actions a {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 8px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.actions a:hover {
    text-decoration: underline;
}

/* Builder */

.builder-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -40px -40px 32px;
    padding: 12px 40px;
    background: rgb(255 255 255 / 0.94);
    border-bottom: 1px solid var(--rule);
    backdrop-filter: blur(8px);
}

.builder-bar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.builder-bar .ghost {
    height: 44px;
    padding: 0 14px;
}

.save-state {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 550;
}

.save-state::before {
    content: "";
    width: 8px;
    height: 8px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: currentColor;
}

.save-state.is-dirty {
    color: var(--ink);
}

.save-state.is-dirty::before {
    background: transparent;
}

.builder-errors {
    margin-bottom: 24px;
}

.builder {
    display: grid;
    grid-template-columns: 232px minmax(0, 760px);
    gap: 40px;
    align-items: start;
}

.palette {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 14px;
    max-height: calc(100vh - 112px);
    overflow: auto;
    padding-right: 4px;
}

.palette h2 {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rule-strong);
    font-size: 1.05rem;
    font-weight: 750;
    font-stretch: 85%;
}

.palette h3 {
    margin: 4px 0 2px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.palette-search input {
    height: 40px;
}

.palette-empty,
.palette-tip {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.palette-list {
    display: grid;
}

.palette-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 38px;
    padding: 0 8px;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    font-weight: 500;
    cursor: grab;
    transition: background-color 140ms var(--ease-out);
}

.palette-item::after {
    content: "+";
    color: var(--muted);
    font-weight: 600;
    transition: transform 200ms var(--ease-out);
}

.palette-item:hover {
    background: var(--board);
}

.palette-item:hover::after {
    color: var(--ink);
    transform: scale(1.35);
}

.sheet-editor {
    padding: 32px;
    background: var(--board);
    border-top: 2px solid var(--rule-strong);
}

.sheet-head {
    display: grid;
    gap: 4px;
    padding: 4px 0 24px;
}

.title-field,
.desc-field {
    border-color: transparent;
    background: transparent;
}

.title-field {
    height: auto;
    padding: 6px 10px;
    font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem);
    font-weight: 780;
    font-stretch: 82%;
    letter-spacing: -0.02em;
}

.desc-field {
    min-height: 0;
    padding: 6px 10px;
    color: var(--muted);
    resize: none;
    field-sizing: content;
}

.title-field:hover,
.desc-field:hover {
    border-color: var(--field-line);
    background: var(--paper);
}

.title-field:focus,
.desc-field:focus {
    background: var(--paper);
}

.title-field[aria-invalid="true"] {
    border-color: var(--danger);
    background: var(--paper);
}

.canvas-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule-strong);
}

.canvas-head h2 {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.field-count {
    color: var(--muted);
    font-size: 0.84rem;
}

.canvas {
    display: grid;
    gap: 10px;
    min-height: 220px;
    align-content: start;
    padding-top: 16px;
}

.canvas.drop-end::after {
    content: "";
    height: 2px;
    background: var(--ink);
}

.canvas-empty {
    gap: 10px;
    padding: 40px 24px;
    background: var(--paper);
}

.canvas-empty p {
    margin: 0;
    max-width: 44ch;
}

.canvas-empty-title {
    color: var(--ink);
    font-weight: 650;
}

.canvas-empty .primary {
    margin-top: 8px;
}

.champ {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out), opacity 140ms var(--ease-out);
}

.champ:hover {
    border-color: #8f8f8f;
}

.champ.is-open {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.champ.is-error {
    border-color: var(--danger);
    box-shadow: inset 0 0 0 1px var(--danger);
}

.champ.is-dragging {
    opacity: 0.4;
}

.champ.drop-before::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--ink);
}

.champ-head {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: start;
}

.poignee {
    width: 28px;
    height: 44px;
    padding: 14px 6px;
    color: #8f8f8f;
    cursor: grab;
}

.poignee:hover {
    color: var(--ink);
}

.champ-toggle {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px 8px 16px 2px;
    text-align: left;
    cursor: pointer;
}

.champ-toggle:focus-visible {
    outline-offset: -2px;
}

.champ-type {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.champ-apercu {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.apercu-label {
    font-weight: 620;
    overflow-wrap: anywhere;
}

.apercu-label.is-missing {
    color: var(--danger);
}

.apercu-titre {
    font-size: 1.2rem;
    font-weight: 750;
    font-stretch: 85%;
}

.apercu-paragraphe,
.apercu-aide {
    color: var(--muted);
    font-size: 0.9rem;
}

.apercu-input,
.apercu-fichier {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: #8f8f8f;
    font-size: 0.9rem;
}

.apercu-input.is-long {
    align-items: flex-start;
    height: 64px;
    padding-top: 9px;
}

.apercu-input.is-select {
    justify-content: space-between;
}

.apercu-input.is-select::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 1.5px solid var(--ink);
    border-bottom: 1.5px solid var(--ink);
    transform: rotate(45deg);
}

.apercu-fichier {
    width: fit-content;
    border-color: var(--ink);
    color: var(--ink);
    font-weight: 600;
}

.apercu-choix {
    display: grid;
    gap: 6px;
}

.apercu-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.apercu-option::before,
.option-mark {
    content: "";
    width: 14px;
    height: 14px;
    flex: none;
    border: 1.5px solid #8f8f8f;
    border-radius: 2px;
}

.apercu-option.is-radio::before,
.option-mark.is-radio,
.option-mark.is-select {
    border-radius: 50%;
}

.apercu-plus {
    color: var(--muted);
    font-size: 0.84rem;
}

.champ-tools {
    display: flex;
    gap: 2px;
    padding: 8px 8px 0 0;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    color: var(--muted);
    transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.icon-button:hover {
    background: var(--board);
    color: var(--ink);
}

.icon-button.is-danger:hover,
.icon-button.is-danger:focus-visible {
    color: var(--danger);
    outline-color: var(--danger);
}

.icon-button:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.icon {
    width: 18px;
    height: 18px;
}

.champ-editor {
    display: grid;
    gap: 16px;
    margin: 0 16px 16px 30px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    animation: settle 240ms var(--ease-out);
}

.champ-editor-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 4px;
}

.champ-editor-foot .ghost {
    margin-left: auto;
    border: 1px solid var(--ink);
}

.options-list {
    display: grid;
    gap: 6px;
}

.option-row {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
}

.option-row input {
    height: 38px;
}

.add-option {
    width: fit-content;
    margin-left: 18px;
}

.options-editor .aide {
    margin-left: 24px;
    font-size: 0.8rem;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 550;
    cursor: pointer;
}

.switch input {
    position: absolute;
    width: 36px;
    height: 20px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.switch-track {
    position: relative;
    width: 36px;
    height: 20px;
    flex: none;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    transition: background-color 160ms var(--ease-out);
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--ink);
    transition: transform 200ms var(--ease-out), background-color 160ms var(--ease-out);
}

.switch input:checked + .switch-track {
    background: var(--ink);
}

.switch input:checked + .switch-track::after {
    background: var(--paper);
    transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px 12px 18px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.22);
    transform: translateX(-50%);
    animation: settle 240ms var(--ease-out);
}

.toast button {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--paper);
    border-radius: var(--radius);
    color: var(--paper);
    font-weight: 650;
}

.toast button:hover {
    background: var(--paper);
    color: var(--ink);
}

.toast :focus-visible {
    outline-color: var(--paper);
}

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

/* Sign-in */

.signin {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    min-height: 100vh;
}

.signin-side {
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 32px 40px;
    background: var(--ink);
    color: var(--paper);
}

.signin-side ::selection {
    background: var(--paper);
    color: var(--ink);
}

.signin-word {
    align-self: end;
    margin: 0 0 24px;
    font-size: clamp(3.5rem, 1rem + 6vw, 6rem);
    font-weight: 860;
    font-stretch: 64%;
    line-height: 0.88;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.signin-note {
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #333;
    color: var(--rail-muted);
    font-size: 0.74rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.signin-form {
    align-self: center;
    justify-self: center;
    width: min(100%, 420px);
    padding: 48px 24px;
    animation: settle 320ms var(--ease-out);
}

.brand-compact {
    display: none;
    margin-bottom: 32px;
}

.signin form,
.public-form {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

/* Public form */

.public-body {
    --accent: var(--ink);
    --accent-text: var(--paper);
    --page: var(--board);
    --band: var(--ink);
    --band-text: var(--paper);
    background: var(--page);
}

.public-band {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 24px 24px;
    background: var(--band);
    color: var(--band-text);
}

.public-brand {
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(100%, 720px);
    text-align: center;
}

.public-logo {
    display: block;
    max-width: 360px;
    max-height: 96px;
    object-fit: contain;
}

.public-tagline {
    margin: 0;
    max-width: 42ch;
    color: #ffffff;
    font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.35rem);
    font-weight: 650;
    font-stretch: 90%;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.public-banniere,
.public-banniere-img {
    display: block;
    width: 100%;
}

.public-banniere-img {
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

.public-body .primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.public-body .primary:hover {
    background: var(--paper);
    color: var(--accent);
}

.public-body :focus-visible,
.public-body input:focus,
.public-body textarea:focus,
.public-body select:focus {
    outline-color: var(--accent);
}

.public-body input:focus,
.public-body textarea:focus,
.public-body select:focus {
    border-color: var(--accent);
}

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

.public-body input[type="file"]::file-selector-button {
    border-color: var(--accent);
    color: var(--accent);
}

.public-body .sheet,
.public-body .bloc-titre {
    border-color: var(--accent);
}

.public-body .status {
    border-color: var(--accent);
}

.public-body .status::before {
    background: var(--accent);
}

.public-body label.plan-el.is-libre:has(input:checked) {
    background: var(--accent);
    color: var(--accent-text);
}

.public-body .pastille.is-choisi {
    --statut: var(--accent);
}

.public {
    padding: 40px 16px 64px;
}

.sheet {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 40px 40px 36px;
    background: var(--paper);
    border-top: 2px solid var(--rule-strong);
}

.sheet .lead,
.bloc-texte {
    max-width: 65ch;
}

.sheet .status {
    margin: 24px 0 0;
}

.public-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.public-form select {
    height: 48px;
}

.bloc-titre {
    margin: 16px 0 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule-strong);
    font-size: 1.2rem;
    font-weight: 750;
    font-stretch: 85%;
    letter-spacing: -0.01em;
}

.bloc-texte,
.aide {
    margin: 0;
    color: var(--muted);
}

.aide {
    font-size: 0.86rem;
}

/* Plans */

.plan-el.is-libre,
.pastille.is-libre {
    --statut: #92d050;
}

.plan-el.is-option,
.pastille.is-option {
    --statut: #f6c343;
}

.plan-el.is-reserve,
.pastille.is-reserve {
    --statut: #63a4f7;
}

.plan-head {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
}

.plan-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 10px 0;
    border-top: 2px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule);
}

.plan-tools {
    display: inline-flex;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
}

.plan-tool {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    font-size: 0.86rem;
    font-weight: 600;
    transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.plan-tool + .plan-tool {
    border-left: 1px solid var(--ink);
}

.plan-tool:hover {
    background: var(--board);
}

.plan-tool.is-active {
    background: var(--ink);
    color: var(--paper);
}

kbd {
    padding: 0 4px;
    border: 1px solid currentColor;
    border-radius: var(--radius);
    font: inherit;
    font-size: 0.66rem;
    line-height: 1.4;
    opacity: 0.6;
}

.plan-toolbar-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.plan-toolbar-field > span:first-child {
    font-size: 0.74rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.plan-toolbar-field select,
.plan-toolbar-field input {
    width: auto;
    height: 36px;
}

.plan-toolbar-field.is-size input {
    width: 76px;
    padding: 0 8px;
}

.plan-toolbar-end {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.plan-zoom {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.plan-zoom .icon-button {
    font-size: 1.1rem;
    font-weight: 600;
}

.plan-zoom-valeur {
    min-width: 52px;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
}

.plan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
    margin-top: 16px;
}

.plan-stage {
    min-height: 420px;
    max-height: calc(100vh - 230px);
    overflow: auto;
    padding: 16px;
    background: var(--board);
    border: 1px solid var(--rule);
}

.plan-canvas {
    position: relative;
    width: calc(var(--cols) * var(--cell));
    height: calc(var(--rows) * var(--cell));
    background-color: var(--paper);
    background-image:
        linear-gradient(to right, #ececec 1px, transparent 1px),
        linear-gradient(to bottom, #ececec 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
    box-shadow: 0 0 0 1px var(--rule-strong);
    touch-action: none;
    user-select: none;
}

.plan-canvas[data-outil]:not([data-outil="selection"]) {
    cursor: crosshair;
}

.plan-el,
.plan-apercu {
    position: absolute;
    left: calc(var(--x) * var(--cell));
    top: calc(var(--y) * var(--cell));
    width: calc(var(--w) * var(--cell));
    height: calc(var(--h) * var(--cell));
}

.plan-el {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 2px;
    overflow: hidden;
    font-size: clamp(8px, calc(var(--cell) * 0.62), 15px);
    line-height: 1.1;
    text-align: center;
}

.plan-canvas[data-outil="selection"] .plan-el,
.plan-canvas[data-outil] .plan-el:not(.is-zone) {
    cursor: move;
}

.plan-el.is-stand {
    z-index: 2;
    background: var(--statut);
    border: 1px solid rgb(0 0 0 / 0.55);
}

.plan-el.is-zone {
    z-index: 1;
    overflow: visible;
    background: rgb(0 0 0 / 0.025);
    border: 1.5px dashed #8f8f8f;
}

.plan-el.is-zone .plan-el-nom {
    position: absolute;
    bottom: 100%;
    left: -1.5px;
    display: block;
    max-width: none;
    padding-bottom: 2px;
    color: var(--muted);
    font-size: 0.8em;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.plan-el.is-zone.is-selected .plan-el-nom {
    color: var(--ink);
}

.plan-el.is-repere {
    z-index: 3;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan-el-code {
    font-weight: 800;
    font-stretch: 80%;
}

.plan-el-nom {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    font-weight: 600;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.plan-el-surface {
    font-size: 0.85em;
    opacity: 0.8;
}

.plan-el.has-indication::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.plan-el.is-doublon {
    outline: 2px dashed var(--danger);
    outline-offset: -4px;
}

.plan-el.is-error {
    box-shadow: inset 0 0 0 2px var(--danger);
}

.plan-el.is-selected {
    z-index: 4;
    outline: 2px solid var(--ink);
    outline-offset: 1px;
}

.plan-el.is-repere.is-selected {
    outline-color: var(--danger);
}

.plan-poignee {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 10px;
    height: 10px;
    background: var(--ink);
    border: 1px solid var(--paper);
    cursor: nwse-resize;
}

.plan-apercu {
    z-index: 5;
    background: rgb(10 10 10 / 0.08);
    border: 2px solid var(--ink);
    pointer-events: none;
}

.plan-inspector {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 24px;
    max-height: calc(100vh - 112px);
    overflow: auto;
    padding-right: 4px;
}

.inspect-section {
    display: grid;
    gap: 12px;
}

.inspect-section.is-fields {
    gap: 14px;
}

.inspect-title {
    font-size: 1.05rem;
    font-weight: 750;
    font-stretch: 85%;
}

.inspect-section > .inspect-title {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rule-strong);
}

.inspect-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--rule-strong);
}

.inspect-head .champ-tools {
    padding: 0;
}

.inspect-stats,
.inspect-keys {
    margin: 0;
}

.inspect-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
}

.inspect-stat dt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.inspect-stat dd {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
}

.inspect-stat strong {
    font-size: 1.25rem;
    font-weight: 800;
    font-stretch: 70%;
}

.inspect-stat dd span {
    min-width: 64px;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: right;
}

.pastille {
    width: 10px;
    height: 10px;
    flex: none;
    background: var(--statut);
    border: 1px solid rgb(0 0 0 / 0.55);
}

.legende-list {
    display: grid;
    gap: 6px;
}

.legende-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 68px 34px;
    gap: 6px;
    align-items: center;
}

.legende-row input {
    height: 36px;
    padding: 0 8px;
    font-size: 0.9rem;
}

.legende-row .is-code {
    font-weight: 700;
    text-transform: uppercase;
}

.plan-inspector .add-option {
    margin-left: 0;
}

.inspect-keys {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    font-size: 0.84rem;
}

.inspect-keys dt {
    font-weight: 650;
}

.inspect-keys dd {
    margin: 0;
    color: var(--muted);
}

.inspect-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.inspect-statut,
.inspect-geometry {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.inspect-statut legend,
.inspect-geometry legend {
    margin-bottom: 6px;
    padding: 0;
    font-size: 0.74rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.inspect-geometry {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.inspect-geometry .field > span {
    font-size: 0.68rem;
}

.inspect-geometry input {
    height: 36px;
    padding: 0 6px;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
}

.segment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.segment + .segment {
    border-left: 1px solid var(--field-line);
}

.segment input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.segment:hover {
    background: var(--board);
}

.segment:has(input:checked) {
    background: var(--ink);
    color: var(--paper);
}

.segment:has(input:focus-visible) {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.aide.is-warning {
    color: var(--danger);
    font-weight: 600;
}

.inspect-close {
    justify-self: end;
    border: 1px solid var(--ink);
}

.apercu-plan {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 12px;
    border: 1px dashed var(--field-line);
    border-radius: var(--radius);
    background-image:
        linear-gradient(to right, #ececec 1px, transparent 1px),
        linear-gradient(to bottom, #ececec 1px, transparent 1px);
    background-size: 10px 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.apercu-plan.is-missing {
    color: var(--danger);
}

/* Public plan */

.sheet.is-wide {
    width: min(100%, 1120px);
}

.plan-public {
    display: grid;
    gap: 10px;
}

.plan-public-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 0.84rem;
    font-weight: 550;
}

.plan-public-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pastille.is-choisi {
    --statut: var(--ink);
}

.pastille.is-pris,
.plan-el.is-pris {
    --statut: #dedede;
}

.plan-stage.is-public {
    min-height: 0;
    max-height: 75vh;
    padding: 12px;
}

.plan-canvas.is-public {
    touch-action: auto;
}

.plan-el.is-pris {
    color: #8f8f8f;
    border-color: #c9c9c9;
    background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgb(0 0 0 / 0.06) 4px 5px);
}

label.plan-el.is-libre {
    cursor: pointer;
    transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

label.plan-el.is-libre:hover {
    z-index: 3;
    outline: 2px solid var(--ink);
    outline-offset: -2px;
}

label.plan-el.is-libre:has(input:checked) {
    z-index: 3;
    background: var(--ink);
    color: var(--paper);
}

label.plan-el.is-libre:has(input:focus-visible) {
    z-index: 4;
    outline: 3px solid var(--ink);
    outline-offset: 2px;
}

.plan-public-resume {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    font-weight: 600;
}

/* Responses */

.reponses {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reponse {
    border-top: 2px solid var(--rule-strong);
    background: var(--board);
}

.reponse-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px 10px;
}

.reponse-head h2 {
    font-size: 1.05rem;
    font-weight: 750;
    font-stretch: 85%;
}

.reponse-head time {
    color: var(--muted);
    font-size: 0.84rem;
}

.reponse-champs {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    margin: 0;
    padding: 0 18px 14px;
}

.reponse-champs dt,
.reponse-champs dd {
    margin: 0;
    padding: 8px 0;
    border-top: 1px solid var(--rule);
}

.reponse-champs dt {
    padding-right: 16px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.reponse-champs dd {
    overflow-wrap: anywhere;
}

.reponse-vide {
    color: #8f8f8f;
}

.stand-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stand-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 10px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    font-size: 0.86rem;
    font-weight: 700;
}

.stand-chip span {
    font-weight: 500;
    opacity: 0.75;
}

.stand-total {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.pagination {
    margin-top: 24px;
}

/* Appearance */

.swatches {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.swatch {
    width: 20px;
    height: 20px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.swatches .ledger-meta {
    margin-left: 6px;
}

.logo-mini {
    display: block;
    max-width: 96px;
    max-height: 28px;
    object-fit: contain;
}

.apparence {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    margin-top: 24px;
}

.apparence-form {
    display: grid;
    gap: 28px;
}

.apparence-groupe {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
    border: 0;
}

.apparence-groupe legend {
    width: 100%;
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rule-strong);
    font-size: 1.05rem;
    font-weight: 750;
    font-stretch: 85%;
}

.couleur {
    display: flex;
    align-items: center;
    gap: 8px;
}

.couleur input[type="color"] {
    width: 48px;
    flex: none;
    padding: 3px;
    cursor: pointer;
}

.couleur .couleur-hex {
    width: 110px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.9rem;
    text-transform: lowercase;
}

.image-actuelle {
    display: grid;
    place-items: center;
    padding: 8px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background:
        repeating-conic-gradient(#f1f1f1 0 25%, #ffffff 0 50%) 0 0 / 16px 16px;
}

.image-actuelle img {
    display: block;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.image-actuelle.is-logo img {
    max-height: 56px;
}

.apercu-zone {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.apercu-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rule-strong);
}

.apercu-bar h2 {
    font-size: 1.05rem;
    font-weight: 750;
    font-stretch: 85%;
}

.segment {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
}

.segment button {
    height: 30px;
    padding: 0 14px;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 650;
    transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.segment button.is-active {
    background: var(--ink);
    color: var(--paper);
}

.apercu-stage {
    display: grid;
    justify-items: center;
    padding: 20px;
    background: #e4e4e4;
    max-height: calc(100vh - 120px);
    overflow: auto;
}

.apercu-ecran {
    width: 100%;
    min-height: 0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 24px rgb(0 0 0 / 0.08);
    transition: width 260ms var(--ease-out);
}

.apercu-ecran[data-ecran="mobile"] {
    width: 375px;
    border-radius: 18px;
}

.apercu-ecran h1 {
    font-size: 2rem;
}

.apercu-ecran .public {
    padding: 32px 16px 40px;
}

.apercu-ecran .sheet {
    padding: 32px;
}

.apercu-ecran[data-ecran="mobile"] .public {
    padding: 16px 12px 28px;
}

.apercu-ecran[data-ecran="mobile"] .sheet {
    padding: 24px 18px 20px;
}

.apercu-ecran[data-ecran="mobile"] h1 {
    font-size: 1.6rem;
}

.apercu-ecran input[readonly] {
    background: var(--paper);
    border-color: var(--field-line);
    pointer-events: none;
}

.apercu-ecran .choice {
    pointer-events: none;
}

@keyframes settle {
    from {
        opacity: 0.01;
        transform: translateY(8px);
    }
}

/* Responsive */

@media (max-width: 1180px) {
    .builder {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 24px;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .rail {
        position: static;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 12px;
        height: auto;
        padding: 14px 16px;
    }

    .rail .brand {
        padding: 0;
    }

    .side-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: 1fr 1fr;
    }

    .rail-foot {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .who {
        display: none;
    }

    .topbar {
        padding: 0 20px;
    }

    .content {
        padding: 28px 20px;
    }

    .page-head {
        display: grid;
        align-items: start;
    }

    .builder,
    .dash-grid,
    .plan-layout,
    .apparence {
        grid-template-columns: 1fr;
    }

    .apercu-zone {
        position: static;
    }

    .apercu-ecran[data-ecran="mobile"] {
        width: min(100%, 375px);
    }

    .plan-inspector {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .plan-toolbar-end {
        margin-left: 0;
    }

    .dash-grid {
        gap: 40px;
    }

    .builder-bar {
        margin: -28px -20px 24px;
        padding: 10px 20px;
    }

    .palette {
        position: static;
        order: 2;
        max-height: none;
        overflow: visible;
    }

    .palette-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .palette-item {
        width: auto;
        gap: 8px;
        border: 1px solid var(--field-line);
        border-radius: 999px;
        padding: 0 14px;
    }

    .lien input {
        min-width: 180px;
    }

    .signin {
        grid-template-columns: 1fr;
    }

    .signin-side {
        display: none;
    }

    .brand-compact {
        display: flex;
    }
}

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

    .board-cell {
        grid-template-columns: 1fr auto;
        align-items: end;
        min-height: 0;
        padding: 16px 16px 14px;
    }

    .board-cell + .board-cell {
        border-left: 0;
        border-top: 1px solid var(--rule-strong);
    }

    .board-figure {
        font-size: 3.25rem;
    }

    .today {
        display: none;
    }

    .sheet-editor {
        margin-inline: -20px;
        padding: 20px 12px;
    }

    .save-state {
        font-size: 0;
    }

    .save-state.is-dirty {
        font-size: 0.8rem;
    }

    .builder-bar,
    .builder-bar-actions {
        flex-wrap: wrap;
    }

    .builder-bar .ghost {
        height: 36px;
        padding: 0 10px;
    }

    .champ-editor {
        margin: 0 12px 14px;
    }

    .champ-tools .icon-button {
        width: 30px;
    }

    .sheet {
        padding: 28px 20px 24px;
    }

    .public {
        padding: 20px 12px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
