/* ==========================================================================
   Maison des Tronches — feuille de style principale
   ========================================================================== */

:root {
  --forest: #23382b;
  --forest-deep: #172619;
  --moss: #5f7f45;
  --moss-light: #e6edd9;
  --ember: #c4622d;
  --ember-dark: #a14e20;
  --cream: #f8f4ec;
  --paper: #fffdf8;
  --ink: #1f2620;
  --muted: #5d665d;
  --line: #e3ddcf;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(23, 38, 25, .25);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--ember); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--forest-deep);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--forest); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 72px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--forest-deep); }
.brand svg { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.brand-sub { font-size: .75rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
}
.nav a:hover { background: var(--moss-light); color: var(--forest-deep); }
.nav a[aria-current="page"] { color: var(--ember-dark); }
.nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--forest-deep);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 20px; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary, .nav a.btn-primary { background: var(--ember); color: #fff; }
.btn-primary:hover, .nav a.btn-primary:hover { background: var(--ember-dark); color: #fff; }
.btn-ghost { border-color: currentColor; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--forest-deep); border-color: #fff; }
.btn-outline { border-color: var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: #fff; }

/* ---------- Héros ---------- */

.hero {
  position: relative; isolation: isolate;
  min-height: min(86vh, 760px);
  display: flex; align-items: flex-end;
  color: #fff;
  padding: 120px 0 72px;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(15, 25, 17, .55) 0%, rgba(15, 25, 17, .15) 65%, rgba(15, 25, 17, 0) 100%),
    linear-gradient(180deg, rgba(15, 25, 17, .2) 0%, rgba(15, 25, 17, .3) 45%, rgba(15, 25, 17, .8) 100%);
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); max-width: 56ch; opacity: .95; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ember); margin-bottom: 12px;
}
.hero .eyebrow { color: #f4c9a6; }

.page-hero { min-height: 52vh; padding: 140px 0 56px; }
.page-hero h1 { max-width: 20ch; }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--forest); color: #e9efe4; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #f4c9a6; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.section-dark .section-head p { color: #c9d6c0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

.media-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.media-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.media-stack { position: relative; padding: 0 0 48px 48px; }
.media-stack .back { border-radius: var(--radius); overflow: hidden; }
.media-stack .back img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.media-stack .front {
  position: absolute; left: 0; bottom: 0; width: 46%;
  border: 6px solid var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.section-alt .media-stack .front { border-color: var(--cream); }
.media-stack .front img { aspect-ratio: 1; object-fit: cover; width: 100%; }

/* ---------- Cartes ---------- */

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.section-alt .card { background: #fff; }
a.card { text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body p { color: var(--muted); margin: 0; }
.card-link { margin-top: auto; padding-top: 12px; font-weight: 700; color: var(--ember-dark); }
.card-tag {
  align-self: flex-start; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--moss-light); color: var(--forest); padding: 4px 10px; border-radius: 999px;
}

.feature { padding: 28px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.section-alt .feature { background: #fff; }
.section-dark .feature { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.section-dark .feature p { color: #c9d6c0; }
.feature .icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--moss-light); color: var(--forest); margin-bottom: 16px;
}
.section-dark .feature .icon { background: rgba(244, 201, 166, .15); color: #f4c9a6; }
.feature .icon svg { width: 28px; height: 28px; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Chiffres clés ---------- */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--forest); color: #fff; border-radius: var(--radius); overflow: hidden;
  margin-top: -56px; position: relative; z-index: 2; box-shadow: var(--shadow);
}
.stat { padding: 28px 24px; text-align: center; border-right: 1px solid rgba(255, 255, 255, .12); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; color: #f4c9a6; }
.stat span { font-size: .95rem; color: #d6e0cf; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .12); }
}

/* ---------- Listes ---------- */

.checklist { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--moss-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2323382b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.checklist.cols { grid-template-columns: 1fr 1fr; column-gap: 24px; }
@media (max-width: 640px) { .checklist.cols { grid-template-columns: 1fr; } }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pill-list li { background: #fff; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: .95rem; }
.section-dark .pill-list li { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); }

/* ---------- Tableaux ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--forest); color: #fff; font-weight: 700; font-size: .9rem; letter-spacing: .03em; }
tbody tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; font-weight: 700; color: var(--forest-deep); }
.note { font-size: .92rem; color: var(--muted); margin-top: 12px; }

/* ---------- Encadré CTA ---------- */

.cta-band {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--radius); padding: clamp(40px, 6vw, 72px);
  color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(23, 38, 25, .92), rgba(23, 38, 25, .55)); }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; max-width: 52ch; color: #e3eadc; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Galerie ---------- */

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.tall { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px;
  color: #fff; font-size: .88rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .gallery figure.wide { grid-column: span 2; }
}

/* ---------- Espaces de camp ---------- */

.zone { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.zone img { border-radius: var(--radius-sm); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.zone h3 { margin-bottom: .25em; }
.zone .meta { font-weight: 700; color: var(--ember-dark); font-size: .95rem; margin-bottom: 8px; }
.zone p { color: var(--muted); margin: 0; }
@media (max-width: 640px) { .zone { grid-template-columns: 1fr; } }

/* ---------- Tranches d'âge ---------- */

.ages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.age { background: #fff; border-radius: var(--radius); padding: 22px; border-top: 5px solid var(--c, var(--moss)); border: 1px solid var(--line); border-top-width: 5px; border-top-color: var(--c, var(--moss)); }
.age strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--forest-deep); }
.age span { color: var(--muted); }
@media (max-width: 860px) { .ages { grid-template-columns: 1fr 1fr; } }

/* ---------- Formulaire ---------- */

.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--moss); outline: none; box-shadow: 0 0 0 3px var(--moss-light); }
.field textarea { min-height: 140px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; font-size: .95rem;
}
.choices input { accent-color: var(--ember); }
.choices label:has(input:checked) { border-color: var(--ember); background: #fdf1e9; }
.form-status { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--moss-light); color: var(--forest-deep); display: none; }
.form-status.show { display: block; }

.contact-card { background: var(--forest); color: #e9efe4; border-radius: var(--radius); padding: 32px; }
.contact-card h3 { color: #fff; }
.contact-card a { color: #fff; font-weight: 700; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.contact-line:last-child { border-bottom: 0; }
.contact-line svg { width: 22px; height: 22px; flex: none; margin-top: 3px; color: #f4c9a6; }
.contact-line small { display: block; color: #b8c7ad; }

.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--cream); }
.map-frame iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Pied de page ---------- */

.site-footer { background: var(--forest-deep); color: #b8c7ad; padding: 64px 0 28px; font-size: .97rem; }
.site-footer a { color: #e9efe4; text-decoration: none; }
.site-footer a:hover { color: #f4c9a6; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h4 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand-sub { color: #b8c7ad; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .88rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utilitaires ---------- */

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
