/* ==========================================================
   VARIABLES GLOBALES
   ========================================================== */
:root {
  --primary-color: #8B5E3C;
  --secondary-color: #F5EFE6;
  --accent-color: #648b47;
  --text-color: #4a4a4a;
  --white: #fff;
  --gray-dark: #333;
  --gray-light: #cfbfaf;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --border-radius: 10px;
  --transition-fast: 0.3s ease;
  --transition-slow: 0.5s ease;
  --hover-green: #98b58a;
  --beige: #ded0c2;
  --menu-hover: #6b8f4b;
  --menu-current: #98b58a;
  --border-soft: #e8dfd6;
  --shadow-lg: 0 12px 28px rgba(0,0,0,.15);
  --accent-dark: #556C3F;
}

/* ==========================================================
   RESET DE BASE
   ========================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: Arial, sans-serif;
  color: var(--gray-dark);
  background-color: var(--secondary-color);
  max-width: 1200px;
  margin: auto;
}

/* ==========================================================
   EN-TÊTE (HEADER)
   ========================================================== */
header { box-shadow: 0 4px 8px var(--shadow-color); padding: 10px 0; text-align: center; }
.subtitle { font-size: 1.1rem; color: var(--text-color); text-align: center; margin: 0 auto 1rem; max-width: 90%; }

/* ==========================================================
   HÉRO (ACCROCHE VISUELLE)
   ========================================================== */
.hero {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  height: 500px; color: white; text-align: center;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 80px 20px 40px 20px; position: relative;
  box-shadow: 0 4px 8px var(--shadow-color);
  border-radius: var(--border-radius); overflow: hidden;
}
.hero-text { background-color: rgba(0, 0, 0, 0.5); display: inline-block; padding: 20px 40px; border-radius: 8px; max-width: 80%; margin: 0 auto; }
.hero h1, .hero p { margin: 0; }
.hero h1 { font-size: 2rem; margin-bottom: 10px; }
.hero p { font-size: 1.2rem; line-height: 1.6; }
/* Images spécifiques par page */
.hero-home { background-image: url('images/gite-le-megnon-aerienne-1360px.webp'); }
.hero-pitchounette { background-image: url('images/gite-pitchounette-exterieur.jpg'); }
.hero-mirabelle { background-image: url('images/gite-mirabelle-exterieur.jpg'); }

/* ==========================================================
   SECTION DESCRIPTION
   ========================================================== */
.description { background-color: #f9f9f9; padding: 40px 20px; border-radius: var(--border-radius); margin: 30px 0; }
.description p { margin-bottom: 20px; line-height: 1.6; }
.description ul { list-style: disc inside; padding-left: 20px; margin: 0 auto; max-width: 600px; }
.description li { margin-bottom: 10px; line-height: 1.5; }

/* ==========================================================
   GALERIE PHOTOS
   ========================================================== */
.gallery { background-color: var(--white); padding: 40px 20px; margin: 40px 0; border-radius: var(--border-radius); }
.gallery-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.gallery-grid a { display: block; overflow: hidden; border-radius: 8px; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); }
.gallery-grid img { width: 100%; max-width: 400px; height: 220px; object-fit: cover; transition: transform 0.3s ease; border-radius: 8px; }
.gallery-grid a:hover img { transform: scale(1.05); }

/* ==========================================================
   FORMULAIRE DE RÉSERVATION
   ========================================================== */
.reservation { background-color: #f9f9f9; padding: 40px 20px; border-radius: var(--border-radius); max-width: 800px; margin: 40px auto; }
.reservation h2 { text-align: center; margin-bottom: 30px; }
.reservation form { display: flex; flex-direction: column; gap: 15px; }
.reservation label { font-weight: bold; margin-bottom: 5px; }
.reservation input, .reservation textarea { padding: 10px; font-size: 1rem; border: 1px solid #ccc; border-radius: 6px; width: 100%; box-sizing: border-box; }
.reservation textarea { min-height: 120px; resize: vertical; }
.reservation .btn { align-self: flex-start; padding: 10px 20px; margin-top: 10px; }
.reservation p { margin-top: 30px; text-align: center; }

/* ==========================================================
   GÎTES (SECTION + CARTES)
   ========================================================== */
.gites-container { padding: 20px; padding-top: 40px; display: flex; justify-content: space-around; flex-wrap: wrap; background: var(--beige); border-radius: var(--border-radius); }
.gite { background: var(--white); padding: 15px; border-radius: var(--border-radius); width: 45%; text-align: center; box-shadow: 0 2px 5px var(--shadow-color); margin: 15px 0 20px; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.gite img { max-width: 100%; height: 250px; object-fit: cover; border-radius: inherit; }
.gite h3 { margin-top: 15px; margin-bottom: 10px; font-size: 1.2rem; }
.gite p { margin: 10px 0 20px; line-height: 1.6; padding: 0 10px; }
.gite .btn { margin-top: auto; }

/* ==========================================================
   BOUTONS / CTA
   ========================================================== */
.btn, .cta-button, .gite a.btn {
  display: inline-block; padding: 10px 20px; background: var(--accent-color);
  color: var(--white); text-decoration: none; font-weight: bold;
  border-radius: var(--border-radius);
  transition: background var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}
.btn:hover, .cta-button:hover, .gite a.btn:hover { background: var(--accent-dark); transform: scale(1.05); }

/* ==========================================================
   NAVIGATION (BASE, MOBILE, DESKTOP, ÉTATS)
   ========================================================== */
/* Base nav/header */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--beige); }
.header-inner { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:0.75rem 1rem; }
.container { max-width: 1200px; margin: 0 auto; }
.logo { font-weight:700; text-decoration:none; color:#1f2937; }
.menu-toggle { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:0; background:transparent; cursor:pointer; }
.menu-toggle:focus-visible { outline:2px solid #3b82f6; outline-offset:2px; }
.burger-lines, .burger-lines::before, .burger-lines::after { content:""; display:block; width:22px; height:2px; background:#1f2937; border-radius:2px; transition:transform .2s ease, opacity .2s ease; }
.burger-lines::before { transform:translateY(-6px); }
.burger-lines::after  { transform:translateY(4px); }
.nav { background-color: var(--beige); }
.nav-list { list-style:none; margin:0; padding:0; display:flex; gap:1rem; }
.nav-list a { display:inline-block; padding:.5rem .75rem; text-decoration:none; color:#1f2937; }
.nav-list a:hover, .nav-list a:focus { text-decoration:underline; }

/* Mobile <= 991px : off-canvas */
@media (max-width: 991px) {
  .nav { position: fixed; inset:0 0 0 auto; width:min(84vw, 360px); background:var(--beige); box-shadow:-8px 0 24px rgba(0,0,0,.15); transform:translateX(100%); transition:transform .2s ease; padding:1rem 1rem 2rem; display:block; overflow-y:auto; max-height:100dvh; }
  .nav-list { flex-direction:column; gap:.25rem; }
  .nav-list a { padding:.875rem 0; font-size:16px; }
  .nav[data-open="true"] { transform:translateX(0); }
  .nav-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); backdrop-filter:none; }
  .nav-overlay[hidden] { display:none; }
  .menu-toggle[aria-expanded="true"] .burger-lines { transform:rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .burger-lines::before { transform:rotate(90deg); }
  .menu-toggle[aria-expanded="true"] .burger-lines::after  { opacity:0; }
}

/* Accessibilité utilitaires */
.no-scroll { overflow:hidden; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); border:0; padding:0; clip-path: inset(50%); white-space: nowrap;}
@media (prefers-reduced-motion: reduce) { .nav { transition:none; } .burger-lines, .burger-lines::before, .burger-lines::after { transition:none; } }

/* Desktop >= 992px : dropdown */
@media (min-width: 992px) {
  .menu-toggle { display: none; }
  .nav { display: block; position: static; transform: none; padding: 0; box-shadow: none; }
  .has-section { position: relative; }
  .nav-sub{
	  display: none;
	  position: absolute; top: 100%; right: 0; left: auto;
	  min-width: 240px;
	  margin: 0;                     /* pas de “trou” au survol */
	  padding: 0; list-style: none;
	  background: var(--white);
	  border: 0;                     /* ❌ aucune bordure externe */
	  border-radius: var(--border-radius);
	  overflow: hidden;
	  box-shadow: var(--shadow-lg);
	  z-index: 1001;
	  transform: translateZ(0);      /* anti-artéfacts hairline */
  }
  .nav-sub li + li { border-top: 1px solid var(--border-soft); }
  .nav-sub li { list-style: none; }
  .nav-sub li:first-child a,
  .nav-sub li:first-child .active{
	  border-top-left-radius: var(--border-radius);
	  border-top-right-radius: var(--border-radius);
  }
  .nav-sub li:last-child a,
  .nav-sub li:last-child .active{
	  border-bottom-left-radius: var(--border-radius);
	  border-bottom-right-radius: var(--border-radius);
  }


.nav-sub a, .nav-sub .active {
  display: block; padding: .75rem 1rem; white-space: nowrap;
  color: #1f2937; text-decoration: none; border-radius: 0;
  border: 0; box-shadow: none;
}

  .nav .has-section:hover > .nav-sub, .nav .has-section:focus-within > .nav-sub { display: block; }
  .nav-overlay { pointer-events: none; }
}

/* États interactifs (global) pour dropdown */
.nav-sub a:hover, .nav-sub a:focus-visible { background: var(--menu-hover); color: #fff; text-decoration: underline; outline: 0; }
@supports not selector(:focus-visible) { .nav-sub a:focus { background: var(--menu-hover); color: #fff; text-decoration: underline; outline: 0; } }
.nav-sub .active { background: var(--menu-current); color: #fff; font-weight: 700; cursor: default; border-radius: 0; }
.nav-sub .active:hover { background: var(--menu-current); color: #fff; text-decoration: none; }

/* Liens obfusqués (activés uniquement quand u.js est présent) */
.nx { color:#0066cc; cursor:pointer; text-decoration:underline; pointer-events: auto; }
.nx:hover { text-decoration:none; }

/* ==========================================================
   AVIS & MÉTÉO (LAYOUT + SLIDER)
   ========================================================== */
.avis-meteo-flex { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin: 40px auto; max-width: 1200px; padding: 0 20px; flex-wrap: wrap; }
.avis-wrapper { flex: 1 1 48%; box-sizing: border-box; margin: 0; padding: 0 10px; }
.meteo-container { flex: 1 1 48%; box-sizing: border-box; margin: 0; padding: 0; }
.avis-wrapper .swiper, .avis-wrapper .swiper-wrapper, .avis-wrapper .swiper-slide { width: 100% !important; max-width: 100% !important; }
.avis-wrapper .swiper-slide { flex: none !important; box-sizing: border-box; }

/* Zone complète des avis */
.avis-slider-container { background: var(--beige); border-radius: var(--border-radius); box-shadow: 0 4px 8px var(--shadow-color); padding: 20px; box-sizing: border-box; position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; width: auto; max-width: 100%; }
.avis-swiper { background: var(--beige); border-radius: var(--border-radius); padding: 20px; position: relative; z-index: 1; }
.avis-swiper .swiper-wrapper { text-align: center; }
.avis-swiper .swiper-slide { background-color: var(--secondary-color); border-radius: var(--border-radius); box-shadow: 0 2px 4px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; min-height: 220px; width: 100%; box-sizing: border-box; text-align: center; color: var(--text-color); font-style: italic; }

/* Pagination Swiper (scopée à la zone avis) */
.avis-pagination { text-align: center; margin-top: 20px; position: relative; z-index: 2; }
.avis-pagination .swiper-pagination-bullet { display: inline-block; width: 12px; height: 12px; background: #ccc; border: 1px solid #666; border-radius: 50%; margin: 0 5px; transition: background var(--transition-fast); }
.avis-pagination .swiper-pagination-bullet-active { background: var(--primary-color); }
.avis-pagination .swiper-pagination-bullet:hover { background: #888; }

/* ==========================================================
   SLIDER GÉNÉRIQUE (HABILLAGE)
   ========================================================== */
.slider { position: relative; margin-bottom: 30px; }
.slider .dots { text-align: center; padding-top: 10px; }
.slider .dots span { display: inline-block; width: 10px; height: 10px; background: #ccc; border-radius: 50%; margin: 0 5px; cursor: pointer; transition: background var(--transition-fast); }
.slider .dots span.active { background: var(--accent-color); }
.slider .dots span:hover { background: var(--accent-dark); }
.slider-container { background: var(--white); border-radius: var(--border-radius); box-shadow: 0 4px 8px var(--shadow-color); padding: 20px; margin: 30px auto; max-width: 90%; }
.slider img { width: 100%; border-radius: calc(var(--border-radius) - 2px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
.slider h2 { text-align: center; color: var(--text-color); margin-bottom: 15px; }

/* ==========================================================
   TABLEAU MÉTÉO
   ========================================================== */
#meteo-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
#meteo-table th, #meteo-table td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; transition: background 0.3s, transform 0.2s; }
#meteo-table tr:nth-child(even) { background-color: #f9f9f9; }
#meteo-table tr:nth-child(odd) { background-color: var(--white); }
#meteo-table tr:hover { background-color: #e6f7e6; transform: scale(1.02); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
#meteo-table th { background-color: var(--primary-color); color: var(--white); font-weight: bold; }

/* ==========================================================
   SECTION AVIS (TITRES)
   ========================================================== */
.section-title {
  font-size: 2.2em; font-weight: bold; color: var(--text-color);
  text-align: center; margin: 40px 0 20px; padding-bottom: 10px; display: block; width: 100%; position: relative;
}
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background: var(--accent-color); margin: 8px auto 0; border-radius: 2px; transition: background 0.3s; }
.section-title:hover::after { background: var(--accent-dark); }

/* ==========================================================
   FAQ (CARTES + ACCORDÉON)
   ========================================================== */
.faq { margin: 40px auto; max-width: 980px; padding: 0 16px; }
.faq-list { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.04); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--gray-dark); display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq .chevron { margin-left: auto; transition: transform .25s ease; }
.faq details[open] .chevron { transform: rotate(180deg); }
.faq .answer { padding: 0 20px 18px 20px; color: var(--text-color); line-height: 1.6; border-top: 1px dashed #e9dfd6; background: #faf8f5; }
.faq .section-title { margin-top: 0; }

/* ==========================================================
   FOOTER
   ========================================================== */
footer { background-color: var(--primary-color); color: var(--white); padding: 20px 15px; text-align: center; margin-top: 30px; box-shadow: 0 -4px 8px var(--shadow-color); }
footer a { color: var(--white); text-decoration: none; transition: color var(--transition-fast); }
footer a:hover { color: var(--accent-color); }
footer p { margin: 10px 0; line-height: 1.6; }
footer .contact-info { margin: 20px 0; }
footer .contact-info a { display: inline-block; margin: 0 5px; }
footer .copyright { margin-top: 20px; font-size: 0.9em; color: rgba(255, 255, 255, 0.7); }

/* ==========================================================
   ESPACEMENT GLOBAL DES SECTIONS
   ========================================================== */
section { margin: 30px 0; }
.gites-container, .avis-meteo-container, footer { margin-top: 30px; margin-bottom: 30px; }
.avis-meteo-container h2 { margin-bottom: 20px; }
.avis-container, .meteo-container { margin-bottom: 20px; }

/* ==========================================================
   RÉSPONSIVE GÉNÉRAL (RELECTURE MOBILE)
   ========================================================== */
@media (max-width: 600px) {
  .hero-text { max-width: 90%; font-size: 1.2rem; }
  .gites-container { flex-direction: column; }
  .gite { width: 90%; margin-bottom: 15px; }
  .avis-meteo-flex { flex-direction: column; }
  .avis-wrapper, .meteo-container { width: 100%; }
  .slider-container { max-width: 100%; padding: 15px; }
  .slider .dots span { width: 8px; height: 8px; }
  .avis-slide { font-size: 0.95rem; padding: 15px; }
  .avis-slider-container { display: flex; justify-content: center; align-items: center; padding: 20px 15px; width: 100%; box-sizing: border-box; }
  .avis-swiper { width: 100%; }
  .avis-swiper .swiper-wrapper { display: flex; align-items: center; }
}

/* ==========================================================
   TARIFS (SECTION DÉDIÉE)
   ========================================================== */
.pricing-cta { background: var(--white); border-radius: var(--border-radius); box-shadow: 0 4px 12px var(--shadow-color); padding: 24px 16px 28px; margin: 40px 0; }
.cta-wide .pricing-intro, .pricing-cta .pricing-intro { text-align: center; color: var(--text-color); max-width: 780px; margin: 0 auto 18px; line-height: 1.6; }
.pricing-cards { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 980px; margin: 0 auto; padding: 0 8px; }
.pricing-card { background: var(--secondary-color); border: 1px solid var(--border-soft); border-radius: 14px; padding: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.05); display: grid; align-content: start; gap: 10px; }
.pricing-card h3 { margin: 0; color: var(--gray-dark); display: flex; align-items: baseline; gap: 8px; }
.pricing-card h3 small { font-size: .9rem; color: #6d6d6d; font-weight: normal; }
.pricing-points { margin: 0 0 8px 0; padding-left: 18px; color: var(--text-color); line-height: 1.6; }
.pricing-points li { margin: 4px 0; }
.pricing-cta .btn { justify-self: start; }
.pricing-note { text-align: center; margin-top: 12px; color: #6d6d6d; font-size: .95rem; }
@media (min-width: 800px) { .pricing-cards { grid-template-columns: 1fr 1fr; } }


/* === CTA plein-largeur (gites) === */
.cta-wide {
  background: var(--bg-alt, #f6f6f6);
  padding: 2rem 0;
  margin: 2rem 0;
  border-radius: 0.75rem;
}

.cta-wide .cta-inner {
  /* Si vous utilisez déjà .container, gardez-le autour et laissez .cta-inner pour le centrage du texte */
  text-align: center;
}

.btn-cta {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  background: var(--accent-color);
  color: #fff;
}

.btn-cta:focus,
.btn-cta:hover {
  background: color-mix(in srgb, var(--accent-color) 85%, #000);
  outline: none;
}
/* anneau de focus visible */
.btn-cta:focus-visible{
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 35%, #fff);
}

.cta-note {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  opacity: 0.85;
}

/* ===========================================================
   NAVIGATION — État actif & normalisation du menu
   - Aligne le box-model des liens et de l’item actif
   - Met en évidence la page courante (non cliquable)
   - Empêche les retours à la ligne du menu en desktop
   Dépendances : var(--accent-color)
   Cible : .nav-list
   =========================================================== */

.nav-list a,
.nav-list .active {
  display: inline-block;
  padding: .5rem .75rem;
  border-radius: .5rem;
  line-height: 1;
  white-space: nowrap;
}

/* Page courante (non cliquable) */
.nav-list .active {
  font-weight: 700;
  background: color-mix(in srgb, var(--accent-color) 12%, #fff);
  cursor: default;
}

/* Desktop : pas de retour à la ligne dans le menu */
@media (min-width: 992px){
  .nav-list { flex-wrap: nowrap; }
}
