/* ==========================================================================
   Gabarit camping — Lys Tourisme
   Styles pilotés par site.config.json (variables --primary / --secondary
   injectées au chargement par app.js). Aucun contenu client en dur ici.
   ========================================================================== */

:root {
  --primary: #1f7a4d;
  --secondary: #e8a13a;
  --ink: #1b2a24;
  --muted: #5b6b63;
  --bg: #ffffff;
  --bg-alt: #f4f7f4;
  --border: #e2e8e3;
  --white: #ffffff;
  --hero-overlay: 0.45;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(16, 40, 28, 0.12);
  --maxw: 1160px;
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Cibles d'ancrage : compensent la barre de navigation fixe au défilement. */
.anchor { display: block; position: relative; top: -72px; visibility: hidden; }

.section { padding: 84px 0; }
.section.alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.section-head .eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.78rem; font-weight: 700; color: var(--secondary); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 14px; font-weight: 800; line-height: 1.15; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 15px 30px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  cursor: pointer; border: 2px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  min-height: 48px; line-height: 1;
}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 10px 24px rgba(31,122,77,.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(31,122,77,.4); }
.btn-ghost { background: rgba(255,255,255,.14); color: var(--white); border-color: rgba(255,255,255,.6); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* ---------- Barre de navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.nav.scrolled { background: var(--white); box-shadow: 0 6px 20px rgba(16,40,28,.08); padding: 10px 22px; }
.nav .brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.15rem; color: var(--white); transition: color .3s ease; }
.nav.scrolled .brand { color: var(--ink); }
.nav .brand i { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--white); font-weight: 600; font-size: .95rem; transition: color .3s ease, opacity .2s ease; opacity: .92; }
.nav.scrolled .nav-links a { color: var(--ink); }
.nav-links a:hover { opacity: 1; color: var(--secondary); }
.nav-links .btn { padding: 11px 22px; min-height: 0; }
.nav.scrolled .nav-links .btn { color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); font-size: 1.5rem; cursor: pointer; }
.nav.scrolled .nav-toggle { color: var(--ink); }
.lang-toggle { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); color: var(--white); font-weight: 800; font-size: .82rem; padding: 8px 12px; border-radius: 10px; cursor: pointer; font-family: inherit; transition: background .2s ease; }
.lang-toggle:hover { background: rgba(255,255,255,.28); }
.nav.scrolled .lang-toggle { color: var(--ink); border-color: var(--border); background: var(--bg-alt); }

/* ---------- Héros ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: var(--white); text-align: center;
  background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,25,18,.35) 0%, rgba(10,25,18,var(--hero-overlay)) 60%, rgba(10,25,18,.7) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; padding: 120px 22px 90px; }
/* min-height : réserve ~2 lignes de titre (injecté par JS) pour éviter le décalage (CLS). */
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; margin: 0 0 18px; line-height: 1.08; text-shadow: 0 2px 20px rgba(0,0,0,.25); min-height: 2.16em; }
/* min-height : réserve l'espace du sous-titre injecté par JS pour éviter le décalage (CLS). */
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.5; margin: 0 auto 34px; max-width: 640px; opacity: .96; min-height: 6em; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* min-height : réserve la rangée de pastilles (remplie par JS) pour éviter le décalage (CLS). */
.hero-highlights {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  margin-top: 46px; min-height: 84px;
}
.hl {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px);
  padding: 12px 18px; border-radius: 14px; text-align: left;
}
.hl i { font-size: 1.4rem; color: var(--secondary); }
.hl .hl-label { font-weight: 800; font-size: 1rem; line-height: 1.1; }
.hl .hl-sub { font-size: .8rem; opacity: .85; }

/* ---------- Emplacements ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.place-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.place-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.place-card .ph { aspect-ratio: 4 / 3; overflow: hidden; }
.place-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.place-card:hover .ph img { transform: scale(1.06); }
.place-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.place-body h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; }
.place-body p { color: var(--muted); margin: 0 0 16px; font-size: .95rem; }
.place-feats { list-style: none; padding: 0; margin: 0 0 18px; }
.place-feats li { display: flex; align-items: center; gap: 10px; font-size: .9rem; margin-bottom: 8px; }
.place-feats li i { color: var(--primary); font-size: .85rem; }
.place-price { margin-top: auto; display: flex; align-items: baseline; gap: 6px; }
.place-price .amt { font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.place-price .cur { font-size: 1rem; font-weight: 700; color: var(--primary); }
.place-price .unit { font-size: .85rem; color: var(--muted); }

/* ---------- Services & activités ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.feature { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 14px; background: var(--white); border: 1px solid var(--border); }
.section.alt .feature { background: var(--bg); }
.feature i { font-size: 1.5rem; color: var(--primary); background: rgba(31,122,77,.1); width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature h4 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.feature p { margin: 0; font-size: .9rem; color: var(--muted); }

.subsection-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 24px; display: flex; align-items: center; gap: 12px; }
.subsection-title i { color: var(--secondary); }
.subsection + .subsection { margin-top: 56px; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.gallery a { border-radius: 14px; overflow: hidden; aspect-ratio: 1 / 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.08); }

/* ---------- Infos & FAQ ---------- */
.infos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.info-block { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.section.alt .info-block { background: var(--bg); }
.info-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.info-stat { background: var(--bg-alt); border-radius: 12px; padding: 16px; }
.section.alt .info-stat { background: var(--white); }
.info-stat .k { font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.info-stat .v { font-size: 1.05rem; font-weight: 700; }
.rules { list-style: none; padding: 0; margin: 0; }
.rules li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.rules li:last-child { border-bottom: 0; }
.rules li i { color: var(--primary); margin-top: 4px; }

.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: var(--white); }
.section.alt .faq-item { background: var(--bg); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 18px 20px; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink); font-family: inherit; }
.faq-q i { transition: transform .3s ease; color: var(--primary); }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info p { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.contact-info i { color: var(--primary); width: 22px; text-align: center; font-size: 1.1rem; }
.socials { display: flex; gap: 14px; margin-top: 26px; }
.socials a { width: 46px; height: 46px; border-radius: 12px; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: transform .2s ease; }
.socials a:hover { transform: translateY(-3px); }
.map-embed { border: 0; width: 100%; height: 100%; min-height: 320px; border-radius: var(--radius); }
.contact-form { display: grid; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 15px 16px; border: 1px solid var(--border); border-radius: 12px;
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--white); transition: border-color .2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }

/* ---------- Météo locale (optionnelle) ---------- */
.weather {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow); margin: 0 auto 36px; max-width: 760px;
}
.wx-now { display: flex; align-items: center; gap: 16px; flex: 1 1 200px; }
.wx-now > i { font-size: 2.6rem; color: var(--secondary); }
.wx-temp { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1; }
.wx-cond { color: var(--muted); font-size: .95rem; }
.wx-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 700; margin-top: 4px; }
.wx-days { display: flex; gap: 18px; flex: 1 1 240px; justify-content: flex-end; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); }
.wx-day i { color: var(--primary); font-size: 1.2rem; }
.wx-day .wx-d { font-weight: 700; color: var(--ink); }
.wx-day .wx-t { font-weight: 700; color: var(--ink); }
.wx-day .wx-t small { color: var(--muted); font-weight: 600; }

/* ---------- Carte du terrain (optionnelle) ---------- */
.sitemap { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 1000px; margin: 0 auto; }
.sitemap img { width: 100%; height: auto; display: block; transition: transform .4s ease; }
.sitemap:hover img { transform: scale(1.02); }
.sitemap-caption { text-align: center; color: var(--muted); font-size: .9rem; margin: 16px 0 0; }

/* ---------- Infolettre (optionnelle) ---------- */
.newsletter { background: var(--primary); color: var(--white); padding: 64px 0; }
.newsletter-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.newsletter-text h2 { margin: 0 0 8px; color: var(--white); }
.newsletter-text p { margin: 0; color: rgba(255,255,255,.9); max-width: 460px; }
.newsletter-form { display: flex; gap: 12px; flex: 1 1 320px; max-width: 480px; }
.newsletter-form input { flex: 1; padding: 15px 16px; border: 0; border-radius: 12px; font-family: inherit; font-size: 1rem; }
.newsletter-form input:focus { outline: 3px solid var(--secondary); }
.newsletter-form .btn { background: var(--secondary); white-space: nowrap; }
.newsletter-note { color: rgba(255,255,255,.8); font-size: .85rem; margin: 18px 0 0; }

/* ---------- Pied de page ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 56px 0 30px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer .brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; color: var(--white); margin-bottom: 12px; }
.footer .brand i { color: var(--secondary); }
.footer a { color: rgba(255,255,255,.8); }
.footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 22px; text-align: center; font-size: .85rem; }
.footer-bottom a { font-weight: 700; color: var(--secondary); }

/* ---------- Section Réservez (eCamp / repli courriel) ---------- */
.booking-card {
  max-width: 720px; margin: 0 auto; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px;
}
.booking-card.booking-ecamp { text-align: center; }
.booking-note { color: var(--muted); margin: 0 0 22px; font-size: 1.08rem; }
.booking-btn { font-size: 1.1rem; padding: 17px 38px; }
.booking-intro { color: var(--muted); margin: 0 0 22px; }
.booking-form .bf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.booking-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.booking-form .bf-party { grid-column: auto; }
.booking-form .bf-msg { margin-top: 16px; }
.booking-form input, .booking-form textarea {
  font-family: var(--font); font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt); color: var(--ink);
}
.booking-form input:focus, .booking-form textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.booking-form button { margin-top: 20px; width: 100%; }

/* ---------- Animations au défilement ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .infos-grid, .contact-grid { grid-template-columns: 1fr; }
  .info-block.map { min-height: 320px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; width: 100%;
    flex-direction: column; gap: 0; background: var(--white);
    box-shadow: 0 12px 24px rgba(16,40,28,.12); padding: 10px 0;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 460px; }
  .nav-links a { color: var(--ink); width: 100%; padding: 14px 24px; opacity: 1; }
  .nav-links .btn { margin: 10px 24px; }
  .nav-links .lang-toggle { margin: 4px 24px 12px; align-self: flex-start; }
  .section { padding: 60px 0; }
  .info-stats { grid-template-columns: 1fr; }
  .weather { flex-direction: column; align-items: stretch; }
  .wx-days { justify-content: space-between; }
  .newsletter-card { flex-direction: column; align-items: stretch; }
  .newsletter-form { max-width: none; }
  .booking-card { padding: 24px; }
  .booking-form .bf-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
