/* =====================================================
   VIRGULE STUDIO — Page Réalisations (chapitres)
   ===================================================== */

/* ===== HERO ===== */
.real-hero { padding: 120px 0 64px 0; }
.real-hero h1 {
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: 1100px;
  margin-bottom: 36px;
}
.real-hero h1 .serif { color: var(--gray-500); }
.real-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
}
.real-hero-lead {
  font-size: 19px;
  color: var(--gray-700);
  line-height: 1.55;
  max-width: 600px;
}
.real-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--gray-200);
  padding-top: 20px;
}
.real-hero-stats strong {
  display: block;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.real-hero-stats span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
}
@media (max-width: 900px) {
  .real-hero { padding: 96px 0 48px 0; }
  .real-hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ===== SOMMAIRE (ancres, sticky) ===== */
.chapter-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: rgba(254, 253, 251, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.chapter-nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chapter-nav-inner::-webkit-scrollbar { display: none; }
.chapter-nav-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-right: 12px;
  flex-shrink: 0;
}
.chapter-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  font-size: 13.5px;
  color: var(--gray-700);
  transition: all 0.25s var(--ease-out);
}
.chapter-link .num { font-family: var(--font-mono); font-size: 10.5px; color: var(--indigo); }
.chapter-link .count { font-family: var(--font-mono); font-size: 10.5px; color: var(--gray-400); }
.chapter-link:hover { border-color: var(--ink); color: var(--ink); }
.chapter-link.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chapter-link.is-active .num { color: var(--terra-soft); }
.chapter-link.is-active .count { color: var(--gray-400); }
@media (max-width: 1024px) {
  .chapter-nav { top: 57px; }
  .chapter-nav-label { display: none; }
}

/* ===== CHAPITRES ===== */
.chapter { padding: 120px 0; scroll-margin-top: 120px; }
.chapter-cream { background: var(--cream); }
.chapter-sand { background: var(--sand); }
.chapter-ink { background: var(--ink); color: var(--paper); }
.chapter-ink h2, .chapter-ink h3 { color: var(--paper); }

.chapter-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 40px;
  margin-bottom: 80px;
  border-bottom: 1px solid var(--gray-300);
}
.chapter-ink .chapter-head { border-bottom-color: #262626; }
.chapter-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(88px, 11vw, 168px);
  line-height: 0.8;
  color: var(--indigo);
  letter-spacing: -0.04em;
}
.chapter-ink .chapter-num { color: var(--terra); }
.chapter-head .eyebrow { margin-bottom: 18px; }
.chapter-ink .eyebrow { color: var(--gray-400); }
.chapter-ink .eyebrow::before { background: var(--terra); }
.chapter-head h2 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.chapter-head h2 .serif { color: var(--gray-500); }
.chapter-head p { font-size: 17px; line-height: 1.55; color: var(--gray-700); max-width: 620px; }
.chapter-ink .chapter-head p { color: var(--gray-400); }
@media (max-width: 768px) {
  .chapter { padding: 80px 0; }
  .chapter-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 56px; }
}

/* ===== Éléments communs aux fiches ===== */
.work-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.work-title {
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.work-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 20px;
}
.work-pitch {
  font-size: 17px;
  line-height: 1.55;
  color: var(--gray-700);
  margin-bottom: 24px;
  max-width: 560px;
}
.work-pitch strong { color: var(--ink); font-weight: 500; }
.work-done { margin-bottom: 28px; }
.work-done li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--gray-700);
  border-top: 1px solid rgba(10,10,10,0.08);
}
.work-done li::before {
  content: '↳';
  position: absolute;
  left: 2px;
  top: 10px;
  font-family: var(--font-mono);
  color: var(--indigo);
}
.work-done li:last-child { border-bottom: 1px solid rgba(10,10,10,0.08); }
.work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.work-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* ===== 00 · À LA UNE ===== */
.feature-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 72px;
  align-items: center;
}
.feature .work-meta, .feature .work-url { color: var(--gray-400); }
.feature .work-title { font-size: clamp(44px, 5.4vw, 80px); }
.feature .work-pitch { color: var(--gray-300); }
.feature .work-pitch strong { color: var(--paper); }
.feature .tag { color: var(--gray-400); border-color: #333; }
.feature a.tag:hover { color: var(--paper); border-color: var(--paper); }
.feature .btn-primary { background: var(--paper); color: var(--ink); }
.feature .btn-primary:hover { background: var(--terra-soft); box-shadow: none; }
.feature .link-out { color: var(--paper); }
.feature .link-out:hover { color: var(--terra-soft); }

.feature-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #262626;
  border-bottom: 1px solid #262626;
  margin-bottom: 28px;
}
.feature-stats div { padding: 18px 0; }
.feature-stats strong {
  display: block;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--paper);
  margin-bottom: 6px;
}
.feature-stats span {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
}

.feature-media { position: relative; padding: 0 48px 56px 0; }
.feature-media .device-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 23%;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 120px;
}
.feature-strip figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 14px;
  line-height: 1.5;
}
.feature-strip figcaption strong { color: var(--paper); font-weight: 400; }

/* Avant / après */
.evolution {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 72px;
  align-items: center;
  margin-top: 120px;
  padding-top: 80px;
  border-top: 1px solid #262626;
}
.evolution h3 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 18px 0 18px 0;
}
.evolution h3 .serif { color: var(--terra); }
.evolution p { font-size: 15.5px; line-height: 1.6; color: var(--gray-400); margin-bottom: 16px; }
.evolution-hint { font-family: var(--font-mono); font-size: 11px; color: var(--gray-500); }

.before-after {
  --pos: 50%;
  position: relative;
  aspect-ratio: 1600 / 885;
  overflow: hidden;
  user-select: none;
}
.before-after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.before-after .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(10,10,10,0.2);
  pointer-events: none;
}
.ba-handle::after {
  content: '↔';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.ba-label {
  position: absolute;
  top: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(10,10,10,0.75);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.ba-label-before { left: 14px; }
.ba-label-after { right: 14px; }
.before-after input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.before-after:has(input:focus-visible) .ba-handle::after { outline: 2px solid var(--terra); outline-offset: 3px; }

@media (max-width: 1024px) {
  .feature-grid, .evolution { grid-template-columns: 1fr; gap: 48px; }
  .feature-grid .feature-media { order: -1; }
}
@media (max-width: 768px) {
  .feature-strip { grid-template-columns: 1fr; margin-top: 80px; }
  .feature-stats { grid-template-columns: repeat(2, 1fr); }
  .feature-media { padding: 0 28px 40px 0; }
  .evolution { margin-top: 80px; padding-top: 56px; }
}

/* ===== 01 · RANGÉES VITRINES ===== */
.work-rows { display: flex; flex-direction: column; gap: 140px; }
.work-row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 72px;
  align-items: center;
  scroll-margin-top: 140px;
}
.work-row:nth-child(even) { grid-template-columns: 5fr 7fr; }
.work-row:nth-child(even) .work-media { order: 2; }
.work-media { position: relative; padding: 0 44px 52px 0; }
.work-media .device-phone { position: absolute; right: 0; bottom: 0; width: 24%; }
.work-row:nth-child(even) .work-media { padding: 0 0 52px 44px; }
.work-row:nth-child(even) .work-media .device-phone { right: auto; left: 0; }
.work-media > a { display: block; transition: transform 0.5s var(--ease-out); }
.work-media > a:hover { transform: translateY(-4px); }
@media (max-width: 1024px) {
  .work-rows { gap: 96px; }
  .work-row, .work-row:nth-child(even) { grid-template-columns: 1fr; gap: 36px; }
  .work-row:nth-child(even) .work-media { order: 0; padding: 0 44px 52px 0; }
  .work-row:nth-child(even) .work-media .device-phone { left: auto; right: 0; }
}

/* ===== 02 · GRILLE PLATEFORMES & APPLICATIONS ===== */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.work-card {
  background: var(--paper);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 140px;
}
.work-stage {
  --stage: var(--gray-900);
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--stage);
  display: grid;
  place-items: center;
  padding: 40px;
  overflow: hidden;
}
.work-stage > * { transition: transform 0.6s var(--ease-out); }
.work-card:hover .work-stage > * { transform: translateY(-6px); }
.work-stage .browser-frame { width: 100%; }
.work-stage-duo { place-items: center start; padding-right: 22%; }
.work-stage-duo .device-phone { position: absolute; right: 7%; bottom: 9%; width: 20%; }
.work-stage .device-tablet { width: 92%; }
.work-stage .device-tablet.is-portrait { width: 52%; }
@media (max-width: 600px) { .work-stage .device-tablet.is-portrait { width: 58%; } }
.work-info { padding: 32px 32px 36px 32px; display: flex; flex-direction: column; flex: 1; }
.work-card .work-title { font-size: clamp(26px, 2.6vw, 34px); }
.work-card .work-pitch { font-size: 15.5px; margin-bottom: 20px; }
.work-card .work-done { margin-bottom: 24px; }
.work-card .work-done li { font-size: 13.5px; padding-top: 8px; padding-bottom: 8px; }
.work-card .work-done li::before { top: 8px; }
.work-card .work-foot { margin-top: auto; }
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .work-stage { padding: 24px; }
  .work-info { padding: 24px 22px 28px 22px; }
}

/* ===== 03 · VISIBILITÉ ===== */
.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.seo-card {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 40px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  scroll-margin-top: 140px;
}
.seo-card .work-title { font-size: clamp(28px, 2.8vw, 38px); }
.seo-card .work-pitch { font-size: 15.5px; }
.serp {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 28px;
}
.serp-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 14px;
}
.serp-site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.serp-site i {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--gray-200);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--indigo);
  flex-shrink: 0;
}
.serp-site span { font-size: 12.5px; color: var(--gray-700); line-height: 1.3; }
.serp-site small { display: block; font-size: 11.5px; color: var(--gray-500); }
.serp-title { font-size: 18px; line-height: 1.3; color: var(--indigo-vivid); margin-bottom: 4px; letter-spacing: -0.005em; }
.serp-desc { font-size: 13.5px; line-height: 1.5; color: var(--gray-700); }
.seo-queries-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.seo-queries { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.seo-queries li {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--indigo-soft);
  color: var(--indigo-deep);
}
.seo-scope {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--gray-500);
  padding-top: 16px;
  border-top: 1px dashed var(--gray-300);
  margin-bottom: 24px;
}
.seo-card .work-foot { margin-top: auto; }
@media (max-width: 900px) {
  .seo-grid { grid-template-columns: 1fr; }
  .seo-card { padding: 28px 22px; }
}

/* ===== CTA ===== */
.real-cta { padding: 120px 0; text-align: center; background: var(--gray-50); }
.real-cta h2 { font-size: clamp(40px, 6vw, 84px); line-height: 1; margin-bottom: 24px; }
.real-cta h2 .serif { color: var(--indigo); }
.real-cta p {
  font-size: 17px;
  color: var(--gray-700);
  max-width: 520px;
  margin: 0 auto 32px auto;
  line-height: 1.55;
}
.real-cta-buttons { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .work-media > a, .work-stage > * { transition: none; }
  .work-media > a:hover, .work-card:hover .work-stage > * { transform: none; }
}

/* =====================================================
   ÉTUDES DE CAS (realisations/*.html)
   ===================================================== */
.breadcrumb-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 28px;
  transition: color 0.2s;
}
.breadcrumb-back:hover { color: var(--indigo); }

.study-hero { padding: 120px 0 80px 0; }
.study-hero-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 72px;
  align-items: center;
}
.study-hero h1 {
  font-size: clamp(48px, 6.4vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}
.study-hero h1 .serif { color: var(--gray-500); }
.study-lead { font-size: 19px; line-height: 1.55; color: var(--gray-700); margin-bottom: 36px; }
.study-lead strong { color: var(--ink); font-weight: 500; }
.study-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
  margin-bottom: 32px;
}
.study-facts dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.study-facts dd { font-size: 14.5px; color: var(--ink); line-height: 1.45; }
@media (max-width: 1024px) {
  .study-hero { padding: 96px 0 56px 0; }
  .study-hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.study-section { padding: 100px 0; }
.study-section-cream { background: var(--cream); }
.study-section-ink { background: var(--ink); color: var(--paper); }
.study-section-ink h2 { color: var(--paper); }
.study-split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 72px;
  align-items: center;
}
.study-split h2, .study-block-head h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.study-split h2 .serif, .study-block-head h2 .serif { color: var(--indigo); }
.study-section-ink h2 .serif { color: var(--terra); }
.study-split p, .study-block-head p { font-size: 16px; line-height: 1.65; color: var(--gray-700); margin-bottom: 16px; }
.study-section-ink p { color: var(--gray-400); }
.study-block-head { max-width: 720px; margin-bottom: 56px; }
.study-block-head .eyebrow, .study-split .eyebrow { margin-bottom: 18px; }
.study-section-ink .eyebrow { color: var(--gray-400); }
.study-section-ink .eyebrow::before { background: var(--terra); }
@media (max-width: 1024px) { .study-split { grid-template-columns: 1fr; gap: 40px; } }

.study-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.study-gallery figcaption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--gray-500);
  margin-top: 14px;
}
.study-gallery figcaption strong { color: var(--ink); font-weight: 400; }
@media (max-width: 768px) { .study-gallery { grid-template-columns: 1fr; } }

.study-figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--gray-300);
}
.study-figures div { padding: 28px 24px 0 0; }
.study-figures strong {
  display: block;
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 10px;
}
.study-figures span { font-size: 14px; color: var(--gray-700); line-height: 1.45; }
@media (max-width: 768px) { .study-figures { grid-template-columns: repeat(2, 1fr); row-gap: 12px; } }

.study-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 40px 0;
  border-top: 1px solid var(--gray-200);
}
.study-next-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.study-next a.study-next-title { font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; transition: color 0.2s; }
.study-next a.study-next-title:hover { color: var(--indigo); }
