/* ==========================================================================
   Ranch Horse Paradise — feuille de style unique
   Palette : forêt / sable / terracotta
   ========================================================================== */

:root {
  --foret: #2c3d33;
  --foret-clair: #4a6350;
  --mousse: #7d9483;
  --sable: #efe7da;
  --creme: #faf7f2;
  --blanc: #ffffff;
  --terracotta: #b56a4a;
  --terracotta-fonce: #945236;
  --encre: #262320;
  --gris: #6f6a63;
  --gris-clair: #ddd6cb;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1180px;
  --rayon: 4px;
  --ombre: 0 12px 40px rgba(38, 35, 32, .12);
  --ombre-douce: 0 4px 18px rgba(38, 35, 32, .08);
  --transition: .35s cubic-bezier(.4, 0, .2, 1);
  --header-h: 76px;
}

/* --------------------------------------------------------------- Base --- */

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

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

img { max-width: 100%; display: block; }

a { color: var(--terracotta-fonce); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

p { margin: 0 0 1.1em; }

figure, blockquote { margin: 0; }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--sable { background: var(--sable); }
.section--foret { background: var(--foret); color: var(--sable); }
.section--foret h2, .section--foret h3 { color: var(--blanc); }
.section--foret a { color: var(--sable); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--foret); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ Éléments --- */

.surtitre {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 14px;
}
.section--foret .surtitre { color: var(--mousse); }

.chapeau {
  font-size: 1.12rem;
  color: var(--gris);
  max-width: 62ch;
}
.section--foret .chapeau { color: #cdd6cf; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 15px 32px;
  border: 1px solid transparent;
  border-radius: var(--rayon);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--plein { background: var(--terracotta); color: #fff; }
.btn--plein:hover { background: var(--terracotta-fonce); color: #fff; }

.btn--ligne { background: transparent; color: var(--encre); border-color: var(--encre); }
.btn--ligne:hover { background: var(--encre); color: var(--creme); }

.btn--clair { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--clair:hover { background: #fff; color: var(--foret); }

.centre { text-align: center; }
.centre .chapeau { margin-inline: auto; }

/* -------------------------------------------------------------- Header --- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(250, 247, 242, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gris-clair);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  color: var(--foret);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo__nom { font-family: var(--serif); font-size: 1.32rem; }
.logo__sous {
  font-size: .62rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--terracotta);
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--encre);
  text-decoration: none;
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: var(--terracotta);
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { padding: 11px 22px; }
.nav .btn::after { display: none; }

.burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  padding: 10px;
}
.burger span {
  display: block; height: 2px; background: var(--encre);
  margin: 5px 0; transition: var(--transition);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- Hero --- */

.hero {
  position: relative;
  min-height: clamp(520px, 82vh, 760px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,26,22,.45) 0%, rgba(20,26,22,.15) 40%, rgba(20,26,22,.82) 100%);
}
.hero__contenu {
  position: relative; z-index: 2;
  padding-top: 40px;                        /* évite que le texte touche le header sur les écrans bas */
  padding-bottom: clamp(48px, 7vw, 88px);
}
.hero h1 { color: #fff; max-width: 16ch; margin-bottom: .35em; }
.hero .surtitre { color: #e5d3c4; }
.hero p { font-size: 1.15rem; max-width: 54ch; color: #ece7e0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero--page { min-height: clamp(380px, 55vh, 520px); }
/* hero plus court : le texte occupe une plus grande part de l'image, il faut assombrir davantage */
.hero--page::after {
  background: linear-gradient(180deg, rgba(20,26,22,.5) 0%, rgba(20,26,22,.45) 30%, rgba(20,26,22,.88) 100%);
}

/* --------------------------------------------------------- Bandeau clé --- */

.reperes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--gris-clair);
  border-block: 1px solid var(--gris-clair);
}
.repere { background: var(--creme); padding: 30px 24px; text-align: center; }
.repere__val {
  font-family: var(--serif); font-size: 1.9rem; color: var(--foret); line-height: 1;
}
.repere__lib {
  font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gris); margin-top: 9px;
}

/* ---------------------------------------------------------- Logements --- */

.logements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 34px;
  margin-top: 52px;
}

.carte {
  background: var(--blanc);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre-douce);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.carte:hover { transform: translateY(-6px); box-shadow: var(--ombre); }

.carte__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.carte__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.carte:hover .carte__media img { transform: scale(1.05); }

.badge {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,.94);
  color: var(--foret);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 100px;
}

.carte__corps { padding: 28px 28px 32px; display: flex; flex-direction: column; flex: 1; }
.carte__corps h3 { margin-bottom: 10px; }
.carte__meta {
  font-size: .84rem; color: var(--gris);
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 16px;
}
.carte__corps p { color: var(--gris); font-size: .97rem; }
.carte__lien { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.carte__lien .btn { padding: 13px 22px; font-size: .88rem; }

/* ------------------------------------------------------------ Atouts --- */

.atouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 34px;
  margin-top: 54px;
}
.atout__icone {
  width: 46px; height: 46px; margin-bottom: 18px;
  color: var(--terracotta);
}
.section--foret .atout__icone { color: var(--mousse); }
.atout h3 { font-size: 1.28rem; margin-bottom: .4em; }
.atout p { font-size: .96rem; color: var(--gris); margin: 0; }
.section--foret .atout p { color: #c3ccc5; }

/* --------------------------------------------------------- Duo texte --- */

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(36px, 6vw, 76px);
  align-items: center;
}
.duo__img { border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.duo__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.duo--inverse .duo__img { order: 2; }

/* ------------------------------------------------------------- Avis --- */

.avis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 26px;
  margin-top: 50px;
}
.avis__carte {
  background: var(--blanc);
  padding: 32px 30px;
  border-radius: var(--rayon);
  box-shadow: var(--ombre-douce);
  display: flex; flex-direction: column;
}
.etoiles { color: var(--terracotta); letter-spacing: 2px; margin-bottom: 14px; font-size: .95rem; }
.avis__texte { font-size: .98rem; color: var(--encre); flex: 1; }
.avis__auteur {
  font-size: .82rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gris); margin: 18px 0 0;
}

.note-globale {
  display: inline-flex; align-items: baseline; gap: 12px;
  margin-top: 8px;
}
.note-globale strong { font-family: var(--serif); font-size: 3rem; color: var(--foret); line-height: 1; }
.note-globale span { color: var(--gris); font-size: .95rem; }

/* -------------------------------------------------------------- Hôte --- */

.hote { display: grid; grid-template-columns: 200px 1fr; gap: 44px; align-items: center; }
.hote__photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; box-shadow: var(--ombre); }
.hote__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pastille {
  font-size: .78rem; font-weight: 600;
  background: var(--sable); color: var(--foret);
  padding: 7px 16px; border-radius: 100px;
}
.section--foret .pastille { background: rgba(255,255,255,.12); color: var(--sable); }

/* ---------------------------------------------------------- Galerie --- */

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 46px;
}
.galerie button {
  padding: 0; border: 0; cursor: pointer; background: none;
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--rayon);
  position: relative;
}
.galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.galerie button:hover img { transform: scale(1.07); }
.galerie button:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

/* --------------------------------------------------------- Lightbox --- */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(18, 22, 19, .96);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox[open], .lightbox.est-ouvert { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 84vh;
  object-fit: contain; border-radius: var(--rayon);
}
.lightbox__legende {
  position: absolute; bottom: 22px; left: 0; right: 0;
  text-align: center; color: #d8d2c9; font-size: .9rem;
}
.lightbox__btn {
  position: absolute;
  background: rgba(255,255,255,.1); color: #fff;
  border: 0; width: 52px; height: 52px; border-radius: 50%;
  font-size: 1.5rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.lightbox__btn:hover { background: rgba(255,255,255,.24); }
.lightbox__fermer { top: 20px; right: 20px; }
.lightbox__prec { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__suiv { right: 20px; top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------- Fiche logement --- */

.fiche { display: grid; grid-template-columns: 1fr 340px; gap: clamp(36px, 5vw, 64px); align-items: start; }

.equipements {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 26px;
}
.equipements li {
  position: relative; padding-left: 28px; font-size: .97rem;
}
.equipements li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 15px; height: 8px;
  border-left: 2px solid var(--terracotta);
  border-bottom: 2px solid var(--terracotta);
  transform: rotate(-45deg);
}

.encadre {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--blanc);
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  padding: 30px 28px;
  box-shadow: var(--ombre-douce);
}
.encadre h3 { font-size: 1.35rem; margin-bottom: .5em; }
.encadre .btn { width: 100%; justify-content: center; margin-bottom: 12px; }
.encadre__note { font-size: .82rem; color: var(--gris); margin: 14px 0 0; line-height: 1.5; }

.infos-liste { list-style: none; padding: 0; margin: 0; }
.infos-liste li {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 13px 0; border-bottom: 1px solid var(--gris-clair);
  font-size: .94rem;
}
.infos-liste li:last-child { border-bottom: 0; }
.infos-liste dt, .infos-liste .cle { color: var(--gris); }
.infos-liste .val { font-weight: 600; text-align: right; }

/* ----------------------------------------------------------- Contact --- */

.contact-grille { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 5vw, 70px); align-items: start; }

.wa-carte {
  background: #eaf7ee;
  border: 1px solid #bfe6ca;
  border-radius: var(--rayon);
  padding: 30px 28px;
  margin: 30px 0 44px;
}
.wa-carte .btn { font-size: 1rem; padding: 17px 34px; }
.wa-carte__num { margin: 16px 0 0; font-size: .92rem; color: var(--gris); }

.wa-liens { list-style: none; padding: 0; margin: 20px 0 0; }
.wa-liens li { border-bottom: 1px solid var(--gris-clair); }
.wa-liens a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0;
  color: var(--encre); font-size: .97rem; text-decoration: none;
}
.wa-liens a::after {
  content: "\203A"; font-size: 1.5rem; line-height: 1; color: var(--terracotta);
  transition: transform var(--transition);
}
.wa-liens a:hover { color: var(--terracotta-fonce); text-decoration: none; }
.wa-liens a:hover::after { transform: translateX(4px); }

.coordonnees { list-style: none; padding: 0; margin: 0 0 32px; }
.coordonnees li { padding: 16px 0; border-bottom: 1px solid var(--gris-clair); }
.coordonnees .cle {
  display: block; font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gris); margin-bottom: 4px;
}

.carte-iframe {
  width: 100%; height: 320px; border: 0;
  border-radius: var(--rayon); box-shadow: var(--ombre-douce);
}

/* --------------------------------------------------------------- CTA --- */

.cta-final { text-align: center; }
.cta-final h2 { max-width: 18ch; margin-inline: auto; }
.cta-final .hero__actions { justify-content: center; }

/* ------------------------------------------------------------ Footer --- */

.footer { background: var(--encre); color: #b7b1a8; padding: 64px 0 32px; font-size: .92rem; }
.footer a { color: #d8d2c9; }
.footer__grille {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 44px;
}
.footer h4 {
  font-family: var(--sans); font-size: .76rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer .logo__nom { color: #fff; }
.footer__bas {
  border-top: 1px solid rgba(255,255,255,.13);
  padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: .84rem;
}

/* ------------------------------------------------------------ Reveal --- */

/* L'état masqué n'est appliqué QUE si le script a pu prendre la main (classe posée par
   main.js). Sans JS, ou si le script échoue, le contenu reste visible : une animation
   décorative ne doit jamais pouvoir cacher le contenu du site. */
.js-anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.js-anim .reveal.est-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-anim .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- WhatsApp --- */

.btn--wa { background: #25d366; color: #fff; }
.btn--wa:hover { background: #1da851; color: #fff; }
.btn__icone { width: 19px; height: 19px; fill: currentColor; flex: none; }

.wa-flottant {
  position: fixed;
  right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 26px rgba(20, 26, 22, .28);
  transition: var(--transition);
}
.wa-flottant:hover { background: #1da851; transform: scale(1.07); text-decoration: none; }
.wa-flottant svg { width: 31px; height: 31px; fill: currentColor; }

@media (max-width: 760px) {
  .wa-flottant { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .wa-flottant svg { width: 29px; height: 29px; }
}

/* ---------------------------------------------------------- Responsive --- */

@media (max-width: 900px) {
  .fiche, .contact-grille { grid-template-columns: 1fr; }
  .encadre { position: static; }
  .footer__grille { grid-template-columns: 1fr 1fr; }
  .hote { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .duo--inverse .duo__img { order: 0; }
}

/* La barre de navigation manque de place bien avant 760 px (6 entrées + logo) :
   on bascule sur le menu burger dès 980 px. */
@media (max-width: 980px) {
  .burger { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--creme);
    border-bottom: 1px solid var(--gris-clair);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 26px;
    transform: translateY(-130%);
    transition: transform var(--transition);
    box-shadow: var(--ombre);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.est-ouvert { transform: translateY(0); }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--gris-clair); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 18px; justify-content: center; border-bottom: 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .galerie button:nth-child(1) { grid-column: span 1; grid-row: span 1; aspect-ratio: 4 / 3; }
  .galerie { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .footer__grille { grid-template-columns: 1fr; }
  .lightbox__prec { left: 8px; }
  .lightbox__suiv { right: 8px; }
}
