.ciel { padding-left: 0; padding-right: 0; }
.ciel-head { display: flex; align-items: center; gap: 4px; padding: 0 var(--pad) 12px 8px; }
.ciel-head h1 { margin: 0; font-size: 22px; }
.back { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.ciel-sky { overflow: hidden; margin: 0 var(--pad); border-radius: 24px; }
.ciel-body { display: grid; gap: 12px; margin-top: 16px; padding: 0 var(--pad); }

/* Série : la carte du haut, toujours de nuit. Son bouton est crème, comme tout bouton sur la nuit
   (l'abricot reste au chiffre de la série, jamais en fond). */
.hero { padding: 20px; border-radius: 24px; background: linear-gradient(160deg, #0B2290, var(--navy) 70%); color: var(--creme); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hero-count { display: grid; margin: 0; }
.hero-count strong { color: rgba(251, 246, 239, .55); font-size: 60px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero.is-lit .hero-count strong { color: var(--abricot); }
.hero-count span { margin-top: 4px; font-size: 17px; font-weight: 600; }
.hero-art svg { display: block; width: 76px; height: 76px; color: rgba(251, 246, 239, .25); }
.hero.is-lit .hero-art svg { filter: drop-shadow(0 0 14px rgba(255, 217, 168, .45)); }
.hero-msg { display: flex; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 16px; background: rgba(251, 246, 239, .08); }
.hero-msg > div { flex: 1; }
.hero-msg p { margin: 0; font-size: 15px; line-height: 1.4; }
.hero-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(251, 246, 239, .12); color: var(--abricot); }
.hero-icon .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.hero-cta {
  width: 100%; min-height: 48px; margin-top: 12px; border-radius: 14px; background: var(--creme); color: var(--navy);
  font-size: 16px; font-weight: 700; box-shadow: 0 4px 0 #C4B49C; transition: transform .08s ease, box-shadow .08s ease;
}
.hero-cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #C4B49C; }

.panel { padding: 18px; border-radius: 18px; background: var(--card); }
.panel h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }

.goal-row { display: flex; justify-content: space-between; align-items: baseline; }
.goal-row h2 { color: var(--muted); }
.goal-count { color: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.goal-name { margin: 0 0 12px; font-size: 19px; font-weight: 600; }

/* Chiffres : 4 tuiles. */
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.figures div { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 16px; background: var(--card); }
.figures dt { order: 2; color: var(--muted); font-size: 13px; }
.figures dd { order: 1; display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figures dd .icon { width: 24px; height: 24px; color: var(--ciel); stroke-width: 2; }

/* Joker : la carte et son statut. */
.joker { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 18px; }
.joker-card .tcard { box-shadow: inset 0 0 0 2px var(--brun), 0 6px 14px rgba(122, 74, 11, .18); }
.joker-card .tcard.is-used { box-shadow: none; }
.joker-text h2 { margin-bottom: 6px; }
.joker-text p { margin: 0; font-size: 15px; line-height: 1.4; }
.joker-text .hint { margin-top: 8px; font-size: 13px; }

/* Calendrier du mois. */
.cal-head { display: flex; justify-content: space-between; align-items: center; }
.cal-head h2 { margin: 0; text-transform: capitalize; }
.cal-nav { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text); }
.cal-nav:not([disabled]):active { background: var(--field); }
.cal-nav[disabled] { opacity: .25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.cal-wd { color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.day { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font-size: 13px; font-variant-numeric: tabular-nums; }
.day b { font-weight: 500; }
.day-done { background: var(--ciel); color: var(--navy); }
.day-done b { font-weight: 700; }
.day-joker { box-shadow: inset 0 0 0 2px var(--ciel); }
.day-cloud { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--card); color: var(--ciel); }
.day-cloud .icon { width: 14px; height: 14px; fill: currentColor; stroke-width: 1.4; }
/* Raté : un rond en pointillés, comme le joker posé ; un disque pâle ne se voyait pas. */
.day-missed { color: var(--muted); border: 1.5px dashed var(--muted); }
.day-pending { box-shadow: inset 0 0 0 1.5px var(--ring); }
.day-none, .day-future { color: var(--muted); opacity: .45; }
.day.is-today { outline: 2px solid var(--abricot); outline-offset: 2px; }
.dot { display: inline-block; width: 12px; aspect-ratio: 1; border-radius: 50%; }
.dot-done { background: var(--ciel); }
.dot-joker { box-shadow: inset 0 0 0 2px var(--ciel); }
.dot-missed { border: 1.5px dashed var(--muted); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.legend .dot { margin-left: 10px; }
.legend .dot:first-child { margin-left: 0; }

/* Paliers : un succès par ligne. */
.achievements { display: grid; gap: 16px; margin: 4px 0 0; padding: 0; list-style: none; }
.ach { display: flex; align-items: center; gap: 14px; }
.ach-tile { display: grid; flex: none; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--field); color: var(--muted); }
.ach-tile .icon { width: 28px; height: 28px; }
.ach.is-on .ach-tile { box-shadow: 0 3px 0 rgba(3, 17, 87, .22); }
.ach-ciel .ach-tile { background: var(--ciel); color: var(--navy); }
.ach-abricot .ach-tile { background: var(--abricot); color: var(--brun); }
.ach-nuit .ach-tile { background: var(--night-tile); color: var(--abricot); }
.ach-nuit .ach-tile .icon { fill: currentColor; }
.ach-aurore .ach-tile { background: linear-gradient(150deg, #2BD2C8, #3DDC97 45%, #8B5CF6); color: var(--navy); }
.ach-body { flex: 1; min-width: 0; }
.ach-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ach-row strong { font-size: 15px; font-weight: 600; }
.ach-row span { color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ach .bar { height: 8px; margin: 6px 0 5px; }
.ach .bar span { min-width: 0; }
.ach-body p { margin: 0; color: var(--muted); font-size: 13px; }

.stock-left { margin-bottom: 4px; font-size: 20px; font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; }
.row { display: grid; gap: 8px; margin-top: 12px; }
.setting { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.setting input { padding: 8px 12px; border: 0; border-radius: 12px; background: var(--field); color: var(--text); font: 600 18px 'Inter', sans-serif; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--field); }
.segmented button { min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 15px; font-weight: 600; transition: background .15s ease, color .15s ease; }
.segmented button[aria-checked="true"] { background: var(--btn-bg); color: var(--btn-text); }
