/* ============================================================
   Ana Sun · Albufeira — charte graphique « soleil & vacances »
   Palette : sable doré, terracotta, mer turquoise
   ============================================================ */

:root {
  --sea:        #0e7c86;   /* turquoise profond */
  --sea-deep:   #0a5a62;
  --sea-soft:   #2aa7ab;
  --sun:        #f4a93d;   /* soleil */
  --sun-deep:   #e08a2b;
  --terra:      #c75d3a;   /* terracotta */
  --terra-deep: #a8462a;
  --sand:       #fbf5ea;   /* fond crème */
  --sand-2:     #f3e7d2;
  --sand-3:     #ead9bd;
  --cream:      #fffdf8;
  --ink:        #2c2620;   /* brun chaud foncé */
  --muted:      #786a59;
  --line:       #e7dcc7;
  --shadow:     0 14px 40px rgba(70, 45, 20, 0.12);
  --shadow-lg:  0 28px 70px rgba(70, 45, 20, 0.20);
  --radius:     22px;
  --radius-sm:  14px;
  --maxw:       1180px;
  --serif:      "Playfair Display", Georgia, serif;
  --sans:       "DM Sans", system-ui, -apple-system, sans-serif;
  --script:     "Caveat", "Segoe Script", cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; font-weight: 700; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 90%; max-width: var(--maxw); margin: 0 auto; }
section { padding: 84px 0; }

.eyebrow {
  font-family: var(--script);
  font-size: 1.6rem;
  color: var(--terra);
  line-height: 1;
  margin-bottom: 6px;
}
.section-title { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--sea-deep); margin-bottom: 16px; letter-spacing: -0.5px; }
.section-intro { max-width: 660px; color: var(--muted); margin-bottom: 50px; font-size: 1.05rem; }
.center { text-align: center; }
.center .section-intro { margin-left: auto; margin-right: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 30px; border-radius: 50px;
  font-family: var(--sans); font-weight: 600; font-size: 0.97rem; cursor: pointer;
  border: 2px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--terra); color: #fff; box-shadow: 0 10px 24px rgba(199,93,58,0.32); }
.btn-primary:hover { background: var(--terra-deep); transform: translateY(-2px); }
.btn-sun { background: var(--sun); color: #4a2f12; box-shadow: 0 10px 24px rgba(244,169,61,0.38); }
.btn-sun:hover { background: var(--sun-deep); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--sea-deep); border-color: var(--sea); }
.btn-outline:hover { background: var(--sea); color: #fff; }
.btn-light { background: rgba(255,255,255,0.92); color: var(--sea-deep); }
.btn-light:hover { background: #fff; transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,245,234,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(120,90,40,0.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--sea-deep); }
.brand .dot { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--sun), var(--terra)); box-shadow: 0 0 0 5px rgba(244,169,61,0.18); flex: none; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-size: 0.97rem; font-weight: 500; color: var(--ink); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--terra); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; gap: 3px; background: var(--sand-2); border-radius: 50px; padding: 4px; }
.lang-switch button {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 0.76rem;
  padding: 6px 12px; border-radius: 50px; color: var(--muted); transition: all .15s;
}
.lang-switch button.active { background: var(--cream); color: var(--sea-deep); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--sea-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: flex-end;
  color: #fff;
  background: var(--hero-img, linear-gradient(135deg,#0e7c86,#2aa7ab));
  background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,40,45,0.30) 0%, rgba(20,40,45,0.05) 35%, rgba(40,30,20,0.55) 100%);
}
.hero-inner { position: relative; z-index: 2; padding-bottom: 8vh; max-width: 780px; }
.hero .eyebrow { color: #ffe2b0; font-size: 1.9rem; text-shadow: 0 2px 16px rgba(0,0,0,.3); }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); margin-bottom: 18px; text-shadow: 0 4px 30px rgba(0,0,0,0.35); }
.hero p { font-size: 1.2rem; max-width: 600px; margin-bottom: 32px; text-shadow: 0 2px 14px rgba(0,0,0,0.35); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-bar {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 26px; align-items: center;
  background: rgba(255,255,255,0.94); color: var(--ink);
  border-radius: 18px; padding: 18px 28px; box-shadow: var(--shadow);
  margin-top: -38px; margin-bottom: 0;
}
.trust-bar .ti { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 500; }
.trust-bar .ti strong { color: var(--sea-deep); }
.trust-bar svg { flex: none; color: var(--terra); }
.trust-bar .star { color: var(--sun-deep); }
.trust-sep { width: 1px; height: 26px; background: var(--line); }

/* ---------- Cartes appartements ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; }
.card {
  background: var(--cream); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.badge-type {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: rgba(255,255,255,0.95); color: var(--sea-deep);
  font-weight: 700; font-size: 0.78rem; padding: 7px 14px; border-radius: 50px;
  display: flex; align-items: center; gap: 7px; box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.badge-type.sea { background: var(--sea); color: #fff; }
.card-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.7rem; color: var(--sea-deep); margin-bottom: 6px; }
.card-sub { color: var(--terra); font-weight: 600; font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.card-body p { color: var(--muted); margin-bottom: 20px; }
.card-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.card-feats li { background: var(--sand-2); border-radius: 50px; padding: 6px 14px; font-size: 0.82rem; color: var(--sea-deep); font-weight: 500; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--serif); font-size: 1.5rem; color: var(--sea-deep); }
.price span { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); font-weight: 400; }

/* ---------- Région / Algarve (collage photos) ---------- */
.region { background: linear-gradient(180deg, var(--sand) 0%, var(--sand-2) 100%); }
.region-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 220px 220px;
}
.region-grid .r-item { border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.region-grid .r-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.region-grid .r-item:hover img { transform: scale(1.07); }
.region-grid .tall { grid-row: span 2; }
.region-grid .wide { grid-column: span 2; }
.r-cap {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 26px 18px 14px; color: #fff; font-weight: 600; font-size: 0.95rem;
  background: linear-gradient(transparent, rgba(20,30,25,0.7));
}

/* ---------- Résidence (split image + texte) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 5/4; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chips li { display: flex; align-items: center; gap: 8px; background: var(--cream); border: 1px solid var(--line); border-radius: 50px; padding: 8px 16px; font-size: 0.9rem; font-weight: 500; }
.chips svg { color: var(--sea); flex: none; }

/* ---------- Confort / atouts (icônes SVG) ---------- */
.features { background: var(--cream); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { padding: 30px 24px; border-radius: var(--radius-sm); background: var(--sand); transition: transform .25s, box-shadow .25s; }
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: linear-gradient(135deg, var(--sun), var(--terra)); color: #fff; }
.feature h4 { font-family: var(--sans); font-weight: 700; margin-bottom: 7px; color: var(--sea-deep); font-size: 1.05rem; }
.feature p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery .g-item { aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; }
.gallery .g-item.wide { grid-column: span 2; aspect-ratio: 2/1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.gallery .g-item:hover img { transform: scale(1.08); }

/* Placeholder photo (si image absente) */
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 12px; background: linear-gradient(135deg, var(--sea-soft), var(--sea)); color: #fff; }
.ph .ph-ic { font-size: 1.6rem; opacity: .85; }
.ph .ph-name { font-size: 0.72rem; font-weight: 600; opacity: .92; word-break: break-all; }
.ph small { font-size: 0.66rem; opacity: .75; }

/* ---------- Page détail ---------- */
.detail-hero { position: relative; height: 60vh; min-height: 420px; border-radius: 0; overflow: hidden; display: flex; align-items: flex-end; color: #fff; }
.detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(30,25,18,0.72)); }
.detail-hero .dh-body { position: relative; z-index: 2; padding: 40px; width: 100%; }
.detail-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 8px; text-shadow: 0 3px 20px rgba(0,0,0,.4); }
.detail-hero .loc { color: #ffe2b0; font-weight: 600; }
.spec-list { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.spec-list li { display: flex; align-items: center; gap: 9px; font-size: 0.95rem; background: var(--cream); border: 1px solid var(--line); border-radius: 50px; padding: 9px 18px; font-weight: 500; }
.spec-list svg { color: var(--terra); flex: none; }

.amenities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.amenity { display: flex; align-items: center; gap: 12px; background: var(--cream); padding: 15px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: 0.93rem; font-weight: 500; }
.amenity svg { color: var(--sea); flex: none; }

.prose { max-width: 760px; }
.prose p { margin-bottom: 16px; color: var(--ink); font-size: 1.05rem; }

/* ---------- Calendrier ---------- */
.booking-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.calendar { background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cal-head button { background: var(--sand-2); border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; color: var(--sea-deep); transition: background .15s; }
.cal-head button:hover { background: var(--sand-3); }
.cal-title { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--sea-deep); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 6px 0; }
.cal-day { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 500; border-radius: 10px; cursor: pointer; transition: background .12s, color .12s; }
.cal-day.empty { cursor: default; }
.cal-day.available:hover { background: var(--sea-soft); color: #fff; }
.cal-day.occupied { background: repeating-linear-gradient(45deg, #f0d9c9, #f0d9c9 4px, #f8e9dd 4px, #f8e9dd 8px); color: #b06a4f; cursor: not-allowed; text-decoration: line-through; }
.cal-day.past { color: #cdbfa9; cursor: not-allowed; }
.cal-day.selected { background: var(--terra); color: #fff; font-weight: 700; }
.cal-day.in-range { background: rgba(199,93,58,0.16); color: var(--terra-deep); }
.cal-legend { display: flex; gap: 18px; margin-top: 18px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.cal-legend span { display: flex; align-items: center; gap: 7px; }
.cal-legend .sw { width: 14px; height: 14px; border-radius: 4px; }
.sw.av { background: var(--sea-soft); }
.sw.oc { background: #ecc8b4; }
.sw.se { background: var(--terra); }

.booking-summary { background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.booking-summary h3 { color: var(--sea-deep); margin-bottom: 18px; font-size: 1.4rem; }
.sum-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 0.96rem; }
.sum-row.total { border-bottom: none; font-family: var(--serif); font-size: 1.3rem; color: var(--sea-deep); padding-top: 16px; }
.sum-hint { font-size: 0.85rem; color: var(--muted); margin: 14px 0 20px; }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--sea-deep); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 0.96rem; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sea-soft); box-shadow: 0 0 0 3px rgba(42,167,171,0.14); }
.field textarea { resize: vertical; min-height: 120px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sea-deep); color: #cfe7e9; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px; margin-bottom: 40px; }
.footer-grid h4 { font-family: var(--sans); color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-grid a, .footer-grid p { color: #a9d2d4; font-size: 0.93rem; display: block; margin-bottom: 9px; }
.footer-grid a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 24px; text-align: center; font-size: 0.85rem; color: #8fbfc1; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(25,20,12,0.93); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92%; max-height: 88vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox .lb-close { position: absolute; top: 22px; right: 30px; font-size: 2.4rem; color: #fff; cursor: pointer; background: none; border: none; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--sea-deep); color: #fff; padding: 15px 28px; border-radius: 50px; box-shadow: var(--shadow-lg); transition: transform .35s; z-index: 1100; font-size: 0.93rem; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 62px 0 auto 0; flex-direction: column; background: var(--cream); padding: 24px; gap: 18px; box-shadow: var(--shadow); display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .cards, .feature-grid, .gallery, .booking-wrap, .form-grid, .footer-grid, .amenities, .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .region-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 170px); }
  .region-grid .tall { grid-row: span 1; }
  .region-grid .wide { grid-column: span 2; }
  .gallery .g-item.wide { grid-column: span 2; aspect-ratio: 2/1; }
  .hero { min-height: 86vh; }
}
@media (max-width: 540px) {
  .feature-grid { grid-template-columns: 1fr; }
  .amenities { grid-template-columns: 1fr; }
  .trust-bar { gap: 14px; }
  .trust-sep { display: none; }
}
