/* ============================================================
   CHALET SYLVANA — Feuille de styles
   Mobile-first, sans dépendance externe.
   ============================================================ */

/* ---- VARIABLES : changez la palette ici ---- */
:root {
  /* ÉDITER ICI : palette de couleurs montagne */
  --vert-sapin:   #2f5d4e;   /* couleur principale (vert sapin)   */
  --vert-fonce:   #234539;   /* variante foncée (survol, footer)  */
  --beige-bois:   #d8c3a5;   /* accents bois                      */
  --beige-clair:  #f3ece0;   /* fonds alternés                    */
  --blanc-neige:  #fdfcf9;   /* fond principal                    */
  --texte:        #2b2b28;   /* texte courant                     */
  --texte-clair:  #6b6b63;   /* texte secondaire                  */

  /* Réglages divers */
  --max-width: 1100px;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .08);

  /* ÉDITER ICI : image de fond du Hero */
  --hero-image: url("../images/Mountain.jpg");
}

/* ---- RESET LÉGER ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;       /* smooth scroll natif */
  scroll-padding-top: 70px;      /* compense la nav fixe */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--texte);
  background: var(--blanc-neige);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- CONTENEUR ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(35, 69, 57, .96);
  backdrop-filter: blur(6px);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  color: var(--blanc-neige);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav__links {
  display: none;
  gap: 1.5rem;
}

.nav__links a {
  color: var(--blanc-neige);
  font-size: .95rem;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.nav__links a:hover { border-color: var(--beige-bois); }

/* Sélecteur de langue (FR / EN) */
.nav__links a.nav__lang {
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 3px;
  padding: .1rem .5rem;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav__links a.nav__lang:hover { border-color: var(--beige-bois); color: var(--beige-bois); }

/* Bouton hamburger (mobile) */
.nav__toggle {
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: .25rem;
}
.nav__toggle span {
  width: 26px;
  height: 3px;
  background: var(--blanc-neige);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* Menu ouvert (mobile) */
.nav__links.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--vert-fonce);
  padding: 1rem 1.25rem 1.5rem;
  gap: 1rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--hero-image) center / cover no-repeat;
  background-color: var(--vert-sapin); /* fallback si l'image manque */
  padding: 6rem 1.25rem;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(20, 35, 28, .35), rgba(20, 35, 28, .6));
}

.hero__content { position: relative; color: #fff; max-width: 720px; }

.hero__title {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .4);
}

.hero__tagline {
  font-size: clamp(1.05rem, 3.5vw, 1.4rem);
  margin: 1rem 0 2rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: .8rem 1.8rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--beige-bois);
  color: var(--vert-fonce);
  border: 2px solid var(--beige-bois);
}
.btn--primary:hover { background: #e6d4ba; }

.btn--outline {
  background: transparent;
  color: var(--vert-sapin);
  border: 2px solid var(--vert-sapin);
}
.btn--outline:hover { background: var(--vert-sapin); color: #fff; }

/* ============================================================
   SECTIONS GÉNÉRIQUES
   ============================================================ */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--beige-clair); }

.section__title {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  color: var(--vert-sapin);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}
.section__title::after {
  content: "";
  display: block;
  width: 60px; height: 3px;
  background: var(--beige-bois);
  margin: .75rem auto 0;
  border-radius: 2px;
}

.lead {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--texte-clair);
}

/* ---- Chiffres clés (Le chalet) ---- */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}
.fact {
  background: var(--blanc-neige);
  border: 1px solid var(--beige-bois);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.fact__num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--vert-sapin);
}
.fact__label { color: var(--texte-clair); font-size: .95rem; }

/* ============================================================
   ÉQUIPEMENTS
   ============================================================ */
.equip {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 3rem;
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--beige-bois);
}
.equip__item {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  padding: .95rem .25rem;
  border-bottom: 1px solid var(--beige-bois);
  font-size: 1.02rem;
  letter-spacing: .015em;
  color: var(--texte);
}
/* Discret marqueur losange en fil vert sapin (remplace les icônes) */
.equip__item::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: .15rem;
  border: 1px solid var(--vert-sapin);
  transform: rotate(45deg);
}

/* ============================================================
   GALERIE
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

/* ---- Carte pivotante (flip 3D) ---- */
.flip-card {
  aspect-ratio: 4 / 3;
  perspective: 1100px;
  background: var(--blanc-neige);   /* même fond que la page (visible pendant la rotation) */
  border-radius: var(--radius);
}
.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .9s cubic-bezier(.45, .05, .25, 1);
  transform-style: preserve-3d;
}
.flip-card__inner.is-flipped { transform: rotateY(180deg); }
.flip-card__face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-card__back { transform: rotateY(180deg); }
.flip-card__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lien « Voir plus » sous la galerie */
.gallery__more {
  text-align: center;
  margin-top: 1.75rem;
}

/* Bouton d'appel à l'action centré (ex. lien vers la page Situation) */
.section__cta {
  text-align: center;
  margin-top: 1.75rem;
}

/* Accessibilité : pas d'animation si l'utilisateur la refuse */
@media (prefers-reduced-motion: reduce) {
  .flip-card__inner { transition: none; }
}

/* ============================================================
   TARIFS
   ============================================================ */
.table-wrap { overflow-x: auto; }
.rates {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--blanc-neige);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.rates th, .rates td {
  padding: .9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--beige-clair);
}
.rates thead th {
  background: var(--vert-sapin);
  color: #fff;
}
.rates tbody tr:last-child td { border-bottom: 0; }
.rates tbody tr:nth-child(even) { background: var(--beige-clair); }

.note {
  text-align: center;
  margin-top: 1rem;
  color: var(--texte-clair);
  font-size: .9rem;
}

/* ============================================================
   FORMULAIRE CONTACT
   ============================================================ */
.form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form__row { display: flex; flex-direction: column; gap: 1rem; }

.form__field { display: flex; flex-direction: column; gap: .35rem; }
.form__field span { font-weight: 600; font-size: .95rem; }

.form__field input,
.form__field textarea {
  font: inherit;
  padding: .7rem .9rem;
  border: 1px solid var(--beige-bois);
  border-radius: var(--radius);
  background: var(--blanc-neige);
  resize: vertical;
}
.form__field input:focus,
.form__field textarea:focus {
  outline: 2px solid var(--vert-sapin);
  outline-offset: 1px;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--vert-fonce);
  color: var(--blanc-neige);
  padding: 1.5rem 0;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
}
.footer__link {
  color: var(--beige-bois);
  border-bottom: 1px solid transparent;
}
.footer__link:hover { border-color: var(--beige-bois); }

/* ============================================================
   RESPONSIVE — à partir des tablettes / desktop
   ============================================================ */
@media (min-width: 720px) {
  .nav__toggle { display: none; }
  .nav__links { display: flex; }

  .facts { grid-template-columns: repeat(4, 1fr); }
  .equip { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }

  .form__row { flex-direction: row; }
  .form__row .form__field { flex: 1; }

  .footer__inner { flex-direction: row; justify-content: space-between; }
}
