:root{
  --cyan:#00fff0;
  --cyan2:#00c8ff;
  --bg0:#040708;
  --bg1:#071115;
  --panel:rgba(10, 12, 14, 0.72);
  --panel2:rgba(10, 12, 14, 0.55);
  --border:rgba(0,255,240,0.18);
  --border2:rgba(0,255,240,0.10);
  --txt:rgba(255,255,255,0.92);
  --muted:rgba(255,255,255,0.70);
  --shadow:0 16px 60px rgba(0,0,0,0.55);
  --radius:14px;
  --maxw:980px;
}
html, body { height: 100%; }
body {
  background: radial-gradient(circle at top, rgba(0,255,240,0.08), transparent 40%),
              radial-gradient(circle at bottom, rgba(0,150,255,0.08), transparent 40%),
              #05080d;

  background-attachment: scroll; /* 🔥 IMPORTANT */
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(to right, rgba(0,255,240,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,255,240,0.05) 1px, transparent 1px);
  background-size:60px 60px;
  opacity:0.18;
  mask-image:radial-gradient(circle at 50% 10%, rgba(0,0,0,1), rgba(0,0,0,0.2) 55%, rgba(0,0,0,0) 75%);
}
body::after{
  content:"";
  position:fixed;
  left:0;
  right:0;
  top:-40px;
  height:140px;
  pointer-events:none;
  background:radial-gradient(circle at 50% 40%, rgba(0,255,240,0.22), transparent 70%);
  filter:blur(8px);
  opacity:0.9;
}
header.game-banner{
  padding:28px 10px 18px;
  text-align:center;
  border-bottom:1px solid rgba(0,255,240,0.18);
  background:linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.18));
  backdrop-filter:blur(6px);
}
header.game-banner h1,
header.game-banner .site-title{
  margin:0;
  font-size:clamp(28px, 4vw, 48px);
  letter-spacing:2px;
  color:var(--cyan);
  text-shadow:0 0 12px rgba(0,255,240,0.65), 0 0 32px rgba(0,255,240,0.25);
}
header.game-banner .subtitle{
  margin:8px 0 0;
  color:var(--muted);
  font-size:13px;
  letter-spacing:0.6px;
}
main.home-wrap{
  max-width:var(--maxw);
  margin:0 auto;
  padding:28px 14px 40px;
}
.home-hero{
  position:relative;
  padding:26px 18px;
  border-radius:var(--radius);
  background:var(--panel);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:18px;
}
.home-hero h2,
.home-help-tabs,
.home-help-panel,
.cta-row{
  grid-column:1;
  min-width:0;
}
.home-side{
  grid-column:2;
  grid-row:1 / span 4;
  display:flex;
  flex-direction:column;
  gap:14px;
  align-self:start;
  min-width:0;
}
.home-hero::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(800px 300px at 20% 0%, rgba(0,255,240,0.16), transparent 60%),
    radial-gradient(700px 260px at 80% 20%, rgba(0,200,255,0.14), transparent 65%);
  opacity:0.75;
  pointer-events:none;
}
.home-hero > *{ position:relative; }
.home-hero h2,
.home-hero .page-title{
  margin:0 0 10px;
  font-size:clamp(18px, 2.2vw, 26px);
  color:rgba(255,255,255,0.95);
}
.home-help-tabs{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:10px;
  margin:8px 0 16px;
  min-width:0;
  overflow:visible;
}
.home-help-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 1 auto;
  min-height:42px;
  max-width:100%;
  padding:10px 14px;
  box-sizing:border-box;
  text-decoration:none;
  white-space:normal;
  word-break:normal;
  text-align:center;
  appearance:none;
  border:1px solid rgba(0,255,240,0.20);
  border-radius:12px;
  background:linear-gradient(135deg, rgba(20,20,35,.96), rgba(45,45,70,.96));
  color:#fff;
  font-weight:700;
  font-size:12px;
  line-height:1.25;
  cursor:pointer;
  box-shadow:0 0 8px rgba(0,255,255,.12);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease, filter .12s ease;
}
.home-help-btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.08);
  box-shadow:0 0 14px rgba(0,255,255,.20);
}
.home-help-btn.active{
  border-color:#cc00ff;
  box-shadow:0 0 10px rgba(204,0,255,.45), 0 0 18px rgba(0,255,255,.12);
}
.home-help-panel{
  margin:0 0 18px;
  padding:14px 14px 2px;
  border-radius:12px;
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(0,255,240,0.12);
  min-width:0;
}
.help-section h2{
  margin-top:0;
  color:var(--cyan);
  font-size:22px;
}
.help-section h3{
  margin-top:18px;
  color:rgba(255,255,255,0.92);
  font-size:16px;
}
.help-section p,
.help-section li{
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
.help-section strong{ color:#fff; }
.home-lang-switcher{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin-bottom:8px;
}
.home-lang-switcher-label{
  font-size:12px;
  font-weight:700;
  color:rgba(255,255,255,0.72);
  white-space:nowrap;
}
.lang-switch-btn{
  width:46px;
  height:32px;
  border:1px solid rgba(0,255,240,0.20);
  border-radius:10px;
  background:linear-gradient(135deg, rgba(20,20,35,.96), rgba(45,45,70,.96));
  color:#fff;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 0 8px rgba(0,255,255,.12);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease, filter .12s ease;
}
.lang-switch-btn.active{
  border-color:#cc00ff;
  box-shadow:0 0 10px rgba(204,0,255,.45), 0 0 18px rgba(0,255,255,.12);
}
.home-register-promo{
  padding:22px 18px;
  border-radius:18px;
  background:rgba(8, 8, 18, 0.96);
  border:1px solid rgba(255,0,255,0.55);
  box-shadow:0 0 14px rgba(255,0,255,0.22), 0 0 34px rgba(0,255,255,0.08);
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:center;
  text-align:center;
}
.home-register-promo-btn{
  display:block;
  width:100%;
  border:none;
  cursor:pointer;
  padding:26px 14px;
  border-radius:20px;
  font-family:inherit;
  font-size:17px;
  font-weight:900;
  line-height:1.25;
  color:#fff;
  background:linear-gradient(135deg, #ff00cc 0%, #7a5cff 55%, #00d9ff 100%);
  box-shadow:0 0 18px rgba(255,0,204,0.38), 0 0 24px rgba(0,217,255,0.22);
}
.home-register-promo-note{
  font-size:12px;
  line-height:1.55;
  color:#fff;
}
.cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.cta-btn{
  appearance:none;
  border:1px solid rgba(0,255,240,0.35);
  background:linear-gradient(180deg, rgba(0,255,240,0.22), rgba(0,255,240,0.10));
  color:var(--txt);
  padding:12px 16px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
  letter-spacing:0.4px;
}
.cta-sub{
  color:rgba(255,255,255,0.6);
  font-size:12px;
}
.home-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:12px;
}
.card{
  grid-column:span 4;
  min-height:110px;
  border-radius:var(--radius);
  background:var(--panel2);
  border:1px solid var(--border2);
  padding:16px 14px;
  box-shadow:0 10px 28px rgba(0,0,0,0.35);
}
.card h3{
  margin:0 0 8px;
  color:var(--cyan);
  font-size:14px;
  letter-spacing:0.6px;
}
.card p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
footer{
  max-width:var(--maxw);
  margin:20px auto 24px;
  padding:0 14px;
  color:rgba(255,255,255,0.35);
  font-size:11px;
  text-align:center;
}
[data-lang-content]{ display:none; }
[data-lang-content].active{ display:block; }
#auth-overlay{
  position:fixed;
  top:0;
  left:0;
  width:100vw;
  height:100vh;
  display:none;
  justify-content:center;
  align-items:flex-start;
  overflow-y:auto;
  z-index:9999;
  background:rgba(0, 0, 0, 0.75);
}
#auth-overlay > div{
  width:90%;
  max-width:420px;
  margin:10vh auto;
  background:#1e1e1e;
  color:#fff;
  padding:24px;
  border-radius:12px;
  box-shadow:0 0 20px #000;
  border:1px solid rgba(0,255,240,0.18);
}
body.app-paused main.home-wrap{
  opacity:0.2;
  pointer-events:none;
}
@media (max-width: 980px){
  .home-hero{
    grid-template-columns:1fr;
    padding-top:26px;
  }
  .home-side{
    grid-column:1;
    grid-row:auto;
  }
  .card{
    grid-column:span 6;
  }
}
@media (max-width: 640px){
  .home-help-btn{
    width:100%;
    justify-content:flex-start;
  }
}
@media (max-width: 540px){
  .card{
    grid-column:span 12;
  }
}


.site-title{
  display:block;
}
.page-title{
  margin:0 0 10px;
}
.seo-addition{
  margin-top:8px;
}
.seo-grid{
  margin-top:18px;
}
.seo-card h2{
  margin-top:0;
}

.hero-cta {
  margin: 16px 0 24px;
  text-align: center;
}

.cta-play {
  display: inline-block;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #00fff0, #00c8ff);
  color: #000;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(0,255,240,.5);
  transition: transform .1s ease;
}

.cta-play:hover {
  transform: scale(1.05);
}

.home-value {
  margin: 20px 0;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
}

/* ========================================================================== */
/* HOME - TUTORIEL INTÉGRÉ */
/* ========================================================================== */

.home-tutorial-shell {
  margin: 18px 0 10px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8,18,28,0.96), rgba(5,10,18,0.96));
  border: 1px solid rgba(0,255,255,0.22);
  box-shadow: 0 0 18px rgba(0,255,255,0.10);
}

.home-tutorial-header {
  margin-bottom: 12px;
}

.home-tutorial-header h2 {
  margin: 0;
  color: #00f7ff;
  text-shadow: 0 0 6px rgba(0,255,255,0.35);
  font-family: 'Orbitron', sans-serif;
  font-size: 1.35rem;
}

.home-tutorial-frame {
  height: 420px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
}

.home-tutorial-lang {
  height: 100%;
}

.home-tutorial-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
}

.home-tutorial-tab-btn {
  border: 1px solid rgba(0,255,255,0.18);
  background: rgba(255,255,255,0.05);
  color: #d8f8ff;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  transition: 0.15s ease;
}

.home-tutorial-tab-btn:hover {
  filter: brightness(1.08);
}

.home-tutorial-tab-btn.active {
  background: linear-gradient(90deg, rgba(0,120,255,0.35), rgba(204,0,255,0.28));
  border-color: rgba(204,0,255,0.55);
  color: #fff;
  box-shadow: 0 0 12px rgba(204,0,255,0.18);
}

.home-tutorial-content {
  height: calc(100% - 62px);
  overflow-y: auto;
  padding: 14px 14px 18px;
}

.home-tutorial-section {
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}

.home-tutorial-section-title {
  margin: 0 0 10px;
  color: #ffd66b;
  font-size: 1.05rem;
  font-weight: 800;
}

.home-tutorial-paragraph {
  margin: 0 0 10px;
  line-height: 1.55;
  color: #f2f4ff;
}

.home-tutorial-list {
  margin: 0 0 10px 18px;
  padding: 0;
}

.home-tutorial-list li {
  margin-bottom: 6px;
  line-height: 1.45;
}

.home-tutorial-images {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.home-tutorial-image {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(0,255,255,0.12);
  box-shadow: 0 0 12px rgba(0,0,0,0.35);
  background: rgba(0,0,0,0.25);
}

.home-tutorial-note {
  margin-top: 10px;
  font-size: 0.95em;
  color: #a8e9ff;
}

@media (max-width: 900px) {
  .home-tutorial-frame {
    height: 360px;
  }

  .home-tutorial-content {
    height: calc(100% - 96px);
  }
}