/* Inès Nigon — Sophrologie / Hypnose — site statique, sans dépendance externe */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Italic.woff2") format("woff2");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/WorkSans.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/WorkSans-Italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

/* ---- Tokens: light (default) ---- */
:root {
  --bg: #f3f6f0;
  --surface: #e7eee2;
  --ink: #202823;
  --ink-soft: #4f5f4f;
  --accent: #5c8368;
  --accent-strong: #3d6249;
  --line: #d7e2cf;
  --overlay-top: rgba(10, 18, 12, 0);
  --overlay-bottom: rgba(10, 18, 12, 0.55);
  --hero-text: #f7faf4;
  --icon-sun-op: 1;
  --icon-moon-op: 0;
  --shadow: 0 18px 40px rgba(20, 36, 24, 0.16);
}

/* ---- Tokens: dark, system preference ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131a14;
    --surface: #1b241c;
    --ink: #e5ede2;
    --ink-soft: #a3b8a2;
    --accent: #86b28f;
    --accent-strong: #a8cead;
    --line: #2b3a2c;
    --overlay-top: rgba(6, 12, 7, 0);
    --overlay-bottom: rgba(6, 12, 7, 0.62);
    --hero-text: #f2f8ef;
    --icon-sun-op: 0;
    --icon-moon-op: 1;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
}

/* ---- Tokens: dark, explicit toggle ---- */
:root[data-theme="dark"] {
  --bg: #131a14;
  --surface: #1b241c;
  --ink: #e5ede2;
  --ink-soft: #a3b8a2;
  --accent: #86b28f;
  --accent-strong: #a8cead;
  --line: #2b3a2c;
  --overlay-top: rgba(6, 12, 7, 0);
  --overlay-bottom: rgba(6, 12, 7, 0.62);
  --hero-text: #f2f8ef;
  --icon-sun-op: 0;
  --icon-moon-op: 1;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  body, * { transition: none !important; scroll-behavior: auto !important; }
}

a { color: var(--accent-strong); text-decoration-color: var(--line); }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-strong);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---- Theme toggle ---- */
.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 20;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  backdrop-filter: blur(6px);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { transform: scale(1.06); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { position: absolute; }
.theme-toggle .icon-sun { opacity: var(--icon-sun-op); }
.theme-toggle .icon-moon { opacity: var(--icon-moon-op); }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 82vh;
  min-height: 82svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--overlay-top) 45%, var(--overlay-bottom) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  color: var(--hero-text);
  text-align: left;
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0 0 0.7rem;
  opacity: 0.92;
}
.hero h1 {
  font-variation-settings: "opsz" 72, "SOFT" 90, "WONK" 0;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  margin: 0 0 0.4rem;
  line-height: 1.05;
}
.hero .subtitle {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 300;
  margin: 0;
  opacity: 0.96;
}

/* ---- Main content ---- */
main { padding-top: 3.5rem; }

section { padding-bottom: 4rem; }

/* shared display type for section headings and the hero title */
.hero h1,
.intro h2,
.contact h2 {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 380;
}

.intro {
  display: grid;
  grid-template-columns: 1fr 15rem;
  gap: 2.2rem;
  align-items: stretch;
}
.intro .portrait {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.intro .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.intro .text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.intro h2,
.contact h2 {
  font-variation-settings: "opsz" 32, "SOFT" 80, "WONK" 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  color: var(--ink);
}
.intro h2 { margin: 0 0 0.9rem; }
.intro p { color: var(--ink-soft); margin: 0 0 1rem; }
.intro p:last-child { margin-bottom: 0; }
.intro .lead { color: var(--ink); font-size: 1.08rem; }

@media (max-width: 620px) {
  .intro {
    grid-template-columns: 1fr;
  }
  .intro .portrait { aspect-ratio: 1 / 1; width: 100%; }
}

/* ---- Contact ---- */
.contact {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 3.4rem 0;
}
.contact h2 { margin: 0 0 1.8rem; }
.info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
}
.info-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem 1.5rem;
}
.info-row dt {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding-top: 0.2rem;
}
.info-row dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}
.info-row dd a { color: inherit; }
.info-row .muted { opacity: 0.65; font-size: 0.92rem; }
.info-row .maps-link {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-left: 0.3rem;
}

@media (max-width: 520px) {
  .info-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* ---- Error page (404) ---- */
.error-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 5rem 0;
}
.error-page .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 0.8rem;
}
.error-page h1 {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 380;
  font-variation-settings: "opsz" 60, "SOFT" 90, "WONK" 0;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  margin: 0 0 1rem;
}
.error-page p { color: var(--ink-soft); font-size: 1.08rem; max-width: 32rem; }
.error-page .home-link {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
}
.error-page .home-link:hover { background: var(--accent); }

/* ---- Footer ---- */
footer.site-footer {
  padding: 2.4rem 0 3rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
footer.site-footer .credit { margin-top: 0.35rem; opacity: 0.75; font-size: 0.8rem; }
