/* ============ Design tokens ============ */
:root {
  /* ---- Palette (RGB channels, overridden per active theme via <style id="theme-vars">) ---- */
  --c-ink: 15 42 67;
  --c-ink-light: 24 58 92;
  --c-gold: 193 154 61;
  --c-gold-light: 217 188 111;
  --c-surface: 250 247 241;
  --c-surface-alt: 242 236 224;
  --c-white: 255 255 255;
  --c-muted: 91 107 122;

  /* ---- Semantic colours (derived from the palette, not themed directly) ---- */
  --ink: rgb(var(--c-ink));
  --ink-light: rgb(var(--c-ink-light));
  --gold: rgb(var(--c-gold));
  --gold-light: rgb(var(--c-gold-light));
  --ivory: rgb(var(--c-surface));
  --surface-alt: rgb(var(--c-surface-alt));
  --white: rgb(var(--c-white));
  --text-muted: rgb(var(--c-muted));

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --container-width: 1180px;
  --header-height: 88px;
}

/* ============ Page transitions ============ */
/* Native cross-document View Transition (Chrome/Edge 111+): a soft cross-fade
   between pages, no JS. Unsupported browsers just keep their normal navigation. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: ease;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
  body {
    animation: none !important;
  }
}

/* ============ Reset ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  /* Fallback fade-in on load for browsers without View Transitions support. */
  animation: page-fade-in 0.4s ease both;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}
p { margin: 0 0 1em; }

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

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--ink.section--tight { padding: 38px 0; }
.section--ink { background: var(--ink); color: var(--ivory); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--ivory); }
.section--ivory-alt { background: var(--surface-alt); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-head p { color: var(--text-muted); }
.section--ink .section-head p { color: rgb(var(--c-surface) / 0.75); }

.accent { color: var(--gold); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-light); }
.btn--outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn--outline:hover { background: var(--gold); color: var(--ink); }
.btn--outline-light { border-color: rgb(var(--c-surface) / 0.5); color: var(--ivory); background: transparent; }
.btn--outline-light:hover { border-color: var(--gold); color: var(--gold); }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(var(--c-ink) / 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(var(--c-gold) / 0.25);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.site-header__brand { display: flex; align-items: center; gap: 14px; color: var(--ivory); }
.site-header__brand img { height: 32px; width: auto; }
.site-header__brand-name { font-family: var(--font-serif); font-size: 1.4rem; line-height: 1; }
.site-header__brand-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: 14px;
  border-left: 1px solid rgb(var(--c-gold) / 0.4);
}

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav ul { display: flex; gap: 30px; }
.site-nav a {
  color: rgb(var(--c-surface) / 0.85);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--gold); }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ============ Hero slider ============ */
.hero-slider {
  position: relative;
  height: 92vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease;
  display: flex;
  align-items: center;
}
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(var(--c-ink) / 0.25) 0%, rgb(var(--c-ink) / 0.5) 100%);
}
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
  color: var(--ivory);
}
.hero-slide__overline {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
}
.hero-slide__title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--ivory);
  margin-bottom: 34px;
}
.hero-slide__title-accent { color: var(--gold); display: block; }

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgb(var(--c-surface) / 0.4);
  background: rgb(var(--c-ink) / 0.35);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.hero-nav:hover { border-color: var(--gold); color: var(--gold); }
.hero-nav--prev { left: 28px; }
.hero-nav--next { right: 28px; }

.hero-dots {
  position: absolute;
  bottom: 32px;
  left: 0; right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.hero-dot.is-active { background: var(--gold); }

/* ============ Key figures banner ============ */
.key-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  text-align: center;
}
.key-figures__value {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--gold);
  margin-bottom: 6px;
}
.key-figures__label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgb(var(--c-surface) / 0.75);
}
.section:not(.section--ink) .key-figures__label { color: var(--text-muted); }

/* ============ Domaine cards ============ */
.domaine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.domaine-card {
  background: var(--white);
  border: 1px solid rgb(var(--c-ink) / 0.08);
  border-radius: 10px;
  padding: 40px 32px;
  box-shadow: 0 2px 10px rgb(var(--c-ink) / 0.05);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.domaine-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgb(var(--c-ink) / 0.1);
}
.domaine-card h3 { font-size: 1.3rem; margin-bottom: 14px; }
.domaine-card p { color: var(--text-muted); margin-bottom: 20px; }
.domaine-card__services {
  margin: 0 0 24px;
  padding: 0;
}
.domaine-card__services li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--ink);
}
.domaine-card__services li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 1px;
  background: var(--gold);
}
.domaine-card__link { color: var(--gold); font-weight: 600; font-size: 0.9rem; }
.domaine-card__link:hover { text-decoration: underline; }

/* ============ Founder section ============ */
.founder {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: center;
}
.founder__photo {
  background: var(--white);
  border: 1px solid rgb(var(--c-gold) / 0.4);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgb(var(--c-ink) / 0.08);
  padding: 14px;
}
.founder__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.founder blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding-left: 24px;
  margin: 28px 0;
}
.founder__signature { height: 60px; width: auto; margin-top: 8px; }
.founder__name { font-weight: 700; }
.founder__role { color: var(--text-muted); font-size: 0.9rem; }

/* ============ Marquee carousels (collaborateurs / partenaires) ============ */
.marquee { overflow: hidden; position: relative; }
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.collab-card {
  width: 240px;
  margin-right: 28px;
  flex: 0 0 auto;
  text-align: center;
}
.collab-card__photo {
  background: var(--white);
  border: 1px solid rgb(var(--c-ink) / 0.08);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgb(var(--c-ink) / 0.08);
  padding: 10px;
  margin-bottom: 16px;
}
.collab-card__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}
.collab-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.collab-card__role { color: var(--gold); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.collab-card__bio { color: var(--text-muted); font-size: 0.88rem; margin-top: 10px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}
.team-grid .collab-card { width: auto; margin-right: 0; text-align: left; }

.partner-logos__track { align-items: center; }
.partner-logo {
  flex: 0 0 auto;
  margin-right: 56px;
  display: flex;
  align-items: center;
  height: 52px;
}
.partner-logo img { height: 52px; width: auto; filter: grayscale(1) opacity(0.7); transition: filter 0.25s ease; }
.partner-logo:hover img { filter: grayscale(0) opacity(1); }

/* Static fallback grid used when prefers-reduced-motion: reduce */
.marquee--static .marquee__track {
  animation: none;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
}
.marquee--static .marquee__track > :nth-child(n+1) { margin-right: 28px; margin-bottom: 28px; }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none !important; flex-wrap: wrap; width: 100%; justify-content: center; }
  .hero-slide { transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Contact form ============ */
.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
}
.contact-form {
  background: var(--white);
  padding: 44px;
  border: 1px solid rgb(var(--c-ink) / 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(var(--c-ink) / 0.06);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgb(var(--c-ink) / 0.18);
  background: var(--ivory);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border-radius: 2px;
}
.form-control:focus { outline: none; border-color: var(--gold); }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-error { color: #b3432b; font-size: 0.8rem; margin-top: 6px; }
.form-alert-success {
  background: #eaf3ec;
  border: 1px solid #4a8f63;
  color: #2c5e3d;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.92rem;
}

/* Honeypot: hidden from sighted users and keyboard tab order, but present for bots that
   fill every field blindly. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-info { padding: 8px 0; }
.contact-info__item { margin-bottom: 28px; }
.contact-info__label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 6px; }
.contact-info__value { font-size: 1rem; }

/* ============ Approach steps / cabinet page ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* ============ Footer ============ */
.site-footer { background: var(--ink); color: rgb(var(--c-surface) / 0.85); padding-top: 80px; }
.site-footer h4 { color: var(--ivory); font-size: 1rem; margin-bottom: 20px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgb(var(--c-surface) / 0.12);
}
.footer-grid p { color: rgb(var(--c-surface) / 0.65); font-size: 0.92rem; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom {
  padding: 24px 0;
  font-size: 0.8rem;
  color: rgb(var(--c-surface) / 0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .founder { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 780px) {
  .site-nav > ul { display: none; }
  .site-nav .btn { display: none; }
  .nav-toggle { display: block; }
  .site-nav.is-open > ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--ink);
    padding: 12px 24px 24px;
    border-bottom: 1px solid rgb(var(--c-gold) / 0.25);
  }
  .site-nav.is-open > ul a { display: block; padding: 12px 0; }
  .site-nav.is-open .btn {
    display: inline-flex;
    margin: 12px 24px 20px;
  }
  .form-row { grid-template-columns: 1fr; }
  .hero-nav { width: 42px; height: 42px; }
  .hero-nav--prev { left: 12px; }
  .hero-nav--next { right: 12px; }
  .section { padding: 64px 0; }
}
