/* Atamu Prod: shared layer on top of scrollcraft.css.
   Tokens, site bar, buttons, footer, film player, forms. */

:root {
  --sc-canvas:     #0b0c0e;
  --sc-surface:    #15171b;
  --sc-ink:        #f2f3f5;
  --sc-ink-soft:   #a4adbb;
  --sc-accent:     #a9c6e8;   /* bleu poudre */
  --sc-accent-ink: #0b0c0e;
  --ap-red:        #e5484d;   /* the one red touch: REC */
  --sc-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  --sc-font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --sc-font-mono:    ui-monospace, "SF Mono", Menlo, monospace;
  --ap-bar-h: 56px;
}

/* Light ground, used by editorial and the annex pages' light sections. */
.ap-light {
  --sc-canvas: #f5f6f8; --sc-surface: #ffffff;
  --sc-ink: #0d0e11; --sc-ink-soft: #4d5562;
  --sc-accent: #3f6690; --sc-accent-ink: #ffffff;
  color: var(--sc-ink);
  background: var(--sc-canvas);
}

.sc-display { font-weight: 600; }
.sc-lede { font-weight: 400; }
/* Light-on-dark compensation: a touch more leading and tracking. */
body:not(.ap-light) .sc-body { letter-spacing: 0.002em; line-height: 1.66; }

.ap-skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 200;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  padding: 0.6rem 1rem; border-radius: var(--sc-r-md); text-decoration: none;
}
.ap-skip:focus { top: 1rem; }

/* ------------------------------------------------------------ site bar -- */
.ap-bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  height: var(--ap-bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-5);
  padding-inline: var(--sc-gutter);
  background: color-mix(in oklab, var(--sc-canvas) 62%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sc-hairline);
}
.ap-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; min-height: 44px; }
.ap-brand img { height: 22px; width: auto; }
.ap-brand .ap-brand__word { height: 13px; }
.ap-bar__nav { display: flex; align-items: center; gap: var(--sc-5); }
.ap-bar__link {
  font-size: var(--sc-t-sm); color: var(--sc-ink-soft); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: color var(--sc-d-fast) var(--sc-ease-out);
}
.ap-bar__link:hover, .ap-bar__link[aria-current="page"] { color: var(--sc-ink); }
.ap-narrow { display: none; }
@media (max-width: 760px) { .ap-bar__link--wide { display: none; } }
@media (max-width: 480px) {
  .ap-bar__nav { gap: var(--sc-4); }
  .ap-brand .ap-brand__word { display: none; }
  .ap-wide { display: none; } .ap-narrow { display: inline; }
}
.ap-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* -------------------------------------------------------------- buttons -- */
.ap-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.7rem 1.35rem;
  border-radius: var(--sc-r-pill); border: 0; cursor: pointer;
  font-size: var(--sc-t-sm); font-weight: 500; white-space: nowrap; text-decoration: none;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  box-shadow: var(--sc-e1);
  transition: background-color var(--sc-d-fast) var(--sc-ease-out),
              transform 120ms var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.ap-btn:hover { background: color-mix(in oklab, var(--sc-accent) 86%, white); box-shadow: var(--sc-e2); }
.ap-btn:active { transform: scale(0.97); }
.ap-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ap-btn--small { min-height: 36px; padding: 0.45rem 1rem; }
.ap-btn--ghost {
  background: color-mix(in oklab, var(--sc-ink) 8%, transparent);
  color: var(--sc-ink);
  box-shadow: inset 0 0 0 1px var(--sc-hairline-strong);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ap-btn--ghost:hover { background: color-mix(in oklab, var(--sc-ink) 14%, transparent); }
.ap-btn svg { width: 1em; height: 1em; flex: none; }
@media (max-width: 520px) { .ap-bar .ap-btn { padding-inline: 1rem; } }

/* -------------------------------------------------------------- footer -- */
.ap-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sc-4) var(--sc-6);
  font-size: var(--sc-t-xs); color: var(--sc-ink-soft);
}
.ap-foot a { color: inherit; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ap-foot a:hover { color: var(--sc-ink); }
.ap-foot__links { display: flex; flex-wrap: wrap; gap: 0 var(--sc-5); list-style: none; margin: 0; padding: 0; }

/* -------------------------------------------------------- film player -- */
.ap-film {
  border: 0; padding: 0; margin: auto;
  background: transparent; color: var(--sc-ink);
  max-width: none; max-height: none; width: 100vw; height: 100dvh;
  display: none; place-items: center;
}
.ap-film[open] { display: grid; }
.ap-film::backdrop {
  background: color-mix(in oklab, #050506 88%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.ap-film video {
  max-width: min(92vw, 1600px); max-height: 84dvh;
  border-radius: var(--sc-r-lg); background: #000; box-shadow: var(--sc-e3);
}
.ap-film__close {
  position: fixed; top: max(1rem, env(safe-area-inset-top)); right: var(--sc-gutter);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: color-mix(in oklab, var(--sc-ink) 14%, transparent); color: var(--sc-ink);
  display: grid; place-items: center;
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), transform 120ms var(--sc-ease-out);
}
.ap-film__close:hover { background: color-mix(in oklab, var(--sc-ink) 22%, transparent); }
.ap-film__close:active { transform: scale(0.95); }
.ap-film__title { position: fixed; top: max(1.4rem, env(safe-area-inset-top)); left: var(--sc-gutter); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ap-film[open] video { animation: ap-pop 320ms var(--sc-ease-out); }
}
@keyframes ap-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------- placeholders -- */
/* Visible on purpose: content the owner still has to supply. */
.ap-todo {
  outline: 1px dashed color-mix(in oklab, var(--sc-accent) 70%, transparent);
  outline-offset: 6px; border-radius: var(--sc-r-sm);
}
.ap-todo-tag {
  display: inline-block; font-family: var(--sc-font-mono); font-size: 0.7rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sc-accent); margin-bottom: var(--sc-2);
}

/* ---------------------------------------------------------- red touch -- */
/* The final full stop (or question mark) of every display heading. */
.ap-dot { color: var(--ap-red); }
