/* =========================================================
   Camping Les Chênes — Design System
   Corse premium familial · pieds dans l'eau · Porto-Vecchio
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display:ital@0;1&family=Manrope:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,500&display=swap');

:root {
  /* Palette */
  --turquoise: #4FB39A;
  --turquoise-deep: #3C9580;
  --sand: #E8D5A8;
  --sand-soft: #F2E7CE;
  --terracotta: #C97B5A;
  --terracotta-deep: #B5663F;
  --pine: #2D5F4E;
  --pine-deep: #234A3D;
  --cream: #FAF7F2;
  --cream-warm: #F4EEE3;
  --ink: #2C2C2C;
  --ink-soft: #5A5A54;
  --line: #E4DDD0;
  --white: #ffffff;
  --whatsapp: #25D366;

  /* Typography */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing rhythm */
  --section-y: clamp(4.5rem, 9vw, 9rem);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1280px;

  /* Effects */
  --radius: 14px;
  --radius-lg: 22px;
  --btn-radius: 999px;
  --scrim-rgb: 35, 74, 61;
  --shadow-sm: 0 2px 14px rgba(45, 95, 78, 0.07);
  --shadow-md: 0 14px 40px rgba(45, 95, 78, 0.12);
  --shadow-lg: 0 30px 70px rgba(35, 74, 61, 0.20);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   DIRECTIONS ARTISTIQUES — applied as a class on <html>
   A (default :root) · Méditerranée Solaire
   ========================================================= */

/* B · Granit & Lin — minéral, éditorial, angles nets */
html.dir-b {
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Archivo', -apple-system, 'Segoe UI', sans-serif;
  --turquoise: #6E8378;
  --turquoise-deep: #54675E;
  --sand: #DED3BE;
  --sand-soft: #ECE5D6;
  --terracotta: #9E5C3C;
  --terracotta-deep: #82492F;
  --pine: #3A4A42;
  --pine-deep: #211F1C;
  --cream: #F3F0E9;
  --cream-warm: #E9E3D7;
  --ink: #201E1B;
  --ink-soft: #5E594F;
  --line: #D9D2C4;
  --scrim-rgb: 27, 25, 22;
  --radius: 4px;
  --radius-lg: 8px;
  --btn-radius: 2px;
  --shadow-sm: 0 2px 14px rgba(33, 31, 28, 0.07);
  --shadow-md: 0 14px 40px rgba(33, 31, 28, 0.12);
  --shadow-lg: 0 30px 70px rgba(33, 31, 28, 0.20);
}

/* C · Riviera Vibrante — azur + corail, solaire, très arrondi */
html.dir-c {
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
  --turquoise: #1E7FB8;
  --turquoise-deep: #136699;
  --sand: #FBE0B3;
  --sand-soft: #FDEFD6;
  --terracotta: #F4724C;
  --terracotta-deep: #E25A35;
  --pine: #16415C;
  --pine-deep: #0E3047;
  --cream: #FFFDF8;
  --cream-warm: #FFF4E2;
  --ink: #16252E;
  --ink-soft: #4D6470;
  --line: #EBE2D0;
  --scrim-rgb: 14, 48, 71;
  --radius: 18px;
  --radius-lg: 26px;
  --btn-radius: 999px;
  --shadow-sm: 0 3px 16px rgba(14, 48, 71, 0.09);
  --shadow-md: 0 16px 44px rgba(14, 48, 71, 0.15);
  --shadow-lg: 0 30px 70px rgba(14, 48, 71, 0.22);
}

/* Heading weight: DM Serif only ships 400 */
html.dir-c h1, html.dir-c h2, html.dir-c h3, html.dir-c h4,
html.dir-c .display, html.dir-c .triade-item .word { font-weight: 400; }
/* Editorial direction wants tracked, lighter display type */
html.dir-b .eyebrow { letter-spacing: 0.3em; }
html.dir-b h1, html.dir-b h2, html.dir-b .display { letter-spacing: -0.02em; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; padding: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.h-xl { font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.08; }
.h-lg { font-size: clamp(1.75rem, 3.2vw, 2.8rem); line-height: 1.1; }
.h-md { font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.12; }
.serif-i { font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--turquoise-deep);
}
.eyebrow.on-dark { color: var(--sand); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--ink-soft); line-height: 1.7; }
.muted { color: var(--ink-soft); }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1480px; }
.section { padding-block: var(--section-y); }
.section-tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 1rem 1.9rem;
  min-height: 52px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-radius: var(--btn-radius);
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-primary { background: var(--turquoise); color: var(--white); box-shadow: 0 8px 22px rgba(79, 179, 154, 0.32); }
.btn-primary:hover { background: var(--turquoise-deep); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(79, 179, 154, 0.42); }
.btn-coral { background: var(--terracotta); color: var(--white); box-shadow: 0 8px 22px rgba(201, 123, 90, 0.32); }
.btn-coral:hover { background: var(--terracotta-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); transform: translateY(-2px); }
.btn-ghost-light { background: rgba(255,255,255,0.08); color: var(--white); border: 1.5px solid rgba(255,255,255,0.7); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: var(--white); color: var(--ink); transform: translateY(-2px); }
.btn-wa { background: var(--whatsapp); color: var(--white); box-shadow: 0 8px 22px rgba(37, 211, 102, 0.32); }
.btn-wa:hover { background: #1fb959; transform: translateY(-2px); }
.btn-sm { min-height: 44px; padding: 0.7rem 1.3rem; font-size: 0.88rem; }
.btn-block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; color: var(--pine); border-bottom: 1.5px solid var(--turquoise); padding-bottom: 3px; transition: gap 0.3s var(--ease), color 0.3s; }
.link-arrow:hover { gap: 0.9em; color: var(--turquoise-deep); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: background 0.45s var(--ease), box-shadow 0.45s var(--ease), padding 0.45s var(--ease);
}
.site-header.scrolled { background: rgba(250, 247, 242, 0.92); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); padding-block: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--white); transition: color 0.4s var(--ease); }
.scrolled .brand { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-mark circle { fill: var(--turquoise); }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1; letter-spacing: 0; }
.brand-sub { display: block; font-family: var(--sans); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.85; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { color: rgba(255,255,255,0.92); font-weight: 600; font-size: 0.95rem; position: relative; transition: color 0.3s; }
.scrolled .nav a { color: var(--ink); }
.nav a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--turquoise); transition: width 0.35s var(--ease); }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.header-cta .btn { color: var(--white); }
.scrolled .header-cta .btn-ghost-light { background: var(--turquoise); border-color: var(--turquoise); }

.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--white); transition: background 0.3s, transform 0.3s, opacity 0.3s; }
.scrolled .burger span { background: var(--ink); }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 99; background: var(--pine-deep);
  display: flex; flex-direction: column; justify-content: center; gap: 1rem;
  padding: var(--gutter);
  transform: translateX(100%); transition: transform 0.5s var(--ease); visibility: hidden;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav a { color: var(--cream); font-family: var(--serif); font-size: 2.4rem; font-weight: 500; }
.mobile-nav a:hover { color: var(--sand); }
.mobile-nav .btn { margin-top: 1.5rem; align-self: flex-start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine-deep); color: rgba(255,255,255,0.78); padding-top: clamp(3.5rem, 6vw, 5.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.site-footer h4 { color: var(--white); font-family: var(--sans); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1.3rem; }
.site-footer .brand-name { color: var(--white); }
.footer-col a { display: block; padding: 0.4rem 0; transition: color 0.25s, padding-left 0.25s; }
.footer-col a:hover { color: var(--sand); padding-left: 4px; }
.footer-brand p { margin-top: 1rem; max-width: 30ch; font-size: 0.95rem; line-height: 1.7; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding-block: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.social-row { display: flex; gap: 0.8rem; margin-top: 0.3rem; }
.social-row a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.22); padding: 0; transition: background 0.3s, border-color 0.3s, transform 0.3s; }
.social-row a:hover { background: var(--turquoise); border-color: var(--turquoise); transform: translateY(-3px); padding-left: 0; }
.social-row svg { width: 18px; height: 18px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90; display: flex; align-items: center; gap: 0.7rem; }
.wa-btn { width: 60px; height: 60px; border-radius: 50%; background: var(--whatsapp); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37,211,102,0.45); transition: transform 0.4s var(--ease); }
.wa-btn:hover { transform: scale(1.08); }
.wa-btn svg { width: 32px; height: 32px; }
.wa-pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--whatsapp); opacity: 0.55; animation: waPulse 2.4s var(--ease) infinite; z-index: -1; }
@keyframes waPulse { 0% { transform: scale(1); opacity: 0.5; } 70%,100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Cookie banner ---------- */
.cookie-bar {
  position: fixed; left: clamp(1rem,3vw,2rem); bottom: clamp(1rem,3vw,2rem); z-index: 95;
  max-width: 380px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 1.3rem 1.4rem; transform: translateY(140%); transition: transform 0.6s var(--ease);
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar p { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.6; }
.cookie-bar .row { display: flex; gap: 0.6rem; margin-top: 1rem; }

/* ---------- Image placeholder fallback ---------- */
.media { position: relative; overflow: hidden; background: var(--cream-warm); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.img-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background-image: repeating-linear-gradient(45deg, var(--cream-warm), var(--cream-warm) 14px, var(--sand-soft) 14px, var(--sand-soft) 28px);
  color: var(--pine); font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; padding: 1rem;
}

/* ---------- Reveal on scroll ---------- */
/* Fails OPEN: hidden state only applies once JS adds .js-anim to <html>.
   Without JS — or if the reveal driver never runs — content stays visible. */
.reveal { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.js-anim .reveal:not(.in) { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; }
html.js-anim .reveal.d1 { transition-delay: 0.08s; }
html.js-anim .reveal.d2 { transition-delay: 0.16s; }
html.js-anim .reveal.d3 { transition-delay: 0.24s; }
html.js-anim .reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  html.js-anim .reveal:not(.in) { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; }
.badge-type { background: var(--pine); color: var(--white); }
.badge-type.t4 { background: var(--turquoise-deep); }
.badge-type.tplus { background: var(--terracotta); }
.tag { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; background: var(--sand-soft); color: var(--pine-deep); }
.tag.sea { background: rgba(79,179,154,0.16); color: var(--turquoise-deep); }
.tag.calm { background: rgba(45,95,78,0.12); color: var(--pine); }

/* ---------- Cards ---------- */
.card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card:hover .media img { transform: scale(1.06); }

/* ---------- Utility ---------- */
.grid { display: grid; gap: clamp(1.2rem, 2.5vw, 2rem); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-sm { gap: 0.8rem; }
.gap-md { gap: 1.2rem; }
.divider { width: 60px; height: 2px; background: var(--turquoise); border: none; margin: 1.4rem 0; }
.divider.center { margin-inline: auto; }

/* ---------- Filter chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.6rem 1.05rem; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white); color: var(--ink); font-weight: 600; font-size: 0.86rem;
  transition: border-color 0.25s, background 0.25s, color 0.25s; cursor: pointer; min-height: 44px;
}
.chip:hover { border-color: var(--turquoise); }
.chip.on { background: var(--pine); border-color: var(--pine); color: var(--white); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,38,31,0.94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 86vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lb-btn { position: absolute; background: rgba(255,255,255,0.12); color: #fff; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; backdrop-filter: blur(6px); transition: background 0.25s; }
.lb-btn:hover { background: rgba(255,255,255,0.28); }
.lb-btn svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 2; fill: none; }
.lb-close { top: 1.5rem; right: 1.5rem; }
.lb-prev { left: clamp(0.6rem,3vw,2rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(0.6rem,3vw,2rem); top: 50%; transform: translateY(-50%); }

/* ---------- Secondary hero (interior pages) ---------- */
.subhero { position: relative; min-height: 58vh; display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--pine-deep); }
.subhero .media { position: absolute; inset: 0; z-index: 0; }
.subhero::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(var(--scrim-rgb),0.35) 0%, rgba(var(--scrim-rgb),0.1) 40%, rgba(var(--scrim-rgb),0.78) 100%); }
.subhero .wrap { position: relative; z-index: 2; padding-bottom: clamp(2.5rem,5vw,4rem); padding-top: 9rem; }
.subhero h1 { font-size: clamp(2.4rem, 6vw, 5rem); max-width: 18ch; }
.breadcrumb { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 1rem; color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: var(--sand); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav, .header-cta .btn-text { display: none; }
  .burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-bar { left: 1rem; right: 1rem; max-width: none; }
  .wa-float { bottom: 1rem; right: 1rem; }
}

/* ---------- Direction artistique switcher ---------- */
.dir-switch {
  position: fixed; left: 50%; bottom: clamp(1rem, 3vw, 1.6rem); transform: translateX(-50%);
  z-index: 92; display: flex; align-items: center; gap: 0.3rem;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(0,0,0,0.06); border-radius: 999px; padding: 0.4rem 0.45rem 0.4rem 0.95rem;
  box-shadow: 0 14px 40px rgba(20,30,25,0.18);
  font-family: 'Manrope', sans-serif;
}
.dir-switch .dir-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #6b6b63; margin-right: 0.4rem; }
.dir-switch button {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border-radius: 999px;
  font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 0.82rem; color: #2C2C2C;
  transition: background 0.25s, color 0.25s; white-space: nowrap;
}
.dir-switch button:hover { background: rgba(0,0,0,0.05); }
.dir-switch button.on { background: #2C2C2C; color: #fff; }
.dir-switch .sw { display: inline-flex; }
.dir-switch .sw i { width: 11px; height: 11px; border-radius: 50%; display: block; margin-left: -4px; border: 1.5px solid rgba(255,255,255,0.85); box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.dir-switch .sw i:first-child { margin-left: 0; }
.dir-switch button.on .sw i { border-color: rgba(255,255,255,0.6); }
.dir-switch .nm-full { display: inline; }
@media (max-width: 720px) {
  .dir-switch { left: 1rem; right: 1rem; transform: none; bottom: 1rem; justify-content: center; padding: 0.35rem; gap: 0.15rem; }
  .dir-switch .dir-label { display: none; }
  .dir-switch button { padding: 0.5rem 0.6rem; font-size: 0.74rem; }
  .dir-switch .nm-full { display: none; }
  .wa-float { bottom: 4.8rem; }
  .cookie-bar { bottom: 4.8rem; }
}
