/* ══════════════════════════════════════════════════════════════════════════════
   CIEL EN DIRECT — habillage premium de l'Horloge Solaire (2026-10-25)
   Couche PUREMENT visuelle, chargée après constella-observatoire.css.
   Le moteur (constella.page-5.js) reste la seule source des positions et heures :
   aucune animation ici ne déplace un astre.
   ══════════════════════════════════════════════════════════════════════════════ */
html #sky-section{
  --cd-cosmic:#0b1030;
  --cd-indigo:#151339;
  --cd-violet:#7b4fd6;
  --cd-gold:#e8c36a;
  --cd-gold-hi:#ffd979;
  --cd-turq:#3fe0d0;
  --cd-lunar:#f3eee4;
  --cd-ink:#e9e1f4;
  --cd-ink-dim:#b4a9cf;
  --cd-line:rgba(232,195,106,.34);
  --cd-glass:rgba(24,22,64,.52);
  border-radius:28px;
  isolation:isolate;
}

/* ── Atmosphère : bleu nuit → indigo, nébuleuses diffuses, halos ─────────────── */
html #sky-section::before{
  background:
    radial-gradient(ellipse 46% 30% at 50% 30%, rgba(232,195,106,.13), rgba(232,195,106,0) 70%),
    radial-gradient(ellipse 60% 40% at 14% 22%, rgba(123,79,214,.42), rgba(123,79,214,0) 72%),
    radial-gradient(ellipse 52% 36% at 88% 40%, rgba(63,110,230,.34), rgba(63,110,230,0) 70%),
    radial-gradient(ellipse 55% 34% at 22% 78%, rgba(150,80,200,.26), rgba(150,80,200,0) 70%),
    radial-gradient(ellipse 50% 30% at 84% 86%, rgba(63,224,208,.07), rgba(63,224,208,0) 70%),
    linear-gradient(180deg, var(--cd-cosmic) 0%, var(--cd-indigo) 46%, #100d2c 100%);
  border-radius:inherit;
}
html #sky-section canvas#sky-starfield{opacity:.85;border-radius:inherit;}

/* Étoiles scintillantes (16 points, positions fixes, opacité seule animée) */
html #sky-section .sky-twinkle{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;border-radius:inherit;}
html #sky-section .sky-twinkle i{position:absolute;width:2px;height:2px;border-radius:50%;background:#fff6dc;box-shadow:0 0 6px 1px rgba(255,236,180,.7);opacity:.35;}
html #sky-section .sky-twinkle i:nth-child(1){left:6%;top:9%}
html #sky-section .sky-twinkle i:nth-child(2){left:17%;top:31%;background:#dfe6ff;box-shadow:0 0 6px 1px rgba(190,205,255,.7)}
html #sky-section .sky-twinkle i:nth-child(3){left:9%;top:58%}
html #sky-section .sky-twinkle i:nth-child(4){left:24%;top:83%;background:#dfe6ff;box-shadow:0 0 6px 1px rgba(190,205,255,.7)}
html #sky-section .sky-twinkle i:nth-child(5){left:33%;top:4%}
html #sky-section .sky-twinkle i:nth-child(6){left:68%;top:6%;background:#dfe6ff;box-shadow:0 0 6px 1px rgba(190,205,255,.7)}
html #sky-section .sky-twinkle i:nth-child(7){left:82%;top:17%}
html #sky-section .sky-twinkle i:nth-child(8){left:93%;top:34%;width:3px;height:3px}
html #sky-section .sky-twinkle i:nth-child(9){left:88%;top:61%;background:#dfe6ff;box-shadow:0 0 6px 1px rgba(190,205,255,.7)}
html #sky-section .sky-twinkle i:nth-child(10){left:76%;top:88%}
html #sky-section .sky-twinkle i:nth-child(11){left:52%;top:95%}
html #sky-section .sky-twinkle i:nth-child(12){left:4%;top:40%;width:3px;height:3px}
html #sky-section .sky-twinkle i:nth-child(13){left:96%;top:9%}
html #sky-section .sky-twinkle i:nth-child(14){left:41%;top:70%;background:#dfe6ff;box-shadow:0 0 6px 1px rgba(190,205,255,.7)}
html #sky-section .sky-twinkle i:nth-child(15){left:61%;top:48%;opacity:.2}
html #sky-section .sky-twinkle i:nth-child(16){left:13%;top:94%}
/* Fils de constellation discrets (Petite Ourse stylisée, coin haut gauche ; Cassiopée, coin bas droit) */
html #sky-section .sky-twinkle svg{position:absolute;width:150px;height:auto;opacity:.5}
html #sky-section .sky-twinkle .c1{left:2%;top:2%}
html #sky-section .sky-twinkle .c2{right:2%;bottom:3%;width:170px}

/* ── Titre ───────────────────────────────────────────────────────────────────── */
html #sky-section .sky-h2{
  font-size:clamp(26px,5.2vw,40px);letter-spacing:.32em;
  background:linear-gradient(180deg,#fff4cf 0%,var(--cd-gold-hi) 46%,#d3a43c 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  text-shadow:none;filter:drop-shadow(0 0 22px rgba(255,214,110,.35));
}
html #sky-section .sky-sub{color:var(--cd-ink-dim);letter-spacing:.32em;}
html #sky-section .sky-sub::after{content:"";display:block;width:120px;height:1px;margin:14px auto 0;background:linear-gradient(90deg,transparent,var(--cd-gold),transparent);}
html #sky-section .sky-eyebrow{color:var(--cd-gold);opacity:.85;}
html #sky-section .sky-divider{background:linear-gradient(90deg,transparent,rgba(232,195,106,.45),transparent);}

/* ── L'astrolabe : halo de fond + respiration lumineuse ─────────────────────── */
html .sky-dial-wrap{width:min(560px,94vw);}
html .sky-dial-wrap::before{
  content:"";position:absolute;inset:-6%;z-index:-1;border-radius:50%;pointer-events:none;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,217,121,.20) 0%, rgba(232,195,106,.10) 34%, rgba(123,79,214,.14) 55%, rgba(11,16,48,0) 70%);
}
html .sky-dial-wrap::after{
  content:"";position:absolute;inset:5%;z-index:-1;border-radius:50%;pointer-events:none;
  box-shadow:0 0 60px 6px rgba(232,195,106,.10), inset 0 0 70px rgba(123,79,214,.18);
}
/* Aura du Soleil : élément DOM posé par le moteur sur la position réelle du Soleil */
html #sky-sun-aura{
  position:absolute;width:24%;aspect-ratio:1/1;left:50%;top:50%;transform:translate(-50%,-50%);
  border-radius:50%;pointer-events:none;z-index:0;
  background:radial-gradient(circle, rgba(255,232,150,.45) 0%, rgba(255,205,90,.18) 38%, rgba(255,205,90,0) 70%);
  mix-blend-mode:screen;
}
html #sky-sun-aura.is-below{opacity:.25;}
html #sky-sun-aura[hidden]{display:none;}

/* ── Lecture centrale ───────────────────────────────────────────────────────── */
html .sky-dial-center .sky-ct-lab{font-size:10px;letter-spacing:.42em;color:var(--cd-gold);opacity:.9;margin-bottom:4px;}
html #sky-solar-time{
  font-size:clamp(42px,12.5vw,70px);letter-spacing:.02em;font-variant-numeric:tabular-nums;
  background:linear-gradient(180deg,#fff7d6 0%,var(--cd-gold-hi) 48%,#cf9d34 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  text-shadow:none;filter:drop-shadow(0 0 16px rgba(255,214,110,.45));
}
html #sky-diff{color:var(--cd-gold-hi);font-size:11.5px;letter-spacing:.12em;margin-top:2px;}
html #sky-diff::before{content:"";display:block;width:70px;height:1px;margin:6px auto 7px;background:linear-gradient(90deg,transparent,var(--cd-gold),transparent);}
html #sky-rdv-tip{color:var(--cd-ink-dim);}
html #sky-phase-label{color:#c6b8f0;}

/* ── Lever · Zénith · Coucher ──────────────────────────────────────────────── */
html .sky-triad{gap:10px;max-width:470px;}
html .sky-triad > div{
  position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:14px 6px 12px;border-radius:14px;
  background:linear-gradient(180deg,rgba(40,34,96,.62),rgba(20,18,58,.62));
  border:1px solid rgba(232,195,106,.28);
  box-shadow:inset 0 1px 0 rgba(255,236,190,.08), 0 8px 24px rgba(5,4,20,.35);
  transition:transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
html .sky-triad > div:hover{transform:translateY(-2px);border-color:rgba(255,217,121,.6);box-shadow:inset 0 1px 0 rgba(255,236,190,.12),0 10px 28px rgba(5,4,20,.45),0 0 18px rgba(232,195,106,.18);}
html .sky-triad .tl{display:flex;flex-direction:column;align-items:center;gap:5px;color:#cbbfe6;margin:0;}
html .sky-triad .tl svg{width:26px;height:18px;color:var(--cd-gold);overflow:visible}
html .sky-triad .tv{font-size:21px;color:#fff1c2;font-variant-numeric:tabular-nums;}
html .sky-triad > div.is-next{
  border-color:var(--cd-gold-hi);
  background:linear-gradient(180deg,rgba(84,62,40,.55),rgba(30,24,70,.66));
  box-shadow:inset 0 1px 0 rgba(255,236,190,.16),0 0 22px rgba(255,217,121,.28),0 8px 24px rgba(5,4,20,.35);
}
html .sky-triad > div.is-next::after{
  content:"à venir";position:absolute;top:-8px;left:50%;transform:translateX(-50%);
  font-family:'Cinzel','Cinzel Fallback','Cinzel Fallback A',serif;font-size:8px;letter-spacing:.24em;text-transform:uppercase;
  padding:2px 8px;border-radius:8px;background:var(--cd-gold-hi);color:#2a1d05;white-space:nowrap;
}
html .sky-progress{max-width:470px;}
html .sky-progress-track{height:5px;background:rgba(123,79,214,.22);}
html .sky-progress-fill{background:linear-gradient(90deg,#c98b3c,var(--cd-gold) 45%,#fff0b0);box-shadow:0 0 14px rgba(255,217,121,.55);}
html .sky-progress-legend{color:#a99cc8;font-size:8.5px;}

/* ── Bande position / UTC et explication ───────────────────────────────────── */
html .sky-strip{color:var(--cd-ink-dim);font-size:14px;}
html .sky-strip b{color:var(--cd-ink);}
html .sky-explain{
  background:var(--cd-glass);border-color:rgba(232,195,106,.30);color:var(--cd-ink-dim);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
}
html .sky-explain b{color:var(--cd-lunar);}

/* ── Cartes Soleil / Lune ──────────────────────────────────────────────────── */
html #sky-section .sky-detail-grid{gap:18px;}
html #sky-section .sky-detail-grid .sky-card{
  position:relative;overflow:hidden;padding:20px 22px 18px;border-radius:18px;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  transition:transform .25s ease, box-shadow .25s ease;
}
html #sky-section .sky-detail-grid .sky-card:hover{transform:translateY(-2px);}
html #sky-section .sky-card--sun{
  border:1px solid rgba(232,195,106,.45);
  background:
    radial-gradient(120% 90% at 100% 110%, rgba(232,140,60,.22), rgba(232,140,60,0) 60%),
    radial-gradient(90% 70% at 0% 0%, rgba(255,217,121,.14), rgba(255,217,121,0) 70%),
    linear-gradient(165deg, rgba(52,38,86,.72), rgba(24,20,62,.72));
  box-shadow:inset 0 1px 0 rgba(255,236,190,.12), 0 10px 30px rgba(5,4,20,.35);
}
html #sky-section .sky-card--sun:hover{box-shadow:inset 0 1px 0 rgba(255,236,190,.16),0 12px 32px rgba(5,4,20,.45),0 0 22px rgba(232,195,106,.18);}
html #sky-section .sky-card--moon{
  border:1px solid rgba(196,200,255,.40);
  background:
    radial-gradient(120% 90% at 100% 110%, rgba(123,79,214,.30), rgba(123,79,214,0) 60%),
    radial-gradient(90% 70% at 0% 0%, rgba(210,220,255,.12), rgba(210,220,255,0) 70%),
    linear-gradient(165deg, rgba(36,34,92,.72), rgba(18,16,56,.72));
  box-shadow:inset 0 1px 0 rgba(225,230,255,.12), 0 10px 30px rgba(5,4,20,.35);
}
html #sky-section .sky-card--moon:hover{box-shadow:inset 0 1px 0 rgba(225,230,255,.16),0 12px 32px rgba(5,4,20,.45),0 0 22px rgba(170,180,255,.18);}
html #sky-section .sky-card .sky-label{display:flex;align-items:center;gap:10px;margin-bottom:12px;letter-spacing:.32em;}
html #sky-section .sky-card .sky-label svg{width:30px;height:30px;flex-shrink:0}
html #sky-section .sky-card--sun .sky-label{color:var(--cd-gold-hi);}
html #sky-section .sky-card--moon .sky-label{color:#dfe3ff;}
html #sky-sun-info,html #sky-moon-info{font-family:'Crimson Text','Crimson Fallback','Crimson Fallback A',serif;font-size:17px;line-height:2;font-variant-numeric:tabular-nums;}
html #sky-sun-info{color:#f3e2b8;}
html #sky-moon-info{color:#dcdcf6;}

/* ── Comparateur, lecture détaillée, cycle lunaire ─────────────────────────── */
html .sky-city-input{background:rgba(20,18,58,.75);border-color:rgba(123,79,214,.55);font-size:16px;}
html .sky-city-input:focus{border-color:var(--cd-gold);}
html .sky-city-input::placeholder{color:#8f84b0;}
html .sky-moon-panel{border-color:rgba(196,200,255,.32);background:radial-gradient(120% 150% at 15% 15%,rgba(60,52,130,.55),rgba(18,16,56,.5));}
html #sky-section .sky-relocate{color:#a99cc8;min-height:44px;padding:0 14px;}

/* ── Infobulle des astres (cadran) ─────────────────────────────────────────── */
html #tip .sky-tip-row{display:block;font-style:normal;font-size:12px;opacity:.85;margin-top:2px;}

/* ── Mouvement : uniquement si l'utilisateur l'accepte ────────────────────── */
@media (prefers-reduced-motion:no-preference){
  html #sky-section .sky-twinkle i{animation:cdTwinkle 5.5s ease-in-out infinite;}
  html #sky-section .sky-twinkle i:nth-child(3n){animation-duration:7s;animation-delay:-2s}
  html #sky-section .sky-twinkle i:nth-child(3n+1){animation-duration:4.2s;animation-delay:-1s}
  html #sky-section .sky-twinkle i:nth-child(4n){animation-delay:-3.4s}
  html .sky-dial-wrap::before{animation:cdBreath 9s ease-in-out infinite;}
  html #sky-sun-aura{animation:cdPulse 4.5s ease-in-out infinite;transition:left .8s ease, top .8s ease;}
  html .sky-dial-wrap.is-relocating #sky-dial{animation:cdRelocate .9s ease;}
}
@keyframes cdTwinkle{0%,100%{opacity:.18}50%{opacity:.95}}
@keyframes cdBreath{0%,100%{opacity:.75;transform:scale(1)}50%{opacity:1;transform:scale(1.03)}}
@keyframes cdPulse{0%,100%{transform:translate(-50%,-50%) scale(.9);opacity:.75}50%{transform:translate(-50%,-50%) scale(1.08);opacity:1}}
@keyframes cdRelocate{0%{opacity:.35;filter:blur(2px)}100%{opacity:1;filter:none}}

/* ── Téléphone ─────────────────────────────────────────────────────────────── */
@media (max-width:620px){
  html #sky-section{border-radius:20px;}
  html #sky-section .sky-h2{letter-spacing:.18em;}
  html .sky-triad{gap:7px;}
  html .sky-triad > div{padding:13px 4px 10px;}
  html .sky-triad .tv{font-size:17px !important;}
  html .sky-triad .tl{font-size:8px;letter-spacing:.18em;}
  html #sky-section .sky-twinkle svg{display:none;}
  html #sky-section .sky-detail-grid .sky-card{padding:16px 18px;}
}
