/* Khôra — the hub (season, shop, ladder over the home page) and the card of the season. See hub.js. */

/* ---------- entries in the nav ---------- */
.links .links-sep { width: 1px; margin: 7px 4px; background: var(--line-2); flex: none; }
.links a.to-shop { color: #ffd257; }
.links a.to-shop:hover { color: #ffe08a; }
.hub-pill { display: none; }
@media (max-width: 1240px) { .links a { padding-inline: 10px; font-size: 13px; } }
@media (max-width: 1100px) { .links a { padding-inline: 8px; } .links { gap: 0; } }
@media (max-width: 980px) { .hub-pill { display: inline-flex; padding: 9px 14px; font-size: 13px; } }
.nav a:focus-visible, .nav button:focus-visible, .footer a:focus-visible, .more-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }

.more-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; color: var(--text); transition: border-color 0.3s, color 0.3s; }
.more-link i { font-style: normal; transition: transform 0.4s var(--ease); }
.more-link:hover { border-color: var(--accent); color: var(--accent); }
.more-link:hover i { transform: translateX(4px); }

/* ---------- the panel ---------- */
html.hub-open { overflow: hidden; }
.hub {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  opacity: 0; transform: translateY(5vh) scale(0.985); transform-origin: 50% 100%;
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
  will-change: transform, opacity;
}
.hub[hidden] { display: none; }
.hub.open { opacity: 1; transform: none; }
.hub-bar {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 12px var(--pad); border-bottom: 1px solid var(--line); background: rgba(14, 16, 19, 0.9);
}
.hub-brand { display: flex; align-items: center; gap: 10px; font: 600 13px/1 var(--mono); letter-spacing: 0.3em; }
.hub-tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.hub-tabs button {
  appearance: none; border: 0; background: none; cursor: pointer; color: #c9c9c4;
  font: 400 13.5px/1.55 var(--sans); letter-spacing: -0.005em; padding: 7px 18px; border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}
.hub-tabs button:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.hub-tabs button.on { background: var(--accent); color: var(--ink); font-weight: 500; }
.hub-tabs button[data-tab="boutique"].on { background: #ffd257; }
.hub-close {
  justify-self: end; appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 8px 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--dim);
  font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; transition: color 0.2s, border-color 0.2s;
}
.hub-close svg { width: 24px; height: 24px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; transition: transform 0.4s var(--ease); }
.hub-close:hover { color: var(--text); border-color: var(--text); }
.hub-close:hover svg { transform: rotate(90deg); }
.hub-tabs button:focus-visible, .hub-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hub-tabs button.on:focus-visible { outline-color: var(--text); }

.hub-frames { position: relative; flex: 1; min-height: 0; }
.hub-frames::before {
  content: ""; position: absolute; left: 50%; top: 38%; width: 14px; height: 14px; margin: -7px; background: var(--accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); animation: hub-wait 1.2s ease-in-out infinite;
}
@keyframes hub-wait { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
.hub-frames iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); color-scheme: dark;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.32s ease, transform 0.5s var(--ease), visibility 0s linear 0.32s;
}
.hub-frames iframe.on.ready { opacity: 1; visibility: visible; transform: none; transition: opacity 0.32s ease 0.06s, transform 0.5s var(--ease) 0.06s, visibility 0s; }

@media (max-width: 700px) {
  .hub-bar { grid-template-columns: auto 1fr auto; padding-block: 10px; gap: 8px; }
  .hub-brand span:last-child { display: none; }
  .hub-tabs { justify-self: center; gap: 0; padding: 4px; }
  .hub-tabs button { padding: 7px 11px; font-size: 13px; }
  .hub-close { padding: 0; width: 38px; justify-content: center; }
  .hub-close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ---------- the card of the season, on the first screen ---------- */
.season-card {
  position: absolute; right: var(--pad); bottom: clamp(120px, 17vh, 170px); z-index: 3; width: min(318px, calc(100vw - 2 * var(--pad)));
  padding: 16px 18px 18px; border-radius: 18px; border: 1px solid var(--line-2);
  background: rgba(14, 16, 19, 0.62); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease), border-color 0.3s;
}
.season-card[hidden] { display: none; }
.season-card.in { opacity: 1; transform: none; pointer-events: auto; }
.season-card:hover { border-color: rgba(198, 255, 74, 0.45); }
.season-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.season-card-live { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); }
.season-card-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.season-card.running .season-card-live { color: var(--accent); }
.season-card.running .season-card-live::before { background: var(--accent); box-shadow: 0 0 0 0 rgba(198, 255, 74, 0.6); animation: season-pulse 2s ease-out infinite; }
@keyframes season-pulse { 0% { box-shadow: 0 0 0 0 rgba(198, 255, 74, 0.55); } 100% { box-shadow: 0 0 0 9px rgba(198, 255, 74, 0); } }
.season-card-close { appearance: none; border: 0; background: none; color: var(--dim); cursor: pointer; width: 28px; height: 28px; margin: -6px -8px -6px 0; border-radius: 50%; display: grid; place-items: center; transition: color 0.2s, background 0.2s; }
.season-card-close svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; }
.season-card-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.season-card-title { margin: 0 0 14px; font: 400 clamp(21px, 1.7vw, 25px)/1.1 var(--sans); letter-spacing: -0.03em; }
.season-card-title em { font-size: 1.12em; }
.season-card-bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-bottom: 16px; }
.season-card-bar[hidden] { display: none; }
.season-card-bar i { display: block; height: 100%; width: 0; min-width: 3px; border-radius: 2px; background: var(--accent); transition: width 1.4s var(--ease) 0.3s; }
.season-card-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 14px; font-weight: 500; transition: background 0.3s; }
.season-card-go i { font-style: normal; transition: transform 0.4s var(--ease); }
.season-card-go:hover { background: var(--text); }
.season-card-go:hover i { transform: translateX(4px); }
.season-card-close:focus-visible, .season-card-go:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

@media (max-width: 980px) {
  .season-card { bottom: auto; top: 164px; right: var(--pad); width: min(300px, calc(100vw - 2 * var(--pad))); padding: 12px 14px 14px; }
  .season-card-title { font-size: 19px; margin-bottom: 10px; }
  .season-card-bar { margin-bottom: 12px; }
  .season-card-go { padding: 8px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .hub { transition: opacity 0.01s; transform: none; }
  .hub-frames iframe, .hub-frames iframe.on.ready { transition: none; transform: none; }
  .hub-frames::before, .season-card.running .season-card-live::before { animation: none; }
  .season-card { transition: opacity 0.01s; transform: none; }
  .season-card-bar i, .hub-close svg, .more-link i, .season-card-go i { transition: none; }
}

/* footer: a third column (season, shop, ladder) */
.footer-cols { grid-template-columns: repeat(3, minmax(0, 200px)); }
@media (max-width: 600px) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; font-size: 14px; } }

/* under the open panel, the page is not painted */
html.hub-covered #planet, html.hub-covered .grain, html.hub-covered body > main, html.hub-covered body > .footer { visibility: hidden; }

/* The whole menu of the site stays in the bar of the panel (user, 2026-11-30: "je préfère que tout reste accessible
   en tout temps"): a click on one of its entries closes the panel and goes to that part of the page. */
.hub-left { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); min-width: 0; }
a.hub-brand { color: inherit; text-decoration: none; }
.hub-site { display: flex; gap: clamp(10px, 1.4vw, 22px); min-width: 0; }
.hub-site a { color: #9a9b96; text-decoration: none; font: 400 13.5px/1.55 var(--sans); letter-spacing: -0.005em; white-space: nowrap; transition: color 0.25s; }
.hub-site a:hover { color: var(--text); }
.hub-site a:focus-visible, a.hub-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 1240px) { .hub-site { display: none; } }

/* The menu of the site never moves and never hides: the panel opens under it. */
.nav.hide { transform: none; }
html.hub-open body > .nav { z-index: 70; background: rgba(8, 9, 11, 0.94); border-bottom: 1px solid var(--line); }
.hub { top: var(--nav-h, 64px); }
.links a.tab-on { background: var(--accent); color: #0c0f04; font-weight: 500; }
.links a.to-shop.tab-on { background: #ffd257; color: #171204; }
html.hub-open .links a.on:not(.tab-on) { background: none; color: #c9c9c4; }
@media (min-width: 981px) {
  /* (The menu above already holds the three tabs: the bar of the panel keeps only its way out.) */
  .hub-bar { position: absolute; top: 12px; right: var(--pad); z-index: 3; display: block; padding: 0; border: 0; background: none; }
  .hub-bar .hub-left, .hub-bar .hub-tabs { display: none; }
}
