/* Chronolith : la page de présentation, posée sur /home.css (l'en-tête et le pied de page de FunArena).
   Palette tirée des illustrations du jeu : briques du labo au crépuscule, or du logo, lueur cyan du portail. */

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/cinzel-latin.woff2") format("woff2");
}

:root {
  --chr-panel: rgba(20, 13, 12, 0.82);
  --chr-line: rgba(240, 184, 82, 0.26);
  --chr-line-soft: rgba(240, 184, 82, 0.14);
  --chr-gold: #f0b852;
  --chr-gold-soft: #ffdc94;
  --chr-gold-deep: #c27a1c;
  --chr-cyan: #3fdcff;
  --chr-cyan-soft: #a6f0ff;
  --chr-cream: #f6ecd9;
  --chr-text: #ddd2c2;
  --chr-muted: #a59a8c;
  --chr-serif: "Cinzel", "Trajan Pro", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body.chronolith {
  background:
    radial-gradient(1000px 560px at 70% -6%, rgba(63, 220, 255, 0.12), transparent 62%),
    radial-gradient(900px 620px at 6% 40%, rgba(150, 70, 160, 0.1), transparent 60%),
    radial-gradient(1000px 640px at 94% 82%, rgba(240, 150, 60, 0.09), transparent 60%),
    linear-gradient(180deg, #08060c, #120c0e 46%, #0a0709);
  color: var(--chr-text);
}

.chronolith .bg-grid {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 210, 140, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 210, 140, 0.06) 1px, transparent 1px);
}

.chronolith .site-header,
.chronolith .site-footer {
  border-color: var(--chr-line);
  background: rgba(14, 9, 10, 0.82);
}

.chronolith .brand {
  color: var(--chr-cream);
}

.chronolith .site-header nav a {
  color: var(--chr-text);
}

.chronolith .site-header nav a:hover,
.chronolith .footer-links a:hover {
  color: var(--chr-gold-soft);
}

.chronolith .site-footer {
  color: var(--chr-muted);
}

.chronolith .footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chronolith .footer-links a {
  color: var(--chr-text);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: #000;
  color: var(--chr-cream);
}

.skip:focus {
  left: 12px;
}

main {
  display: block;
}

/* ---------- Le haut de page ---------- */

/* L'illustration du labo, entière (3,1:1), en haut du cadre ; le logo se pose sur le sol, le texte dessous. */
.chr-hero {
  --hero-w: min(1120px, 94vw);
  --hero-h: calc(var(--hero-w) / 3.097);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: var(--hero-w);
  margin: 20px auto 0;
  border: 1px solid var(--chr-line);
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  background:
    radial-gradient(700px 260px at 50% var(--hero-h), rgba(63, 220, 255, 0.1), transparent 70%),
    #0b0810;
}

.chr-hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--hero-h);
  z-index: -2;
  background: url("img/hero.jpg") center top / 100% auto no-repeat;
}

.chr-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(var(--hero-h) + 2px);
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 8, 16, 0) 55%, rgba(11, 8, 16, 0.55) 78%, #0b0810 100%);
}

.chr-hero-inner {
  padding: calc(var(--hero-h) * 0.84) 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chr-kicker {
  margin: 0;
  color: var(--chr-cyan-soft);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.chr-hero h1 {
  order: -1;
  margin: 0 0 12px;
  line-height: 0;
}

.chr-logo {
  width: min(640px, 82vw);
  height: auto;
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 30px rgba(255, 180, 70, 0.18));
}

.chr-sub {
  margin: 14px 0 0;
  padding-left: 0.26em;
  color: var(--chr-gold-soft);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-family: var(--chr-serif);
  font-weight: 600;
  font-size: clamp(0.82rem, 1.7vw, 1.05rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.chr-lead {
  max-width: 700px;
  margin: 18px 0 0;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--chr-cream);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.chr-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
  flex: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--chr-gold-soft), var(--chr-gold) 55%, var(--chr-gold-deep));
  color: #241404;
  box-shadow: 0 10px 28px rgba(240, 170, 60, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(240, 170, 60, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-ghost {
  background: rgba(10, 8, 14, 0.6);
  border-color: rgba(166, 240, 255, 0.5);
  color: var(--chr-cream);
}

.btn-ghost:hover {
  border-color: var(--chr-cyan);
  color: var(--chr-cyan-soft);
}

.btn-soon {
  background: rgba(10, 8, 14, 0.66);
  border-color: rgba(240, 184, 82, 0.55);
  color: var(--chr-gold-soft);
  cursor: default;
}

.chips {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--chr-line);
  background: rgba(12, 8, 12, 0.7);
  color: var(--chr-text);
  font-size: 0.88rem;
}

.chip em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chr-muted);
}

/* ---------- Les sections ---------- */

.chr-section {
  width: min(1120px, 94vw);
  margin: 56px auto 0;
}

.chr-section h2 {
  margin: 0 0 20px;
  font-family: var(--chr-serif);
  font-size: clamp(1.3rem, 2.7vw, 1.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chr-cream);
}

.chr-section h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--chr-gold), rgba(63, 220, 255, 0.7), transparent);
}

.chr-card {
  padding: 24px;
  border: 1px solid var(--chr-line);
  border-radius: 14px;
  background: var(--chr-panel);
}

.chr-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--chr-cream);
}

.chr-card p {
  margin: 0;
  line-height: 1.65;
  color: var(--chr-text);
}

.chr-intro {
  max-width: 760px;
  margin: -4px 0 22px;
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--chr-text);
}

.chr-note {
  margin: 0 0 4px;
  color: var(--chr-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Le professeur ---------- */

.story {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: stretch;
}

.story-art {
  display: grid;
  gap: 14px;
}

.story-art figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--chr-line);
  border-radius: 14px;
  background: #0b0810;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.story-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.story-art figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 10px;
  background: linear-gradient(180deg, transparent, rgba(6, 4, 6, 0.9));
  color: var(--chr-cream);
  font-size: 0.86rem;
}

.story-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.story-text {
  font-size: 1.06rem;
  line-height: 1.75 !important;
  color: var(--chr-cream) !important;
}

.quote {
  margin: 6px 0 0;
  padding: 16px 20px;
  border-left: 3px solid var(--chr-cyan);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(63, 220, 255, 0.09), rgba(63, 220, 255, 0));
}

.quote p {
  font-family: Georgia, "Palatino Linotype", serif;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--chr-cyan-soft) !important;
}

.quote footer {
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--chr-muted);
}

.quote footer::before {
  content: "— ";
}

/* ---------- Comment on joue ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.steps .icon {
  display: block;
  margin-bottom: 14px;
  color: var(--chr-gold);
  filter: drop-shadow(0 0 10px rgba(240, 184, 82, 0.35));
}

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.facts li {
  padding: 18px 10px 16px;
  text-align: center;
  border: 1px solid var(--chr-line);
  border-radius: 12px;
  background: rgba(20, 13, 12, 0.72);
}

.facts b {
  display: block;
  font-family: var(--chr-serif);
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--chr-gold-soft);
  white-space: nowrap;
}

.facts span {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--chr-muted);
}

/* ---------- Les dix époques ---------- */

.epochs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.epoch {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--chr-line);
  border-radius: 14px;
  background: var(--chr-panel);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.epoch:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 184, 82, 0.5);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.epoch-art {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #120c0e;
}

.epoch-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.epoch:hover .epoch-art img {
  transform: scale(1.05);
}

.epoch-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 13, 12, 0) 60%, rgba(20, 13, 12, 0.85) 100%);
}

.epoch-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 220, 148, 0.6);
  background: rgba(12, 8, 10, 0.72);
  font-family: var(--chr-serif);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--chr-gold-soft);
  backdrop-filter: blur(4px);
}

.epoch-body {
  position: relative;
  padding: 18px 20px 20px 16px;
}

.epoch-date {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chr-cyan-soft);
}

.epoch h3 {
  margin: 4px 0 10px;
  font-family: var(--chr-serif);
  font-size: 1.16rem;
  color: var(--chr-cream);
}

.epoch-meca {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #241404;
  background: linear-gradient(120deg, var(--chr-gold-soft), var(--chr-gold));
}

.epoch p.epoch-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--chr-text);
}

/* ---------- La galerie ---------- */

.shots {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shots li:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.shots a {
  position: relative;
  display: block;
  overflow: hidden;
  height: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--chr-line);
  border-radius: 10px;
  background: #000;
}

.shots img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.shots a:hover img,
.shots a:focus-visible img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.shots span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 12px 9px;
  background: linear-gradient(180deg, transparent, rgba(6, 4, 6, 0.88));
  color: var(--chr-cream);
  font-size: 0.84rem;
  line-height: 1.3;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--chr-cyan);
  outline-offset: 3px;
}

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--chr-cream);
}

.lightbox::backdrop {
  background: rgba(6, 4, 6, 0.94);
}

.lightbox figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4vh 70px;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border: 1px solid var(--chr-line);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
}

.lightbox figcaption {
  text-align: center;
  font-size: 0.98rem;
}

.lb-count {
  margin-left: 8px;
  color: var(--chr-muted);
}

.lb-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--chr-line);
  background: rgba(14, 9, 10, 0.82);
  color: var(--chr-cream);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.lb-btn:hover {
  border-color: var(--chr-gold);
  color: var(--chr-gold-soft);
}

.lb-close {
  top: 18px;
  right: 18px;
}

.lb-prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Steam ---------- */

#steam {
  margin-bottom: 44px;
}

.wish {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 28px 30px;
  border-color: rgba(240, 184, 82, 0.45);
  background:
    radial-gradient(500px 220px at 0% 50%, rgba(63, 220, 255, 0.12), transparent 70%),
    radial-gradient(600px 260px at 100% 50%, rgba(240, 160, 60, 0.12), transparent 70%),
    var(--chr-panel);
}

.wish-emblem {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 0 24px rgba(63, 220, 255, 0.4));
  animation: chr-spin 60s linear infinite;
}

@keyframes chr-spin {
  to {
    transform: rotate(360deg);
  }
}

.wish h2 {
  margin-bottom: 10px;
}

.wish h2::after {
  display: none;
}

.wish-body p {
  max-width: 560px;
}

/* ---------- Apparition douce (seulement si le script tourne) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .chr-hero::before,
  .wish-emblem {
    animation: none;
  }

  .shots img,
  .epoch,
  .epoch-art img,
  .btn {
    transition: none;
  }
}

/* ---------- Petits écrans ---------- */

@media (max-width: 960px) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .steps,
  .story {
    grid-template-columns: 1fr;
  }

  .story-art img {
    aspect-ratio: 16 / 10;
    object-position: 50% 45%;
  }

  .chr-hero {
    --hero-h: calc(var(--hero-w) * 0.56);
  }

  .chr-hero::before {
    background-size: cover;
    background-position: 64% top;
  }

  .chr-hero-inner {
    padding: calc(var(--hero-h) * 0.82) 18px 30px;
  }

  .epochs {
    grid-template-columns: 1fr;
  }

  .shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wish {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .shots li:first-child {
    grid-column: span 2;
    grid-row: auto;
  }

  .lightbox figure {
    padding: 8vh 14px 14px;
  }

  .lb-prev {
    top: auto;
    bottom: 14px;
    left: 14px;
    transform: none;
  }

  .lb-next {
    top: auto;
    bottom: 14px;
    right: 14px;
    transform: none;
  }
}

@media (max-width: 520px) {
  .epoch {
    grid-template-columns: 1fr;
  }

  .epoch-art {
    aspect-ratio: 16 / 9;
  }

  .epoch-art::after {
    background: linear-gradient(180deg, rgba(20, 13, 12, 0) 55%, rgba(20, 13, 12, 0.9) 100%);
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .shots {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .shots li:first-child {
    grid-column: span 2;
  }

  .shots span {
    font-size: 0.72rem;
    padding: 20px 8px 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .btn {
    width: 100%;
  }

  .chr-actions {
    width: 100%;
  }

  .chr-lead {
    font-size: 1rem;
  }
}

/* Bande-annonce */
.trailer {
  overflow: hidden;
  border: 1px solid var(--chr-line);
  border-radius: 12px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(63, 220, 255, 0.06);
}

.trailer video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

.trailer p {
  margin: 0;
  padding: 18px;
  color: var(--chr-text);
}

.trailer {
  position: relative;
}

.trailer-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(6, 4, 6, 0) 55%, rgba(6, 4, 6, 0.35));
  cursor: pointer;
}

.trailer-play[hidden] {
  display: none;
}

.trailer-play span {
  position: relative;
  width: clamp(64px, 10vw, 104px);
  aspect-ratio: 1;
  border: 3px solid var(--chr-gold);
  border-radius: 50%;
  background: rgba(12, 8, 10, 0.6);
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.25), 0 0 40px rgba(240, 184, 82, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.trailer-play span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.95em 0 0.95em 1.6em;
  border-color: transparent transparent transparent var(--chr-cream);
  font-size: clamp(14px, 2.1vw, 22px);
}

.trailer-play:hover span,
.trailer-play:focus-visible span {
  transform: scale(1.08);
  background: rgba(40, 24, 10, 0.75);
}
