/* Administration — complète intranet.css */
.topbar__link { color: #cfdbe8; font-size: 12px; font-weight: 600; background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.topbar__link:hover { color: var(--lime); }
.topbar__right form { margin: 0; }

.admin__wrap { max-width: 1400px; margin: 0 auto; padding: 32px var(--pad-x) 56px; display: flex; gap: 32px; align-items: flex-start; }
.admin__nav { flex: 0 0 220px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; position: sticky; top: 16px; }
.admin__nav a { padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.admin__nav a:hover { background: #f6f8fa; color: var(--navy); }
.admin__nav a.is-active { background: var(--navy); color: var(--lime); }
.admin__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.admin__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin__head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; width: 100%; }
.admin__head .back + h1 { margin-top: 4px; }
.admin__head h1:not(:only-child) { width: auto; }
.intro { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--lime); background: var(--lime); color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 11px 20px; border-radius: 999px; cursor: pointer; transition: all 140ms ease; }
.btn:hover { background: var(--navy); border-color: var(--navy); color: var(--lime); }
.btn--ghost { background: var(--card); border-color: var(--line); }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfc; }
.actions { white-space: nowrap; text-align: right; }
.actions > div { display: flex; gap: 14px; justify-content: flex-end; align-items: center; }
.actions a, .link-danger { font-size: 12px; font-weight: 600; }
.actions form { margin: 0; }
.link-danger { background: none; border: none; color: #b83232; cursor: pointer; padding: 0; font-family: inherit; }
.link-danger:hover { text-decoration: underline; }
.pill { white-space: nowrap; display: inline-block; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.pill--on { background: #e7f5ec; color: #1f6b3e; }
.pill--prog { background: #e6effa; color: #2a5f9e; }
.pill--exp { background: #fdf3dc; color: #8a5d00; }
.dt { display: flex; gap: 8px; align-items: center; }
.dt input { max-width: 260px; }
.btn--sm { padding: 8px 14px; font-size: 11px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.08); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); }

.form { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.form__sub { margin: 8px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 700; }
.field--check label { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.field input[type=text], .field input[type=password], .field input[type=number], .field input[type=datetime-local], .field input:not([type]), .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 14px; color: var(--navy); background: #fff; outline: none; transition: border-color 140ms ease;
}
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); }
.field input[type=file] { font-size: 13px; }
.field__help { font-size: 11.5px; color: var(--muted-3); }
.field__err { font-size: 12px; font-weight: 600; color: #b83232; }
.has-error input, .has-error select, .has-error textarea { border-color: #d64545 !important; }
.color { display: flex; gap: 10px; align-items: center; }
.color input[type=color] { width: 44px; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #fff; cursor: pointer; }
.color input[type=text] { max-width: 140px; }
.readonly { padding: 11px 0; }
.imgprev { display: flex; align-items: center; gap: 14px; }
.imgprev img { max-height: 80px; max-width: 220px; border-radius: 8px; border: 1px solid var(--line); background: #f6f8fa; }
.imgprev--dark img { background: var(--navy); padding: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.form__actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }

.login { max-width: 440px; margin: 20px auto; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.kpi__n { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.kpi__l { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.panel__head h2 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.panel__head a { font-size: 11px; font-weight: 700; color: var(--olive); }
.panel__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.panel__row:hover { background: #f6f8fa; color: var(--navy); }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }

@media (max-width: 860px) {
  .admin__wrap { flex-direction: column; }
  .admin__nav { position: static; flex: none; width: 100%; flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Éditeur de texte riche ---------- */
.rte { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color 140ms ease; }
.rte:focus-within { border-color: var(--navy); }
.rte__bar { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px; background: #f6f8fa; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.rte__group { display: flex; align-items: center; gap: 2px; padding-right: 10px; border-right: 1px solid var(--line); }
.rte__group:last-child { border-right: none; }
.rte__btn { position: relative; min-width: 32px; height: 32px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--navy); font-family: Georgia, serif; font-size: 15px; cursor: pointer; line-height: 1; }
.rte__btn:hover { background: #fff; border-color: var(--line); }
.rte__btn.is-on { background: var(--navy); color: var(--lime); }
.rte__btn sub, .rte__btn sup { font-size: 9px; }
.rte__txt { font-family: inherit; font-size: 12px; font-weight: 600; }
.rte__danger { color: #b83232; }
.field .rte__select { width: auto; }
.rte__select { height: 32px !important; padding: 0 6px !important; line-height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy); font-size: 12.5px; font-weight: 600; padding: 0 6px; cursor: pointer; max-width: 150px; }
.rte__color { flex-direction: column; font-weight: 700; font-family: inherit; }
.rte__color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.rte__swatch { display: block; width: 18px; height: 4px; border-radius: 2px; }
.rte__hl { background: #fff176; padding: 0 2px; font-family: inherit; font-size: 13px; }
.rte__imgpanel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; background: #fdf8e1; border-bottom: 1px solid var(--line); }
.rte__imgpanel[hidden] { display: none; }
.rte__imglabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.rte__area { min-height: 320px; max-height: 70vh; overflow-y: auto; padding: 18px 22px; outline: none; font-size: 14.5px; line-height: 1.7; }
.rte__area img.is-selected { outline: 3px solid var(--lime); outline-offset: 2px; }
.rte__area td, .rte__area th { min-width: 40px; }
.rte__status { padding: 6px 12px; font-size: 11px; color: var(--muted-3); border-top: 1px solid var(--line-soft); text-align: right; }
