/* Gabesna – feuille de style unique. Mobile-first : conçue d'abord pour 375 px. */
:root {
  --palm: #1B4332; --palm-2: #2D6A4F; --palm-3: #D8E6DC; --palm-deep: #12301F;
  --sea: #0E7C86; --sea-2: #3DB4B0; --sea-3: #CDEBE8; --sea-deep: #0B4F5C;
  --sand: #F8F5F0; --sand-2: #EFE8DB; --sand-3: #E1D6C3;
  --clay: #C85A32; --clay-ink: #A94620;
  --ink: #1C2B24; --muted: #5B6860; --line: #DDD3C1; --danger: #B3261E; --danger-bg: #F6DDD5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 16px/1.5 var(--sans); padding-bottom: env(safe-area-inset-bottom); }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5rem; color: var(--palm); font-weight: 700; }
h1 { font-size: 1.85rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--clay-ink); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 .25rem; }
.hint { color: var(--muted); font-size: .9rem; }
.err { color: var(--danger); font-weight: 600; min-height: 1.4em; }

/* ---------- En-tête ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--palm); color: var(--sand); padding-top: env(safe-area-inset-top); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--sand); text-decoration: none; letter-spacing: .01em; }
.toplink { color: var(--sand); font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; }
.bar-actions { display: flex; gap: 8px; }

/* ---------- Héros : oasis sous un soleil d'argile ---------- */
.hero { position: relative; background: var(--palm); color: var(--sand); overflow: hidden; }
.hero h1 { color: var(--sand); font-size: 2rem; max-width: 18ch; }
.hero-in { position: relative; z-index: 2; padding-top: 28px; padding-bottom: 12px; }
.hero p { max-width: 42ch; opacity: .92; }
.sun { position: absolute; right: -30px; top: 54px; width: 190px; height: 190px; border-radius: 50%; background: var(--clay); z-index: 1; }
.search input { width: 100%; height: 52px; border: 0; border-radius: var(--r-md); padding: 0 16px; font: inherit; background: #fff; color: var(--ink); }

/* ---------- Filtres ---------- */
.filters { padding: 14px 0 4px; display: grid; gap: 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1.5px solid var(--sand-3); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--palm); border-color: var(--palm); color: var(--sand); }
.count { color: var(--muted); margin: 8px 0 12px; font-size: .92rem; }

/* ---------- Grille & cartes ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; padding-bottom: 32px; }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--palm-2); }
.card.featured { border: 2px solid var(--clay); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--palm-3); display: grid; place-items: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.ph { width: 40%; height: 60%; fill: var(--palm-2); opacity: .55; }
.tag { position: absolute; left: 10px; top: 10px; background: var(--clay-ink); color: #fff; font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: var(--r-pill); }
.card-body { padding: 12px 14px 14px; }
.card-body h2 { font-size: 1.2rem; margin-bottom: 2px; }
.price { margin: 6px 0 0; color: var(--palm); }
.price b { font-size: 1.1rem; } .price small { color: var(--muted); font-size: .9rem; }
.empty { text-align: center; padding: 32px 8px; grid-column: 1 / -1; }
.site-foot { background: var(--palm); color: var(--sand); padding: 24px 0 32px; font-size: .95rem; }
.site-foot a { color: var(--sand); }

/* ---------- Boutons & formulaires ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--palm); color: var(--sand); }
.btn-wa { background: var(--clay-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--palm); border-color: var(--palm); }
.btn-ghost-light { background: transparent; color: var(--sand); border-color: rgba(248,245,240,.6); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-block { width: 100%; } .btn-sm { min-height: 42px; padding: 0 14px; font-size: .92rem; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border: 1.5px solid #CFC4AF; border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.field-row { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--palm); background: #fff; color: var(--palm); font-size: 1.4rem; cursor: pointer; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.2rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.notice { background: var(--palm-3); border-radius: var(--r-sm); padding: 10px 12px; color: var(--palm); font-weight: 600; }

/* ---------- Fiche d'un lieu ---------- */
.place { padding-top: 12px; padding-bottom: 40px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 16px; padding: 0 16px; border-radius: var(--r-md); }
.gallery img, .gallery-ph { flex: 0 0 88%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); scroll-snap-align: center; background: var(--palm-3); }
.gallery-ph { display: grid; place-items: center; flex-basis: 100%; }
.gallery-ph svg { width: 30%; height: 60%; fill: var(--palm-2); opacity: .55; }
.price-big { font-size: 1.1rem; } .price-big b { font-family: var(--serif); font-size: 1.7rem; color: var(--palm); }
.desc p { max-width: 62ch; line-height: 1.6; }
.host { color: var(--muted); }
.summary { background: var(--palm-3); border-radius: var(--r-sm); padding: 10px 12px; color: var(--palm); font-weight: 600; min-height: 3.2em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--muted); margin: 8px 0 12px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; border: 1px solid var(--line); }
.lg-free { background: #fff; } .lg-blocked { background: var(--danger-bg); border-color: #E8B9AA !important; } .lg-manual { background: repeating-linear-gradient(45deg, #E4DCCB, #E4DCCB 3px, #F1EBDD 3px, #F1EBDD 6px); } .lg-sel { background: var(--palm); }
.confirmed-box { text-align: center; }

/* ---------- Calendrier ---------- */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head strong { font-family: var(--serif); font-size: 1.15rem; text-transform: capitalize; color: var(--palm); }
.cal-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--sand); color: var(--palm); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dow { font-size: .75rem; color: var(--muted); text-align: center; padding: 4px 0; }
.day { aspect-ratio: 1; min-height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.day:disabled { cursor: not-allowed; }
.day.past { background: transparent; border-color: transparent; color: #B2AA9B; }
.day.blocked { background: var(--danger-bg); border-color: #E8B9AA; color: var(--danger); text-decoration: line-through; }
.day.manual { background: repeating-linear-gradient(45deg, #E4DCCB, #E4DCCB 5px, #F1EBDD 5px, #F1EBDD 10px); border-color: #CFC4AF; }
.day.checkout { background: linear-gradient(135deg, #fff 50%, var(--danger-bg) 50%); }
.day.in-range { background: var(--palm-3); border-color: #B7D1BF; }
.day.sel { background: var(--palm); border-color: var(--palm); color: var(--sand); }
.day.today { box-shadow: inset 0 0 0 2px var(--clay); }

/* ---------- Tableau de bord ---------- */
.login-card { max-width: 440px; margin: 24px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.app-head { padding: 18px 0 8px; } .app-head h1 { margin-bottom: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 22px; }
.stat { background: var(--palm); color: var(--sand); border-radius: var(--r-md); padding: 12px 10px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1; margin-bottom: 4px; }
.stat span { font-size: .82rem; opacity: .9; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.tab { flex: 1 0 auto; min-height: 46px; padding: 0 12px; border-radius: var(--r-pill); border: 1.5px solid var(--sand-3); background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--palm); border-color: var(--palm); color: var(--sand); }
.tab span { opacity: .85; margin-left: 4px; }
.bk { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; }
.bk-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.bk-guest { font-weight: 700; margin-bottom: 2px; }
.bk-actions { display: grid; gap: 8px; margin-top: 10px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: .82rem; font-weight: 700; }
.b-pending { background: var(--sand-3); color: var(--ink); } .b-confirmed { background: var(--palm-3); color: var(--palm); } .b-cancelled { background: var(--danger-bg); color: var(--danger); }
.dash main { padding-bottom: 40px; }
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; justify-self: center; max-width: 480px; }
.toast.err { background: var(--danger); }

/* ---------- Administration ---------- */
.admin-list { display: grid; gap: 12px; }
.admin-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.ai-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
.switch input { width: 22px; height: 22px; accent-color: var(--palm); }
details.panel summary { font-weight: 700; cursor: pointer; min-height: 32px; font-family: var(--serif); font-size: 1.15rem; color: var(--palm); }
.dlg { width: min(640px, 94vw); max-height: 92vh; border: 0; border-radius: var(--r-lg); padding: 16px; background: var(--sand); color: var(--ink); }
.dlg::backdrop { background: rgba(18, 48, 31, .6); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.cover-box { aspect-ratio: 16 / 9; background: var(--palm-3); border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; margin-bottom: 8px; }
.cover-box img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.thumbs figure { margin: 0; display: grid; gap: 4px; }
.thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); width: 100%; }
.thumbs .btn { min-height: 36px; font-size: .8rem; padding: 0 6px; }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2.3rem; } .hero h1 { font-size: 2.6rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card.featured { grid-column: span 2; } .card.featured .card-img { aspect-ratio: 16 / 9; }
  .sun { right: 6%; width: 240px; height: 240px; top: 30px; }
  .gallery img { flex-basis: 48%; }
  .bk-actions { display: flex; flex-wrap: wrap; }
  .chips { flex-wrap: wrap; overflow: visible; padding: 0; margin: 0; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .place-grid { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
  .booking { position: sticky; top: 72px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

.logo img { width: auto; height: 36px; }

/* =====================================================================
   MER + OASIS : eau turquoise, vagues, îlots de palmiers
   ===================================================================== */
.topbar { background: linear-gradient(90deg, var(--palm), var(--sea-deep)); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'%3E%3Cpath d='M0 0H40V3Q30 10 20 3T0 3Z' fill='%230B4F5C'/%3E%3C/svg%3E") repeat-x; background-size: 40px 10px; }
.logo img { filter: drop-shadow(0 1px 0 rgba(0,0,0,.2)); }

.hero { background: linear-gradient(180deg, var(--sea-deep) 0%, #0D6770 58%, var(--sea) 100%); }
.sun { background: radial-gradient(circle at 40% 38%, #E27A4F, var(--clay) 70%); box-shadow: 0 0 60px 20px rgba(200, 90, 50, .35); }
.seascape { position: relative; z-index: 2; display: block; width: 100%; height: 132px; margin-top: 6px; }
.seascape .w1 path { fill: var(--sea-2); opacity: .55; }
.seascape .w2 path { fill: #1A8E94; }
.seascape .w3 path { fill: #0A5560; }
.seascape .foam { fill: none !important; stroke: #DDF3F0; stroke-width: 1.4; opacity: .8; }
.seascape .glint rect { fill: #F3B08F; opacity: .7; }
.seascape .isles use { fill: #12301F; }
.seascape .dune { fill: var(--sand); }
.seascape .w1 { animation: drift 18s linear infinite; }
.seascape .w2 { animation: drift 12s linear infinite reverse; }
.seascape .w3 { animation: drift 8s linear infinite; }
@keyframes drift { to { transform: translateX(-100px); } }

.chip:hover { border-color: var(--sea); }
#zone .chip[aria-pressed="true"] { background: var(--sea); border-color: var(--sea); }
.card:hover { border-color: var(--sea); }
.card-img, .gallery-ph, .gallery img { background: linear-gradient(160deg, var(--sea-3), var(--palm-3)); }
.cover-box { background: linear-gradient(160deg, var(--sea-3), var(--palm-3)); }
.ph { fill: var(--sea); opacity: .45; }
.price b, .price-big b { color: var(--sea-deep); }
.card.featured { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(61, 180, 176, .25); }

.panel, .login-card { border-top: 4px solid var(--sea); }
.summary, .notice { background: var(--sea-3); color: var(--sea-deep); }
.day.in-range { background: var(--sea-3); border-color: #9DD3CF; }
.day.sel { background: var(--sea-deep); border-color: var(--sea-deep); }
.lg-sel { background: var(--sea-deep); }
.cal-nav { color: var(--sea-deep); }
.btn-primary { background: var(--sea-deep); }
.btn-ghost { color: var(--sea-deep); border-color: var(--sea-deep); }
.tab[aria-selected="true"] { background: var(--sea-deep); border-color: var(--sea-deep); }
.b-confirmed { background: var(--sea-3); color: var(--sea-deep); }

.stat { background: var(--palm); }
.stat:nth-child(2) { background: var(--sea); }
.stat:nth-child(3) { background: var(--palm-2); }

.dash h2 { padding-bottom: 10px; margin-top: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 8'%3E%3Cpath d='M0 4q10-6 20 0t20 0' fill='none' stroke='%230E7C86' stroke-width='2'/%3E%3C/svg%3E") repeat-x left bottom; background-size: 40px 8px; }

.site-foot { position: relative; margin-top: 28px; padding-top: 44px; background: var(--sea-deep); }
.site-foot::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cpath d='M0 0H100V9Q75 20 50 9T0 9Z' fill='%23F8F5F0'/%3E%3C/svg%3E") repeat-x; background-size: 100px 20px; }
@media (min-width: 640px) { .seascape { height: 160px; } }
