/* ============================================================
   CCA — Page Portfolio
   Layout éditorial asymétrique · Drawer · éco / Lighthouse
   Hérite des tokens & du shell (nav/loader/curseur) de styles.css
   ============================================================ */

/* ============ NAV — état actif ============ */
.nav-links a.is-active {
  color: var(--ink);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 2px;
}

/* ============ PAGE HERO (compact) ============ */
.pf-hero {
  padding: clamp(96px, 13vh, 124px) var(--pad) clamp(44px, 7vh, 64px);
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}
.pf-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: flex-end;
  max-width: 1400px;
  margin: 0 auto;
}
.pf-hero .eyebrow {
  display: block;
  font-family: var(--dm); font-weight: 500;
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 18px;
}
.pf-hero h1 {
  font-family: var(--syne); font-weight: 800;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.035em; line-height: 0.92; color: var(--ink);
}
.pf-hero .sub {
  font-family: var(--dm); font-weight: 300;
  font-size: 15px; color: var(--warm); line-height: 1.8;
  margin-top: 20px; max-width: 400px; text-wrap: pretty;
}

/* 3 macro-stats inline */
.pf-macro {
  display: flex; gap: clamp(28px, 4vw, 48px);
  justify-content: flex-end; align-items: flex-end; flex-wrap: wrap;
}
.pf-macro .mstat { display: flex; flex-direction: column; }
.pf-macro .mnum {
  font-family: var(--syne); font-weight: 800;
  font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.04em; line-height: 1;
}
.pf-macro .mstat.o .mnum { color: var(--orange); }
.pf-macro .mstat.b .mnum { color: var(--blue); }
.pf-macro .mstat.k .mnum { color: var(--ink); }
.pf-macro .mlbl {
  font-family: var(--dm); font-weight: 300;
  font-size: 11px; color: var(--faint); margin-top: 6px;
  letter-spacing: 0.08em; text-transform: uppercase;
}

@media (max-width: 820px) {
  .pf-hero-grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .pf-macro { justify-content: flex-start; gap: 36px; }
  .pf-hero .sub { max-width: none; }
}

/* ============ FILTER BAR (sticky) ============ */
.pf-filter {
  position: sticky; top: 60px; z-index: 90;
  background: rgba(247,245,240,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
  padding: 0 var(--pad);
}
.pf-filter-inner {
  display: flex; align-items: stretch; height: 52px;
  max-width: 1400px; margin: 0 auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pf-filter-inner::-webkit-scrollbar { display: none; }
.pf-fgroup { display: flex; align-items: stretch; }
.pf-fgroup .glabel {
  display: flex; align-items: center; padding-right: 14px;
  font-family: var(--dm); font-weight: 500; font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint2);
  white-space: nowrap;
}
.filter-btn {
  background: none; border: none;
  padding: 0 14px; height: 52px;
  font-family: var(--dm); font-weight: 500; font-size: 11px; line-height: 1;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--faint); cursor: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.active { color: var(--orange); border-bottom-color: var(--orange); }
.filter-btn.active-blue { color: var(--blue); border-bottom-color: var(--blue); }
.pf-fdiv { width: 1px; background: var(--hair); margin: 12px 18px; flex-shrink: 0; }

@media (max-width: 820px) {
  .pf-filter { padding: 0; }
  .pf-filter-inner {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 0 var(--pad); scrollbar-width: none;
  }
  .pf-filter-inner::-webkit-scrollbar { display: none; }
  .pf-fdiv { display: none; }
  .pf-fgroup .glabel { display: none; }
  .pf-fgroup + .pf-fgroup::before {
    content: ""; width: 1px; background: var(--hair); margin: 12px 6px; flex-shrink: 0;
  }
}

/* ============ PORTFOLIO BOARD (12-col asymmetric) ============ */
.pf-board-wrap { padding: clamp(40px, 6vh, 64px) var(--pad); }
.pf-board {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 1px; background: var(--hair);
  max-width: 1400px; margin: 0 auto;
  border: 1px solid var(--hair);
}

.pf-card {
  background: var(--noir); color: var(--paper);
  padding: clamp(28px, 3vw, 36px) clamp(24px, 2.6vw, 32px);
  position: relative; overflow: hidden; cursor: none;
  display: flex; flex-direction: column;
  text-align: left; border: 0; font: inherit; width: 100%;
  transition: background .2s, opacity .35s var(--ease);
  appearance: none; -webkit-appearance: none;
}
.pf-card:hover { background: #111; }
.pf-card:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }

/* spans */
.pf-w8 { grid-column: span 8; min-height: 380px; }
.pf-w12 { grid-column: 1 / -1; }
.pf-w6 { grid-column: span 6; min-height: 300px; }
.pf-w4 { grid-column: span 4; min-height: 300px; }

/* filtered out */
.pf-card.hide { opacity: 0.12; pointer-events: none; }

/* ZONE A — meta */
.pf-card .tag {
  font-family: var(--dm); font-weight: 500; font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange);
  position: relative; z-index: 2;
}
.pf-card .tag.blue { color: var(--blue); }
.pf-card .client {
  font-family: var(--syne); font-weight: 800;
  font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.025em;
  color: var(--paper); margin-top: 8px; line-height: 1.02;
  position: relative; z-index: 2;
}
.pf-card .presta {
  font-family: var(--dm); font-weight: 300; font-size: 12px;
  color: #5A574F; margin-top: 6px; position: relative; z-index: 2;
}

/* ZONE B — giant result number */
.pf-card .num {
  font-family: var(--syne); font-weight: 800;
  font-size: clamp(64px, 10vw, 132px); color: #161616;
  letter-spacing: -0.05em; line-height: 1;
  position: absolute; bottom: 64px; right: 22px;
  pointer-events: none; user-select: none;
  transition: color .3s, opacity .3s; z-index: 1;
}
.pf-w8 .num { font-size: clamp(96px, 13vw, 184px); bottom: 60px; }
.pf-card:hover .num { color: var(--orange); opacity: 0.22; }

/* CSS-only geometric texture per project */
.pf-card .shape {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.6; transition: opacity .3s;
}
.pf-card:hover .shape { opacity: 1; }
.shape-bars::before, .shape-bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: #1C1C1C;
}
.shape-bars::before { bottom: 38%; }
.shape-bars::after { bottom: 28%; }
.shape-slash::before {
  content: ""; position: absolute; width: 2px; height: 220%;
  background: #1C1C1C; top: -60%; right: 28%; transform: rotate(20deg);
}
.shape-dots {
  background-image: radial-gradient(circle, #1C1C1C 1px, transparent 1px);
  background-size: 22px 22px;
}
.shape-curve::before {
  content: ""; position: absolute; width: 240px; height: 240px;
  border: 1px solid #1C1C1C; border-radius: 50%;
  bottom: -120px; left: -60px;
}
.shape-triangle::before {
  content: ""; position: absolute; width: 0; height: 0;
  border-left: 90px solid transparent; border-right: 90px solid transparent;
  border-bottom: 150px solid #161616;
  bottom: 36px; right: -20px; transform: rotate(8deg);
}

/* ZONE C — bottom strip */
.pf-card .strip {
  margin-top: auto;
  border-top: 1px solid #1C1C1C; padding-top: 16px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; position: relative; z-index: 2;
}
.pf-card .strip .rlabel {
  font-family: var(--dm); font-weight: 300; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: #5A574F;
}
.pf-card .strip .see {
  font-family: var(--dm); font-weight: 500; font-size: 12px;
  color: #5A574F; transition: color .2s; white-space: nowrap;
}
.pf-card:hover .strip .see { color: var(--orange); }

/* CTA card */
.pf-cta {
  background: #F0EDE6;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: clamp(36px, 4vw, 48px);
}
.pf-cta .small {
  font-family: var(--dm); font-weight: 500; font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--faint2);
}
.pf-cta h2 {
  font-family: var(--syne); font-weight: 800; font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.025em; color: var(--ink); margin: 16px 0 8px; line-height: 1.05;
}
.pf-cta .csub { font-family: var(--dm); font-weight: 300; font-size: 14px; color: var(--warm); }
.pf-cta .cbtn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--syne); font-weight: 700; font-size: 13px;
  background: var(--orange); color: #fff; padding: 12px 24px;
  border-radius: 3px; margin-top: 24px; cursor: none;
  transition: transform .25s var(--ease), background .25s;
}
.pf-cta .cbtn:hover { transform: translateY(-2px); background: var(--orange-d); }

/* card reveal */
.pf-card, .pf-cta { will-change: auto; }
.pf-reveal { opacity: 0; transform: translateY(24px); }
.pf-reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (max-width: 820px) {
  .pf-w8, .pf-w6, .pf-w4 { grid-column: 1 / -1; min-height: 248px; }
  .pf-card .num { font-size: clamp(56px, 16vw, 96px) !important; bottom: 60px; }
}

/* ============ DRAWER ============ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(10,10,10,0.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9100;
  width: min(580px, 100vw); background: var(--paper);
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.open { transform: translateX(0); }

.drawer-top {
  height: 56px; border-bottom: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 32px);
  position: sticky; top: 0; z-index: 10;
  background: rgba(247,245,240,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.drawer-sector {
  font-family: var(--dm); font-weight: 500; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint);
}
.drawer-close {
  width: 34px; height: 34px; border: 1px solid var(--hair); border-radius: 50%;
  background: transparent; cursor: none; color: var(--warm);
  font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s, transform .2s;
  flex-shrink: 0;
}
.drawer-close:hover { border-color: var(--ink); color: var(--ink); transform: rotate(90deg); }

.drawer-body { padding: clamp(36px, 6vw, 48px) clamp(24px, 4vw, 32px) 56px; }

/* Zone 1 — hero stat */
.dz-hero { text-align: center; margin-bottom: 44px; padding-bottom: 44px; border-bottom: 1px solid var(--hair); }
.drawer-number { font-family: var(--syne); font-weight: 800; font-size: clamp(60px, 11vw, 80px); color: var(--orange); line-height: 1; letter-spacing: -0.04em; }
.drawer-number-label { font-family: var(--dm); font-weight: 300; font-size: 13px; color: var(--warm); margin-top: 10px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Zone 2 — identity */
.drawer-client { font-family: var(--syne); font-weight: 800; font-size: clamp(28px, 5vw, 34px); color: var(--ink); letter-spacing: -0.025em; margin-bottom: 6px; }
.drawer-meta { font-family: var(--dm); font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }

/* Zone 3 — visual block (initials) */
.drawer-visual {
  margin: 32px 0; background: var(--noir); border-radius: 4px; overflow: hidden;
  min-height: 220px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.drawer-visual .dv-tag {
  position: absolute; bottom: 16px; right: 18px;
  font-family: var(--dm); font-weight: 500; font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase; color: #3A3A3A;
}
.drawer-visual .initials {
  font-family: var(--syne); font-weight: 800; font-size: clamp(120px, 30vw, 220px);
  color: #161616; line-height: 1; letter-spacing: -0.06em; user-select: none;
}

/* Zone 4 — mission */
.dz { margin-bottom: 32px; }
.dz-label { font-family: var(--dm); font-weight: 500; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.drawer-mission { font-family: var(--dm); font-weight: 300; font-size: 16px; color: var(--ink); line-height: 1.8; text-wrap: pretty; }

/* Zone 5 — impact block */
.dz-impact { background: var(--noir); border-radius: 4px; padding: 28px 26px; margin-bottom: 32px; }
.dz-impact .dz-label { color: #4A4A4A; }
.dz-impact .impact-row { display: flex; gap: 36px; flex-wrap: wrap; }
.dz-impact .istat .inum { font-family: var(--syne); font-weight: 800; font-size: 28px; color: var(--orange); letter-spacing: -0.02em; line-height: 1; }
.dz-impact .istat .ilbl { font-family: var(--dm); font-weight: 300; font-size: 12px; color: #6A6A6A; margin-top: 6px; max-width: 18ch; }

/* Zone 6 — services tags */
.drawer-services { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.drawer-services .stag {
  border: 1px solid var(--hair); border-radius: 2px; padding: 6px 13px;
  font-family: var(--dm); font-weight: 400; font-size: 11px; color: var(--warm);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* Zone 7 — CTA */
.dz-cta { border-top: 1px solid var(--hair); padding-top: 32px; }
.dz-cta p { font-family: var(--dm); font-weight: 300; font-size: 14px; color: var(--warm); margin-bottom: 20px; line-height: 1.7; text-wrap: pretty; }
.dz-cta .dbtn {
  display: block; text-align: center; background: var(--orange); color: #fff;
  font-family: var(--syne); font-weight: 700; font-size: 14px;
  padding: 15px; border-radius: 3px; cursor: none; transition: background .25s;
}
.dz-cta .dbtn:hover { background: var(--orange-d); }

@media (max-width: 600px) {
  .drawer { width: 100vw; }
  .dz-impact .impact-row { gap: 24px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-overlay { transition: none; }
  .pf-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pf-card { transition: background .2s; }
}
