/* ==========================================================================
   Alain Bergeron — Design tokens
   Palette : encre nocturne / jade / bronze / sable chaud
   Le fil conducteur visuel (voir .thread) symbolise le pont entre
   médecine traditionnelle et innovation — repris de la thématique HAIM.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Work+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #0E1F33;
  --ink-soft: #1B2A3D;
  --jade: #3F7259;
  --jade-light: #6B9A80;
  --bronze: #B8905B;
  --bronze-light: #D6B383;
  --sand: #EFE6D3;
  --sand-light: #F7F2E7;
  --white: #FFFFFF;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 4px;
  --max-width: 1200px;
  --header-height: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--sand-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 500; }
h3 { font-size: 1.3rem; font-weight: 500; }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jade);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(14, 31, 51, 0.92);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link img {
  height: 40px;
  filter: brightness(0) invert(1);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2.2rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--sand-light);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--bronze-light);
  border-bottom-color: var(--bronze-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--sand-light);
  display: block;
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--ink);
    display: none;
    flex-direction: column;
    padding: 1rem 32px 2rem;
  }
  .main-nav.open { display: flex; }
  .main-nav ul {
    flex-direction: column;
    gap: 1.2rem;
  }
  .hamburger { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  padding-top: var(--header-height);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,31,51,0.35) 0%, rgba(14,31,51,0.55) 55%, rgba(14,31,51,0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--sand-light);
  max-width: 640px;
  padding: 0 32px 88px;
}

.hero-content h1 { color: var(--white); }

.hero-content p {
  font-size: 1.05rem;
  color: var(--sand);
  max-width: 520px;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--bronze-light);
  color: var(--sand-light);
  margin-top: 0.6rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover { background: var(--bronze-light); color: var(--ink); }

.btn.solid {
  background: var(--jade);
  border-color: var(--jade);
  color: var(--white);
}
.btn.solid:hover { background: var(--jade-light); color: var(--ink); }

/* ---------- Thread divider (signature element) ---------- */
.thread {
  position: relative;
  height: 64px;
  background: var(--sand-light);
}

.thread svg { width: 100%; height: 100%; display: block; }

/* ---------- Section cards (accueil) ---------- */
.sections-grid {
  background: var(--sand-light);
  padding: 40px 0 90px;
}

.grid-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 900px) {
  .grid-inner { grid-template-columns: 1fr; }
}

.section-card {
  background: var(--white);
  border: 1px solid rgba(14,31,51,0.08);
  display: flex;
  flex-direction: column;
}

.section-card .card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.section-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.section-card:hover .card-media img { transform: scale(1.05); }

.card-body {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }

.card-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--jade);
  border-bottom: 1px solid var(--jade);
  align-self: flex-start;
  padding-bottom: 2px;
}
.card-link:hover { color: var(--bronze); border-color: var(--bronze); }

/* ---------- Generic content page ---------- */
.page-hero {
  padding: calc(var(--header-height) + 64px) 0 48px;
  background: var(--ink);
  color: var(--sand-light);
}
.page-hero h1 { color: var(--white); }
.page-hero .eyebrow { color: var(--bronze-light); }

.page-content {
  padding: 64px 0 100px;
}

.content-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
}

.content-layout img {
  border: 1px solid rgba(14,31,51,0.08);
}

.content-layout .prose h2:first-child { margin-top: 0; }

.prose h2 { margin-top: 1.6em; }

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.info-list li {
  padding: 14px 0;
  border-bottom: 1px solid rgba(14,31,51,0.1);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}
.info-list span:first-child {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--jade);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Footer ---------- */
#site-footer {
  background: var(--ink);
  color: var(--sand);
  padding: 64px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(239,230,211,0.12);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-logo img {
  height: 34px;
  filter: brightness(0) invert(1);
  margin-bottom: 18px;
}

.social-icons {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

.social-icons a {
  width: 34px; height: 34px;
  border: 1px solid rgba(239,230,211,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.social-icons a:hover { border-color: var(--bronze-light); color: var(--bronze-light); }

.footer-address h3 {
  color: var(--bronze-light);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8em;
}

.footer-address p {
  font-size: 0.92rem;
  color: var(--sand);
}

.copyright {
  padding-top: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(239,230,211,0.5);
}
