@font-face {
  font-family: "Portal Inter";
  src: url("/assets/inter-sales-latin-ext-65edaaef.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Portal Inter";
  src: url("/assets/inter-sales-latin-1f021a24.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Public surface: edition branding (inline --edition-* properties, already light-dark() per
   color mode) feeds the semantic surface tokens. Status, danger and focus semantics stay unbranded. */
body[data-page-surface="public"] {
  --color-page: var(--edition-page-background);
  --color-ink: var(--edition-page-foreground);
  --color-muted: var(--edition-muted);
  --color-accent: var(--edition-link);
  --color-accent-dark: var(--edition-link-hover);
  --color-highlight: var(--edition-primary);
  --color-highlight-dark: var(--edition-primary-border);
  --color-focus: var(--color-accent);
  --color-paper: var(--edition-surface);
  --color-wash: var(--edition-wash);
  --color-line: var(--edition-line);
  --button-foreground: var(--edition-primary-foreground);
}

/* Shared header. Backoffice adds a context bar (event, area, account) above grouped work navigation;
   the public header carries the event, its three destinations and the personal-area tabs. */
.portal-header {
  position: relative;
  z-index: 2;
  background: var(--color-paper);
  border-bottom: 3px solid var(--edition-primary, var(--color-highlight));
}

.portal-header-inner,.portal-brand,.portal-tools,.context-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.portal-header-inner { min-height: 3.5rem; padding-block: var(--space-1); }
.portal-brand {
  min-width: 0;
  color: var(--color-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.portal-brand small,.context-switch small { display: block; color: var(--color-muted); font-size: .75rem; }
.portal-brand .edition-logo,.context-switch .edition-logo {
  flex: none;
  max-width: 4rem;
  max-height: 2.25rem;
  object-fit: contain;
}

.portal-monogram {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-control);
  background: var(--color-highlight);
  color: var(--button-foreground);
  font-weight: 700;
}

.portal-tools,.portal-sign-in { flex: none; margin-inline-start: auto; }
.portal-tools .header-action { border-radius: 50%; }

.context-chevron {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Work and public destinations: one row, current item marked with the edition accent. */
.portal-navigation { min-width: 0; }
.portal-navigation summary { min-width: var(--portal-touch); min-height: var(--portal-touch); }
.portal-navigation summary::-webkit-details-marker { display: none; }
.portal-navigation ul,.section-tabs ul,.area-switch ul,.dropdown-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: 0;
  margin: 0;
  list-style: none;
}
.portal-navigation a,.section-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--portal-touch);
  padding-inline: var(--space-3);
  color: var(--color-muted);
  font-weight: 500;
  text-decoration: none;
}
.portal-navigation a:hover,.section-tabs a:hover { color: var(--color-ink); }
.portal-navigation a[aria-current] {
  color: var(--color-ink);
  font-weight: 650;
  box-shadow: inset 0 -3px 0 var(--edition-primary, var(--color-highlight));
}
.portal-navigation .navigation-group-items,.menu-location { display: none; }

.section-tabs { border-top: 1px solid var(--color-line); }
.section-tabs ul {
  width: min(100%, var(--portal-width));
  margin-inline: auto;
  padding-inline: var(--portal-gutter);
  column-gap: var(--space-5);
}
.section-tabs a { padding-inline: 0; font-size: .875rem; }
.section-tabs a[aria-current] {
  color: var(--color-ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--color-ink);
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-inline-start: var(--space-2);
  padding-inline: var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-highlight);
  color: var(--button-foreground);
  font-size: .7rem;
  font-weight: 700;
}

/* Area switch: an operator's own matters versus Backoffice of the same event. */
.area-switch ul {
  flex-wrap: nowrap;
  padding: 2px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-wash);
}
.area-switch a {
  display: inline-flex;
  align-items: center;
  min-height: var(--portal-touch);
  padding-inline: var(--space-3);
  border-radius: calc(var(--radius-control) - 2px);
  color: var(--color-ink);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.area-switch a[aria-current] { background: var(--color-paper); font-weight: 650; box-shadow: 0 1px 2px var(--color-shadow); }

/* Backoffice context bar. Neutral by design: edition branding stays on the accent line. */
.context-bar { background: var(--color-context); color: var(--color-context-ink); }
.context-bar-inner {
  width: min(100%, var(--portal-width));
  min-height: 3.5rem;
  margin-inline: auto;
  padding-inline: var(--portal-gutter);
}
.context-menu { position: relative; min-width: 0; }
.context-menu summary::-webkit-details-marker { display: none; }
.context-switch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--portal-touch);
  padding-inline: var(--space-1) var(--space-2);
  border-radius: var(--radius-control);
  list-style: none;
  cursor: pointer;
}
.context-switch:hover { background: var(--color-wash); }
span.context-switch { cursor: default; }
span.context-switch:hover,.context-bar span.context-switch:hover { background: none; }
.context-bar .context-switch:hover { background: rgb(255 255 255 / 10%); }
.context-switch-label { min-width: 0; line-height: 1.25; }
.context-switch-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-bar .context-switch small { color: color-mix(in srgb, var(--color-context-ink) 78%, transparent); font-size: .75rem; }
.context-switch .portal-monogram { width: 1.9rem; height: 1.9rem; }
.context-bar .area-switch ul { border-color: transparent; background: rgb(255 255 255 / 12%); }
.context-bar .area-switch a { color: color-mix(in srgb, var(--color-context-ink) 90%, transparent); }
.context-bar .area-switch a[aria-current] { background: var(--color-paper); color: var(--color-ink); }
.context-bar .header-action { border-color: rgb(255 255 255 / 28%); background: transparent; color: var(--color-context-ink); }
/* Public header row on the context band: brand, Sign in and the mobile Menu button.
   The band is dark in both modes, so an uploaded logo always sits on its light plate. */
.context-bar .edition-logo { background: #f7f3e9; }
.context-bar .portal-brand,.context-bar .portal-brand small { color: var(--color-context-ink); }
.context-bar :is(.portal-sign-in,.portal-navigation > summary) {
  border-color: rgb(255 255 255 / 28%);
  background: transparent;
  color: var(--color-context-ink);
}
.context-bar :is(.portal-sign-in,.portal-navigation > summary):hover { background: rgb(255 255 255 / 10%); box-shadow: none; }
@media (min-width: 641px) {
  .context-bar .portal-navigation a { color: color-mix(in srgb, var(--color-context-ink) 78%, transparent); }
  .context-bar .portal-navigation a:hover { color: var(--color-context-ink); }
  .context-bar .portal-navigation a[aria-current] { color: var(--color-context-ink); box-shadow: inset 0 -3px 0 var(--color-context-ink); }
}

/* Dropdowns (event switcher, account menu) share one panel. */
.dropdown-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + var(--space-2));
  right: 0;
  width: min(19rem, calc(100vw - 2rem));
  padding: var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  color: var(--color-ink);
  box-shadow: 0 8px 24px var(--color-shadow);
}
.context-menu .dropdown-panel { right: auto; left: 0; width: min(21rem, calc(100vw - 2rem)); }
.dropdown-panel ul { display: grid; gap: var(--space-1); }
.dropdown-heading {
  margin: var(--space-1) var(--space-2) var(--space-2);
  color: var(--color-muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dropdown-panel a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--portal-touch);
  padding: var(--space-2);
  border-radius: var(--radius-control);
  color: var(--color-ink);
  text-decoration: none;
}
.dropdown-panel a:hover { background: var(--color-wash); }
.dropdown-panel a[aria-current] { background: var(--color-wash); box-shadow: inset 3px 0 0 var(--color-highlight); }
.dropdown-panel li small { display: block; color: var(--color-muted); font-size: var(--font-size-small); }
.dropdown-footer-link { margin-top: var(--space-2); border-top: 1px solid var(--color-line); }

/* Color mode control: radio options in the shared dropdown panel. */
.color-mode-menu { position: relative; }
.color-mode-menu summary::-webkit-details-marker { display: none; }
.color-mode-panel { margin: 0; min-width: 12rem; width: auto; }
.color-mode-panel legend { float: left; width: 100%; padding: 0; }
.color-mode-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--portal-touch);
  padding-inline: var(--space-2);
  border-radius: var(--radius-control);
  cursor: pointer;
}
.color-mode-option:hover,.color-mode-option:has(:checked) { background: var(--color-wash); }
.color-mode-option:has(:checked) { font-weight: 650; }

.work-navigation {
  width: min(100%, var(--portal-width));
  margin-inline: auto;
  padding-inline: calc(var(--portal-gutter) - var(--space-3));
}

@media (max-width: 640px) {
  .portal-brand,.portal-header-inner,.portal-tools,.context-bar-inner { gap: var(--space-2); }
  .portal-header-inner,.context-bar-inner { flex-wrap: wrap; }
  body[data-page-surface="public"] .portal-brand small { display: none; }
  .portal-brand { flex: 1 1 0; }
  .context-menu { flex: 1 1 0; }
  .portal-header .context-switch small { display: none; }
  /* With a logo, the logo names the event on phones; the switcher keeps its accessible label. */
  .portal-header .context-switch:has(.edition-logo) .context-switch-label { display: none; }
  .area-switch { order: 10; flex-basis: 100%; padding-block-end: var(--space-2); }
  .area-switch ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area-switch a { justify-content: center; width: 100%; }
  .work-navigation { padding-block: var(--space-2); padding-inline: var(--portal-gutter); }
  .work-navigation .portal-navigation { position: relative; }
  .work-navigation .portal-navigation summary { display: flex; justify-content: flex-start; width: 100%; }
  .menu-location { display: inline; margin-inline-start: var(--space-1); color: var(--color-muted); font-weight: 500; }
  .portal-navigation-panel {
    position: absolute;
    z-index: 25;
    inset: calc(100% + var(--space-2)) var(--portal-gutter) auto auto;
    width: min(19rem,calc(100% - 2 * var(--portal-gutter)));
    max-height: 75dvh;
    overflow-y: auto;
    padding: var(--space-3);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-card);
    background: var(--color-paper);
    box-shadow: 0 8px 24px var(--color-shadow);
  }
  .work-navigation .portal-navigation-panel { inset: calc(100% + var(--space-2)) 0 auto 0; width: auto; }
  .portal-navigation ul { display: block; }
  .portal-navigation a { width: 100%; }
  .portal-navigation a[aria-current] { box-shadow: inset 3px 0 0 var(--edition-primary, var(--color-highlight)); }
  .portal-navigation .navigation-group-items { display: block; padding-inline-start: var(--space-3); }
  .work-navigation [data-primary-navigation] > ul > li + li { margin-top: var(--space-2); }
  .work-navigation [data-primary-navigation] > ul > li:has(.navigation-group-items) > a {
    min-height: var(--portal-touch);
    color: var(--color-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: none;
  }
  .section-tabs ul { flex-wrap: nowrap; overflow-x: auto; }
  .section-tabs a { white-space: nowrap; }
}

/* Browsers without light-dark() (still admitted by allow_browser :modern: Chrome 120-122,
   Safari 17.2-17.4) would see invalid color tokens. They get the light neutral palette,
   without dark mode or edition colors: readable and usable. Keep in sync with :root. */
@supports not (color: light-dark(#000, #fff)) {
  :root,:root[data-color-mode],body[data-page-surface] {
    color-scheme: light;
    --color-page: #f7f3e9;
    --color-ink: #211f1b;
    --color-muted: #6b6559;
    --color-accent: #a45116;
    --color-accent-dark: #713b16;
    --color-focus: #713b16;
    --color-highlight: #f4cf3e;
    --color-highlight-dark: #e5bb20;
    --button-foreground: #211f1b;
    --color-line: #e8dfca;
    --color-paper: #ffffff;
    --color-wash: #fff9e9;
    --color-context: #211f1b;
    --color-context-ink: #ffffff;
    --color-shadow: rgb(52 42 24 / 14%);
    --color-logo-plate: transparent;
    --color-danger: #8f201a;
    --color-danger-text: #651813;
    --color-danger-strong: #751812;
    --color-danger-surface: #fff4f2;
    --color-on-danger: #ffffff;
    --color-warning: #8a5b00;
    --color-warning-text: #573800;
    --color-warning-surface: #fff8e6;
    --color-success: #28724f;
    --color-success-text: #1f5139;
    --color-success-surface: #eff8f2;
    --color-info: #315d79;
    --color-info-text: #23445b;
    --color-info-surface: #f0f6fa;
  }
  .portal-header { border-bottom-color: var(--color-highlight); }
  .portal-navigation a[aria-current] { box-shadow: inset 0 -3px 0 var(--color-highlight); }
}
