/* Ua-Huka Horse House */

:root {
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --ink: #1e1b18;
  --muted: #6b625a;
  --line: #ddd2c2;
  --accent: #a8482a;
  --accent-dark: #8a3a21;
  --forest: #24302a;
  --forest-2: #2e3c34;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 136px);
  --header: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
p { margin: 0 0 1.1em; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.large { font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.65rem); line-height: 1.4; color: var(--ink); }

.skip { position: absolute; left: -9999px; top: 10px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Boutons et liens */
.btn {
  display: inline-block;
  padding: 15px 30px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-small { padding: 10px 20px; }
.btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); }
.btn-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

.link {
  display: inline-block;
  padding: 4px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font: 600 .82rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.link:hover { color: var(--accent); }
.link-light { color: #fff; font: 600 .82rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.7); padding: 4px 0; }
.link-light:hover { border-color: #fff; }

/* En-tête */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header);
  color: #fff;
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.header.solid { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { font-size: .92rem; font-weight: 500; text-decoration: none; opacity: .9; }
.nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.header:not(.solid) .btn-book { background: transparent; border-color: rgba(255,255,255,.85); }
.header:not(.solid) .btn-book:hover { background: #fff; color: var(--ink); }

.menu-btn {
  display: none;
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  padding: 8px 16px;
  font: 600 .78rem var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 980px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed;
    inset: var(--header) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 12px 24px -16px rgba(0,0,0,.35);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin-top: 20px; text-align: center; }
  .header:not(.solid) .nav .btn-book { background: var(--accent); border-color: var(--accent); color: #fff; }
  .header.menu-open { background: var(--paper); color: var(--ink); }
}

/* Accueil */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; animation: hero-zoom 14s ease-out both; }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-content > * { animation: hero-in 1.2s ease-out both; }
.hero-content > :nth-child(2) { animation-delay: .15s; }
.hero-content > :nth-child(3) { animation-delay: .3s; }
.hero-content > :nth-child(4) { animation-delay: .45s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Apparition au défilement (ajoutée par le script) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-content > * { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,12,10,.6) 0%, rgba(15,12,10,.15) 22%, rgba(15,12,10,.1) 45%, rgba(15,12,10,.72) 100%);
}
.hero-content { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(56px, 10vh, 110px); }
.hero-place { font-size: .82rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 20px; }
.hero h1 { font-size: clamp(3.4rem, 10vw, 8rem); font-weight: 500; line-height: .92; margin-bottom: 24px; }
.hero-text { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.75rem); max-width: 30ch; line-height: 1.35; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 34px; }

/* Sections */
.section { padding: var(--section) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(48px, 7vw, 80px); }
.section-head p { color: var(--muted); }

/* Introduction */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.intro-text > p:not(.large) { color: var(--muted); }
.intro-photo { margin: 0; }
.intro-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.facts div { margin: 0; }
.facts dt { font-family: var(--serif); font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.facts dd { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.45; }

@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-photo { order: -1; }
  .intro-photo img { aspect-ratio: 3 / 2; }
}
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 18px; } .facts div { display: flex; align-items: baseline; gap: 16px; } .facts dt { font-size: 2.4rem; min-width: 1.2em; } }

/* Chambres */
.rooms-section { background: var(--paper-2); }
.room { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.room + .room { margin-top: clamp(72px, 10vw, 128px); }
.room-reverse .room-media { order: 2; }

.ph { display: block; overflow: hidden; cursor: zoom-in; background: var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ph:hover img { transform: scale(1.03); }

.room-main { aspect-ratio: 4 / 3; }
.room-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 10px; }
.room-thumbs .ph { aspect-ratio: 3 / 2; }

.room-meta { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); line-height: 1.8; margin-bottom: 22px; }
.room-text > p:not(.room-meta) { color: var(--muted); }
.room-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 30px; }

@media (max-width: 900px) {
  .room { grid-template-columns: 1fr; }
  .room-reverse .room-media { order: 0; }
}

/* La table */
.table-section { background: var(--forest); color: #f2ede4; }
.table-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.table-section .large { color: #fff; }
.table-text p:not(.large) { color: rgba(242,237,228,.78); }
.table-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.table-photos .ph { aspect-ratio: 3 / 4; background: var(--forest-2); }
.table-photos .ph:nth-child(2) { margin-top: 64px; }
@media (max-width: 860px) {
  .table-grid { grid-template-columns: 1fr; }
  .table-photos .ph:nth-child(2) { margin-top: 32px; }
}

/* Excursions */
.tours { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px); }
.tour .ph { aspect-ratio: 4 / 3; margin-bottom: 26px; }
.tour p { color: var(--muted); }
.tour .link { margin-top: 6px; }
@media (max-width: 900px) { .tours { grid-template-columns: 1fr; gap: 64px; } .tour .ph { aspect-ratio: 3 / 2; } }

.band { margin: 0; height: clamp(320px, 60vw, 640px); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }

/* Les lieux */
.places { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 14px; }
.place { margin: 0; position: relative; }
.place .ph { height: 100%; }
.place-large { grid-column: span 2; grid-row: span 2; }
.place-wide { grid-column: span 2; }
.place figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 18px 14px;
  color: #fff;
  font-size: .9rem;
  font-weight: 500;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0));
  pointer-events: none;
}
@media (max-width: 900px) { .places { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; } }
@media (max-width: 560px) { .places { grid-template-columns: 1fr; grid-auto-rows: 240px; } .place-large { grid-column: auto; grid-row: span 1; } .place-wide { grid-column: auto; } }

/* Infos pratiques */
.infos { background: var(--paper-2); }
.infos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 4vw, 56px); }
.info h3, .house-rules h3 { font-size: 1.6rem; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.info ul, .house-rules ul { list-style: none; margin: 0; padding: 0; }
.info li { padding: 6px 0; color: var(--muted); font-size: .96rem; line-height: 1.55; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 14px; }
.info dt { font-weight: 600; }
.info dd { margin: 0; color: var(--muted); }
.note { font-size: .9rem; color: var(--muted); margin-top: 12px; }
.note-strong { color: var(--accent); font-weight: 600; }
@media (max-width: 1000px) { .infos-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .infos-grid { grid-template-columns: 1fr; } }

.house-rules { margin-top: clamp(56px, 7vw, 88px); }
.house-rules ul { columns: 2; column-gap: 56px; }
.house-rules li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .96rem; }
@media (max-width: 700px) { .house-rules ul { columns: 1; } }

/* Contact */
.contact { background: var(--forest); color: #f2ede4; padding: var(--section) 0; }
.contact-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px 64px; }
.contact-top p { color: rgba(242,237,228,.8); max-width: 52ch; margin: 0; }
.contact-top .btn { flex-shrink: 0; }

.contact-cols {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 40px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 40px;
  border-top: 1px solid rgba(242,237,228,.18);
}
.contact-col { display: flex; flex-direction: column; gap: 6px; }
.contact-label { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(242,237,228,.5); margin: 0 0 10px; }
.contact-value {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.3;
  color: #f7f3ec;
  text-decoration: none;
  margin: 0;
  overflow-wrap: anywhere;
}
a.contact-value { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s ease; justify-self: start; width: fit-content; }
a.contact-value:hover { background-size: 100% 1px; }
@media (max-width: 1000px) { .contact-cols { grid-template-columns: 1fr 1fr; justify-content: stretch; } }
@media (max-width: 560px) { .contact-cols { grid-template-columns: 1fr; gap: 32px; } }

/* Pied de page */
.footer { background: #1a231e; color: rgba(242,237,228,.6); font-size: .85rem; padding: 48px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: center; }
.footer p { margin: 0; }
.footer-logo { font-family: var(--serif); font-size: 1.6rem; color: #f7f3ec; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { text-decoration: none; color: rgba(242,237,228,.75); }
.footer-links a:hover { color: #fff; }
.footer-copy { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid rgba(242,237,228,.12); font-size: .8rem; color: rgba(242,237,228,.45); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* Visionneuse */
.viewer {
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgba(14,12,10,.96);
  color: #fff;
}
.viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.viewer::backdrop { background: rgba(14,12,10,.96); }
.viewer-img { max-width: calc(100vw - 160px); max-height: calc(100vh - 140px); object-fit: contain; }
.viewer-caption { margin: 16px 0 0; font-size: .9rem; color: rgba(255,255,255,.75); text-align: center; padding: 0 20px; }
.viewer-btn { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-family: var(--sans); }
.viewer-close { top: 20px; right: 24px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 10px; }
.viewer-prev, .viewer-next { top: 50%; transform: translateY(-50%); font-size: 3rem; line-height: 1; padding: 20px; opacity: .8; }
.viewer-prev:hover, .viewer-next:hover { opacity: 1; }
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }
.viewer.single .viewer-prev, .viewer.single .viewer-next { display: none; }
@media (max-width: 700px) {
  .viewer-img { max-width: 100vw; max-height: calc(100vh - 180px); }
  .viewer-prev, .viewer-next { top: auto; bottom: 18px; transform: none; font-size: 2.4rem; }
}
