/*
Theme Name: T2 Saint-Côme
Theme URI: https://t2-saintcome.fr/
Author: Léa Roussel
Author URI: https://t2-saintcome.fr/
Description: Site de présentation et de demande de location pour l'appartement meublé 2 pièces de Saint-Côme-et-Maruéjols (Gard). Calendrier de disponibilités et formulaire de demande de réservation, sans paiement. Contact uniquement par e-mail.
Version: 1.1
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saintcomes
*/

/* =========================================================
   Appartement meublé — Saint-Côme-et-Maruéjols
   Feuille de style principale
   ========================================================= */

:root {
  --cream:      #faf6ef;
  --cream-2:    #f3ece0;
  --white:      #ffffff;
  --ink:        #2e2a26;
  --muted:      #6f6760;
  --green:      #3d5a4c;
  --green-dark: #2f4a3d;
  --terracotta: #b9574b;
  --stone:      #e6ddce;
  --line:       #e8e0d3;
  --shadow:     0 14px 40px rgba(46, 42, 38, 0.10);
  --shadow-sm:  0 6px 18px rgba(46, 42, 38, 0.08);
  --radius:     16px;
  --radius-sm:  10px;
  --serif:      "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:       "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green); text-decoration: none; }

.container { width: min(1120px, 92vw); margin-inline: auto; }
.narrow    { max-width: 760px; margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 0 0 .4em; }
h3 { font-size: 1.4rem; margin: 0 0 .4em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--terracotta);
  margin: 0 0 .6rem;
}
.center { text-align: center; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--cream-2); }
.section-intro { color: var(--muted); font-size: 1.08rem; text-align: center; margin: 0 auto 2.4rem; max-width: 640px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-align: center;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-block { width: 100%; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.brand-mark { font-size: 1.6rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.25rem; }
.brand-text small { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 1.8rem; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: .96rem; }
.site-nav a:hover { color: var(--green); }
.site-nav .nav-cta { background: var(--green); color: #fff; padding: .5em 1.1em; border-radius: 999px; }
.site-nav .nav-cta:hover { background: var(--green-dark); color:#fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: .25s; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-text .lead { color: var(--muted); font-size: 1.12rem; max-width: 33em; }
.hero sup { font-size: .55em; }

.price-tag { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 .8rem; }
.price { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--green); }
.price small { font-size: .9rem; font-family: var(--sans); color: var(--muted); font-weight: 600; }
.price-plus { color: var(--muted); font-weight: 600; }

.badge-available {
  display: inline-block;
  background: #e7f1ea; color: var(--green-dark);
  font-weight: 700; font-size: .9rem;
  padding: .4em 1em; border-radius: 999px; margin: 0 0 1.6rem;
}
.badge-available::first-letter { color: #41a06b; }

.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

.hero-media img {
  width: 100%; height: 100%; max-height: 560px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Points clés ---------- */
.facts { background: var(--green); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; padding: 2rem 0; }
.fact { padding: .6rem; border-right: 1px solid rgba(255,255,255,.16); }
.fact:last-child { border-right: 0; }
.fact-num { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 700; }
.fact-num sup { font-size: .5em; }
.fact-label { font-size: .82rem; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Caractéristiques ---------- */
.features {
  list-style: none; padding: 0; margin: 0 0 2rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem 1.6rem;
}
.features li { position: relative; padding-left: 1.9rem; color: var(--ink); }
.features li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: #fff; background: var(--green);
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.charges-note {
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--terracotta);
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; color: var(--muted);
}
.charges-note strong { color: var(--ink); }

/* ---------- Galerie ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  grid-auto-rows: 220px;
}
.gallery-item { position: relative; margin: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); }
.gallery-item.wide { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  color: #fff; font-size: .9rem; font-weight: 600; padding: 1.4rem .9rem .7rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,18,16,.92);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-caption { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #fff; font-size: .95rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; border-radius: 999px; }
.lightbox-close { top: 20px; right: 24px; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lightbox-prev { left: 18px; } .lightbox-next { right: 18px; }
.lightbox button:hover { background: rgba(255,255,255,.25); }

/* ---------- Calendrier ---------- */
.calendar-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 1.4rem clamp(1rem, 3vw, 1.8rem); max-width: 560px; margin: 0 auto;
}
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.calendar-header h3 { margin: 0; text-transform: capitalize; }
.cal-nav {
  background: var(--cream-2); border: 1px solid var(--line); color: var(--ink);
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; transition: .15s;
}
.cal-nav:hover:not(:disabled) { background: var(--green); color: #fff; }
.cal-nav:disabled { opacity: .35; cursor: not-allowed; }

.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-weekdays { margin-bottom: 6px; }
.calendar-weekdays span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.cal-day {
  aspect-ratio: 1 / 1; display: grid; place-items: center;
  border-radius: 10px; font-size: .95rem; font-weight: 600;
  border: 1px solid transparent;
}
.cal-day.empty { visibility: hidden; }
.cal-day.available { background: #e7f1ea; color: var(--green-dark); cursor: pointer; transition: .12s; }
.cal-day.available:hover { background: var(--green); color: #fff; transform: translateY(-2px); }
.cal-day.reserved { background: #f7e3e0; color: var(--terracotta); text-decoration: line-through; cursor: not-allowed; }
.cal-day.past { background: var(--cream-2); color: #c0b7a8; cursor: not-allowed; }
.cal-day.selected { background: var(--green); color: #fff; box-shadow: 0 0 0 3px rgba(61,90,76,.25); }

.calendar-legend { display: flex; justify-content: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.2rem; font-size: .85rem; color: var(--muted); }
.calendar-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.dot-available { background: #b9d8c6; }
.dot-reserved { background: #e8b7af; }
.dot-past { background: #ddd3c4; }

/* ---------- Formulaire ---------- */
.booking-form {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 4vw, 2.4rem); max-width: 680px; margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.booking-form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 1rem; color: var(--ink); }
.booking-form input, .booking-form select, .booking-form textarea {
  width: 100%; margin-top: .35rem; padding: .75em .9em;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--cream);
  font-weight: 400;
}
.booking-form input:focus, .booking-form select:focus, .booking-form textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(61,90,76,.15); background: #fff;
}
.booking-form textarea { resize: vertical; }
.form-note { background: #e7f1ea; color: var(--green-dark); padding: .7em 1em; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem; }
.form-disclaimer { font-size: .82rem; color: var(--muted); text-align: center; margin: 1rem 0 0; }
.form-feedback { margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; }
.form-feedback.success { background: #e7f1ea; color: var(--green-dark); border: 1px solid #b9d8c6; }
.form-feedback.error { background: #f7e3e0; color: var(--terracotta); border: 1px solid #e8b7af; }
.form-feedback a { font-weight: 700; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #e9e3da; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: clamp(2.5rem, 5vw, 4rem) 0; }
.site-footer h3 { color: #fff; }
.contact-line { margin: .4rem 0; }
.contact-email { color: #fff; font-size: 1.2rem; font-weight: 700; word-break: break-word; }
.contact-email:hover { color: #b9d8c6; }
.contact-line.muted { color: #9a9088; font-size: .9rem; }
.footer-map iframe { width: 100%; height: 220px; border: 0; border-radius: var(--radius-sm); filter: grayscale(.2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #9a9088; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 0; }
.footer-bottom a { color: #c9c1b6; }
.footer-legal { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Pages (mentions légales, confidentialité, 404) ---------- */
.page-content h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1.2rem; }
.page-content h2 { font-size: 1.35rem; margin: 2rem 0 .5rem; }
.page-body p { margin: 0 0 1rem; color: var(--ink); }
.page-back { margin-top: 2.5rem; font-weight: 600; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem 6vw 1.2rem; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { text-align: center; margin-top: .6rem; border-bottom: 0; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media img { max-height: 360px; }

  .facts-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .fact { border: 0; padding: 1rem .6rem; }

  .features { grid-template-columns: 1fr; }

  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-item.wide { grid-column: span 2; grid-row: span 1; }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .facts-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item.wide { grid-column: span 1; }
  .price { font-size: 2.1rem; }
}
