:root {
  --bg: #0b0b0a;
  --bg-panel: #141311;
  --fg: #f3ede4;
  --fg-muted: rgba(243, 237, 228, 0.62);
  --fg-faint: rgba(243, 237, 228, 0.38);
  --accent: #c6a35e;
  --line: rgba(243, 237, 228, 0.14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  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(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.2em;
}

/* La signature du hero porte le nom : elle merite plus de presence que
   les eyebrows de section. */
.hero .kicker {
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  letter-spacing: 0.26em;
  margin-bottom: 1.4em;
}

/* ---- Nav ------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3.5rem);
  transition: background-color 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(11, 11, 10, 0.86);
  backdrop-filter: blur(10px);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  border-color: var(--line);
}

.nav__brand {
  flex: none;
  z-index: 2;
}

.nav__brand img {
  height: clamp(52px, 5.6vw, 76px);
  width: auto;
  transition: height 0.4s ease;
}

.nav.is-scrolled .nav__brand img { height: clamp(42px, 4.2vw, 56px); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.6rem);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav__links a {
  position: relative;
  color: var(--fg-muted);
  white-space: nowrap;
  padding-bottom: 0.25em;
  transition: color 0.2s ease;
}

/* Soulignement fin qui se deploie depuis la gauche. */
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { transform: scaleX(1); }

/* ---- Bouton burger (mobile) ------------------------------------------- */

.nav__toggle {
  display: none;
  flex: none;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
}

.nav__toggle span {
  display: block;
  height: 1px;
  width: 26px;
  background: var(--fg);
  transition: transform 0.35s ease, opacity 0.25s ease, width 0.35s ease;
}

.nav__toggle span:nth-child(2) { width: 18px; }

.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { width: 26px; transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-top: clamp(5.5rem, 14vh, 8rem);
  background-size: cover;
  background-position: center 22%;
}

/* Voile degrade : separe du background-image pour rester ajustable par
   media query (le fond, lui, vient de la base via un style inline). */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 6, 5, 0.35) 0%,
    rgba(6, 6, 5, 0.35) 40%,
    rgba(6, 6, 5, 0.94) 92%
  );
}

.hero__content {
  position: relative;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem) clamp(4.5rem, 10vh, 7rem);
  max-width: 46rem;
  /* Le verbatim passe sur des zones claires de la photo (fenetre) :
     une ombre diffuse le detache sans avoir a assombrir l'image. */
  text-shadow: 0 1px 28px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Sur grand ecran, le verbatim est centre : la photo occupe toute la
   largeur, un bloc calé à gauche deséquilibrerait la composition. */
@media (min-width: 761px) {
  .hero__content {
    margin-inline: auto;
    max-width: 52rem;
    text-align: center;
  }
}

.hero__verbatim {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.2vw, 2rem);
  line-height: 1.4;
  color: var(--fg);
}

.hero__verbatim p { margin-bottom: 0.85em; }
.hero__verbatim p:last-child { margin-bottom: 0; }

@media (max-height: 640px) {
  .hero__verbatim { font-size: clamp(1rem, 2vw, 1.3rem); line-height: 1.35; }
  .hero__verbatim p { margin-bottom: 0.6em; }
}

.hero__cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero__cue span {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, transparent, var(--accent));
  animation: cue 2.2s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.6); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---- Feature sections --------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 88vh;
  border-top: 1px solid var(--line);
}

.feature--flip { direction: rtl; }
.feature--flip > * { direction: ltr; }

.feature__media {
  background-size: cover;
  background-position: center;
  min-height: 22rem;
  position: relative;
}

.feature__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,10,0.05), rgba(11,11,10,0.35));
}

.feature__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 5.5rem);
  background: var(--bg-panel);
}

.feature__body h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.feature__text {
  color: var(--fg-muted);
  font-size: 1.02rem;
  max-width: 34rem;
}

.taglist { margin-top: 1.6rem; }

.taglist__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 0 0 0.6em;
}

.taglist__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.taglist__items li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35em 0.95em;
  font-size: 0.82rem;
  color: var(--fg);
}

.taglist--center .taglist__items { justify-content: center; }

/* ---- Contact ------------------------------------------------------------ */

.contact {
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 6vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  max-width: 68rem;
  margin: 0 auto;
}

.contact__figure { margin: 0; }

.contact__figure img {
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.05);
}

.contact__content h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }

.contact__text {
  color: var(--fg-muted);
  font-size: 1.05rem;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.btn {
  display: inline-block;
  padding: 0.9em 1.9em;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn--accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--accent:hover { background: var(--accent); color: #0b0b0a; }

.btn--ghost:hover { border-color: var(--fg); }

/* ---- Footer -------------------------------------------------------------- */

.footer {
  padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem) 3rem;
  text-align: center;
  color: var(--fg-faint);
  font-size: 0.8rem;
}

.footer__brand {
  width: min(80%, 22rem);
  height: auto;
  margin: 0 auto 1.4rem;
  opacity: 0.75;
}

/* ---- Reveal on scroll ----------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; min-height: 0; }
  .feature__media { min-height: 16rem; }
  .feature--flip { direction: ltr; }
  .contact__inner { grid-template-columns: 1fr; }
  .contact__figure img { max-height: 60vh; object-fit: cover; object-position: center top; }
}

/* ---- Hero sur petit ecran ---------------------------------------------
   En portrait, une photo paysage se recadre beaucoup : on raccourcit le
   bloc pour supprimer le vide au-dessus du texte, on remonte le cadrage
   sur le visage, et on assombrit davantage le bas pour que le verbatim
   reste lisible. */

@media (max-width: 760px) {
  .hero {
    /* Plein ecran exact : a l'arrivee, aucune bande de la section suivante
       ne doit apparaitre. dvh suit la barre d'outils mobile ; vh sert de
       repli pour les navigateurs qui ne connaissent pas dvh. */
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 5.5rem;
    background-position: center 12%;
  }

  .hero__scrim {
    background: linear-gradient(
      180deg,
      rgba(6, 6, 5, 0.30) 0%,
      rgba(6, 6, 5, 0.42) 28%,
      rgba(6, 6, 5, 0.88) 52%,
      rgba(6, 6, 5, 0.97) 100%
    );
  }

  .hero__content { padding-bottom: 2.75rem; }

  .hero__verbatim {
    font-size: clamp(1.05rem, 4.4vw, 1.35rem);
    line-height: 1.45;
  }

  .hero__cue { display: none; }
}

/* ---- Navigation mobile : panneau plein ecran --------------------------- */

@media (max-width: 960px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 6rem clamp(1.5rem, 8vw, 4rem) 4rem;
    background: rgba(8, 8, 7, 0.97);
    backdrop-filter: blur(14px);
    text-transform: none;
    letter-spacing: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

  .nav__links.is-open { opacity: 1; visibility: visible; }

  .nav__links a {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    color: var(--fg);
    padding: 0.55em 0;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }

  .nav__links a::after { display: none; }
  .nav__links a:last-child { border-bottom: 0; }

  .nav__links.is-open a { opacity: 1; transform: none; }

  /* Apparition en cascade, sans depasser 6 entrees. */
  .nav__links.is-open a:nth-child(1) { transition-delay: 0.08s; }
  .nav__links.is-open a:nth-child(2) { transition-delay: 0.14s; }
  .nav__links.is-open a:nth-child(3) { transition-delay: 0.20s; }
  .nav__links.is-open a:nth-child(4) { transition-delay: 0.26s; }
  .nav__links.is-open a:nth-child(n+5) { transition-delay: 0.32s; }

  body.nav-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .nav__links a,
  .nav__links.is-open a { transition: none; transform: none; }
  .nav__links a::after { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__cue span { animation: none; }
}
