/* ==========================================================================
   Organigramme interactif — styles
   Les couleurs de marque sont injectées depuis config.js (--accent…).
   ========================================================================== */

:root {
  --accent: #0A6CFF;
  --accent-deep: #0040B8;
  --accent-soft: #E8F1FF;

  --bg: #F4F7FC;
  --bg-2: #EAF0FA;
  --surface: #FFFFFF;
  --surface-2: #F6F8FC;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-edge: rgba(255, 255, 255, 0.7);
  --line: rgba(15, 30, 60, 0.08);
  --line-strong: rgba(15, 30, 60, 0.14);
  --text: #0B1324;
  --text-2: #4B5568;
  --text-3: #7C8699;
  --mark: rgba(10, 108, 255, 0.16);
  --connector: #C5D2E8;

  --shadow-sm: 0 1px 2px rgba(16, 34, 72, 0.05), 0 2px 8px rgba(16, 34, 72, 0.05);
  --shadow-md: 0 2px 6px rgba(16, 34, 72, 0.05), 0 12px 32px rgba(16, 34, 72, 0.09);
  --shadow-lg: 0 8px 24px rgba(16, 34, 72, 0.08), 0 32px 80px rgba(16, 34, 72, 0.16);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1); /* = easing JS de la caméra */
  --ease-spring: cubic-bezier(0.32, 1.25, 0.5, 1);
  --topbar-h: 68px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070B14; --bg-2: #0C1322; --surface: #111A2B; --surface-2: #0E1626;
    --glass: rgba(17, 26, 43, 0.7); --glass-strong: rgba(17, 26, 43, 0.88); --glass-edge: rgba(255, 255, 255, 0.08);
    --line: rgba(200, 215, 255, 0.09); --line-strong: rgba(200, 215, 255, 0.16);
    --text: #EEF3FF; --text-2: #A9B4C9; --text-3: #7A869C; --mark: rgba(80, 150, 255, 0.3);
    --accent-soft: rgba(10, 108, 255, 0.18); --connector: #2A3A58;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 28px rgba(0,0,0,.4); --shadow-lg: 0 30px 80px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070B14; --bg-2: #0C1322; --surface: #111A2B; --surface-2: #0E1626;
  --glass: rgba(17, 26, 43, 0.7); --glass-strong: rgba(17, 26, 43, 0.88); --glass-edge: rgba(255, 255, 255, 0.08);
  --line: rgba(200, 215, 255, 0.09); --line-strong: rgba(200, 215, 255, 0.16);
  --text: #EEF3FF; --text-2: #A9B4C9; --text-3: #7A869C; --mark: rgba(80, 150, 255, 0.3);
  --accent-soft: rgba(10, 108, 255, 0.18); --connector: #2A3A58;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 28px rgba(0,0,0,.4); --shadow-lg: 0 30px 80px rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 160px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.i { flex: none; display: block; }
mark { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }

/* ---------- Fond ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 60%); }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.b1 { width: 60vw; height: 46vw; left: -12vw; top: -22vw; background: radial-gradient(circle, #9CC3FF, transparent 65%); }
.b2 { width: 50vw; height: 40vw; right: -14vw; top: -14vw; background: radial-gradient(circle, #B9D5FF, transparent 65%); }
.b3 { width: 40vw; height: 30vw; left: 30vw; top: 4vw; background: radial-gradient(circle, #CFE2FF, transparent 65%); opacity: .5; }
:root[data-theme="dark"] .blob { opacity: .22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .blob { opacity: .22; } }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-inner { max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; margin-right: auto; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.35);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-family: var(--font-display); font-size: 16px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.segmented {
  position: relative; display: inline-flex; padding: 4px; border-radius: 14px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.segmented button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: none; padding: 8px 16px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 560; color: var(--text-2); transition: color .25s ease;
}
.segmented button[aria-selected="true"] { color: var(--text); }
.segmented-thumb {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 10px;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 10px rgba(16,34,72,.1);
  transition: transform .45s var(--ease-spring), width .45s var(--ease-spring);
}

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; background: transparent; color: var(--text-2);
  transition: background-color .2s ease, color .2s ease, transform .12s ease;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.icon-btn:active { transform: scale(.92); }

/* ---------- Hero ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) 80px; }
.hero { text-align: center; padding: clamp(36px, 7vw, 76px) 0 clamp(20px, 3vw, 30px); transition: opacity .35s ease, transform .45s var(--ease-out); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6.4vw, 72px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 760;
  margin: 0 auto; max-width: 18ch; text-wrap: balance;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 62%, var(--accent)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 18px auto 0; max-width: 54ch; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.45; color: var(--text-2); letter-spacing: -0.005em; }
.stats { list-style: none; display: flex; justify-content: center; gap: clamp(20px, 5vw, 56px); margin: 30px 0 0; padding: 0; }
.stats li { display: flex; flex-direction: column; align-items: center; }
.stats b { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 720; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--text-3); }

/* ---------- Recherche + filtres ---------- */
.controls { position: relative; z-index: 30; }
.search-wrap { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 35; max-width: 780px; margin: 0 auto; }
.search {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 14px 0 22px; border-radius: 20px; cursor: text;
  background: var(--glass-strong);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.5);
  transition: box-shadow .3s ease, transform .3s var(--ease-out), border-color .3s ease;
}
.search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow-lg);
}
.search-icon { color: var(--accent); display: grid; }
.search-icon .i { width: 22px; height: 22px; }
.search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font: 500 19px/1 var(--font); letter-spacing: -0.01em; color: var(--text);
}
.search input::placeholder { color: var(--text-3); font-weight: 400; }
.search input::-webkit-search-cancel-button { display: none; }
.search-kbd {
  font: 600 12px var(--font); color: var(--text-3); padding: 5px 8px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface);
}
.search-clear { width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-2); }
.search-clear .i { width: 16px; height: 16px; }

.suggestions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; transition: opacity .3s ease; }
.suggestions-label { font-size: 13px; color: var(--text-3); margin-right: 2px; }
.suggestion {
  border: 1px solid var(--line-strong); background: var(--glass); cursor: pointer;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 520; color: var(--text-2);
  transition: all .2s ease;
}
.suggestion:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.suggestion:active { transform: scale(.96); }
.search-wrap.stuck .suggestions { opacity: 0; pointer-events: none; height: 0; margin: 0; overflow: hidden; }

.filters { margin: 28px 0 0; display: grid; gap: 10px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.filter-label { font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 540;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip:active { transform: scale(.96); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 18%, transparent); }
.chip .count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] {
  color: #fff; border-color: transparent;
  background: var(--c, var(--accent));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--c, var(--accent)) 35%, transparent);
}
.chip[aria-pressed="true"] .dot { background: #fff; box-shadow: none; }
.chip[aria-pressed="true"] .count { color: rgba(255,255,255,.8); }
.chip .i { width: 15px; height: 15px; }

.resultbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 18px; min-height: 28px; }
.counter { margin: 0; font-size: 15px; color: var(--text-2); }
.counter b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 560; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.link-btn:hover { background: var(--accent-soft); }

/* ---------- Annuaire ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.card {
  --c: var(--accent);
  position: relative; display: flex; flex-direction: column; gap: 14px; text-align: left;
  padding: 20px; border-radius: var(--r-lg); cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s ease;
  overflow: hidden; isolation: isolate; text-decoration: none; color: inherit;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 84px; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent);
  opacity: .9; transition: opacity .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 30%, var(--line)); }
.card:hover::before { opacity: 1.6; }
.card:active { transform: translateY(-1px) scale(.985); transition-duration: .12s; }
.card-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.card-id { min-width: 0; }
.card-name { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.card-title { margin: 2px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.35; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 540; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.tag .i { width: 13px; height: 13px; color: var(--text-3); }
.tag-dept { color: color-mix(in srgb, var(--c) 78%, var(--text)); background: color-mix(in srgb, var(--c) 9%, var(--surface)); border-color: color-mix(in srgb, var(--c) 18%, transparent); }
.card-asks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -2px; }
.card-asks span { font-size: 13px; color: var(--text-2); }
.card-asks span:not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--text-3); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.card-foot .pref { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 540; }
.card-foot .pref .i { width: 15px; height: 15px; color: var(--accent); }
.card-foot .rt { display: inline-flex; align-items: center; gap: 5px; }
.card-foot .rt .i { width: 14px; height: 14px; }
.card-match {
  font-size: 13px; line-height: 1.45; color: var(--text-2); padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-match small { display: block; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 2px; }

.card.enter { animation: cardIn .55s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Avatar ---------- */
.avatar {
  --size: 52px;
  width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden; position: relative;
  color: #fff; font-family: var(--font-display); font-weight: 650; font-size: calc(var(--size) * .36); letter-spacing: -0.01em;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 72%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 78%, #000));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.35);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { --size: 34px; }
.avatar.xs { --size: 26px; font-size: 10px; box-shadow: none; }
.avatar.xl { --size: 96px; }

/* ---------- Vide / erreurs / chargement ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty-icon .i { width: 28px; height: 28px; }
.empty h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; color: var(--text); margin: 0 0 6px; }
.empty p { margin: 0 0 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease; text-decoration: none;
}
.btn:hover { box-shadow: var(--shadow-md); }
.btn:active { transform: scale(.97); }
.btn .i { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff), var(--accent)); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }

.skeleton-grid .sk { height: 190px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.skeleton-grid .sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--accent) 7%, transparent) 50%, transparent 80%);
  animation: shimmer 1.4s infinite; transform: translateX(-100%);
}
@keyframes shimmer { to { transform: translateX(100%); } }
.error-state { display: grid; place-items: center; padding: 30px 0; }
.error-card { max-width: 520px; text-align: center; padding: 36px 32px; border-radius: var(--r-xl); }
.error-icon { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: #FFECEC; color: #E0353B; }
.error-icon .i { width: 28px; height: 28px; }
.error-card h2 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0 0 8px; }
.error-card p { color: var(--text-2); margin: 0 0 10px; }
.error-help { font-size: 14px; color: var(--text-3) !important; margin-bottom: 22px !important; }

.glass {
  background: var(--glass-strong);
  backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md);
}

/* ---------- Transitions de vue ---------- */
.view { animation: viewIn .5s var(--ease-out) backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body.mode-org .hero { display: none; }
body.mode-org main { max-width: none; padding-bottom: 0; }
body.mode-org .controls { max-width: 1320px; margin: 0 auto; padding-top: 18px; }
body.mode-org .suggestions { display: none; }
body.mode-org .filters { margin-top: 16px; }
body.mode-org .resultbar { margin: 14px 0 12px; }

/* ---------- Organigramme ---------- */
.view-org { position: relative; margin: 0 calc(var(--gutter) * -1); }
.org-viewport {
  position: relative; height: calc(100vh - var(--org-top, 300px)); height: calc(100dvh - var(--org-top, 300px)); min-height: 420px;
  overflow: hidden; cursor: grab; touch-action: none; outline: none;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 0) 0 0 / 22px 22px;
}
.org-viewport.dragging { cursor: grabbing; }
.org-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.org-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.org-links path { fill: none; stroke: var(--connector); stroke-width: 1.6; transition: d .5s var(--ease-quart), opacity .3s ease; }
.org-links path.dim { opacity: .35; }

.node {
  --c: var(--accent);
  position: absolute; left: 0; top: 0; width: 268px; height: 100px;
  display: flex; align-items: center; gap: 14px; padding: 0 16px 0 18px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: transform .5s var(--ease-quart), opacity .35s ease, box-shadow .25s ease, border-color .25s ease, filter .3s ease;
}
.node::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.node:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c) 35%, var(--line)); z-index: 2; }
.node .avatar { --size: 58px; }
.node-text { min-width: 0; flex: 1; }
.node-name { font-weight: 660; font-size: 16.5px; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-title { font-size: 13.5px; color: var(--text-2); line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.node-site { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node.is-hidden { opacity: 0; pointer-events: none; }
.node.dim { opacity: .28; filter: saturate(.3); }
.node.match { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow-md); }
.node.pulse { animation: pulse 1.6s var(--ease-out) 2; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow-md); }
  100% { box-shadow: 0 0 0 22px transparent, var(--shadow-md); }
}
.node-toggle {
  position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm);
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
}
.node-toggle:hover { background: var(--accent); color: #fff; border-color: transparent; }
.node-toggle:active { transform: translateX(-50%) scale(.9); }
.node-toggle .i { width: 14px; height: 14px; }
.node.collapsed .node-toggle { background: var(--accent); color: #fff; border-color: transparent; }

.org-toolbar { position: absolute; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 16px; }
.org-toolbar .icon-btn { width: 38px; height: 38px; }
.org-toolbar .sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }
.org-zoom { min-width: 52px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.org-hint { position: absolute; left: 20px; bottom: 20px; margin: 0; padding: 9px 14px; border-radius: 12px; font-size: 13px; color: var(--text-2); transition: opacity .5s ease; }
.org-hint.gone { opacity: 0; pointer-events: none; }

/* ---------- Fiche (panneau latéral) ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(6, 14, 32, 0.28);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .4s ease;
}
.scrim.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 70; top: 12px; right: 12px; bottom: 12px;
  width: min(540px, calc(100vw - 24px));
  display: flex; flex-direction: column;
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--glass-strong);
  backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-lg);
  transform: translateX(calc(100% + 24px)); opacity: .6;
  transition: transform .55s cubic-bezier(0.25, 1.1, 0.4, 1), opacity .4s ease;
}
.sheet.open { transform: none; opacity: 1; }
.sheet-grabber { display: none; }
.sheet-actions { position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; gap: 6px; }
.sheet-actions .icon-btn { background: var(--glass-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); border-radius: 50%; width: 38px; height: 38px; }
.sheet-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.sheet-content { padding: 0 0 28px; }
.sheet-content.swap { animation: swapIn .45s var(--ease-out) both; }
@keyframes swapIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.sheet-content.swap-back { animation: swapBack .45s var(--ease-out) both; }
@keyframes swapBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.p-hero { --c: var(--accent); position: relative; padding: 40px 28px 22px; text-align: center; isolation: isolate; }
.p-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%);
}
.p-hero .avatar { margin: 0 auto 16px; box-shadow: 0 0 0 5px var(--surface), 0 12px 30px color-mix(in srgb, var(--c) 40%, transparent); }
.p-name { font-family: var(--font-display); font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 740; margin: 0; }
.p-title { margin: 6px 0 0; font-size: 16px; color: var(--text-2); }
.p-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.p-since { margin: 14px 0 0; font-size: 13px; color: var(--text-3); }
.p-since b { color: var(--text-2); font-weight: 600; }

.p-section { margin: 0 20px 12px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.p-section h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3);
}
.p-section h3 .i { width: 15px; height: 15px; color: var(--accent); }
.p-section p { margin: 0; color: var(--text); line-height: 1.55; }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-btn { min-width: 0; }
.contact-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px;
  border-radius: 16px; text-decoration: none; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.contact-btn:hover { box-shadow: var(--shadow-md); }
.contact-btn:active { transform: scale(.96); }
.contact-btn .i { width: 22px; height: 22px; color: var(--accent); }
.contact-btn b { font-size: 14px; font-weight: 620; }
.contact-btn small { font-size: 11.5px; color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-btn.preferred {
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent-deep)); color: #fff; border-color: transparent;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 38%, transparent);
}
.contact-btn.preferred .i { color: #fff; }
.contact-btn.preferred small { color: rgba(255,255,255,.8); }
.pref-badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--accent-deep);
  box-shadow: 0 2px 8px rgba(10, 40, 100, .18);
}
.contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.info-tile { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.info-tile .i { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.info-tile small { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.info-tile span { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 540;
  background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 80%, var(--text));
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
}
.pill.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.pill mark { background: color-mix(in srgb, var(--accent) 28%, transparent); }

.redirects { display: grid; gap: 8px; }
.redirect { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.redirect-topic { background: var(--surface); color: var(--text); font-weight: 600; }
.redirect-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.redirect-label { font-size: 13.5px; color: var(--text-2); }
.redirect-arrow { color: var(--text-3); }
.redirect-arrow .i { width: 16px; height: 16px; }
.redirect-to { font-size: 14px; color: var(--text-2); }

.person-link {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.person-link:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.person-link:active { transform: scale(.96); }
.inline-person { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); cursor: pointer; }
.inline-person:hover { border-bottom-color: var(--accent); }

.person-row {
  --c: var(--accent);
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--text);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.person-row:hover { box-shadow: var(--shadow-md); background: var(--surface); }
.person-row:active { transform: scale(.985); }
.person-row .pr-text { flex: 1; min-width: 0; }
.person-row b { display: block; font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.person-row small { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row .pr-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.person-row > .i { color: var(--text-3); width: 18px; height: 18px; }
.people-list { display: grid; gap: 8px; }
.relations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.person-row { min-width: 0; }

.faq details { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; interpolate-size: allow-keywords; }
.faq details + details { margin-top: 8px; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; font-weight: 600; font-size: 15px; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q { flex: 1; }
.faq summary .i { width: 18px; height: 18px; color: var(--text-3); transition: transform .35s var(--ease-out); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details::details-content { height: 0; overflow: clip; transition: height .35s var(--ease-out), content-visibility .35s allow-discrete; }
.faq details[open]::details-content { height: auto; }
.faq .a { padding: 0 14px 14px; color: var(--text-2); line-height: 1.55; }

.tags-block { display: grid; gap: 14px; }
.tags-block h4 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tags-block h4 .i { width: 15px; height: 15px; color: var(--text-3); }

.note {
  --c: var(--accent);
  position: relative; margin: 0 20px 12px; padding: 22px 22px 22px 58px; border-radius: var(--r-lg);
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 14%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line));
}
.note .i { position: absolute; left: 20px; top: 20px; width: 24px; height: 24px; color: var(--c); opacity: .8; }
.note small { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 4px; }
.note p { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 500; letter-spacing: -0.01em; }

.p-footer { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 20px 0; }
.p-footer .btn { flex: 1; justify-content: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); opacity: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 550;
  color: #fff; background: rgba(12, 20, 36, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg); transition: transform .4s var(--ease-spring), opacity .3s ease; max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .i { width: 17px; height: 17px; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  :root { --topbar-h: 60px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; }
  .segmented button { padding: 8px 11px; }
  .segmented button [data-label] { display: none; }
  .search { height: 56px; padding: 0 10px 0 16px; border-radius: 18px; }
  .search input { font-size: 17px; }
  .search-kbd { display: none; }
  .suggestion:nth-of-type(n+5) { display: none; }
  .filter-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; }
  .filter-row::-webkit-scrollbar { display: none; }
  .stats { gap: 18px; }
  .org-hint { display: none; }
  .org-toolbar { right: 12px; bottom: 12px; }
  .node-toggle { bottom: -13px; }

  .sheet {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 92dvh; max-height: 92vh;
    border-radius: 28px 28px 0 0; border-bottom: 0;
    transform: translateY(100%); opacity: 1;
  }
  .sheet.dragging { transition: none; }
  .sheet-grabber { display: block; position: absolute; top: 0; left: 0; right: 0; height: 28px; z-index: 4; cursor: grab; touch-action: none; }
  .sheet-grabber span { display: block; width: 40px; height: 5px; border-radius: 3px; margin: 8px auto 0; background: var(--line-strong); }
  .p-section, .note { margin-left: 12px; margin-right: 12px; }
  .p-footer { margin-left: 12px; margin-right: 12px; }
  .contact-info, .relations { grid-template-columns: 1fr; }
}

/* ---------- Accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .card, .node, .segmented-thumb, .org-links path, .hero, .chip, .search { transition-duration: .01ms !important; }
  .sheet { transition: opacity .2s ease !important; transform: none !important; opacity: 0; }
  .sheet.open { opacity: 1; }
  .card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .sheet, .search, .topbar { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: var(--surface) !important; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(0,0,0,.3); --line-strong: rgba(0,0,0,.5); --text-2: #2b3340; --text-3: #4b5568; }
}
@media print {
  .topbar, .controls, .backdrop, .org-toolbar, .org-hint { display: none !important; }
}

/* ---------- Entrée en scène ---------- */
.hero > *, .controls > * { animation: introUp .8s var(--ease-out) backwards; }
.hero > :nth-child(1) { animation-delay: .05s; }
.hero > :nth-child(2) { animation-delay: .12s; }
.hero > :nth-child(3) { animation-delay: .2s; }
.hero > :nth-child(4) { animation-delay: .28s; }
.controls > :nth-child(1) { animation-delay: .34s; }
.controls > :nth-child(2) { animation-delay: .42s; }
.controls > :nth-child(3) { animation-delay: .48s; }
@keyframes introUp { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* bandeau derrière la recherche quand elle reste collée en haut */
.search-wrap::before {
  content: ""; position: absolute; z-index: -1; left: -100vw; right: -100vw; top: -10px; bottom: -18px;
  background: linear-gradient(180deg, var(--bg) 55%, color-mix(in srgb, var(--bg) 0%, transparent));
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.search-wrap.stuck::before { opacity: 1; }


/* ==========================================================================
   Avatars avec photo
   ========================================================================== */
.avatar .ini { position: relative; }
.avatar.has-photo .ini { visibility: hidden; }
.avatar.has-photo img { top: 6%; height: 100%; }

/* ==========================================================================
   Vue organigramme plein écran
   ========================================================================== */
.filters-btn { display: none; }
body.mode-org { overflow: hidden; }
body.mode-org .topbar { border-bottom-color: var(--line); }
body.mode-org main { max-width: none; padding: 0; }
body.mode-org .view-org { margin: 0; }
body.mode-org .org-viewport {
  height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h));
  min-height: 0; border-top: 0;
}

/* recherche + filtres : panneau flottant en haut à gauche */
body.mode-org .controls {
  position: fixed; z-index: 45; top: calc(var(--topbar-h) + 14px); left: 20px;
  width: min(500px, calc(100vw - 40px)); max-width: none; margin: 0; padding: 0;
}
body.mode-org .search-wrap { position: relative; top: auto; display: flex; gap: 8px; max-width: none; margin: 0; }
body.mode-org .search-wrap::before { display: none; }
body.mode-org .search { flex: 1; min-width: 0; height: 52px; border-radius: 16px; padding: 0 10px 0 16px; }
body.mode-org .search input { font-size: 16px; }
body.mode-org .search-icon .i { width: 19px; height: 19px; }
body.mode-org .filters-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none; height: 52px; padding: 0 16px; border-radius: 16px; cursor: pointer;
  font-weight: 600; font-size: 15px; color: var(--text);
  background: var(--glass-strong); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md);
  transition: color .2s ease, border-color .2s ease, transform .12s ease;
}
body.mode-org .filters-btn:active { transform: scale(.96); }
body.mode-org .filters-btn[aria-expanded="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.filters-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--accent);
}
body.mode-org .filters {
  display: none; margin: 10px 0 0; padding: 16px; gap: 14px; border-radius: 20px;
  max-height: calc(100dvh - var(--topbar-h) - 120px); overflow: auto;
  background: var(--glass-strong); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lg);
}
body.mode-org.filters-open .filters { display: grid; animation: popIn .28s var(--ease-out); }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
body.mode-org .filter-row { justify-content: flex-start; flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
body.mode-org .filter-label { width: 100%; margin: 0 0 2px; }
body.mode-org .resultbar {
  display: inline-flex; margin: 10px 0 0; padding: 6px 8px 6px 14px; min-height: 0; border-radius: 12px; gap: 6px;
  background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm);
}
body.mode-org:not(.is-filtered) .resultbar { display: none; }
body.mode-org .counter { font-size: 14px; }
body.mode-org .org-hint { left: 50%; transform: translateX(-50%); }

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 720px) {
  body.mode-org .controls { left: 12px; width: calc(100vw - 24px); top: calc(var(--topbar-h) + 10px); }
  body.mode-org .search, body.mode-org .filters-btn { height: 48px; }
  body.mode-org .filters-btn { padding: 0 14px; }
  .filters-btn-label { display: none; }
  body.mode-org .org-toolbar { left: 12px; right: 12px; justify-content: space-between; }
  body.mode-org .org-toolbar .icon-btn { width: 36px; height: 36px; }
  body.mode-org .org-toolbar .sep { margin: 0; }
  .org-zoom, .fs-btn, .fs-sep { display: none !important; }

  /* fiche en plein écran */
  .sheet {
    top: 0; bottom: 0; height: 100%; height: 100dvh; max-height: none;
    border-radius: 0; border: 0;
  }
  .sheet-actions { top: calc(env(safe-area-inset-top) + 12px); right: 12px; }
  .p-hero { padding-top: calc(env(safe-area-inset-top) + 52px); }
  .sheet-content { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
  .p-name { font-size: 27px; }
  .contact-btn { padding: 14px 6px 12px; }
  .contact-btn small { font-size: 11px; }
  .grid { gap: 12px; }
  .card { padding: 16px; }
}

/* une carte repliée reste invisible même quand un filtre est actif */
.node.is-hidden.dim, .node.is-hidden.match { opacity: 0; }

/* très petits écrans : le nom de l'entreprise cède la place au sélecteur de vue */
@media (max-width: 400px) {
  .topbar-inner { gap: 10px; }
  .brand { gap: 10px; }
  .segmented button { padding: 8px 10px; }
}
