/* =========================================================
   Refuge du Guide l'Empyrée — feuille de styles partagée
   FR / EN / DE
   ========================================================= */

/* ---------- Reset & variables ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }

:root {
  --teal: #1d6f78;
  --teal-dark: #144a50;
  --teal-light: #a8d0d4;
  --orange: #e07840;
  --orange-dark: #c45e28;
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #2a2622;
  --muted: #6b6560;
  --border: #e5dfd6;
  --footer-bg: #144a50;
  --footer-text: #d8e5e6;
  --shadow: 0 4px 12px rgba(0,0,0,.06);
  --radius: 12px;
  --font-head: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #4aa8b2;
    --teal-dark: #2a8a94;
    --teal-light: #2a3d40;
    --orange: #e88a50;
    --orange-dark: #e07840;
    --bg: #151917;
    --surface: #1e2422;
    --text: #e8e5e0;
    --muted: #a8a29a;
    --border: #2f3634;
    --footer-bg: #0e2527;
    --footer-text: #cfe0e1;
    --shadow: 0 4px 12px rgba(0,0,0,.4);
  }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  margin: 0 0 .5rem;
  line-height: 1.2;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: var(--orange);
  margin: 1rem auto 0;
  border-radius: 2px;
}
.section-lead {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 3rem;
}

.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split.reverse > :first-child { order: 2; }
}
.split img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Anti-overflow pour tous les grids */
.split > *,
.cards > *,
.gallery > *,
.avis-grid > * { min-width: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  font-size: .95rem; line-height: 1;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--orange); color: #fff; padding: .75rem 1rem;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .75rem; padding-bottom: .75rem;
}
.logo {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 700;
  color: var(--text); text-decoration: none;
}
.logo img { width: 36px; height: 36px; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--teal); }

.nav-toggle {
  display: none; background: transparent; border: 0;
  color: var(--text); cursor: pointer; padding: .4rem;
}

/* Sélecteur de langue */
.lang-switch { display: flex; align-items: center; gap: .2rem; }
.lang-switch a, .lang-switch span {
  padding: .25rem .45rem; border-radius: 4px;
  text-decoration: none; font-weight: 600;
  font-size: .8rem; letter-spacing: .04em;
  color: var(--muted);
}
.lang-switch a:hover { color: var(--teal); }
.lang-switch [aria-current="page"] { color: var(--teal); background: var(--teal-light); }
@media (prefers-color-scheme: dark) {
  .lang-switch [aria-current="page"] { background: rgba(74,168,178,.2); }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-header { position: relative; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    padding: 1rem 1.25rem 1.25rem; gap: .85rem;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav .btn { width: 100%; }
  .lang-switch { justify-content: center; padding-top: .5rem; border-top: 1px solid var(--border); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background: #0e2527;
  width: 100%;
  min-height: 420px;
  aspect-ratio: 1600 / 861;
}

@media (max-width: 900px) {
  .hero {
    aspect-ratio: auto;
    min-height: 620px;
  }
  .hero-bg {
    object-fit: cover;          /* ← remplit tout, crop léger */
    object-position: center top;
  }
}

.hero picture {
  position: absolute;
  inset: 0;
  display: block;
  z-index: -2;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}



.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.2) 45%, rgba(0,0,0,.05) 100%),
    linear-gradient(135deg, rgba(0,0,0,.5) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  padding: 2.5rem 1.25rem 4rem;
  max-width: 760px;
  font-size: 1.25rem;
}

.hero .hero-content { margin-left: 0; }
@media (min-width: 768px) {
  .hero .hero-content { margin-left: 50px; }
}

.hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  text-shadow: 0 2px 14px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.85);
}

.hero-sub {
  display: block;
  font-size: .5em;
  font-weight: 400;
  opacity: .92;
  margin-top: .5rem;
}

.hero-tag {
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
  margin: 0 0 2rem;
  max-width: 560px;
}

/* ---------- Services ---------- */
.cards { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1.75rem; box-shadow: var(--shadow);
}
.card h3 { font-family: var(--font-head); font-size: 1.25rem; margin: .75rem 0 .5rem; }
.card p { margin: 0; color: var(--muted); }
.card-icon { color: var(--teal); }

/* ---------- Galerie ---------- */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
.gallery a {
  display: block; aspect-ratio: 1/1; overflow: hidden;
  border-radius: 10px; background: var(--surface);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .gallery img { transition: none; }
  .gallery a:hover img, .gallery a:focus-visible img { transform: none; }
}

/* ---------- Carte / Accès ---------- */
.map-split { align-items: stretch; }
.acces-info h3 {
  font-family: var(--font-head); font-size: 1.1rem;
  margin: 1.25rem 0 .35rem; color: var(--teal);
}
.acces-info h3:first-child { margin-top: 0; }
.acces-info p, .acces-info ul { margin: .25rem 0 .75rem; }
.acces-info ul { padding-left: 1.1rem; }
.acces-info a { color: var(--teal); }
.acces-info a:hover { color: var(--orange); }

.map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
}
@media (max-width: 480px) {
  .map-wrap { aspect-ratio: 1 / 1; }
}
.map-wrap iframe,
.map-wrap > * { max-width: 100%; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }
.map-placeholder {
  text-align: center; padding: 2rem 1.25rem; color: var(--muted);
  display: grid; gap: 1rem; justify-items: center; max-width: 360px;
}
.map-placeholder svg { color: var(--teal); }
.map-placeholder p { margin: 0; font-size: .92rem; }

/* ---------- Avis ---------- */
.avis-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .avis-grid { grid-template-columns: repeat(3, 1fr); } }

.avis {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--orange); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem; margin: 0; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .65rem;
}
.avis blockquote { margin: 0; font-style: italic; color: var(--text); }
.avis blockquote p { margin: 0; }
.avis figcaption { margin: 0; }
.avis cite { font-style: normal; font-weight: 600; color: var(--muted); font-size: .9rem; }

.stars { display: inline-flex; gap: 3px; color: var(--orange); line-height: 0; }
.stars svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.stars svg.empty { fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (prefers-color-scheme: dark) { .stars { color: #f2a765; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: .75rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
}
.faq summary {
  font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--orange); font-size: 1.4rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .75rem 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg); color: var(--footer-text);
  padding: 3rem 0 2rem;
}
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { font-family: var(--font-head); font-size: 1.05rem; margin: 0 0 .75rem; color: #fff; }
.site-footer p, .site-footer li { margin: .35rem 0; font-size: .95rem; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.25rem;
  font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 100%; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 6px; }
.lightbox figcaption { color: #ddd; font-size: .9rem; margin-top: .75rem; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.12); color: #fff;
  border: 0; border-radius: 999px; cursor: pointer;
  width: 48px; height: 48px; display: grid; place-items: center;
  font-size: 1.6rem; line-height: 1; transition: background .2s ease;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Animation reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transition: opacity .4s ease; }
  .js .reveal.in { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; }
}
