@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
}

:root {
  --ostia-core-bg: #020617;
  --ostia-core-text: #f8fafc;
  --ostia-core-muted: #94a3b8;
  --ostia-core-accent: #34d399;
  --ostia-core-border: rgba(255, 255, 255, 0.1);
}

/* Fond de nuit garanti : les pages qui ne chargent que ce socle (sans
   ostia-shell.css ni style Tailwind inline) doivent rester sombres. */
body {
  background: var(--ostia-core-bg);
  color: var(--ostia-core-text);
}

.ostia-skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  color: #020617;
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.ostia-skip-link:focus { transform: translateY(0); }

.ostia-main-nav {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  padding: 1rem 1.25rem;
  pointer-events: none;
}

.ostia-nav-inner {
  width: min(1280px, 100%);
  min-height: 4.25rem;
  margin: 0 auto;
  padding: 0.65rem 0.8rem 0.65rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: 1px solid var(--ostia-core-border);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  pointer-events: auto;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ostia-nav-scrolled .ostia-nav-inner {
  background: rgba(2, 6, 23, 0.94);
  border-color: rgba(255, 255, 255, 0.16);
}

.ostia-brand {
  flex: 0 0 auto;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.ostia-brand span,
.ostia-footer-brand span { color: var(--ostia-core-accent); }

.ostia-nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.8rem, 1.4vw, 1.45rem);
}

.ostia-nav-links a {
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.ostia-nav-links a:hover,
.ostia-nav-links a.is-current { color: #fff; }

.ostia-nav-links a.is-current { text-decoration: underline; text-underline-offset: 0.35rem; }

.ostia-nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.ostia-demo-button {
  min-height: 2.9rem;
  padding: 0 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #020617;
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.ostia-burger {
  width: 2.9rem;
  height: 2.9rem;
  display: none;
  place-items: center;
  gap: 0.24rem;
  padding: 0.72rem;
  border: 1px solid var(--ostia-core-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.ostia-burger span {
  width: 100%;
  height: 1px;
  display: block;
  background: #fff;
}

.ostia-mobile-menu {
  position: fixed;
  z-index: 110;
  inset: 0;
  padding: 6rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0.45rem;
  overflow-y: auto;
  background: rgba(2, 6, 23, 0.98);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.75rem);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.ostia-mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.ostia-close-menu {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--ostia-core-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
}

.mobile-link {
  padding: 0.78rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: clamp(1.05rem, 5vw, 1.45rem);
  font-weight: 800;
  text-decoration: none;
}

body.ostia-menu-open { overflow: hidden; }

.ostia-footer {
  position: relative;
  z-index: 2;
  padding: 4rem 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #020617;
  color: var(--ostia-core-muted);
}

.ostia-footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(145px, 1fr));
  gap: 2.25rem;
}

.ostia-footer-brand { color: #fff; font-size: 1.55rem; font-weight: 900; }
.ostia-footer-description { max-width: 30rem; line-height: 1.7; }
.ostia-footer-title { margin: 0 0 1rem; color: #fff; font-size: 0.8rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; }
.ostia-footer-list { margin: 0; padding: 0; display: grid; gap: 0.7rem; list-style: none; }
.ostia-footer-list a { color: #94a3b8; text-decoration: none; }
.ostia-footer-list a:hover { color: #fff; }
.ostia-footer-copy { width: min(1180px, 100%); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.78rem; }

@media (max-width: 1020px) {
  .ostia-nav-links { display: none; }
  .ostia-nav-actions { margin-left: auto; }
  .ostia-burger { display: grid; }
  .ostia-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ostia-main-nav { padding: 0.75rem; }
  .ostia-nav-inner { min-height: 3.9rem; padding: 0.45rem 0.5rem 0.45rem 1rem; }
  .ostia-demo-button { display: none; }
  .ostia-footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ostia-mobile-menu,
  .ostia-nav-inner,
  .ostia-skip-link { transition: none; }
}

/* ============================================================
   Raccord cinématographique entre les pages (View Transitions).
   Cross-document : chaque page doit porter cette règle pour que
   la navigation fonde d'un plan à l'autre au lieu de couper au
   blanc. Enhancement progressif — les navigateurs sans support
   ignorent tout le bloc, et prefers-reduced-motion le désactive.
   La nav épinglée garde son propre nom : identique d'une page à
   l'autre, elle reste immobile pendant que le plan change.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  .ostia-main-nav {
    view-transition-name: ostia-nav;
  }

  ::view-transition-old(root) {
    animation: ostia-vt-out 0.34s cubic-bezier(0.55, 0, 1, 0.45) both;
  }

  ::view-transition-new(root) {
    animation: ostia-vt-in 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  @keyframes ostia-vt-out {
    to {
      opacity: 0;
      transform: translateY(-0.8vh) scale(0.994);
      filter: brightness(0.6);
    }
  }

  @keyframes ostia-vt-in {
    from {
      opacity: 0;
      transform: translateY(1.1vh) scale(1.004);
      filter: brightness(1.18) saturate(1.05);
    }
  }
}

/* Nav cinéma : la pilule s'efface au scroll descendant (posée par
   ostia-core.js), revient dès qu'on remonte. Même langage que le shell. */
.ostia-main-nav {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.ostia-main-nav.ostia-nav-veiled {
  transform: translateY(-118%);
  opacity: 0;
  pointer-events: none;
}

body.ostia-menu-open .ostia-main-nav.ostia-nav-veiled {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .ostia-main-nav {
    transition: none;
  }
}
