/* =============================================================
   Durée du jour — Météo Sevy
   Bloc ajouté sous le graphe lunaire (page Lune · Éphémérides).
   Réutilise les variables et les cartes de meteo-lune.css.
   ============================================================= */

.sun-section { margin-top: clamp(2.5rem, 6vw, 4rem); }

.sun-title { margin-bottom: 1.2rem; }

/* ── Chiffres du jour ──────────────────────────────────────── */
.sun-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.sun-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.9rem 1rem;
    background: var(--moon-card);
    border: 1px solid var(--moon-card-bd);
    border-radius: 14px;
    backdrop-filter: blur(6px);
}

.sun-stat-lbl {
    color: var(--moon-text-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sun-stat-val {
    color: var(--moon-text);
    font-family: var(--font-display, 'Spectral', serif);
    font-size: clamp(1.3rem, 3.2vw, 1.8rem);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.sun-stat-sub { color: var(--moon-text-dim); font-size: 0.78rem; }

/* ── Graphe ────────────────────────────────────────────────── */
.sun-graph { position: relative; }

.sun-axis-lbl { text-transform: none; }

.sun-today-lbl { fill: var(--moon-gold, #f5b82e); font-size: 13px; font-family: var(--font-mono, monospace); letter-spacing: 0.04em; }

.sun-ext-lbl { fill: var(--moon-text, #eef2f8); font-size: 13px; font-family: var(--font-mono, monospace); opacity: 0.85; }

.sun-tip {
    position: absolute;
    z-index: 2;
    min-width: 190px;
    padding: 0.7rem 0.85rem;
    background: rgba(9, 14, 26, 0.94);
    border: 1px solid var(--moon-card-bd);
    border-radius: 12px;
    color: var(--moon-text);
    font-size: 0.82rem;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.sun-tip strong { display: block; margin-bottom: 0.4rem; font-weight: 600; text-transform: capitalize; }
.sun-tip span   { display: flex; justify-content: space-between; gap: 1.2rem; line-height: 1.6; }
.sun-tip i      { font-style: normal; color: var(--moon-text-dim); }
.sun-tip b      { font-weight: 600; font-variant-numeric: tabular-nums; }

.sun-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    margin-top: 0.4rem;
    color: var(--moon-text-dim);
    font-size: 0.78rem;
}
.sun-legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.sun-legend i    { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }

/* ── Sous le graphe ────────────────────────────────────────── */
.sun-extremes, .sun-note {
    text-align: center;
    color: var(--moon-text-dim);
    font-size: 0.85rem;
    margin: 1rem 0 0;
}
.sun-extremes b { color: var(--moon-text); font-weight: 600; }
.sun-note { font-size: 0.74rem; opacity: 0.8; margin-top: 0.6rem; }

.sun-table { margin: 1.2rem auto 0; max-width: 640px; }
.sun-table summary {
    cursor: pointer;
    text-align: center;
    color: var(--moon-text-dim);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.sun-table summary:hover, .sun-table summary:focus-visible { color: var(--moon-text); }
.sun-table table {
    width: 100%;
    margin-top: 0.9rem;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}
.sun-table th, .sun-table td { padding: 0.45rem 0.6rem; text-align: right; border-bottom: 1px solid var(--moon-card-bd); }
.sun-table th:first-child { text-align: left; }
.sun-table thead th { color: var(--moon-text-dim); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.sun-table tbody th { font-weight: 500; color: var(--moon-text); text-transform: capitalize; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 760px) {
    .sun-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Graphe étroit (viewBox 560) : tailles exprimées en unités du viewBox. */
.sun-narrow .sun-axis-lbl  { font-size: 17px; }
.sun-narrow .sun-today-lbl { font-size: 17px; }

.sun-table th:first-child { white-space: nowrap; }

/* Correctif : .moon-page (width 100 % + padding, en content-box) débordait de
   ~24 px sur mobile et créait un défilement horizontal. Supprimer cette règle
   pour revenir au comportement d'origine. */
.moon-page { box-sizing: border-box; }
