/* ═══════════════════════════════════════════════════════════════
   LUMYN — feuille de style principale
   Palette : indigo profond + papier chaud + amber « halo »
   Type    : Familjen Grotesk (display) / Instrument Sans (texte)
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Encres ─────────────────────────────────────────────── */
  --ink:        #16173A;   /* indigo profond — fonds sombres, texte */
  --brand:      #282859;   /* indigo du logo */
  --ink-70:     rgba(22, 23, 58, 0.70);
  --ink-55:     rgba(22, 23, 58, 0.55);
  --ink-14:     rgba(22, 23, 58, 0.14);
  --ink-08:     rgba(22, 23, 58, 0.08);

  /* ── Neutres chauds (biais 48° contre l'indigo froid) ───── */
  --paper:      #F5F4EF;
  --paper-2:    #ECE9DF;
  --white:      #FFFFFF;

  /* ── Accents pastel ─────────────────────────────────────── */
  --halo:       #FFD37A;   /* l'accent — Lumyn, la lumière */
  --halo-soft:  #FFEBC4;
  --lilac:      #D2CAF2;
  --seafoam:    #A8E2D5;
  --mist:       #9FB3E0;   /* l'indigo de marque, éclairci */

  /* ── Typo ───────────────────────────────────────────────── */
  --display: 'Familjen Grotesk', 'Helvetica Neue', Helvetica, sans-serif;
  --body:    'Instrument Sans', system-ui, -apple-system, sans-serif;

  /* ── Mesures ────────────────────────────────────────────── */
  --pad-x:  clamp(20px, 5vw, 64px);
  --maxw:   80rem;
  --r:      28px;   /* rayon des blocs */
  --r-pill: 100px;
  --seam-h: 4.6rem; /* demi-hauteur du chevauchement */
  --nav-h:  76px;
}

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

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

::selection { background: var(--halo); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ═══ Échelle typographique ═══════════════════════════════════ */

.display-xl,
.display-l,
.display-m {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.015em;
  text-wrap: balance;
}

.display-xl { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 1.02; }
.display-l  { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; }
.display-m  { font-size: clamp(1.55rem, 2.4vw, 2.05rem); line-height: 1.12; letter-spacing: 0.005em; }

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-70);
  max-width: 46ch;
}

.body-text {
  font-size: 0.97rem;
  line-height: 1.72;
  color: var(--ink-70);
  max-width: 62ch;
}

.on-dark .display-xl,
.on-dark .display-l,
.on-dark .display-m { color: var(--paper); }

.on-dark .lead,
.on-dark .body-text { color: rgba(245, 244, 239, 0.72); }

/* ── Puce ronde (jamais de tiret) ───────────────────────────── */
.dot-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.dot-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--ink-70);
}

.dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.on-dark .dot-list li { color: rgba(245, 244, 239, 0.72); }
.on-dark .dot-list li::before { background: var(--halo); }

/* ═══ Chip / sur-titre ════════════════════════════════════════ */
.chip {
  display: inline-block;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--white);
  border: 1px solid var(--ink-14);
  padding: 7px 18px;
  border-radius: var(--r-pill);
}

.chip--halo  { background: var(--halo); border-color: transparent; color: var(--ink); }
.chip--ghost { background: transparent; }

.on-dark .chip {
  color: var(--paper);
  background: rgba(245, 244, 239, 0.08);
  border-color: rgba(245, 244, 239, 0.22);
}

/* ═══ Boutons ═════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.22s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: transparent; color: var(--ink); border-color: var(--ink); }

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

.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: transparent; color: var(--paper); border-color: var(--paper); }

.btn--ghost { border-color: var(--ink-14); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--white); }

/* Flèche encerclée — l'affordance de lien du site */
.arrow-circle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.25s ease, transform 0.25s ease;
}

.arrow-circle::before { content: "↗"; display: block; transform: translateY(-1px); }

.arrow-circle--halo  { background: var(--halo); color: var(--ink); }
.arrow-circle--light { background: var(--paper); color: var(--ink); }

/* Lien texte souligné à l'animation */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.link-arrow span:first-child {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease;
  padding-bottom: 2px;
}

.link-arrow:hover span:first-child { background-size: 100% 1px; }
.link-arrow:hover .arrow-circle { transform: translate(2px, -2px); }

.on-dark .link-arrow { color: var(--paper); }

/* ═══ Panneaux & coutures ═════════════════════════════════════
   Chaque section est un panneau plein cadre. Deux panneaux
   voisins se rejoignent par une languette arrondie (« seam »)
   qui chevauche la limite — le page se lit comme un empilement
   de plaques plutôt qu'une suite de bandes.
   ═════════════════════════════════════════════════════════════ */

.panel {
  position: relative;
  background: var(--bg-self, var(--paper));
  padding: clamp(72px, 9vw, 132px) var(--pad-x);
}

.panel > * { position: relative; z-index: 1; }

.panel--seam { padding-top: clamp(96px, 11vw, 168px); }

.panel--seam::before,
.panel--seam::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: calc(var(--seam-h) * -1);
  left: 0;
  width: 100%;
  height: calc(var(--seam-h) * 2);
}

/* Dessous : la couleur du panneau précédent occupe toute la bande */
.panel--seam::before { background: var(--bg-prev); }

/* Dessus : la couleur du panneau, découpée par la vague.
   Le tracé est une ondulation dissymétrique — creux large à
   gauche, crête tardive à droite — pour éviter l'effet « feston »
   d'une courbe trop régulière. */
.panel--seam::after {
  background: var(--bg-self);
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,58 C150,14 292,4 468,32 C602,53 690,106 858,104 C994,102 1108,66 1200,30 L1200,120 L0,120 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--wave);
          mask-image: var(--wave);
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}

/* La même vague retournée : deux coutures voisines ne se
   ressemblent jamais. */
.panel--seam-right::after { transform: scaleX(-1); }

/* Fonds de panneaux */
.panel--paper   { --bg-self: var(--paper); }
.panel--paper2  { --bg-self: var(--paper-2); }
.panel--white   { --bg-self: var(--white); }
.panel--lilac   { --bg-self: var(--lilac); }
.panel--seafoam { --bg-self: var(--seafoam); }
.panel--ink     { --bg-self: var(--ink); }
.panel--halo    { --bg-self: var(--halo-soft); }

.container { max-width: var(--maxw); margin: 0 auto; }
.container--narrow { max-width: 56rem; }

/* ── État « en cours de construction » ───────────────────────── */
.soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 56px) 0;
}

.soon .lead { max-width: 52ch; }

.soon__badge {
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  line-height: 1;
}

/* En-tête de section : chip + titre + intro */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: clamp(40px, 5vw, 68px);
}

.section-head .lead { margin-top: 2px; }

/* Variante centrée : pour les sections « manifeste » */
.section-head--center {
  align-items: center;
  text-align: center;
  max-width: 62rem;
  margin-left: auto;
  margin-right: auto;
}

.section-head--center .lead { max-width: 58ch; }
.section-head--center h2 em { font-style: italic; }

.section-head--split {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  flex-wrap: wrap;
}

.section-head--split > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* ═══ Navigation ══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  gap: 32px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav--stuck {
  background: rgba(245, 244, 239, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--ink-08);
}

.nav__logo { flex-shrink: 0; display: flex; align-items: center; }
.nav__logo img { height: 26px; width: auto; transition: filter 0.3s ease; }

/* Pages dont le hero est sombre : la nav s'éclaircit tant qu'on est
   en haut de page, puis reprend son fond papier au défilement. */
.nav--over-dark:not(.nav--stuck) .nav__logo img { filter: brightness(0) invert(1); }

.nav--over-dark:not(.nav--stuck) .nav__link { color: rgba(245, 244, 239, 0.7); }
.nav--over-dark:not(.nav--stuck) .nav__link:hover { color: var(--paper); }
.nav--over-dark:not(.nav--stuck) .nav__link::after { background: var(--paper); }
.nav--over-dark:not(.nav--stuck) .nav__link--active { color: var(--paper); }
.nav--over-dark:not(.nav--stuck) .nav__link--active::after { background: var(--halo); }

.nav--over-dark:not(.nav--stuck) .nav__burger {
  background: transparent;
  border-color: rgba(245, 244, 239, 0.32);
  color: var(--paper);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav__link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-70);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--brand);
  transition: width 0.25s ease;
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { width: 100%; }

.nav__link--active { color: var(--ink); font-weight: 600; }
.nav__link--active::after { width: 100%; background: var(--halo); height: 3px; bottom: -1px; }

.nav__cta {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: var(--halo);
  padding: 10px 22px;
  border-radius: var(--r-pill);
  transition: background 0.22s ease, color 0.22s ease;
}

.nav__cta:hover { background: var(--ink); color: var(--halo); }

.nav__burger {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--ink-14);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}

/* Overlay mobile */
.nav__overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 20px var(--pad-x) 48px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav__overlay--open { opacity: 1; visibility: visible; pointer-events: auto; }

.nav__overlay-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav__close {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid rgba(245, 244, 239, 0.28);
  border-radius: 50%;
  color: var(--paper);
  font-size: 1rem;
  cursor: pointer;
}

.nav__overlay-links {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  margin-bottom: auto;
}

.nav__overlay-link {
  font-family: var(--display);
  font-size: clamp(2rem, 11vw, 3rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid rgba(245, 244, 239, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__overlay-link .arrow-circle { width: 30px; height: 30px; font-size: 0.75rem; }

.nav__overlay-contact {
  align-self: flex-start;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--halo);
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--r-pill);
}

/* ═══ Hero de page intérieure (offres / réalisations / profil) ═ */
.page-hero {
  --bg-self: var(--ink);
  background: var(--bg-self);
  padding: calc(var(--nav-h) + clamp(56px, 8vw, 104px)) var(--pad-x) clamp(88px, 10vw, 140px);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -30%;
  width: 52vw;
  height: 52vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
              rgba(255, 211, 122, 0.30) 0%,
              rgba(255, 211, 122, 0.10) 42%,
              transparent 70%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.page-hero__inner .lead { max-width: 44ch; }

/* ═══ Bandeau d'appel (CTA) ═══════════════════════════════════ */
.cta-band__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}

.cta-band__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.cta-band__right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 6px;
}

.cta-band__mail {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.1vw, 1.6rem);
  font-weight: 500;
  color: var(--halo);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 211, 122, 0.35);
  padding-bottom: 4px;
  transition: border-color 0.22s ease;
  word-break: break-word;
}

.cta-band__mail:hover { border-color: var(--halo); }

/* ═══ Pied de page ════════════════════════════════════════════ */
.footer {
  background: var(--ink);
  color: rgba(245, 244, 239, 0.6);
  padding: clamp(48px, 6vw, 72px) var(--pad-x) 32px;
  border-top: 1px solid rgba(245, 244, 239, 0.1);
}

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer__brand img { height: 24px; filter: brightness(0) invert(1); opacity: 0.9; }

.footer__tagline {
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 30ch;
  color: rgba(245, 244, 239, 0.55);
}

.footer__col { display: flex; flex-direction: column; gap: 12px; }

.footer__col h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 244, 239, 0.4);
  margin-bottom: 4px;
}

.footer__col a {
  font-size: 0.9rem;
  color: rgba(245, 244, 239, 0.72);
  text-decoration: none;
  width: fit-content;
  transition: color 0.2s ease;
}

.footer__col a:hover { color: var(--halo); }

.footer__bottom {
  max-width: var(--maxw);
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 244, 239, 0.1);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(245, 244, 239, 0.38);
}

/* ═══ Carte projet (accueil + réalisations) ═══════════════════ */
.work-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.work-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
}

/* Le cadre porte l'encoche ; la flèche vit en dehors, sinon le
   masque la découperait elle aussi. */
.work-card__frame {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink);
  -webkit-mask-image: radial-gradient(circle 44px at 100% 0, transparent 43px, #000 44px);
  mask-image: radial-gradient(circle 44px at 100% 0, transparent 43px, #000 44px);
}

.work-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.work-card:hover .work-card__frame img,
.work-card:focus-visible .work-card__frame img { transform: scale(1.04); }

/* La flèche se niche dans l'encoche, calée sur la diagonale */
.work-card__arrow {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.work-card:hover .arrow-circle,
.work-card:focus-visible .arrow-circle { background: var(--halo); color: var(--ink); }

.work-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.work-card__cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--white);
  border: 1px solid var(--ink-14);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}

.work-card__title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

.work-card__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-70);
}

/* ═══ Apparition au défilement ════════════════════════════════
   Conditionné à la classe .js posée par un script en <head> :
   sans JavaScript, le contenu s'affiche normalement au lieu de
   rester invisible.
   ═════════════════════════════════════════════════════════════ */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.215, 0.61, 0.355, 1),
              transform 0.7s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.js .reveal.inview { opacity: 1; transform: none; }

.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
.js .reveal[data-delay="3"] { transition-delay: 0.24s; }
.js .reveal[data-delay="4"] { transition-delay: 0.32s; }

/* ═══ Responsive ══════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --seam-h: 2.6rem; }

  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .cta-band__inner { grid-template-columns: 1fr; align-items: start; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .section-head--split { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}
