/* ==========================================================================
   Le Manoir du Perrey — style.css
   Palette : brume #DCE3E6 · ardoise #1E2F36 · pierre #4E565D · brume foncée #C9D4D8
   Typo    : Literata (titres) · Parkinsans (texte) · Parisienne (manuscrit)
   ========================================================================== */

:root {
  --mist: #DCE3E6;
  --mist-deep: #C9D4D8;
  --mist-soft: #EDF1F3;
  --ink: #1E2F36;
  --ink-soft: #2C3F47;
  --stone: #4E565D;
  --stone-light: #7C868D;
  --white: #FFFFFF;
  --clay: #BD6039;
  --clay-deep: #A5512E;
  --clay-tint: #F3E6DF;
  --line: rgba(30, 47, 54, .12);

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Parkinsans", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Parisienne", "Brush Script MT", cursive;

  --container: 1280px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --section-y: clamp(64px, 10vw, 120px);
  --radius-l: 28px;
  --radius-m: 16px;
  --radius-s: 10px;

  /* Échelle typographique (6 tailles de texte courant + titres) */
  --text-2xs: .6875rem;  /* 11px : cartouches, labels du footer */
  --text-xs: .75rem;     /* 12px : mentions, copyright, toggle */
  --text-sm: .875rem;    /* 14px : cartes, newsletter, formulaire, footer */
  --text-md: .9375rem;   /* 15px : texte courant */
  --text-lg: 1.125rem;   /* 18px : titres de carte, intros */
  --text-xl: 1.25rem;    /* 20px : sous-titres */
  --text-2xl: 1.5rem;    /* 24px : nom dans le footer */

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--stone);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: rgba(78, 86, 93, .35); text-underline-offset: .18em; transition: color .25s var(--ease-soft), text-decoration-color .25s var(--ease-soft); }
a:hover { color: var(--ink); text-decoration-color: currentColor; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
figure { margin: 0; }
address { font-style: normal; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100%; left: 16px; z-index: 100;
  padding: .6rem 1rem; background: var(--ink); color: var(--white);
  border-radius: var(--radius-s); text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 16px; }

/* ---------- Typographie ---------- */
.h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.125rem);
  line-height: 1.28;
  letter-spacing: -.012em;
  color: var(--ink);
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.h2--center { text-align: center; margin-inline: auto; max-width: 30ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0 0 1.25rem;
  padding: .42rem .95rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}
.eyebrow--light { border-color: rgba(255, 255, 255, .6); color: var(--white); background: rgba(30, 47, 54, .22); font-size: var(--text-xs); padding: .5rem 1.1rem; margin-bottom: .6rem; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: clamp(14px, 2vw, 22px) var(--gutter);
  pointer-events: none;
  transition: transform .5s var(--ease-out);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  width: min(100%, var(--container)); margin-inline: auto;
}
.topbar__brand {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--white);
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); letter-spacing: -.005em;
  padding: .45rem .75rem .45rem .55rem; border-radius: 999px;
}
.topbar__mark { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; opacity: .85; }
.topbar__mark svg { width: 15px; height: 15px; }
.topbar__name { white-space: nowrap; }

.lang {
  pointer-events: auto;
  display: inline-flex; padding: 3px; gap: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(30, 47, 54, .22);
}
.lang__btn {
  appearance: none; border: 0; cursor: pointer;
  min-width: 42px; height: 32px; padding: 0 .75rem;
  border-radius: 999px;
  background: transparent; color: rgba(255, 255, 255, .8);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .12em;
  transition: background .3s var(--ease-soft), color .3s var(--ease-soft);
}
.lang__btn:hover { color: var(--white); }
.lang__btn[aria-pressed="true"] { background: var(--white); color: var(--ink); }

.topbar.is-hidden { transform: translateY(-120%); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media picture { position: absolute; inset: -6% 0; }
.hero__img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%;
  transform: scale(1);
  transition: transform 5s var(--ease-soft);
  will-change: transform;
}
.is-ready .hero__img { transform: scale(1.06); }
.hero__veil {
  position: absolute; inset: 0;
  background: rgba(28, 36, 36, .4);
}

.hero__content {
  grid-row: 1;
  text-align: center;
  padding: clamp(6rem, 18vh, 10rem) var(--gutter) 2rem;
  display: flex; flex-direction: column; align-items: center;
}
.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.6rem, 2rem + 5.5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.hero__sub {
  margin: 0;
  font-weight: 300;
  font-size: clamp(1.0625rem, .95rem + .65vw, 1.375rem);
  letter-spacing: .01em;
  opacity: .92;
}

.hero__rise { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.is-ready .hero__rise { opacity: 1; transform: none; }

.hero__script {
  grid-row: 2;
  margin: 0;
  padding: 0 var(--gutter) clamp(4rem, 9vh, 6rem);
  text-align: center;
  font-family: var(--font-script);
  transform: translateY(10px);
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
  line-height: 1.3;
  color: rgba(255, 255, 255, .95);
  opacity: 0;
  transition: opacity 1s var(--ease-soft) .9s;
}
.is-ready .hero__script { opacity: 1; }


/* ---------- Sections ---------- */
.section { position: relative; padding-block: var(--section-y); }
.section--mist { background: var(--mist); }
.section--white { background: var(--white); }
.section--tight { padding-top: 0; }
#highlights { padding-bottom: clamp(3rem, 6vw, 5rem); }
.section--curve {
  margin-top: calc(-1 * var(--radius-l));
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  z-index: 2;
}
.section--white { border-radius: var(--radius-l); }

.section__head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.section__head .eyebrow { margin-bottom: .75rem; }

/* Deux colonnes texte / image */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.split--reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.split__text p { max-width: 56ch; }
.split__text p + p { margin-top: 1.1em; }

.frame {
  border-radius: var(--radius-m);
  overflow: hidden;
  transform: translateZ(0);
}
.frame img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.split--reverse .frame img { aspect-ratio: 16 / 10; }

/* ---------- Cartes atouts ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.9rem, 1.6vw, 1.4rem);
}
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-m);
  padding: clamp(1.4rem, 2.2vw, 1.9rem);
}
.card__icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%;
  background: var(--mist-soft);
  color: var(--ink);
  margin-bottom: 1rem;
}
.card__icon svg { width: 22px; height: 22px; }
.card__title {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -.005em;
}
.card__text { margin: 0; font-size: var(--text-sm); line-height: 1.65; }

/* ---------- Newsletter ---------- */
.notify {
  background: var(--mist-deep);
  border-radius: var(--radius-l);
  padding: clamp(2rem, 4.5vw, 3.25rem) var(--gutter);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.notify .h2 { max-width: 30ch; margin-bottom: .9rem; }
.notify .eyebrow { margin-bottom: .75rem; }
.notify__text { max-width: 60ch; margin: 0 auto 1.5rem; font-size: var(--text-sm); }
.notify__text a { color: var(--ink); font-weight: 500; }
.notify__form {
  position: relative;
  display: flex; gap: .75rem; width: min(100%, 600px);
  flex-wrap: wrap; justify-content: center;
}
.notify__input {
  flex: 1 1 260px;
  height: 52px; padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--white);
  color: var(--ink);
  font-size: var(--text-sm);
  transition: border-color .3s var(--ease-soft), box-shadow .3s var(--ease-soft);
}
.notify__input::placeholder { color: var(--stone-light); }
.notify__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(30, 47, 54, .1); }
.notify__input[aria-invalid="true"] { border-color: var(--clay); }

.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  height: 52px; padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--clay); color: var(--white);
  font-weight: 500; font-size: var(--text-sm); letter-spacing: .005em;
  white-space: nowrap;
  transition: background .3s var(--ease-soft), transform .4s var(--ease-out);
}
.btn:hover { background: var(--clay-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .7; cursor: progress; transform: none; }
.btn__arrow { width: 18px; height: 18px; transition: transform .4s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.notify__status { flex-basis: 100%; margin: .5rem 0 0; font-size: var(--text-sm); color: var(--ink); text-align: center; }
.notify__status:empty { display: none; }
.notify__status.is-error { color: var(--clay-deep); }
.notify__form.is-done .notify__input,
.notify__form.is-done .btn { display: none; }
.notify__form.is-done .notify__status { font-family: var(--font-display); font-size: var(--text-lg); }
.notify__consent { max-width: 60ch; margin: .85rem auto 0; font-size: var(--text-xs); line-height: 1.6; color: var(--stone-light); }
.notify__consent a { color: var(--stone); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  padding: clamp(4rem, 8vw, 6.5rem) 0 2rem;
  overflow: hidden;
  isolation: isolate;
}
.footer__drawing {
  position: absolute; z-index: -1;
  right: -4%; bottom: -6%;
  width: clamp(360px, 46vw, 720px);
  opacity: .085;
  filter: invert(1) brightness(1.6);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer__name {
  margin: 0 0 .9rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-2xl);
  line-height: 1.15;
  color: var(--white);
  letter-spacing: -.01em;
}
.footer__desc { max-width: 30rem; font-size: var(--text-sm); line-height: 1.7; }
.footer__label {
  margin: 0 0 .8rem;
  font-size: var(--text-2xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #D98B66;
}
.footer__address { margin: 0; font-size: var(--text-sm); line-height: 1.85; color: rgba(255, 255, 255, .85); }
.footer__maps { display: inline-block; margin-top: .5rem; font-size: var(--text-xs); color: rgba(255,255,255,.6); }
.footer__links { display: flex; gap: 1.25rem; }
.footer__links a { text-decoration: none; color: rgba(255,255,255,.6); }
.footer__links a:hover { color: var(--white); }
.footer__address a { text-decoration-color: rgba(255,255,255,.25); }
.footer__address a:hover { color: var(--white); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: .5rem;
  font-size: var(--text-xs); color: rgba(255, 255, 255, .6);
}
.footer__bottom p { margin: 0; }

/* ---------- Révélation au scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease-out), transform .8s var(--ease-out);
}
[data-reveal][data-reveal-delay="1"] { transition-delay: .15s; }
[data-reveal].is-visible { opacity: 1; transform: none; }

[data-reveal-stagger] { opacity: 1; transform: none; }
[data-reveal-stagger] > * {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s var(--ease-out), transform .7s var(--ease-out);
}
[data-reveal-stagger].is-visible > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-visible > :nth-child(1) { transition-delay: .05s; }
[data-reveal-stagger].is-visible > :nth-child(2) { transition-delay: .17s; }
[data-reveal-stagger].is-visible > :nth-child(3) { transition-delay: .29s; }
[data-reveal-stagger].is-visible > :nth-child(4) { transition-delay: .41s; }

/* ---------- Responsive ---------- */
@media (min-width: 601px) and (max-width: 1366px) {
  :root { --gutter: clamp(48px, 6vw, 80px); }
  .h2 { font-size: clamp(1.6rem, 1.3rem + .7vw, 2rem); }
  .hero__title { font-size: clamp(3rem, 2rem + 3vw, 3.75rem); }
}
@media (min-width: 601px) and (max-width: 1100px) and (orientation: portrait) {
  .hero { min-height: clamp(640px, 76svh, 860px); }
}
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: 2.25rem; }
  .split--reverse .split__media { order: 2; }
  .split--reverse .split__text { order: 1; }
  .split__text p { max-width: 60ch; }
  .frame img, .split--reverse .frame img { aspect-ratio: 16 / 10; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --radius-l: 22px; --radius-m: 14px; }
  .topbar__name { display: none; }
  .topbar__brand { padding: .3rem; }
  .topbar__mark { width: 34px; height: 34px; }
  .hero { min-height: 82svh; }
  .hero__content { padding-top: 6.5rem; }
  .hero__title { font-size: 2.5rem; }
  .h2 { font-size: 1.5rem; }
  .hero__script { padding-bottom: 2.75rem; transform: none; }
  .hero__img { object-position: 50% 62%; }
  .hero__script { padding-bottom: 5.5rem; max-width: 22ch; margin-inline: auto; }
  .cards { grid-template-columns: 1fr; }
  .card { display: grid; grid-template-columns: 44px 1fr; column-gap: 1rem; align-items: start; }
  .card__icon { grid-row: 1 / span 2; margin: 0; }
  .card__title { margin-top: .5rem; }
  .notify { padding-inline: 1.25rem; border-radius: var(--radius-l); }
  .notify__form { flex-direction: column; gap: .6rem; }
  .notify__input { flex: 0 0 auto; width: 100%; }
  .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__drawing { width: 130%; right: -30%; bottom: -3%; opacity: .07; }
  .footer__bottom { flex-direction: column; gap: .4rem; }
}

@media (min-width: 1100px) {
  .h2--center, .notify .h2 { max-width: 64ch; }
  #intro-title { font-size: 2.5rem; }
}

@media (min-width: 1600px) {
  .hero__img { object-position: 50% 64%; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .hero__img { transform: none; }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1; transform: none; }
  .hero__rise, .hero__script { opacity: 1; transform: none; filter: none; }
}

/* ---------- Bascule de langue : fondu discret ---------- */
main, .footer { transition: opacity .16s var(--ease-soft); }
body.is-switching main, body.is-switching .footer { opacity: .35; }

/* ---------- Pages légales ---------- */
.legal-page { background: var(--mist); }
.legal__bar { padding: clamp(14px, 2vw, 22px) 0; }
.legal__bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.legal__back {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg);
}
.legal__back svg { width: 18px; height: 18px; transition: transform .3s var(--ease-out); }
.legal__back:hover svg { transform: translateX(-3px); }
.lang--dark { border-color: rgba(30, 47, 54, .2); background: transparent; }
.lang--dark .lang__btn { color: var(--stone); }
.lang--dark .lang__btn:hover { color: var(--ink); }
.lang--dark .lang__btn[aria-pressed="true"] { background: var(--ink); color: var(--white); }

.legal { max-width: 720px; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 8vw, 6rem); }
.legal .h2 { margin-bottom: 1rem; }
.legal__intro { font-size: var(--text-lg); color: var(--ink); margin-bottom: 2.5rem; }
.legal h2 {
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl);
  color: var(--ink); margin: 2.25rem 0 .6rem; letter-spacing: -.005em;
}
.legal p { font-size: var(--text-md); }
.legal a { color: var(--ink); }
.legal strong { color: var(--ink); font-weight: 500; }
.legal__date { margin-top: 3rem; font-size: var(--text-xs); color: var(--stone-light); }
.legal__foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.5rem 0 2rem; font-size: var(--text-xs); color: var(--stone-light);
  border-top: 1px solid var(--line);
}
.legal__foot p { margin: 0; }
.legal__foot a { color: var(--stone); text-decoration: none; }
.legal__foot a:hover { color: var(--ink); }
