/* ============ Villa EVA — design nature corse ============ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --maquis: #2f4a38;        /* vert maquis profond */
  --maquis-light: #4a6b52;
  --olive: #7d8c5c;
  --terracotta: #c4754e;
  --terracotta-dark: #a85c38;
  --sable: #f6f0e4;         /* sable clair */
  --sable-dark: #ece2cd;
  --mer: #3a7d8c;           /* bleu méditerranée */
  --encre: #26302a;
  --blanc: #fdfbf6;
  --ok: #3e7d4f;
  --warn: #b98a2e;
  --err: #b04632;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(38, 48, 42, .12);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--encre); background: var(--sable); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--mer); text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); color: var(--maquis); font-weight: 600; line-height: 1.15; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); margin-bottom: .4rem; }
.section { max-width: 1120px; margin: 0 auto; padding: 4.5rem 1.4rem; }
.kicker { text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; color: var(--terracotta); font-weight: 600; margin-bottom: .5rem; }
.lead { font-size: 1.08rem; color: #4b564f; max-width: 64ch; }

/* ---------- Header ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.6rem; transition: background .3s, box-shadow .3s;
}
.topbar.scrolled { background: rgba(253, 251, 246, .94); backdrop-filter: blur(8px); box-shadow: 0 2px 16px rgba(0,0,0,.08); }
.brand { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: #fff; letter-spacing: .04em; }
.brand .leaf { color: var(--olive); }
.topbar.scrolled .brand { color: var(--maquis); }
nav.mainnav { display: flex; gap: 1.4rem; align-items: center; }
nav.mainnav a { color: #fff; font-size: .92rem; font-weight: 500; letter-spacing: .04em; }
.topbar.scrolled nav.mainnav a { color: var(--encre); }
nav.mainnav a:hover { color: var(--terracotta); }
.lang-switch { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.45); color: #fff; border-radius: 99px; padding: .25rem .8rem; cursor: pointer; font-family: var(--sans); font-size: .85rem; }
.topbar.scrolled .lang-switch { border-color: var(--maquis); color: var(--maquis); background: transparent; }
.btn-nav { background: var(--terracotta); color: #fff !important; padding: .45rem 1.1rem; border-radius: 99px; }
.btn-nav:hover { background: var(--terracotta-dark); color: #fff !important; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,30,24,.45) 0%, rgba(20,30,24,.25) 45%, rgba(38,48,42,.65) 100%); }
.hero-inner { position: relative; z-index: 2; color: #fff; padding: 1rem; max-width: 820px; }
.hero-inner .kicker { color: #f0d9a8; }
.hero-inner h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 600; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero-inner p { font-size: 1.15rem; margin-top: .8rem; opacity: .94; }
.hero-cta { display: inline-block; margin-top: 1.8rem; background: var(--terracotta); color: #fff; padding: .85rem 2.2rem; border-radius: 99px; font-weight: 500; letter-spacing: .05em; transition: transform .2s, background .2s; }
.hero-cta:hover { background: var(--terracotta-dark); transform: translateY(-2px); }
.hero-badges { display: flex; gap: 1.6rem; justify-content: center; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-badges span { font-size: .9rem; opacity: .92; display: flex; align-items: center; gap: .4rem; }

/* ---------- Highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; margin-top: 2.2rem; }
.hl-card { background: var(--blanc); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); border-top: 3px solid var(--olive); }
.hl-card .ico { font-size: 1.7rem; }
.hl-card h3 { font-size: 1.25rem; margin: .5rem 0 .3rem; }
.hl-card p { font-size: .93rem; color: #55605a; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: .7rem; margin-top: 2rem; }
.gallery .gitem { border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; }
.gallery .gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.gallery .gitem:hover img { transform: scale(1.06); }
.gallery .gitem:first-child { grid-column: span 2; grid-row: span 2; }
.lightbox { position: fixed; inset: 0; background: rgba(15,20,17,.92); z-index: 100; display: none; align-items: center; justify-content: center; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 10px; object-fit: contain; }
.lightbox .caption { color: #ddd; margin-top: .8rem; font-size: .95rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; font-size: 1.6rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
.lightbox .close { top: 1.2rem; right: 1.4rem; }
.lightbox .prev { left: 1.2rem; top: 50%; }
.lightbox .next { right: 1.2rem; top: 50%; }

/* ---------- Villa / description ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.desc-text p { margin-bottom: 1rem; color: #414c45; }
.feature-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .9rem; margin-top: 1rem; }
.feature-list li { display: flex; gap: .5rem; align-items: baseline; font-size: .95rem; }
.feature-list li::before { content: '◆'; color: var(--terracotta); font-size: .6rem; }
.info-card { background: var(--maquis); color: #e9efe7; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); position: sticky; top: 90px; }
.info-card h3 { color: #fff; font-size: 1.4rem; margin-bottom: 1rem; }
.info-card .row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .95rem; }
.info-card .row:last-child { border: none; }

/* ---------- Tarifs ---------- */
.price-table { width: 100%; border-collapse: collapse; margin-top: 1.6rem; background: var(--blanc); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.price-table th { background: var(--maquis); color: #fff; text-align: left; padding: .9rem 1.2rem; font-weight: 500; font-size: .9rem; letter-spacing: .05em; }
.price-table td { padding: .85rem 1.2rem; border-bottom: 1px solid var(--sable-dark); font-size: .95rem; }
.price-table tr:last-child td { border: none; }
.price-table .price { font-weight: 600; color: var(--terracotta-dark); white-space: nowrap; }

/* ---------- Réservation ---------- */
.booking-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; margin-top: 2rem; align-items: start; }
.cal-card, .form-card { background: var(--blanc); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.cal-head button { background: var(--sable); border: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; color: var(--maquis); }
.cal-head button:hover { background: var(--sable-dark); }
.cal-title { font-family: var(--serif); font-size: 1.25rem; color: var(--maquis); text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8a948d; padding: .3rem 0; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: .9rem; cursor: pointer; border: 1px solid transparent; position: relative; background: #fbf7ee; }
.cal-day:hover:not(.off):not(.occupied):not(.past) { border-color: var(--olive); }
.cal-day.off { background: transparent; cursor: default; }
.cal-day.past, .cal-day.occupied { color: #c2c8c3; cursor: not-allowed; background: transparent; text-decoration: line-through; }
.cal-day.occupied { background: repeating-linear-gradient(45deg, #f3e9e4, #f3e9e4 4px, #ecdcd2 4px, #ecdcd2 8px); text-decoration: none; color: #b9a193; }
.cal-day.sel-start, .cal-day.sel-end { background: var(--maquis); color: #fff; font-weight: 600; }
.cal-day.in-range { background: #dde7da; }
.cal-legend { display: flex; gap: 1.2rem; margin-top: .9rem; font-size: .78rem; color: #6b756e; flex-wrap: wrap; }
.cal-legend span { display: flex; align-items: center; gap: .35rem; }
.dot { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.dot.free { background: #fbf7ee; border: 1px solid var(--sable-dark); }
.dot.busy { background: repeating-linear-gradient(45deg, #f3e9e4, #f3e9e4 3px, #ecdcd2 3px, #ecdcd2 6px); }
.dot.selected { background: var(--maquis); }

.quote-box { margin-top: 1.2rem; background: var(--sable); border-radius: 10px; padding: 1rem 1.2rem; font-size: .95rem; }
.quote-box .qrow { display: flex; justify-content: space-between; padding: .25rem 0; }
.quote-box .qtotal { border-top: 1.5px solid var(--sable-dark); margin-top: .4rem; padding-top: .6rem; font-weight: 600; font-size: 1.05rem; color: var(--maquis); }
.quote-box .qerr { color: var(--err); font-weight: 500; }

label { display: block; font-size: .85rem; font-weight: 500; margin: .9rem 0 .25rem; color: var(--maquis); letter-spacing: .03em; }
input, select, textarea {
  width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--sable-dark); border-radius: 9px;
  font-family: var(--sans); font-size: .95rem; background: #fff; color: var(--encre); transition: border .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--olive); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.btn {
  display: inline-block; width: 100%; margin-top: 1.4rem; background: var(--terracotta); color: #fff;
  border: none; padding: .9rem 1.6rem; border-radius: 99px; font-family: var(--sans); font-size: 1rem;
  font-weight: 500; letter-spacing: .04em; cursor: pointer; transition: background .2s, transform .15s;
}
.btn:hover:not(:disabled) { background: var(--terracotta-dark); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.green { background: var(--maquis); }
.btn.green:hover:not(:disabled) { background: var(--maquis-light); }
.alert { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 10px; font-size: .93rem; display: none; }
.alert.show { display: block; }
.alert.ok { background: #e4efe2; color: var(--ok); border: 1px solid #c4dcc0; }
.alert.err { background: #f7e6e1; color: var(--err); border: 1px solid #ecccc2; }
.alert.info { background: #e7eef0; color: var(--mer); border: 1px solid #cfdfe3; }

/* ---------- Localisation ---------- */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.loc-item { background: var(--blanc); padding: 1.1rem 1.3rem; border-radius: 12px; box-shadow: var(--shadow); font-size: .93rem; display: flex; justify-content: space-between; gap: .6rem; }
.loc-item b { color: var(--maquis); font-weight: 600; }
.loc-item span { color: var(--terracotta-dark); white-space: nowrap; }

/* ---------- Footer ---------- */
footer { background: var(--maquis); color: #cfdacb; padding: 3rem 1.4rem 2rem; text-align: center; margin-top: 3rem; }
footer .brand { color: #fff; font-size: 1.6rem; }
footer p { font-size: .9rem; margin-top: .6rem; }
footer .admin-link { opacity: .55; font-size: .8rem; color: #cfdacb; }
.wave-sep { display: block; width: 100%; height: 56px; margin-bottom: -1px; }

/* ---------- Paiement ---------- */
.pay-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: linear-gradient(160deg, var(--sable) 0%, #e8e0cd 100%); }
.pay-card { background: var(--blanc); border-radius: 18px; box-shadow: var(--shadow); max-width: 480px; width: 100%; padding: 2.2rem; }
.pay-card h1 { font-size: 1.7rem; margin-bottom: .2rem; }
.test-banner { background: #fdf3d7; border: 1px solid #ecd9a0; color: #8a6d1d; border-radius: 9px; padding: .6rem .9rem; font-size: .82rem; margin: 1rem 0; }
.summary { background: var(--sable); border-radius: 10px; padding: 1rem 1.2rem; margin: 1rem 0; font-size: .93rem; }
.summary .qrow { display: flex; justify-content: space-between; padding: .2rem 0; }

@media (max-width: 880px) {
  .split, .booking-wrap { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .info-card { position: static; }
  nav.mainnav a:not(.btn-nav):not(.lang-switch) { display: none; }
  .feature-list { grid-template-columns: 1fr; }
}
