:root {
  /* VLC design system — palette globale */
  --c-bg: #0B0B0D;
  --c-surface: #1F1F24;
  --c-surface-2: #17171B;
  --c-surface-elevated: #26262C;
  --c-border: #35353D;
  --c-border-strong: #4A4A54;

  --c-text: #F2F2F2;
  --c-muted: #A7A7AF;
  --c-text-inverse: #0B0B0D;

  --c-primary: #C1121F;
  --c-primary-deep: #8F0D17;
  --c-primary-hover: #D91C27;
  --c-primary-soft: rgba(193, 18, 31, .14);
  --c-primary-border: rgba(193, 18, 31, .42);

  --c-success: #42D392;
  --c-warning: #F7B955;
  --c-danger: #FF4D4D;
  --c-focus: #FF4D4D;

  --radius-sm: .65rem;
  --radius-md: .95rem;
  --radius-lg: 1.35rem;
  --radius-xl: 1.7rem;

  /* Neumorphism tokens — centralisés */
  --neu-shadow-dark: rgba(0, 0, 0, .72);
  --neu-shadow-light: rgba(255, 255, 255, .055);
  --neu-shadow-raised:
    10px 10px 24px var(--neu-shadow-dark),
    -7px -7px 18px var(--neu-shadow-light);
  --neu-shadow-soft:
    6px 6px 15px rgba(0, 0, 0, .58),
    -5px -5px 12px rgba(255, 255, 255, .045);
  --neu-shadow-inset:
    inset 5px 5px 12px rgba(0, 0, 0, .68),
    inset -4px -4px 10px rgba(255, 255, 255, .04);
  --neu-shadow-pressed:
    inset 4px 4px 10px rgba(0, 0, 0, .72),
    inset -3px -3px 8px rgba(255, 255, 255, .045);
  --neu-shadow-red:
    8px 8px 20px rgba(0, 0, 0, .62),
    -5px -5px 14px rgba(255, 255, 255, .035),
    0 8px 24px rgba(193, 18, 31, .20);

  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --max-width: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10rem, rgba(193, 18, 31, .20) 0, rgba(11, 11, 13, 0) 34rem),
    var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }

.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1.25rem 0 7rem;
}

.app-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem max(1rem, calc((100% - var(--max-width)) / 2));
  background: rgba(17, 17, 20, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .34);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; gap: .7rem; align-items: center; font-weight: 800; }
.brand--center { justify-content: center; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--c-primary), var(--c-primary-deep));
  color: #fff;
  box-shadow: var(--neu-shadow-red);
}
.eyebrow {
  display: block;
  color: var(--c-primary-hover);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.text-muted { color: var(--c-muted); }

/* Surfaces neumorphiques : relief lisible + fine bordure pour préserver le contraste */
.card {
  background: linear-gradient(145deg, #222228, #1A1A1F);
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--neu-shadow-raised);
}

.btn {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: var(--radius-md);
  padding: .68rem 1rem;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease, color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: var(--neu-shadow-pressed); }
.btn-primary {
  background: linear-gradient(145deg, #D91C27, #A90F1B);
  border-color: rgba(193, 18, 31, .50);
  color: #fff;
  box-shadow: var(--neu-shadow-red);
}
.btn-primary:hover { background: linear-gradient(145deg, var(--c-primary-hover), var(--c-primary)); }
.btn-secondary {
  background: linear-gradient(145deg, #292930, #202026);
  border-color: rgba(255, 255, 255, .07);
  color: var(--c-text);
  box-shadow: var(--neu-shadow-soft);
}
.btn-secondary:hover { border-color: var(--c-border-strong); background: linear-gradient(145deg, #2D2D34, #232329); }
.btn-success { background: linear-gradient(145deg, #4DDB9C, #31B77D); color: var(--c-text-inverse); box-shadow: var(--neu-shadow-soft); }
.btn-danger { background: linear-gradient(145deg, #DA1F2B, #A80E19); color: #fff; box-shadow: var(--neu-shadow-red); }
.btn-danger:hover { background: linear-gradient(145deg, var(--c-primary), var(--c-primary-deep)); }
.btn-ghost {
  background: linear-gradient(145deg, #202025, #18181D);
  border-color: rgba(255, 255, 255, .055);
  color: var(--c-text);
  box-shadow: var(--neu-shadow-soft);
}
.btn-ghost:hover { border-color: var(--c-primary-border); color: var(--c-primary-hover); }
.btn-sm { min-height: 38px; padding: .45rem .75rem; font-size: .9rem; }
.btn-block { width: 100%; }
.button-row { display: flex; gap: .75rem; flex-wrap: wrap; }

.label { font-weight: 700; font-size: .9rem; color: var(--c-text); }
.field { display: grid; gap: .45rem; }
.input, .select, .textarea {
  width: 100%;
  min-height: 47px;
  background: #18181D;
  color: var(--c-text);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--radius-md);
  padding: .72rem .9rem;
  box-shadow: var(--neu-shadow-inset);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.input::placeholder, .textarea::placeholder { color: #777780; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255, 255, 255, .14); }
.input:focus, .select:focus, .textarea:focus {
  background: #1A1A1F;
  border-color: var(--c-primary);
  box-shadow: var(--neu-shadow-inset), 0 0 0 3px rgba(193, 18, 31, .20);
  outline: none;
}
.input:disabled, .select:disabled, .textarea:disabled { opacity: .58; cursor: not-allowed; }

.check {
  appearance: none;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: #1B1B20;
  box-shadow: var(--neu-shadow-inset);
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.check:checked {
  background: linear-gradient(145deg, var(--c-primary-hover), var(--c-primary-deep));
  border-color: var(--c-primary-hover);
  box-shadow: var(--neu-shadow-pressed), 0 0 0 1px rgba(193, 18, 31, .22);
}
.check:checked::after { content: "✓"; color: white; font-size: .85rem; font-weight: 900; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .3rem .65rem;
  font-size: .78rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: var(--neu-shadow-soft);
}
.badge-primary { background: #241B20; color: var(--c-primary-hover); border-color: var(--c-primary-border); }
.badge-success { background: #18251F; color: #7BE6B7; border-color: rgba(66, 211, 146, .24); }
.badge-warning { background: #272116; color: #FFD083; border-color: rgba(247, 185, 85, .24); }
.badge-danger { background: #28191B; color: #FF8A8A; border-color: rgba(255, 77, 77, .28); }

.alert {
  border-radius: var(--radius-md);
  padding: .82rem 1rem;
  box-shadow: var(--neu-shadow-inset);
}
.page-shell > .alert { margin-bottom: var(--space-4, 1rem); }
.alert-error { background: #251719; border: 1px solid rgba(255, 77, 77, .30); color: #FF9A9A; }
.alert-success { background: #16241D; border: 1px solid rgba(66, 211, 146, .28); color: #8BE8C0; }
.alert-info { background: #171D25; border: 1px solid rgba(167, 167, 175, .24); color: var(--c-text); }
.form-stack { display: grid; gap: 1rem; }

.bottom-nav {
  position: fixed;
  left: .75rem;
  right: .75rem;
  bottom: max(.75rem, env(safe-area-inset-bottom));
  min-height: 70px;
  padding: .45rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: .25rem;
  background: linear-gradient(145deg, rgba(31, 31, 36, .97), rgba(18, 18, 22, .97));
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 1.35rem;
  box-shadow: var(--neu-shadow-raised);
  z-index: 30;
}
.bottom-nav__item {
  min-width: 0;
  min-height: 58px;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  font-size: .70rem;
  font-weight: 700;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav__item > span:first-child { font-size: 1.25rem; }
.bottom-nav__item:hover { color: var(--c-text); }
.bottom-nav__item.is-active {
  color: var(--c-primary-hover);
  background: #19191E;
  box-shadow: var(--neu-shadow-pressed);
  border: 1px solid rgba(193, 18, 31, .20);
}

@media (min-width: 900px) {
  .page-shell { padding-top: 2rem; }
  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: 20px;
    width: 620px;
    transform: translateX(-50%);
  }
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 450, 'GRAD' 0, 'opsz' 24;
  font-size: 1.35rem;
  line-height: 1;
  vertical-align: middle;
  flex: 0 0 auto;
}
.icon-inline { font-size: 1.1em; margin-right: .25rem; }

/* VLC branding */
.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(5px 6px 10px rgba(0, 0, 0, .55)) drop-shadow(-2px -2px 5px rgba(255,255,255,.035));
}
.brand-name { font-size: 1rem; letter-spacing: .025em; white-space: nowrap; }

.bottom-nav__item > .material-symbols-outlined { font-size: 1.55rem; }
.bottom-nav__item.is-active > .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 550, 'GRAD' 0, 'opsz' 24;
}
.btn > .material-symbols-outlined { font-size: 1.2rem; }
.badge > .material-symbols-outlined { font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 480px) {
  .app-header { min-height: 62px; }
  .brand-logo { width: 40px; height: 40px; }
  .btn-label { display: none; }
  .app-header .btn-sm { width: 42px; padding: 0; }
  .page-shell { width: min(calc(100% - 1.25rem), var(--max-width)); }
  .bottom-nav { left: .5rem; right: .5rem; }
}

/* Shared V1 application primitives */
:root{--c-border:rgba(255,255,255,.07);--c-border-strong:rgba(255,255,255,.14);--c-muted:#A7A7AF;--c-text-inverse:#0B0B0D;--c-primary:#C1121F;--c-primary-deep:#8F0D17;--c-primary-hover:#D91C27;--c-primary-border:rgba(193,18,31,.42);--c-focus:#FF4D4D}
.text-primary{color:var(--c-primary-hover)}
.text-danger{color:#FF8A8A}

.header-actions { display: flex; align-items: center; gap: .35rem; }
.header-actions form { margin: 0; }
.field-hint { color: var(--c-muted); font-size: .8rem; }
[hidden] { display: none !important; }

.form-help {
    margin: calc(var(--space-1) * -1) 0 var(--space-2);
    color: var(--c-text-muted);
    font-size: var(--text-sm);
    line-height: 1.45;
}

@media (max-width: 560px) {
  .brand-name { font-size: .72rem; letter-spacing: .01em; }
}

.nav-label-short{display:none}
@media(max-width:520px){.nav-label-long{display:none}.nav-label-short{display:inline}}
