/* Alpine shell — DA_SUMMIT.md and the October 7–8 Alpine/Pico references.
   Page decoration uses the source landscape; controls remain real HTML. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./media/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./media/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --page: #f4f7fa;
  --cream: var(--page);
  --ink: #14263a;
  --muted: #596b7d;
  --blue: #2463d6;
  --gold: #856b38;
  --shell-width: 1240px;
  --shell-gutter: 32px;
  --bottom-nav-space: 0px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse 820px 520px at 88% 0, #75a7ff22, transparent 72%),
    radial-gradient(ellipse 540px 380px at 4% 440px, #75a7ff0e, transparent 72%),
    var(--page);
}
body[data-view="session"], body[data-view="exercises"] {
  background: radial-gradient(ellipse 600px 340px at 90% 0, #75a7ff12, transparent 72%), var(--page);
}

.alpine-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 440px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  pointer-events: none;
  user-select: none;
}
.alpine-landscape { display: block; height: 100%; }
.alpine-landscape img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right top;
}
.alpine-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f4f7fafc 0%, #f4f7faf5 24%, #f4f7fa9c 45%, #f4f7fa00 74%);
}
body:not([data-view="today"]) .alpine-backdrop { display: none; }

/* Même fond d’en-tête qu’Aujourd’hui sur les destinations principales. */
body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-backdrop {
  display: block;
  height: 400px;
  mask-image: linear-gradient(#000 62%, transparent 100%);
}
body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-landscape img {
  height: auto;
  min-height: 100%;
  transform: translateY(-108px);
}
body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-backdrop::after {
  background: linear-gradient(90deg, #f4f9fdfc 0%, #f4f9fdf5 24%, #f4f9fdb3 46%, #f4f9fd00 75%);
}
html[data-today-theme="dark"] body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-landscape img {
  filter: brightness(.48) saturate(.85);
}
html[data-today-theme="dark"] body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-backdrop::after {
  background: linear-gradient(90deg, #051b28ee, #051b2899 40%, #051b2800 75%);
}

.profile-avatar img, .profile-photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-photo-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px 24px; align-items: start; }
.profile-photo-card > h2 { grid-column: 1 / -1; margin: 0; }
.profile-photo-preview { width: 96px; height: 96px; overflow: hidden; border-radius: 50%; background: #eaf1ff; }
.profile-photo-preview::before { content: ""; display: block; width: 100%; height: 100%; background: var(--muted); mask: url("./media/icons/user-circle.svg") center / 80px no-repeat; }
.profile-photo-preview.has-photo::before { display: none; }
.profile-photo-controls { min-width: 0; }
.profile-photo-controls input { max-width: 100%; font-size: 14px; }
.profile-photo-controls input::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 0; border-radius: 8px; background: #eaf1ff; color: var(--blue); font: inherit; cursor: pointer; }
.profile-photo-controls [role="status"]:empty { display: none; }
@media (max-width: 500px) {
  .profile-photo-card { grid-template-columns: 1fr; gap: 16px; }
}

main {
  position: relative;
  max-width: calc(var(--shell-width) + 2 * var(--shell-gutter));
  margin: 0 auto;
  padding: 32px var(--shell-gutter) calc(64px + var(--bottom-nav-space));
}
main:focus { outline: none; }
main > .hero {
  overflow: visible;
  min-height: 280px;
  padding: 28px 0 32px;
  margin-bottom: 24px;
  border-radius: 0;
  background: transparent;
}
.hero .copy { max-width: 470px; }
.hero .copy h1 { max-width: 470px; }
.hero p { max-width: 350px; }
.hero .copy > .eyebrow { color: var(--muted); }
.exercise-library-link { flex-shrink: 0; }
.skip { z-index: 10; }
#notice { bottom: calc(22px + var(--bottom-nav-space)); }

@media (min-width: 761px) and (max-width: 1100px) {
  :root { --shell-gutter: 24px; }
}

@media (max-width: 760px) {
  :root { --shell-gutter: 16px; }
  .alpine-backdrop { top: 40px; height: 330px; mask-image: linear-gradient(to bottom, #000 35%, transparent 95%); }
  .alpine-landscape img { object-position: right top; }
  .alpine-backdrop::after { background: linear-gradient(90deg, #f4f7fafc 0%, #f4f7fae6 30%, #f4f7fa9c 56%, #f4f7fa00 90%); }
  body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-backdrop {
    top: 0;
    height: 220px;
    mask-image: linear-gradient(#000 50%, transparent 100%);
  }
  body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-landscape img {
    height: 100%;
    min-height: 0;
    transform: none;
  }
  body:is([data-view="today"], [data-view="nutrition"], [data-view="progress"], [data-view="coach"], [data-view="profile"], [data-view="memory"], [data-view="session"], [data-session-v2]) .alpine-backdrop::after {
    background: linear-gradient(90deg, #f4f9fde6 0%, #f4f9fd55 55%, transparent 95%);
  }
  main { padding-top: 16px; }
  main > .hero { min-height: 245px; padding: 18px 0 24px; margin-bottom: 16px; }
  .hero .copy, .hero .copy h1 { max-width: 310px; }
  .hero .copy h1 { font-size: 30px; line-height: 1.2; }
  .hero p { max-width: 260px; }
  .hero .copy > .eyebrow { font-size: 11px; letter-spacing: .9px; }
  .section-head:has(.exercise-library-link) { flex-wrap: wrap; gap: 12px; }
}

@media (forced-colors: active) {
  body .alpine-backdrop { display: none !important; }
}
/* Keep cached account content concealed until access has been checked. */
body[data-auth="checking"] .app-header,body[data-auth="checking"] #main,body[data-auth="checking"] #notice{visibility:hidden}
