/*
Theme Name: YR Astro Nuit
Theme URI: https://www.yr-astro.fr/
Description: Refonte nocturne sur mesure de YR Astro. Thème enfant du thème Variations.
Author: YR Astro
Version: 2.1.0
Template: variations
Text Domain: yr-astro-nuit
*/

:root {
  --yr-navy: #07111f;
  --yr-blue: #102a43;
  --yr-blue-soft: #173b5e;
  --yr-amber: #f2a65a;
  --yr-ivory: #f6f2e8;
  --yr-muted: #a8b3c2;
  --yr-line: rgba(246, 242, 232, 0.16);
  --yr-radius: 16px;
  --yr-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

html { scroll-behavior: smooth; }

body {
  background: var(--yr-navy);
  color: var(--yr-ivory);
}

.wp-site-blocks { position: relative; z-index: 1; }

body::before {
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.17) 0 1px, transparent 1.4px),
    radial-gradient(circle at 72% 28%, rgba(255,255,255,.12) 0 1px, transparent 1.4px),
    radial-gradient(circle at 45% 78%, rgba(255,255,255,.10) 0 1px, transparent 1.4px);
  background-size: 220px 220px, 310px 310px, 390px 390px;
  content: "";
  inset: 0;
  opacity: .25;
  pointer-events: none;
  position: fixed;
  z-index: -1;
  animation: yr-star-drift 90s linear infinite;
}

body::after {
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, .14), transparent 34%),
    radial-gradient(circle at 85% 65%, rgba(242, 166, 90, .08), transparent 30%);
  content: "";
  inset: -20%;
  pointer-events: none;
  position: fixed;
  transform: translate3d(0, 0, 0);
  z-index: -2;
  animation: yr-aurora-drift 22s ease-in-out infinite alternate;
}

@keyframes yr-star-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 220px 440px, -310px 310px, 390px -390px; }
}

@keyframes yr-aurora-drift {
  0% { opacity: .55; transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { opacity: .9; transform: translate3d(2%, 1%, 0) scale(1.08); }
}

a { text-underline-offset: .18em; }

.yr-shell {
  margin-inline: auto;
  max-width: 1220px;
  padding-inline: 24px;
}

.yr-header {
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 31, .92);
  border-bottom: 1px solid var(--yr-line);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: yr-header-in .7s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes yr-header-in {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

.yr-header .wp-block-site-logo img {
  border: 1px solid rgba(242, 166, 90, .5);
  border-radius: 50%;
}

.yr-header .wp-block-site-title {
  font-family: var(--wp--preset--font-family--prata-regular, Georgia, serif);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.yr-header .wp-block-navigation a {
  color: var(--yr-ivory);
  font-size: .98rem;
  text-decoration: none;
  position: relative;
}

.yr-header .wp-block-navigation a::after {
  background: var(--yr-amber);
  bottom: -.38rem;
  content: "";
  height: 1px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
  width: 100%;
}

.yr-header .wp-block-navigation a:hover::after,
.yr-header .wp-block-navigation a:focus-visible::after { transform: translateX(-50%) scaleX(1); }

.yr-header .wp-block-navigation a:hover,
.yr-header .wp-block-navigation a:focus-visible { color: var(--yr-amber); }

.yr-live-button a,
.yr-button,
.yr-button-secondary {
  align-items: center;
  border: 1px solid var(--yr-amber);
  border-radius: 9px;
  display: inline-flex;
  font-weight: 650;
  gap: .55rem;
  justify-content: center;
  padding: .9rem 1.2rem;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
  overflow: hidden;
  position: relative;
}

.yr-live-button a::before,
.yr-button::before {
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.36), transparent);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-130%);
  transition: transform .65s ease;
}

.yr-live-button a:hover::before,
.yr-button:hover::before { transform: translateX(130%); }

.yr-live-button a,
.yr-button {
  background: var(--yr-amber);
  color: var(--yr-navy) !important;
}

.yr-button-secondary { color: var(--yr-amber); }

.yr-live-button a:hover,
.yr-button:hover,
.yr-button-secondary:hover {
  transform: translateY(-2px);
}

.yr-button-secondary:hover {
  background: rgba(242, 166, 90, .1);
}

.yr-hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  min-height: 720px;
  padding-block: clamp(72px, 9vw, 128px);
}

.yr-kicker {
  color: var(--yr-amber);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}

.yr-hero h1,
.yr-page-hero h1 {
  color: var(--yr-ivory);
  font-family: var(--wp--preset--font-family--prata-regular, Georgia, serif);
  font-size: clamp(3rem, 6.5vw, 5.75rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: .98;
  margin: 0;
}

.yr-hero h1 {
  background: linear-gradient(100deg, #f6f2e8 10%, #ffd9b3 42%, #ffffff 52%, #f6f2e8 64%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: yr-title-glow 8s ease-in-out infinite;
}

@keyframes yr-title-glow {
  0%, 55%, 100% { background-position: 100% center; filter: drop-shadow(0 0 0 rgba(242,166,90,0)); }
  72% { background-position: 0 center; filter: drop-shadow(0 0 13px rgba(242,166,90,.18)); }
}

.yr-hero-copy {
  color: var(--yr-muted);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  margin: 1.65rem 0 2rem;
  max-width: 42rem;
}

.yr-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.yr-allsky-wrap {
  aspect-ratio: 1;
  border: 1px solid rgba(242, 166, 90, .5);
  border-radius: 50%;
  box-shadow: var(--yr-shadow);
  padding: 12px;
  position: relative;
  animation: yr-allsky-float 7s ease-in-out infinite;
}

.yr-allsky-wrap::before {
  border: 1px dashed rgba(242, 166, 90, .34);
  border-radius: 50%;
  content: "";
  inset: -24px;
  position: absolute;
  animation: yr-orbit 36s linear infinite;
}

.yr-allsky-wrap::after {
  border: 1px solid rgba(246, 242, 232, .17);
  border-radius: 50%;
  content: "";
  inset: -12px;
  position: absolute;
}

.yr-allsky-wrap img {
  aspect-ratio: 1;
  border-radius: 50%;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
  transition: filter .45s ease, transform .75s cubic-bezier(.2,.8,.2,1);
}

.yr-allsky-wrap > a {
  display: block;
  height: 100%;
  transform: translate3d(var(--yr-orb-x, 0), var(--yr-orb-y, 0), 0);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}

.yr-allsky-wrap:hover img { filter: saturate(1.12) contrast(1.04); transform: scale(1.025); }

@keyframes yr-allsky-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes yr-orbit { to { transform: rotate(360deg); } }

.yr-live-pill {
  background: rgba(7, 17, 31, .94);
  border: 1px solid var(--yr-amber);
  border-radius: 999px;
  color: var(--yr-amber);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .7rem 1rem;
  position: absolute;
  right: -16px;
  text-transform: uppercase;
  top: 10%;
  z-index: 2;
}

.yr-live-pill::before { content: "●"; margin-right: .45rem; }

.yr-live-pill::before { animation: yr-live-pulse 1.8s ease-in-out infinite; display: inline-block; }

@keyframes yr-live-pulse {
  0%, 100% { opacity: .45; transform: scale(.75); }
  50% { opacity: 1; transform: scale(1.08); }
}

.yr-section { padding-block: clamp(64px, 8vw, 112px); }

.yr-section + .yr-section { border-top: 1px solid var(--yr-line); }

.yr-section-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.yr-section-heading h2,
.yr-page-content h2 {
  color: var(--yr-ivory);
  font-family: var(--wp--preset--font-family--prata-regular, Georgia, serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  margin: 0;
}

.yr-section-heading a { color: var(--yr-amber); }

.yr-cards,
.yr-gallery,
.yr-equipment {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yr-card,
.yr-equipment-card {
  background: linear-gradient(145deg, rgba(16,42,67,.92), rgba(9,27,45,.92));
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
  overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
  position: relative;
}

.yr-card::before,
.yr-equipment-card::before {
  background: linear-gradient(110deg, transparent 15%, rgba(242,166,90,.12) 48%, transparent 78%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-125%);
  transition: transform .9s cubic-bezier(.2,.8,.2,1);
}

.yr-card:hover::before,
.yr-equipment-card:hover::before { transform: translateX(125%); }

.yr-card:hover,
.yr-equipment-card:hover {
  border-color: rgba(242, 166, 90, .55);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .22);
  transform: translateY(-7px);
}

.yr-card { padding: 1.5rem; }

.yr-card-label {
  color: var(--yr-amber);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.yr-card h3,
.yr-equipment-card h2 {
  color: var(--yr-ivory);
  font-family: var(--wp--preset--font-family--prata-regular, Georgia, serif);
  font-size: 1.45rem;
  font-weight: 400;
  margin: .55rem 0;
}

.yr-card p,
.yr-equipment-card p { color: var(--yr-muted); line-height: 1.65; margin-bottom: 0; }

.yr-gallery figure {
  background: var(--yr-blue);
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
  margin: 0;
  overflow: hidden;
  position: relative;
  transition: border-color .3s ease, box-shadow .35s ease, transform .35s ease;
}

.yr-gallery figure:hover {
  border-color: rgba(242, 166, 90, .6);
  box-shadow: 0 22px 52px rgba(0,0,0,.32);
  transform: translateY(-6px);
}

.yr-gallery img {
  aspect-ratio: 1;
  display: block;
  height: auto;
  object-fit: cover;
  transition: transform .45s ease;
  width: 100%;
}

.yr-gallery figure:hover img { transform: scale(1.035); }

.yr-gallery figcaption {
  background: linear-gradient(transparent, rgba(7,17,31,.95));
  bottom: 0;
  color: var(--yr-ivory);
  font-weight: 650;
  left: 0;
  margin: 0;
  padding: 3rem 1.1rem 1rem;
  position: absolute;
  right: 0;
  transform: translateY(13px);
  transition: transform .35s ease, padding .35s ease;
}

.yr-gallery figure:hover figcaption { padding-bottom: 1.35rem; transform: translateY(0); }

.yr-feature {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: 1.05fr .95fr;
}

.yr-feature img {
  border: 1px solid var(--yr-line);
  border-radius: var(--yr-radius);
  box-shadow: var(--yr-shadow);
  width: 100%;
  transition: filter .5s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}

.yr-feature:hover img { filter: saturate(1.08); transform: scale(1.018); }

.yr-feature p { color: var(--yr-muted); font-size: 1.1rem; line-height: 1.75; }

.yr-page-hero {
  border-bottom: 1px solid var(--yr-line);
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(70px, 10vw, 130px);
  position: relative;
}

.yr-page-hero::before,
.yr-page-hero::after {
  border: 1px solid rgba(242,166,90,.15);
  border-radius: 50%;
  content: "";
  height: 460px;
  pointer-events: none;
  position: absolute;
  right: -140px;
  top: -210px;
  width: 460px;
  z-index: -1;
  animation: yr-page-orbit 18s ease-in-out infinite alternate;
}

.yr-page-hero::after {
  border-color: rgba(108,153,255,.13);
  height: 330px;
  right: -35px;
  top: -150px;
  width: 330px;
  animation-delay: -7s;
  animation-duration: 13s;
}

@keyframes yr-page-orbit {
  from { opacity: .45; transform: rotate(0) scale(.94); }
  to { opacity: 1; transform: rotate(34deg) scale(1.08); }
}

.yr-page-hero h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); }

.yr-page-hero p { color: var(--yr-muted); font-size: 1.15rem; line-height: 1.7; max-width: 680px; }

.yr-page-content {
  color: var(--yr-ivory);
  margin-inline: auto;
  max-width: 860px;
  padding-block: clamp(56px, 8vw, 100px);
}

.yr-page-content p,
.yr-page-content li { color: #d9dee7; font-size: 1.075rem; line-height: 1.8; }

.yr-page-content a { color: var(--yr-amber); }

.yr-page-content hr { border-color: var(--yr-line); margin-block: 3rem; }

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

.yr-equipment-card img {
  aspect-ratio: 16 / 10;
  background: #f4f5f6;
  display: block;
  object-fit: contain;
  padding: 1.25rem;
  width: 100%;
}

.yr-equipment-card div { padding: 1.4rem; }

.yr-footer {
  background: #050c16;
  border-top: 1px solid var(--yr-line);
  color: var(--yr-muted);
}

.yr-footer a { color: var(--yr-ivory); text-decoration: none; }
.yr-footer a:hover { color: var(--yr-amber); }

.yr-footer-note { border-top: 1px solid var(--yr-line); font-size: .85rem; margin-top: 2rem; padding-top: 1.25rem; }

.yr-scroll-progress {
  background: linear-gradient(90deg, #f2a65a, #ffd6a8);
  box-shadow: 0 0 16px rgba(242, 166, 90, .65);
  height: 2px;
  left: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transform: scaleX(0);
  transform-origin: left;
  width: 100%;
  z-index: 9999;
}

.yr-motion-ready .yr-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity .75s cubic-bezier(.2,.8,.2,1) var(--yr-reveal-delay, 0ms),
    transform .75s cubic-bezier(.2,.8,.2,1) var(--yr-reveal-delay, 0ms);
  will-change: opacity, transform;
}

.yr-motion-ready .yr-reveal.yr-visible {
  opacity: 1;
  transform: translateY(0);
}

.yr-motion-ready .yr-gallery figure.yr-reveal img { transform: scale(1.08); }
.yr-motion-ready .yr-gallery figure.yr-reveal.yr-visible img { transform: scale(1); }
.yr-motion-ready .yr-gallery figure.yr-reveal.yr-visible:hover img { transform: scale(1.035); }

.yr-shooting-sky {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.yr-shooting-star {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), rgba(242,166,90,.9), transparent);
  border-radius: 999px;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.75));
  height: 1px;
  opacity: 0;
  position: absolute;
  transform: rotate(-24deg) translate3d(0,0,0);
  transform-origin: right center;
  width: clamp(100px, 14vw, 220px);
  animation: yr-shoot var(--yr-shoot-duration, 1500ms) cubic-bezier(.1,.7,.2,1) forwards;
}

.yr-shooting-star::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 20px rgba(242,166,90,.8);
  content: "";
  height: 3px;
  position: absolute;
  right: 8%;
  top: -1px;
  width: 3px;
}

@keyframes yr-shoot {
  0% { opacity: 0; transform: rotate(-24deg) translate3d(0,0,0) scaleX(.25); }
  12% { opacity: 1; }
  72% { opacity: .75; }
  100% { opacity: 0; transform: rotate(-24deg) translate3d(-70vw, 45vh, 0) scaleX(1); }
}

.yr-motion-ready .yr-hero > div:first-child > * {
  animation: yr-hero-copy-in .85s cubic-bezier(.2,.8,.2,1) both;
}

.yr-motion-ready .yr-hero > div:first-child > :nth-child(2) { animation-delay: .1s; }
.yr-motion-ready .yr-hero > div:first-child > :nth-child(3) { animation-delay: .2s; }
.yr-motion-ready .yr-hero > div:first-child > :nth-child(4) { animation-delay: .3s; }

@keyframes yr-hero-copy-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  .yr-live-button { display: none !important; }
  .yr-hero { grid-template-columns: 1fr; min-height: auto; }
  .yr-allsky-wrap { margin-inline: auto; max-width: 560px; width: 90%; }
  .yr-feature { grid-template-columns: 1fr; }
  .yr-cards, .yr-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .yr-shell { padding-inline: 18px; }
  .yr-header .wp-block-site-logo img { width: 52px !important; }
  .yr-header .wp-block-site-title { font-size: 1rem; letter-spacing: .06em; }
  .yr-hero { padding-block: 64px; }
  .yr-hero h1 { font-size: clamp(2.7rem, 15vw, 4.3rem); }
  .yr-cards, .yr-gallery, .yr-equipment { grid-template-columns: 1fr; }
  .yr-section-heading { align-items: start; flex-direction: column; }
  .yr-live-pill { right: -6px; }
  .yr-allsky-wrap { animation-duration: 9s; }
  .yr-shooting-star { width: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .yr-motion-ready .yr-reveal { opacity: 1; transform: none; }
}
