/* Mivayora — feuille de style principale (sans dépendance) */
:root {
  --ink: #14211f; --ink-2: #44524f; --muted: #6b7976;
  --bg: #f6f3ec; --surface: #ffffff; --surface-2: #faf8f3; --line: #e4ded1;
  --brand: #0f3d3e; --brand-2: #17595a; --accent: #d9822b; --accent-soft: #fbeedd;
  --ok: #2e7d4f; --ok-soft: #e3f2e8; --warn: #a86a00; --warn-soft: #fff3d6; --danger: #b3261e; --danger-soft: #fde7e5; --info-soft: #e5f0f5;
  --radius: 14px; --radius-s: 9px; --shadow: 0 1px 2px rgba(20,33,31,.06), 0 6px 20px rgba(20,33,31,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sidebar: 248px; color-scheme: light;
}
[data-theme="dark"] {
  --ink: #ece8df; --ink-2: #c7c2b6; --muted: #9a958a; --bg: #121716; --surface: #1b2220; --surface-2: #202826; --line: #2e3835;
  --brand: #7cc4bf; --brand-2: #9ad6d1; --accent: #f0a65a; --accent-soft: #3a2c1d; --ok-soft: #173525; --warn-soft: #3b2f12; --danger-soft: #3d1a17; --info-soft: #172c35;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); }
[data-theme="dark"] a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
img { max-width: 100%; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; } .right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }

/* Structure */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: var(--sidebar); flex: 0 0 var(--sidebar); background: var(--brand); color: #e9f2f0; display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto; }
[data-theme="dark"] .sidebar { background: #0d1514; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: inherit; text-decoration: none; padding: 4px 10px 16px; }
.brand-mark { color: var(--accent); font-size: 1.3em; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { color: #d5e5e2; text-decoration: none; padding: 9px 12px; border-radius: 10px; display: flex; gap: 10px; align-items: center; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a[aria-current] { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav-sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8fb3ae; margin: 16px 12px 4px; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 6px; }
.sidebar-foot .me { color: #fff; font-weight: 600; text-decoration: none; padding: 4px; }
.sidebar .btn-ghost { color: #d5e5e2; border-color: rgba(255,255,255,.2); width: 100%; text-align: left; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 24px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .search { flex: 1; max-width: 560px; }
.topbar .search input { width: 100%; border-radius: 999px; padding-left: 16px; }
.icon-btn { position: relative; text-decoration: none; font-size: 1.2rem; padding: 6px; }
.icon-btn .dot { position: absolute; top: -2px; right: -6px; background: var(--accent); color: #fff; border-radius: 999px; font-size: .68rem; padding: 1px 5px; font-weight: 700; }
.offline-badge { background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }
main { padding: 24px; max-width: 1240px; width: 100%; margin: 0 auto; }
.mobile-only { display: none; }
.bottom-nav { display: none; }

.trip-head { padding: 14px 24px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.trip-head-title a { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; margin-right: 10px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 12px; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a[aria-current] { color: var(--brand-2); border-color: var(--accent); }
[data-theme="dark"] .tabs a[aria-current] { color: var(--brand); }

/* Composants */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.stack > * + * { margin-top: 10px; }

.btn, button, input[type=submit] { font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; line-height: 1.2; }
[data-theme="dark"] .btn, [data-theme="dark"] button { color: #0d1514; }
.btn:hover, button:hover { filter: brightness(1.08); }
.btn-ghost, button.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger, button.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.small.btn, .btn.small, button.small { padding: 5px 10px; font-size: .85rem; }
button[disabled] { opacity: .5; cursor: not-allowed; }
.inline { display: inline; }

label { display: block; font-weight: 600; font-size: .88rem; margin: 0 0 4px; color: var(--ink-2); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-s); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand-2); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }

.flash { padding: 12px 16px; border-radius: var(--radius-s); margin-bottom: 14px; border: 1px solid transparent; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--info-soft); }
.alert { padding: 10px 14px; border-radius: var(--radius-s); margin: 8px 0; }
.alert-warning { background: var(--warn-soft); color: var(--warn); } .alert-danger { background: var(--danger-soft); color: var(--danger); } .alert-info { background: var(--info-soft); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.badge-proposed, .badge-estimated { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-verified { background: var(--info-soft); border-color: transparent; }
.badge-confirmed, .badge-paid { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-cancelled { background: var(--danger-soft); color: var(--danger); border-color: transparent; text-decoration: line-through; }
.badge-ai { background: #efe7fb; color: #5b3b9a; border-color: transparent; }
[data-theme="dark"] .badge-ai { background: #2c2240; color: #c9b4f0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Cartes de voyages */
.trip-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.trip-card { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.trip-card:hover { transform: translateY(-2px); }
.trip-cover { height: 140px; background: linear-gradient(135deg, var(--brand), var(--brand-2) 55%, var(--accent)); background-size: cover; background-position: center; position: relative; }
.trip-cover .badge { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); color: #14211f; }
.trip-card-body { padding: 12px 14px 14px; }
.trip-card h3 { margin: 0 0 2px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; font-family: var(--font-display); }
.stat span { color: var(--muted); font-size: .85rem; }

/* Programme */
.day { margin-bottom: 22px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; position: sticky; top: 58px; background: var(--bg); padding: 8px 0; z-index: 5; border-bottom: 2px solid var(--line); margin-bottom: 8px; }
.day-head h3 { margin: 0; }
.day-list { min-height: 46px; border-radius: var(--radius); padding: 4px; }
.day-list.drag-over { background: var(--accent-soft); outline: 2px dashed var(--accent); }
.item { display: grid; grid-template-columns: 58px 34px 1fr auto; gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 8px; }
.item[draggable=true] { cursor: grab; }
.item.dragging { opacity: .4; }
.item .time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); }
.item .emoji { font-size: 1.35rem; line-height: 1; }
.item .title a { color: var(--ink); text-decoration: none; font-weight: 600; }
.item .meta { color: var(--muted); font-size: .84rem; }
.item.conflict { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.item.cont { opacity: .72; background: var(--surface-2); }
.item.cancelled .title { text-decoration: line-through; }
.weather-chip { font-size: .82rem; color: var(--ink-2); }
.view-switch { display: inline-flex; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-switch a { white-space: nowrap; padding: 7px 12px; text-decoration: none; color: var(--ink-2); border-right: 1px solid var(--line); }
.view-switch a:last-child { border-right: 0; }
.view-switch a[aria-current] { background: var(--brand); color: #fff; }
.add-menu { display: flex; flex-wrap: wrap; gap: 6px; }
.add-menu a { text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-size: .88rem; }
.add-menu a:hover { border-color: var(--accent); }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar .dow { font-size: .75rem; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px; }
.calendar .cell { min-height: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: .78rem; }
.calendar .cell.out { background: transparent; opacity: .45; }
.calendar .cell.in-trip { border-color: var(--accent); }
.calendar .cell .n { font-weight: 700; }
.calendar .ev { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: var(--ink); }

.map { height: 62vh; min-height: 380px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.map.small { height: 240px; min-height: 0; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: .85rem; }
.leaflet-container { font: inherit; }
.marker-emoji { font-size: 22px; line-height: 28px; text-align: center; background: var(--surface); border: 2px solid var(--brand); border-radius: 50%; width: 32px !important; height: 32px !important; box-shadow: var(--shadow); }

/* Documents & photos */
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); background: var(--surface-2); transition: .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.doc-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc-ico { font-size: 1.6rem; width: 36px; text-align: center; }
.doc-row .grow { flex: 1; min-width: 0; }
.doc-row a.t { font-weight: 600; text-decoration: none; color: var(--ink); }
.viewer { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.gallery { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery figure { margin: 0; position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 4px 6px; font-size: .74rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #fff; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 82vh; object-fit: contain; }
.lightbox .lb-bar { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.lightbox button { background: rgba(255,255,255,.15); border-color: transparent; color: #fff; }

.msg { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 34px; object-fit: cover; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--brand-2); }
.progress > i.over { background: var(--danger); }
.bar-row { display: grid; grid-template-columns: 150px 1fr 110px; gap: 10px; align-items: center; margin: 6px 0; font-size: .9rem; }
.checklist li { list-style: none; display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.checklist { padding: 0; margin: 0; }
.checklist .done span { text-decoration: line-through; color: var(--muted); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 2.4rem; }
details > summary { cursor: pointer; font-weight: 600; }
pre.code { background: var(--surface-2); border: 1px solid var(--line); padding: 12px; border-radius: var(--radius-s); overflow: auto; max-height: 360px; font-size: .8rem; white-space: pre-wrap; }

/* Pages invité */
body.guest { background: radial-gradient(1200px 600px at 10% -10%, #d9eeea 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #fbe6cc 0, transparent 55%), var(--bg); }
[data-theme="dark"] body.guest { background: var(--bg); }
.guest-main { max-width: 440px; margin: 0 auto; padding: 8vh 18px 40px; }
.guest-main.wide { max-width: 860px; }
.guest-brand { font-family: var(--font-display); font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 18px; color: var(--brand); }

/* Responsive */
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) {
  .sidebar { display: none; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar .brand { padding: 0; font-size: 1.1rem; }
  .topbar .search { order: 5; flex-basis: 100%; max-width: none; }
  .topbar { flex-wrap: wrap; }
  main { padding: 14px 12px 96px; }
  .trip-head { padding: 10px 12px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .item { grid-template-columns: 46px 28px 1fr; }
  .item > :last-child { grid-column: 1 / -1; justify-self: end; }
  .bar-row { grid-template-columns: 100px 1fr 90px; }
  .day-head { top: 100px; }
  h1 { font-size: 1.5rem; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: .7rem; text-decoration: none; color: var(--ink-2); gap: 1px; }
  .bottom-nav a span { font-size: 1.25rem; }
  .calendar .cell { min-height: 64px; font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.notif-list a { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.notif-list a:last-child { border-bottom: 0; }

/* Couvertures : crédit photo et bouton de changement */
.cover-credit { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 10px; text-decoration: none; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.cover-credit:hover { background: rgba(0,0,0,.65); }
.cover-change { position: absolute; top: 10px; right: 10px; font-size: 13px; color: #14211f; background: rgba(255,255,255,.92); padding: 4px 10px; border-radius: 14px; text-decoration: none; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cover-grid form { margin: 0; }
.cover-grid button { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: none; width: 100%; cursor: pointer; text-align: left; }
.cover-grid button:hover { border-color: var(--brand); }
.cover-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cover-grid .cap { font-size: 11px; color: var(--muted); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Contre-valeurs en devise de référence */
.fx { color: var(--muted); font-size: .8em; font-weight: 400; white-space: nowrap; }
td .fx, .stat .fx, .bar-row .fx { display: block; }
.fx-twin { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.fx-twin[hidden] { display: none; }
.fx-twin input { flex: 1; }
.fx-twin span { color: var(--muted); min-width: 1.5em; }

/* Bouton « étape vérifiée » dans le programme */
button.verify-toggle { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; border: 1px dashed var(--muted); background: transparent; color: var(--ink-2); cursor: pointer; }
button.verify-toggle:hover { border-color: var(--ok); color: var(--ok); filter: none; }
button.verify-toggle.on { border-style: solid; border-color: transparent; background: var(--ok-soft); color: var(--ok); }

/* Logo */
.brand-logo { width: 28px; height: 28px; border-radius: 50%; display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.guest-brand .brand-logo { width: 40px; height: 40px; }

/* ---- Mode nuit : lisibilité ----
   Le texte foncé n'est réservé qu'aux boutons PLEINS (fond clair) ; les boutons transparents (ghost, danger,
   bascules) gardent un texte clair. Les couleurs d'état sont éclaircies pour rester lisibles sur fond sombre. */
[data-theme="dark"] {
  --ok: #6fcf97; --ok-soft: #173525; --warn: #f2b84b; --warn-soft: #3b2f12; --danger: #ff8a80; --danger-soft: #3d1a17; --info-soft: #172c35;
}
[data-theme="dark"] .btn-ghost, [data-theme="dark"] button.btn-ghost, [data-theme="dark"] a.btn.btn-ghost { color: var(--ink); background: transparent; border-color: #4a5753; }
[data-theme="dark"] .btn-ghost:hover, [data-theme="dark"] button.btn-ghost:hover { background: rgba(255,255,255,.06); }
[data-theme="dark"] .btn-ghost[aria-pressed="true"], [data-theme="dark"] button.btn-ghost[aria-pressed="true"] { background: var(--brand); color: #0d1514; border-color: var(--brand); }
[data-theme="dark"] .btn-danger, [data-theme="dark"] button.btn-danger, [data-theme="dark"] a.btn.btn-danger { color: var(--danger); background: transparent; border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
[data-theme="dark"] .sidebar .btn-ghost, [data-theme="dark"] .sidebar button.btn-ghost { color: #d5e5e2; border-color: rgba(255,255,255,.2); }
[data-theme="dark"] .view-switch a[aria-current] { color: #0d1514; }
[data-theme="dark"] .lightbox button { color: #fff; }
[data-theme="dark"] .cover-grid button { color: var(--ink); background: none; }
[data-theme="dark"] button.verify-toggle { color: var(--ink-2); background: transparent; border-color: var(--muted); }
[data-theme="dark"] button.verify-toggle:hover { color: #6fcf97; border-color: #6fcf97; }
[data-theme="dark"] button.verify-toggle.on { background: #1f4a33; color: #8fe3b0; border-color: transparent; }
[data-theme="dark"] .trip-cover .badge { color: #14211f; }

/* Mobile : les mises en page à colonnes personnalisées (accueil, participants, import…) passent sur une seule colonne */
@media (max-width: 820px) {
  .grid.grid-2, .grid.grid-3 { grid-template-columns: 1fr !important; }
}

/* Indicateur de chargement (clic sur un lien ou envoi d'un formulaire) */
.loading-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 2000; box-shadow: 0 0 8px var(--accent); opacity: 0; transition: width 8s cubic-bezier(.1,.7,.3,1), opacity .2s; }
.is-loading .loading-bar { opacity: 1; width: 85%; }
.loading-spinner { position: fixed; top: 14px; right: 18px; z-index: 2001; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: none; align-items: center; justify-content: center; }
.loading-spinner::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.is-loading .loading-spinner { display: flex; }
.is-loading, .is-loading a, .is-loading button { cursor: progress; }
button.is-busy { position: relative; color: transparent !important; pointer-events: none; }
button.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; }
button.btn-ghost.is-busy::after, button.btn-danger.is-busy::after { border-color: var(--line); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner::after, button.is-busy::after { animation-duration: 2s; } .loading-bar { transition: opacity .2s; } }
