/* blurryface — interface web
 *
 * Direction visuelle : fond nocturne, halos colorés discrets, verre dépoli,
 * typographie large. Le mobile est traité comme un cas de premier ordre :
 * cibles tactiles >= 44 px, marges sûres (encoche), listes en colonne unique.
 */

/* ------------------------------------------------------------- fondations */
:root {
  --bg: #08090d;
  --bg-elev: rgba(255, 255, 255, 0.045);
  --bg-elev-strong: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f4f8;
  --text-dim: #a4acbd;
  --text-faint: #6f7789;
  --accent: #6aa8ff;
  --accent-2: #7cf9d0;
  --accent-3: #b78bff;
  --danger: #ff6b81;
  --warn: #ffc266;
  --ok: #5ce1a8;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.85);
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* L'attribut ``hidden`` doit toujours l'emporter sur les mises en page
 * déclarées plus bas : sans cette règle, ``display: grid`` d'une classe
 * réaffiche un élément que le HTML ou le script vient de masquer. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 0.15em 0.45em;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-elev);
}

.muted { color: var(--text-dim); }
.small { font-size: 0.82rem; }
.grad {
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 55%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------------ halos */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora__blob {
  position: absolute;
  display: block;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora__blob--a {
  top: -18vmax;
  left: -10vmax;
  background: radial-gradient(circle, #1f6bff, transparent 65%);
}
.aurora__blob--b {
  top: 8vmax;
  right: -16vmax;
  background: radial-gradient(circle, #00d2a8, transparent 65%);
  animation-delay: -8s;
  opacity: 0.22;
}
.aurora__blob--c {
  bottom: -24vmax;
  left: 22vmax;
  background: radial-gradient(circle, #8b5cf6, transparent 65%);
  animation-delay: -15s;
  opacity: 0.24;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vmax, 3vmax, 0) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora__blob { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(8, 9, 13, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.brand__mark svg { width: 24px; height: 24px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 1rem; letter-spacing: -0.01em; }
.brand__text small { color: var(--text-faint); font-size: 0.72rem; }

.topbar__right { display: flex; align-items: center; gap: 0.5rem; }
.version {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.icon-btn:hover { background: var(--bg-elev-strong); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn svg { width: 20px; height: 20px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  white-space: nowrap;
}
.pill--ok { color: var(--ok); border-color: rgba(92, 225, 168, 0.3); }
.pill--warn { color: var(--warn); border-color: rgba(255, 194, 102, 0.3); }
.pill--busy { color: var(--accent); border-color: rgba(106, 168, 255, 0.35); }

/* ----------------------------------------------------------------- shell */
.shell {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 2.4vw, 1.6rem);
}

.hero { padding-block: clamp(0.5rem, 2vw, 1.5rem); }
.hero h1 {
  font-size: clamp(2rem, 6.2vw, 3.5rem);
  font-weight: 680;
}
.hero__sub {
  margin-top: 0.9rem;
  max-width: 60ch;
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
}

/* ------------------------------------------------------------------ carte */
.card {
  position: relative;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.card__head h2 { font-size: 1.06rem; }
.card__head p { margin-top: 0.15rem; }

/* -------------------------------------------------------------- dropzone */
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(190px, 34vw, 260px);
  padding: 1.4rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
  outline: none;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: rgba(106, 168, 255, 0.55);
  background: rgba(106, 168, 255, 0.06);
}
.dropzone.is-over {
  border-color: var(--accent-2);
  background: rgba(124, 249, 208, 0.09);
  transform: scale(1.008);
}
.dropzone.is-busy { cursor: progress; }
.dropzone__inner { display: grid; justify-items: center; gap: 0.35rem; }
.dropzone__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 0.5rem;
  border-radius: 18px;
  color: var(--accent-2);
  background: rgba(124, 249, 208, 0.1);
  border: 1px solid rgba(124, 249, 208, 0.22);
}
.dropzone__icon svg { width: 26px; height: 26px; }
.dropzone__title { font-size: 1.06rem; font-weight: 600; }
.dropzone__hint { color: var(--text-faint); font-size: 0.85rem; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.dropzone__progress { width: min(420px, 100%); display: grid; gap: 0.6rem; justify-items: center; }
.bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.25s var(--ease);
}
.dropzone__status { font-size: 0.85rem; color: var(--text-dim); }

/* ------------------------------------------------------------- réglages */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.ghost-btn:hover { color: var(--text); background: var(--bg-elev-strong); border-color: var(--line-strong); }
.ghost-btn svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.ghost-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.ghost-btn--icon { width: 44px; padding: 0; justify-content: center; }

.settings {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.4rem;
  animation: fade-up 0.35s var(--ease);
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 0.55rem;
}
.field--full { grid-column: 1 / -1; }
.field legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field output {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent-2);
  letter-spacing: 0;
  text-transform: none;
}
.info {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  font-size: 0.68rem;
  cursor: help;
  text-transform: none;
}

.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}
.profile {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, background 0.18s;
}
.profile strong { font-size: 0.9rem; font-weight: 600; }
.profile span { font-size: 0.76rem; color: var(--text-faint); }
.profile:hover { border-color: var(--line-strong); background: var(--bg-elev); }
.profile.is-active {
  border-color: rgba(106, 168, 255, 0.65);
  background: rgba(106, 168, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(106, 168, 255, 0.25);
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}
.segmented--wrap { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.segmented button {
  min-height: 40px;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.segmented button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.segmented button.is-active {
  color: #06121a;
  background: linear-gradient(180deg, #cfe9ff, #9fd0ff);
  font-weight: 600;
}
.segmented button small { display: block; font-size: 0.68rem; opacity: 0.7; font-weight: 400; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(106, 168, 255, 0.85), rgba(124, 249, 208, 0.85));
  opacity: 0.85;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #6aa8ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(106, 168, 255, 0.85), rgba(124, 249, 208, 0.85));
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #6aa8ff;
}
.scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.switch {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  min-height: 44px;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
  transition: background 0.2s;
}
.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.22s var(--ease);
}
.switch input:checked + .switch__track {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch__label { font-size: 0.9rem; }

.settings__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.2rem;
}

/* ------------------------------------------------------------------- file */
.jobs { list-style: none; display: grid; gap: 0.55rem; margin-top: 0.9rem; }

.job {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  animation: fade-up 0.3s var(--ease);
}
/* Les cartes simplement mises à jour ne rejouent pas l'entrée : seule une
 * carte nouvelle apparaît en fondu, ce qui évite tout clignotement. */
.job.is-settled { animation: none; }
.job--running { border-color: rgba(106, 168, 255, 0.35); }
.job--done { border-color: rgba(92, 225, 168, 0.28); }
.job--failed { border-color: rgba(255, 107, 129, 0.32); }
.job--cancelled { opacity: 0.72; }

.job__top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.job__name {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job__status { margin-left: auto; flex: none; }

.job__bar { height: 6px; }
.job__fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.job--done .job__fill { background: var(--ok); }
.job--failed .job__fill { background: var(--danger); }

.job__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.95rem;
  font-size: 0.8rem;
  color: #97a1b3;
}
.job__meta b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.job--failed .job__meta { color: #ffc9d1; }

.job__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.job__actions .ghost-btn { min-height: 38px; font-size: 0.8rem; padding: 0 0.75rem; }
.job__actions .primary-btn { min-height: 38px; font-size: 0.8rem; padding: 0 0.9rem; }

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #d3ecff, #9ccdff);
  color: #06121a;
  font-weight: 650;
  font-size: 0.88rem;
  cursor: pointer;
  transition: filter 0.18s, transform 0.18s;
}
.primary-btn:hover { filter: brightness(1.06); }
.primary-btn:active { transform: scale(0.98); }
.primary-btn svg { width: 17px; height: 17px; }

.danger-btn { color: var(--danger); }
.danger-btn:hover { border-color: rgba(255, 107, 129, 0.4); background: rgba(255, 107, 129, 0.08); }

.empty {
  margin-top: 1.1rem;
  padding: 1.4rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.88rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ------------------------------------------------------------------ modale */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88dvh, 900px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #14161d, #0c0e13);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.9);
  animation: pop 0.26s var(--ease);
}
.modal__panel--wide { width: min(920px, 100%); }
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem 0.8rem;
}
.modal__head h3 { font-size: 1.05rem; }
.modal__body { padding: 0 1.2rem 1.3rem; }
.modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.2rem calc(1rem + var(--safe-bottom));
  border-top: 1px solid var(--line);
}
.player {
  padding: 0 1.2rem 1rem;
}
.player video {
  width: 100%;
  max-height: 62dvh;
  border-radius: var(--radius);
  background: #000;
  display: block;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.stats b { color: var(--text); font-variant-numeric: tabular-nums; }

.prose { display: grid; gap: 0.7rem; font-size: 0.92rem; color: var(--text-dim); }
.prose ol, .prose ul { display: grid; gap: 0.45rem; padding-left: 1.15rem; list-style: revert; }
.prose strong { color: var(--text); }
.prose h4 {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

/* ------------------------------------------------------------------ toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(1.2rem + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 80;
  display: grid;
  gap: 0.5rem;
  width: min(440px, calc(100% - 2rem));
  pointer-events: none;
}
.toast {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(20, 22, 29, 0.96);
  backdrop-filter: blur(12px);
  font-size: 0.87rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.28s var(--ease);
}
.toast--error { border-color: rgba(255, 107, 129, 0.45); color: #ffd7de; }
.toast--ok { border-color: rgba(92, 225, 168, 0.4); color: #d3ffee; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) calc(2.5rem + var(--safe-bottom));
  text-align: center;
  color: var(--text-faint);
  font-size: 0.78rem;
  max-width: 70ch;
  margin: 0 auto;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding-inline: 1rem; }
  .brand__text small { display: none; }
  .version { display: none; }
  .shell { padding-bottom: 2.5rem; }
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .card { border-radius: 20px; }
  .card__head { flex-wrap: wrap; }
  .dropzone { min-height: 200px; padding: 1.1rem; }
  .dropzone__hint { font-size: 0.78rem; padding-inline: 0.5rem; }
  .profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings__actions { flex-direction: column-reverse; }
  .settings__actions .ghost-btn { width: 100%; justify-content: center; }
  .job__name { max-width: 100%; }
  .modal { padding: 0; place-items: end center; }
  .modal__panel {
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
  .modal__foot { flex-direction: column; align-items: stretch; }
  .modal__foot .primary-btn { width: 100%; }
  .player { padding-inline: 1rem; }
  .player video { max-height: 46dvh; }
}

@media (max-width: 420px) {
  .profiles { grid-template-columns: minmax(0, 1fr); }
  .segmented { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Repli pour navigateurs sans backdrop-filter (Safari anciens, Firefox ESR). */
@supports not (backdrop-filter: blur(1px)) {
  .card { background: #111319; }
  .topbar { background: #08090d; }
}
