/* ═══════════════════════════════════════════════════════════
   heidi.css — Thème Alpes suisses
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --sky:        #b8e0f7;
  --sky-deep:   #4a90c4;
  --snow:       #f5f9ff;
  --mountain:   #5a7a5a;
  --mountain-dk:#2d4a2d;
  --wood:       #8b5c2a;
  --wood-lt:    #c8864a;
  --grass:      #5c8a3c;
  --grass-lt:   #7ab648;
  --gold:       #e8a838;
  --cream:      #fffaf2;
  --dark:       #2b2b2b;
  --text:       #3a2a1a;
  --text-muted: #7a6a5a;
  --radius:     14px;
  --shadow:     0 8px 32px rgba(44,74,44,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Georgia, serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── Barre de progression ─────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--grass), var(--gold), var(--sky-deep));
  z-index: 1000;
  transition: width .1s linear;
}

/* ── Header montagne ──────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,250,242,.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(90,122,90,.2);
  box-shadow: 0 2px 12px rgba(44,74,44,.1);
}

.hdr {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hdr-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--mountain-dk);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.hdr-title .edelweiss { font-size: 1.4rem; }

nav {
  margin-left: auto;
  display: flex;
  gap: .15rem;
  flex-wrap: wrap;
}

nav a {
  font-size: .78rem;
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 20px;
  text-decoration: none;
  transition: background .15s, color .15s;
}

nav a:hover, nav a.active {
  background: var(--grass);
  color: #fff;
}

/* ── Hero Alpes ───────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem 8rem;
  background: linear-gradient(
    180deg,
    #b8e0f7 0%,
    #d4eef9 30%,
    #e8f4e8 65%,
    #c8deb8 100%
  );
}

/* Sommets enneigés en CSS */
.hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: -5%;
  width: 110%;
  height: 200px;
  background:
    /* Pic gauche */
    polygon(0% 100%, 12% 30%, 24% 100%),
    /* Pic central */
    polygon(18% 100%, 35% 5%, 52% 100%),
    /* Pic droit */
    polygon(44% 100%, 62% 20%, 80% 100%),
    /* Pic extrême droit */
    polygon(70% 100%, 83% 40%, 96% 100%);
  /* Fallback gradient montagne */
  background: linear-gradient(180deg, transparent 0%, rgba(90,122,90,.15) 100%);
  clip-path: polygon(
    0% 100%,
    0% 80%,
    8% 45%,
    16% 75%,
    25% 20%,
    33% 60%,
    42% 35%,
    50% 10%,
    58% 38%,
    67% 25%,
    74% 55%,
    82% 30%,
    90% 65%,
    100% 40%,
    100% 100%
  );
}

/* Neige au sommet */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: -5%;
  width: 110%;
  height: 200px;
  clip-path: polygon(
    0% 100%,
    0% 80%,
    8% 45%,
    16% 75%,
    25% 20%,
    33% 60%,
    42% 35%,
    50% 10%,
    58% 38%,
    67% 25%,
    74% 55%,
    82% 30%,
    90% 65%,
    100% 40%,
    100% 100%
  );
  background: linear-gradient(180deg, #2d6a2d 0%, #4a8a3a 40%, #5c8a3c 100%);
}

/* Neige sur les pics */
.mountains-snow {
  position: absolute;
  bottom: 130px; left: -5%;
  width: 110%;
  height: 90px;
  clip-path: polygon(
    23% 100%, 25% 50%, 27% 100%,
    47% 100%, 50% 0%, 53% 100%,
    64% 100%, 67% 30%, 70% 100%,
    79% 100%, 82% 20%, 85% 100%
  );
  background: rgba(255,255,255,.85);
  z-index: 2;
}

/* Prairie verte au bas */
.mountains-grass {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--grass-lt) 60%, var(--grass));
  z-index: 3;
}

.hero-inner {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text { flex: 1; }

.hero-badge {
  display: inline-block;
  background: var(--grass);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: .8rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  color: var(--mountain-dk);
  line-height: 1.05;
  margin-bottom: .8rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.hero h1 .hl {
  color: var(--wood);
  font-style: italic;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--mountain-dk);
  max-width: 520px;
  line-height: 1.7;
  opacity: .85;
}

/* Chalet SVG widget */
.hero-chalet {
  flex-shrink: 0;
  background: rgba(255,255,255,.7);
  border: 2px solid rgba(90,122,90,.3);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(6px);
}

.chalet-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.chalet-svg { display: block; margin: 0 auto .5rem; }

.chalet-info {
  font-size: .8rem;
  color: var(--wood);
  font-weight: 600;
}

/* ── Contenu ──────────────────────────────────────────────── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Cards chalet ─────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid rgba(90,122,90,.18);
  border-top: 4px solid var(--grass);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .5s ease, transform .5s ease, box-shadow .2s;
}

.card.visible { opacity: 1; transform: translateY(0); }
.card:hover   { box-shadow: 0 12px 40px rgba(44,74,44,.18); }

.card:nth-child(even) { border-top-color: var(--sky-deep); }
.card:nth-child(3n)   { border-top-color: var(--wood); }

.card-icon {
  font-size: 1.8rem;
  margin-bottom: .5rem;
  display: block;
}

h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--mountain-dk);
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

p { margin-bottom: .75rem; color: var(--text); }
ul { padding-left: 1.4rem; margin-bottom: .75rem; }
li { margin-bottom: .4rem; }

li::marker { color: var(--grass); }

/* ── Grid 2 colonnes ──────────────────────────────────────── */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Thèmes pills ─────────────────────────────────────────── */
.theme-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.theme-list li {
  background: linear-gradient(135deg, var(--grass), var(--mountain));
  color: #fff;
  padding: .3rem .9rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin: 0;
}

.theme-list li:nth-child(even)  { background: linear-gradient(135deg, var(--sky-deep), #2a6a9a); }
.theme-list li:nth-child(3n)    { background: linear-gradient(135deg, var(--wood), #a0440a); }

/* ── Séparateur alpin ─────────────────────────────────────── */
.alp-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.4rem;
  letter-spacing: .4em;
  margin: .5rem 0;
  opacity: .5;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .82rem;
  color: var(--text-muted);
  border-top: 2px solid rgba(90,122,90,.15);
  background: linear-gradient(180deg, var(--cream), #f0f5ea);
}

footer strong { color: var(--mountain-dk); }

/* ── Bouton retour en haut ────────────────────────────────── */
#top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px; height: 44px;
  background: var(--grass);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(44,74,44,.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  text-decoration: none;
}

#top-btn.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#top-btn:hover   { background: var(--mountain-dk); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-inner { flex-direction: column; }
  .hero-chalet { display: none; }
  .cols-2 { grid-template-columns: 1fr; }
  nav { display: none; }
}
