/* =====================================================================
   SHUJAA ESPADA v2 — menu, check-in d'avant-scrim, objectifs
   Chargé après style.css sur toutes les pages.
   ===================================================================== */

/* ------------------------------------------------------------ nav -- */
.nav-links { gap: 22px; align-items: center; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nl-check {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(196, 49, 75, 0.5); background: rgba(196, 49, 75, 0.1);
  color: var(--gold-2); font-size: 13px; font-weight: 700;
}
.nl-check::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: none; }
.nl-check:hover, .nl-check:focus-visible { background: rgba(196, 49, 75, 0.22); color: #fff1f3; }
.menu-btn { display: none; }
.brand span, .nav .btn-sm { white-space: nowrap; }

@media (max-width: 1480px) {
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
    height: 34px; padding: 0 14px 0 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line); background: rgba(243, 235, 224, 0.03); color: var(--ink);
    font-size: 13px; font-weight: 700; position: relative;
  }
  .menu-btn i { display: block; width: 14px; height: 1.5px; background: currentColor; position: absolute; left: 12px; transition: transform 0.25s; }
  .menu-btn i:first-child { top: 13px; } .menu-btn i:nth-child(2) { top: 19px; }
  .menu-btn span { margin-left: 20px; }
  .nav.open .menu-btn i:first-child { transform: translateY(3px) rotate(45deg); }
  .nav.open .menu-btn i:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }
  .nav .nav-links {
    display: none; position: absolute; top: calc(var(--nav-h) - 4px); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    min-width: 230px; padding: 10px; border-radius: 18px;
    background: rgba(18, 9, 11, 0.97); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  }
  .nav.open .nav-links { display: flex; }
  .nav .nav-links a { padding: 11px 14px; border-radius: 10px; font-size: 15px; color: var(--ink); }
  .nav .nav-links a:hover { background: rgba(243, 235, 224, 0.06); }
  .nav .nl-check { height: 42px; margin-top: 6px; justify-content: center; font-size: 15px; }
  .snd { margin-left: 8px; }
}
@media (max-width: 760px) {
  .nav { gap: 10px; }
  .menu-btn, .snd, .nav .btn-sm { flex: none; }
  .brand { min-width: 0; }
  .brand span { overflow: hidden; text-overflow: ellipsis; }
  .menu-btn span { display: none; }
  .menu-btn { width: 38px; padding: 0; }
  .snd, .nav .btn-sm { margin-left: 0 !important; }
  .nav .nav-links { left: 12px; right: 12px; }
}

/* ---------------------------------------------------------- toast -- */
.ui-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 300; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 999px; background: #1d0e11; color: var(--ink); font-size: 14px; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(196, 49, 75, 0.5), 0 20px 40px -10px rgba(0, 0, 0, 0.8);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; max-width: calc(100vw - 32px);
}
.ui-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------- check-in -- */
.ck {
  width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: 26px; color: var(--ink);
  background: linear-gradient(170deg, #1e0d11, #0d0708 60%);
  box-shadow: inset 0 0 0 1px rgba(196, 49, 75, 0.35), 0 40px 120px -20px rgba(0, 0, 0, 0.95);
  overflow: auto; overscroll-behavior: contain;
}
.ck::backdrop { background: rgba(5, 2, 3, 0.72); backdrop-filter: blur(6px); }
.ck[open] { animation: ckIn 0.45s cubic-bezier(.2, .9, .2, 1); }
@keyframes ckIn { from { opacity: 0; transform: translateY(24px); } }
.ck-in { position: relative; padding: 30px clamp(18px, 4vw, 34px) 28px; }
.ck-x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--mute); font-size: 22px; line-height: 1; cursor: pointer; }
.ck-x:hover { color: var(--ink); }
.ck .kicker { margin-bottom: 10px; }
.ck-title { margin: 0; font-size: clamp(30px, 5vw, 44px); font-weight: 900; letter-spacing: -0.035em; line-height: 1; }
.ck-title em { font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--gold-2); letter-spacing: -0.01em; }
.ck-lede { margin: 10px 0 20px; color: var(--mute); font-size: 15px; max-width: 30em; }
.ck-who { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-who label { cursor: pointer; }
.ck-who input, .ck-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ck-who span { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); transition: background 0.2s, box-shadow 0.2s; }
.ck-who span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); }
.ck-who input:checked + span { background: color-mix(in srgb, var(--pc) 22%, transparent); box-shadow: inset 0 0 0 1.5px var(--pc); }
.ck-who input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.ck-who.shake { animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.ck-date { display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.ck-date input, .ck-note textarea, .co-field input, .co-field select, .co-field textarea, .ob-edit input {
  font: inherit; font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink);
  background: rgba(243, 235, 224, 0.05); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color-scheme: dark;
}
.ck-rows { display: grid; gap: 4px; margin-top: 10px; }
.ck-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto 108px; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ck-lb { font-weight: 700; font-size: 15px; }
.ck-stars { display: flex; gap: 4px; }
.ck-stars label { position: relative; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.ck-stars svg { width: 26px; height: 26px; fill: rgba(243, 235, 224, 0.08); stroke: rgba(243, 235, 224, 0.28); stroke-width: 1.3; stroke-linejoin: round; transition: transform 0.2s cubic-bezier(.2, .9, .3, 1.6), fill 0.15s; }
.ck-stars label.on svg { fill: var(--sc, #f0b44a); stroke: transparent; filter: none; }
.ck-stars label.pre svg { transform: scale(1.18); }
.ck-stars input:checked + svg { transform: scale(1.08); }
.ck-stars input:focus-visible + svg { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }
.ck-row[data-v="1"] { --sc: #e5583b; } .ck-row[data-v="2"] { --sc: #ec8a4a; } .ck-row[data-v="3"] { --sc: #e8c25a; } .ck-row[data-v="4"] { --sc: #9fd36a; } .ck-row[data-v="5"] { --sc: #4fdc9a; }
.ck-lv { font-family: var(--mono); font-size: 12px; color: var(--mute); text-align: right; }
.ck-row[data-v]:not([data-v="0"]) .ck-lv { color: var(--sc); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ck-note { display: grid; gap: 8px; margin-top: 16px; font-weight: 700; font-size: 14px; }
.ck-note small { font-weight: 400; color: var(--dim); margin-left: 4px; }
.ck-note textarea { resize: vertical; min-height: 56px; }
.ck-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.ck-mode { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.ck-team { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.ck-sub { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.ck-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ck-mate { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 26px; gap: 6px 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--pc) 9%, rgba(243, 235, 224, 0.02)); box-shadow: inset 3px 0 0 var(--pc); }
.ck-mate b { font-size: 14px; }
.ck-mate.off { grid-template-rows: auto; opacity: 0.6; }
.ck-mate.off span { grid-column: 1 / -1; font-size: 12px; color: var(--mute); }
.ck-bars { grid-column: 1; display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.ck-bars i { flex: 1; border-radius: 2px; background: #e8c25a; min-height: 3px; }
.ck-bars i.v1 { background: #e5583b; } .ck-bars i.v2 { background: #ec8a4a; } .ck-bars i.v4 { background: #9fd36a; } .ck-bars i.v5 { background: #4fdc9a; }
.ck-avg { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.ck-avg small { font-size: 12px; color: var(--mute); font-weight: 600; margin-left: 2px; }
@media (max-width: 560px) {
  .ck-row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .ck-lb { grid-column: 1; grid-row: 1; }
  .ck-lv { grid-column: 2; grid-row: 1; }
  .ck-stars { grid-column: 1 / -1; justify-content: space-between; }
  .ck-stars label { width: 44px; height: 40px; }
}

/* ------------------------------------------- objectifs (accueil) -- */
#objectifs { z-index: 2; }
.ob-label { margin: 0 0 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); display: flex; align-items: center; gap: 14px; }
.ob-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ob-road {
  --n: 4;
  position: relative; list-style: none; margin: 0 0 clamp(70px, 10vh, 120px); padding: 0;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; align-items: end;
  perspective: 1400px;
}
.ob-step {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: calc(150px + var(--i) * 46px); padding: 22px 22px 20px; border-radius: 20px 20px 6px 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) calc(10% + var(--i) * 7%), #160a0d), #0e0708 85%);
  box-shadow: inset 0 0 0 1px rgba(196, 49, 75, calc(0.25 + var(--i) * 0.12)), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  transform-origin: 50% 100%;
}
.ob-step::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 2px; opacity: calc(0.4 + var(--i) * 0.2); }
.ob-step .n { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--gold-2); }
.ob-step h3 { margin: 10px 0 0; font-size: clamp(22px, 2.3vw, 34px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; }
.ob-step:last-child h3 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(30px, 3.2vw, 48px); color: var(--gold-2); letter-spacing: -0.01em; }
.ob-step:last-child { box-shadow: inset 0 0 0 1.5px var(--gold), 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.ob-who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.ob-who span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mute); }
.ob-who span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); box-shadow: none; }
.ob-empty { padding: 28px; border-radius: 18px; color: var(--mute); box-shadow: inset 0 0 0 1px var(--line); }
.ob-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; perspective: 1400px; }
.ob-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 230px;
  padding: 22px; border-radius: 20px; text-decoration: none;
  background: linear-gradient(165deg, color-mix(in srgb, var(--pc) 16%, #150a0c), #0d0708 75%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 40%, transparent), 0 30px 60px -32px rgba(0, 0, 0, 0.9);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.3s;
}
.ob-card:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1.5px var(--pc), 0 30px 60px -32px rgba(0, 0, 0, 0.9); }
.ob-card .who { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ob-card .who b { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; color: var(--pc); }
.ob-card .who small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.ob-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ob-card li { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.2; color: var(--ink); padding-left: 18px; position: relative; }
.ob-card li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--pc); }
.ob-card .none { color: var(--dim); font-size: 14px; margin: 0; }
.ob-card .go { margin-top: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.ob-card:hover .go { color: var(--pc); }
@media (max-width: 860px) {
  .ob-road { grid-template-columns: 1fr; gap: 10px; padding-left: 26px; }
  .ob-road::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--gold), var(--gold-2)); border-radius: 2px; }
  .ob-step { min-height: 0; border-radius: 16px; }
  .ob-step::after { content: ""; position: absolute; left: -26px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px #0b0607; }
}

/* Fiche (accueil) : objectif perso */
.fiche .f-goals { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.fiche .f-goals li { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.2; color: var(--ink); }
.fiche .f-goals li::before { content: "◆ "; font-style: normal; font-size: 11px; color: var(--rc, var(--gold)); vertical-align: 3px; }
.fiche .f-goals .none { font-family: var(--sans); font-style: normal; font-size: 14px; color: var(--dim); }
.fiche .f-goals .none::before { content: none; }

/* séparation sections / pages dans la barre */
.nl-sep { width: 1px; height: 18px; background: var(--line); }
@media (max-width: 1480px) { .nav .nl-sep { width: auto; height: 1px; margin: 6px 4px; } }

/* transition entre pages (ui.js) */
html.pt-in::after { content: ""; position: fixed; inset: 0; z-index: 9998; background: #0d0a08; }
.pt { position: fixed; inset: 0; z-index: 9999; pointer-events: none; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(5, 1fr); perspective: 1400px; }
.pt i { display: block; background: #0d0a08; border: 1px solid rgba(196, 49, 75, 0.12); backface-visibility: hidden; opacity: 0; }
html.pt-in .pt i, .pt.cover i { opacity: 1; }

/* objectifs : écriture plus lisible (plus d'italique fine) */
.ob-card li { font-family: var(--sans); font-style: normal; font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; }
.ob-step:last-child h3 { font-family: var(--sans); font-style: normal; font-weight: 900; font-size: clamp(22px, 2.3vw, 34px); letter-spacing: -0.03em; color: var(--ink); }
.ob-step .detail { margin: 12px 0 0; font-size: 14px; line-height: 1.35; color: var(--mute); }
.ob-step .detail b { color: var(--pc); font-weight: 700; }
.fiche .f-goals li { font-family: var(--sans); font-style: normal; font-weight: 700; font-size: 16px; line-height: 1.3; }
/* l'état d'esprit de l'équipe (objectifs qui ne sont pas des étapes) */
.ob-mind { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0 0 clamp(70px, 10vh, 120px); padding: 0; list-style: none; }
.ob-mind li { padding: 18px 20px; border-radius: 16px; background: rgba(243, 235, 224, 0.03); box-shadow: inset 3px 0 0 var(--pc), inset 0 0 0 1px var(--line); }
.ob-mind p { margin: 0; font-weight: 700; font-size: 17px; line-height: 1.3; }
.ob-mind span { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pc); }
.ob-mind:empty { display: none; }

/* sous-menu de l'espace joueur */
.subnav {
  position: fixed; top: calc(var(--nav-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 45;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
  background: rgba(14, 7, 9, 0.9); box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -16px rgba(0, 0, 0, 0.9);
}
.subnav a { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--mute); }
.subnav a:hover { color: var(--ink); background: rgba(243, 235, 224, 0.06); }
.lite .subnav { background: rgba(14, 7, 9, 0.97); }
@media (max-width: 760px) { .subnav { top: auto; bottom: 12px; } }
@media (max-width: 420px) { .brand span { display: none; } }

/* avertissement : site ouvert en double-cliquant le fichier */
.file-warn {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 200;
  display: flex; align-items: flex-start; gap: 12px; width: min(720px, calc(100vw - 24px));
  padding: 14px 16px 14px 18px; border-radius: 16px; background: #1f0f12;
  box-shadow: inset 0 0 0 1px rgba(232, 194, 90, 0.45), 0 20px 50px -20px rgba(0, 0, 0, 0.95);
}
.file-warn p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--mute); }
.file-warn b { color: #f0d58a; }
.file-warn code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.file-warn button { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--mute); font-size: 18px; cursor: pointer; }
.espace .file-warn { bottom: 70px; }

/* en ligne : les autres pages s'ouvrent dans un cadre posé sur l'accueil (ui.js) */
.shell-frame { position: fixed; inset: 0; z-index: 9000; width: 100%; height: 100%; border: 0; background: var(--bg); }
html.shell-open, html.shell-open body { overflow: hidden; }

/* onglet actif souligné */
.nav-links a, .subnav a { position: relative; }
.nav-links a[aria-current="page"], .nav-links a.on, .subnav a.on { color: var(--ink); }
.nav-links a[aria-current="page"]::after, .nav-links a.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 2px; background: var(--gold);
}
.subnav a.on { background: rgba(243, 235, 224, 0.08); }
.subnav a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold); }
.nav .btn-gold[aria-current="page"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold-2); }
@media (max-width: 1480px) {
  .nav .nav-links a[aria-current="page"], .nav .nav-links a.on { background: rgba(196, 49, 75, 0.14); }
  .nav .nav-links a[aria-current="page"]::after, .nav .nav-links a.on::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; }
}

/* check-in : suppression */
.ck-acts { display: inline-flex; align-items: center; gap: 8px; }
.ck-team-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ck-team-head .ck-sub { margin: 0; }
.ck-clear { border: 0; background: none; padding: 4px 0; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.ck-clear:hover { color: var(--ink); }
.ck-clear.armed, .ck .btn-ghost.armed, .co-clear.armed { color: #ffb9a6; border-color: rgba(229, 88, 59, 0.6); }
.ck-fine { margin: 16px 0 0; font-size: 12px; color: var(--dim); }

/* un bouton caché reste caché, même avec une classe qui l'affiche */
[hidden] { display: none !important; }

/* ------------------------------------------- cloche des notifications -- */
.nl-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: rgba(243, 235, 224, 0.04); color: var(--mute); cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.nl-bell svg { width: 19px; height: 19px; }
.nl-bell:hover { color: var(--ink); background: rgba(243, 235, 224, 0.08); }
.nl-bell.has { color: #34d399; border-color: rgba(16, 185, 129, 0.6); }
.nl-bell.has svg { animation: bell-ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 82% { transform: rotate(-12deg); } 89% { transform: rotate(7deg); } }
.rm .nl-bell.has svg { animation: none; }
.nl-bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #10b981; color: #04140d; font: 800 11px/18px var(--sans); }
.nt-panel { position: fixed; z-index: 120; width: min(400px, calc(100vw - 24px)); max-height: min(70vh, 620px); overflow-y: auto; overscroll-behavior: contain; border-radius: 18px; padding: 14px; background: linear-gradient(160deg, #0d1f18, #070c0a); box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4), 0 30px 80px -20px rgba(0, 0, 0, 0.95); color: var(--ink); scrollbar-width: thin; }
.nt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nt-head b { flex: 1; font-size: 15px; }
.nt-allow { border: 1px solid rgba(16, 185, 129, 0.55); background: rgba(16, 185, 129, 0.14); color: #a7f3d0; border-radius: 999px; padding: 5px 10px; font: 700 12px var(--sans); cursor: pointer; }
.nt-x { border: 0; background: none; color: var(--mute); font-size: 22px; line-height: 1; cursor: pointer; }
.nt-hint { margin: 0 0 10px; font-size: 13px; color: var(--mute); }
.nt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nt-none { color: var(--mute); font-size: 14px; padding: 6px 2px; }
.nt-item { padding: 12px 14px; border-radius: 12px; background: rgba(243, 235, 224, 0.04); box-shadow: inset 3px 0 0 var(--tc), inset 0 0 0 1px var(--line); }
.nt-item.seen { opacity: 0.66; }
.nt-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.nt-type { font: 700 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tc); }
.nt-when { font-size: 12px; color: var(--mute); }
.nt-title { display: block; font-size: 15px; margin-bottom: 4px; }
a.nt-title { color: var(--ink); font-weight: 700; text-decoration: none; }
a.nt-title:hover { color: var(--gold-2); }
.nt-text { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-line; color: var(--ink); }
.nt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.nt-ok { border: 1px solid var(--line); background: rgba(243, 235, 224, 0.05); color: var(--ink); border-radius: 10px; padding: 6px 12px; font: 700 13px var(--sans); cursor: pointer; }
.nt-ok.on { border-color: rgba(63, 224, 122, 0.6); background: rgba(63, 224, 122, 0.14); }
.nt-count { font: 700 12px var(--mono); color: var(--mute); }
.nav-links a, .nl-check { white-space: nowrap; }
.nav > .nl-bell { flex: none; margin: 0 12px 0 18px; }
@media (max-width: 1500px) { .nav-links { gap: 16px; } .nav-links a { font-size: 14px; } }
@media (max-width: 1480px) { .nav > .nl-bell { margin: 0 8px; } }

/* --------------------------------- bouton œil des mots de passe -- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 46px !important; box-sizing: border-box; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--mute); cursor: pointer; transition: color 0.15s, background 0.15s; }
.pw-eye svg { width: 20px; height: 20px; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--ink); background: rgba(243, 235, 224, 0.08); }
.pw-eye[aria-pressed="true"] { color: var(--cc, var(--gold-2)); }

/* ------------------------------------------------- page confidentialité -- */
.legal { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; padding: calc(var(--nav-h) + 56px) var(--gutter) 90px; }
.legal .title { font-size: clamp(2.2rem, 5.4vw, 4.4rem); }
.legal .lede { margin-top: 14px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 10px; }
.legal-toc a { padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); background: rgba(243, 235, 224, 0.03); }
.legal-toc a:hover { background: rgba(243, 235, 224, 0.08); }
.legal section { margin-top: 46px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.legal h2 { margin: 0 0 12px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 900; letter-spacing: -0.01em; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: var(--ink); }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal code { font-family: var(--mono); font-size: 13px; color: var(--gold-2); background: rgba(243, 235, 224, 0.05); padding: 1px 6px; border-radius: 6px; }
.legal-table { overflow-x: auto; margin: 14px 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.legal th, .legal td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.45; }
.legal th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.legal tr:last-child td { border-bottom: 0; }
#clearMsg { margin-left: 10px; color: #3fe07a; font-size: 14px; }

/* ----------------------------------------------- clavier : focus visible -- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.st-tick input:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #0b0607; font-weight: 800; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 12px; }
.foot-links { display: inline-flex; gap: 14px; margin-left: 14px; }
.foot-links a { color: var(--mute); }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--ink); }

/* ------------------------------------------------ porte d'entrée du site -- */
html.gated, html.gated body { overflow: hidden; }
html.gated body > *:not(.gate) { visibility: hidden; }
.gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow-y: auto; padding: 24px 16px; background: radial-gradient(60% 50% at 70% 20%, rgba(196, 49, 75, 0.22), transparent 70%), radial-gradient(50% 45% at 15% 85%, rgba(196, 49, 75, 0.12), transparent 70%), #0b0607; color: var(--ink, #f3ebe0); font-family: var(--sans, system-ui, sans-serif); transition: opacity 0.45s, transform 0.45s; }
.gate.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
.gate-in { width: min(1040px, 100%); }
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-size: 14px; }
.gate-brand svg { width: 34px; height: 34px; color: #e2405a; }
.gate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.gate-form, .gate-about { border-radius: 22px; padding: 28px; background: linear-gradient(160deg, rgba(36, 14, 18, 0.94), rgba(14, 8, 9, 0.96)); box-shadow: 0 0 0 1px rgba(196, 49, 75, 0.4), 0 40px 100px -40px rgba(0, 0, 0, 0.9); }
.gate-kicker { margin: 0 0 10px; font-family: var(--mono, monospace); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: #e2405a; }
.gate-title { margin: 0; font-size: clamp(32px, 4.4vw, 52px); font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
.gate-title em { font-family: var(--serif, serif); font-weight: 400; color: #e2405a; }
.gate-lede { margin: 14px 0 22px; color: var(--mute, #a8969a); font-size: 15px; line-height: 1.55; }
.gate-field { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--mute, #a8969a); }
.gate-form input { font: inherit; font-size: 17px; color: var(--ink, #f3ebe0); padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(243, 235, 224, 0.16); background: rgba(243, 235, 224, 0.05); }
.gate-form input:focus { outline: 2px solid rgba(226, 64, 90, 0.7); outline-offset: 1px; }
.gate-err { min-height: 20px; margin: 10px 0 6px; font-size: 14px; color: #ff9a85; }
.gate-btn { width: 100%; height: 50px; border: 0; border-radius: 999px; cursor: pointer; font: 800 16px var(--sans, system-ui, sans-serif); color: #fff1f3; background: linear-gradient(180deg, #cf3a55, #96162d 60%, #6a0c1c); box-shadow: 0 0 0 1px rgba(240, 140, 155, 0.35) inset; }
.gate-btn:disabled { opacity: 0.6; cursor: progress; }
.gate-btn:focus-visible { outline: 2px solid #f3ebe0; outline-offset: 3px; }
.gate-fine { margin: 14px 0 0; font-size: 12.5px; color: var(--mute, #a8969a); line-height: 1.5; }
.gate-about h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.gate-about ul { margin: 0; padding-left: 18px; display: grid; gap: 9px; font-size: 14.5px; line-height: 1.5; }
.gate-about li::marker { color: #e2405a; }
.gate-form.shake { animation: gate-shake 0.4s; }
@keyframes gate-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 820px) { .gate-grid { grid-template-columns: 1fr; } .gate-form, .gate-about { padding: 22px; } }
/* le contenu reste flou tant qu'on n'est pas entré */
.gate-tease { margin: -6px 0 14px; font-size: 13px; color: #e2405a; font-weight: 700; }
.gate-about ul { filter: blur(6px); opacity: 0.85; user-select: none; -webkit-user-select: none; pointer-events: none; }

/* bulle « clique pour réactiver les sons » */
.snd-hint { position: fixed; z-index: 140; right: 18px; top: calc(var(--nav-h, 56px) + 12px); padding: 9px 14px; border-radius: 12px; font: 700 13px var(--sans); color: var(--ink); background: rgba(20, 10, 12, 0.92); box-shadow: 0 0 0 1px rgba(196, 49, 75, 0.5), 0 14px 30px -10px rgba(0, 0, 0, 0.9); animation: snd-in 0.35s ease-out; transition: opacity 0.35s, transform 0.35s; }
.snd-hint.out { opacity: 0; transform: translateY(-8px); }
@keyframes snd-in { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------- ouverture à l'épée (porte) -- */
.gate-intro { position: fixed; inset: 0; z-index: 5; overflow: hidden; pointer-events: auto; }
.gi-half { position: absolute; inset: 0; display: grid; place-items: center; will-change: transform;
  background: radial-gradient(55% 50% at 50% 45%, rgba(196, 49, 75, 0.25), transparent 70%), repeating-linear-gradient(135deg, rgba(243, 235, 224, 0.018) 0 2px, transparent 2px 9px), #0a0506; }
.gi-half.a { clip-path: polygon(0 0, 100% 0, 100% 100%); }
.gi-half.b { clip-path: polygon(0 0, 0 100%, 100% 100%); }
.gi-face { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 0 16px; }
.gi-logo { width: clamp(64px, 9vw, 110px); height: auto; color: #e2405a; filter: drop-shadow(0 0 22px rgba(226, 64, 90, 0.5)); }
.gi-k { margin: 0; font-family: var(--mono, monospace); font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: #e2405a; }
.gi-t { margin: 0; font-family: var(--sans, sans-serif); font-weight: 900; font-size: clamp(48px, 10vw, 150px); line-height: 0.92; letter-spacing: -0.03em; color: #f3ebe0; }
.gi-t em { font-family: var(--serif, serif); font-weight: 400; color: #e2405a; }
.gi-cut { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gi-cut line { fill: none; stroke-linecap: round; }
.gi-line { stroke: #fff3f5; stroke-width: 2.5; }
.gi-glow { stroke: #ff3d5a; stroke-width: 14; opacity: 0.55; filter: blur(6px); }
.gate-intro.sliced .gi-line { stroke-width: 4; }
.gi-sword { position: absolute; left: 0; top: 0; width: clamp(34px, 3.2vw, 48px); pointer-events: none; transform-origin: 0 0; filter: drop-shadow(0 0 14px rgba(255, 61, 90, 0.55)) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.8)); will-change: transform; }
.gi-sword svg { display: block; width: 100%; height: auto; }
.gi-hint { position: absolute; left: 50%; bottom: max(28px, 6vh); transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; padding: 10px 16px; border: 0; border-radius: 14px; background: transparent; color: #f3ebe0; cursor: pointer; font-family: var(--sans, sans-serif); }
.gi-hint b { font-size: 15px; font-weight: 800; letter-spacing: 0.02em; }
.gi-hint small { font-size: 12px; color: #a8969a; }
.gi-hint:focus-visible { outline: 2px solid #e2405a; outline-offset: 4px; }
.gi-mouse { width: 24px; height: 38px; border-radius: 14px; box-shadow: inset 0 0 0 2px #e2405a; position: relative; }
.gi-mouse i { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #e2405a; animation: gi-wheel 1.4s ease-in-out infinite; }
@keyframes gi-wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* l'œil du site, dans un coin de la porte */
.gate-eye { position: fixed; z-index: 6; top: 18px; right: 20px; display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.gate-eye svg { width: clamp(64px, 6vw, 92px); height: auto; filter: drop-shadow(0 0 16px rgba(226, 64, 90, 0.45)); }
.gate-eye .ge-lid { fill: #f3ebe0; stroke: #e2405a; stroke-width: 3; }
.gate-eye .ge-ring { fill: #8f1a2e; stroke: #e2405a; stroke-width: 2; }
.gate-eye .ge-pupil { fill: #0b0607; }
.gate-eye .ge-glint { fill: #fff; opacity: 0.85; }
.gate-eye .ge-iris { transition: transform 0.12s ease-out; }
.gate-eye .ge-blink { fill: #0b0607; transform: translateY(0); }
.gate-eye.blink .ge-blink { animation: ge-blink 0.28s ease-in-out; }
@keyframes ge-blink { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(64px); } }
.gate-eye span { font-family: var(--mono, monospace); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: #a8969a; }
@media (max-width: 600px) { .gate-eye span { display: none; } .gate-eye { top: 12px; right: 12px; } }

/* ouverture 3D (gate3d.js) */
.gate-intro3d { background: #050203; transition: opacity 0.5s; }
.gate-intro3d.out { opacity: 0; pointer-events: none; }
.gi3d-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; transition: opacity 0.2s linear; }
.gate-intro3d .gi-hint { z-index: 2; opacity: 0; transition: opacity 0.6s; }
.gate-intro3d.ready .gi-hint { opacity: 1; }
.gi-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; font: 700 12px var(--mono, monospace); letter-spacing: 0.3em; text-transform: uppercase; color: #a8969a; animation: gi-pulse 1.4s ease-in-out infinite; }
.gate-intro3d.ready .gi-load { display: none; }
@keyframes gi-pulse { 50% { opacity: 0.35; } }

/* ---- ouverture 3D : grain, voile final, apparition ---- */
.gate-intro3d { cursor: pointer; }
.gate-intro3d.out { transition: opacity 0.7s cubic-bezier(0.3, 0, 0.2, 1); }
.gi3d-grain { position: absolute; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay; animation: gi-grain 0.5s steps(4) infinite; }
@keyframes gi-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -5%); } 75% { transform: translate(-2%, -2%); } }
.gi3d-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: #0b0607; }
html.gi-reveal .gate-in, html.gi-reveal main { animation: gi-reveal 1.1s cubic-bezier(0.16, 0.8, 0.2, 1) both; }
@keyframes gi-reveal { from { transform: scale(1.04); filter: blur(10px); opacity: 0; } to { transform: none; filter: none; opacity: 1; } }
.gate.gate-replay { background: transparent; }
.gate.gate-replay.out { transition-duration: 0.2s; }
/* l'indication : sobre, en petites capitales, sans cadre */
.gate-intro3d .gi-hint { gap: 8px; padding: 10px 18px; }
.gate-intro3d .gi-hint b { font: 600 11px var(--mono, monospace); letter-spacing: 0.32em; text-transform: uppercase; color: #efe8dd; }
.gate-intro3d .gi-hint small { font: 500 10px var(--mono, monospace); letter-spacing: 0.14em; color: rgba(239, 232, 221, 0.5); }
.gate-intro3d .gi-hint:focus-visible { outline: 1px solid rgba(239, 232, 221, 0.35); outline-offset: 6px; border-radius: 2px; }
.gate-intro3d .gi-mouse { width: 18px; height: 28px; box-shadow: inset 0 0 0 1.2px rgba(239, 232, 221, 0.55); }
.gate-intro3d .gi-mouse i { top: 5px; width: 2px; height: 6px; margin-left: -1px; background: #efe8dd; }

/* historique des check-ins (ui.js, SE_CKHIST) : une petite courbe par joueur */
.ck-hist { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.ck-hist > summary { cursor: pointer; font-weight: 800; font-size: 15px; color: var(--ink); list-style: none; }
.ck-hist > summary::-webkit-details-marker { display: none; }
.ck-hist > summary::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--mute); transition: transform 0.2s; }
.ck-hist[open] > summary::before { transform: rotate(90deg); }
.ck-hist > .ckh { margin-top: 14px; }
.ckh-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ckh-tabs button { padding: 6px 12px; border: 0; border-radius: 99px; font: 600 12.5px var(--sans); color: var(--mute); background: rgba(243, 235, 224, 0.05); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.ckh-tabs button[aria-pressed="true"] { color: var(--ink); background: rgba(243, 235, 224, 0.12); box-shadow: inset 0 0 0 1px rgba(243, 235, 224, 0.35); }
.ckh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ckh-p { margin: 0; padding: 12px 14px 12px; border-radius: 14px; background: rgba(243, 235, 224, 0.03); box-shadow: inset 3px 0 0 var(--pc), inset 0 0 0 1px var(--line); }
.ckh-p figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.ckh-p figcaption b { font-size: 15px; }
.ckh-last { font: 800 20px var(--sans); color: var(--ink); }
.ckh-last small { font-size: 12px; font-weight: 500; color: var(--mute); }
.ckh-p svg { display: block; width: 100%; height: auto; overflow: visible; }
.ckh-g { stroke: rgba(243, 235, 224, 0.1); stroke-width: 1; }
.ckh-ax { font: 500 10px var(--mono); fill: var(--mute); }
.ckh-l { fill: none; stroke: var(--pc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ckh-d { fill: var(--pc); stroke: #0d0708; stroke-width: 2; }
.ckh-tr { display: block; margin-top: 4px; font-size: 13px; color: var(--mute); }
.ckh-tr i { font-style: normal; font-weight: 800; margin-right: 6px; color: var(--ink); }
.ckh-tr.up { color: var(--ink); } .ckh-tr.up i { color: #8ee04a; }
.ckh-tr.down { color: var(--ink); } .ckh-tr.down i { color: #ef4444; }
.ckh-none, .ckh-fine { margin: 6px 0 0; font-size: 12.5px; color: var(--mute); }
.ckh-fine { margin-top: 12px; }
.fo-hist { margin-top: 34px; }
.fo-hist-t { margin: 0 0 6px; font-size: 20px; }
.fo-hist-s { margin: 0 0 14px; font-size: 14px; color: var(--mute); }
