/* decor.css — ambiance « statues grecques » teintées rouge + petites touches de rouge.
   Ne touche à aucun autre fichier : cible .screen[data-id] (robuste) et quelques classes existantes. */

:root{
  --dc-head:url("../assets/decor/decor-head.webp");
  --dc-man:url("../assets/decor/decor-man.webp");
  --dc-woman:url("../assets/decor/decor-woman.webp");
  --dc-torso:url("../assets/decor/decor-torso.webp");
  --dc-laurel:url("../assets/decor/decor-laurel.webp");
}

/* ---------- Socle commun ----------
   Le ::before est en position absolue dans .screen (conteneur qui défile) : il défile avec le contenu,
   reste DERRIÈRE grâce à isolation + z-index:-1, et s'efface vers le bas par un masque. */
.screen[data-id]{
  isolation:isolate;
  --dc-img:none;--dc-op:.4;--dc-top:0px;--dc-h:520px;--dc-pos:50% 0%;--dc-size:auto 100%;
  --dc-halo:radial-gradient(60% 45% at 50% 30%,rgba(255,36,20,.16),transparent 70%);
}
.screen[data-id]::before{
  content:none;position:absolute;left:0;right:0;top:var(--dc-top);height:var(--dc-h);
  z-index:-1;pointer-events:none;opacity:var(--dc-op);
  background:var(--dc-halo),var(--dc-img) var(--dc-pos)/var(--dc-size) no-repeat;
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 45%,transparent 100%);
          mask-image:linear-gradient(180deg,#000 0%,#000 45%,transparent 100%);
  animation:dcIn 1.1s ease-out both;
}
@keyframes dcIn{from{opacity:0}to{opacity:var(--dc-op)}}

/* Activation par écran (liste explicite pour ne rien casser ailleurs) */
.screen[data-id="welcome"]::before,.screen[data-id="today"]::before,.screen[data-id="tools"]::before,
.screen[data-id="challenges"]::before,.screen[data-id="profile"]::before,.screen[data-id="stats"]::before,
.screen[data-id="habits"]::before,.screen[data-id="cats"]::before,.screen[data-id="sport"]::before,
.screen[data-id="sleep"]::before,.screen[data-id="shock-phone"]::before,.screen[data-id="shock-money"]::before,
.screen[data-id="motiv"]::before,.screen[data-id="dream"]::before,.screen[data-id="proud"]::before,
.screen[data-id="excuses"]::before,.screen[data-id="push"]::before,.screen[data-id="understood"]::before,
.screen[data-id="building"]::before,.screen[data-id="pact"]::before,.screen[data-id="promises"]::before{content:""}

/* ---------- Onglets de l'app ---------- */
/* Aujourd'hui : buste d'homme en haut à droite, derrière le titre et le niveau */
.screen[data-id="today"]{--dc-img:var(--dc-man);--dc-op:.36;--dc-h:440px;--dc-pos:right -90px top -20px;--dc-size:auto 430px;
  --dc-halo:radial-gradient(55% 40% at 62% 22%,rgba(255,36,20,.18),transparent 70%)}
/* Outils : tête levée, grande, derrière le journal (la carte est translucide) */
.screen[data-id="tools"]{--dc-img:var(--dc-head);--dc-op:.5;--dc-top:40px;--dc-h:720px;--dc-pos:50% 60px;--dc-size:auto 600px;
  --dc-halo:radial-gradient(60% 40% at 50% 40%,rgba(255,36,20,.2),transparent 70%)}
/* Défis : torse en coin haut-gauche, sous la carte Winter Arc, visible derrière les règles */
.screen[data-id="challenges"]{--dc-img:var(--dc-torso);--dc-op:.5;--dc-top:250px;--dc-h:620px;--dc-pos:left -90px top 0px;--dc-size:auto 520px;
  --dc-halo:radial-gradient(50% 40% at 25% 35%,rgba(255,36,20,.16),transparent 70%)}
/* Profil : buste de femme en haut à droite, derrière le nom */
.screen[data-id="profile"]{--dc-img:var(--dc-woman);--dc-op:.4;--dc-h:460px;--dc-pos:right -110px top -10px;--dc-size:auto 440px}
/* Stats : torse centré derrière la carte Aura / radar */
.screen[data-id="stats"]{--dc-img:var(--dc-torso);--dc-op:.3;--dc-top:200px;--dc-h:620px;--dc-pos:50% 0;--dc-size:auto 540px;
  --dc-halo:radial-gradient(50% 40% at 50% 40%,rgba(255,36,20,.18),transparent 70%)}
/* Habitudes : tête levée en coin haut-droit */
.screen[data-id="habits"]{--dc-img:var(--dc-head);--dc-op:.34;--dc-h:420px;--dc-pos:right -110px top -30px;--dc-size:auto 420px}

/* ---------- Onboarding (questions / chocs) ---------- */
.screen[data-id="welcome"]{--dc-img:var(--dc-head);--dc-op:.38;--dc-h:520px;--dc-pos:50% -30px;--dc-size:auto 520px;--dc-halo:none}
.screen[data-id="cats"]{--dc-img:var(--dc-laurel);--dc-op:.3;--dc-h:300px;--dc-pos:50% -40px;--dc-size:auto 320px;--dc-halo:none}
.screen[data-id="sport"],.screen[data-id="push"]{--dc-img:var(--dc-torso);--dc-op:.32;--dc-h:420px;--dc-pos:50% -50px;--dc-size:auto 420px}
.screen[data-id="sleep"],.screen[data-id="dream"]{--dc-img:var(--dc-woman);--dc-op:.32;--dc-h:420px;--dc-pos:right -110px top -40px;--dc-size:auto 420px}
.screen[data-id="shock-phone"]{--dc-img:var(--dc-head);--dc-op:.42;--dc-top:150px;--dc-h:640px;--dc-pos:50% 20px;--dc-size:auto 560px;
  --dc-halo:radial-gradient(55% 35% at 50% 22%,rgba(255,36,20,.22),transparent 70%)}
.screen[data-id="shock-money"]{--dc-img:var(--dc-man);--dc-op:.4;--dc-top:150px;--dc-h:640px;--dc-pos:50% 20px;--dc-size:auto 560px;
  --dc-halo:radial-gradient(55% 35% at 50% 22%,rgba(255,36,20,.22),transparent 70%)}
.screen[data-id="motiv"],.screen[data-id="excuses"]{--dc-img:var(--dc-man);--dc-op:.32;--dc-h:420px;--dc-pos:left -120px top -40px;--dc-size:auto 420px}
.screen[data-id="proud"]{--dc-img:var(--dc-woman);--dc-op:.32;--dc-h:420px;--dc-pos:left -120px top -40px;--dc-size:auto 420px}
.screen[data-id="understood"]{--dc-img:var(--dc-woman);--dc-op:.34;--dc-h:520px;--dc-pos:right -100px top -20px;--dc-size:auto 460px}
.screen[data-id="building"]{--dc-img:var(--dc-head);--dc-op:.3;--dc-h:520px;--dc-pos:50% 0;--dc-size:auto 480px}
.screen[data-id="pact"]{--dc-img:var(--dc-laurel);--dc-op:.28;--dc-top:120px;--dc-h:520px;--dc-pos:50% 0;--dc-size:auto 360px;--dc-halo:none}
.screen[data-id="promises"]{--dc-img:var(--dc-torso);--dc-op:.26;--dc-h:380px;--dc-pos:right -100px top -30px;--dc-size:auto 380px}

/* ---------- Petites touches de rouge ---------- */
/* Liseré + halo rouge en haut de la barre de navigation */
.a-nav::before{content:"";position:absolute;left:16%;right:16%;top:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,60,40,.85),transparent);
  box-shadow:0 0 14px 1px rgba(255,36,20,.45)}
.a-nav::after{content:"";position:absolute;left:22%;right:22%;top:-16px;height:24px;pointer-events:none;z-index:-1;
  background:radial-gradient(50% 60% at 50% 100%,rgba(255,36,20,.22),transparent 75%)}
/* Glow rouge derrière les gros chiffres et emblèmes */
.a-niv b,.a-lvl-n,.a-strk-n{text-shadow:0 0 28px rgba(255,36,20,.38)}
.a-emb-img,.a-prof-emb,.a-ru-img{filter:drop-shadow(0 0 18px rgba(255,36,20,.35)) drop-shadow(0 10px 20px rgba(0,0,0,.6))}
.qimg{filter:drop-shadow(0 0 22px rgba(255,36,20,.22)) drop-shadow(0 18px 24px rgba(0,0,0,.6))}
.qimg-wrap::before{background:radial-gradient(closest-side,rgba(255,36,20,.12),rgba(255,255,255,.03) 60%,transparent)}
/* Séparateurs et ornements ◆ en rouge */
.a-sep i{background:var(--red);box-shadow:0 0 8px rgba(255,36,20,.7)}
.a-sep{background:linear-gradient(90deg,transparent,rgba(255,36,20,.28),rgba(255,255,255,.14),rgba(255,36,20,.28),transparent)}
.a-orn::before,.a-orn::after{background:var(--red);box-shadow:0 0 6px rgba(255,36,20,.6)}

/* ---------- Mode clair : décors masqués, touches adoucies ---------- */
html.light .screen[data-id]::before{content:none}
html.light .a-nav::before{opacity:.5;box-shadow:none}
html.light .a-nav::after{display:none}
html.light .a-niv b,html.light .a-lvl-n,html.light .a-strk-n{text-shadow:none}
html.light .a-emb-img,html.light .a-prof-emb,html.light .a-ru-img{filter:drop-shadow(0 8px 14px rgba(0,0,0,.18))}
html.light .qimg{filter:drop-shadow(0 18px 24px rgba(0,0,0,.25))}

@media (prefers-reduced-motion:reduce){.screen[data-id]::before{animation:none}}
