/* Orchestre — feuille de styles */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f2f0eb;
  --surface-3: #e9e6df;
  --border: #e4e0d8;
  --border-strong: #d3cec4;
  --text: #1d1c1a;
  --muted: #6e6a63;
  --faint: #9c978f;
  --accent: #5b4bd6;
  --accent-hover: #4a3bc2;
  --accent-soft: #efedfc;
  --accent-text: #4636b8;
  --ai-grad: linear-gradient(135deg, #6a5af9 0%, #b04ad8 100%);
  --green: #1d7a46;  --green-soft: #e6f4ec;
  --amber: #a15c07;  --amber-soft: #fbf0dd;
  --blue: #1f5fa8;   --blue-soft: #e5eefa;
  --red: #b42318;    --red-soft: #fcebe9;
  --violet: #6b3fc4; --violet-soft: #f1ebfc;
  --gray-soft: #efede8;
  --shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 1px 1px rgba(30, 25, 15, .03);
  --shadow-lg: 0 10px 30px -12px rgba(30, 25, 15, .18), 0 2px 6px rgba(30, 25, 15, .05);
  --radius: 14px;
  --radius-sm: 9px;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121213;
    --surface: #1a1a1c;
    --surface-2: #212124;
    --surface-3: #2a2a2e;
    --border: #2c2c30;
    --border-strong: #3a3a40;
    --text: #ecebe8;
    --muted: #a19d96;
    --faint: #75716b;
    --accent: #8d7fff;
    --accent-hover: #a296ff;
    --accent-soft: #26223f;
    --accent-text: #b3a9ff;
    --green: #5fcf8f;  --green-soft: #17301f;
    --amber: #f0b45c;  --amber-soft: #352812;
    --blue: #79aef0;   --blue-soft: #172739;
    --red: #f2877d;    --red-soft: #3a1b18;
    --violet: #b89bf5; --violet-soft: #2a2140;
    --gray-soft: #26262a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.2; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0 0 .6em; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; word-break: break-all; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
[hidden] { display: none !important; }

/* ---------- Mise en page ---------- */

.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 22px 14px; border-right: 1px solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--ai-grad); color: #fff; box-shadow: 0 4px 14px -4px rgba(106, 90, 249, .6);
}
.brand-mark .icon { width: 19px; height: 19px; }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-section { margin: 14px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.menu-section:first-child { margin-top: 0; }
.menu-link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; transition: background .15s, color .15s;
}
.menu-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.menu-link.active { background: var(--accent-soft); color: var(--accent-text); }
.main { padding: 34px clamp(18px, 4vw, 52px) 80px; max-width: 1360px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.page-title { min-width: 0; }
.subtitle { margin: 6px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 500 14px var(--sans); cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ai { background: var(--ai-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(106, 90, 249, .8); }
.btn.ai:hover { filter: brightness(1.07); }
.btn.success { background: var(--green-soft); border-color: transparent; color: var(--green); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.small { height: 31px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.icon-only { width: 38px; padding: 0; }
.btn.icon-only.small { width: 30px; }
.btn.block { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
form.inline { display: inline-flex; margin: 0; }
.push { margin-left: auto; }

/* ---------- Cartes ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head.padded { padding: 18px 22px 4px; }
.card-head .count { color: var(--faint); font-weight: 500; }
.notice { border-radius: var(--radius-sm); padding: 12px 15px; margin-bottom: 18px; border: 1px solid transparent; }
.notice.warning { background: var(--amber-soft); color: var(--amber); }
.notice.danger { background: var(--red-soft); color: var(--red); }
.notice.info { background: var(--blue-soft); color: var(--blue); }
.notice.success { background: var(--green-soft); color: var(--green); }
.note-box { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; background: var(--gray-soft); color: var(--muted);
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
a.badge:hover { text-decoration: none; filter: brightness(.97); }
.cat { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cat::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--faint); }
.cat-lieu::before { background: #7c5cff; }
.cat-hotel::before { background: #2f8fd8; }
.cat-traiteur::before { background: #e0782f; }
.cat-activite::before { background: #2ea36b; }
.cat-animation::before { background: #d6458f; }
.cat-transport::before { background: #8a8f98; }
.stars { color: #e3a008; letter-spacing: 1px; font-size: 13px; white-space: nowrap; }
.stars .off { color: var(--surface-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: 12px; padding: 2px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.count { font-size: 12px; color: var(--faint); font-weight: 500; }

/* ---------- Accueil ---------- */

.hero {
  position: relative; overflow: hidden; margin-bottom: 26px; padding: 34px clamp(20px, 4vw, 40px);
  border-radius: 20px; border: 1px solid var(--border); background:
    radial-gradient(900px 300px at 100% 0%, rgba(176, 74, 216, .10), transparent 60%),
    radial-gradient(700px 300px at 0% 100%, rgba(106, 90, 249, .10), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
}
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.hero h1 { font-size: clamp(26px, 3.4vw, 38px); }
.hero-sub { color: var(--muted); max-width: 640px; margin: 10px 0 22px; }
form.ask {
  display: flex; gap: 10px; align-items: flex-end; padding: 8px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); max-width: 860px;
}
form.ask textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; padding: 9px 10px; font: 16px/1.5 var(--sans); color: var(--text); min-height: 44px; max-height: 240px; }
form.ask .btn { height: 44px; padding: 0 18px; border-radius: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; max-width: 860px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px;
  padding: 6px 13px; font: 13px var(--sans); cursor: pointer; transition: all .15s; text-align: left;
}
.chip:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

.onboarding h2 { margin-bottom: 14px; }
.steps-list { list-style: none; counter-reset: etape; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.steps-list li {
  counter-increment: etape; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px 12px 52px; position: relative; border-radius: var(--radius-sm); background: var(--surface-2);
}
.steps-list li::before {
  content: counter(etape); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-strong); font-weight: 600; font-size: 13px;
}
.steps-list li.done::before { content: "✓"; background: var(--green-soft); color: var(--green); border-color: transparent; }
.steps-list li p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { display: flex; gap: 13px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.kpi-value { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-detail { color: var(--faint); font-size: 12px; margin-top: 2px; }
.kpis.small .kpi-value { font-size: 19px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 0 20px; }
.grid-2 > * { min-width: 0; }
.event-list, .rank-list, .simple-list { list-style: none; margin: 0; padding: 0; }
.event-list li + li, .rank-list li + li, .simple-list li + li { border-top: 1px solid var(--border); }
.event-list a { display: flex; align-items: center; gap: 14px; padding: 11px 4px; color: var(--text); }
.event-list a:hover { text-decoration: none; background: var(--surface-2); border-radius: var(--radius-sm); }
.event-date {
  flex: none; width: 48px; height: 50px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-2);
}
.event-date .day { font-size: 18px; font-weight: 650; line-height: 1; }
.event-date .month { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 3px; }
.event-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.event-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-body .muted { font-size: 13px; }
.rank-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px; color: var(--text); }
.rank-list a:hover { text-decoration: none; background: var(--surface-2); border-radius: var(--radius-sm); }
.rank-list a > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.rank-list .muted { font-size: 13px; }
.rank-note { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.simple-list li { padding: 10px 0; }
.alert-box { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--red-soft); display: flex; flex-direction: column; gap: 4px; }
.alert-title { color: var(--red); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.alert-box a { color: var(--red); font-size: 13.5px; }

.feedback-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.feedback-grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.feedback { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.feedback-grid.wide .feedback { background: var(--surface); box-shadow: var(--shadow); }
.detail-side .feedback + .feedback, .detail-main .feedback + .feedback { margin-top: 10px; }
.feedback-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; min-height: 30px; }
.feedback p { margin: 0; }
.feedback .pos { color: var(--green); }
.feedback .neg { color: var(--red); }

/* ---------- Barre d'outils, onglets, recherche ---------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.tab { padding: 6px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; min-width: min(360px, 100%);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; color: var(--faint);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font: 14px var(--sans); color: var(--text); min-width: 0; }
.search select { border: 0; background: transparent; color: var(--text); font: 14px var(--sans); max-width: 180px; outline: 0; }

/* ---------- Tableaux ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { border-top: 1px solid var(--border-strong); border-bottom: 0; font-weight: 600; }
.table.compact th { padding: 8px 10px; }
.table.compact td { padding: 9px 10px; }
.table.compact th:first-child, .table.compact td:first-child { padding-left: 0; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 22px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 22px; }
tr.clickable { cursor: pointer; transition: background .1s; }
tr.clickable:hover td { background: var(--surface-2); }
.table td .cat { margin-bottom: 2px; }
select.mini { font: 12.5px var(--sans); padding: 3px 6px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.mini-table { margin-top: 8px; font-size: 13px; }
.mini-table td { padding: 5px 8px !important; }

/* ---------- Fiches détaillées ---------- */

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.detail-main, .detail-side { min-width: 0; }
.detail-side { position: sticky; top: 20px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.fact { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.fact > .icon { color: var(--accent-text); margin-top: 3px; }
.fact > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fact-label { font-size: 12px; color: var(--muted); }
.fact strong { font-weight: 600; }
.budget-bar { height: 5px; border-radius: 3px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.budget-bar div { height: 100%; border-radius: 3px; background: var(--green); }
.budget-bar div.over { background: var(--red); }
dl.infos { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 12px 0 0; font-size: 14px; }
dl.infos dt { color: var(--muted); }
dl.infos dd { margin: 0; overflow-wrap: anywhere; }
.diet { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; margin-bottom: 14px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green); font-size: 14px; }
.diet .icon { margin-top: 2px; }
.inline-forms { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; }
.row-form select { height: 31px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 13px var(--sans); padding: 0 8px; max-width: 280px; }

details.add { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
details > summary { cursor: pointer; list-style: none; color: var(--accent-text); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 12px; }

/* ---------- Formulaires ---------- */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; }
.form-grid.single { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.req { color: var(--red); }
.hint { font-size: 12.5px; color: var(--faint); }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 14.5px/1.45 var(--sans); transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 60px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.form-actions .muted { margin-right: auto; }
fieldset.provider-panel { border: 0; padding: 16px 0 6px; margin: 0 0 8px; border-bottom: 1px solid var(--border); }
.card.form .card-head:not(:first-child) { margin-top: 22px; }

/* ---------- Prestataires ---------- */

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.provider {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.provider:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.provider-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.provider-note { display: flex; align-items: center; gap: 4px; }
.provider h3 { font-size: 16px; }
.provider p { margin: 0; }
.provider .icon { width: 14px; height: 14px; vertical-align: -2px; }
.provider-desc { color: var(--muted); font-size: 13.5px; }
.provider-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 1px solid var(--border); font-weight: 600; font-size: 14px; }

/* ---------- États vides ---------- */

.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 14px; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-icon.ai { background: var(--ai-grad); color: #fff; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto; }
.empty-action { margin-top: 18px; }

/* ---------- Texte riche ---------- */

.prose { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--sans); margin: 1.2em 0 .45em; letter-spacing: -.01em; }
.prose h1 { font-size: 20px; } .prose h2 { font-size: 17.5px; } .prose h3 { font-size: 15.5px; } .prose h4 { font-size: 14.5px; }
.prose p, .prose ul, .prose ol { margin: 0 0 .75em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .2em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: .6em 0 1em; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose code { font-size: 13px; }
.prose blockquote { margin: .6em 0; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 1.2em 0; }
.text { overflow-wrap: anywhere; }

/* ---------- Assistant ---------- */

.chat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; height: calc(100vh - 68px); }
.chat-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.chat-list nav { display: flex; flex-direction: column; gap: 2px; }
.chat-link { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; }
.chat-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-link:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.chat-link.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chat { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.chat-head h1 { font-size: 21px; }
.chat-head .subtitle { font-size: 13px; }
.messages { flex: 1; overflow-y: auto; padding: 24px 22px; display: flex; flex-direction: column; gap: 22px; scroll-behavior: smooth; }
.chat-empty { margin: auto; text-align: center; max-width: 460px; }
.chat-empty h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 6px; }
.msg { display: flex; gap: 12px; max-width: 920px; width: 100%; }
.msg.user { justify-content: flex-end; margin-left: auto; }
.msg.user .bubble { background: var(--accent); color: #fff; padding: 11px 16px; border-radius: 18px 18px 6px 18px; max-width: 78%; box-shadow: var(--shadow); }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ai-grad); color: #fff; }
.avatar .icon { width: 17px; height: 17px; }
.avatar.thinking { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.94); } }
.msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
details.tools { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; align-self: flex-start; max-width: 100%; }
details.tools summary { color: var(--muted); font-size: 13px; }
details.tools ul { margin: 0; padding-left: 18px; }
details.tools li { margin: 3px 0; }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--border-strong); border-radius: 13px; padding: 11px 14px; font: 15px/1.5 var(--sans); background: var(--surface); color: var(--text); max-height: 220px; outline: 0; }
.composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer .btn { height: 46px; border-radius: 13px; }

.proposal { border: 1px solid var(--border-strong); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.proposal > header { padding: 18px 20px 14px; background: linear-gradient(180deg, var(--accent-soft), transparent); }
.proposal-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.proposal-tag .icon { width: 14px; height: 14px; }
.proposal h3 { font-family: var(--serif); font-size: 21px; margin: 6px 0 8px; }
.proposal-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13.5px; }
.proposal-meta span { display: inline-flex; align-items: center; gap: 5px; }
.proposal-meta .icon { width: 15px; height: 15px; }
.proposal-summary { padding: 0 20px; }
.proposal-budget { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-end; padding: 14px 20px; margin: 14px 0 4px; background: var(--surface-2); }
.proposal-budget > div { display: flex; flex-direction: column; }
.proposal-budget strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.proposal-budget .budget-bar { flex: 1 1 140px; margin: 0 0 8px; }
.proposal .table-wrap { padding: 0 20px; }
.proposal details.programme { margin: 12px 20px 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.attention { margin: 14px 20px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--amber-soft); color: var(--amber); font-size: 14px; }
.attention ul { margin: 6px 0 0; padding-left: 18px; }
.proposal > footer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; margin-top: 14px; border-top: 1px solid var(--border); }

/* ---------- Tâches de fond ---------- */

.job { display: flex; flex-direction: column; gap: 10px; }
.job-head { display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.job.done .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.job-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.job-steps li { display: flex; gap: 8px; align-items: baseline; animation: apparition .3s ease; }
.job-steps li::before { content: "✓"; color: var(--green); font-weight: 700; font-size: 12px; }
.job-steps li.current { color: var(--text); }
.job-steps li.current::before { content: "•"; color: var(--accent); animation: pulse 1.2s infinite; }
@keyframes apparition { from { opacity: 0; transform: translateY(3px); } }
.job-error { padding: 11px 14px; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red); font-size: 14px; }

/* ---------- Import ---------- */

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 38px 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); transition: all .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow); margin-bottom: 8px; }
.dropzone strong { font-size: 16px; }
.formats { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.file-list li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
details.paste { margin-top: 16px; }
details.paste textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 14px/1.5 var(--sans); resize: vertical; }
.review .card-head h2 .count { margin-left: 4px; }
.check-all { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.review-list { display: flex; flex-direction: column; }
.review-item { display: flex; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--border); cursor: pointer; }
.review-item:first-child { border-top: 0; }
.review-item input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.review-item:has(input:not(:checked)) .review-body { opacity: .45; }
.review-body { flex: 1; min-width: 0; }
.review-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
dl.kv { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--faint); }
dl.kv dt::after { content: " :"; }
dl.kv dd { margin: 0 0 0 -14px; color: var(--muted); overflow-wrap: anywhere; }
.sticky-actions {
  position: sticky; bottom: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
}

/* ---------- Notification ---------- */

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 12px; background: #1d1c1a; color: #fff; font-size: 14px; box-shadow: var(--shadow-lg);
  transition: all .25s ease; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-color-scheme: dark) { .toast { background: #f1efea; color: #1d1c1a; } }

/* ---------- Écrans étroits ---------- */

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-side { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    min-width: 0;
    position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center;
    padding: 10px 16px; gap: 14px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto;
  }
  .brand-name { display: none; }
  .menu { flex-direction: row; gap: 2px; }
  .menu-section { display: none; }
  .menu-link span { display: none; }
  .menu-link { padding: 9px; }
  .main { padding: 22px 16px 60px; }
  h1 { font-size: 25px; }
  .grid-2 { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-list { display: none; }
  .chat { height: calc(100vh - 110px); }
  .msg.user .bubble { max-width: 92%; }
  form.ask { flex-direction: column; align-items: stretch; }
  .search { min-width: 100%; }
}

/* ---------- Recherche dans la barre latérale ---------- */

.side-search {
  display: flex; align-items: center; gap: 8px; margin: -8px 4px 0; padding: 0 10px; height: 36px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; color: var(--faint);
}
.side-search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.side-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 14px var(--sans); }
.side-search .icon { width: 16px; height: 16px; }
kbd { font: 11px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--faint); background: var(--surface); }
.search.big { height: 50px; margin-bottom: 22px; border-radius: 14px; font-size: 16px; }
.search.big input { font-size: 16px; }

/* ---------- Édition directe ---------- */

.editable { cursor: pointer; border-radius: 6px; padding: 1px 3px; margin: -1px -3px; transition: background .12s, box-shadow .12s; outline: 0; }
.editable:hover, .editable:focus-visible { background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-soft); }
.editable .placeholder { color: var(--faint); font-style: italic; font-weight: 400; }
.editable.en-edition { background: none; box-shadow: none; cursor: default; display: inline-block; min-width: 140px; }
.editable.en-cours { opacity: .55; }
.editable.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { background: var(--green-soft); box-shadow: 0 0 0 2px var(--green-soft); } 100% { background: transparent; } }
.edit-champ {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface); width: 100%; min-width: 120px;
  padding: 5px 8px; border-radius: 8px; border: 1px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: 0;
}
textarea.edit-champ { min-width: min(560px, 100%); line-height: 1.5; resize: vertical; }
.edit-aide { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.bloc-editable > .editable { display: block; padding: 6px 8px; margin: -6px -8px; min-height: 28px; }
.bloc-editable > .editable.en-edition { display: block; }
h1 .editable { padding: 0 4px; margin: 0 -4px; }
.mini-lien { margin-left: 4px; font-size: 12px; color: var(--faint); }
.dates .editable { white-space: nowrap; }
.rempli { animation: rempli 1.4s ease; }
@keyframes rempli { 0% { background: var(--accent-soft); } 100% { background: var(--surface); } }

/* ---------- Listes déroulantes intelligentes ---------- */

.smart { position: relative; min-width: 0; }
.smart-natif { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; }
.smart-saisie {
  width: 100%; padding: 9px 30px 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239c978f' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--text); font: 14.5px/1.45 var(--sans); outline: 0;
}
.row-form .smart-saisie { height: 31px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; min-width: 260px; }
.smart-saisie:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.smart-liste {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; min-width: 280px; max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 4px;
}
.smart-groupe { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.smart-item { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.smart-item small { color: var(--muted); font-size: 12px; }
.smart-item:hover, .smart-item.actif { background: var(--accent-soft); }
.smart-item.choisi span { font-weight: 600; }
.smart-creer { color: var(--accent-text); font-weight: 500; border-top: 1px solid var(--border); margin-top: 4px; border-radius: 0 0 8px 8px; }
.smart-vide { padding: 10px; color: var(--faint); font-size: 13px; }

/* ---------- Suggestions ---------- */

.suggestions { border-color: var(--accent-soft); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70px); }
.suggestions .card-head h2 { display: flex; align-items: center; gap: 8px; }
.suggestion-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.suggestion {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--faint);
}
.suggestion.niv-alerte { border-left-color: var(--red); }
.suggestion.niv-attention { border-left-color: var(--amber); }
.suggestion.niv-conseil { border-left-color: var(--accent); }
.suggestion.niv-info { border-left-color: var(--blue); }
.suggestion-texte { min-width: 220px; flex: 1; }
.suggestion-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.suggestion-actions .btn.small { white-space: normal; text-align: left; height: auto; min-height: 31px; padding: 5px 11px; }
.tout-va-bien { color: var(--green); margin: 0; display: flex; align-items: center; gap: 6px; }
.a-faire .suggestion-texte div { color: var(--muted); font-size: 14px; }
a.kpi-lien { color: inherit; display: flex; }
a.kpi-lien > .kpi { flex: 1; }
a.kpi-lien:hover { text-decoration: none; }
a.kpi-lien:hover .kpi { border-color: var(--accent); }

/* ---------- Historique ---------- */

.journal { list-style: none; margin: 0; padding: 0; }
.journal > li { padding: 10px 0; border-top: 1px solid var(--border); }
.journal > li:first-child { border-top: 0; padding-top: 0; }
.journal > li.annule { opacity: .55; }
.journal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.journal-items { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.journal-items li { margin: 2px 0; overflow-wrap: anywhere; }
.barre { text-decoration: line-through; }

/* ---------- Assistant : modifications de l'IA ---------- */

.modification { border: 1px solid var(--border); border-left: 4px solid var(--violet); border-radius: 12px; padding: 10px 14px; background: var(--surface); font-size: 14px; }
.modification.annulee { border-left-color: var(--faint); opacity: .65; }
.modification-head { display: flex; align-items: center; gap: 8px; }
.modification-head .icon { color: var(--violet); }
.modification ul { margin: 6px 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }

/* ---------- Recherche ---------- */

.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li + li { border-top: 1px solid var(--border); }
.result-list a { display: flex; gap: 12px; padding: 10px 4px; color: var(--text); align-items: flex-start; }
.result-list a:hover { text-decoration: none; background: var(--surface-2); border-radius: var(--radius-sm); }
.result-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.result-icon .icon { width: 16px; height: 16px; }
.extrait { font-size: 13px; color: var(--muted); margin-top: 3px; padding-left: 8px; border-left: 2px solid var(--accent-soft); }

/* ---------- Import et documents ---------- */

.import-options { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.import-options details.paste { margin-top: 6px; flex: 1; min-width: 260px; }
label.dossier { cursor: pointer; }
.import-reglages { margin-top: 18px; align-items: end; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; padding: 6px 0; }
label.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.import-form.compact { padding: 0; border: 0; box-shadow: none; background: transparent; margin: 14px 0 0; }
.import-form.compact .dropzone { padding: 18px 14px; }
.import-form.compact .dropzone-icon { width: 38px; height: 38px; margin-bottom: 4px; }
.import-form.compact .form-actions { margin-top: 10px; }
.apercu { padding: 8px; }
.apercu iframe { width: 100%; height: 78vh; border: 0; border-radius: 10px; background: var(--surface-2); }
.apercu img { max-width: 100%; display: block; margin: 0 auto; border-radius: 10px; }
details.texte-extrait pre { white-space: pre-wrap; font: 12.5px/1.55 var(--mono); color: var(--muted); max-height: 420px; overflow: auto; margin: 0; }
.job-steps li.echec { color: var(--red); }
.job-steps li.echec::before { content: "✗"; color: var(--red); }
.toast.erreur { background: var(--red); color: #fff; }

/* ---------- Compte connecté (barre latérale) ---------- */

.side-user { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.side-user-nom { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); }
.side-user-nom:hover, .side-user-nom.active { background: var(--surface-2); text-decoration: none; }
.side-user-nom > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-user-nom strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-nom small { font-size: 11.5px; color: var(--faint); }
.side-user-nom .alerte { color: var(--amber); }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
@media (max-width: 860px) {
  .side-user { margin: 0 0 0 auto; padding: 0; border: 0; }
  .side-user-nom > span:last-child { display: none; }
}

/* ---------- Pages publiques : connexion, installation, invitation ---------- */

body.publique { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth { width: 100%; max-width: 440px; }
.auth-marque { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 30px 24px; box-shadow: var(--shadow-lg);
}
.auth-card.large { max-width: 520px; }
.auth:has(.auth-card.large) { max-width: 520px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .form { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 16px; }
.auth-card > p:last-child { margin-bottom: 0; }
.btn.large { height: 44px; font-size: 15px; }
input.code { font: 600 22px var(--mono); letter-spacing: .3em; text-align: center; max-width: 220px; }
.auth-card input.code { max-width: none; }

/* ---------- Double authentification, invitations, sessions ---------- */

.totp ol.etapes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 16px; }
.qr { margin: 12px 0 8px; }
.qr img { display: block; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--border); }
code.secret { font-size: 14px; letter-spacing: .08em; }
.copie { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.copie code { flex: 1; min-width: 0; background: transparent; padding: 0; font-size: 13px; }
ul.sessions { list-style: none; margin: 0 0 12px; padding: 0; }
ul.sessions li { padding: 10px 0; border-bottom: 1px solid var(--border); }
ul.sessions li:last-child { border-bottom: 0; }
ul.sessions .inline { margin-top: 6px; }
.table tr.alerte td { background: var(--red-soft); }
.card.small { font-size: 14px; color: var(--muted); }
.card.small ul { margin: 0; padding-left: 18px; }
.card.etroit { max-width: 560px; }

/* ---------- Droits d'accès au portail ---------- */

fieldset.droits { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px 10px; margin: 18px 0 0; }
fieldset.droits legend { padding: 0 6px; font-weight: 600; font-size: 14px; }
fieldset.droits .hint { margin: 0 0 8px; }
label.case { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; padding: 5px 0; }
label.case input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
label.case.sensible span { color: var(--text); }
label.case.small { font-size: 12.5px; color: var(--muted); padding-top: 6px; }
.liste-evenements { max-height: 280px; overflow-y: auto; margin-top: 6px; padding-left: 26px; }
.apercu-bandeau { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Portail des clients et prestataires ---------- */

body.portail { min-height: 100vh; display: flex; flex-direction: column; }
.portail-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 48px); background: var(--surface); border-bottom: 1px solid var(--border);
}
.portail-marque { display: flex; align-items: center; gap: 10px; color: var(--text); }
.portail-marque:hover { text-decoration: none; }
.portail-marque > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.portail-marque strong { font-family: var(--serif); font-size: 18px; }
.portail-marque small { font-size: 12px; color: var(--muted); }
.portail-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.portail-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 48px) 60px; }
.portail-pied { text-align: center; font-size: 12.5px; color: var(--faint); padding: 18px 16px 26px; }
