/* ═══════════════════════════════════════════════════════════
   MAISON DU VALAT — Feuille de style principale
   Palette naturelle : vert forêt, terre, eau de montagne
   ═══════════════════════════════════════════════════════════ */

/* ── Variables CSS (valeurs par défaut — écrasées par PHP inline) ── */
:root {
  --color-primary:        #2d6a4f;
  --color-secondary:      #52b788;
  --color-accent:         #b7e4c7;
  --color-earth:          #6b4226;
  --color-water:          #1e6091;
  --color-text:           #2c3e2d;
  --color-bg:             #fafaf8;
  --header-overlay:       rgba(0, 0, 0, 0.45);

  /* Dérivés non configurables */
  --color-white:          #ffffff;
  --color-light:          #f0f4f0;
  --color-border:         #d4e4d4;
  --color-muted:          #6b7a6b;
  --color-error:          #c0392b;
  --color-reserved:       #e74c3c;
  --color-option:         #e67e22;
  --color-available:      #27ae60;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.16);

  --transition:  .25s ease;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --container-max: 1200px;
  --section-gap:   5rem;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-secondary); }
ul { list-style: none; }

/* ── Conteneur ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ══════════════════════════════════════
   HEADER / HERO
══════════════════════════════════════ */
.site-header {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  /* transform et transition gérés exclusivement par PHP (header.php) */
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: var(--header-overlay);
}

/* ── Navigation ── */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: .02em;
}
.nav-brand:hover { color: var(--color-accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,.9);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .03em;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--color-white); border-bottom-color: var(--color-accent); }
.nav-admin {
  background: var(--color-primary);
  border: 2px solid transparent !important;
  padding: .4rem 1rem !important;
  border-radius: var(--radius-sm) !important;
}
.nav-admin:hover { background: var(--color-secondary) !important; }

/* Burger menu (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Contenu hero ── */
.header-content {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem 4rem;
  color: var(--color-white);
}

.header-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: .03em;
  text-shadow: 0 2px 16px rgba(0,0,0,.4);
  margin-bottom: .75rem;
}

.header-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  opacity: .9;
  text-shadow: 0 1px 8px rgba(0,0,0,.3);
  margin-bottom: 2rem;
}

.header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.badge {
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--color-white);
  padding: .35rem .9rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 500;
}

/* ══════════════════════════════════════
   SECTIONS COMMUNES
══════════════════════════════════════ */
section {
  padding: var(--section-gap) 0;
}
section + section { border-top: 1px solid var(--color-border); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: .5rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.section-intro {
  max-width: 620px;
  margin: 0 auto;
  color: var(--color-muted);
  font-size: 1.05rem;
}

/* ── Séparateur décoratif ── */
.divider {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
  margin: 1rem auto 0;
}

/* ══════════════════════════════════════
   SECTION PRÉSENTATION
══════════════════════════════════════ */
.presentation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.presentation-text p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}
.presentation-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  background: var(--color-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-secondary);
}
.feature-icon { font-size: 1.5rem; flex-shrink: 0; }
.feature-item strong { display: block; font-size: .9rem; margin-bottom: .2rem; }
.feature-item span { font-size: .82rem; color: var(--color-muted); }

.presentation-image {
  position: relative;
}
.presentation-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4/3;
}
.img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  box-shadow: var(--shadow-lg);
}

/* ══════════════════════════════════════
   SECTION RÈGLES
══════════════════════════════════════ */
.regles-section { background: var(--color-light); }

.regles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
  gap: 1.25rem;
}
.regle-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-primary);
  transition: transform var(--transition), box-shadow var(--transition);
}
.regle-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.regle-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.regle-text { font-size: .95rem; line-height: 1.5; }

/* ══════════════════════════════════════
   SECTION TIPS / CONSEILS
══════════════════════════════════════ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}
.tip-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--color-secondary);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.tip-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}
.tip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.tip-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.tip-icon-wrap {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.tip-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
}
.tip-text { color: var(--color-muted); font-size: .95rem; line-height: 1.65; }

/* ══════════════════════════════════════
   SECTION CHECKLIST
══════════════════════════════════════ */
.checklist-section { background: var(--color-light); }

.checklist-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}
.checklist-group {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.checklist-group-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.5rem;
  background: var(--color-primary);
  color: var(--color-white);
}
.checklist-group-header span { font-size: 1.3rem; }
.checklist-group-header h3 { font-size: 1rem; font-weight: 600; }

.checklist-items { padding: 1rem 1.5rem; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: opacity var(--transition);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { opacity: .8; }

.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-secondary);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: .1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: transparent;
  cursor: pointer;
}
.checklist-item.checked .check-box {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}
.checklist-item.checked .check-box::after { content: '✓'; color: white; font-size: .75rem; font-weight: 700; }
.checklist-item.checked .check-label { text-decoration: line-through; opacity: .55; }
.check-label { font-size: .92rem; line-height: 1.45; user-select: none; }

/* Barre de progression */
.checklist-progress-bar {
  margin-top: 2.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}
.progress-header { display: flex; justify-content: space-between; margin-bottom: .75rem; }
.progress-track {
  height: 10px;
  background: var(--color-border);
  border-radius: 50px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 50px;
  transition: width .4s ease;
  width: 0%;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,.85);
  padding: 4rem 0 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-white);
  margin-bottom: 1rem;
}
.footer-col h4 { font-size: .95rem; font-weight: 600; color: var(--color-accent); margin-bottom: 1rem; }
.footer-col p { font-size: .9rem; line-height: 1.7; opacity: .8; }
.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a { color: rgba(255,255,255,.75); font-size: .9rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--color-accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  opacity: .65;
}
.back-to-top { color: inherit; text-decoration: none; transition: opacity var(--transition); }
.back-to-top:hover { opacity: 1; }

/* ══════════════════════════════════════
   CALENDRIER (disponibilites.php)
══════════════════════════════════════ */
.dispo-hero-sub {
  text-align: center;
  color: var(--color-white);
  font-size: 1.1rem;
  opacity: .9;
  margin-top: .5rem;
}

.period-selector {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.btn-period {
  padding: .65rem 1.8rem;
  border-radius: 50px;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-period:hover,
.btn-period.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.month-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.month-card:hover { box-shadow: var(--shadow-md); }

.month-card.hidden { display: none; }

.month-header {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: .9rem 1rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.cal-grid {
  padding: 1rem;
}
.cal-day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.cal-day-name {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: .3rem 0;
  text-transform: uppercase;
}
.cal-day-name:last-child { color: var(--color-earth); } /* Dimanche */

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  transition: all var(--transition);
}
.cal-day.empty { }
.cal-day.past { opacity: .35; }
.cal-day.available { background: #e8f5e9; color: #2e7d32; }
.cal-day.available:hover { background: #c8e6c9; }
.cal-day.reserve { background: #ffebee; color: #c62828; }
.cal-day.option  { background: #fff3e0; color: #e65100; }
.cal-day.blocked { background: #f3e5f5; color: #6a1b9a; }
.cal-day.today   { outline: 2px solid var(--color-primary); outline-offset: -2px; font-weight: 700; }

/* Légende calendrier */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
  margin-top: 2.5rem;
  padding: 1.25rem 2rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 500;
}
.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}
.legend-dot.available { background: #e8f5e9; border: 1px solid #a5d6a7; }
.legend-dot.reserve   { background: #ffebee; border: 1px solid #ef9a9a; }
.legend-dot.option    { background: #fff3e0; border: 1px solid #ffcc80; }

/* ══════════════════════════════════════
   UTILITAIRES & BOUTONS
══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-secondary); color: white; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: white; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .presentation-grid { grid-template-columns: 1fr; }
  .presentation-image { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --section-gap: 3rem; }
  .site-header { min-height: 400px; }

  .nav { padding: 1rem 1.25rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(0,0,0,.92);
    backdrop-filter: blur(8px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    z-index: 100;
  }
  .nav-links.open { display: flex; }

  .presentation-features { grid-template-columns: 1fr; }
  .months-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .checklist-wrapper { grid-template-columns: 1fr; }
}
