/* ============================================================
   KOKOMO — PIXEL · pages internes (expertises / contenus / réalisations)
   Dépend de pixel.css (tokens, reset, nav, footer, boutons, cartes).
   ============================================================ */

#mainContainer { position: relative; z-index: 1; }

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  width: min(960px, 92vw); margin: clamp(6.5rem, 5rem + 4vw, 8.5rem) auto 0;
  font-size: 0.9rem; color: var(--on-bg-soft);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 0.5rem; }
.breadcrumb li:not(:last-child)::after { content: "→"; color: rgba(247,247,247,0.4); }
.breadcrumb a { color: var(--on-bg-soft); font-weight: 600; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb [aria-current="page"] { color: var(--cream); font-weight: 700; }

/* ---------- PAGE HERO ---------- */
.page-hero { width: min(960px, 92vw); margin: clamp(1.5rem, 1rem + 2vw, 3rem) auto clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.section-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); background: var(--cream);
  border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 0.35rem 0.85rem 0.3rem; box-shadow: var(--sh-sm);
  transform: rotate(-1.5deg);
}
.page-hero-title {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem); line-height: 1.02;
  letter-spacing: 0.005em; color: var(--cream);
  margin-top: 1.1rem; text-shadow: 4px 4px 0 var(--ink); text-wrap: balance;
}
.page-hero-title em { font-style: normal; position: relative; white-space: nowrap; color: var(--ink); text-shadow: none; padding: 0 0.12em; z-index: 0; }
.page-hero-title em::after { content: ""; position: absolute; inset: 0.16em -0.02em 0.12em; z-index: -1; background: var(--yellow); border-radius: 4px; transform: rotate(-0.8deg); }
.page-hero-sub { font-size: var(--t-lead); color: var(--on-bg-soft); margin-top: 1.3rem; max-width: 54ch; line-height: 1.6; }

/* ---------- CONTENU / PROSE ---------- */
.page-content { width: min(960px, 92vw); margin-inline: auto; padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.page-section { margin-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem); max-width: 70ch; }
.page-section > h2 {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); line-height: 1.06;
  letter-spacing: 0.005em; color: var(--cream); margin-bottom: 1.1rem;
  scroll-margin-top: 6rem; text-wrap: balance;
}
.page-section h2 em, .page-cta h2 em { font-style: normal; position: relative; white-space: nowrap; color: var(--ink); padding: 0 0.1em; z-index: 0; }
.page-section h2 em::after, .page-cta h2 em::after { content: ""; position: absolute; inset: 0.18em -0.02em 0.14em; z-index: -1; background: var(--yellow); border-radius: 3px; transform: rotate(-0.8deg); }
.page-section h3 {
  font-family: var(--font-body); font-weight: 800;
  font-size: 1.3rem; line-height: 1.25; color: var(--cream);
  margin-top: 2rem; margin-bottom: 0.6rem;
}
.page-section > p { color: var(--on-bg); font-size: 1.075rem; line-height: 1.75; margin-bottom: 1.1rem; text-wrap: pretty; }
.page-section > p:last-child { margin-bottom: 0; }
.page-section > p strong, .page-section > ul strong, .page-section > ol strong { color: var(--cream); font-weight: 700; }
.page-section em { font-style: italic; }
.page-section > p a, .page-section > ul a, .page-section > ol a { color: var(--yellow); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.page-section > p a:hover, .page-section > ul a:hover, .page-section > ol a:hover { color: var(--cream); }
.page-section > ul:not(.feature-list), .page-section > ol { color: var(--on-bg); font-size: 1.075rem; line-height: 1.7; margin: 0 0 1.2rem 1.2rem; }
.page-section > ul:not(.feature-list) { list-style: none; }
.page-section > ul:not(.feature-list) li { position: relative; padding-left: 1.4rem; margin-bottom: 0.5rem; }
.page-section > ul:not(.feature-list) li::before { content: "▸"; position: absolute; left: 0; color: var(--yellow); }
.page-section > ol { list-style: decimal; }
.page-section > ol li { margin-bottom: 0.5rem; padding-left: 0.3rem; }

/* ---------- FEATURE LIST (cartes pixel crème) ---------- */
.feature-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(0.9rem, 0.6rem + 1vw, 1.4rem); max-width: none; }
.feature-list li {
  background: var(--cream); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh);
  padding: 1.1rem 1.2rem 1.2rem;
  font-size: 0.98rem; line-height: 1.55;
}
.feature-list li strong { display: block; font-family: var(--font-body); font-weight: 800; font-size: 1.05rem; color: var(--ink); margin-bottom: 0.35rem; }

/* ---------- MINI CARDS (réalisations liées) ---------- */
.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(1rem, 0.7rem + 1.2vw, 1.6rem); max-width: none; }
.mini-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--cream); color: var(--ink);
  border: var(--bw-lg) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  transition: transform var(--dur) var(--ease-pop), box-shadow var(--dur) var(--ease-pop);
}
.mini-card:hover { transform: translate(-2px,-3px) rotate(-0.4deg); box-shadow: var(--sh-xl); }
.mini-card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-bottom: var(--bw) solid var(--ink); border-top-left-radius: calc(var(--r-lg) - var(--bw-lg)); border-top-right-radius: calc(var(--r-lg) - var(--bw-lg)); }
.mini-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.mini-card-tag { align-self: flex-start; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--ink); color: var(--cream); border-radius: 999px; padding: 0.2rem 0.6rem; }
.mini-card-title { font-family: var(--font-body); font-weight: 800; text-transform: uppercase; font-size: 1.2rem; line-height: 1.1; color: var(--ink); }
.mini-card-desc { font-size: 0.92rem; color: rgba(17,17,17,0.72); line-height: 1.5; }

/* ---------- FAQ (accordéon pixel) ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.8rem; max-width: none; }
.faq-item {
  background: var(--cream); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm);
  overflow: hidden;
}
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-body); font-weight: 800; font-size: 1.05rem; text-align: left;
  color: var(--ink); padding: 1rem 1.2rem; cursor: pointer;
}
.faq-icon { font-style: normal; font-size: 1.4rem; line-height: 1; transition: transform var(--dur) var(--ease-pop); flex: none; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; color: rgba(17,17,17,0.78); font-size: 1rem; line-height: 1.65; padding: 0 1.2rem; transition: max-height var(--dur) var(--ease-out), padding var(--dur); }
.faq-item.open .faq-answer { max-height: 30rem; padding: 0 1.2rem 1.1rem; }

/* ---------- PAGE CTA ---------- */
.page-cta {
  width: min(960px, 92vw); margin: clamp(2rem, 1.5rem + 2vw, 3.5rem) auto 0;
  text-align: center; position: relative;
  background: radial-gradient(100% 120% at 50% 0%, rgba(252,190,16,0.16), transparent 55%), var(--green-deeper);
  border: var(--bw-lg) solid var(--ink); border-radius: 28px; box-shadow: var(--sh-xl);
  padding: clamp(2.5rem, 2rem + 4vw, 4.5rem) 1.5rem;
}
.page-cta h2 { font-family: var(--font-display); text-transform: uppercase; line-height: 1.02; font-size: clamp(1.8rem, 1.2rem + 3vw, 3.2rem); color: var(--cream); }
.page-cta p { color: var(--on-bg-soft); margin-top: 1rem; font-size: var(--t-lead); }
.btn-primary {
  display: inline-block; margin-top: 1.6rem; font-family: var(--font-body); font-weight: 700;
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.4rem); color: var(--ink); background: var(--yellow);
  border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 0.85rem 1.6rem; box-shadow: var(--sh);
  transition: transform var(--dur) var(--ease-pop), box-shadow var(--dur);
}
.btn-primary:hover { transform: translate(3px,3px); box-shadow: var(--sh-sm); }

/* ---------- SOMMAIRE (TOC) sticky pour pages longues ---------- */
.page-content.has-toc { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; max-width: min(1080px, 94vw); }
.page-article { min-width: 0; }
.page-article .page-section { max-width: 68ch; }
.page-toc { position: sticky; top: 6.5rem; align-self: start; }
.page-toc-label { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 0.8rem; color: var(--yellow); margin-bottom: 0.9rem; letter-spacing: 0.04em; }
.page-toc ul { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; border-left: 3px solid rgba(247,247,247,0.18); }
.page-toc a { display: block; padding: 0.4rem 0 0.4rem 0.9rem; margin-left: -3px; border-left: 3px solid transparent; color: var(--on-bg-soft); font-size: 0.92rem; line-height: 1.35; transition: color var(--dur), border-color var(--dur); }
.page-toc a:hover { color: var(--cream); }
.page-toc a.active { color: var(--yellow); border-color: var(--yellow); font-weight: 700; }
@media (max-width: 880px) { .page-content.has-toc { grid-template-columns: 1fr; } .page-toc { display: none; } }

/* ============================================================
   RÉALISATIONS (grille de projets + filtres + partenaires)
   ============================================================ */
.realisations-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(1.8rem, 1.2rem + 2vw, 3rem); }
.filter-btn {
  font-family: var(--font-body); font-weight: 700; font-size: 0.92rem; color: var(--cream);
  background: transparent; border: 2.5px solid rgba(247,247,247,0.28); border-radius: 999px;
  padding: 0.5rem 1.1rem; transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.filter-btn:hover { border-color: var(--cream); }
.filter-btn.active { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: var(--sh-sm); }

.realisations-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); }
.realisations-grid .project-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: var(--cream); color: var(--ink);
  border: var(--bw-lg) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  transition: transform var(--dur) var(--ease-pop), box-shadow var(--dur) var(--ease-pop);
}
.realisations-grid .project-card:hover { transform: translate(-2px,-3px) rotate(-0.4deg); box-shadow: var(--sh-xl); }
.realisations-grid .card-visual { position: relative; aspect-ratio: 16/10; overflow: hidden; border-bottom: var(--bw) solid var(--ink); border-top-left-radius: calc(var(--r-lg) - var(--bw-lg)); border-top-right-radius: calc(var(--r-lg) - var(--bw-lg)); }
.realisations-grid .card-visual-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.realisations-grid .project-card:hover .card-visual-img { transform: scale(1.05); }
.realisations-grid .card-visual-overlay { display: none; }
.realisations-grid .card-body { padding: 1.5rem 1.4rem 1.7rem; display: flex; flex-direction: column; gap: 0.65rem; }
.realisations-grid .card-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.realisations-grid .card-tag { font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; background: transparent; color: rgba(17,17,17,0.5); border: 1.5px solid rgba(17,17,17,0.2); border-radius: 999px; padding: 0.16rem 0.55rem; }
.realisations-grid .card-tag-yellow { background: transparent; color: rgba(17,17,17,0.5); }
.realisations-grid .card-category { font-size: 0.82rem; color: rgba(17,17,17,0.55); }
.realisations-grid .card-title { font-family: var(--font-body); font-weight: 800; text-transform: uppercase; font-size: clamp(1.12rem, 0.95rem + 0.55vw, 1.5rem); line-height: 1.12; color: var(--ink); }
.realisations-grid .card-desc { font-size: 0.95rem; color: rgba(17,17,17,0.72); line-height: 1.5; }
.realisations-grid .card-link { margin-top: 0.3rem; font-weight: 700; color: var(--ink); display: inline-flex; gap: 0.4rem; }
.realisations-grid .card-bar { display: none; }
@media (max-width: 900px) { .realisations-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .realisations-grid { grid-template-columns: 1fr; } }

/* partenaires (logos) */
.partenaires-logos { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); }
.partenaire-item img { height: clamp(34px, 3vw, 52px); width: auto; filter: brightness(0) invert(1); opacity: 0.85; }

/* ---------- responsive prose ---------- */
@media (max-width: 600px) {
  .page-hero-title { text-shadow: 3px 3px 0 var(--ink); }
}
