/* ============================================================
   La Trappe Québécoise — feuille de style
   Palette : sapin / neige / cuivre / rivière / os
   ============================================================ */
:root {
  --sapin:      #0F1B13;
  --sapin-2:    #16241B;
  --neige:      #F1EDE2;
  --neige-2:    #E9E3D3;
  --os:         #D9CFB8;
  --cuivre:     #C06A2E;
  --cuivre-vif: #D97E3D;
  --riviere:    #8FA3A0;
  --encre:      #26221B;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Lora", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--sapin);
  color: var(--neige);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Trapline rail ---------- */
.rail {
  position: fixed; left: 28px; top: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center;
}
.rail-line {
  position: absolute; left: 5px; top: 12vh; bottom: 12vh; width: 2px;
  background: rgba(217, 207, 184, 0.18);
}
.rail-fill {
  width: 100%; height: 0%;
  background: var(--cuivre);
  transition: height 0.15s linear;
}
.rail ul { list-style: none; display: flex; flex-direction: column; gap: 34px; position: relative; }
.rail a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.rail .dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--os); background: var(--sapin);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.rail .lbl {
  font-family: var(--display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--os); opacity: 0; transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
}
.rail a:hover .lbl, .rail a:focus-visible .lbl,
.rail a.active .lbl { opacity: 1; transform: none; }
.rail a.active .dot { background: var(--cuivre); border-color: var(--cuivre-vif); transform: scale(1.25); }
@media (max-width: 1100px) { .rail { display: none; } }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  transition: background 0.3s, box-shadow 0.3s;
}
.topbar.scrolled { background: rgba(15, 27, 19, 0.94); box-shadow: 0 1px 0 rgba(217,207,184,0.12); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand span {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--neige);
}
.topnav { display: flex; gap: 26px; }
.topnav a {
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--os); text-decoration: none;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.topnav a:hover, .topnav a:focus-visible { color: var(--neige); border-bottom-color: var(--cuivre); }
@media (max-width: 760px) { .topnav { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-bg, .band-img {
  position: absolute; left: 0; right: 0; top: -12%; height: 124%;
  background-size: cover; background-position: center;
  will-change: transform;
}
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,27,19,0.55) 0%, rgba(15,27,19,0.25) 45%, rgba(15,27,19,0.82) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 110px 24px 80px; max-width: 860px; }
.hero-crest { width: 104px; margin: 0 auto 18px; filter: drop-shadow(0 4px 18px rgba(0,0,0,0.5)); }
.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--os);
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 0.92; text-transform: uppercase; letter-spacing: 0.02em;
  margin: 18px 0 22px;
  text-shadow: 0 6px 40px rgba(0,0,0,0.55);
}
.hero-sub { font-size: 1.2rem; font-style: italic; color: var(--neige-2); max-width: 560px; margin: 0 auto; }
.hero-note {
  display: inline-block; margin-top: 30px; padding: 8px 18px;
  font-family: var(--display); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--os); border: 1px solid rgba(217,207,184,0.45); border-radius: 999px;
  background: rgba(15,27,19,0.45);
}
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--os); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue span { width: 2px; height: 44px; background: linear-gradient(var(--cuivre), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: scaleY(1); opacity: 1; } 50% { transform: scaleY(0.55); opacity: 0.5; } }

/* ---------- Sections ---------- */
.sec { position: relative; padding: 110px 24px; }
.sec.paper { background: var(--neige); color: var(--encre); }
.sec.dark  { background: var(--sapin); color: var(--neige); }
.wrap { max-width: 1060px; margin: 0 auto; }
.wrap.wide { max-width: 1280px; }

.waypoint {
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--cuivre);
  display: flex; align-items: center; gap: 14px;
}
.waypoint::before { content: ""; width: 38px; height: 2px; background: var(--cuivre); }
.sec h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  text-transform: uppercase; line-height: 1; letter-spacing: 0.02em;
  margin: 14px 0 44px;
}
.lede { font-size: 1.25rem; font-weight: 500; line-height: 1.6; margin-bottom: 1.2em; }
.col-text p + p { margin-top: 1.1em; }

.cols { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .cols { grid-template-columns: 1fr; gap: 40px; } }

/* territoire photo cluster */
.col-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ph { overflow: hidden; border-radius: 4px; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.ph:hover img { transform: scale(1.045); }
.ph-a { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.ph-b, .ph-c { aspect-ratio: 4 / 5; }

.species { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.species li {
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 14px; border: 1px solid rgba(38,34,27,0.35); border-radius: 999px;
}

/* ---------- Parallax bands ---------- */
.band {
  position: relative; min-height: 62vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.band::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(15, 27, 19, 0.45);
}
.band-quote {
  position: relative; z-index: 2; max-width: 720px; padding: 60px 24px; text-align: center;
}
.band-quote p {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-style: italic; line-height: 1.5;
  text-shadow: 0 3px 24px rgba(0,0,0,0.6);
}
.band-quote cite {
  display: block; margin-top: 18px;
  font-family: var(--display); font-style: normal; font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--os);
}

/* ---------- Trappeur ---------- */
.sig { margin-top: 1.4em; color: var(--os); font-style: italic; }
.fiche {
  background: var(--sapin-2); border: 1px solid rgba(217,207,184,0.16);
  border-top: 3px solid var(--cuivre); border-radius: 4px; padding: 30px 30px 26px;
}
.fiche h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 20px; color: var(--os);
}
.fiche dt {
  font-family: var(--display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cuivre-vif); margin-top: 16px;
}
.fiche dd { margin-top: 2px; }

/* ---------- Reportages ---------- */
.archive-note {
  font-family: var(--display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--encre); background: var(--neige-2);
  border-left: 3px solid var(--cuivre);
  padding: 14px 20px; margin: -16px 0 48px; max-width: 640px;
}
.dvds { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 880px) { .dvds { grid-template-columns: 1fr; } }
.dvd figure {
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(38,34,27,0.28);
  transform: rotate(-1.2deg); transition: transform 0.45s ease;
}
.dvd:nth-child(2) figure { transform: rotate(1.2deg); }
.dvd:hover figure { transform: rotate(0) scale(1.015); }
.dvd-meta { margin-top: 26px; }
.vol {
  font-family: var(--display); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--cuivre);
}
.dvd h3 { font-family: var(--display); font-weight: 700; font-size: 1.7rem; text-transform: uppercase; margin: 6px 0 12px; }
.runtime { margin-top: 12px; font-size: 0.95rem; color: rgba(38,34,27,0.65); font-style: italic; }
.footnote { margin-top: 52px; font-size: 0.95rem; font-style: italic; color: rgba(38,34,27,0.65); }

/* ---------- Vidéos ---------- */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 880px) { .videos { grid-template-columns: 1fr; } }
.yt { position: relative; }
.yt img, .yt iframe {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 0; border-radius: 4px; background: #000;
}
.yt button {
  position: absolute; inset: 0; width: 100%; height: calc(100% - 2.4em);
  background: rgba(15,27,19,0.25); border: 0; border-radius: 4px; cursor: pointer;
  transition: background 0.3s;
}
.yt button:hover, .yt button:focus-visible { background: rgba(15,27,19,0.05); }
.yt button span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--cuivre); box-shadow: 0 8px 26px rgba(0,0,0,0.45);
}
.yt button span::after {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-left: 20px solid var(--neige); border-top: 12px solid transparent; border-bottom: 12px solid transparent;
}
.yt figcaption {
  margin-top: 12px; font-family: var(--display); font-weight: 600;
  font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--os);
}

/* ---------- Galeries ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.tabs button {
  font-family: var(--display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--encre); background: transparent;
  border: 1px solid rgba(38,34,27,0.4); border-radius: 999px;
  padding: 9px 20px; cursor: pointer; transition: all 0.25s;
}
.tabs button:hover { border-color: var(--cuivre); color: var(--cuivre); }
.tabs button.active { background: var(--cuivre); border-color: var(--cuivre); color: var(--neige); }
.tabs button .n { opacity: 0.55; margin-left: 6px; font-size: 0.8em; }
.grid { columns: 4 260px; column-gap: 14px; }
.grid a { display: block; margin-bottom: 14px; break-inside: avoid; border-radius: 3px; overflow: hidden; }
.grid img { width: 100%; transition: transform 0.5s ease, filter 0.5s ease; }
.grid a:hover img { transform: scale(1.03); filter: brightness(1.06); }

/* ---------- Recette ---------- */
.recette-card {
  background: var(--neige); color: var(--encre);
  border-radius: 4px; padding: 48px 52px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  max-width: 900px;
}
@media (max-width: 640px) { .recette-card { padding: 32px 24px; } }
.r-date {
  font-family: var(--display); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--cuivre);
}
.recette-card h3 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-transform: uppercase; line-height: 1.05; margin: 8px 0 4px;
}
.r-serves { font-style: italic; color: rgba(38,34,27,0.65); margin-bottom: 30px; }
.r-cols { display: grid; grid-template-columns: 5fr 7fr; gap: 44px; }
@media (max-width: 760px) { .r-cols { grid-template-columns: 1fr; } }
.r-cols h4 {
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--cuivre);
  border-bottom: 2px solid var(--cuivre); padding-bottom: 8px; margin-bottom: 16px;
}
.r-cols ul, .r-cols ol { padding-left: 20px; }
.r-cols li { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; text-align: center; }
.footer::after { content: ""; position: absolute; inset: 0; background: rgba(15,27,19,0.72); }
.footer-inner { position: relative; z-index: 2; padding: 110px 24px 70px; }
.footer-inner img { margin: 0 auto 18px; }
.f-title {
  font-family: var(--display); font-weight: 700; font-size: 1.6rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.f-sub { color: var(--os); font-style: italic; margin-top: 6px; }
.f-mail {
  display: inline-block; margin-top: 26px;
  font-family: var(--display); font-weight: 600; font-size: 1.2rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--neige); text-decoration: none;
  border: 1px solid var(--cuivre); border-radius: 999px; padding: 12px 30px;
  transition: background 0.25s;
}
.f-mail:hover, .f-mail:focus-visible { background: var(--cuivre); }
.f-fine { margin-top: 40px; font-size: 0.85rem; color: rgba(217,207,184,0.6); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 16, 12, 0.95);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1400px, 88vw); max-height: 84vh; border-radius: 3px; }
.lb-cap {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--os);
}
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--neige);
  font-size: 3rem; line-height: 1; cursor: pointer; padding: 16px; opacity: 0.8;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; color: var(--cuivre-vif); }
.lb-close { top: 14px; right: 20px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* focus */
:focus-visible { outline: 2px solid var(--cuivre-vif); outline-offset: 3px; }
