/* Éclipse en direct — feuille de style unique, mobile first */

:root {
  --bg: #070911;
  --bg2: #0d1120;
  --card: rgba(20, 25, 44, .72);
  --line: rgba(140, 160, 215, .14);
  --txt: #eef2ff;
  --dim: #98a4c8;
  --dim2: #6f7ba3;
  --sun: #ffc14d;
  --sun2: #ff9a3c;
  --hot: #ff6b5e;
  --ok: #6ee7a8;
  --r: 20px;
  --pad: 16px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 700px at 78% -8%, #2a2140 0%, transparent 62%),
    radial-gradient(900px 600px at 12% 108%, #23283f 0%, transparent 60%),
    linear-gradient(#070911, #0a0e1c 60%, #0b0d18);
  background-attachment: fixed;
  color: var(--txt);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  padding: 0 var(--pad) calc(40px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

/* ---------- étoiles ---------- */
.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 82% 12%, #dfe6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 32%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 68% 47%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 62%, #cfd8ff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 90% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 88%, #e6ecff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 58% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 92%, #dbe3ff 50%, transparent 51%);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35 } to { opacity: .7 } }

/* ---------- en-tête ---------- */
.top {
  max-width: 560px; margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 0 14px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.brand { display: flex; gap: 11px; align-items: center; }
.glyph {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 30% 30%, #fff6dd, var(--sun) 55%, var(--sun2));
  box-shadow: 0 0 22px rgba(255, 175, 70, .45), inset -9px -3px 0 0 #0a0d18;
}
h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: .2px; }
.site {
  margin-top: 2px; display: inline-flex; align-items: center; gap: 3px;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--dim); font: inherit; font-size: 13.5px;
}
.site svg { width: 13px; height: 13px; fill: currentColor; opacity: .8; }
.site:active { color: var(--txt); }
.clock { text-align: right; line-height: 1.2; }
.clock span { font-size: 19px; font-weight: 600; font-feature-settings: "tnum"; }
.clock small { display: block; font-size: 11px; color: var(--dim2); }

main { max-width: 560px; margin: 0 auto; }

/* ---------- cartes ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .34);
}
.card h2 {
  margin: 0 0 14px; font-size: 12.5px; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}

/* ---------- héros ---------- */
.hero { padding-top: 14px; overflow: hidden; }
.phase-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px; min-height: 26px;
}
.pill {
  font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(140, 160, 215, .13); color: var(--dim);
  border: 1px solid var(--line); white-space: nowrap;
}
.pill.live { background: rgba(255, 107, 94, .16); color: #ffb0a8; border-color: rgba(255, 107, 94, .35); }
.pill.live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--hot); margin-right: 6px; vertical-align: 1px;
  animation: beat 1.5s ease-in-out infinite;
}
.pill.soon { background: rgba(255, 193, 77, .14); color: #ffdd9d; border-color: rgba(255, 193, 77, .3); }
.pill.done { background: rgba(110, 231, 168, .12); color: #9df0c4; border-color: rgba(110, 231, 168, .28); }
@keyframes beat { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(.75) } }
.maxnote { font-size: 12px; color: var(--dim2); text-align: right; }

.sim-badge {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(120, 150, 255, .14); border: 1px solid rgba(120, 150, 255, .3);
  color: #c2d0ff; border-radius: 12px; padding: 7px 8px 7px 12px;
  font-size: 12.5px; font-weight: 600; margin-bottom: 10px;
}
.sim-badge button {
  font: inherit; font-size: 12px; border: 0; cursor: pointer;
  background: rgba(160, 185, 255, .22); color: #eaf0ff;
  padding: 5px 10px; border-radius: 8px;
}

.scene { display: flex; flex-direction: column; align-items: center; }
#disk { width: min(100%, 340px); height: auto; display: block; margin: -6px 0 -4px; }
#moonDisk { transition: cx .28s linear, cy .28s linear, r .5s linear; }
#sunDisk { transition: r .5s linear; }
#glow { transition: r .5s linear, opacity .6s ease; }

.readout { text-align: center; width: 100%; margin-top: 2px; }
.pct {
  font-size: clamp(52px, 17vw, 74px); font-weight: 250; line-height: .95;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff8e6, var(--sun) 78%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--sun);
}
.pct i { font-size: .42em; font-style: normal; font-weight: 400; margin-left: 2px; }
.pct-label { font-size: 12.5px; color: var(--dim); letter-spacing: .04em; margin-top: 2px; }
.bar {
  height: 6px; border-radius: 99px; background: rgba(140, 160, 215, .14);
  margin: 14px 0 2px; overflow: hidden;
}
.bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--sun2), var(--sun), #fff0c4);
  border-radius: 99px; transition: width .4s ease;
}

.countdown {
  margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line);
  text-align: center;
}
.cd-label { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim2); }
.cd-time {
  font-size: clamp(34px, 11vw, 44px); font-weight: 300; letter-spacing: .01em;
  margin: 3px 0 1px; font-feature-settings: "tnum";
}
.cd-sub { font-size: 13px; color: var(--dim); }

/* ---------- frise ---------- */
.timeline { padding: 4px 0 0; }
.track {
  position: relative; height: 8px; border-radius: 99px;
  background: rgba(140, 160, 215, .13); margin: 0 0 8px;
}
.track > span#tlFill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,154,60,.55), var(--sun));
  transition: width .5s linear;
}
.track .now {
  position: absolute; top: 50%; left: 0; width: 3px; height: 20px;
  transform: translate(-50%, -50%); border-radius: 2px;
  background: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, .8);
  transition: left .5s linear;
}
.track .sunset-mark {
  position: absolute; top: 50%; left: 100%; width: 2px; height: 14px;
  transform: translate(-50%, -50%);
  background: repeating-linear-gradient(#8fa3d8 0 3px, transparent 3px 5px);
}
.steps { display: flex; justify-content: space-between; }
.step { text-align: center; flex: 1; }
.step:first-child { text-align: left; }
.step:last-child { text-align: right; }
.step b { display: block; font-size: 17px; font-weight: 600; }
.step small { font-size: 11px; color: var(--dim2); letter-spacing: .04em; }
.step.past b { color: var(--dim2); }
.step.next b { color: var(--sun); }
.hint { margin: 12px 0 0; font-size: 12.5px; color: var(--dim2); line-height: 1.45; }

/* ---------- ciel ---------- */
#sky { width: 100%; height: auto; border-radius: 14px; background: rgba(8,11,22,.5); display: block; }
.lookrow { display: flex; gap: 8px; margin-top: 12px; }
.lookrow > div {
  flex: 1; text-align: center; padding: 9px 4px;
  background: rgba(140, 160, 215, .07); border-radius: 12px;
}
.lookrow b { display: block; font-size: 17px; font-weight: 600; }
.lookrow small { font-size: 10.5px; color: var(--dim2); letter-spacing: .03em; }

/* ---------- grille ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line);
        border-radius: 14px; overflow: hidden; }
.cell { background: #101527; padding: 12px 13px; }
.cell small { display: block; font-size: 10.5px; letter-spacing: .05em;
              text-transform: uppercase; color: var(--dim2); margin-bottom: 3px; }
.cell b { font-size: 16px; font-weight: 600; }

/* ---------- météo ---------- */
.wx-loading { color: var(--dim2); font-size: 14px; }
.wx-now { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.wx-now b { font-size: 30px; font-weight: 300; }
.wx-now span { font-size: 13px; color: var(--dim); }
.wx-hours { display: flex; gap: 6px; }
.wx-h { flex: 1; text-align: center; }
.wx-h .meter {
  height: 62px; border-radius: 8px; background: rgba(140,160,215,.1);
  position: relative; overflow: hidden; margin-bottom: 5px;
}
.wx-h .meter i {
  position: absolute; left: 0; right: 0; bottom: 0; display: block;
  background: linear-gradient(#c8d4f2, #7b8ab5);
}
.wx-h.good .meter i { background: linear-gradient(#6ee7a8, #3fae7c); }
.wx-h.mid .meter i  { background: linear-gradient(#ffd88a, #e0a53c); }
.wx-h.bad .meter i  { background: linear-gradient(#cdd7f0, #7d8cba); }
.wx-h em { display: block; font-size: 14px; font-style: normal; font-weight: 600; }
.wx-h small { font-size: 10.5px; color: var(--dim2); }

/* ---------- simulation ---------- */
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px;
  background: transparent; margin: 0;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px; background: rgba(140,160,215,.18);
}
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(140,160,215,.18); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff7e2, var(--sun));
  border: 0; margin-top: -8px; box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff7e2, var(--sun));
}
.scrub-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dim2); }
.speeds { display: flex; gap: 6px; margin-top: 12px; }
.speeds button {
  flex: 1; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 10px 0; border-radius: 11px; color: var(--dim);
  background: rgba(140,160,215,.09); border: 1px solid var(--line);
}
.speeds button.on { background: rgba(255,193,77,.16); color: #ffdd9d; border-color: rgba(255,193,77,.32); }

/* ---------- danger / faq ---------- */
.card.danger { border-color: rgba(255, 107, 94, .34); background: rgba(48, 20, 24, .55); }
.card.danger h2 { color: #ffb0a8; text-transform: none; letter-spacing: 0; font-size: 15px; }
.card.danger ul { margin: 0; padding-left: 20px; }
.card.danger li { margin-bottom: 7px; font-size: 14px; line-height: 1.45; }
.card.danger li:last-child { margin-bottom: 0; }

.faq { margin: 0; }
.faq dt { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; color: #fff; }
.faq dd { margin: 0 0 14px; font-size: 14px; color: var(--dim); line-height: 1.5; }
.faq dd:last-child { margin-bottom: 0; }

footer { padding: 6px 4px 0; }
footer p { margin: 0 0 6px; font-size: 11.5px; color: var(--dim2); line-height: 1.5; }
footer .tiny { font-size: 11px; opacity: .75; }

/* ---------- feuille position ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end;
  background: rgba(4, 6, 14, .66); backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0 } }
.sheet-in {
  width: 100%; max-width: 560px; margin: 0 auto;
  background: #10152a; border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  animation: up .26s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(24px) } }
.sheet-in h3 { margin: 0 0 14px; font-size: 15px; }
.sheet button.big {
  width: 100%; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 14px; border-radius: 14px; border: 0; color: #1a1206;
  background: linear-gradient(var(--sun), var(--sun2)); margin-bottom: 14px;
}
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.places button {
  font: inherit; font-size: 13.5px; cursor: pointer; text-align: left;
  padding: 11px 12px; border-radius: 12px; color: var(--txt);
  background: rgba(140,160,215,.09); border: 1px solid var(--line);
}
.places button span { display: block; font-size: 11px; color: var(--dim2); margin-top: 2px; }
.places button.on { border-color: rgba(255,193,77,.4); background: rgba(255,193,77,.12); }
.sheet button.ghost {
  width: 100%; font: inherit; font-size: 14px; cursor: pointer; padding: 12px;
  border-radius: 12px; color: var(--dim); background: none; border: 1px solid var(--line);
}

@media (min-width: 600px) {
  :root { --pad: 22px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
