/* =========================================================================
   Moments — onglet « Aujourd'hui »
   Rétrospective du jour : en-tête, sélecteur de période, sections par enfant.
   La grille de médias réutilise .media-group / .media-container / .media-info
   de styles.css, pour que les vignettes soient identiques à la galerie.
   ========================================================================= */

.today-container {
  --warn-soft: #fff4e0;
  --warn-line: #f5d9a6;
  --warn-dark: #9a5b00;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--content-top) + 20px) 20px 32px;
}

/* ---- En-tête ---------------------------------------------------------------- */

.today-hero {
  position: relative;
  margin: 0 0 16px;
  padding: 24px 26px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.today-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-grad);
}
.today-hero[hidden] { display: none; }

.today-eyebrow {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 36px;
  line-height: 1.15;
  color: var(--brand-dark);
}

.today-date {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
}
.today-date::first-letter { text-transform: uppercase; }

.today-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.today-summary {
  display: inline-block;
  margin: 0;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13.5px;
  font-weight: 700;
}
.today-summary:empty { display: none; }

.today-widen-badge {
  display: inline-block;
  margin: 0;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--warn-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.today-widen-badge[hidden] { display: none; }

/* Encart bien visible : la date exacte est vide, on montre les jours voisins. */
.today-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 560px;
  margin: 14px auto 0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--warn-dark);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
}
.today-note i { flex: 0 0 auto; margin-top: 2px; font-size: 14px; }
.today-note[hidden] { display: none; }

/* Sur chaque vignette : écart avec la date exacte (mode élargi uniquement). */
.today-offset {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--warn-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.today-offset::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 6px;
  font-size: 11px;
}
.today-offset--before::before { content: '\f060'; } /* flèche gauche */
.today-offset--after::before  { content: '\f061'; } /* flèche droite */

/* ---- Sélecteur de période ---------------------------------------------------- */

.today-years-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 4px 2px;
}
.today-years-wrap[hidden] { display: none; }

.today-years-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.today-years {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.today-year-chip {
  flex: none;
  padding: 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.today-year-chip:hover {
  border-color: #c9d6e4;
  color: var(--ink);
  transform: translateY(-1px);
}
.today-year-chip.is-active,
.today-year-chip[aria-selected="true"] {
  border-color: transparent;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(49, 135, 195, 0.8);
}

/* ---- États ------------------------------------------------------------------ */

.today-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.today-loading[hidden] { display: none; }
.today-loading i { color: var(--brand); }

.today-empty { margin: 24px auto; }
.today-empty[hidden] { display: none; }

/* ---- Sections par enfant ----------------------------------------------------- */

.today-grid { padding: 0; }

.today-baby { margin: 0 0 10px; }

.today-baby-head {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 2px 4px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.today-baby-head > i { font-size: 13px; color: var(--brand); }

.today-baby-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.today-baby-age {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12.5px;
  font-weight: 700;
}

.today-baby-family {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.today-baby-family::before { content: '· '; }

/* ---- Mobile ------------------------------------------------------------------ */

@media (max-width: 600px) {
  .today-container { padding: calc(var(--content-top) + 12px) 12px 20px; }

  .today-hero { margin-bottom: 12px; padding: 18px 16px 16px; border-radius: 14px; }
  .today-eyebrow { font-size: 28px; }
  .today-date { margin-top: 4px; font-size: 14px; }
  .today-chips { margin-top: 10px; gap: 6px; }
  .today-summary { font-size: 12.5px; padding: 4px 12px; }
  .today-widen-badge { font-size: 12px; padding: 4px 10px; }
  .today-note { font-size: 12.5px; padding: 8px 12px; margin-top: 10px; }
  .today-offset { top: 8px; left: 8px; font-size: 11px; padding: 3px 8px; }

  .today-years-wrap { gap: 8px; }
  .today-years-label { display: none; }
  .today-years {
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
  }
  .today-years::-webkit-scrollbar { display: none; }
  .today-year-chip { padding: 7px 15px; font-size: 13.5px; }

  .today-baby-head { margin: 10px 0 0 2px; padding: 6px 12px; gap: 8px; }
  .today-baby-name { font-size: 14px; }
  .today-baby-age { font-size: 11.5px; padding: 2px 8px; }
  .today-baby-family { font-size: 11.5px; }

  .today-loading { margin: 28px 0; font-size: 14px; }
}
