@import url("ds/tokens.css");

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    background: var(--bp-cream);
    color: var(--bp-deep);
    font-family: var(--font-body);
    font-size: var(--text-md);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--text-link); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--text-link-hover); text-decoration: underline; }
b, strong { font-weight: var(--weight-bold); }
h1, h2, h3 { margin: 0; color: var(--text-heading); }
.muted { color: var(--deep-80); }
.small { font-size: var(--text-sm); }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; }
.inline { display: inline; margin: 0; }
.ml-auto { margin-left: auto; }
.icon-blue { color: var(--bp-blue); }
.icon-coral { color: var(--bp-coral); }
.error-text { color: var(--bp-deep); }

/* ---------- En-tête ---------- */
.topbar {
    position: sticky; top: 0; z-index: 10;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--deep-08);
}
.topbar-inner {
    max-width: 1320px; margin: 0 auto; padding: 0 32px; min-height: 72px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand-sep { width: 1px; height: 24px; background: var(--deep-20); margin: 0 4px; }
.brand span { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 19px; color: var(--bp-deep); letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button {
    padding: 10px 18px; border-radius: var(--radius-pill); color: var(--deep-80); font-size: 15px;
    text-decoration: none; transition: background var(--duration-base) var(--ease-out);
}
.nav a:hover { background: var(--bp-ice); color: var(--bp-deep); text-decoration: none; }
.nav a.active { background: var(--bp-ice); color: var(--bp-deep); font-weight: var(--weight-bold); }
.nav-sep { width: 1px; height: 24px; background: var(--deep-08); margin: 0 6px; }
.nav button {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: none;
    font: inherit; font-size: 15px; color: var(--deep-80); cursor: pointer;
}
.nav button:hover { color: var(--bp-deep); }
.nav button i { font-size: 13px; }
.nav-user { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 12px; font-size: 15px; font-weight: var(--weight-bold); color: var(--bp-deep); }
.nav-user i { font-size: 12px; color: var(--bp-blue); }

main { max-width: 1320px; margin: 0 auto; padding: 40px 32px 96px; }

/* ---------- Titres de page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head-main { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-weight: var(--weight-bold); font-size: 12px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--deep-60); }
.back {
    display: flex; align-items: center; gap: 8px; font-weight: var(--weight-bold); font-size: 12px;
    letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--bp-blue);
}
.back i { font-size: 10px; }
.page-title {
    font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 40px;
    line-height: var(--leading-display); letter-spacing: var(--tracking-display);
}
.page-sub { font-size: 17px; font-weight: var(--weight-light); color: var(--deep-80); display: flex; align-items: center; gap: 8px; }
.page-sub i { font-size: 13px; color: var(--bp-blue); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Cartes ---------- */
.card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 28px 32px; margin-bottom: 24px; }
.card.flush { padding: 0; overflow: hidden; }
.card-title {
    font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 22px; line-height: var(--leading-heading);
    display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
}
.card-title i { font-size: 16px; color: var(--bp-blue); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.card-head .card-title { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.soft-box { background: var(--bp-cream); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.outline-box { border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--deep-08); }
.h3 { margin: 0; font-weight: var(--weight-bold); font-size: 12px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--bp-deep); }
.empty { padding: 48px; text-align: center; font-size: 17px; font-weight: var(--weight-light); color: var(--deep-80); }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-body); font-weight: var(--weight-bold); text-transform: uppercase;
    letter-spacing: var(--tracking-button); line-height: 1; white-space: nowrap;
    border: 1px solid transparent; border-radius: var(--radius-pill); cursor: pointer; text-decoration: none;
    padding: 13px 32px; font-size: var(--text-sm);
    background: var(--gradient-brand); color: #fff;
    transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}
.btn:hover { background: var(--gradient-brand-reverse); box-shadow: var(--shadow-brand); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 20px; font-size: var(--text-xs); }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--bp-blue); border-color: var(--bp-blue); }
.btn-outline:hover { background: var(--gradient-brand); color: #fff; border-color: transparent; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--bp-deep); }
.btn-ghost:hover { background: var(--bp-ice); color: var(--bp-deep); box-shadow: none; }
.btn-urgent { background: var(--bp-amber); color: var(--bp-deep); }
.btn-urgent:hover { background: var(--bp-amber); color: var(--bp-deep); box-shadow: 0 8px 24px rgba(255, 201, 71, .35); filter: brightness(1.06); }
.btn-urgent span { letter-spacing: .04em; }

.icon-btn {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--bp-deep);
    font-size: var(--text-xs); cursor: pointer; transition: background var(--duration-base) var(--ease-out);
}
.icon-btn:hover { background: var(--bp-ice); }

.pill-link {
    display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-pill);
    border: 1px solid var(--deep-20); color: var(--bp-deep); font-weight: var(--weight-bold); font-size: 14px;
    white-space: nowrap; text-decoration: none; transition: var(--duration-base) var(--ease-out);
}
.pill-link i { font-size: 12px; color: var(--bp-blue); }
.pill-link:hover { border-color: var(--bp-blue); background: var(--bp-ice); color: var(--bp-deep); text-decoration: none; }

/* ---------- Tags & badges ---------- */
.tag {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill);
    font-weight: var(--weight-bold); font-size: var(--text-xs); line-height: 1.3; white-space: nowrap;
    border: 1px solid transparent; background: var(--bp-ice); color: var(--bp-deep);
}
.tag-md { padding: 6px 14px; font-size: var(--text-sm); }
.tag-coral { background: var(--bp-coral); }
.tag-cream { background: var(--bp-cream); border-color: var(--deep-20); }
.tag-ice { background: var(--bp-ice); }
.tag-dark { background: var(--bp-deep); color: #fff; }
.tag-outline { background: transparent; border-color: var(--deep-20); }
.tag-muted { background: transparent; border-color: var(--deep-08); color: var(--deep-80); }
.badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
    border-radius: var(--radius-pill); font-weight: var(--weight-black); font-size: var(--text-xs); line-height: 1;
    background: var(--bp-deep); color: #fff; font-family: var(--font-body);
}
.badge-coral { background: var(--bp-coral); color: var(--bp-deep); }

/* ---------- Scores ---------- */
.score {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; border-radius: var(--radius-sm);
    font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 15px;
}
.score-big { align-items: baseline; gap: 2px; min-width: 0; height: auto; padding: 8px 14px; border-radius: var(--radius-md); font-size: 24px; line-height: 1; }
.score-big small { font-size: 13px; font-weight: var(--weight-regular); }
.score-high { background: var(--bp-deep); color: #fff; }
.score-mid { background: var(--bp-ice); color: var(--bp-deep); }
.score-low { background: #fff; color: var(--bp-deep); box-shadow: inset 0 0 0 1px var(--deep-20); }
.score-bad { background: rgba(255, 152, 148, .35); color: var(--bp-deep); }
.score-none { background: var(--deep-08); color: var(--deep-80); }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.form.compact { gap: 14px; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.grid-fields.tight { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-heading); }
.field-label .req { color: var(--bp-coral); }
.field-hint { font-size: var(--text-xs); color: var(--text-muted); }
.input, .select, .textarea {
    width: 100%; font: inherit; font-size: var(--text-md); font-weight: var(--weight-regular); color: var(--bp-deep);
    background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-md);
    padding: 13px 16px; outline: none; transition: border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.field-sm .input, .field-sm .select { padding: 9px 14px; }
.textarea { line-height: 1.5; padding: 10px 14px; resize: vertical; }
.textarea.lg { line-height: 1.55; padding: 14px 16px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--border-focus); box-shadow: var(--ring-focus); }
.select-wrap { position: relative; display: flex; }
.select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.field-sm .select { padding-right: 44px; }
.select-wrap::after {
    content: "\25BC"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    pointer-events: none; color: var(--bp-blue); font-size: var(--text-xs);
}

/* Case à cocher */
.checkbox { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox .box {
    flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; border-radius: var(--radius-xs);
    display: flex; align-items: center; justify-content: center; background: #fff;
    border: 1px solid var(--border-default); color: #fff; font-size: 11px; transition: var(--duration-base) var(--ease-out);
}
.checkbox input:checked + .box { background: var(--gradient-brand); border-color: transparent; }
.checkbox input:checked + .box::after { content: "\2714"; }
.checkbox input:focus-visible + .box { box-shadow: var(--ring-focus); }
.checkbox .label { font-size: var(--text-md); font-weight: var(--weight-regular); color: var(--bp-deep); }
.checkbox input:checked ~ .label { text-decoration: line-through; opacity: .6; }

/* ---------- Messages ---------- */
.flash { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-radius: var(--radius-md); font-size: 16px; margin-bottom: 24px; background: var(--bp-ice); color: var(--bp-deep); }
.flash i { color: var(--bp-blue); }
.flash-error { background: rgba(255, 152, 148, .35); }
.flash-error i { color: var(--bp-deep); }
.flash-warn { background: #fff; box-shadow: inset 0 0 0 1px var(--bp-amber); }
.flash-warn i { color: var(--bp-amber); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
    text-align: left; font-weight: var(--weight-bold); font-size: 12px; letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase; color: var(--deep-60); padding: 20px 16px 14px; border-bottom: 1px solid var(--deep-08);
}
.table td { padding: 16px; border-bottom: 1px solid var(--deep-08); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 28px; }
.table th:last-child, .table td:last-child { padding-right: 28px; }
.table .sub { font-size: 14px; color: var(--deep-80); margin-top: 2px; }
.table .contact { font-size: 14px; white-space: nowrap; line-height: 1.6; }
.table .contact a { display: block; }
.table .contact a.mail { color: var(--deep-80); }
.clickable { cursor: pointer; transition: background var(--duration-fast); }
.clickable:hover { background: var(--bp-cream); }
.name { font-weight: var(--weight-bold); color: var(--bp-deep); }
a.name:hover { color: var(--bp-deep); }
.state { font-size: 14px; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.state i { font-size: 12px; }
.state-pending { color: var(--bp-blue); }

/* ---------- Tableau de bord ---------- */
.stats-strip {
    background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 28px 8px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 24px;
}
.stat { padding: 4px 24px; display: flex; flex-direction: column; gap: 6px; box-shadow: -1px 0 0 var(--deep-08); }
.stat b {
    font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 44px; line-height: 1;
    background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; align-self: flex-start;
}
.stat span { font-size: 15px; font-weight: var(--weight-bold); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; margin-bottom: 24px; }
.grid-2 > .card { margin-bottom: 0; }
.row-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--deep-08); flex-wrap: wrap; }
.row-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.row-title .name { font-size: 16px; }
.row-title span { font-size: 14px; color: var(--deep-80); }
.row-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--deep-80); align-items: center; }
.row-meta i { font-size: 12px; color: var(--bp-blue); margin-right: 7px; }
.date-block {
    flex: 0 0 56px; height: 60px; border-radius: var(--radius-md); background: var(--bp-cream);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.date-block b { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.date-block span { font-weight: var(--weight-bold); font-size: 11px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--deep-80); }
.card.flush-table { padding: 28px 0 8px; }
.card.flush-table .card-title { margin: 0 32px 16px; }
.card.flush-table .table th:first-child, .card.flush-table .table td:first-child { padding-left: 32px; }
.muted-empty { font-size: 15px; font-weight: var(--weight-light); color: var(--deep-80); margin: 4px 0 0; }

/* ---------- Postes ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.poste-card {
    display: flex; flex-direction: column; gap: 20px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    padding: 28px; color: var(--bp-deep); text-decoration: none;
    transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.poste-card:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); text-decoration: none; color: var(--bp-deep); }
.poste-card.archived { background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px var(--deep-08); }
.poste-card-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.poste-card-title span { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 22px; line-height: var(--leading-heading); }
.poste-card-meta { font-size: 15px; color: var(--deep-80); display: flex; align-items: center; gap: 7px; margin-top: -14px; }
.poste-card-meta i { font-size: 12px; color: var(--bp-blue); }
.poste-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 20px; border-top: 1px solid var(--deep-08); }
.poste-card-stats div { display: flex; flex-direction: column; gap: 2px; }
.poste-card-stats b { font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.poste-card-stats span { font-size: 13px; color: var(--deep-80); }

.description { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); margin-bottom: 24px; overflow: hidden; }
.description summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 32px; cursor: pointer; list-style: none;
    font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 19px;
}
.description summary::-webkit-details-marker { display: none; }
.description summary > span { display: flex; align-items: center; gap: 12px; }
.description summary i { font-size: 15px; color: var(--bp-blue); }
.description summary .chev { font-size: 13px; transition: transform var(--duration-base) var(--ease-out); }
.description[open] summary .chev { transform: rotate(180deg); }
.description .content { padding: 0 32px 28px; font-size: 17px; font-weight: var(--weight-light); line-height: var(--leading-body); white-space: pre-wrap; max-width: 860px; }

/* Texte mis en forme (descriptions de poste) */
.rich { font-size: 17px; font-weight: var(--weight-light); line-height: var(--leading-body); color: var(--bp-deep); }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 12px; }
.rich h2 { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 21px; line-height: var(--leading-heading); margin: 24px 0 8px; }
.rich h3 { font-family: var(--font-body); font-weight: var(--weight-bold); font-size: 13px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--bp-blue); margin: 20px 0 8px; }
.rich ul, .rich ol { margin: 0 0 12px; padding-left: 24px; }
.rich li { margin-bottom: 4px; padding-left: 4px; }
.rich ul li::marker { color: var(--bp-blue); }
.rich ol li::marker { color: var(--bp-blue); font-weight: var(--weight-bold); }
.rich strong { font-weight: var(--weight-bold); }
.rich blockquote { margin: 0 0 12px; padding: 12px 18px; background: var(--bp-ice); border-radius: var(--radius-sm); border-left: 0; }
.description .content.rich { white-space: normal; }

.rich-editor .ql-toolbar.ql-snow {
    border: 1px solid var(--border-default); border-bottom: 1px solid var(--deep-08);
    border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--bp-cream); padding: 8px 10px; font-family: var(--font-body);
}
.rich-editor .ql-container.ql-snow {
    border: 1px solid var(--border-default); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: #fff; font-family: var(--font-body); transition: box-shadow var(--duration-base) var(--ease-out);
}
.rich-editor:focus-within .ql-container.ql-snow { border-color: var(--border-focus); box-shadow: var(--ring-focus); }
.rich-editor .ql-editor { min-height: 320px; padding: 16px 18px; font-size: 16px; }
.rich-editor .ql-editor.ql-blank::before { color: var(--deep-40); font-style: normal; left: 18px; right: 18px; }
.rich-editor .ql-editor li[data-list] { padding-left: 1.5em; }
.rich-editor .ql-snow .ql-formats { margin-right: 10px; }
.rich-editor .ql-snow.ql-toolbar button { width: 32px; height: 32px; padding: 6px; border-radius: var(--radius-sm); }
.rich-editor .ql-snow.ql-toolbar button:hover, .rich-editor .ql-snow.ql-toolbar button.ql-active { background: var(--bp-ice); }
.rich-editor .ql-snow .ql-stroke { stroke: var(--bp-deep); }
.rich-editor .ql-snow .ql-fill { fill: var(--bp-deep); }
.rich-editor .ql-snow.ql-toolbar button:hover .ql-stroke, .rich-editor .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--bp-blue); }
.rich-editor .ql-snow.ql-toolbar button:hover .ql-fill, .rich-editor .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--bp-blue); }
.rich-editor .ql-snow .ql-tooltip { border-radius: var(--radius-sm); box-shadow: var(--shadow-raised); border: 0; color: var(--bp-deep); z-index: 5; }
.rich-editor .ql-snow .ql-tooltip input[type=text] { border-radius: 8px; border-color: var(--border-default); }
.rich-editor .ql-snow .ql-tooltip::before { content: "Lien :"; }
.rich-editor .ql-snow .ql-tooltip a.ql-action::after { content: "Modifier"; }
.rich-editor .ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: "Enregistrer"; }
.rich-editor .ql-snow .ql-tooltip a.ql-remove::before { content: "Retirer"; }

.dropzone {
    position: relative; border: 2px dashed var(--deep-20); border-radius: var(--radius-lg); background: #fff;
    padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
    cursor: pointer; margin-bottom: 32px;
    transition: border-color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out);
}
.dropzone:hover, .dropzone.over { border-color: var(--bp-blue); background: var(--bp-ice); }
.dropzone.sending { opacity: .6; pointer-events: none; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone-icon {
    width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-brand);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px;
}
.dropzone-text { display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.dropzone-text strong { font-size: 17px; font-weight: var(--weight-regular); }
.dropzone-text strong b { font-weight: var(--weight-bold); }
.dropzone-text span { font-size: 14px; color: var(--deep-80); }

.tabs {
    display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: var(--radius-pill);
    background: #fff; box-shadow: inset 0 0 0 1px var(--deep-08); margin-bottom: 20px;
}
.tabs a {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 22px; border-radius: var(--radius-pill);
    font-size: var(--text-md); color: var(--text-muted); text-decoration: none; transition: var(--duration-base) var(--ease-out);
}
.tabs a:hover { color: var(--bp-deep); text-decoration: none; }
.tabs a.active { background: var(--bp-ice); color: var(--bp-deep); font-weight: var(--weight-bold); box-shadow: var(--shadow-xs); }

.edit-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: start; }
.edit-layout .card { grid-column: span 2; padding: 36px; margin: 0; min-width: 0; }
.tip { background: var(--bp-ice); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.tip-icon {
    width: 44px; height: 44px; border-radius: 50%; background: var(--gradient-brand);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px;
}
.tip strong { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 19px; }
.tip p { margin: 0; font-size: 16px; font-weight: var(--weight-light); line-height: var(--leading-body); }

/* ---------- Fiche candidat ---------- */
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.candidat-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 24px; align-items: start; }
.candidat-layout .card { margin: 0; display: flex; flex-direction: column; gap: 20px; }
.candidat-layout .card-title { margin: 0; }
.synthese { margin: 0; font-size: 19px; font-weight: var(--weight-light); line-height: var(--leading-body); text-wrap: pretty; }
.justif { margin: 0; font-size: 14px; color: var(--deep-80); }
.justif b { color: var(--bp-deep); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.facts div { background: var(--bp-cream); border-radius: var(--radius-sm); padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.facts dt { font-weight: var(--weight-bold); font-size: 11px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--deep-60); }
.facts dd { margin: 0; font-size: 15px; }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.points { display: flex; flex-direction: column; gap: 10px; }
.point { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; }
.point i { font-size: 12px; margin-top: 5px; }
.questions { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; }
.questions-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.questions-head span { font-size: 13px; color: var(--deep-80); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-item { display: grid; grid-template-columns: 20px 1fr; gap: 14px; }
.timeline-rail { display: flex; flex-direction: column; align-items: center; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gradient-brand); margin-top: 6px; flex: 0 0 auto; }
.timeline-line { flex: 1; width: 2px; background: var(--deep-08); margin-top: 6px; }
.timeline-body { display: flex; flex-direction: column; gap: 3px; padding-bottom: 22px; }
.timeline-body .t { font-size: 16px; }
.timeline-body .p { font-size: 13px; color: var(--deep-80); }
.timeline-body .r { font-size: 15px; font-weight: var(--weight-light); line-height: 1.5; margin-top: 2px; }
.formations { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; border-top: 1px solid var(--deep-08); }
.formations .h3 { margin-top: 16px; }
.formation { display: flex; gap: 12px; font-size: 15px; align-items: baseline; }
.formation i { font-size: 13px; color: var(--bp-blue); }

.history-item { padding: 16px 0; border-top: 1px solid var(--deep-08); display: flex; flex-direction: column; gap: 6px; }
.history-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.history-head b { font-size: 15px; }
.history-head .date { font-size: 13px; color: var(--deep-80); }
.history-text { font-size: 15px; font-weight: var(--weight-light); line-height: 1.5; white-space: pre-wrap; }

.toggle-panel > summary { list-style: none; display: inline-flex; }
.toggle-panel > summary::-webkit-details-marker { display: none; }
.toggle-panel[open] > summary { margin-bottom: 0; }
.rdv { border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--deep-08); overflow: hidden; }
.rdv.late { box-shadow: inset 0 0 0 1px var(--bp-amber); }
.rdv > summary {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; list-style: none;
    transition: background var(--duration-fast);
}
.rdv > summary::-webkit-details-marker { display: none; }
.rdv > summary:hover { background: var(--bp-cream); }
.rdv > summary b { font-size: 15px; }
.rdv .mode { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--deep-80); }
.rdv .mode i { font-size: 12px; color: var(--bp-blue); }
.rdv .chev { margin-left: auto; font-size: 12px; color: var(--bp-blue); transition: transform var(--duration-base) var(--ease-out); }
.rdv[open] .chev { transform: rotate(180deg); }
.rdv-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.cr { background: var(--bp-cream); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; font-weight: var(--weight-light); line-height: 1.5; white-space: pre-wrap; }

/* ---------- Connexion ---------- */
.login-wrap { min-height: calc(100vh - 220px); display: flex; align-items: center; justify-content: center; }
.login {
    width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    padding: 48px 40px; display: flex; flex-direction: column; gap: 28px;
}
.login-head { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.login-head img { height: 44px; width: auto; max-width: 100%; }
.login-head div { display: flex; flex-direction: column; gap: 6px; }
.login-head h1 { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 36px; line-height: var(--leading-display); letter-spacing: var(--tracking-display); }

@media (max-width: 720px) {
    main { padding: 24px 16px 64px; }
    .topbar-inner { padding: 0 16px; }
    .page-title { font-size: 32px; }
    .card { padding: 24px 20px; }
    .edit-layout .card { grid-column: auto; padding: 24px 20px; }
    .table th:first-child, .table td:first-child { padding-left: 20px; }
}
