/* Page Ciel */

.verdict { display: grid; gap: 14px; align-content: start; }
.verdict .head { max-width: 24ch; }
.verdict .lead, .verdict p { max-width: 62ch; }
.night-pick { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 6px; }
.night-pick label { display: grid; gap: 4px; }
.night-pick .field { width: auto; min-width: 12rem; }
.night-pick .button { background: var(--tile); }

/* Lune */
.moon { display: grid; grid-template-columns: 112px 1fr; gap: 20px 24px; align-items: center; align-content: start; }
.moon .moon-times { grid-column: 1 / -1; }
.moon-disc { width: 100%; aspect-ratio: 1; }
.moon-dark { fill: var(--moon-dark); }
.moon-lit { fill: var(--moon-lit); }
.moon-head { display: grid; gap: 6px; }
.moon-illum { white-space: nowrap; font-size: var(--step-head); line-height: 1; letter-spacing: -0.04em; }
.moon-times { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin-top: 8px; }
.moon-times dt { color: var(--muted); font-size: var(--step-small); align-self: baseline; }
.moon-times dd { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Frise de la nuit */
.strip { display: grid; gap: 16px; }
.strip-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.strip-head h2 { font-size: var(--step-lead); font-weight: 600; }
.strip-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.k { display: inline-flex; align-items: center; gap: 6px; }
.k::before { content: ''; width: 14px; height: 14px; }
.k-day::before { background: var(--sky-day); outline: 1px solid var(--rule); }
.k-civil::before { background: var(--sky-civil); }
.k-naut::before { background: var(--sky-naut); }
.k-astro::before { background: var(--sky-astro); }
.k-night::before { background: var(--sky-night); }
.k-good::before { height: 4px; background: var(--accent); }
.strip-scroll { overflow-x: auto; }
.strip-svg { width: 100%; min-width: 760px; height: auto; display: block; }
.strip-label { font-family: var(--font); font-size: 15px; fill: var(--muted); }
.strip-hour { font-family: var(--mono); font-size: 13px; fill: var(--muted); }
.strip-note { font-family: var(--font); font-size: 14px; fill: var(--muted); }
.sky-day { fill: var(--sky-day); }
.sky-civil { fill: var(--sky-civil); }
.sky-naut { fill: var(--sky-naut); }
.sky-astro { fill: var(--sky-astro); }
.sky-night { fill: var(--sky-night); }
.strip-bg { fill: var(--tile-2); }
.strip-moon { fill: var(--moon-lit); opacity: 0.55; }
.strip-cloud { fill: var(--muted); }
.strip-good { fill: var(--accent); }
.strip-tick { stroke: var(--bg); stroke-width: 1; opacity: 0.5; }
.strip-now { stroke: var(--accent); stroke-width: 2; }
.strip-pick { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 4 3; }

/* Carte du ciel */
.chart { display: grid; gap: 16px; align-content: start; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.chart-head h2 { font-size: var(--step-lead); font-weight: 600; }
.chart-head .num { font-weight: 500; }
.chart-svg { width: 100%; max-width: 620px; justify-self: center; }
.chart-sky { fill: var(--sky-night); }
.chart-ring { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 1; }
[data-theme='night'] .chart-ring { stroke: rgba(138, 46, 36, 0.25); }
.chart-cardinal { font-family: var(--mono); font-size: 15px; fill: var(--muted); }
.chart-figure { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
[data-theme='night'] .chart-figure { stroke: rgba(138, 46, 36, 0.35); }
.chart-figure-name { font-family: var(--font); font-size: 11px; fill: rgba(255, 255, 255, 0.45); }
[data-theme='night'] .chart-figure-name { fill: var(--muted); }
.chart-star { fill: #f2efe8; }
[data-theme='night'] .chart-star { fill: var(--ink); }
.chart-star-name { font-family: var(--font); font-size: 11px; fill: rgba(255, 255, 255, 0.6); }
[data-theme='night'] .chart-star-name { fill: var(--muted); }
.chart-planet { fill: var(--accent); }
.chart-planet-faint { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.chart-body-name { font-family: var(--font); font-size: 13px; font-weight: 600; fill: #f2efe8; }
[data-theme='night'] .chart-body-name { fill: var(--ink); }
.chart .moon-dark { fill: #3a3c40; }
.chart .moon-lit { fill: #f2efe8; }
[data-theme='night'] .chart .moon-dark { fill: var(--moon-dark); }
[data-theme='night'] .chart .moon-lit { fill: var(--moon-lit); }
.chart-grid-line { fill: none; stroke: rgba(255, 255, 255, 0.13); stroke-width: 1; stroke-dasharray: 3 3; }
[data-theme='night'] .chart-grid-line { stroke: rgba(138, 46, 36, 0.3); }
.chart-grid-label { font-family: var(--mono); font-size: 10px; fill: rgba(255, 255, 255, 0.5); }
[data-theme='night'] .chart-grid-label { fill: var(--muted); }
.chart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.chart-slider input { width: 100%; min-height: 44px; }

/* Planètes */
.planets { display: grid; gap: 18px; align-content: start; }
.planet-list { display: grid; gap: 6px; }
.planet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 14px 16px;
  background: var(--tile-2);
}
.planet strong { font-size: var(--step-lead); font-weight: 600; line-height: 1.2; }
.planet .num { font-size: var(--step-small); color: var(--muted); align-self: center; text-align: right; }
.planet p { grid-column: 1 / -1; }

/* Soleil */
.sun { display: grid; gap: 20px; align-content: start; }
.sun .readout { grid-template-columns: 1fr 1fr; column-gap: 16px; }

/* Calendrier */
.calendar { display: grid; gap: 24px; align-content: start; }
.cal-list { display: grid; gap: 6px; }
.cal-item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: baseline;
  padding: 14px 16px;
  background: var(--tile-2);
}
.cal-date { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--step-small); }
.cal-date { white-space: nowrap; }
.cal-date strong { display: block; font-size: var(--step-body); font-weight: 500; }
.cal-body strong { font-weight: 600; }
.cal-body p { font-size: var(--step-small); color: var(--muted); max-width: 70ch; }
.cal-item[data-visible='true'] .cal-body strong::after {
  content: 'visible d\'ici';
  margin-left: 10px;
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--accent);
}
.cal-item button {
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
  font-size: var(--step-small);
  padding: 8px 0;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .verdict, .strip, .chart, .planets, .calendar { grid-column: span 12; }
  .moon, .sun { grid-column: span 6; }
}
@media (max-width: 640px) {
  .moon, .sun { grid-column: span 12; }
  .moon { grid-template-columns: 96px 1fr; }
  .cal-item { grid-template-columns: 1fr; }
  .cal-item button { justify-self: start; }
  .strip-keys { font-size: 13px; }
}

.cal-more { justify-self: start; }
