/* Yasha Hotel - design system 2026 : typographie fluide, glassmorphisme sobre, micro-interactions */
:root {
  --ink: #10151f;
  --ink-2: #1a2332;
  --paper: #faf8f5;
  --paper-2: #f1ede6;
  --gold: #c9a25e;
  --gold-2: #e0bd7f;
  --green: #0a7d4f;
  --red: #c0392b;
  --text: #232a36;
  --muted: #6b7280;
  --radius: 18px;
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: clamp(15px, 1.05vw, 17px);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(12px, 2vh, 20px) clamp(16px, 4vw, 56px);
  transition: background .35s, box-shadow .35s;
}
.topbar.scrolled { background: rgba(16,21,31,.88); backdrop-filter: blur(14px); box-shadow: 0 4px 30px rgba(0,0,0,.25); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--ink); font-family: var(--serif); font-size: 24px; font-weight: 700;
  display: grid; place-items: center;
}
.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: .04em; }
.brand-name em { font-style: normal; color: var(--gold-2); }
.topnav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.topnav a { color: #fff; text-decoration: none; font-size: 15px; opacity: .85; transition: opacity .2s; }
.topnav a:hover { opacity: 1; }
.nav-cta {
  background: var(--gold); color: var(--ink) !important; opacity: 1 !important;
  padding: 10px 22px; border-radius: 999px; font-weight: 600;
  transition: transform .18s, box-shadow .18s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,162,94,.45); }
@media (max-width: 720px) { .topnav a:not(.nav-cta) { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media img { animation: heroZoom 18s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,21,31,.45) 0%, rgba(16,21,31,.15) 40%, rgba(16,21,31,.82) 100%); }
.hero-content {
  position: relative; z-index: 2; color: #fff;
  padding: 0 clamp(16px, 5vw, 72px); margin-bottom: clamp(120px, 18vh, 180px);
}
.hero-kicker { text-transform: uppercase; letter-spacing: .28em; font-size: 13px; color: var(--gold-2); margin-bottom: 14px; }
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(38px, 6.4vw, 84px); line-height: 1.04; letter-spacing: -.01em;
}
.hero h1 .accent { color: var(--gold-2); font-style: italic; }
.hero-sub { margin-top: 18px; font-size: clamp(15px, 1.6vw, 19px); opacity: .92; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-size: 14px; opacity: .95; }

/* ---------- booking bar ---------- */
.booking-bar {
  position: absolute; z-index: 3;
  left: 0; right: 0; margin: 0 auto;   /* centrage SANS transform (conflit .reveal) */
  bottom: clamp(24px, 5vh, 48px);
  width: min(920px, calc(100% - 32px));
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px;
  background: rgba(250,248,245,.96); backdrop-filter: blur(16px);
  padding: 16px; border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.bb-field { display: grid; gap: 4px; }
.bb-field label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.bb-field input {
  font: inherit; padding: 12px 14px; border: 1px solid #ddd6cb; border-radius: 12px; background: #fff;
  width: 100%; min-height: 48px;
}
.bb-field input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.bb-submit {
  font: inherit; font-weight: 700; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; padding: 0 28px; border-radius: 12px;
  transition: background .2s, transform .15s;
  align-self: end; min-height: 48px;
}
.bb-submit:hover { background: var(--ink-2); transform: translateY(-1px); }
.bb-submit:disabled { opacity: .55; cursor: wait; transform: none; }
.bb-submit.wide { width: 100%; display: block; text-align: center; text-decoration: none; padding: 14px 28px; }
@media (max-width: 640px) {
  /* mobile : la barre passe dans le flux (plus de chevauchement du hero) */
  .booking-bar {
    position: relative; bottom: auto;
    grid-template-columns: 1fr;
    margin: 12px auto 20px;
  }
  .hero { align-items: end; }
  .hero-content { margin-bottom: 10px; }
}

/* ---------- sections ---------- */
.section { padding: clamp(64px, 10vh, 120px) clamp(16px, 5vw, 72px); max-width: 1240px; margin: 0 auto; }
.section.alt { max-width: none; background: var(--paper-2); }
.section.alt > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.section-kicker { text-transform: uppercase; letter-spacing: .26em; font-size: 12px; color: var(--gold); margin-bottom: 10px; }
.section-title { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 4vw, 48px); line-height: 1.1; margin-bottom: 14px; }
.section-lead { color: var(--muted); max-width: 60ch; margin-bottom: 34px; }

/* ---------- rooms ---------- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.room-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 26px rgba(16,21,31,.08);
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.room-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(16,21,31,.14); }
.room-card .rc-img { aspect-ratio: 16/10; overflow: hidden; }
.room-card .rc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.room-card:hover .rc-img img { transform: scale(1.06); }
.rc-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rc-body h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.rc-desc { font-size: 14.5px; color: #444; flex: 1; }
.rc-amenities { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-amenities span { font-size: 12px; background: var(--paper-2); border-radius: 999px; padding: 4px 10px; }
.rc-foot { display: flex; align-items: end; justify-content: space-between; margin-top: 8px; }
.rc-price { font-size: 14px; color: var(--muted); }
.rc-price strong { display: block; font-size: 26px; color: var(--ink); font-weight: 700; }
.rc-price strong small { font-size: 13px; font-weight: 400; color: var(--muted); }
.rc-book {
  font: inherit; font-weight: 600; border: 0; cursor: pointer;
  background: var(--gold); color: var(--ink); padding: 12px 20px; border-radius: 12px;
  transition: filter .2s, transform .15s;
}
.rc-book:hover { filter: brightness(1.07); transform: translateY(-1px); }
.rc-book:disabled { background: #ccc; cursor: not-allowed; }
.rc-unavailable { color: var(--red); font-size: 14px; font-weight: 600; }

/* ---------- results band ---------- */
.results { margin-bottom: 30px; }
.results .pill {
  display: inline-flex; gap: 10px; align-items: center;
  background: #fff; border: 1px solid #e5ded2; border-radius: 999px; padding: 10px 18px;
  font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.results .pill button { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--muted); }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  grid-auto-rows: 160px; gap: 10px; margin-top: 26px;
}
.gallery-grid figure { overflow: hidden; border-radius: 12px; position: relative; cursor: zoom-in; }
.gallery-grid figure:nth-child(7n+1) { grid-row: span 2; grid-column: span 2; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-grid figure:hover img { transform: scale(1.05); }
@media (max-width: 560px) { .gallery-grid figure:nth-child(7n+1) { grid-column: span 1; grid-row: span 1; } }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(10,13,20,.92);
  display: grid; place-items: center; padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1100px, 94vw); max-height: 84svh; border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6); object-fit: contain;
}
.lb-caption { color: #cfd6e2; font-size: 14px; text-align: center; margin-top: 12px; max-width: 80vw; }
.lb-close {
  position: absolute; top: 18px; right: 22px; background: none; border: 0;
  color: #fff; font-size: 38px; cursor: pointer; line-height: 1;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: 0; color: #fff; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%; font-size: 26px;
  transition: background .2s;
}
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.rc-img { cursor: zoom-in; }

/* ---------- amenities ---------- */
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 26px; }
.amenity-grid .amen {
  background: #fff; border: 1px solid #eae3d7; border-radius: 14px; padding: 18px 20px;
  font-size: 15px; display: flex; gap: 10px; align-items: center;
}
.amenity-grid .amen::before { content: "✓"; color: var(--green); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 26px; display: grid; gap: 12px; max-width: 820px; }
.faq-list details {
  background: #fff; border: 1px solid #e7e0d3; border-radius: 14px; padding: 18px 22px;
}
.faq-list summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; }
.faq-list summary::after { content: "+"; float: right; color: var(--gold); font-size: 22px; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin-top: 10px; color: #444; font-size: 15px; }

/* ---------- access ---------- */
.access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 26px; }
.access-card { background: var(--ink); color: #fff; border-radius: 14px; padding: 22px; display: grid; gap: 6px; }
.access-card span { color: var(--gold-2); font-size: 14px; }

/* ---------- footer ---------- */
.footer {
  background: var(--ink); color: #cfd6e2;
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  padding: 44px clamp(16px, 5vw, 72px); font-size: 14.5px;
}
.footer a { color: var(--gold-2); text-decoration: none; }
.footer-note { text-align: right; opacity: .85; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(16,21,31,.66); backdrop-filter: blur(6px); padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: #fff; border-radius: 20px; width: min(520px, 100%);
  max-height: 92svh; overflow: auto; padding: 30px; position: relative;
  animation: pop .28s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: translateY(22px) scale(.97); opacity: 0; } }
.modal-card h3 { font-family: var(--serif); font-size: 25px; margin-bottom: 14px; }
.modal-close {
  position: absolute; top: 14px; right: 16px; border: 0; background: none;
  font-size: 26px; cursor: pointer; color: var(--muted);
}
.pay-summary { background: var(--paper-2); border-radius: 12px; padding: 14px 18px; font-size: 14.5px; margin-bottom: 18px; }
.pay-summary .total { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; margin-top: 6px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.form-row input, .form-row textarea {
  font: inherit; padding: 11px 13px; border: 1px solid #ddd6cb; border-radius: 10px; width: 100%;
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.card-element { border: 1px solid #ddd6cb; border-radius: 10px; padding: 13px; margin: 14px 0 6px; background: #fff; }
.pay-error { color: var(--red); font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.pay-secure { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.modal-card.ok { text-align: center; }
.ok-check {
  width: 72px; height: 72px; margin: 6px auto 16px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 38px; display: grid; place-items: center;
  animation: pop .4s cubic-bezier(.2,.9,.3,1.4);
}
.ok-sub { color: var(--muted); font-size: 14px; margin: 12px 0 20px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- admin ---------- */
.admin-body { background: #f3f4f6; min-height: 100vh; }
.admin-shell { max-width: 1180px; margin: 0 auto; padding: 26px 18px 80px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-top h1 { font-family: var(--serif); font-size: 28px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-tabs button {
  font: inherit; border: 1px solid #d8dce3; background: #fff; border-radius: 999px;
  padding: 9px 18px; cursor: pointer; font-size: 14px;
}
.admin-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,.05); margin-bottom: 22px; }
.panel h2 { font-size: 19px; margin-bottom: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { background: var(--paper-2); border-radius: 12px; padding: 16px; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 12.5px; color: var(--muted); }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th { text-align: left; padding: 9px 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid #eee; }
.a-table td { padding: 10px; border-bottom: 1px solid #f1f1f1; vertical-align: top; }
.a-input, .a-select, .a-table input, .a-table select {
  font: inherit; padding: 8px 10px; border: 1px solid #d8dce3; border-radius: 9px; width: 100%;
}
.a-btn {
  font: inherit; border: 0; background: var(--ink); color: #fff; border-radius: 10px;
  padding: 10px 18px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.a-btn.ghost { background: #fff; color: var(--ink); border: 1px solid #d8dce3; }
.a-btn.danger { background: var(--red); }
.a-btn.small { padding: 6px 12px; font-size: 13px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.confirmed { background: #e2f5ea; color: var(--green); }
.badge.pending_payment { background: #fff3d6; color: #8a6d1a; }
.badge.payment_failed, .badge.cancelled, .badge.expired { background: #fbe4e1; color: var(--red); }
.badge.refunded { background: #e4e8fb; color: #3b4aa0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.login-card { max-width: 380px; margin: 14vh auto; }
.photo-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-admin-grid figure { border: 1px solid #e3e6ec; border-radius: 10px; overflow: hidden; }
.photo-admin-grid img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-admin-grid figcaption { padding: 8px; display: grid; gap: 6px; }
.photo-admin-grid input { font-size: 12px; padding: 6px 8px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 999px;
  font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 200;
}
.toast.show { opacity: 1; }
