/* Les Terrasses du Fort — site public */
[hidden] { display: none !important; }
:root {
  --ink: #1A1B19; --ink-2: #45473F; --muted: #5E605B; --line: #DDD7CC; --line-2: #E6E1D8;
  --ground: #F6F4F0; --paper: #FFFFFF; --sand: #EAE5DC; --basalt: #161816; --basalt-2: #252926;
  --brass: #C9A46A; --brass-light: #E4CFA6; --accent: #0F4C5C; --accent-soft: #DCE8EB; --busy: #ECE8E1;
  --serif: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.08; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.eyebrow.brass { color: var(--brass); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ph { background: var(--sand); display: flex; align-items: flex-end; padding: 14px; color: var(--ink-2); font-size: 12px; }
.ph.dark { background: #D3CCBF; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border: 0; background: var(--accent); color: #fff; text-decoration: none; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; cursor: pointer; }
.btn:hover { filter: brightness(1.12); color: #fff; }
.btn.brass { background: var(--brass); color: var(--basalt); }
.btn.ghost { background: transparent; border: 1px solid var(--brass); color: var(--ground); font-weight: 500; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.link-under { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }

/* En-tête */
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 48px; position: relative; z-index: 5; }
.brand { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; }
.brand b { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.brand span { font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--brass); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a { color: inherit; text-decoration: none; }
.nav-links .lang { opacity: .75; font-size: 13px; }
.nav.light { border-bottom: 1px solid var(--line); background: var(--ground); }
.nav.light .brand span { color: #7A5F33; }

/* Héros */
.hero { position: relative; background: var(--basalt); color: var(--ground); min-height: 880px; display: flex; flex-direction: column; }
.hero-bg { position: absolute; inset: 0; background: var(--basalt-2); overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: rgba(16, 18, 16, .35); }
.hero-body { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 40px 48px; max-width: 1080px; }
.hero h1 { font-size: clamp(44px, 7vw, 100px); line-height: 1.02; letter-spacing: -.01em; }
.hero h1 em { color: var(--brass-light); }
.hero p.lead { max-width: 540px; font-size: 18px; line-height: 1.65; color: #E2E4DE; margin: 0; }
.trust { position: relative; display: flex; flex-wrap: wrap; gap: 8px 30px; padding: 0 48px 40px; font-size: 13px; color: #D3D5CF; }

/* Barre de recherche */
.searchbar { position: relative; margin: 0 48px 18px; background: var(--ground); color: var(--ink); display: flex; flex-wrap: wrap; align-items: stretch; }
.searchbar .unit-select { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; padding: 20px 26px; }
.searchbar .unit-select span { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.searchbar select { border: 0; background: transparent; font-size: 16px; padding: 0; }
.searchbar .btn { flex: 1 1 240px; min-height: 78px; }

/* Sélecteur séjour (dates + voyageurs) */
.stay { display: flex; flex-wrap: wrap; width: 100%; }
.stay .dates { position: relative; flex: 2 1 340px; min-width: 0; display: flex; flex-wrap: wrap; }
.stay .guests { position: relative; flex: 1 1 190px; min-width: 0; display: flex; }
.stay .field { flex: 1 1 160px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 26px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; min-height: 78px; }
.stay .field .lbl { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stay .field .val { font-size: 16px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.stay .field[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.stay.form { gap: 12px; }
.stay.form .dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex-basis: 100%; }
.stay.form .guests { flex-basis: 100%; }
.stay.form .field { border: 1px solid #C9C3B7; background: var(--paper); min-height: 62px; padding: 10px 14px; gap: 4px; width: 100%; }
.stay.form .field .lbl { letter-spacing: .12em; font-size: 10px; }
.pop { position: absolute; left: 0; z-index: 40; background: var(--paper); color: var(--ink); box-shadow: 0 18px 50px rgba(22, 24, 22, .22); padding: 20px; display: flex; flex-direction: column; gap: 12px; width: min(360px, calc(100vw - 32px)); }
.pop[hidden] { display: none; }
.stay.up .pop { bottom: calc(100% + 10px); }
.stay:not(.up) .pop { top: calc(100% + 8px); }
.stay .guests .pop { left: auto; right: 0; }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cal-head b { font-family: var(--serif); font-weight: 400; font-size: 21px; }
.icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.cal-hint { font-size: 13px; color: var(--ink-2); text-align: center; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.cal-dow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cal-grid { gap: 3px 0; }
.cal-grid button { height: 42px; border: 0; padding: 0; background: var(--paper); cursor: pointer; font-size: 14px; }
.cal-grid button:hover:not([disabled]) { box-shadow: inset 0 0 0 1px var(--ink); }
.cal-grid button[disabled] { color: #A3A59F; cursor: default; }
.cal-grid button.busy { background: var(--busy); color: #8C8E88; text-decoration: line-through; }
.cal-grid button.in-range { background: var(--accent-soft); color: var(--accent); }
.cal-grid button.edge { background: var(--accent); color: #fff; font-weight: 700; }
.cal-grid .blank { height: 42px; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line-2); padding-top: 12px; font-size: 13px; color: var(--ink-2); }
.text-btn { min-height: 44px; padding: 0 6px; border: 0; background: transparent; text-decoration: underline; cursor: pointer; font-size: 14px; }
.small-btn { min-height: 44px; padding: 0 20px; border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.g-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--busy); }
.g-row b { display: block; font-size: 15px; }
.g-row small { font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #8C8E88; background: var(--paper); font-size: 18px; cursor: pointer; }
.stepper button[disabled] { opacity: .3; cursor: default; }
.stepper output { min-width: 18px; text-align: center; font-size: 16px; }

/* Sections */
section.block { padding: 120px 0; }
.split { display: flex; flex-wrap: wrap; gap: 72px; align-items: center; }
.split > * { flex: 1 1 440px; min-width: 0; }
.prose { font-size: 17px; line-height: 1.75; color: var(--ink-2); margin: 0; white-space: pre-line; }
.stats { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats b { font-family: var(--serif); font-weight: 400; font-size: 44px; }
.stats span { font-size: 13px; color: var(--muted); }
.duo { display: flex; gap: 16px; }
.duo > :first-child { flex: 3; height: 600px; }
.duo > :last-child { flex: 2; display: flex; flex-direction: column; gap: 16px; padding-top: 80px; }
.duo img, .duo .ph { width: 100%; height: 100%; object-fit: cover; }
.duo .s1 { height: 280px; } .duo .s2 { height: 200px; }
.h-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.title-xl { font-size: clamp(36px, 5vw, 54px); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 48px 32px; }
.card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.card .img { height: 420px; position: relative; overflow: hidden; background: var(--sand); }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.card:hover .img img { transform: scale(1.04); }
.badge { position: absolute; right: 14px; bottom: 14px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: var(--ground); color: var(--ink); padding: 6px 10px; }
.card .type { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.card .name { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.card .meta { font-size: 14px; color: var(--muted); }
.card .price { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line-2); padding-top: 14px; font-size: 15px; }
.card .price span:last-child { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.services > div { background: var(--ground); padding: 36px 30px; display: flex; flex-direction: column; gap: 16px; }
.services h3 { font-size: 24px; }
.services p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.place { background: var(--sand); }
.cta { background: var(--basalt); color: var(--ground); padding: 140px 24px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.cta h2 { max-width: 820px; font-size: clamp(36px, 5vw, 58px); }
.cta p { max-width: 520px; font-size: 17px; line-height: 1.7; color: #C9CBC5; margin: 0; }
footer.foot { background: #111311; color: #C9CBC5; padding: 64px 48px 40px; display: flex; flex-direction: column; gap: 40px; font-size: 14px; }
footer.foot a { color: #C9CBC5; }
footer.foot .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
footer.foot .cols > div { display: flex; flex-direction: column; gap: 10px; }
footer.foot b { color: var(--ground); font-weight: 500; }
footer.foot .copy { font-size: 12px; color: #9EA19A; border-top: 1px solid #2A2D29; padding-top: 24px; }

/* Résultats de recherche */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.result { background: var(--paper); border: 1px solid var(--line-2); padding: 18px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.result.off { opacity: .55; }
.result b { font-family: var(--serif); font-weight: 400; font-size: 22px; }

/* Fiche logement */
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery .main { flex: 2 1 560px; height: 600px; }
.gallery .side { flex: 1 1 340px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery .side > * { min-height: 140px; }
.gallery img, .gallery .ph { width: 100%; height: 100%; object-fit: cover; }
.gallery button.thumb { padding: 0; border: 0; cursor: zoom-in; background: var(--sand); min-height: 140px; }
.gallery .all { background: var(--ink); color: var(--ground); border: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.unit-layout { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; padding: 56px 0 120px; }
.unit-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.unit-aside { flex: 1 1 360px; background: var(--paper); border: 1px solid var(--line-2); padding: 30px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.amen { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 32px; font-size: 15px; padding: 0; margin: 0; list-style: none; }
.amen li { display: flex; gap: 12px; align-items: center; }
.months { display: flex; flex-wrap: wrap; gap: 40px; background: var(--paper); padding: 30px; border: 1px solid var(--line-2); }
.months > div { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.months .m-name { font-family: var(--serif); font-size: 22px; text-align: center; }
.quote { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.quote .row { display: flex; justify-content: space-between; gap: 12px; }
.quote .row.neg span:last-child { color: #1F6B3A; }
.quote .total { border-top: 1px solid var(--line-2); padding-top: 12px; font-weight: 700; }
.quote .sub { font-size: 13px; color: var(--muted); }
.errors { color: #9B2C1F; font-size: 14px; }
.note { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }

/* Formulaire de réservation */
.book { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding: 48px 0 120px; }
.book form.main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.book aside { flex: 1 1 340px; background: var(--paper); border: 1px solid var(--line-2); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--paper); border: 1px solid var(--line-2); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.panel h2 { font-size: 26px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
label.f input, label.f textarea, label.f select { min-height: 48px; padding: 10px 12px; border: 1px solid #C9C3B7; background: var(--paper); font-size: 15px; color: var(--ink); }
label.f textarea { min-height: 96px; resize: vertical; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.promo { display: flex; gap: 8px; }
.promo input { flex: 1; min-height: 48px; padding: 0 12px; border: 1px solid #C9C3B7; text-transform: uppercase; }
.promo button { min-height: 48px; padding: 0 16px; border: 1px solid var(--accent); background: var(--paper); color: var(--accent); font-weight: 700; cursor: pointer; }
.hp { position: absolute; left: -9999px; }
.alert { background: #FBEDEA; color: #7A2318; padding: 14px 16px; font-size: 14px; }
.center-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding: 100px 24px; }
.center-page h1 { font-size: clamp(36px, 5vw, 54px); }
.center-page p { max-width: 560px; font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0; }
.legal { max-width: 820px; margin: 0 auto; padding: 80px 24px 120px; display: flex; flex-direction: column; gap: 20px; }
.legal p { white-space: pre-line; line-height: 1.75; color: var(--ink-2); }

/* Visionneuse photos */
dialog.viewer { border: 0; padding: 0; background: rgba(16, 18, 16, .96); width: 100vw; height: 100vh; max-width: none; max-height: none; }
dialog.viewer::backdrop { background: rgba(16, 18, 16, .9); }
.viewer-inner { height: 100%; display: flex; flex-direction: column; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; color: var(--ground); font-size: 14px; }
.viewer-bar button { background: transparent; border: 1px solid #555; color: var(--ground); min-height: 44px; padding: 0 16px; cursor: pointer; }
.viewer-img { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px 24px; min-height: 0; }
.viewer-img img { max-height: 100%; max-width: calc(100% - 120px); object-fit: contain; }
.viewer-img .icon-btn { background: transparent; color: var(--ground); border-color: #555; flex: none; }

@media (max-width: 760px) {
  .nav { padding: 20px 20px; }
  .hero { min-height: 0; }
  .hero-body { padding: 40px 20px 32px; }
  .searchbar { margin: 0 16px 18px; }
  .trust { padding: 0 20px 32px; }
  .stay .field { border-right: 0; border-bottom: 1px solid var(--line); }
  .stay.form .field { border: 1px solid #C9C3B7; }
  section.block { padding: 72px 0; }
  .duo > :first-child { height: 380px; }
  .duo > :last-child { padding-top: 40px; }
  .gallery .main { height: 360px; }
  .unit-aside { position: static; }
  .cta { padding: 90px 20px; }
  footer.foot { padding: 48px 20px 32px; }
  .stay .guests .pop { left: 0; right: auto; }
}

/* Barre d'administration (visible uniquement par le propriétaire connecté) */
.adminbar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 10px 24px; background: var(--brass); color: var(--basalt); font-size: 14px; font-weight: 600; }
.adminbar a { color: var(--basalt); text-decoration: none; }
.adminbar a:hover { text-decoration: underline; color: var(--basalt); }
.adminbar-tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; background: var(--basalt); color: var(--brass); padding: 4px 8px; }
