/* Simulateur de l'app Skillcheck sur la page vitrine (données fictives) */

.device {
  --d-bg: #161316;
  --d-surface: rgba(69, 48, 39, 0.45);
  --d-solid: #2a1f1a;
  --d-border: rgba(255, 255, 255, 0.08);
  --d-border-strong: rgba(255, 255, 255, 0.14);
  --d-text: #ffffff;
  --d-muted: #bababa;
  --d-faint: #6e6763;
  --d-accent: #ff6d29;
  --d-tag: #3dd68c;
  --d-gold: #e8cb91;
  --d-gold-dark: #c8aa6e;
  --d-red: #e0444f;
  --d-red-dark: #b8323a;
  position: relative;
  width: min(360px, calc(100vw - 32px));
  aspect-ratio: 360 / 740;
  margin: 0 auto;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(145deg, #3a3437, #121012 40%, #26211f);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 120px -30px rgba(255, 109, 41, 0.45);
  font-family: 'Inter Tight', system-ui, sans-serif;
  color: var(--d-text);
  line-height: 1.3;
  user-select: none;
  -webkit-user-select: none;
}
.device *,
.device *::before,
.device *::after {
  box-sizing: border-box;
}
.device :where(button) {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.device :where(input) {
  font: inherit;
}
.d-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
  background:
    radial-gradient(120% 55% at 50% 108%, rgba(255, 109, 41, 0.4), transparent 70%),
    radial-gradient(90% 35% at 50% -8%, rgba(255, 109, 41, 0.14), transparent 70%), var(--d-bg);
  display: flex;
  flex-direction: column;
}
.d-island {
  position: absolute;
  top: 10px;
  left: 50%;
  translate: -50% 0;
  width: 96px;
  height: 28px;
  border-radius: 20px;
  background: #000;
  z-index: 30;
}
.d-status {
  flex: none;
  height: 46px;
  padding: 14px 30px 0;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.d-status-icons {
  display: flex;
  gap: 5px;
  align-items: center;
}
.d-header {
  flex: none;
  min-height: 48px;
  padding: 4px 16px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.d-header-title {
  flex: 1;
  min-width: 0;
}
.d-header-title strong {
  display: block;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d-header-title span {
  font-size: 12px;
  color: var(--d-gold);
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.d-icon-btn {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  backdrop-filter: blur(12px);
}
.d-icon-btn svg {
  width: 18px;
  height: 18px;
}
.d-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 110px;
  scrollbar-width: none;
}
.d-body::-webkit-scrollbar {
  display: none;
}
.d-body.no-tabs {
  padding-bottom: 28px;
}

/* Boutons et pastilles */
.d-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 46px;
  border-radius: 999px;
  background: #fff;
  color: var(--d-bg);
  font-weight: 600;
  font-size: 15px;
}
.d-pill.glass {
  background: var(--d-surface);
  color: var(--d-text);
  border: 1px solid var(--d-border-strong);
}
.d-pill:disabled {
  opacity: 0.4;
  cursor: default;
}
.d-row {
  display: flex;
  gap: 8px;
}
.d-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.d-chip {
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  color: var(--d-muted);
}
.d-chip.on {
  background: #fff;
  color: var(--d-bg);
  border-color: #fff;
}
.d-section {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--d-muted);
}
.d-hint {
  font-size: 12px;
  color: var(--d-faint);
  margin: 8px 0 0;
  text-align: center;
}
.d-input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  padding: 0 16px;
  background: var(--d-surface);
  border: 1px solid var(--d-border-strong);
  color: var(--d-text);
  font-size: 16px;
  outline: none;
  user-select: text;
}
.d-input:focus {
  border-color: var(--d-accent);
}
.d-error {
  color: #ff4d5e;
  font-size: 13px;
  margin: 6px 0 0;
}

/* Accueil */
.d-onboarding {
  padding: 40px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.d-brand {
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 13px;
}
.d-brand b {
  color: var(--d-accent);
  margin-right: 6px;
}
.d-hero {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1px;
  margin: 28px 0 0;
}
.d-lead {
  color: var(--d-muted);
  font-size: 15px;
  margin: 0 0 10px;
}

/* Cartes de parties */
.d-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 20px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  backdrop-filter: blur(14px);
  transition: transform 0.1s;
}
.d-card:active {
  transform: scale(0.985);
}
.d-card.selected {
  border-color: var(--d-accent);
}
.d-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.d-card-head img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--d-solid);
}
.d-card-head div {
  flex: 1;
  min-width: 0;
}
.d-card-head strong {
  display: block;
  font-size: 15px;
}
.d-meta {
  font-size: 12px;
  color: var(--d-muted);
}
.d-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.d-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--d-muted);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.d-check.on {
  background: var(--d-accent);
  border-color: var(--d-accent);
}
.d-result {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 17px;
  margin: 10px 0 8px;
}
.d-stats {
  display: flex;
  justify-content: space-between;
}
.d-stats span {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--d-muted);
}
.d-stats b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.d-card-foot {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--d-accent);
}
.d-card-foot.locked {
  color: var(--d-faint);
  font-weight: 500;
}
.d-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(255, 109, 41, 0.14);
  border: 1px solid rgba(255, 109, 41, 0.45);
  font-size: 13px;
  text-align: left;
}
.d-callout b {
  color: var(--d-accent);
  white-space: nowrap;
}
.d-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.d-toolbar span {
  font-size: 12px;
  color: var(--d-muted);
}
.d-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--d-accent);
}
.d-units {
  display: flex;
  gap: 4px;
  margin: 2px 0 8px;
}
.d-units img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--d-border-strong);
}
.d-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.d-trait {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--d-muted);
}
.d-soon {
  margin-top: 40px;
  padding: 24px;
  border-radius: 20px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  text-align: center;
}
.d-soon h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.d-soon p {
  margin: 0;
  color: var(--d-muted);
  font-size: 14px;
}
.d-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  text-align: left;
  font-size: 15px;
}
.d-list-item small {
  margin-left: auto;
  color: var(--d-muted);
}

/* Barre d'onglets flottante */
.d-tabs {
  position: absolute;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(42, 31, 26, 0.75);
  border: 1px solid var(--d-border-strong);
  backdrop-filter: blur(18px);
  z-index: 10;
}
.d-tab {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--d-muted);
}
.d-tab.on {
  background: #fff;
  color: var(--d-bg);
}
.d-sticky {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  z-index: 11;
}

/* Éditeur */
.d-preview {
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.d-controls {
  margin-top: 4px;
}
.d-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
  display: flex;
  align-items: flex-end;
}
.d-sheet {
  width: 100%;
  padding: 18px 16px 30px;
  border-radius: 26px 26px 0 0;
  background: var(--d-solid);
  border-top: 1px solid var(--d-border-strong);
}
.d-sheet p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--d-muted);
}
.d-sheet .d-list-item {
  margin-bottom: 6px;
}
.d-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 90px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--d-bg);
  font-size: 13px;
  font-weight: 500;
  z-index: 50;
  animation: d-toast-in 0.2s ease-out;
}
@keyframes d-toast-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

/* Story (dessinée à 360×640 puis mise à l'échelle) */
.s-story {
  position: absolute;
  top: 0;
  left: 0;
  width: 360px;
  height: 640px;
  transform-origin: 0 0;
  overflow: hidden;
  color: #fff;
  font-family: 'Inter Tight', system-ui, sans-serif;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.s-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.s-bg.dark {
  background: #161316;
}
.s-bg.gradient {
  background: linear-gradient(180deg, #0b0806 0%, #2a1206 35%, #8a3510 60%, #f2701f 82%, #fbb66a 100%);
}
.s-bg.transparent {
  background: repeating-conic-gradient(#3a3a3a 0% 25%, #2b2b2b 0% 50%) 0 0 / 24px 24px;
}
.s-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.65));
}
.s-layer {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  cursor: grab;
  touch-action: none;
}
.s-page {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.s-page.centered {
  align-items: center;
}
.s-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.s-kicker {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}
.s-banner {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.s-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 172px;
}
.s-divider i {
  flex: 1;
  height: 1px;
  opacity: 0.7;
}
.s-divider b {
  color: #ff6d29;
  font-size: 10px;
}
.s-rank {
  color: #e8cb91;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  margin-top: 2px;
}
.s-matchup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.s-matchup > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.s-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #c8aa6e;
  background: #010a13;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.s-ring img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}
.s-vs {
  font-family: 'Cinzel', serif;
  color: #e8cb91;
  font-size: 18px;
  letter-spacing: 2px;
}
.s-role {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.s-stat {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  cursor: pointer;
}
.s-stat.center {
  align-items: center;
}
.s-stat:hover {
  outline: 1px dashed rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}
.s-stat span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.s-stat b {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.s-stat.lg b {
  font-size: 40px;
  font-weight: 400;
  line-height: 46px;
}
.s-stats-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.s-stats-row {
  display: flex;
  justify-content: space-between;
}
.s-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.s-badges,
.s-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.s-badge {
  background: #ff6d29;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: none;
}
.s-tag {
  border: 1px solid #3dd68c;
  color: #3dd68c;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.35);
}
.s-brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
}
.s-brand b {
  color: #ff6d29;
  margin-right: 6px;
}
.s-map {
  align-self: center;
  border-radius: 12px;
  overflow: hidden;
}
.s-games {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.s-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.s-game img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.s-game div {
  flex: 1;
}
.s-game strong {
  display: block;
  font-size: 14px;
}
.s-game small {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}
.s-game em {
  font-style: normal;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
}
.s-units {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 300px;
}
.s-unit {
  position: relative;
}
.s-unit img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #c8aa6e;
}
.s-unit i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  text-align: center;
  font-style: normal;
  font-size: 10px;
  color: #e8cb91;
}
