/* ==========================================================================
   Puromètre — composants : boutons, formulaires, cartes, modales, mascotte
   ========================================================================== */

/* ---------- Boutons ---------- */

.btn {
  --bg: var(--glass-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 46px;
  padding: 0.8em 1.35em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--ink);
  font: 800 0.98rem/1.1 var(--font);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s, opacity 0.2s;
}

.btn:hover {
  background: var(--glass-3);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn:active {
  transform: scale(0.965);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #0c0616;
  box-shadow: 0 14px 34px -14px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 18px 44px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary::after,
.btn-yes::after,
.btn-no::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.btn-primary:hover::after,
.btn-yes:hover::after,
.btn-no:hover::after {
  transform: translateX(120%);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  color: var(--ink);
}

.btn-danger {
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}

.btn-danger:hover {
  background: rgba(251, 113, 133, 0.2);
  border-color: rgba(251, 113, 133, 0.55);
}

.btn-twitch {
  background: linear-gradient(135deg, #9146ff, #b57bff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 34px -14px rgba(145, 70, 255, 0.8);
}

.btn-sm {
  min-height: 36px;
  padding: 0.5em 1em;
  font-size: 0.86rem;
}

.btn-lg {
  min-height: 56px;
  padding: 0.95em 1.7em;
  font-size: 1.06rem;
}

.btn-xl {
  min-height: 68px;
  padding: 0.9em 1.8em;
  font-size: 1.1rem;
  flex-direction: column;
  gap: 0.3em;
  border-radius: 22px;
}

.btn-xl small {
  font-size: 0.74rem;
  font-weight: 700;
  opacity: 0.72;
  letter-spacing: 0.01em;
}

.btn-block {
  width: 100%;
}

.btn-yes {
  background: linear-gradient(135deg, #ff3d6e, #ff7a3d);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 16px 36px -14px rgba(255, 61, 110, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-no {
  background: linear-gradient(135deg, #7dd3fc, #a78bfa);
  border-color: rgba(255, 255, 255, 0.12);
  color: #0b0816;
  box-shadow: 0 16px 36px -14px rgba(125, 211, 252, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-yes:hover,
.btn-no:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-yes.is-bonus {
  background: #6ee7b7;
  color: #0b0816;
  box-shadow: 0 16px 36px -14px rgba(110, 231, 183, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass-2);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

.icon-btn:hover {
  background: var(--glass-3);
  border-color: var(--line-2);
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.on {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.icon-btn-sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 0.95rem;
}

/* ---------- Puces, badges, touches ---------- */

.chip {
  --c: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.42em 0.85em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  color: color-mix(in srgb, var(--c) 70%, white);
  font: 800 0.78rem/1 var(--font);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.chip-plain {
  background: var(--glass-2);
  border-color: var(--line);
  color: var(--ink-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink-2);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.45em;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.06);
  font: 800 0.74em/1 var(--font);
  color: var(--ink-2);
}

.tag-18 {
  display: inline-grid;
  place-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  font: 800 0.66rem/1.2 var(--font);
}

/* ---------- Cartes ---------- */

.card {
  position: relative;
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 16px;
}

.card-title h3 {
  flex: 1 1 auto;
  min-width: min(100%, 12ch);
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.card-title .seg {
  flex-wrap: nowrap;
}

.card-title .seg button {
  min-height: 34px;
  padding: 0.4em 0.9em;
  font-size: 0.84rem;
}

.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, hsl(var(--h) 95% 72% / 0.75), transparent 38%, transparent 62%, hsl(calc(var(--h) + 45) 95% 66% / 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
  border: 0;
}

/* ---------- Formulaires ---------- */

.field {
  display: grid;
  gap: 8px;
}

.label {
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.8em 1em;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: rgba(0, 0, 0, 0.36);
}

.input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.15);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23cdc8e6' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.select option {
  background: #14111f;
  color: var(--ink);
}

.input-group {
  display: flex;
  align-items: stretch;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.input-group .addon {
  display: grid;
  place-items: center;
  padding: 0 0 0 14px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.input-group .input {
  border: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
}

.input-group .btn {
  border-radius: 0;
  margin: 5px;
  border-radius: 10px;
  min-height: 0;
}

/* Interrupteur */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 50px;
  height: 30px;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch .track {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line-2);
  transition: background 0.25s;
}

.switch .track::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--spring);
}

.switch input:checked + .track {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.switch input:checked + .track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.option-row:last-child {
  border-bottom: 0;
}

.option-row .txt {
  display: grid;
  gap: 2px;
}

.option-row .txt b {
  font-weight: 800;
}

.option-row .txt span {
  font-size: 0.84rem;
  color: var(--muted);
}

/* Contrôle segmenté */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
}

.seg button {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 0.5em 1em;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.seg button:hover {
  color: var(--ink);
}

.seg button.on {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px -8px rgba(0, 0, 0, 0.6);
}

.seg-block {
  display: flex;
  width: 100%;
}

/* Curseur */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3d6e, #b06bff 50%, #7dd3fc);
  outline: none;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid hsl(var(--h) 90% 62%);
  box-shadow: 0 0 0 6px hsl(var(--h) 90% 62% / 0.25), 0 6px 20px rgba(0, 0, 0, 0.5);
  cursor: grab;
  transition: transform 0.2s var(--spring);
}

.range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.12);
}

.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid hsl(var(--h) 90% 62%);
  box-shadow: 0 0 0 6px hsl(var(--h) 90% 62% / 0.25);
  cursor: grab;
}

/* ---------- Modale (dialog natif) ---------- */

dialog.modal {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  background: linear-gradient(170deg, rgba(30, 25, 50, 0.97), rgba(13, 11, 22, 0.98));
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

dialog.modal.modal-lg {
  width: min(880px, calc(100% - 24px));
}

dialog.modal[open] {
  animation: modal-in 0.4s var(--spring);
}

dialog.modal::backdrop {
  background: rgba(4, 3, 10, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.3s ease;
}

.modal-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 34px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}

.modal-head h2 {
  font-size: 1.2rem;
}

.modal-body {
  padding: 18px 22px 22px;
  overflow: auto;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 22px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ---------- Toasts ---------- */

#toasts {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 1000;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100% - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 860px) {
  #toasts {
    bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom));
  }
  body.immersive #toasts {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(22, 18, 38, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 0.94rem;
  pointer-events: auto;
  animation: toast-in 0.45s var(--spring);
}

.toast.out {
  animation: toast-out 0.3s ease forwards;
}

.toast .ico {
  font-size: 1.2rem;
}

.toast.ok {
  border-color: rgba(52, 211, 153, 0.4);
}

.toast.err {
  border-color: rgba(251, 113, 133, 0.45);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

/* ---------- Avatars ---------- */

.avatar {
  --c: #8b5cf6;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 55%, white), var(--c) 70%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 6px 16px -6px var(--c);
  font-size: 1.1rem;
  line-height: 1;
}

.avatar-lg {
  width: 88px;
  height: 88px;
  font-size: 2.8rem;
}

.avatar-md {
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
}

/* ---------- Mascotte ---------- */

.mascot {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  animation: mascot-float 5s ease-in-out infinite;
}

.mascot svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mascot .m-react {
  transform-box: fill-box;
  transform-origin: 50% 70%;
}

.mascot.react-yes .m-react {
  animation: react-yes 0.55s var(--ease);
}

.mascot.react-no .m-react {
  animation: react-no 0.55s var(--spring);
}

.mascot .m-blink {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 5.5s infinite;
}

.mascot .m-sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 2.4s ease-in-out infinite;
}

.mascot .m-sparkle:nth-of-type(2) {
  animation-delay: 0.8s;
}

.mascot .m-sparkle:nth-of-type(3) {
  animation-delay: 1.6s;
}

.mascot .m-flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flicker 0.9s ease-in-out infinite alternate;
}

.mascot .m-flame:nth-of-type(2) {
  animation-duration: 0.7s;
}

.mascot .m-flame:nth-of-type(3) {
  animation-duration: 1.1s;
}

.mascot .m-halo-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: halo-bob 3.2s ease-in-out infinite;
}

.mascot.still,
.mascot.still * {
  animation: none !important;
}

@keyframes mascot-float {
  50% {
    transform: translateY(-3.5%);
  }
}

@keyframes blink {
  0%,
  93%,
  100% {
    transform: scaleY(1);
  }
  95.5% {
    transform: scaleY(0.08);
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.4) rotate(0deg);
    opacity: 0.2;
  }
  50% {
    transform: scale(1) rotate(45deg);
    opacity: 1;
  }
}

@keyframes flicker {
  from {
    transform: scaleY(0.82) scaleX(1.05);
  }
  to {
    transform: scaleY(1.12) scaleX(0.94);
  }
}

@keyframes halo-bob {
  50% {
    transform: translateY(-4px);
  }
}

@keyframes react-yes {
  0% {
    transform: none;
  }
  20% {
    transform: rotate(-9deg) scale(1.06);
  }
  40% {
    transform: rotate(8deg) scale(1.06);
  }
  60% {
    transform: rotate(-5deg);
  }
  80% {
    transform: rotate(3deg);
  }
}

@keyframes react-no {
  0% {
    transform: none;
  }
  35% {
    transform: translateY(-9%) scale(1.05, 0.95);
  }
  60% {
    transform: translateY(0) scale(0.96, 1.04);
  }
  80% {
    transform: scale(1.02, 0.98);
  }
}

/* ---------- Divers ---------- */

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}

.empty .big {
  font-size: 2.6rem;
}

.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p, 0) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--glow);
  transition: width 0.45s var(--ease);
}

.bar {
  --c: var(--accent);
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v, 0) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), var(--c));
  transition: width 1s var(--ease);
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.blur-reveal {
  filter: blur(8px);
  user-select: none;
  transition: filter 0.5s var(--ease);
}

.blur-reveal.revealed {
  filter: none;
  user-select: auto;
}

.fade-up {
  animation: fade-up 0.7s var(--ease) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.stagger > * {
  animation: fade-up 0.6s var(--ease) both;
}

.stagger > *:nth-child(2) {
  animation-delay: 0.06s;
}
.stagger > *:nth-child(3) {
  animation-delay: 0.12s;
}
.stagger > *:nth-child(4) {
  animation-delay: 0.18s;
}
.stagger > *:nth-child(5) {
  animation-delay: 0.24s;
}
.stagger > *:nth-child(6) {
  animation-delay: 0.3s;
}
.stagger > *:nth-child(7) {
  animation-delay: 0.36s;
}
.stagger > *:nth-child(8) {
  animation-delay: 0.42s;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fde68a;
  font-size: 0.9rem;
  font-weight: 600;
}

.notice.info {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--ink);
}

.notice.danger {
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.3);
  color: #fecdd3;
}

/* ---------- Badges d'équipe & puces de statut ---------- */

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-left: 0.55em;
  padding: 0.42em 0.75em 0.38em;
  border-radius: 999px;
  vertical-align: 0.32em;
  background: linear-gradient(135deg, #fff1c1, #ffd873 45%, #ffac4a);
  color: #2a1a00;
  font: 800 0.7rem/1 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 216, 115, 0.55), 0 8px 22px -8px rgba(255, 176, 74, 0.75);
}

.chip-warn {
  --c: var(--warn);
}

.chip-danger {
  --c: var(--danger);
}

.chip-gold {
  --c: var(--gold);
}

.topnav .admin-link.active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* ---------- Bandeau d'annonce ---------- */

.site-banner {
  --c: var(--accent);
  position: relative;
  z-index: 51;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 52px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 24%, #0c0a16), color-mix(in srgb, var(--c) 11%, #0c0a16));
  border-bottom: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.site-banner.tone-live {
  --c: #ff3d6e;
}

.site-banner.tone-warn {
  --c: #fbbf24;
}

.sb-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
}

.sb-text {
  overflow-wrap: anywhere;
}

.sb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.sb-link:hover .sb-text,
.sb-link:focus-visible .sb-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sb-go {
  transition: transform 0.2s;
}

.sb-link:hover .sb-go {
  transform: translateX(3px);
}

.sb-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
}

.sb-close:hover,
.sb-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.immersive #site-banner {
  display: none;
}

@media (max-width: 560px) {
  .site-banner {
    justify-content: flex-start;
    padding: 9px 46px 9px 16px;
    text-align: left;
    font-size: 0.84rem;
  }
}
