/* Ciel du tarot du jour : nuit étoilée déclinée selon le moment de la journée (data-tod), nébuleuses, étoiles qui scintillent,
   étoiles filantes. Partagé par l'outil (.dt, includes/daily_tool.php) et l'en-tête du résultat (.dr-hero, includes/results_daily.php). */

/* ---------- Ciel : nuit étoilée, déclinée selon le moment de la journée ----------
   Base commune sombre (indigo profond) pour toutes les heures ; chaque moment change la teinte de l'horizon
   (bas du ciel), la couleur et la place du halo (lune ou soleil bas) et la couleur des nébuleuses. */
:is(.dt, .dr-hero) {
	--sky-1: #121a3a; --sky-2: #222c5a; --sky-3: #3a4680;            /* haut, milieu, bas (horizon) */
	--glow: rgba(233, 238, 255, .55); --glow-x: 78%; --glow-y: 8%;    /* halo de la lune / du soleil */
	--neb-1: rgba(122, 104, 214, .30); --neb-2: rgba(64, 140, 200, .20); /* nébuleuses */
	--star: #fff8e6;
	--m-accent: #e2c587;
	--dt-ink: #eef1fa; --dt-soft: #c3cbe0; --dt-title: #ffffff;
	--dt-pill: rgba(14, 20, 46, .45); --dt-pill-line: rgba(226, 197, 135, .38);
}
/* Aube : l'horizon rosit sous la nuit qui s'en va */
:is(.dt, .dr-hero)[data-tod="aube"]  { --sky-1: #161b40; --sky-2: #3a3670; --sky-3: #9a6a8e; --glow: rgba(255, 186, 160, .5);  --glow-x: 14%; --glow-y: 92%; --neb-1: rgba(214, 120, 160, .26); --neb-2: rgba(120, 104, 214, .22); }
/* Matin : bleu nuit qui s'éclaircit, lumière claire et dorée */
:is(.dt, .dr-hero)[data-tod="matin"] { --sky-1: #14214a; --sky-2: #2a4280; --sky-3: #5577b4; --glow: rgba(255, 236, 196, .45); --glow-x: 24%; --glow-y: 10%; --neb-1: rgba(90, 150, 220, .26);  --neb-2: rgba(150, 120, 220, .18); }
/* Jour : saphir profond, soleil d'or */
:is(.dt, .dr-hero)[data-tod="jour"]  { --sky-1: #15245a; --sky-2: #27448c; --sky-3: #4a6fb8; --glow: rgba(255, 220, 140, .5);  --glow-x: 64%; --glow-y: 0%;  --neb-1: rgba(80, 160, 230, .24);  --neb-2: rgba(226, 190, 110, .14); }
/* Soir : indigo, violet et braise à l'horizon */
:is(.dt, .dr-hero)[data-tod="soir"]  { --sky-1: #161842; --sky-2: #3d2f6c; --sky-3: #8e5672; --glow: rgba(255, 168, 110, .5);  --glow-x: 88%; --glow-y: 88%; --neb-1: rgba(200, 110, 170, .26); --neb-2: rgba(240, 150, 90, .16); }
/* Nuit : la référence */
:is(.dt, .dr-hero)[data-tod="nuit"]  { --sky-1: #111836; --sky-2: #1f2a58; --sky-3: #384784; --glow: rgba(233, 238, 255, .5);  --glow-x: 78%; --glow-y: 8%;  --neb-1: rgba(122, 104, 214, .30); --neb-2: rgba(64, 140, 200, .20); }

.dt-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.dt-sky::before {   /* halo de la lune / du soleil */
	content: ''; position: absolute; inset: 0;
	background: radial-gradient(560px 400px at var(--glow-x) var(--glow-y), var(--glow) 0%, transparent 70%);
}

/* Nébuleuses : deux nuages colorés qui respirent et dérivent très lentement */
.dt-veil {
	position: absolute; inset: -20%;
	background:
		radial-gradient(38% 30% at 22% 34%, var(--neb-1), transparent 70%),
		radial-gradient(34% 28% at 78% 62%, var(--neb-2), transparent 70%),
		radial-gradient(26% 22% at 56% 18%, var(--neb-1), transparent 70%);
	filter: blur(6px);
	animation: dtNebula 38s ease-in-out infinite alternate; will-change: transform, opacity;
}
@keyframes dtNebula { from { transform: translate3d(-2%, 0, 0) scale(1); opacity: .85; } to { transform: translate3d(2%, -2%, 0) scale(1.08); opacity: 1; } }

/* Étoiles : deux couches en mosaïque (fines et lointaines / plus grosses et dorées) qui scintillent en décalé */
.dt-motif { position: absolute; inset: 0; background-repeat: repeat; will-change: opacity; }
.dt-motif--far {
	background-size: 190px 170px;
	background-image:
		radial-gradient(circle at 18px 26px, rgba(255, 255, 255, .85) 0 .8px, transparent 1.4px),
		radial-gradient(circle at 74px 92px, rgba(255, 255, 255, .6) 0 .7px, transparent 1.3px),
		radial-gradient(circle at 132px 40px, rgba(255, 255, 255, .75) 0 .9px, transparent 1.5px),
		radial-gradient(circle at 160px 140px, rgba(255, 255, 255, .55) 0 .7px, transparent 1.3px),
		radial-gradient(circle at 40px 150px, rgba(255, 255, 255, .7) 0 .8px, transparent 1.4px),
		radial-gradient(circle at 104px 128px, rgba(255, 255, 255, .5) 0 .6px, transparent 1.2px),
		radial-gradient(circle at 96px 12px, rgba(255, 255, 255, .6) 0 .7px, transparent 1.3px);
	animation: dtTwinkle 5.5s ease-in-out infinite alternate;
}
.dt-motif--near {
	background-size: 340px 300px;
	background-image:
		radial-gradient(circle at 60px 70px, var(--star) 0 1.3px, rgba(255, 226, 160, .35) 2px, transparent 4px),
		radial-gradient(circle at 250px 40px, var(--star) 0 1.1px, rgba(255, 226, 160, .3) 1.8px, transparent 3.5px),
		radial-gradient(circle at 300px 210px, var(--star) 0 1.4px, rgba(255, 226, 160, .35) 2.2px, transparent 4.5px),
		radial-gradient(circle at 150px 250px, var(--star) 0 1.1px, rgba(255, 226, 160, .3) 1.8px, transparent 3.5px),
		radial-gradient(circle at 190px 150px, var(--star) 0 .9px, transparent 2px);
	animation: dtTwinkle 3.8s ease-in-out infinite alternate-reverse;
}
@keyframes dtTwinkle { from { opacity: .45; } to { opacity: 1; } }
/* Le jour, les étoiles s'effacent un peu ; à l'aube et au soir elles pâlissent vers l'horizon */
:is(.dt, .dr-hero)[data-tod="jour"] .dt-motif, :is(.dt, .dr-hero)[data-tod="matin"] .dt-motif { -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .35) 70%, transparent); mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .35) 70%, transparent); }
:is(.dt, .dr-hero)[data-tod="aube"] .dt-motif, :is(.dt, .dr-hero)[data-tod="soir"] .dt-motif { -webkit-mask-image: linear-gradient(#000 30%, transparent 92%); mask-image: linear-gradient(#000 30%, transparent 92%); }

/* Étoile filante, de temps en temps */
.dt-sky::after {
	content: ''; position: absolute; left: 72%; top: 10%; width: 140px; height: 1.5px; border-radius: 2px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 246, 220, .95));
	transform-origin: 0 50%; opacity: 0;
	animation: dtShoot 13s linear 4s infinite;
}
@keyframes dtShoot {
	0%, 90% { opacity: 0; transform: rotate(152deg) translateX(0); }
	91% { opacity: 1; }
	97% { opacity: 0; transform: rotate(152deg) translateX(360px); }
	100% { opacity: 0; transform: rotate(152deg) translateX(360px); }
}
/* Deux étoiles filantes de plus, d'autres endroits, directions et rythmes : en tout, une toutes les 4 s environ */
.dt-shoot {
	position: absolute; left: var(--x); top: var(--y); width: var(--l, 140px); height: 1.5px; border-radius: 2px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 246, 220, .95));
	transform-origin: 0 50%; opacity: 0;
	animation: dtShootV var(--d) linear var(--w) infinite;
}
.dt-shoot--1 { --x: 14%; --y: 6%;  --a: 32deg;  --l: 120px; --d: 10s; --w: 1.8s; }   /* vers le bas, à droite */
.dt-shoot--2 { --x: 92%; --y: 34%; --a: 164deg; --l: 160px; --d: 14s; --w: 7.5s; }   /* longue, presque à plat, vers la gauche */
@keyframes dtShootV {
	0%, 88% { opacity: 0; transform: rotate(var(--a)) translateX(0); }
	89% { opacity: 1; }
	95% { opacity: 0; transform: rotate(var(--a)) translateX(340px); }
	100% { opacity: 0; transform: rotate(var(--a)) translateX(340px); }
}
