/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button { background: none; border: none; cursor: pointer; }

html, body {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* ── Root ──────────────────────────────────────── */
:root {
  --green:    #1b901b;
  --green-dk: #0d4f0d;
  --bg:       #eaf6ea;
  --white:    #ffffff;
  --font:     'Be Vietnam Pro', sans-serif;
}

body.fortune-body {
  background-color: var(--bg);
  font-family: var(--font);
}

/* ── 3D Logo — cache la barre de chargement ────── */
model-viewer {
  --progress-bar-color: transparent;
  --progress-mask: transparent;
}

/* ══════════════════════════════════════════════════
   ASSIETTE BOUNCE (screensaver VHS)
══════════════════════════════════════════════════ */
#fortune-plate {
  position: fixed;
  z-index: 500;
  width: 120px;
  height: 120px;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}

#fortune-plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  animation: vhs-glitch 9s infinite;
  will-change: filter, transform;
}

@keyframes vhs-glitch {
  0%,  88%, 100% { filter: none; }
  90%            { filter: saturate(2.5) hue-rotate(18deg); }
  91%            { filter: saturate(0.5) hue-rotate(-12deg) blur(0.8px); }
  92%            { filter: saturate(1.8) hue-rotate(8deg); }
  93%            { filter: none; }
}

@media (max-width: 479px) {
  #fortune-plate {
    width: 80px;
    height: 80px;
  }
}

/* ── Marquee ───────────────────────────────────── */
[data-css-marquee] {
  touch-action: pan-y;
  user-select: none;
}

/* ── Text reveal ──────────────────────────────── */
[data-highlight-marker-reveal]   { visibility: hidden; }
.highlight-marker-line {
  width: auto;
  display: inline-block !important;
  margin: -0.055em 0;
}
.highlight-marker-bar {
  position: absolute;
  inset: -0.055em 0;
  z-index: 1;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   HEADER WRAP — navbar + 3D logo
══════════════════════════════════════════════════ */
.header-wrap {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  background-color: transparent;
  padding: 3em 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
}

.nav-link {
  color: var(--green);
  text-transform: uppercase;
  font-family: var(--font);
  font-size: 2em;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: opacity 0.15s ease;
  padding: 0;
}
.nav-link:hover { opacity: 0.65; }

.nav-link.viet {
  padding-top: 10px;
  font-size: 1.2em;
  font-weight: 400;
}

/* ── 3D Logo ─────────────────────────────────────── */
.logo-3d-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 3em;
}
model-viewer {
  width: 500px;
  height: 300px;
  display: block;
  --poster-color: transparent;
  background: transparent;
}

/* ══════════════════════════════════════════════════
   PHOTOS SECTION — marquee défilant
══════════════════════════════════════════════════ */
.photos-section {
  padding: 0 0 5em;
  overflow: hidden;
}

.marquee-css {
  display: flex;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.marquee-css__list {
  display: flex;
  flex: none;
  align-items: center;
  position: relative;
}

.marquee-item {
  display: flex;
  align-items: center;
  padding: 0;
  flex: 0 0 auto;
}
.marquee-item img {
  height: 420px;
  width: auto;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.marquee-item--press {
  padding: 0 2.5em;
}
.marquee-item--press img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.marquee-placeholder {
  text-align: center;
  color: var(--green);
  font-family: var(--font);
  padding: 3em 1em;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════
   CONTENT WRAP — description + citer par + footer
══════════════════════════════════════════════════ */
.content-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5em;
  padding-bottom: 2em;
}

.text-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 5em 0 0;
}

.press-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3em;
  padding-top: 5em;
  width: 100%;
}

.description-text {
  color: var(--green);
  text-align: justify;
  text-transform: uppercase;
  font-family: var(--font);
  font-size: 1.9em;
  line-height: 1.1em;
  width: 100%;
  hyphens: auto;
}

.section-label-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
}

.section-label {
  color: var(--green);
  text-align: center;
  text-transform: uppercase;
  font-family: var(--font);
  font-size: 1.9em;
  font-weight: 900;
  line-height: 1;
}

.section-label-viet {
  color: var(--green);
  text-align: center;
  font-family: var(--font);
  font-size: 1.1em;
  font-weight: 400;
}

.press-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.placeholder-hint {
  text-align: center;
  color: var(--green);
  font-family: var(--font);
  opacity: 0.45;
  font-size: 0.9em;
}

/* ── Footer bar ─────────────────────────────────── */
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 2em 2.5% 3em;
  box-sizing: border-box;
}
.footer-text {
  color: var(--green);
  text-transform: uppercase;
  font-family: var(--font);
  font-size: 1.9em;
  line-height: 1.1em;
}
.footer-credits-btn {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  transition: opacity 0.15s;
}
.footer-credits-btn:hover { opacity: 0.55; }

/* ══════════════════════════════════════════════════
   POPUP OVERLAY
══════════════════════════════════════════════════ */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  background-color: rgba(234, 246, 234, 0.3);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.popup-overlay.is-open {
  display: flex;
}

.popup-box {
  background-color: var(--white);
  border: 0.2em solid var(--green);
  border-radius: 1em;
  width: 60%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: popup-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding-top: 1em;
}

@keyframes popup-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-close-row {
  position: absolute;
  top: 1em;
  right: 1em;
}

.popup-close-btn {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  border: 0.12em solid var(--green);
  color: var(--green);
  font-family: var(--font);
  font-size: 1.1em;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.popup-close-btn:hover {
  background: var(--green);
  color: var(--white);
}

.popup-panel         { display: block; }
.popup-panel[hidden] { display: none; }

.popup-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5em;
  padding: 2em 4em 4em;
}

.popup-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
}
.popup-fr {
  color: var(--green);
  text-transform: uppercase;
  font-family: var(--font);
  font-size: 2.2em;
  font-weight: 900;
  line-height: 1;
}
.popup-viet {
  color: var(--green);
  font-family: var(--font);
  font-size: 1.1em;
  font-weight: 300;
  opacity: 0.7;
}

.popup-body {
  width: 100%;
  color: var(--green);
  font-family: var(--font);
  font-size: 1.1em;
  line-height: 1.5;
  text-align: center;
}
.popup-body p { margin-bottom: 0.75em; }
.popup-body a {
  color: var(--green);
  font-weight: 700;
}
.popup-body p {
  margin-bottom: 0.6em;
}
.popup-body p:last-child {
  margin-bottom: 0;
}

.popup-address {
  font-family: var(--font);
  color: var(--green);
  font-size: 1.1em;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 1em;
}

.popup-map-link {
  display: inline-block;
  color: var(--green);
  font-family: var(--font);
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  border: 0.15em solid var(--green);
  border-radius: 2em;
  padding: 0.5em 1.4em;
  transition: background 0.15s, color 0.15s;
}
.popup-map-link:hover {
  background: var(--green);
  color: var(--white);
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */

/* Tablet */
@media screen and (max-width: 991px) {
  .header-wrap  { max-width: 728px; }
  .content-wrap { max-width: 728px; }

  .popup-box {
    width: 80%;
  }
  .popup-inner {
    padding: 1.5em 2em 3em;
  }
}

/* Mobile landscape */
@media screen and (max-width: 767px) {
  .header-wrap,
  .content-wrap { max-width: none; padding: 0 1em; }

  .navbar { margin: 0 auto; }
  .nav-link { font-size: 1.4em; }
  .nav-link.viet { font-size: 1em; }
}

/* Mobile portrait */
@media screen and (max-width: 479px) {
  .navbar {
    padding: 1.5em 0;
  }

  .nav-link {
    font-size: 1em;
    padding: 0 6px;
  }
  .nav-link.viet { font-size: 0.7em; }

  .logo-3d-wrap { padding-bottom: 1.5em; }

  model-viewer {
    width: 100%;
    height: 200px;
  }

  .photos-section {
    padding: 0 0 3em;
  }

  .marquee-item img {
    height: 500px;
  }

  .marquee-item--press img {
    height: 32px;
  }

  .content-wrap {
    gap: 3em;
    padding-bottom: 1em;
  }

  .text-section {
    width: 100%;
    padding-top: 3em;
    padding-left: 0;
    padding-right: 0;
  }

  .description-text,
  .section-label,
  .footer-text {
    font-size: 1em;
  }

  .footer-bar {
    padding: 1.5em 0 2.5em;
  }

  .popup-box {
    width: 90%;
    height: auto;
    max-height: 85vh;
  }
  .popup-inner {
    padding: 1em 1.2em 2.5em;
  }
  .popup-fr { font-size: 1.6em; }
}
