/* css/packs/y.css | Source: MonarqueXD_v95L_GUILDORIGINS.html lignes 62434-62872 (id="mx-fx-pack-y-styles") */
/* ============================================================ */
/*  PACK Y — TUTORIEL V4 PROPRE (désactive V/W/X)              */
/* ============================================================ */

/* === Désactive UI des anciens packs tuto === */
#mx-tuto-v3-overlay,
#mx-tuto-card,
#mx-tuto-skip-btn,
#mx-tuto-quit-btn,
#mx-tuto-mini-combat,
#mx-tuto-final-modal,
.mx-tuto-spotlight,
.mx-tuto-arrow {
  display: none !important;
}
body.mx-tuto-active * { pointer-events: auto !important; }
body.mx-tuto-active { /* unset */ }

/* ============================================================ */
/*  V4 STYLES                                                   */
/* ============================================================ */

/* Overlay TRÈS LÉGER pour voir le jeu */
#tutoV4-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: tutoV4FadeIn 0.3s ease-out;
}
@keyframes tutoV4FadeIn { from {opacity:0;} to {opacity:1;} }

/* Spotlight target (juste un glow autour, pas de masque opaque) */
#tutoV4-spotlight {
  position: fixed;
  z-index: 200001;
  pointer-events: none;
  border-radius: 14px;
  box-shadow:
    0 0 0 4px #50dcff,
    0 0 30px rgba(80, 220, 255, .9),
    0 0 60px rgba(170, 80, 255, .6);
  animation: tutoV4Pulse 1.5s ease-in-out infinite;
  transition: all .35s ease;
}
@keyframes tutoV4Pulse {
  0%, 100% { box-shadow: 0 0 0 4px #50dcff, 0 0 30px rgba(80,220,255,.7), 0 0 60px rgba(170,80,255,.5); }
  50%      { box-shadow: 0 0 0 4px #50dcff, 0 0 50px rgba(80,220,255,1),  0 0 90px rgba(170,80,255,.8); }
}

/* Flèche qui pointe vers target */
#tutoV4-arrow {
  position: fixed;
  z-index: 200002;
  width: 60px;
  height: 60px;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, .9));
  animation: tutoV4ArrowBounce 1s ease-in-out infinite;
}
@keyframes tutoV4ArrowBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* Card en bas */
#tutoV4-card {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200005;
  width: min(94vw, 480px);
  background: linear-gradient(160deg, rgba(15, 8, 30, 0.97) 0%, rgba(5, 2, 14, 0.98) 100%);
  border: 2px solid transparent;
  border-radius: 22px;
  padding: 20px;
  font-family: 'Cinzel', 'Rajdhani', sans-serif;
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(80, 220, 255, .35),
    0 0 50px rgba(170, 80, 255, .35),
    0 8px 30px rgba(0, 0, 0, .8);
  animation: tutoV4CardIn 0.4s cubic-bezier(.2,.7,.2,1);
  pointer-events: auto;
}
@keyframes tutoV4CardIn {
  0%   { opacity: 0; transform: translateX(-50%) translateY(40px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#tutoV4-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, #50dcff, #aa44ff, #ff3060, #ffd84a, #50dcff);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: tutoV4Border 6s linear infinite;
  pointer-events: none;
  opacity: .9;
}
@keyframes tutoV4Border {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

#tutoV4-card .v4-progress {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
#tutoV4-card .v4-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #50dcff, #aa44ff, #ffd84a);
  background-size: 200% 100%;
  animation: v4Prog 2s linear infinite;
  transition: width .4s ease;
}
@keyframes v4Prog { 0%{background-position:0% 0;} 100%{background-position:200% 0;} }

#tutoV4-card .v4-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
#tutoV4-card .v4-pnj {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.7));
  animation: v4PnjBreath 3s ease-in-out infinite;
}
@keyframes v4PnjBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-2px) scale(1.02); }
}
#tutoV4-card .v4-name {
  font-family: 'Cinzel', serif;
  font-size: 1.05em;
  color: #ffd84a;
  letter-spacing: 1.5px;
  margin: 0;
  text-shadow: 0 0 10px rgba(255,215,74,.4);
}
#tutoV4-card .v4-step-num {
  font-size: .7em;
  color: #80e8ff;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-top: 3px;
}
#tutoV4-card .v4-body {
  color: #f0e8d8;
  font-family: 'Rajdhani', sans-serif;
  font-size: .95em;
  line-height: 1.5;
  margin-bottom: 12px;
}
#tutoV4-card .v4-image {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(80,220,255,.25);
}
#tutoV4-card .v4-actions {
  display: flex;
  gap: 8px;
}
#tutoV4-card .v4-actions button {
  padding: 11px 18px;
  border-radius: 10px;
  border: 0;
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: .85em;
  cursor: pointer;
  flex: 1;
  transition: all .15s;
}
.v4-next {
  background: linear-gradient(135deg, #50dcff, #aa44ff);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  box-shadow: 0 4px 14px rgba(80,220,255,.4);
}
.v4-next:hover { transform: translateY(-2px); }
.v4-next:disabled {
  opacity: .4;
  cursor: not-allowed;
  background: #444;
  box-shadow: none;
}
.v4-skip {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.15) !important;
  color: #aaa;
  flex: 0 0 auto !important;
}
.v4-quit {
  background: rgba(255,60,90,.12);
  border: 1px solid rgba(255,60,90,.35) !important;
  color: #ff8090;
  flex: 0 0 auto !important;
}

#tutoV4-skip-btn,
#tutoV4-quit-btn {
  position: fixed;
  z-index: 200010;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.7);
  color: #ddd;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: .75em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
#tutoV4-skip-btn { top: 14px; right: 14px; }
#tutoV4-quit-btn { top: 14px; left: 14px; background: rgba(80,0,0,.6); border-color: rgba(255,60,60,.4); color: #ffaaaa; }

/* ============================================================ */
/*  MINI-COMBAT GOBELIN (overlay grand format, BIEN visible)   */
/* ============================================================ */
#tutoV4-combat-modal {
  position: fixed;
  inset: 0;
  z-index: 200020;
  background: radial-gradient(ellipse at center, rgba(20, 5, 5, 0.7) 0%, rgba(0, 0, 0, 0.92) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: tutoV4FadeIn 0.3s ease-out;
}
#tutoV4-combat-card {
  background: linear-gradient(160deg, #1a0a08, #0a0408);
  border: 2px solid #ff8c1a;
  border-radius: 20px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  font-family: 'Cinzel', 'Rajdhani', sans-serif;
  color: #fff;
  box-shadow: 0 0 60px rgba(255,140,30,.5);
}
#tutoV4-combat-card h2 {
  color: #ff8c1a;
  margin: 0 0 12px;
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
  font-size: 1.4em;
  text-shadow: 0 0 12px rgba(255,140,30,.5);
}
#tutoV4-monster-img {
  width: 180px;
  height: 180px;
  margin: 0 auto 14px;
  background: radial-gradient(circle at center, rgba(80, 0, 0, .5) 0%, transparent 65%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#tutoV4-monster-img img {
  max-width: 160px;
  max-height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 0, 50, .55));
}
#tutoV4-monster-img .fallback {
  font-size: 7em;
  filter: drop-shadow(0 0 18px rgba(255, 0, 50, .55));
}
#tutoV4-hp-bar {
  width: 90%;
  margin: 0 auto 18px;
  background: rgba(0,0,0,.6);
  border: 1px solid #b00010;
  border-radius: 10px;
  height: 24px;
  overflow: hidden;
  position: relative;
}
#tutoV4-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #b00010 0%, #ff3050 100%);
  width: 100%;
  transition: width .35s cubic-bezier(.4,0,.2,1);
}
#tutoV4-hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', monospace;
  font-weight: 800;
  font-size: .95em;
  color: #fff;
  text-shadow: 0 1px 3px #000;
  letter-spacing: 1.5px;
}
#tutoV4-combat-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
#tutoV4-combat-actions button {
  flex: 1;
  padding: 16px 8px;
  border-radius: 14px;
  border: 2px solid;
  cursor: pointer;
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: .95em;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .15s ease;
}
#tutoV4-combat-actions button:active { transform: scale(.95); }
#tutoV4-combat-actions button:disabled { opacity: .4; cursor: not-allowed; }
#tutoV4-combat-actions button .ico { font-size: 2em; line-height: 1; }
#tutoV4-combat-actions button .sub { font-size: .75em; opacity: .85; letter-spacing: 1px; }
.v4-pushup-btn {
  background: linear-gradient(135deg, #ff8c1a, #ff3060);
  border-color: #ffaa55;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 4px 16px rgba(255,140,30,.45);
}
.v4-squat-btn {
  background: linear-gradient(135deg, #50dcff, #aa44ff);
  border-color: #80e8ff;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 4px 16px rgba(80,220,255,.45);
}
#tutoV4-combat-msg {
  margin-top: 10px;
  font-size: .9em;
  color: #ffd84a;
  min-height: 1.4em;
  font-weight: 700;
  letter-spacing: 1px;
}
#tutoV4-combat-skip {
  margin-top: 16px;
  background: none;
  border: 1px solid rgba(255,255,255,.15);
  color: #888;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: .8em;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
}

/* ============================================================ */
/*  MODAL FINAL                                                */
/* ============================================================ */
#tutoV4-final-modal {
  position: fixed;
  inset: 0;
  z-index: 200030;
  background: radial-gradient(ellipse at center, rgba(20,5,30,.95), rgba(0,0,0,.98));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#tutoV4-final-modal .card {
  background: linear-gradient(160deg, #11132a, #06081a);
  border: 2px solid rgba(255,215,74,.5);
  border-radius: 22px;
  padding: 32px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(255,215,74,.4);
  font-family: 'Cinzel', 'Rajdhani', sans-serif;
  color: #fff;
}
#tutoV4-final-modal h2 {
  color: #ffd84a;
  margin: 0 0 8px;
  letter-spacing: 2px;
  font-size: 1.5em;
}
#tutoV4-final-modal p { color: #d8d0c8; margin: 0 0 18px; line-height: 1.5; }
#tutoV4-final-modal button {
  padding: 14px 28px;
  background: linear-gradient(135deg, #ffd84a, #ff8c1a);
  border: 0;
  border-radius: 12px;
  color: #1a0c00;
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,215,74,.5);
}

@media (prefers-reduced-motion: reduce) {
  #tutoV4-spotlight, #tutoV4-arrow, #tutoV4-card,
  #tutoV4-card::before, #tutoV4-card .v4-pnj,
  #tutoV4-card .v4-progress > div { animation: none !important; }
}
