/* ==========================================================================
   AVA INTEGRA — feuille de style unique
   Palette reprise du thème d'origine : prune #321230, noir, blanc, gris clair.
   ========================================================================== */

:root {
  --plum:        #321230;
  --plum-soft:   #4a1c46;
  --ink:         #111111;
  --ink-soft:    #353535;
  --muted:       #6b7280;   /* 5,26:1 sur blanc — WCAG AA */
  --line:        #e4e0e3;
  --paper:       #ffffff;
  --paper-alt:   #f4f2f3;
  --dark:        #1a1a1a;

  --shell:       1280px;
  --gutter:      clamp(20px, 5vw, 64px);

  --sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display:     'Jost', 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;

  --ease:        cubic-bezier(.22, .61, .36, 1);
  --header-h:    86px;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }

/* <picture> est en ligne par defaut : il doit se comporter comme son <img>,
   sinon les conteneurs a ratio fixe (heros, cartes, materiaux) ne sont plus
   remplis. */
picture { display: block; }
.hero-slide picture,
.project-hero picture,
.project a picture,
.material picture { display: block; width: 100%; height: 100%; }
.duo picture, .shot picture, .showcase picture { display: block; width: 100%; }
.clients picture { display: block; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--plum); color: #fff; padding: 12px 20px;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

/* --------------------------------------------------------------- layout */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* La première section qui suit un en-tête de page respire déjà :
   on réduit son retrait haut pour éviter un grand vide. */
.page-head + .section,
.page-head + .section--alt { padding-top: clamp(40px, 5vw, 64px); }
.section--alt { background: var(--paper-alt); }
.section--dark { background: var(--dark); color: #cfc9cd; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  font-family: var(--display);
  font-size: .74rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 500;
  margin: 0 0 18px;
}
.section--dark .eyebrow { color: #b99ab6; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

.center { text-align: center; }
.measure { max-width: 62ch; margin-inline: auto; }

.rule {
  width: 54px; height: 2px; background: var(--plum);
  border: 0; margin: 0 0 26px;
}
.center .rule, .rule--center { margin-inline: auto; }

/* --------------------------------------------------------------- boutons */
.btn {
  --btn-fg: #fff;
  --btn-bg: var(--plum);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--btn-bg);
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover { --btn-bg: var(--ink); border-color: var(--ink); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: #fff; }

.btn--light { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255,255,255,.55); }
.btn--light:hover { --btn-bg: #fff; --btn-fg: var(--ink); border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-row--center { justify-content: center; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.site-header--over {
  position: fixed;
  inset: 0 0 auto;
  background: transparent;
  border-bottom-color: transparent;
}
.site-header--over.is-solid {
  background: rgba(255,255,255,.97);
  border-bottom-color: var(--line);
  backdrop-filter: saturate(180%) blur(8px);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: block; flex: none; }
.brand img { height: 40px; width: auto; }
.brand-light { display: none; }
.site-header--over:not(.is-solid) .brand-light { display: block; }
.site-header--over:not(.is-solid) .brand-dark  { display: none; }

.nav ul {
  display: flex;
  gap: clamp(18px, 2.6vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  position: relative;
  font-family: var(--display);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 8px;
  transition: color .3s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--plum); }

.site-header--over:not(.is-solid) .nav a { color: #fff; }
.site-header--over:not(.is-solid) .nav a[aria-current="page"] { color: #fff; }

.nav-foot { display: none; }

.burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 10px;
  cursor: pointer;
}
.burger span {
  display: block; height: 1.5px; background: var(--ink);
  margin: 5px 0; transition: transform .35s var(--ease), opacity .2s;
}
.site-header--over:not(.is-solid) .burger span { background: #fff; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--dark);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s linear;
}
.hero-slide.is-active img { transform: scale(1); }
.hero-slides::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,.62) 100%);
}

.hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding-inline: var(--gutter);
  max-width: 900px;
}
.hero-body h1 { color: #fff; font-weight: 300; }
.hero-body .eyebrow { color: rgba(255,255,255,.78); }
.hero-body p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255,255,255,.86);
  margin: 24px auto 34px;
  max-width: 56ch;
}

.hero-dots {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 12px;
}
.hero-dots button {
  width: 30px; height: 2px;
  background: rgba(255,255,255,.4);
  border: 0; padding: 0; cursor: pointer;
  transition: background .3s var(--ease);
}
.hero-dots button[aria-selected="true"] { background: #fff; }

/* ------------------------------------------------------------- page head */
.page-head {
  padding-block: clamp(56px, 8vw, 104px) clamp(30px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 14px; }
.page-head p { color: var(--muted); max-width: 60ch; }

.crumbs {
  font-family: var(--display);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--plum); }

/* ------------------------------------------------------------- intro duo */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.duo figure { margin: 0; }
.duo img { width: 100%; }

/* --------------------------------------------------------------- parallax */
.parallax {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  padding-block: clamp(90px, 14vw, 190px);
}
.parallax::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(20, 8, 19, .62);
}
.parallax > * { position: relative; z-index: 1; }
.parallax h2, .parallax h3 { color: #fff; }
.parallax p { color: rgba(255,255,255,.88); }

@media (hover: none) {
  .parallax { background-attachment: scroll; }
}

/* ------------------------------------------------------------ spécialités */
.materials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px;
  margin-top: 48px;
}
.material {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--dark);
}
.material img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .82;
  transition: transform .8s var(--ease), opacity .5s var(--ease);
}
.material:hover img { transform: scale(1.07); opacity: 1; }
.material figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 20px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.72));
  color: #fff;
  font-family: var(--display);
  font-size: .84rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- projets */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}
.filters button {
  background: none;
  border: 1px solid var(--line);
  padding: 10px 20px;
  font-family: var(--display);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] {
  background: var(--plum); border-color: var(--plum); color: #fff;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(14px, 1.8vw, 24px);
}
.project { position: relative; }
.project.is-hidden { display: none; }

.project a {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background: var(--dark);
  aspect-ratio: 4 / 3;
}
.project img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease), opacity .5s var(--ease);
}
.project a:hover img { transform: scale(1.06); opacity: .55; }

.project-meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  background: linear-gradient(180deg, transparent 40%, rgba(20,8,19,.78));
  color: #fff;
}
.project-meta h3 { color: #fff; font-size: 1.35rem; }
.project-meta span {
  font-family: var(--display);
  font-size: .7rem;
  line-height: 1.5;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-top: 8px;
  /* Deux lignes au maximum : le titre reste toujours dans le dégradé. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-count {
  position: absolute;
  top: 20px; right: 22px;
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .16em;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.35);
  padding: 5px 11px;
  backdrop-filter: blur(4px);
}

/* ------------------------------------------------------- fiche projet */
.project-hero {
  position: relative;
  height: min(74svh, 720px);
  min-height: 380px;
  background: var(--dark);
  overflow: hidden;
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.project-hero-body {
  position: absolute; inset: auto 0 0 0;
  padding: clamp(32px, 6vw, 70px) 0;
  background: linear-gradient(180deg, transparent, rgba(20,8,19,.8));
  color: #fff;
}
.project-hero-body h1 { color: #fff; }
.project-hero-body .tags { margin-top: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--display);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 5px 12px;
  opacity: .85;
}

.masonry {
  columns: 3 300px;
  column-gap: clamp(12px, 1.6vw, 20px);
}
.masonry > * {
  break-inside: avoid;
  margin-bottom: clamp(12px, 1.6vw, 20px);
}
.shot {
  display: block;
  width: 100%;
  border: 0; padding: 0;
  background: var(--paper-alt);
  cursor: zoom-in;
  overflow: hidden;
}
.shot img { width: 100%; transition: transform .8s var(--ease), opacity .4s; }
.shot:hover img { transform: scale(1.04); opacity: .9; }

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 34px;
  margin-top: clamp(48px, 7vw, 88px);
  font-family: var(--display);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.project-nav a { text-decoration: none; color: var(--ink); }
.project-nav a:hover { color: var(--plum); }
.project-nav span { display: block; color: var(--muted); font-size: .68rem; margin-bottom: 4px; }

/* ---------------------------------------------------------------- clients */
/* Bordures portées par les cellules : une dernière ligne incomplète ne laisse
   pas de cases grises orphelines. */
.clients {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.clients li {
  list-style: none;
  display: grid;
  place-items: center;
  padding: 26px 20px;
  min-height: 118px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.clients img {
  max-height: 62px;
  width: auto;
  filter: grayscale(1);
  opacity: .55;
  transition: filter .4s var(--ease), opacity .4s var(--ease);
}
.clients li:hover img { filter: grayscale(0); opacity: 1; }

.showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
}
.showcase img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* --------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 76px);
  align-items: start;
}

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--display);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
}
.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px 16px;
  width: 100%;
  transition: border-color .3s var(--ease);
}
.field input:focus,
.field textarea:focus { border-color: var(--plum); outline: none; }
.field textarea { min-height: 170px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--muted); }

.honey { position: absolute; left: -9999px; }

.alert {
  padding: 16px 20px;
  border-left: 3px solid var(--plum);
  background: var(--paper-alt);
  margin-bottom: 28px;
}
.alert--ok { border-left-color: #1d7a45; }
.alert--err { border-left-color: #b3231f; }
.alert ul { margin: 8px 0 0; padding-left: 18px; }

.info-block { margin-bottom: 34px; }
.info-block h3 { margin-bottom: 10px; }
.info-block a { color: var(--plum); text-decoration: none; }
.info-block a:hover { text-decoration: underline; }
address { font-style: normal; }

.map {
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  width: 100%;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-mark { max-width: 320px; margin-inline: auto; height: auto; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--dark);
  color: #a49da2;
  padding-top: clamp(56px, 8vw, 92px);
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 44px;
  padding-bottom: 56px;
}
.footer-brand img { height: 46px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: #8d858b; max-width: 30ch; }

.site-footer h3 {
  color: #fff;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #a49da2; text-decoration: none; transition: color .3s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 18px; margin-top: 16px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.09);
  padding-block: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: .84rem;
  color: #8d858b;   /* 4,86:1 sur #1a1a1a — WCAG AA */
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #a49da2; }

/* -------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 5, 11, .95);
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%;
  max-height: 86svh;
  object-fit: contain;
}
.lightbox-caption {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-family: var(--display);
  font-size: .78rem;
  letter-spacing: .12em;
}
.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 14px 18px;
  cursor: pointer;
  opacity: .65;
  transition: opacity .25s;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 8px; right: 10px; font-size: 2.4rem; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------------------- 404 */
.err {
  min-height: 68svh;
  display: grid;
  place-items: center;
  text-align: center;
}
.err .code {
  font-family: var(--display);
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: .9;
  color: var(--plum);
  opacity: .16;
  margin-bottom: -.2em;
}

/* --------------------------------------------------------- animation slide */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .masonry { columns: 2 220px; }
}

@media (max-width: 780px) {
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    background: var(--paper);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: var(--gutter);
    transform: translateX(100%);
    transition: transform .45s var(--ease);
    z-index: 90;
  }
  body.nav-open .nav { transform: none; }
  body.nav-open { overflow: hidden; }

  .nav ul { flex-direction: column; gap: 24px; text-align: center; }
  .nav a { font-size: 1.05rem; letter-spacing: .2em; color: var(--ink) !important; }

  .nav-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: .9rem;
  }
  .nav-foot a { color: var(--muted); text-decoration: none; }

  .burger { position: relative; z-index: 95; }
  body.nav-open .burger span { background: var(--ink); }

  .hero { height: 88svh; }
  .project-nav { flex-direction: column; gap: 22px; }
}

@media (max-width: 560px) {
  .masonry { columns: 1; }
  .materials { grid-template-columns: repeat(2, 1fr); }
  .clients { grid-template-columns: repeat(2, 1fr); }

  /* Les libellés de catégorie sont longs : en colonne, ils ne débordent plus. */
  .filters { flex-direction: column; align-items: stretch; }
  .filters button {
    width: 100%;
    text-align: left;
    font-size: .7rem;
    letter-spacing: .08em;
    padding: 12px 16px;
  }

  .hero-body h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .project-meta { padding: 20px; }
}
