/*
Theme Name: Moulin Tapin
Description: Thème sur-mesure pour le gîte Moulin Tapin, reproduisant la charte du site d'origine.
Author: Bastien Jund
Version: 1.0
Text Domain: moulin-tapin
*/

:root {
  --dark: #313531;
  --accent: #1dcae4;
  --text: #424753;
  --bg-alt: #f5f5f5;
  --font-body: "Raleway", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
  --font-heading: "Lato", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  background: #fff;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 400;
  margin: 0 0 1rem;
  color: var(--text);
}
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.5rem; }

.entry-title,
.page-content h1 {
  display: inline-block;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--accent);
  margin-bottom: 2rem;
}

.page-content ul.dot-list,
.page-content > .container > ul {
  list-style: none;
  padding-left: 0;
}
.page-content ul.dot-list li,
.page-content > .container > ul li {
  margin-bottom: 0.9rem;
  padding-left: 1.4rem;
  position: relative;
}
.page-content ul.dot-list li::before,
.page-content > .container > ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (max-width: 480px) {
  .container { padding: 0 1.5rem; }
}

/* ---------- Header ---------- */
#site-header {
  background: var(--dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}
#site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-branding img.logo { width: 56px; height: 56px; }
.site-branding .site-title {
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0;
}
.site-branding .site-title a { color: var(--accent); }
.badge-tourisme img { width: 60px; height: 60px; }

#primary-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
}
#primary-menu li a {
  display: inline-block;
  color: #fff;
  padding: 1.5rem 0 1rem;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}
#primary-menu li a:hover,
#primary-menu li.current-menu-item a {
  color: #fff;
  text-decoration: none;
  border-bottom-color: var(--accent);
}
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  #primary-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  #primary-menu.is-open { display: flex; }
  #primary-menu li a { padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
}

/* ---------- Page content (generic pages) ---------- */
.page-content { padding: 3rem 0; }
.page-content .entry-title { margin-bottom: 1.5rem; }

/* ---------- Homepage ---------- */
.home-intro { padding: 3rem 0 2rem; }
.home-intro .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 800px) {
  .home-intro .grid-2 { grid-template-columns: 1fr; }
}

.carousel { position: relative; overflow: hidden; border-radius: 4px; }
.carousel-track { display: flex; transition: transform .6s ease; }
.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; height: 420px; object-fit: cover; }
.carousel-dots { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.75rem; }
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; background: #ccc; padding: 0; cursor: pointer;
}
.carousel-dots button.active { background: var(--accent); }

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 1.5rem;
  border-radius: 4px;
  overflow: hidden;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.carousel--large .carousel-slide img { height: 560px; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(49,53,49,.6);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-arrow:hover { background: var(--accent); }
.carousel-arrow.prev { left: 1rem; }
.carousel-arrow.next { right: 1rem; }
@media (max-width: 700px) {
  .carousel--large .carousel-slide img { height: 320px; }
}

.access-band {
  background: var(--bg-alt);
  padding: 2.5rem 0;
  text-align: center;
}

/* Bento "points forts" */
.features { padding: 3rem 0; }
.features h2 { text-align: center; margin-bottom: 2rem; }
.cube-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 260px;
}
.cube-row .cube-image { width: 100%; height: 100%; object-fit: cover; }
.cube-row .cube-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.cube-row .cube-content span {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}
.cube-row:nth-child(6n+1) .cube-content { background: linear-gradient(135deg,#4a90c9,#3a7bb5); }
.cube-row:nth-child(6n+2) .cube-content { background: linear-gradient(135deg,#2fa9c9,#1dcae4); }
.cube-row:nth-child(6n+3) .cube-content { background: linear-gradient(135deg,#3aa0c9,#57b8d8); }
.cube-row:nth-child(6n+4) .cube-content { background: linear-gradient(135deg,#7b7bd6,#5c5cc4); }
.cube-row:nth-child(6n+5) .cube-content { background: linear-gradient(135deg,#6d7fd6,#4a90c9); }
.cube-row:nth-child(6n+6) .cube-content { background: linear-gradient(135deg,#5c5cc4,#8f6fd6); }
.cube-row.reverse { direction: rtl; }
.cube-row.reverse > * { direction: ltr; }
@media (max-width: 700px) {
  .cube-row { grid-template-columns: 1fr; min-height: auto; }
  .cube-row .cube-image { height: 220px; }
}

.closing-text { padding: 1rem 0 3rem; }
.closing-text p { max-width: 900px; }

.before-after { padding: 0 0 3rem; }
.before-after .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}
.before-after img { width: 100%; height: auto; object-fit: contain; }
@media (max-width: 700px) {
  .before-after .grid-2 { grid-template-columns: 1fr; }
}

.map-section iframe { width: 100%; height: 400px; border: 0; }

/* ---------- Galleries / lightbox grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1.5rem 0 2.5rem;
}
.photo-grid a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.photo-grid a:hover img { transform: scale(1.06); }
@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .photo-grid { grid-template-columns: 1fr; }
}

/* ---------- Tabs (Le Gîte) ---------- */
.intro-line {
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}
.tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 2rem;
}
.tab-trigger {
  background: #fff;
  border: 2px solid var(--accent);
  border-bottom: none;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  padding: 0.9rem 1.6rem;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  margin-right: 0.4rem;
  margin-bottom: -2px;
}
.tab-trigger.is-active {
  background: var(--accent);
  color: #fff;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.tab-panel ul { list-style: none; padding-left: 0; }
.tab-panel li {
  margin-bottom: 0.9rem;
  padding-left: 1.4rem;
  position: relative;
}
.tab-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 700px) {
  .tabs-list { border-bottom: none; }
  .tab-trigger { border-radius: 4px; border-bottom: 2px solid var(--accent); margin-bottom: 0.4rem; width: 100%; text-align: left; }
}

/* ---------- Activités ---------- */
.activity-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.activity-card {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.activity-card img { height: 200px; object-fit: cover; }
.activity-card span {
  display: block;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Tarifs / réservation ---------- */
.tarifs-band {
  position: relative;
  padding: 2.5rem 0;
  background-size: cover;
  background-position: center;
  color: #1a3a5c;
}
.tarifs-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.5);
}
.tarifs-band .container { position: relative; z-index: 1; }
.tarifs-band h2,
.tarifs-band .tarifs-list li,
.tarifs-band .entry-title {
  text-shadow: 0 1px 3px rgba(255,255,255,.8), 0 0 12px rgba(255,255,255,.6);
}
.tarifs-band h2 {
  color: #1a3a5c;
  font-style: italic;
  font-weight: 700;
  font-size: 2.1rem;
}
.tarifs-band-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 800px) {
  .tarifs-band-grid { grid-template-columns: 1fr; }
}
.tarifs-list { list-style: none; padding: 0; }
.tarifs-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(26,58,92,.25);
  color: #1a3a5c;
  font-weight: 600;
  font-size: 1.1rem;
}
.tarifs-list li.highlight { color: #d1394a; text-decoration: underline; }
.tarifs-image { text-align: center; margin-bottom: 1.5rem; }
.tarifs-image img { border-radius: 4px; margin: 0 auto; }

.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.9rem 1.8rem;
  border-radius: 4px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}
.btn-cta:hover { opacity: 0.9; text-decoration: none; color: #fff; }

.reservation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 800px) {
  .reservation-grid { grid-template-columns: 1fr; }
}
.calendrier-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#calendrier-frame { width: 743px; max-width: none; height: 605px; border: 0; }
@media (max-width: 800px) {
  #calendrier-frame { width: 100%; max-width: 743px; }
}
.conditions-link { display: inline-block; margin-top: 1rem; }

.booking-form { width: 100%; max-width: 100%; }
.booking-form input,
.booking-form textarea,
.booking-form select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 1rem;
}
.booking-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.booking-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.booking-form .radio-group { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-bottom: 1rem; }
.booking-form .radio-group label { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; margin-bottom: 0; }
.booking-form .radio-group input { width: auto; margin: 0; flex-shrink: 0; }
.booking-form .checkbox-row { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 1.25rem; }
.booking-form .checkbox-row input { width: auto; margin: 0.25rem 0 0; flex-shrink: 0; }
.booking-form .checkbox-row label { font-weight: 400; margin-bottom: 0; }
.booking-form button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  border-radius: 3px;
  cursor: pointer;
  width: 100%;
}
@media (min-width: 500px) {
  .booking-form button { width: auto; }
}
@media (max-width: 600px) {
  .booking-form .row-2 { grid-template-columns: 1fr; gap: 0; }
  .booking-form input,
  .booking-form select { font-size: 16px; } /* avoid iOS zoom-on-focus */
}
.booking-form button:hover { opacity: 0.9; }
.form-notice { padding: 0.75rem 1rem; border-radius: 3px; margin-bottom: 1rem; }
.form-notice.success { background: #e3f9e5; color: #1c6b28; }
.form-notice.error { background: #fdeaea; color: #a02020; }

.how-to-book { padding: 3rem 0; }

/* ---------- Reviews (Avis) ---------- */
.avis-section { padding: 3rem 0; }

/* ---------- Footer ---------- */
#site-footer {
  background: var(--dark);
  color: #fff;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
#site-footer a { color: var(--accent); }
#site-footer h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 800px) {
  .footer-columns { grid-template-columns: 1fr; }
}
.footer-columns ul { list-style: none; padding: 0; margin: 0; }
.footer-columns li { margin-bottom: 0.5rem; }
.footer-bottom {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 0.85rem;
  color: rgba(255,255,255,.75);
}
.footer-bottom a { color: rgba(255,255,255,.85); margin: 0 0.5rem; }

/* GLightbox tweak so it sits above our sticky header */
.glightbox-container { z-index: 2000; }
