/* Nouveautés : frise des versions, dans l’esprit des pages de l’app (cartes douces, repères ronds). */

body.updates-page {
  --updates-aside: 176px;
  --updates-gap: 64px;
  --updates-accent: #1f1f1d;
  --updates-gradient: linear-gradient(100deg, #1fa397 0%, #9a63d8 52%, #e0605c 100%);
  --updates-card: #f6f6f4;
  --updates-line: rgba(31, 31, 29, 0.1);
  min-height: 100vh;
  background: #fff;
}

[data-theme="dark"] body.updates-page {
  --updates-accent: #f1efe9;
  --updates-gradient: linear-gradient(100deg, #5bddd3 0%, #c498ec 52%, #f19492 100%);
  --updates-card: #1f1e1b;
  --updates-line: rgba(255, 255, 255, 0.1);
  background: #141412;
}

body.updates-page .site-breadcrumb,
.updates-shell {
  width: min(980px, calc(100vw - var(--content-shell-gutter, 36px)));
}

.updates-shell {
  flex: 1 0 auto;
  margin: 0 auto;
  padding: 32px 0 96px;
}

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

.updates-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: clamp(12px, 3vw, 28px) 0 clamp(56px, 8vw, 88px);
  text-align: center;
}

/* La roue seule, sans tuile : une ombre portée très légère la détache du fond. */
.updates-mark {
  display: block;
  margin-bottom: 24px;
}

.updates-mark img {
  display: block;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 14px 24px rgba(31, 31, 29, 0.16));
}

[data-theme="dark"] .updates-mark img {
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.55));
}

.updates-kicker {
  margin: 0 0 10px;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 500;
}

html body:not(.home-page) .updates-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--heading-ink);
}

.updates-intro {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1875rem;
  line-height: 1.6;
}

/* ── Frise ── */

.updates-entry {
  position: relative;
  display: grid;
  grid-template-columns: var(--updates-aside) minmax(0, 1fr);
  column-gap: var(--updates-gap);
  padding-bottom: 44px;
}

/* Fil vertical et repère de chaque version. */
.updates-entry::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--updates-aside) + var(--updates-gap) / 2 - 1px);
  width: 2px;
  background: var(--updates-line);
}

.updates-entry:first-of-type::before {
  top: 22px;
  background: linear-gradient(180deg, var(--updates-accent), var(--updates-line) 220px);
}

.updates-entry:last-of-type::before {
  bottom: auto;
  height: 22px;
}

.updates-entry::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(var(--updates-aside) + var(--updates-gap) / 2 - 7px);
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 3px solid var(--updates-accent);
  border-radius: 50%;
  background: #fff;
}

[data-theme="dark"] .updates-entry::after {
  background: #141412;
}

.updates-entry:first-of-type::after {
  border: 0;
  background: var(--updates-accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--updates-accent) 12%, transparent);
}

.updates-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 8px;
  text-align: right;
}

.updates-date time {
  color: var(--heading-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.updates-date span {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(31, 31, 29, 0.06);
  color: var(--text-strong);
  font-size: 0.75rem;
  font-weight: 600;
}

[data-theme="dark"] .updates-date span {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e2dc;
}

/* ── Cartes ── */

.updates-content {
  padding: 28px 32px 30px;
  border: 1px solid var(--updates-line);
  border-radius: 22px;
  background: var(--updates-card);
}

.updates-entry:first-of-type .updates-content {
  border: 1.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--updates-gradient) border-box;
  box-shadow: 0 28px 64px -34px rgba(31, 31, 29, 0.35);
}

[data-theme="dark"] .updates-entry:first-of-type .updates-content {
  background:
    linear-gradient(#1f1e1b, #1f1e1b) padding-box,
    var(--updates-gradient) border-box;
  box-shadow: none;
}

html body:not(.home-page) .updates-content h2 {
  margin: 0 0 12px;
  color: var(--heading-ink);
  font-size: clamp(1.375rem, 2.8vw, 1.6875rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.updates-summary {
  margin: 0;
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.7;
}

.updates-list {
  display: grid;
  gap: 22px;
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--updates-line);
}

.updates-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
}

.updates-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--updates-line);
  color: #1f1f1d;
  font-size: 0.875rem;
}

.updates-entry:first-of-type .updates-icon {
  background: #f6f6f4;
  box-shadow: none;
}

[data-theme="dark"] .updates-icon,
[data-theme="dark"] .updates-entry:first-of-type .updates-icon {
  background: #050505;
  box-shadow: none;
  color: #fff;
}

html body:not(.home-page) .updates-item h3 {
  margin: 6px 0 6px;
  color: var(--heading-ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.updates-item p {
  margin: 0;
  color: var(--text-body);
  font-size: 0.90625rem;
  line-height: 1.65;
}

[data-theme="dark"] .updates-date time,
[data-theme="dark"] .updates-content h2,
[data-theme="dark"] .updates-item h3 {
  color: #f5f5f2;
}

@media (max-width: 760px) {
  .updates-shell {
    padding-top: 24px;
    padding-bottom: 64px;
  }

  .updates-entry {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 0 36px 30px;
  }

  .updates-entry::before {
    left: 6px;
  }

  .updates-entry::after {
    top: 4px;
    left: 0;
  }

  .updates-date {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 14px;
    padding-top: 0;
    text-align: left;
  }

  .updates-content {
    padding: 22px 20px 24px;
    border-radius: 18px;
  }
}
