/* =========================================================
   Gîte Tamlli — feuille de style
   Palette : palmeraie (vert), terre (terracotta), sable
   ========================================================= */
:root {
    --green: #2d4a3e;
    --green-2: #3d5f50;
    --green-dark: #1d3029;
    --terracotta: #b8653e;
    --terracotta-dark: #9c5232;
    --sand: #f4ece0;
    --sand-2: #e9dcc7;
    --ink: #2a2622;
    --muted: #6f665c;
    --white: #fffdf9;
    --radius: 14px;
    --shadow: 0 12px 32px rgba(42, 38, 34, .10);
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, sans-serif;
    --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font: 400 16px/1.7 var(--sans); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; height: auto; }
a { color: var(--terracotta-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; color: var(--green-dark); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1.1em; }
.container { width: min(1200px, 90%); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: .5em 1em; z-index: 200; }
.skip:focus { left: 8px; }
.ico { width: 22px; height: 22px; flex: none; }

.eyebrow { font: 600 .78rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--terracotta); margin: 0 0 1rem; }
.eyebrow.light { color: #f1c9a5; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .95em 1.7em; border-radius: 999px; font: 600 .95rem/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-sand { background: var(--terracotta); color: #fff; }
.btn-sand:hover { background: var(--terracotta-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { border-color: var(--green); color: var(--green); background: transparent; }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.8); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--green-dark); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1eb457; }
.btn-block { width: 100%; }
.link-arrow { font-weight: 600; color: var(--terracotta-dark); text-decoration: none; display: inline-flex; gap: .4em; align-items: center; }
.link-arrow::after { content: '→'; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow.light { color: #f1c9a5; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(255,253,249,.96); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(0,0,0,.06); transition: background .3s, border-color .3s; }
.site-header.header-over { position: fixed; inset: 0 0 auto 0; background: transparent; border-color: transparent; }
.site-header.header-over:not(.scrolled) .main-nav > a:not(.btn), .site-header.header-over:not(.scrolled) .brand { color: #fff; }
.site-header.header-over:not(.scrolled) .menu-toggle span { background: #fff; }
.site-header.scrolled { background: rgba(255,253,249,.97); border-color: rgba(0,0,0,.06); box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--green-dark); font: 500 1.6rem/1 var(--serif); }
.brand strong { font-weight: 700; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand.light { color: #fff; }
.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav > a:not(.btn) { color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500; position: relative; padding: .3em 0; }
.main-nav > a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px; background: var(--terracotta); transition: right .25s; }
.main-nav > a:not(.btn):hover::after, .main-nav > a[aria-current="page"]::after { right: 0; }
.nav-cta { padding: .75em 1.4em; }
.menu-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; padding: 10px; }
.menu-toggle span { display: block; height: 2px; background: var(--green-dark); border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero-bg, .page-head-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,30,25,.55) 0%, rgba(20,30,25,.15) 35%, rgba(20,30,25,.75) 100%); }
.hero-content { position: relative; padding: 0 0 clamp(4rem, 12vh, 8rem); }
.hero h1 { color: #fff; font-size: clamp(3.2rem, 9vw, 7rem); margin-bottom: .1em; }
.hero .lead { font: italic 500 clamp(1.3rem, 2.4vw, 1.9rem)/1.3 var(--serif); margin-bottom: 2rem; max-width: 36ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-rating { position: absolute; right: 5%; bottom: clamp(4rem, 12vh, 8rem); display: flex; align-items: center; gap: .9rem; background: rgba(255,253,249,.95); color: var(--ink); padding: .9rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-rating .score { background: var(--green); color: #fff; font: 700 1.3rem/1 var(--sans); padding: .55em .6em; border-radius: 10px 10px 10px 2px; }
.hero-rating strong { display: block; font-size: 1rem; }
.hero-rating small { color: var(--muted); font-size: .8rem; }

.page-head { position: relative; min-height: 62vh; display: grid; align-items: end; color: #fff; overflow: hidden; }
.page-head-content { position: relative; padding: calc(var(--header-h) + 3rem) 0 3.5rem; }
.page-head h1 { color: #fff; margin-bottom: .25em; }
.page-head p { max-width: 60ch; font-size: 1.1rem; opacity: .95; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-sand { background: var(--sand); }
.section-green { background: var(--green); color: #e9efe9; }
.section-green h2, .section-green h3 { color: #fff; }
.section-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section-head p:last-child { color: var(--muted); }
.section-head.light p:last-child { color: #cfdcd3; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-text p { color: #4a443d; font-size: 1.05rem; }
.rounded { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.stack { position: relative; padding: 0 12% 14% 0; }
.stack img { border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.stack-a { aspect-ratio: 4/3; width: 100%; }
.stack-b { position: absolute; right: 0; bottom: 0; width: 52%; aspect-ratio: 1; border: 6px solid var(--white); }

.pill-list { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.pill-list li { display: inline-flex; align-items: center; gap: .5rem; background: var(--sand); padding: .55rem 1rem; border-radius: 999px; font-size: .9rem; color: var(--green-dark); }
.pill-list .ico { width: 18px; height: 18px; color: var(--terracotta); }

.info-list { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: .9rem; }
.info-list li { display: flex; gap: .8rem; align-items: flex-start; }
.info-list .ico { color: var(--terracotta); margin-top: 2px; }

/* Rooms (home) */
.room-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.room-card { background: var(--white); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .3s; }
.room-card:hover { transform: translateY(-6px); }
.room-card-img { overflow: hidden; }
.room-card-img img { aspect-ratio: 4/5; object-fit: cover; width: 100%; transition: transform .6s; }
.room-card:hover .room-card-img img { transform: scale(1.05); }
.room-card-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.room-card-body p { color: var(--muted); font-size: .93rem; flex: 1; }

/* Facilities */
.facility-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.facility-grid li { display: flex; align-items: center; gap: .9rem; padding: 1.2rem 1.3rem; background: var(--white); border: 1px solid var(--sand-2); border-radius: var(--radius); font-weight: 500; }
.facility-grid .ico { width: 28px; height: 28px; color: var(--terracotta); }
.facility-grid.large li { flex-direction: column; text-align: center; padding: 2.2rem 1rem; font-size: 1.05rem; }
.facility-grid.large .ico { width: 38px; height: 38px; }

/* Experiences */
.exp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.exp-card { background: var(--green-2); border-radius: var(--radius); overflow: hidden; }
.exp-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.exp-body { padding: 1.4rem; }
.exp-body p { font-size: .93rem; color: #d5e0d8; margin: 0; }

/* Map */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: var(--sand-2); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-wrap.small { aspect-ratio: 16/11; margin: 1.5rem 0 1rem; }

/* Mosaic (home gallery) */
.mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 12px; margin-bottom: 2.5rem; }
.mosaic a { overflow: hidden; border-radius: 10px; }
.mosaic a:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.mosaic a:hover img { transform: scale(1.05); }

/* Rooms page */
.rooms { display: grid; gap: clamp(4rem, 8vw, 6.5rem); }
.room { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.room:nth-child(even) .room-gallery { order: 2; }
.room-gallery { display: grid; gap: 10px; }
.room-main img { aspect-ratio: 3/2; object-fit: cover; width: 100%; border-radius: var(--radius); }
.room-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.room-thumbs img { aspect-ratio: 4/3; object-fit: cover; width: 100%; border-radius: 8px; transition: opacity .2s; }
.room-thumbs a:hover img { opacity: .8; }
.room-info p { font-size: 1.05rem; color: #4a443d; }
.mini-facilities { list-style: none; padding: 0; margin: 1.2rem 0; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; color: var(--green-dark); font-size: .93rem; }
.mini-facilities li { display: flex; align-items: center; gap: .45rem; }
.mini-facilities .ico { width: 18px; height: 18px; color: var(--terracotta); }
.room-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* Activities */
.activities { display: grid; gap: clamp(4rem, 8vw, 6rem); }

/* Coop */
.coop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.coop-card { padding: 2.2rem 1.8rem; border: 1px solid var(--sand-2); border-radius: var(--radius); background: var(--white); }
.coop-num { font: 600 2.6rem/1 var(--serif); color: var(--terracotta); display: block; margin-bottom: 1rem; }
.coop-card p { color: var(--muted); margin: 0; }

/* About */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-num { display: block; font: 600 clamp(2.4rem, 4vw, 3.4rem)/1 var(--serif); color: var(--green); margin-bottom: .5rem; }
.stats span:not(.stat-num) { color: var(--muted); font-size: .93rem; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.value-grid article { padding: 2rem; background: var(--sand); border-radius: var(--radius); }
.value-grid p { color: #4a443d; margin: 0; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.5rem; }
.filters button { font: 500 .9rem var(--sans); padding: .6em 1.2em; border-radius: 999px; border: 1px solid var(--sand-2); background: var(--white); color: var(--ink); cursor: pointer; transition: .2s; }
.filters button[aria-selected="true"], .filters button:hover { background: var(--green); border-color: var(--green); color: #fff; }
.gallery { columns: 4 240px; column-gap: 12px; }
.gallery a { display: block; margin-bottom: 12px; break-inside: avoid; border-radius: 8px; overflow: hidden; }
.gallery a[hidden] { display: none; }
.gallery img { width: 100%; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(15,20,18,.94); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 86vh; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form-card { background: var(--white); border: 1px solid var(--sand-2); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.8rem); box-shadow: var(--shadow); }
.form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .row.three { grid-template-columns: 2fr 1fr 1fr; }
.form label { display: grid; gap: .4rem; font-size: .88rem; font-weight: 500; color: var(--green-dark); }
.form input, .form select, .form textarea { font: inherit; font-size: 1rem; padding: .8em .95em; border: 1px solid #d9cfc0; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; border-color: transparent; }
.form label.check { display: flex; align-items: center; gap: .6rem; font-weight: 400; color: var(--ink); }
.form label.check input { width: 18px; height: 18px; accent-color: var(--green); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1.2rem 1.4rem; border-radius: 10px; margin: 1rem 0; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert.error { background: #fbeae5; color: #8a2c14; }
.alert.success { background: #e7f1ea; color: var(--green-dark); }
.contact-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }

/* CTA + footer */
.cta-band { background: var(--terracotta); color: #fff; padding: 3.5rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; opacity: .95; }
.cta-band .eyebrow.light { color: #fbe3cf; }
.site-footer { background: var(--green-dark); color: #c8d3cc; padding: 4.5rem 0 1.5rem; font-size: .93rem; }
.site-footer h3 { color: #fff; font: 600 .8rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1.3rem; }
.site-footer a { color: #e3ebe5; text-decoration: none; }
.site-footer a:hover { color: #f1c9a5; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .55rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 3rem; }
.footer-brand p { margin-top: 1.2rem; max-width: 34ch; }
.footer-contact li { display: flex; gap: .7rem; align-items: flex-start; }
.footer-contact .ico { width: 18px; height: 18px; color: #f1c9a5; margin-top: 3px; }
.socials { display: flex; gap: 1rem; }
.copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding-top: 1.5rem; text-align: center; font-size: .82rem; color: #9fb0a5; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }
.notfound { padding-top: calc(var(--header-h) + 5rem); min-height: 60vh; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .main-nav { gap: 1.1rem; }
    .room-grid, .exp-grid { grid-template-columns: repeat(2, 1fr); }
    .facility-grid, .coop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
    .menu-toggle { display: flex; }
    .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); padding: 1rem 5% 2rem; box-shadow: 0 20px 40px rgba(0,0,0,.12); transform: translateY(-120%); transition: transform .35s ease; max-height: calc(100vh - var(--header-h)); overflow: auto; }
    .menu-open .main-nav { transform: none; }
    .main-nav > a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--sand-2); color: var(--ink) !important; font-size: 1.05rem; }
    .main-nav > a:not(.btn)::after { display: none; }
    .nav-cta { margin-top: 1.2rem; }
    .menu-open .site-header { background: var(--white); }
    .menu-open .site-header .brand { color: var(--green-dark) !important; }
    .menu-open .site-header .menu-toggle span { background: var(--green-dark) !important; }
    .split, .room, .contact-grid { grid-template-columns: 1fr; }
    .split.reverse .split-media, .room:nth-child(even) .room-gallery { order: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .stats { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
    .value-grid { grid-template-columns: 1fr; }
    .contact-aside { position: static; }
    .hero-rating { right: auto; left: 5%; bottom: 1.5rem; padding: .6rem .9rem; }
    .hero-content { padding-bottom: 7rem; }
}
@media (max-width: 600px) {
    .room-grid, .exp-grid, .facility-grid, .coop-grid { grid-template-columns: 1fr; }
    .facility-grid { grid-template-columns: 1fr 1fr; }
    .facility-grid li { flex-direction: column; text-align: center; gap: .5rem; padding: 1.1rem .6rem; font-size: .9rem; }
    .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 140px 140px; }
    .mosaic a:first-child { grid-column: span 2; grid-row: auto; }
    .form .row, .form .row.three { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .hero-actions .btn { flex: 1 1 100%; }
    .brand { font-size: 1.35rem; }
}
