/* Reset anti-distorsion - obligatoire Astro 6 */
img { max-width: 100%; height: auto; display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }

:root {
  --calcaire: #F2EDE3;
  --ombre-pierre: #8B8378;
  --ocre-brule: #A8582E;
  --vert-garrigue: #4F5C3E;
  --encre-nuit: #211D18;
  --bg: var(--calcaire);
  --bg-soft: #fbf8f1;
  --bg-card: #fffaf2;
  --text: var(--encre-nuit);
  --text-muted: var(--ombre-pierre);
  --border: rgba(33, 29, 24, .16);
  --border-strong: rgba(168, 88, 46, .34);
  --shadow-sm: 0 1px 3px rgba(33, 29, 24, .08);
  --shadow-md: 0 12px 32px rgba(33, 29, 24, .12);
  --radius: 8px;
  --container: 1180px;
  --font-display: 'Petrona', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

body {
  font-family: var(--font-body);
  font-size: 1.055rem;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(168, 88, 46, .10), transparent 26rem),
    linear-gradient(180deg, var(--calcaire) 0%, #e9dfd1 100%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--encre-nuit);
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.8rem); }
p { margin: 0 0 1.2rem; }

.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.container-narrow { width: min(800px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-soft { background: rgba(255, 250, 242, .56); }
.section-dark { background: var(--encre-nuit); color: var(--calcaire); }
.section-dark h2, .section-dark h3 { color: var(--calcaire); }

/* Anti-distorsion wrappers - jamais object-fit:cover sur <img> seul */
.img-hero { aspect-ratio: 16/9; overflow: hidden; }
.img-card { aspect-ratio: 3/2; overflow: hidden; }
.img-body { aspect-ratio: 3/2; overflow: hidden; }
.img-portrait { aspect-ratio: 1/1; overflow: hidden; border-radius: 50%; }
.img-hero img,
.img-card img,
.img-body img,
.img-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 237, 227, .92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 5px;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ombre-pierre);
}
.main-nav { display: flex; align-items: center; gap: .25rem; }
.nav-link, .nav-trigger {
  border: 0;
  background: transparent;
  padding: .55rem .75rem;
  color: var(--encre-nuit);
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}
.nav-link:hover, .nav-trigger:hover, .nav-link.active { color: var(--ocre-brule); background: rgba(168, 88, 46, .08); }
.nav-group { position: relative; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  padding: .55rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
}
.nav-group:hover .nav-dropdown, .nav-group:focus-within .nav-dropdown { display: grid; }
.nav-dropdown a { padding: .55rem .65rem; border-radius: 6px; color: var(--text); font-weight: 600; }
.nav-dropdown a:hover { background: rgba(79, 92, 62, .12); color: var(--vert-garrigue); }
.hamburger { display: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-soft); color: var(--encre-nuit); }

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--encre-nuit);
}
.hero-page { min-height: min(520px, calc(100vh - 72px)); }
.hero-home { min-height: min(760px, calc(100vh - 72px)); }
.hero .img-hero {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}
.hero .img-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(33, 29, 24, .86), rgba(33, 29, 24, .42) 48%, rgba(33, 29, 24, .18)),
    linear-gradient(0deg, rgba(33, 29, 24, .76), transparent 45%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
  color: var(--calcaire);
  max-width: 900px;
}
.hero-kicker, .section-kicker {
  font-family: var(--font-accent);
  font-size: 1.35rem;
  font-style: italic;
  color: #dfb18f;
}
.hero h1 { color: var(--calcaire); max-width: 820px; }
.hero-subtitle {
  max-width: 650px;
  margin-top: 1.25rem;
  color: rgba(242, 237, 227, .82);
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .82rem 1.1rem;
  border-radius: 6px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ocre-brule); color: #fff; }
.button-secondary { background: rgba(242, 237, 227, .10); color: var(--calcaire); border-color: rgba(242, 237, 227, .34); }

.stone-divider {
  width: min(960px, calc(100% - 40px));
  height: 56px;
  margin: 0 auto;
  background: url('/images/stone-divider.svg') center / contain no-repeat;
}
.section-heading { max-width: 760px; margin-bottom: 2.2rem; }
.section-heading p { color: var(--text-muted); font-size: 1.12rem; margin-top: .75rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editorial-strip {
  border-left: 5px solid var(--ocre-brule);
  padding: 1.3rem 1.5rem;
  background: rgba(255, 250, 242, .72);
  max-width: 860px;
  font-family: var(--font-accent);
  font-size: 1.45rem;
}
.guide-mosaic {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1fr;
  grid-auto-rows: minmax(210px, auto);
  gap: 1.25rem;
}
.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 210px;
  padding: 1.35rem;
  color: var(--calcaire);
  overflow: hidden;
  isolation: isolate;
}
.guide-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--guide-image);
  background-size: cover;
  background-position: center;
  transition: transform .3s var(--ease);
}
.guide-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(33, 29, 24, .05) 0%, rgba(33, 29, 24, .55) 45%, rgba(33, 29, 24, .94) 100%);
}
.guide-card:hover::before { transform: scale(1.05); }
.guide-card .section-kicker {
  color: var(--calcaire);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .9;
}
.guide-card h3 { color: var(--calcaire); margin: .3rem 0 .5rem; }
.guide-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: rgba(242, 237, 227, .88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.guide-card .card-link { color: var(--calcaire); margin-top: auto; padding-top: .5rem; }
.guide-card-1 { grid-row: span 2; }
.guide-card-2 { grid-column: span 2; }
.immersive-section {
  background:
    linear-gradient(rgba(33, 29, 24, .88), rgba(33, 29, 24, .92)),
    url('/images/heroes/hero-pierre-seche-immersive.webp') center / cover;
}
.immersive-quote {
  max-width: 920px;
  font-family: var(--font-accent);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.08;
  color: var(--calcaire);
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2rem;
}
.toc-title {
  margin: 0 0 .6rem;
  font-family: var(--font-accent);
  font-size: 1.05rem;
  color: var(--ocre);
}
.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 1;
}
.toc li { margin: .3rem 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--ocre); text-decoration: underline; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3 { margin-bottom: .65rem; }
.card p { color: var(--text-muted); }
.card-link { color: var(--ocre-brule); font-weight: 800; }
.article-body { font-size: 1.08rem; line-height: 1.84; }
.article-body h2 { margin: 2.8rem 0 1rem; padding-left: 1rem; border-left: 4px solid var(--ocre-brule); }
.article-body h3 { margin: 2rem 0 .8rem; }
.article-body a { color: var(--ocre-brule); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { margin: 1rem 0 1.5rem 1.4rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body blockquote {
  margin: 2rem 0;
  padding: 1.4rem 1.6rem;
  border-left: 4px solid var(--vert-garrigue);
  background: rgba(79, 92, 62, .10);
  font-family: var(--font-accent);
  font-size: 1.35rem;
  font-style: italic;
}

.faq-section { display: grid; gap: .75rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 0;
  background: transparent;
  color: var(--encre-nuit);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.faq-icon {
  width: 22px;
  height: 22px;
  position: relative;
  flex: 0 0 22px;
  transition: transform .24s var(--ease);
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  inset: 10px 3px auto;
  height: 2px;
  background: var(--ocre-brule);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 1.2rem 1.1rem; color: var(--text-muted); }
.faq-item.open .faq-answer { display: block; }

.site-footer {
  background: var(--encre-nuit);
  color: rgba(242, 237, 227, .72);
  padding: 4rem 0 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: var(--calcaire); margin-bottom: .85rem; }
.footer-grid a { display: block; padding: .25rem 0; color: rgba(242, 237, 227, .72); }
.footer-grid a:hover { color: #dfb18f; }
.footer-brand { color: var(--calcaire); font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(242, 237, 227, .12); margin-top: 2.5rem; padding-top: 1rem; font-size: .88rem; color: rgba(242, 237, 227, .48); }

@media (max-width: 860px) {
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--calcaire);
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
  .nav-group { width: 100%; }
  .nav-link, .nav-trigger { width: 100%; text-align: left; }
  .nav-dropdown { position: static; display: grid; min-width: 0; box-shadow: none; margin: .25rem 0 .75rem; }
  .grid-3, .footer-grid, .guide-mosaic { grid-template-columns: 1fr; }
  .guide-card-1, .guide-card-2 { grid-row: auto; grid-column: auto; }
}
