/* ============================================================
   LES GÎTES D'ARLES — Design system v2
   Créole éditorial : vert jungle, crème, terracotta, bois
   Typographie : Fraunces (display) + Figtree (texte)
   ============================================================ */

:root {
  --creme: #f6f2e8;
  --creme-2: #efe9da;
  --jungle: #1e3527;
  --jungle-2: #2c4b36;
  --terracotta: #c25b3a;
  --terracotta-2: #a84a2c;
  --or: #d9a441;
  --bois: #7c5233;
  --encre: #20261f;
  --gris: #6d7166;
  --blanc: #fdfcf9;
  --ok: #2e7d4f;
  --attente: #b07d1e;
  --refus: #b3402e;
  /* Alias de compatibilité (anciens noms utilisés dans suivi/proprietaire) */
  --sable: #efe9da;
  --sable-fonce: #d8cdb6;
  --foret: #1e3527;
  --corail: #c25b3a;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Figtree', 'Helvetica Neue', sans-serif;
  --ombre: 0 14px 44px rgba(30, 53, 39, 0.12);
  --radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--creme);
  color: var(--encre);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--terracotta); color: var(--blanc); }

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 480;
  color: var(--jungle);
  line-height: 1.06;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h3 { font-size: 1.4rem; }
em.accent { font-style: italic; color: var(--terracotta); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.section { padding: 100px 0; }
.section-creme2 { background: var(--creme-2); }
.section-jungle { background: var(--jungle); }
.section-jungle h2, .section-jungle h3 { color: var(--creme); }
.section-jungle p { color: rgba(246, 242, 232, 0.82); }

.surtitre {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 20px;
  font-weight: 700;
}
.surtitre::before { content: ''; width: 34px; height: 1.5px; background: var(--terracotta); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 36px;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
}
.nav.solid { background: rgba(246, 242, 232, 0.97); box-shadow: 0 1px 0 rgba(30,53,39,0.08); backdrop-filter: blur(10px); padding: 14px 36px; }
.nav-logo { font-family: var(--serif); font-size: 1.5rem; color: var(--jungle); font-weight: 600; letter-spacing: -0.01em; }
.nav-logo span { color: var(--terracotta); font-style: italic; }
.nav.on-hero:not(.solid) .nav-logo, .nav.on-hero:not(.solid) .nav-links a:not(.btn) { color: var(--blanc); }
.nav-links { display: flex; gap: 30px; align-items: center; font-size: 0.92rem; font-weight: 500; margin-left: auto; }
.nav-links a:not(.btn) { opacity: 0.88; border-bottom: 1.5px solid transparent; padding-bottom: 2px; }
.nav-links a:not(.btn):hover { opacity: 1; border-bottom-color: var(--terracotta); }

.btn {
  display: inline-block;
  background: var(--terracotta);
  color: var(--blanc) !important;
  padding: 14px 32px;
  border-radius: 2px;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
}
.btn:hover { background: var(--terracotta-2); transform: translateY(-2px); }
.btn-ghost { background: transparent; border: 1.5px solid currentColor; color: var(--jungle) !important; }
.btn-ghost:hover { background: var(--jungle); border-color: var(--jungle); color: var(--blanc) !important; }
.btn-sm { padding: 10px 22px; font-size: 0.8rem; }
.btn-blanc { background: var(--creme); color: var(--jungle) !important; }
.btn-blanc:hover { background: var(--blanc); }

/* ---------- Hero vidéo ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: flex-end;
  position: relative;
  color: var(--blanc);
  overflow: hidden;
}
.hero .diapo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 2.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.08);
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.hero .diapo.actif {
  opacity: 1;
  z-index: 1;
}
.hero .diapo.actif, .hero .diapo.precedent {
  animation: kenburns 9s linear forwards;
}
.hero .diapo.precedent { opacity: 1; z-index: 0; transition: none; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-points {
  position: absolute; right: 36px; bottom: 76px; z-index: 3;
  display: flex; flex-direction: column; gap: 10px;
}
.hero-points button {
  width: 9px; height: 9px; border-radius: 50%; border: none;
  background: rgba(253, 252, 249, 0.45); padding: 0;
}
.hero-points button.actif { background: var(--or); }
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,30,22,0.35) 0%, rgba(20,30,22,0.18) 40%, rgba(20,30,22,0.80) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 0 36px 72px; width: 100%; max-width: 1240px; margin: 0 auto; }
.hero h1 { color: var(--blanc); margin: 10px 0 18px; max-width: 14ch; }
.hero h1 em { font-style: italic; color: var(--or); }
.hero p { font-size: 1.12rem; opacity: 0.9; max-width: 52ch; margin-bottom: 32px; }
.hero .surtitre { color: var(--or); }
.hero .surtitre::before { background: var(--or); }
.hero-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }

/* ---------- Marquee ---------- */

/* ---------- Liste éditoriale des logements ---------- */
.logement-ligne {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 70px 0;
  border-top: 1px solid rgba(30, 53, 39, 0.14);
}
.logement-ligne:nth-child(even) { direction: rtl; }
.logement-ligne:nth-child(even) > * { direction: ltr; }
.logement-visuel { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--ombre); }
.logement-visuel img { width: 100%; height: 460px; object-fit: cover; transition: transform 0.6s ease; }
.logement-ligne:hover .logement-visuel img { transform: scale(1.045); }
.badge-video {
  position: absolute; top: 16px; right: 16px;
  background: rgba(20, 30, 22, 0.72); color: var(--blanc);
  padding: 7px 14px; border-radius: 30px; font-size: 0.75rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.logement-info .numero {
  font-family: var(--serif); font-size: 1rem; color: var(--terracotta);
  font-style: italic; letter-spacing: 0.05em;
}
.logement-info .type-tag { font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gris); font-weight: 700; margin-left: 12px; }
.logement-info h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 10px 0 4px; }
.logement-info .accroche { font-family: var(--serif); font-style: italic; color: var(--bois); font-size: 1.1rem; margin-bottom: 16px; }
.logement-info .desc { color: var(--gris); font-size: 0.98rem; max-width: 46ch; margin-bottom: 22px; }
.logement-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  border: 1px solid rgba(30, 53, 39, 0.25);
  border-radius: 30px; padding: 6px 16px; font-size: 0.8rem; color: var(--jungle); font-weight: 500;
}
.logement-pied { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.logement-pied .prix { font-family: var(--serif); font-size: 1.6rem; color: var(--jungle); }
.logement-pied .prix small { font-family: var(--sans); font-size: 0.78rem; color: var(--gris); }

/* ---------- Galerie horizontale ---------- */
.defileur { display: flex; gap: 18px; overflow-x: auto; padding: 10px 4px 22px; scroll-snap-type: x mandatory; }
.defileur::-webkit-scrollbar { height: 8px; }
.defileur::-webkit-scrollbar-thumb { background: var(--jungle-2); border-radius: 4px; }
.defileur::-webkit-scrollbar-track { background: rgba(30,53,39,0.08); }
.defileur > * { flex: 0 0 auto; width: 400px; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; }
.defileur img, .defileur video { width: 100%; height: 300px; object-fit: cover; }

/* ---------- Grille galerie (toutes les photos) ---------- */
.galerie-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.galerie-grille > div {
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  aspect-ratio: 4 / 3; background: var(--creme-2);
}
.galerie-grille img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.galerie-grille > div:hover img { transform: scale(1.05); }

/* ---------- Galerie fiche logement ---------- */
.galerie-fiche { display: grid; grid-template-columns: 1.9fr 0.95fr 0.95fr; gap: 14px; height: 540px; }
.galerie-fiche .principale { border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; }
.galerie-fiche .principale img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.galerie-fiche .principale:hover img { transform: scale(1.03); }
.galerie-fiche .cadre-video { border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; }
.galerie-fiche .cadre-video video { width: 100%; height: 100%; object-fit: cover; }
.galerie-fiche .colonne { display: grid; grid-template-rows: 1fr 1fr; gap: 14px; min-height: 0; }
.galerie-fiche .colonne > div { border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; min-height: 0; }
.galerie-fiche .colonne img { width: 100%; height: 100%; object-fit: cover; }
.voir-tout {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 30, 22, 0.55); color: var(--blanc); font-weight: 600; font-size: 0.95rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(18, 24, 19, 0.96);
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 18px; padding: 40px;
}
.lightbox.ouvert { display: flex; }
.lightbox img, .lightbox video { max-height: 78vh; max-width: 92vw; border-radius: var(--radius); object-fit: contain; }
.lightbox .lb-barre { display: flex; gap: 20px; align-items: center; color: var(--creme); }
.lightbox button { background: rgba(246,242,232,0.12); color: var(--creme); border: none; border-radius: 30px; padding: 10px 20px; font-size: 0.9rem; }
.lightbox button:hover { background: rgba(246,242,232,0.25); }

/* ---------- Calendrier ---------- */
.calendrier { background: var(--blanc); border-radius: var(--radius); box-shadow: var(--ombre); padding: 28px; max-width: 430px; }
.cal-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-tete .mois { font-family: var(--serif); font-size: 1.25rem; color: var(--jungle); text-transform: capitalize; }
.cal-nav { background: var(--creme-2); border: none; width: 38px; height: 38px; border-radius: 50%; font-size: 1.05rem; color: var(--jungle); }
.cal-nav:hover { background: var(--jungle); color: var(--creme); }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grille .jour-nom { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gris); padding: 6px 0; font-weight: 700; }
.cal-case { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 0.88rem; }
.cal-case.libre { background: #ecf1e9; color: var(--jungle); }
.cal-case.occupe { background: #e4d8c6; color: #9b8f7a; text-decoration: line-through; }
.cal-case.passe { color: #c8c8bf; }
.cal-legende { display: flex; gap: 18px; margin-top: 16px; font-size: 0.8rem; color: var(--gris); }
.cal-legende span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cal-legende .l-libre::before { background: #ecf1e9; border: 1px solid #cddbc8; }
.cal-legende .l-occupe::before { background: #e4d8c6; }

/* ---------- Formulaires ---------- */
.form-carte { background: var(--blanc); border-radius: var(--radius); box-shadow: var(--ombre); padding: 36px; }
.champ { margin-bottom: 18px; }
.champ label { display: block; font-size: 0.76rem; font-weight: 700; color: var(--jungle); margin-bottom: 7px; letter-spacing: 0.14em; text-transform: uppercase; }
.champ input, .champ select, .champ textarea {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid rgba(30, 53, 39, 0.22);
  border-radius: 3px; font-family: inherit; font-size: 0.96rem;
  background: var(--creme); color: var(--encre);
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--terracotta); }
.champ-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.recap-prix { background: var(--creme-2); border-radius: 3px; padding: 18px 20px; margin: 18px 0; font-size: 0.95rem; }
.recap-prix .total { font-family: var(--serif); font-size: 1.55rem; color: var(--jungle); }

.alerte { padding: 14px 18px; border-radius: 3px; margin: 14px 0; font-size: 0.92rem; }
.alerte-ok { background: #e7f2ea; color: var(--ok); }
.alerte-err { background: #f8e7e3; color: var(--refus); }
.alerte-info { background: #fdf3e3; color: var(--attente); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 4px 14px; border-radius: 30px; font-size: 0.78rem; font-weight: 700; }
.badge-attente { background: #fdf3e3; color: var(--attente); }
.badge-confirmee { background: #e7f2ea; color: var(--ok); }
.badge-refusee { background: #f8e7e3; color: var(--refus); }
.badge-source { background: var(--creme-2); color: var(--jungle); }

/* ---------- Tableaux ---------- */
.tableau { width: 100%; border-collapse: collapse; background: var(--blanc); border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); font-size: 0.9rem; }
.tableau th { background: var(--jungle); color: var(--creme); text-align: left; padding: 13px 16px; font-weight: 600; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; }
.tableau td { padding: 13px 16px; border-bottom: 1px solid var(--creme-2); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: none; }
.scroll-x { overflow-x: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--jungle); color: rgba(246, 242, 232, 0.85); padding: 70px 0 30px; }
.footer h3 { color: var(--creme); }
.footer-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-bottom: 46px; }
.footer a:hover { color: var(--or); }
.footer .mention { border-top: 1px solid rgba(246, 242, 232, 0.15); padding-top: 22px; font-size: 0.8rem; opacity: 0.65; text-align: center; }

/* ---------- Divers ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
/* sans min-width:0, un défileur horizontal élargit sa colonne et fait déborder la page */
.duo > * { min-width: 0; }
.demo-tag {
  display: inline-block;
  background: var(--terracotta); color: var(--blanc);
  padding: 4px 12px; border-radius: 30px;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  margin-right: 14px; vertical-align: middle;
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.vu { opacity: 1; transform: none; }

/* ---------- Menu mobile ---------- */
.nav-burger {
  display: none;
  background: none; border: none; padding: 8px; margin-left: auto;
  width: 44px; height: 44px; position: relative;
}
.nav-burger span {
  display: block; height: 2px; width: 24px; margin: 5px auto;
  background: var(--jungle); transition: transform 0.3s, opacity 0.3s;
}
.nav.on-hero:not(.solid) .nav-burger span { background: var(--blanc); }
.menu-mobile {
  position: fixed; inset: 0; z-index: 99;
  background: var(--jungle);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 40px 32px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
}
.menu-mobile.ouvert { opacity: 1; visibility: visible; }
.menu-mobile a {
  font-family: var(--serif); font-size: 1.9rem; color: var(--creme);
  padding: 12px 0; border-bottom: 1px solid rgba(246,242,232,0.14);
}
.menu-mobile a.btn {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  border-bottom: none; margin-top: 22px; text-align: center;
}
/* menu ouvert : la nav reste lisible par-dessus le panneau sombre */
body.menu-ouvert .nav.solid { background: transparent; box-shadow: none; backdrop-filter: none; }
body.menu-ouvert .nav-logo, body.menu-ouvert .nav-logo span { color: var(--creme); }
body.menu-ouvert .nav-burger span { background: var(--creme); }
body.menu-ouvert .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-ouvert .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-ouvert .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


@media (max-width: 900px) {
  .nav { padding: 14px 18px; gap: 10px; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-logo { font-size: 1.15rem; white-space: nowrap; }
  .demo-tag { font-size: 0.58rem; padding: 3px 9px; letter-spacing: 0.16em; margin-right: 10px; }
  /* le surtitre tient sur une ligne au lieu de casser en deux */
  .surtitre { font-size: 0.6rem; letter-spacing: 0.16em; gap: 9px; }
  .surtitre::before { width: 20px; }
  /* les points passent à l'horizontale pour ne plus chevaucher le texte */
  .hero-points { flex-direction: row; right: auto; left: 20px; bottom: 22px; gap: 8px; }
  .hero-inner { padding-bottom: 72px; }
  /* vignettes plus étroites que l'écran, pour montrer qu'on peut faire défiler */
  .defileur > * { width: 78vw; max-width: 300px; }
  .defileur img, .defileur video { height: 230px; }
  .duo { grid-template-columns: 1fr; gap: 40px; }
  .logement-ligne { grid-template-columns: 1fr; gap: 26px; padding: 50px 0; }
  .logement-visuel img { height: 300px; }
  .galerie-fiche { grid-template-columns: 1fr 1fr; height: auto; }
  .galerie-fiche .principale { grid-column: 1 / -1; }
  .galerie-fiche .principale img { height: 320px; }
  .galerie-fiche .cadre-video video { height: 420px; }
  .galerie-fiche .colonne { grid-template-rows: 1fr 1fr; height: 420px; }
  .champ-duo { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-inner { padding: 0 20px 56px; }
}
