/*
Theme Name: Gîte Bretagne
Description: Thème one-page pour un gîte en Bretagne : panorama 360° plein écran, photos, alentours, tarifs et réservation en ligne.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gite
*/

:root {
  --ocean: #0d3b4a;
  --ocean-2: #14566a;
  --sea: #2e7f91;
  --foam: #e6f0f0;
  --sand: #f6f1e7;
  --stone: #2b3236;
  --muted: #5d676c;
  --gorse: #e3a72f;
  --gorse-d: #c98f1a;
  --line: rgba(13, 59, 74, .14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(13, 59, 74, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--stone);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean-2); }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); color: var(--ocean); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.3rem; }
.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 40px); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ocean); padding: 8px 14px; z-index: 200; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gorse); outline-offset: 3px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.7em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--gorse { background: var(--gorse); color: #2a1d00; }
.btn--gorse:hover { background: var(--gorse-d); }
.btn--ghost { border-color: rgba(255, 255, 255, .75); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.btn--sm { padding: .55em 1.3em; font-size: .95rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 18px 0; color: #fff;
  transition: background .3s, box-shadow .3s, padding .3s;
}
.admin-bar .site-header { top: 32px; }
body:not(.has-hero) .site-header,
.site-header.is-solid {
  background: rgba(13, 59, 74, .96); backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .15); padding: 10px 0;
}
body:not(.has-hero) main { padding-top: 72px; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: #fff; text-decoration: none; letter-spacing: .01em; }
.brand img { max-height: 46px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav .menu { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { color: #fff; text-decoration: none; font-size: .95rem; opacity: .92; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav .menu a:hover { border-bottom-color: var(--gorse); opacity: 1; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; z-index: 70; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle__bars { top: 21px; }
.nav-toggle__bars::before { left: 0; right: 0; top: -7px; }
.nav-toggle__bars::after { left: 0; right: 0; top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 88vh; height: 88svh; min-height: 560px; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #a9d3dc 0%, #2e7f91 52%, #0d3b4a 100%);
}
.hero__pano { position: absolute; inset: 0; background: #0d3b4a; }
.hero__overlay {
  position: absolute; inset: 0; pointer-events: none; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(6, 28, 36, .5) 0%, rgba(6, 28, 36, 0) 26%, rgba(6, 28, 36, 0) 42%, rgba(6, 28, 36, .82) 100%);
}
.hero__content { padding-bottom: clamp(32px, 7vh, 76px); }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 6.6vw, 5.2rem); max-width: 16ch; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero__lead { max-width: 46ch; font-size: clamp(1.05rem, 1.8vw, 1.3rem); text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; pointer-events: auto; }
.hero__hint {
  display: inline-flex; align-items: center; gap: 10px; margin: 26px 0 0; padding: 8px 16px; font-size: .9rem;
  background: rgba(6, 28, 36, .45); backdrop-filter: blur(6px); border-radius: 999px; animation: hint 3s ease-in-out 1s 3;
}
@keyframes hint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
.hero .pnlm-container { background: #0d3b4a; }
.is-fallback { background-size: cover; background-position: center; background-repeat: no-repeat; }
.is-fallback .pnlm-container, .is-fallback .pnlm-error-msg, .is-fallback .pnlm-info-box, .is-fallback .pnlm-load-box { display: none !important; }
.hero .admin-hint { position: absolute; left: 20px; top: 96px; z-index: 5; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; scroll-margin-top: 70px; }
.section--tight { padding-top: 0; }
.section--sand { background: var(--sand); }
.section--foam { background: var(--foam); }
.section--ocean { background: var(--ocean); color: #d8e6ea; }
.section--ocean h2 { color: #fff; }
.section__head { max-width: 640px; margin-bottom: 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--sea); margin-bottom: 14px; }
.eyebrow--light { color: #f3d58f; }
.admin-hint { display: inline-block; margin: 12px 0 0; padding: 10px 16px; border: 2px dashed var(--gorse); background: #fff8e6; color: #5c4300; border-radius: 12px; font-size: .9rem; }

.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about__text p { font-size: 1.08rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.facts li { background: var(--foam); border-radius: var(--radius); padding: 22px 20px; display: flex; flex-direction: column; }
.facts strong { font-family: var(--serif); font-size: 2.3rem; line-height: 1.1; color: var(--ocean); }
.facts span { color: var(--muted); font-size: .95rem; }

.amenities__title { margin-top: clamp(40px, 6vw, 72px); }
.amenities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 28px; }
.amenities li { position: relative; padding-left: 30px; }
.amenities li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 14px; height: 8px; border-left: 2px solid var(--sea); border-bottom: 2px solid var(--sea); transform: rotate(-45deg); }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 12px; }
.gallery__item { padding: 0; border: 0; background: var(--foam); border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item--hero { grid-column: span 2; grid-row: span 2; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(5, 20, 26, .94); }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 86vh; max-width: min(1200px, 92vw); object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; padding: 14px; }
.lightbox__close { top: 10px; right: 14px; }
.lightbox__prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 6px; top: 50%; transform: translateY(-50%); }

/* ---------- Visite intérieure ---------- */
.pano-box { height: min(70vh, 620px); min-height: 360px; border-radius: var(--radius); overflow: hidden; background: #082a35; }

/* ---------- Cartes (alentours, avis) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { position: relative; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 2px 0 rgba(13, 59, 74, .04); }
.card p { color: var(--muted); margin: 0; }
.card__badge { display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: var(--foam); color: var(--ocean-2); font-size: .8rem; font-weight: 700; }
.review blockquote { margin: 0 0 16px; font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; color: var(--stone); }
.review figcaption { font-size: .9rem; color: var(--muted); }
.review__stars { color: var(--gorse-d); letter-spacing: .1em; margin-bottom: 10px; }

/* ---------- Réservation ---------- */
.rates { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; padding: 0; }
.rates li { background: #fff; border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; font-size: .92rem; }
.rates strong { color: var(--ocean); }
.booking { display: grid; gap: 24px; }
.booking__calendar { background: #fff; border-radius: var(--radius); padding: 24px 16px 16px; box-shadow: var(--shadow); text-align: center; overflow-x: auto; }
.booking__legend { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.swatch--booked { background: repeating-linear-gradient(45deg, #f1f2f3, #f1f2f3 3px, #dfe2e4 3px, #dfe2e4 6px); border: 1px solid #d0d4d6; }
.booking__form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.booking__summary { position: sticky; top: 96px; background: var(--ocean); color: #e8f1f3; border-radius: var(--radius); padding: 28px 26px; }
.booking__summary .muted { color: #b7ccd2; margin: 0; }
.booking__summary .is-error { color: #ffd2c4; margin: 0; }
.summary__dates { font-family: var(--serif); font-size: 1.35rem; color: #fff; margin-bottom: 14px; }
.summary__lines { list-style: none; margin: 0 0 14px; padding: 0; }
.summary__lines li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: .95rem; }
.summary__total { display: flex; justify-content: space-between; font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0 0 6px; }
.summary__deposit { font-size: .88rem; color: #b7ccd2; margin: 0; }
.booking__fields { background: #fff; border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--ocean); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; font: inherit; color: var(--stone); background: #fbfbfb;
  border: 1px solid #cfd6d9; border-radius: 12px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(46, 127, 145, .2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 4px 0 18px; }
.check input { margin-top: 4px; accent-color: var(--ocean); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-status { min-height: 1.4em; margin: 12px 0 0; font-size: .92rem; }
.form-status.is-error { color: #b42318; }
.form-status.is-ok { color: #067647; }
.fineprint { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
.booking__done { text-align: center; padding: 36px 10px; }
.booking__done h3 { font-size: 1.8rem; }

/* Calendrier (flatpickr) */
.flatpickr-calendar.inline { margin: 0 auto; box-shadow: none; }
.booking__calendar .flatpickr-day.selected, .booking__calendar .flatpickr-day.startRange, .booking__calendar .flatpickr-day.endRange,
.booking__calendar .flatpickr-day.selected:hover, .booking__calendar .flatpickr-day.startRange:hover, .booking__calendar .flatpickr-day.endRange:hover { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.booking__calendar .flatpickr-day.inRange { background: var(--foam); border-color: var(--foam); box-shadow: -5px 0 0 var(--foam), 5px 0 0 var(--foam); }
.booking__calendar .flatpickr-day.today:not(.selected) { border-color: var(--gorse); }
.booking__calendar .flatpickr-day.is-booked:not(.selected):not(.startRange):not(.endRange) { color: #a6adb0; text-decoration: line-through; background: repeating-linear-gradient(45deg, #f4f5f5, #f4f5f5 4px, #e6e8e9 4px, #e6e8e9 8px); border-color: transparent; }
.booking__calendar .flatpickr-day.prevMonthDay, .booking__calendar .flatpickr-day.nextMonthDay { color: #c4c9cb; }
.hero .eyebrow { text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.infos, .contact__list { list-style: none; margin: 0 0 24px; padding: 0; }
.infos li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.contact__list li { padding: 3px 0; font-weight: 600; }
.contact__map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 340px; }
.contact__map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ---------- Pied de page ---------- */
.site-footer { background: #082a35; color: #b7ccd2; padding: 48px 0 24px; font-size: .95rem; }
.site-footer a { color: #e8f1f3; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer__brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin: 0; }
.footer__muted { margin: 0; }
.footer__inner p { margin: 0 0 4px; }
.footer__nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer__bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }

.mobile-cta { display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transform: translateY(150%); transition: transform .3s; }

/* ---------- Pages simples ---------- */
.entry h1 { font-size: clamp(2rem, 5vw, 3rem); }
.entry__content { font-size: 1.05rem; }
.entry__content h2 { font-size: 1.6rem; margin-top: 1.6em; }
.entry__content h3 { margin-top: 1.4em; }

/* ---------- Animations d’apparition ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Adaptation tablette / mobile ---------- */
@media (max-width: 980px) {
  .about, .contact { grid-template-columns: 1fr; }
  .booking__form { grid-template-columns: 1fr; }
  .booking__summary { position: static; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0; z-index: 60; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--ocean); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav .menu { flex-direction: column; align-items: center; gap: 18px; }
  .site-nav .menu a { font-size: 1.3rem; }
  .nav-open .brand, .nav-open .nav-toggle { position: relative; z-index: 70; }
  .mobile-cta { display: inline-flex; }
  body.scrolled .mobile-cta { transform: none; }
  body.nav-open .mobile-cta { display: none; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row .field:last-child { margin-bottom: 14px; }
  .booking__fields, .booking__summary { padding: 22px 18px; }
  .facts strong { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
