/* =======================================================
   Meriem Berrada — Prototype v3 (2026-04-23)
   Font stack: Helvetica (same as original site)
   Palette: ink on pure white
   Changelog v3: narrow retiré des page-intro, brand caps,
   pillars \prefix + title case, h1 plus bold, img cap,
   grids auto-fit, .strip supprimée, nav à 6 items.
   ======================================================= */

:root {
  --ink: #111;
  --ink-soft: #555;
  --bg: #ffffff;
  --bg-alt: #ffffff;
  --rule: #e5e5e5;
  --max-w: 1280px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --sans: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}
a:hover { border-bottom-color: var(--ink); }

/* -------- Typography -------- */
h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--ink);
  margin: 0 0 0.6em 0;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  margin-bottom: 0.8em;
}

/* Home-specific: MB massive */
.hero h1 {
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}

h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 500;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  text-transform: none;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.1em 0;
  max-width: 72ch;
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 44em;
  font-weight: 400;
}

.small {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.caption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-top: 0.5rem;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.eyebrow--venise {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.16em;
  border-top: 1px solid var(--ink);
  padding-top: 0.7rem;
  margin-bottom: 1.5rem;
  max-width: 36em;
}
.eyebrow--venise sup {
  font-size: 0.65em;
  letter-spacing: 0;
}
.hero .eyebrow--venise { margin-bottom: 2rem; }

em { font-style: italic; }
strong { font-weight: 600; }

/* -------- Header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand a { border: none; }

.nav {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 400;
}
.nav a:hover, .nav a.active { color: var(--ink); border-bottom-color: var(--ink); }

.lang {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lang a { color: var(--ink-soft); padding: 0 0.3rem; }
.lang a.active { color: var(--ink); font-weight: 600; }

@media (max-width: 820px) {
  .site-header-inner { flex-wrap: wrap; gap: 0.8rem 1.4rem; }
  .nav { order: 3; width: 100%; gap: 1rem; padding-top: 0.4rem; border-top: 1px solid var(--rule); }
  .nav a { font-size: 0.82rem; }
}

/* -------- Main -------- */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 5rem;
}

/* .narrow kept for explicit opt-in only (Contact) */
.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

section { margin-bottom: 4rem; }

/* -------- Hero (Home) -------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin-bottom: 5rem;
  padding-top: 1rem;
}
.hero-img img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  max-height: 80vh;
}
.hero-text { padding-right: 1.5vw; }

.hero .pillars-inline {
  margin: 0 0 2.8rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hero .lead {
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 38em;
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-text { order: 2; padding: 0; }
  .hero-img { order: 1; }
  .hero .pillars-inline { font-size: clamp(1.8rem, 7vw, 2.6rem); gap: 0.3rem; margin-bottom: 2rem; }
}

/* -------- Page intro (non-narrow by default) -------- */
.page-intro {
  padding-top: 0.5rem;
  margin-bottom: 3rem;
}
.page-intro h1 { margin-bottom: 1rem; }
.page-intro .lead { margin-bottom: 0; }

/* H1 with stacked lines (Profil) */
.page-intro h1 .line { display: block; }

/* -------- Pillars -------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pillar h3 {
  font-size: 1.15rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 1rem;
}
.pillar h3::before {
  content: "\\";
  color: var(--ink-soft);
  margin-right: 0.4rem;
  font-weight: 400;
}
.pillar p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: none;
}

@media (max-width: 820px) {
  .pillars { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0; }
}

/* -------- Grid of cards (generic) -------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem 2rem;
}

.card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 0.9rem;
}
.card h4 {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.card .meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* -------- Category cards (Expositions landing) -------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: 2.5rem;
}
.category-card {
  position: relative;
  display: block;
  border: none;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  aspect-ratio: 4/5;
  max-height: 70vh;
  cursor: pointer;
  isolation: isolate;
}
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  transition: transform 600ms ease;
  z-index: 1;
}
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.15) 100%);
  z-index: 2;
  transition: background 300ms ease;
}
.category-card .label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 2rem clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  color: #fff;
}
.category-card h4 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  font-weight: 600;
  margin: 0;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.category-card .cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.6);
  padding-bottom: 0.2rem;
  transition: border-color 200ms ease, gap 200ms ease;
}
.category-card .cta .arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
.category-card:hover img { transform: scale(1.04); }
.category-card:hover::after {
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.2) 100%);
}
.category-card:hover .cta { border-bottom-color: #fff; gap: 0.8rem; }
.category-card:hover .cta .arrow { transform: translateX(3px); }

@media (max-width: 820px) {
  .category-grid { grid-template-columns: 1fr; }
  .category-card { aspect-ratio: 3/4; max-height: 60vh; }
  .category-card .label { padding: 1.5rem; }
}

/* -------- Hero image (inside-page, bounded) -------- */
.page-hero-img {
  margin: 0 0 2rem 0;
}
.page-hero-img img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
}
.page-hero-img .caption {
  margin-top: 0.7rem;
}

/* -------- Project blocks -------- */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding: 3.5rem 0;
  border-top: 1px solid var(--rule);
}
.project:nth-child(even) .project-img { order: 2; }
.project img { aspect-ratio: 4/5; object-fit: cover; max-height: 75vh; }
.project h2 {
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.project .eyebrow { margin-bottom: 0.6rem; }
@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; padding: 2rem 0; }
  .project:nth-child(even) .project-img { order: 0; }
}

/* -------- Press list with logos -------- */
.press-list {
  border-top: 1px solid var(--rule);
}
.press-item {
  display: grid;
  grid-template-columns: 56px 220px 1fr;
  gap: 1.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.press-item .logo {
  width: 44px;
  height: 44px;
  background: #f4f3f0;
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-align: center;
  line-height: 1;
}
.press-item .logo img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  display: block;
}
.press-item .outlet {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.press-item .title {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.press-item .title a { color: var(--ink-soft); }
.press-item .title a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .press-item {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    gap: 0.3rem 1rem;
    align-items: start;
    padding: 1rem 0;
  }
  .press-item .logo { grid-row: 1 / 3; }
  .press-item .outlet { font-size: 0.88rem; }
  .press-item .title { font-size: 0.88rem; }
}

/* PDF embed (article wrapper pages) */
.press-pdf {
  margin: 1rem 0 2rem 0;
}
.press-pdf iframe {
  width: 100%;
  height: 85vh;
  border: 1px solid var(--rule);
  background: #f7f6f3;
}
@media (max-width: 820px) {
  .press-pdf iframe { height: 70vh; }
}

/* Underlined external link */
.underlined-link, .lead a.underlined-link {
  border-bottom: 1px solid var(--ink);
}
.underlined-link::after {
  content: " \2197";
  font-size: 0.85em;
  color: var(--ink-soft);
}

/* -------- Meta blocks (paroles) -------- */
.meta-block { border-top: 1px solid var(--rule); padding-top: 1.5rem; margin-bottom: 2rem; }
.meta-block h4 { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.25rem; }
.meta-block .year { color: var(--ink-soft); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.meta-block .details { max-width: 72ch; color: var(--ink); font-size: 0.92rem; line-height: 1.55; }

ul.clean { list-style: none; padding: 0; margin: 0 0 1.2rem 0; }
ul.clean li { padding: 0.4rem 0; border-bottom: 1px solid var(--rule); max-width: 72ch; font-size: 0.93rem; }
ul.clean li:last-child { border-bottom: none; }

/* -------- Paroles two-column layout (text left, single column of thumbs right) -------- */
.paroles-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
  margin-top: 2rem;
}
.paroles-text { min-width: 0; }
.paroles-text .page-intro { margin-bottom: 2rem; }
.paroles-text .page-intro h1 { margin-bottom: 0.8rem; }

.paroles-column {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: flex-end;
  margin-top: 13rem;
}
@media (max-width: 900px) {
  .paroles-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem 0.8rem;
    margin-top: 0;
    align-items: start;
  }
}
.paroles-column figure {
  margin: 0;
  width: 50%;
  display: flex;
  flex-direction: column;
}
.paroles-column img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: opacity 250ms ease;
}
.paroles-column img.is-natural {
  aspect-ratio: auto;
  height: auto;
  object-fit: initial;
}
.paroles-column figure:hover img { opacity: 0.86; }
.paroles-column figcaption {
  font-size: 0.72rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin-top: 0.5rem;
}
@media (max-width: 900px) {
  .paroles-column figure { width: 100%; }
  .paroles-column figcaption { font-size: 0.68rem; line-height: 1.35; }
}
@media (max-width: 900px) {
  .paroles-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}
.paroles-mosaic figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.paroles-mosaic img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: opacity 250ms ease;
}
.paroles-mosaic a:hover img,
.paroles-mosaic figure:hover img { opacity: 0.86; }
.paroles-mosaic figcaption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin-top: 0.55rem;
}
@media (max-width: 900px) {
  .paroles-mosaic { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .paroles-mosaic { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* Section heading (replaces uppercased h3 at section level) */
.section-heading {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2.5rem 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  text-transform: none;
  letter-spacing: 0;
}

/* -------- Contact -------- */
.contact {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}
.contact a.email {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 400;
  color: var(--ink);
}

/* -------- Marquee (bandeau défilant home) -------- */
.marquee {
  width: 100%;
  overflow: hidden;
  padding: 3rem 0 3.5rem 0;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}
.marquee-track {
  display: flex;
  gap: 1.8rem;
  width: max-content;
  animation: marquee-scroll 55s linear infinite;
  align-items: flex-start;
}
.marquee-item {
  margin: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.marquee-item img {
  height: 300px;
  width: auto;
  max-width: none;
  display: block;
  object-fit: cover;
}
.marquee-item figcaption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-top: 0.7rem;
  max-width: 280px;
  font-weight: 400;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (max-width: 820px) {
  .marquee-track { gap: 1.2rem; animation-duration: 40s; }
  .marquee-item img { height: 225px; }
  .marquee-item figcaption { font-size: 0.72rem; max-width: 220px; }
}

/* -------- Carousel (used inside .project-img on /projets) -------- */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  max-height: 75vh;
  overflow: hidden;
  background: #f4f4f4;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 700ms ease;
  pointer-events: none;
}
.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: auto;
  max-height: none;
}
.carousel-slide figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  color: #fff;
  font-size: 0.78rem;
  padding: 2.2rem 1rem 0.8rem 1rem;
  line-height: 1.35;
}
.carousel-nav {
  position: absolute;
  bottom: 0.9rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.88);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0.55;
  transition: opacity 200ms ease, background 200ms ease;
  font-family: var(--sans);
  padding: 0 0 2px 0;
}
.carousel-nav:hover { opacity: 1; background: #fff; }
.carousel:hover .carousel-nav { opacity: 0.85; }
.carousel-prev { right: 3.4rem; }
.carousel-next { right: 0.9rem; }
.project img.carousel-slide-img-fix { aspect-ratio: auto; max-height: none; }

/* -------- Footer -------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.2rem var(--gutter) 2rem;
  background: var(--bg);
}
.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); border-bottom-color: var(--ink-soft); }
.site-footer .legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* -------- Utilities -------- */
.hr { border: none; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.tight { margin-bottom: 0.4em; }
.mt { margin-top: 2.5rem; }
.disabled-link { color: var(--ink-soft); cursor: not-allowed; pointer-events: none; }
.placeholder {
  display: block;
  background: #f4f4f4;
  aspect-ratio: 4/3;
  width: 100%;
}

/* -------- Prototype banner -------- */
.proto-flag {
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  text-align: center;
}
.proto-flag a { color: #fff; border-bottom: 1px solid #fff; }
