/* Nextaa — Le distributeur à idées (/outils). Espace expérimental, aux couleurs de Nextaa. */
.dz {
  --dz-forest: #0f2a1f; --dz-forest-2: #17392a; --dz-forest-3: #21503b;
  --dz-sage: #9fb8a3; --dz-sage-soft: #c9d8c8; --dz-ivory: #f6f3ea; --dz-ivory-2: #ece7da;
  --dz-ink: #0f2a1f; --dz-muted: #5b6c62; --dz-line: rgba(15, 42, 31, .12); --dz-bg: #f4f2ea;
  --dz-card: #fffdf7; --dz-item: 64px;
  position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  background: radial-gradient(48rem 30rem at 50% 28%, rgba(159, 184, 163, .28), transparent 65%), var(--dz-bg);
  color: var(--dz-ink); text-align: center;
}
:root[data-theme="dark"] .dz {
  --dz-ink: #eef2ec; --dz-muted: #a7b6ac; --dz-line: rgba(238, 242, 236, .12); --dz-bg: #0b1611; --dz-card: #13261d;
  background: radial-gradient(48rem 30rem at 50% 28%, rgba(159, 184, 163, .12), transparent 65%), var(--dz-bg);
}
.dz-wrap { width: min(720px, 100% - 32px); margin: 0 auto; position: relative; }
.dz-topbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1.75rem; font-size: .8rem; color: var(--dz-muted); }
.dz-counter { font-variant-numeric: tabular-nums; }
.dz-counter strong { color: var(--dz-ink); }
.dz-sound { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--dz-line);
  background: transparent; color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, color .2s; }
.dz-sound:hover { color: var(--dz-ink); border-color: var(--dz-sage); }
.dz-sound svg { width: 15px; height: 15px; }
.dz-sound[aria-pressed="true"] { color: var(--dz-ink); border-color: var(--dz-sage); background: rgba(159, 184, 163, .18); }
.dz h1 { margin: 0; font: 800 clamp(2rem, 6vw, 3.6rem)/1.04 var(--font-serif, inherit); letter-spacing: -.035em; text-wrap: balance; color: var(--dz-ink); }
.dz-sub { margin: .9rem auto 0; max-width: 32rem; font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--dz-muted); }

/* ---------- La machine ---------- */
.dz-stage { perspective: 1400px; margin: clamp(2rem, 5vw, 3rem) auto 0; width: min(540px, 100%); }
.dz-machine {
  --rx: 0deg; --ry: 0deg; position: relative; padding: 18px 18px 22px; border-radius: 34px; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s ease;
  background: linear-gradient(160deg, var(--dz-forest-3) 0%, var(--dz-forest-2) 38%, var(--dz-forest) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -10px 30px rgba(0, 0, 0, .25),
    0 40px 70px -35px rgba(15, 42, 31, .65), 0 14px 28px -18px rgba(15, 42, 31, .5);
}
.dz-machine::before { /* reflet */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 32%);
}
.dz-screen {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 14px; padding: .7rem 1rem;
  border-radius: 14px; background: #07130d; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .06);
  font: 600 .72rem/1 var(--font-mono, ui-monospace, monospace); letter-spacing: .22em; color: var(--dz-sage-soft);
}
.dz-screen span:first-child { text-shadow: 0 0 10px rgba(201, 216, 200, .45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-leds { display: flex; gap: 6px; flex: none; }
.dz-leds i { width: 7px; height: 7px; border-radius: 50%; background: #29473a; }
.dz.is-spinning .dz-leds i { animation: dz-led 0.6s ease-in-out infinite; }
.dz.is-spinning .dz-leds i:nth-child(2) { animation-delay: .2s; }
.dz.is-spinning .dz-leds i:nth-child(3) { animation-delay: .4s; }
@keyframes dz-led { 50% { background: var(--dz-sage-soft); box-shadow: 0 0 8px var(--dz-sage-soft); } }

.dz-window {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; border-radius: 22px;
  background: linear-gradient(180deg, #e4dfd1, #f3efe4 40%, #e4dfd1); box-shadow: inset 0 3px 10px rgba(15, 42, 31, .25);
}
.dz-reel {
  position: relative; height: calc(var(--dz-item) * 3); overflow: hidden; border-radius: 14px; background: var(--dz-ivory);
  box-shadow: inset 0 0 0 1px rgba(15, 42, 31, .08);
}
.dz-reel::after { /* courbure du cylindre */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 42, 31, .42) 0%, rgba(15, 42, 31, .08) 26%, rgba(255, 255, 255, .1) 50%, rgba(15, 42, 31, .08) 74%, rgba(15, 42, 31, .42) 100%);
}
.dz-strip { list-style: none; margin: 0; padding: 0; will-change: transform; }
.dz-strip li {
  height: var(--dz-item); display: grid; place-items: center; padding: 0 .3rem;
  font: 800 clamp(.72rem, 2.6vw, 1rem)/1 var(--font-serif, inherit); letter-spacing: .04em; color: var(--dz-forest);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dz-reel.is-moving .dz-strip { filter: blur(1.6px); }
.dz-payline { position: absolute; left: 6px; right: 6px; top: 50%; height: var(--dz-item); transform: translateY(-50%); pointer-events: none;
  border-radius: 16px; border: 1.5px solid rgba(159, 184, 163, .0); transition: border-color .4s, box-shadow .6s; }
.dz-payline::before, .dz-payline::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--dz-sage); }
.dz-payline::before { left: -11px; }
.dz-payline::after { right: -11px; }
.dz.is-revealed .dz-payline { border-color: rgba(159, 184, 163, .9); box-shadow: 0 0 0 4px rgba(201, 216, 200, .35), 0 0 30px 6px rgba(201, 216, 200, .45); }
.dz-base { display: flex; justify-content: center; margin-top: 16px; }
.dz-slot { width: 58%; height: 10px; border-radius: 999px; background: #07130d; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .08); }
.dz-machine.is-bounce { animation: dz-bounce .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dz-bounce { 0% { translate: 0 0; } 35% { translate: 0 5px; } 70% { translate: 0 -2px; } 100% { translate: 0 0; } }

/* ---------- Bouton principal ---------- */
.dz-launch {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; margin-top: clamp(1.6rem, 4vw, 2.2rem);
  min-width: min(320px, 100%); padding: 1.05rem 2rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 .95rem/1 var(--font-sans, inherit); letter-spacing: .14em; text-transform: uppercase;
  color: var(--dz-ivory); background: var(--dz-forest);
  box-shadow: 0 6px 0 #061109, 0 18px 30px -14px rgba(15, 42, 31, .7);
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
:root[data-theme="dark"] .dz-launch { color: var(--dz-forest); background: var(--dz-sage-soft); box-shadow: 0 6px 0 #7f9884, 0 18px 30px -14px rgba(0, 0, 0, .7); }
.dz-launch:hover:not(:disabled) { transform: translateY(-2px); }
.dz-launch:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 #061109, 0 8px 16px -10px rgba(15, 42, 31, .6); }
.dz-launch:disabled { cursor: progress; opacity: .85; }
.dz-launch:focus-visible, .dz-sound:focus-visible, .dz-action:focus-visible { outline: 3px solid var(--dz-sage); outline-offset: 4px; }
.dz-hint { margin: .9rem 0 0; font-size: .85rem; color: var(--dz-muted); }

/* ---------- La carte ---------- */
.dz-card {
  position: relative; margin: clamp(2rem, 5vw, 2.75rem) auto 0; width: min(620px, 100%); padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 26px; background: var(--dz-card); border: 1px solid var(--dz-line); text-align: left;
  box-shadow: 0 30px 60px -32px rgba(15, 42, 31, .45);
}
.dz-card[hidden] { display: none; }
.dz-card.is-in { animation: dz-card-in .7s cubic-bezier(.2, .9, .25, 1.05) both; }
.dz-card.is-out { animation: dz-card-out .3s ease both; }
@keyframes dz-card-in { from { opacity: 0; transform: translateY(-24px) scale(.96); clip-path: inset(0 0 100% 0 round 26px); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 26px); } }
@keyframes dz-card-out { to { opacity: 0; transform: translateY(-12px) scale(.98); } }
.dz-card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.dz-eyebrow { font: 700 .72rem/1 var(--font-sans, inherit); letter-spacing: .18em; text-transform: uppercase; color: var(--dz-muted); }
.dz-tag { padding: .35rem .75rem; border-radius: 999px; background: rgba(159, 184, 163, .25); color: var(--dz-ink); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.dz-card h2 { margin: 0 0 .6rem; font: 800 clamp(1.4rem, 3.6vw, 2rem)/1.1 var(--font-serif, inherit); letter-spacing: -.02em; color: var(--dz-ink); }
.dz-desc { margin: 0 0 1.1rem; font-size: 1.05rem; color: var(--dz-ink); }
.dz-block { margin: 0 0 1rem; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(159, 184, 163, .12); border: 1px solid var(--dz-line); }
.dz-block small { display: block; margin-bottom: .35rem; font: 700 .7rem/1 var(--font-sans, inherit); letter-spacing: .14em; text-transform: uppercase; color: var(--dz-muted); }
.dz-block p { margin: 0; color: var(--dz-ink); line-height: 1.6; }
.dz-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.dz-action {
  display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.05rem; border-radius: 999px; border: 1px solid var(--dz-line);
  background: transparent; color: var(--dz-ink); font: 600 .85rem/1 var(--font-sans, inherit); cursor: pointer; transition: transform .15s, background .2s, border-color .2s;
}
.dz-action:hover { border-color: var(--dz-sage); background: rgba(159, 184, 163, .14); }
.dz-action:active { transform: scale(.96); }
.dz-action svg { width: 16px; height: 16px; }
.dz-action.is-primary { background: var(--dz-forest); color: var(--dz-ivory); border-color: var(--dz-forest); letter-spacing: .08em; text-transform: uppercase; }
:root[data-theme="dark"] .dz-action.is-primary { background: var(--dz-sage-soft); color: var(--dz-forest); border-color: var(--dz-sage-soft); }
.dz-action[aria-pressed="true"] svg { fill: currentColor; }
.dz-action[aria-pressed="true"] { color: #7a3b4b; border-color: rgba(122, 59, 75, .35); }
:root[data-theme="dark"] .dz-action[aria-pressed="true"] { color: #e7a9b8; }
.dz-toast { min-height: 1.2em; margin: .75rem 0 0; font-size: .8rem; color: var(--dz-muted); }

/* ---------- Favoris ---------- */
.dz-favs { margin: 1.75rem auto 0; width: min(620px, 100%); text-align: left; }
.dz-favs summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--dz-muted); list-style: none; text-align: center; }
.dz-favs summary::-webkit-details-marker { display: none; }
.dz-favs ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .5rem; }
.dz-favs li { display: flex; align-items: center; gap: .5rem; padding: .55rem .6rem .55rem 1rem; border-radius: 14px; border: 1px solid var(--dz-line); background: var(--dz-card); }
.dz-favs li button:first-child { flex: 1; text-align: left; background: none; border: 0; color: var(--dz-ink); font: 600 .92rem/1.3 var(--font-sans, inherit); cursor: pointer; padding: 0; }
.dz-favs li button:last-child { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--dz-muted); cursor: pointer; font-size: 1.1rem; }
.dz-favs li button:last-child:hover { background: rgba(159, 184, 163, .2); }

/* ---------- Particules ---------- */
.dz-spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; z-index: 2; }

/* ---------- Pied ---------- */
.dz-foot { margin-top: clamp(2.5rem, 6vw, 4rem); }
.dz-foot p { margin: 0; font: 500 clamp(1rem, 2.4vw, 1.2rem)/1.4 var(--font-serif, inherit); color: var(--dz-ink); }
.dz-foot small { display: block; margin-top: .6rem; font: 700 .7rem/1 var(--font-mono, ui-monospace, monospace); letter-spacing: .24em; color: var(--dz-muted); }

@media (max-width: 560px) {
  .dz { --dz-item: 52px; }
  .dz-machine { padding: 12px 12px 16px; border-radius: 26px; }
  .dz-window { gap: 6px; padding: 8px; border-radius: 18px; }
  .dz-screen { font-size: .62rem; letter-spacing: .16em; }
  .dz-topbar { flex-direction: column-reverse; align-items: center; gap: .6rem; }
  .dz-card-head { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .dz-action { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .dz-machine { transition: none; transform: none; }
  .dz.is-spinning .dz-leds i, .dz-machine.is-bounce, .dz-card.is-in, .dz-card.is-out { animation: none; }
  .dz-card.is-in { opacity: 1; }
}
.dz .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
