/* === Palette nature du Moulin de Courmenant === */
:root {
  --vert-foret:  #2c5f2e;
  --vert-clair:  #4a7c59;
  --creme:       #f5f0e8;
  --ambre:       #c8860a;
  --brun:        #3d2b1f;
  --blanc-casse: #faf8f4;
}

/* === Corps & typographie === */
body {
  font-family: 'Lato', sans-serif;
  color: var(--brun);
  background-color: var(--blanc-casse);
}

h1, h2, h3, h4, h5, h6, .header {
  font-family: 'Playfair Display', serif;
  color: var(--vert-foret);
}

p {
  line-height: 1.85;
  color: #4a4030;
}

/* === Navigation === */
nav {
  background-color: var(--vert-foret);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

/* Texte du bandeau : Materialize colore nav, nav a, .brand-logo et les liens du menu
   avec --md-sys-color-on-primary (bleu marine en thème sombre) et met un fond bleuté
   au survol. On redéfinit ces variables sur le bandeau pour rester dans la palette. */
nav {
  --md-sys-color-on-primary: var(--creme);
  --md-ref-palette-primary70: rgba(255,255,255,0.08);
  --md-ref-palette-primary80: rgba(255,255,255,0.08);
  color: var(--creme);
}

nav ul:not(.dropdown-content) > li > a:hover {
  color: var(--ambre);
}

nav .brand-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  padding-left: 20px;
  white-space: nowrap;
}

@media only screen and (max-width: 600px) {
  nav .brand-logo {
    font-size: 1rem;
    letter-spacing: 0;
    left: 50%;
    transform: translateX(-50%);
    padding-left: 0;
  }
}

nav ul a {
  font-family: 'Lato', sans-serif;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
}

nav ul li.active a {
  border-bottom: 2px solid var(--ambre);
  color: #fff;
}

/* === Sidenav mobile === */
/* Materialize colore les liens via --md-sys-color-on-secondary-container (bleu pâle
   en thème sombre) avec un sélecteur très spécifique : on redéfinit la variable. */
.sidenav {
  --md-sys-color-on-secondary-container: var(--vert-foret);
  --md-sys-color-on-surface: var(--vert-foret);
  --md-sys-color-secondary: var(--ambre);
  background-color: var(--blanc-casse);
}

.sidenav li > a {
  color: var(--vert-foret);
  font-family: 'Lato', sans-serif;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.sidenav li > a:hover {
  background-color: var(--creme);
}

.sidenav li.active > a {
  font-weight: 700;
  border-left: 3px solid var(--ambre);
  background-color: var(--creme);
}

/* === Hero accueil === */
.hero-section {
  height: 700px;
  background-size: cover;
  background-position: center 100%;
  background-attachment: fixed;
}

/* iOS/Android ignorent ou cassent background-attachment: fixed
   (l'image est dimensionnée sur toute la page → zoom énorme). */
@media (hover: none), (pointer: coarse), (max-width: 992px) {
  .hero-section {
    background-attachment: scroll;
    background-position: center bottom;
  }
}

@media only screen and (max-width: 600px) {
  .hero-section {
    height: 55vh;
    min-height: 320px;
  }
}

/* === Sections === */
.section.white,
.section.blanc {
  background-color: var(--blanc-casse);
}

.section.creme {
  background-color: var(--creme);
}

/* === Section accueil texte === */
.welcome-section {
  padding: 55px 0 40px;
  background-color: var(--blanc-casse);
}

.welcome-section h2 {
  font-size: 2.4rem;
  margin-bottom: 5px;
}

.welcome-section p {
  font-size: 1.05rem;
}

/* === Séparateur doré === */
.divider-ambre {
  width: 55px;
  height: 3px;
  background-color: var(--ambre);
  margin: 10px 0 28px 0;
}

/* === Blocs mise en avant (accueil) === */
.highlights-section {
  background-color: var(--creme);
  padding: 45px 0;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media only screen and (max-width: 992px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 600px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
}

.highlight-item {
  text-align: center;
  padding: 20px 15px;
}

.highlight-item i.material-icons {
  color: var(--ambre);
  font-size: 2.8rem !important;
  display: block;
  margin-bottom: 10px;
}

.highlight-item h5 {
  font-family: 'Playfair Display', serif;
  color: var(--vert-foret);
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.highlight-item p {
  font-size: 0.92rem;
  color: #6b5b4e;
  margin: 0;
}

/* === Titres de section intérieure === */
.section-title {
  font-family: 'Playfair Display', serif;
  color: var(--vert-foret);
  margin-bottom: 4px;
}

/* === Page accès === */
.map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(44, 95, 46, 0.18);
  margin-top: 8px;
}

.map-container iframe {
  display: block;
}

/* === Page contact === */
.contact-block h5 {
  font-family: 'Playfair Display', serif;
  color: var(--vert-foret);
  margin-bottom: 15px;
}

.contact-block p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-icon {
  color: var(--ambre);
  font-size: 1.2rem !important;
  flex-shrink: 0;
}

.contact-block a {
  color: var(--brun);
  text-decoration: none;
}

.contact-block a:hover {
  color: var(--vert-foret);
  text-decoration: underline;
}

/* === Cards galerie === */
.card {
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(44, 95, 46, 0.14);
  transition: box-shadow 0.3s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(44, 95, 46, 0.26);
  transform: translateY(-4px);
}

.card .card-image img {
  border-radius: 8px 8px 0 0;
}

.card .card-content {
  background-color: #fff;
  border-radius: 0 0 8px 8px;
  padding: 14px 18px;
}

.card .card-content p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--vert-foret);
  font-size: 1rem;
  text-align: center;
  margin: 0;
}

/* === Footer === */
footer.page-footer {
  background-color: var(--vert-foret);
  font-family: 'Lato', sans-serif;
  color: #f0ece4;
}

footer.page-footer .footer-copyright {
  background-color: rgba(0,0,0,0.2);
  color: #f0ece4;
}

/* === Planning — calendrier === */
.cal-wrapper {
  overflow-x: auto;
}

.cal-day {
  position: relative;
  overflow: hidden;
}

/* Triangle haut-gauche  → fin de séjour (matin encore occupé) */
.tri-nw {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Triangle bas-droit → début de séjour (arrivée en soirée) */
.tri-se {
  position: absolute;
  inset: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.cal-num {
  position: relative;
  z-index: 2;
}

.cal-months {
  display: flex;
  gap: 16px;
  min-width: 600px;
  margin-bottom: 20px;
}

.cal-month {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(44,95,46,0.12);
  overflow: hidden;
  min-width: 170px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--vert-foret);
  color: #fff;
  padding: 8px 6px;
}

.cal-month-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.cal-nav-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.15s;
}

.cal-nav-btn:hover {
  background: rgba(255,255,255,0.2);
}

.cal-nav-ph {
  width: 28px;
  display: inline-block;
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
}

.cal-table thead th {
  text-align: center;
  padding: 6px 2px;
  color: var(--vert-foret);
  font-weight: 700;
  background: var(--creme);
}

.cal-table td {
  text-align: center;
  padding: 5px 2px;
  border: 1px solid #f0f0f0;
}

.cal-day.libre  { background-color: #c8e6c9; color: #1b5e20; }
.cal-day.occupe { background-color: #ffcdd2; color: #b71c1c; }
.cal-day.option { background-color: #fff9c4; color: #f57f17; }
.cal-empty      { background: #fafafa; }

.cal-day.today {
  outline: 2px solid var(--ambre);
  outline-offset: -2px;
  font-weight: 700;
}

.cal-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: var(--brun);
}

.cal-legend-color {
  width: 22px;
  height: 18px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.08);
}

.cal-legend-color.libre  { background-color: #c8e6c9; }
.cal-legend-color.occupe { background-color: #ffcdd2; }
.cal-legend-color.option { background-color: #fff9c4; }
/* Départ = triangle NW (haut-gauche occupé, matin encore là) */
.cal-legend-color.depart  { position:relative; overflow:hidden; background:#c8e6c9; }
.cal-legend-color.depart::before  { content:''; position:absolute; inset:0; background:#ffcdd2; clip-path:polygon(0 0,100% 0,0 100%); }
/* Arrivée = triangle SE (bas-droit occupé, arrivée en soirée) */
.cal-legend-color.arrivee { position:relative; overflow:hidden; background:#c8e6c9; }
.cal-legend-color.arrivee::before { content:''; position:absolute; inset:0; background:#ffcdd2; clip-path:polygon(100% 0,100% 100%,0 100%); }

/* === Tarifs & Planning — tableau === */
.tarifs-table {
  border-radius: 8px;
  overflow: hidden;
}

.tarifs-table thead {
  background-color: var(--vert-foret);
  color: #fff;
}

.tarifs-table thead th {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.tarifs-table tbody tr:hover {
  background-color: var(--creme);
}

/* === Badge statut planning === */
.badge-statut {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statut-confirmé  { background-color: #e8f5e9; color: #2c5f2e; }
.statut-option    { background-color: #fff8e1; color: #c8860a; }
.statut-libre     { background-color: #f5f5f5; color: #666; }

/* === Équipements === */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.equip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background-color: var(--blanc-casse);
  border-radius: 6px;
  border-left: 3px solid var(--ambre);
}

.equip-item i.material-icons {
  color: var(--ambre);
  font-size: 1.3rem !important;
  flex-shrink: 0;
}

.equip-item span {
  font-family: 'Lato', sans-serif;
  color: var(--brun);
  font-size: 0.95rem;
}

/* === Loisirs === */
.loisirs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.loisir-item {
  background-color: var(--blanc-casse);
  border-radius: 8px;
  border-top: 3px solid var(--vert-foret);
  overflow: hidden;
}

.loisir-figure {
  position: relative;
  margin: 0;
}

.loisir-vignette {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

/* Crédit photo (exigé par les licences Creative Commons), discret sur l'image */
.loisir-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 100%;
  padding: 2px 6px;
  font-size: 0.66rem;
  line-height: 1.3;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-top-left-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loisir-credit a {
  color: #fff;
  text-decoration: none;
}

.loisir-credit a:hover {
  text-decoration: underline;
}

.loisir-body {
  padding: 16px;
}

.loisir-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.loisir-header strong {
  font-family: 'Playfair Display', serif;
  color: var(--vert-foret);
}

.loisir-distance {
  font-size: 0.82rem;
  color: var(--ambre);
  font-weight: 700;
  white-space: nowrap;
}

.loisir-item p {
  font-size: 0.92rem;
  color: #666;
  margin: 0 0 8px;
  line-height: 1.6;
}

.loisir-link {
  font-size: 0.85rem;
  color: var(--vert-foret);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.loisir-link:hover {
  color: var(--ambre);
  text-decoration: underline;
}

/* === Icône block (legacy) === */
.icon-block {
  padding: 0 15px;
}

.icon-block .material-icons {
  font-size: inherit;
}

/* === Lightbox galerie photos === */
.gallery-img {
  cursor: zoom-in;
  display: block;
  width: 100%;
}

/* Vignettes uniformes : même format 4:3 pour toutes les photos (l'aperçu est
   recadré, la photo entière s'affiche dans la visionneuse) et cartes de même
   hauteur sur une ligne, avec ou sans légende (la grille Materialize donne déjà
   la même hauteur aux colonnes d'une ligne ; la carte occupe toute la colonne) */
.gallery-row > .col {
  display: flex;
}

.gallery-row .card {
  background-color: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gallery-row .card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.gallery-row .gallery-img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery-row .card-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.90);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-content {
  text-align: center;
  max-width: 88vw;
}

.lightbox-content img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.lightbox-content p {
  color: #f0ece4;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  margin-top: 14px;
  font-size: 1.05rem;
  min-height: 1.4em;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 10px 16px;
  user-select: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
