/* ==========================================================================
   FFO – Friends & Family Office · maquette one page
   Feuille de style écrite à la main, sans dépendance.
   Sommaire : 1 Variables · 2 Base · 3 Composants · 4 Header · 5 Sections
              6 Footer · 7 Animations · 8 Responsive
   ========================================================================== */

/* 1. Variables ------------------------------------------------------------ */
:root {
  --blue: #1E4664;          /* fonds sombres, titres, boutons, footer */
  --blue-deep: #16364D;
  --white: #FFFFFF;
  --grey: #F6F7F9;          /* fond de section très clair */
  --beige: #F7F2EC;         /* fonds de blocs */
  --accent: #B08D6A;        /* filets, icônes, petits détails */
  --accent-ink: #7F6040;    /* accent lisible en texte sur fond clair (AA) */
  --accent-light: #D9BE9E;  /* accent lisible en texte sur fond bleu (AA) */
  --text: #33414E;
  --muted: #55626F;

  --font-title: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, "Times New Roman", serif;
  --font-text: "Raleway", "Helvetica Neue", Arial, sans-serif;

  --header-h: 96px;
  --gutter: clamp(20px, 5vw, 48px);
  --space-section: clamp(88px, 12vw, 160px);
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) - 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure, blockquote, address { margin: 0; padding: 0; font-style: normal; }
ul { list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: -100px; left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--white);
  color: var(--blue);
  font-size: .9rem;
  font-weight: 400;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }
.skip-link--2:focus { top: 64px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--medium { max-width: 960px; }
.container--narrow { max-width: 820px; }

/* 3. Composants ----------------------------------------------------------- */
.eyebrow {
  margin-bottom: 20px;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .24em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow--light { color: var(--accent-light); }

.title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: .005em;
  color: var(--blue);
  margin-bottom: 28px;
}
.title--center { text-align: center; }
.title--light { color: var(--white); }

.rule {
  display: block;
  width: 56px;
  height: 1px;
  margin: 0 auto;
  background: var(--accent);
}
.rule--light { background: var(--accent-light); }

.section { padding-block: var(--space-section); }

.section-head { text-align: center; margin-bottom: clamp(48px, 6vw, 72px); }
.section-head .title { margin-bottom: 16px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head__lead {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--muted);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 15px 30px;
  border: 1px solid var(--blue);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .16em;
  line-height: 1.3;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--blue);
  background: transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover { background: var(--blue); color: var(--white); }
.btn--light { border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--blue); }

/* Flèche dessinée en CSS */
.arrow {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
  transition: transform .35s var(--ease);
}
.arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  transform-origin: 100% 0;
}
a:hover > .arrow, a:focus-visible > .arrow { transform: translateX(5px); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .85rem;
  letter-spacing: .06em;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* 4. Header --------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled,
.site-header.is-open {
  background: var(--blue);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* Le logo (fond #1E4664) se fond dans le header bleu : on le garde tel quel. */
.site-header__logo {
  display: block;
  height: var(--header-h);
  overflow: hidden; /* rogne la marge bleue du logo, sans le modifier */
}
.site-header__logo img { height: calc(var(--header-h) * 1.75); width: auto; max-width: none; margin-top: calc(var(--header-h) * -.385); }

.nav__list { display: flex; gap: clamp(28px, 4vw, 56px); }
.nav a {
  position: relative;
  padding-block: 8px;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a.is-active::after { transform: scaleX(1); }

/* Burger (masqué sur desktop) */
.burger {
  display: none;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--white);
  position: relative;
}
.burger__bar {
  position: absolute;
  left: 12px; right: 12px;
  height: 1px;
  background: currentColor;
  transition: transform .35s var(--ease), opacity .2s;
}
.burger__bar:nth-child(1) { top: 17px; }
.burger__bar:nth-child(2) { top: 24px; }
.burger__bar:nth-child(3) { top: 31px; }
.burger[aria-expanded="true"] .burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 5. Sections ------------------------------------------------------------- */

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
}
.hero__bg, .quote__bg, .contact__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* Bande pleine #1E4664 en haut : le logo se fond dans le header transparent. */
  background:
    linear-gradient(180deg, var(--blue) 0, var(--blue) var(--header-h), rgba(30, 70, 100, 0) calc(var(--header-h) + 140px)),
    linear-gradient(90deg, rgba(30, 70, 100, .86) 0%, rgba(30, 70, 100, .5) 55%, rgba(30, 70, 100, .2) 100%);
}
.hero__content { position: relative; z-index: 3; }
.hero__title {
  max-width: 14ch;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.2vw, 5.25rem);
  line-height: 1.12;
  letter-spacing: .002em;
}

.scroll-cue {
  z-index: 3;
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}
.scroll-cue__line {
  position: relative;
  width: 1px; height: 72px;
  background: rgba(255, 255, 255, .3);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 22px;
  background: var(--accent-light);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(-22px); } 100% { transform: translateY(72px); } }

/* Canvas WebGL (hero et voiles de révélation) */
.gl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Introduction */
.intro { text-align: center; padding-block: clamp(110px, 15vw, 200px) clamp(150px, 18vw, 240px); }
.intro__text {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.65;
  color: var(--blue);
}

/* Approche : carte beige qui chevauche l'image */
.approach { padding-bottom: var(--space-section); margin-top: calc(-1 * clamp(40px, 6vw, 80px)); }
.approach__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  max-width: 1320px;
}
.approach__card {
  position: relative;
  z-index: 2;
  grid-column: 1 / 8;
  grid-row: 1;
  padding: clamp(40px, 5.5vw, 80px);
  background: var(--beige);
}
.approach__card p + p { margin-top: 1em; }
.approach__media {
  grid-column: 6 / 13;
  grid-row: 1;
  align-self: stretch;
  min-height: 520px;
  margin-block: clamp(-48px, -3vw, -24px);
}
.approach__media { position: relative; overflow: hidden; }
.approach__media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }

/* Solutions */
.solutions { background: var(--white); }
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
.card {
  position: relative;
  display: flex;
  min-height: 340px;
  overflow: hidden;
  color: var(--white);
  background: var(--blue-deep);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover, .card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -22px rgba(22, 54, 77, .55);
}
.card__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.card:hover .card__bg { transform: scale(1.05); }
.card::after {
  /* voile bleu pour garantir la lisibilité du texte blanc */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 54, 77, .35) 0%, rgba(22, 54, 77, .88) 100%);
}
.card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  padding: clamp(32px, 4vw, 52px);
  font-size: 1.05rem;
  line-height: 1.75;
}
.card__title {
  margin-bottom: 14px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.25;
}
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
  align-self: flex-start;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
}
.card__link::before { content: none; }
.card__link:focus-visible { outline-color: var(--white); }

/* Citation */
.quote {
  position: relative;
  padding-block: clamp(110px, 14vw, 190px);
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
}
.quote__veil { position: absolute; inset: 0; background: rgba(30, 70, 100, .6); }
.quote .container { position: relative; }
.quote .container--narrow { max-width: 1040px; }
.quote__text p {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.35;
  text-align: center;
}

/* Pourquoi FFO */
.why { background: var(--grey); }
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.pillar { text-align: center; }
.pillar__icon {
  width: 48px; height: 48px;
  margin: 0 auto 22px;
  color: var(--accent);
}
.pillar__icon circle { fill: var(--grey); }
.pillar__title {
  margin-bottom: 10px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--blue);
}
.pillar p { font-size: .98rem; line-height: 1.7; color: var(--muted); }

/* Équipe */
.team__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.member {
  padding: 0 0 clamp(28px, 3.5vw, 44px);
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(30, 70, 100, .14);
  overflow: hidden;
}
.member__portrait {
  position: relative;
  aspect-ratio: 4 / 4.2;
  margin: 0 0 clamp(24px, 3vw, 36px);
  overflow: hidden;
  background: var(--blue);
}
.member__portrait img { width: 100%; height: 100%; object-fit: cover; }
.member__name, .member__role, .member__bio { padding-inline: clamp(24px, 3vw, 44px); }
.member__name {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--blue);
}
.member__role {
  margin: 8px 0 18px;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.member__bio { font-size: .98rem; line-height: 1.75; color: var(--muted); }

/* Contact */
.contact {
  position: relative;
  padding-block: var(--space-section);
  background: var(--blue);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}
.contact__veil { position: absolute; inset: 0; background: rgba(30, 70, 100, .9); }
.contact__content { position: relative; }
.contact__details {
  display: grid;
  gap: 24px;
  margin: 44px 0 20px;
  font-size: 1.05rem;
}
.contact__details a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); transition: border-color .3s; }
.contact__details a:hover { border-color: var(--accent-light); }
.contact a:focus-visible { outline-color: var(--white); }

/* 6. Footer --------------------------------------------------------------- */
.site-footer { background: var(--blue); color: rgba(255, 255, 255, .88); font-size: .9rem; }
.site-footer a { text-decoration: none; }
.site-footer a:focus-visible, .site-footer .link-button:focus-visible { outline-color: var(--white); }
.site-footer__grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding-block: 48px 36px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.site-footer__logo img { width: 120px; height: auto; }
.site-footer__nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 40px; }
.site-footer__nav a { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; }
.site-footer__nav a:hover { color: var(--accent-light); }
.site-footer__address { text-align: right; line-height: 1.7; }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding-block: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .82rem;
}

.legal { background: var(--blue-deep); overflow: hidden; }
.legal[hidden] { display: none; }
.legal__inner { padding-block: clamp(56px, 7vw, 96px); font-size: .95rem; line-height: 1.8; color: rgba(255, 255, 255, .86); }
.legal__title { margin-bottom: 8px; font-family: var(--font-title); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.2; color: var(--white); }
.legal__date { margin-bottom: 32px; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-light); }
.legal h3 { margin: 40px 0 14px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .14); font-family: var(--font-title); font-weight: 400; font-size: 1.3rem; line-height: 1.3; color: var(--white); }
.legal p { margin-bottom: 14px; }
.legal__block { padding-left: 20px; border-left: 1px solid var(--accent); }
.legal ul { margin: 0 0 14px; padding-left: 22px; list-style: none; }
.legal li { position: relative; margin-bottom: 6px; }
.legal li::before { content: ""; position: absolute; left: -16px; top: .85em; width: 8px; height: 1px; background: var(--accent-light); }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal a:focus-visible { outline-color: var(--white); }

/* Mots découpés par animations.js */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .16em; margin-bottom: -.16em; }
.wi, .sw { display: inline-block; }
.wi { will-change: transform; }

/* GSAP actif : la citation devient une scène plein écran épinglée */
.has-gsap .quote { display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding-block: 0; }
.js.has-gsap .reveal { transition: none; }
.js.has-gsap .card.reveal.is-visible { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.has-gsap .card__bg { will-change: transform; }

/* 7. Animations d'apparition (actives seulement avec JS) ------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2), .js .pillars .reveal:nth-child(2), .js .team__grid .reveal:nth-child(2) { transition-delay: .1s; }
.js .cards .reveal:nth-child(3), .js .pillars .reveal:nth-child(3) { transition-delay: .2s; }
.js .cards .reveal:nth-child(4), .js .pillars .reveal:nth-child(4) { transition-delay: .3s; }
/* Les cartes gardent leur survol : on retire le décalage une fois affichées */
.js .card.reveal.is-visible { transition: opacity .9s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 8. Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); row-gap: 56px; }
  .approach__card { grid-column: 1 / 10; }
  .approach__media { grid-column: 5 / 13; }
}

@media (max-width: 820px) {
  :root { --header-h: 80px; }

  .burger { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    max-height: calc(100vh - var(--header-h));
    padding: 12px var(--gutter) 40px;
    background: var(--blue);
    border-top: 1px solid rgba(255, 255, 255, .12);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .site-header.is-open .nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav li + li { border-top: 1px solid rgba(255, 255, 255, .1); }
  .nav a { display: block; padding: 22px 0; font-size: .85rem; }
  .nav a::after { display: none; }

  .approach { margin-top: 0; }
  .approach__grid { display: flex; flex-direction: column; padding-inline: 0; }
  .approach__media { order: 1; min-height: 0; height: 340px; margin: 0; }
  .approach__card { order: 2; margin-inline: var(--gutter); margin-top: -64px; padding: 36px 28px 40px; }

  .team__grid { grid-template-columns: 1fr; }

  .site-footer__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 28px; }
  .site-footer__address { text-align: center; }
  .site-footer__bottom { justify-content: center; text-align: center; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 320px; }
  .pillars { grid-template-columns: 1fr; row-gap: 44px; }
  .hero {
    min-height: 0;
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 96px);
    padding-bottom: 170px;
  }
  .hero__title { max-width: 12ch; }
  .scroll-cue { bottom: 18px; }
  .btn { width: 100%; justify-content: space-between; }
}
