/* --- GABARIT COMMUN DES PAGES PROJET --- */
.project-category {
  display: inline-block;
  margin-bottom: 10px;
  color: #012cc9;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-introduction {
  max-width: 760px;
  margin: 0 0 28px;
  color: #333;
  font-size: 1.08rem;
  line-height: 1.7;
}

.project-introduction > p:first-child {
  color: #012095;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
}

.project-introduction strong {
  color: #012095;
}

.project-introduction p {
  margin: 0 0 14px;
}

.project-introduction p:last-of-type {
  margin-bottom: 8px;
}

.project-introduction ul {
  margin: 0;
  padding-left: 1.5rem;
}

.project-introduction li + li {
  margin-top: 8px;
}

.project-direct-render {
  max-width: 900px;
  margin: 18px 0 30px;
}

.project-direct-render h2 {
  margin: 0 0 12px;
  color: #012095;
  font-size: 1.35rem;
}

.project-direct-render img,
.project-direct-render video {
  display: block;
  width: 100%;
  max-height: 520px;
  border: 1px solid rgba(1, 32, 149, 0.18);
  border-radius: 10px;
  background: #f4f6ff;
  object-fit: contain;
}

.project-direct-render--gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-direct-render--gallery h2 {
  grid-column: 1 / -1;
}

.project-direct-render--gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(1, 32, 149, 0.18);
  border-radius: 10px;
  background: #fff;
}

.project-direct-render--gallery img {
  height: 300px;
  border: 0;
  border-radius: 0;
}

.project-direct-render figcaption {
  padding: 8px 10px;
  color: #4a5568;
  font-size: 0.88rem;
}

.project-direct-render .project-video-card {
  max-width: 820px;
}

.project-direct-render .project-video-card img {
  max-height: none;
}

.project-direct-render--identity {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 32px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 15% 20%, #fff681 0 3px, transparent 4px),
    radial-gradient(circle at 82% 72%, #fff 0 3px, transparent 4px),
    linear-gradient(145deg, #72a9ff 0%, #012095 100%);
  color: #fff;
  text-align: center;
}

.project-direct-render--identity h2 {
  margin: 0;
}

.project-direct-render--identity strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
}

.project-feature-video {
  max-width: 820px;
  margin: 18px 0 28px;
}

.project-feature-video .project-video-card {
  max-width: none;
}

.project-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-video-grid .project-video-card {
  min-width: 0;
}

@media (max-width: 760px) {
  .project-video-grid {
    grid-template-columns: 1fr;
  }
}

.project-subtitle {
  margin: 30px 0 12px;
  color: #012095;
  font-size: 1.35rem;
}

.renders-motion-page .article-main > .project-video-grid {
  display: block;
}

.renders-motion-page .project-feature-video {
  max-width: 1000px;
  margin: 34px 0 56px;
  padding: 26px;
  border: 1px solid rgba(114, 169, 255, 0.4);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff 0%, #f5f8ff 100%);
  box-shadow: 0 14px 30px rgba(1, 32, 149, 0.1);
}

.renders-motion-page .project-feature-video > .project-video-grid {
  display: block;
}

.renders-motion-page .project-carousel {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #10152a;
  box-shadow: 0 8px 20px rgba(1, 18, 90, 0.18);
}

.renders-motion-page .project-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  scroll-snap-align: center;
}

.renders-motion-page .project-carousel-slide.project-video-card {
  margin: 0;
}

.renders-motion-page .project-video-card {
  display: block;
  width: 100%;
  margin: 0;
  border-radius: 14px;
}

.renders-motion-page .project-video-card img,
.renders-motion-page .project-feature-video video {
  width: 100%;
  max-height: none;
  height: auto;
  object-fit: contain;
  background: #111;
}

.renders-motion-page .project-carousel-shell {
  gap: 14px;
}

.renders-motion-page .project-video-card img {
  display: block;
}

.renders-motion-page .project-carousel-button {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  box-shadow: 0 5px 12px rgba(1, 32, 149, 0.2);
}

.renders-motion-page .project-carousel-button:disabled {
  opacity: 0.35;
}

.renders-motion-page .project-feature-video video {
  height: auto;
}

.renders-motion-page .project-animation-render video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #111;
}

@media (max-width: 700px) {
  .renders-motion-page .project-feature-video {
    padding: 16px;
    border-radius: 14px;
  }

  .renders-motion-page .project-carousel-shell {
    gap: 6px;
  }

  .renders-motion-page .project-carousel-button {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
}

.project-designs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.project-designs figure {
  margin: 0;
}

.project-designs img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid rgba(1, 32, 149, 0.18);
  border-radius: 8px;
  background: #fff;
}

.project-designs figcaption {
  margin-top: 6px;
  color: #555;
  font-size: 0.82rem;
}

.project-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-social-links a {
  padding: 8px 12px;
  border: 1px solid #72a9ff;
  border-radius: 999px;
  color: #012095;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.project-social-links a:hover {
  background: rgba(114, 169, 255, 0.14);
  text-decoration: none;
}

.project-video-card {
  display: block;
}

.project-video-carousel .project-carousel-slide {
  flex-basis: min(320px, 85%);
}

.project-video-carousel .project-carousel-slide img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-video-carousel .project-carousel-slide span {
  display: block;
  padding: 10px 12px;
  color: #fff;
  font-weight: 600;
}
.project-overview {
  display: grid;
  gap: 18px;
  margin: 28px 0 42px;
  padding: 0;
  background: transparent;
}

.project-overview-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  align-items: center;
  gap: 34px;
  min-height: 210px;
  padding-bottom: 16px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #72a9ff, #012095) 1;
}

.project-overview-section:nth-child(even) {
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr);
}

.project-overview-section:nth-child(even) .project-section-copy {
  order: 2;
}

.project-overview-section:nth-child(even) .project-section-visual {
  order: 1;
}

.project-overview-section:nth-child(2):not(:has(.project-media-gallery)):not(:has(.project-photo-carousels)) {
  grid-template-columns: 1fr;
}

.project-overview-section:nth-child(2) .project-section-copy {
  order: 1;
}

.project-overview-section:nth-child(2) .project-section-visual {
  display: none;
}

.project-overview-section:has(.project-media-gallery) {
  grid-template-columns: 1fr;
  align-items: start;
}

.project-overview-section:has(.project-photo-carousels) {
  grid-template-columns: 1fr;
  align-items: start;
}

.project-overview-section:has(.project-media-gallery) .project-section-copy {
  order: 1;
}

.project-overview-section:has(.project-media-gallery) .project-media-gallery {
  order: 2;
  width: 100%;
}

.project-overview-section:has(.project-photo-carousels) .project-section-copy {
  order: 1;
}

.project-overview-section:has(.project-photo-carousels) .project-photo-carousels {
  order: 2;
}

.project-overview-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-section-copy {
  min-width: 0;
}

.project-overview-section h2 {
  margin: 0 0 10px;
  color: #012095;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
}

.project-overview-section p,
.project-overview-section ul {
  margin: 0;
  color: #333;
  font-size: 1.02rem;
  line-height: 1.6;
}

.project-overview-section ul {
  padding-left: 1.2rem;
}

.project-overview-section li + li {
  margin-top: 4px;
}

.project-section-visual {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 360px);
  min-height: 180px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background-color: #012095;
  background-image:
    radial-gradient(circle at 12% 18%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 86% 20%, #fff681 0 3px, transparent 4px),
    radial-gradient(circle at 70% 76%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 22% 82%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 42%, #fff681 0 2px, transparent 3px),
    linear-gradient(145deg, #72a9ff 0%, #3159c8 45%, #012095 100%);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 14px rgba(1, 18, 90, 0.65);
  box-shadow: 0 8px 20px rgba(26, 11, 91, 0.12);
}

.project-section-visual::before,
.project-section-visual::after {
  content: "✦";
  position: absolute;
  color: #fff681;
  text-shadow: 0 0 10px rgba(255, 246, 129, 0.9);
}

.project-section-visual::before {
  top: 18px;
  left: 22px;
  font-size: 1.4rem;
}

.project-section-visual::after {
  right: 22px;
  bottom: 16px;
  font-size: 2rem;
}

.project-section-visual span {
  position: relative;
  z-index: 1;
}

.project-carousel {
  position: relative;
  display: flex;
  gap: 14px;
  margin-top: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.project-carousel::-webkit-scrollbar {
  display: none;
}

.project-carousel-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.project-carousel-shell .project-carousel {
  min-width: 0;
  margin-top: 10px;
}

.project-carousel-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #012095;
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.project-carousel-button:hover,
.project-carousel-button:focus-visible {
  background: #3159c8;
  transform: scale(1.08);
}

.project-carousel-button:focus-visible {
  outline: 3px solid #fff681;
  outline-offset: 2px;
}

.project-carousel-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.project-carousel-slide {
  flex: 0 0 min(260px, 82%);
  min-height: 150px;
  padding: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(114, 169, 255, 0.45);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 20%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 84% 18%, #fff681 0 3px, transparent 4px),
    radial-gradient(circle at 72% 78%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    linear-gradient(145deg, #72a9ff 0%, #3159c8 45%, #012095 100%);
  color: #fff;
}

.project-carousel {
  scrollbar-color: #012095 rgba(114, 169, 255, 0.18);
}

.project-carousel-slide img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.project-photo-carousels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}

.project-photo-carousel {
  min-width: 0;
}

.project-photo-carousel h3 {
  margin: 0;
  color: #012095;
  font-size: 1.05rem;
}

.project-photo-carousel .project-carousel {
  margin-top: 10px;
}

.project-photo-carousel .project-carousel-slide {
  flex: 0 0 100%;
}

.project-photo-carousel .project-carousel-slide img {
  height: auto;
  object-fit: contain;
  background: #f4f6ff;
}

.project-carousel-slide strong {
  display: block;
  margin-bottom: 12px;
  color: #fff681;
  font-family: 'Space Grotesk', sans-serif;
}

.article-content .project-carousel-slide p {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
}

.project-media-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}

.project-media-gallery--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-media-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(114, 169, 255, 0.35);
  border-radius: 8px;
  background: #fff;
}

.project-media-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: #f4f6ff;
}

.project-media-gallery figcaption {
  padding: 8px 10px;
  color: #4a5568;
  font-size: 0.82rem;
}

.project-video-embed {
  display: block;
  width: 100%;
  min-height: 240px;
  margin-top: 18px;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 8px;
  background: #111;
}

.project-video-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #72a9ff;
  border-radius: 999px;
  margin-top: 10px;
  color: #012095;
  font-weight: 600;
}

.project-video-link:hover,
.project-video-link:focus-visible {
  background: rgba(114, 169, 255, 0.12);
  color: #012095;
  text-decoration: none;
}

.project-video-card {
  position: relative;
  display: block;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  text-decoration: none;
}

.project-video-card:focus-visible {
  outline: 3px solid #efbf04;
  outline-offset: 3px;
}

.project-video-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.86;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-video-card span {
  position: absolute;
  inset: auto 16px 14px;
  font-weight: 700;
  text-shadow: 0 1px 5px #000;
}

.project-video-card:hover img,
.project-video-card:focus-visible img {
  opacity: 1;
  transform: scale(1.02);
}

.project-local-video {
  display: block;
  width: 100%;
  margin-top: 18px;
  border-radius: 8px;
  background: #111;
}

.project-local-gif {
  height: auto;
  object-fit: contain;
}

/* Les galeries de rendu se parcourent horizontalement comme un carrousel. */
.project-media-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.project-media-gallery::-webkit-scrollbar {
  display: none;
}

.project-media-gallery figure {
  flex: 0 0 min(360px, 88%);
  scroll-snap-align: start;
}

.project-media-gallery--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
  align-items: start;
}

.project-media-gallery--two figure {
  flex: initial;
  min-width: 0;
}

.project-media-gallery--two img {
  width: 100%;
  height: 420px;
  object-fit: contain;
}

.project-media-gallery--assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
  align-items: start;
}

.project-media-gallery--assets figure {
  min-width: 0;
}

.project-media-gallery--assets img {
  width: 100%;
  height: clamp(140px, 12vw, 180px);
  object-fit: contain;
}

.project-steps {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.project-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, 28%);
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(114, 169, 255, 0.35);
  border-radius: 8px;
  background: #fff;
}

.project-step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
}

.project-step h3 {
  margin: 0 0 5px;
  color: #012095;
  font-size: 1.05rem;
}

.project-step p {
  margin: 0;
  color: #333;
}

.project-step img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 6px;
  background: #f4f6ff;
}

.article-content > p,
.article-content > h2,
.article-content > h3,
.article-content > ul,
.article-content > .article-video,
.article-content > .article-video-media,
.article-content > .carousel-container {
  padding-bottom: 22px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #72a9ff, #012095) 1;
}

.article-content > :last-child {
  border-bottom: 0;
}

.article-separator {
  height: 2px;
  border: 0 !important;
  background: linear-gradient(90deg, #72a9ff, #012095) !important;
}

.related-projects {
  align-self: start;
  min-width: 0;
  margin: 0;
  padding: 24px;
  border-top: 0;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, #72a9ff, #012095) 1;
  background: transparent;
}

.related-projects h2 {
  margin: 0 0 20px;
  color: #012095;
  font-size: 1.35rem;
}

.related-projects-grid {
  display: grid;
  gap: 16px;
}

.related-projects-group {
  min-width: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1.5px solid transparent;
  border-image: linear-gradient(90deg, #72a9ff, #012095) 1;
  border: 1px solid rgba(114, 169, 255, 0.45);
  border-width: 1px;
  border-radius: 8px;
  padding: 16px;
}

.related-projects-group h3 {
  margin: 0 0 12px;
  color: #012095;
  font-size: 1.05rem;
}

.related-projects-group ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-projects-group a {
  overflow-wrap: anywhere;
  color: #333;
  font-weight: 500;
}

.related-projects-group a:hover {
  color: #012095;
}

/* --- PAGE PROJET (MAIN GRID) --- */
.article-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 50px;
  padding: 50px 0;
}

/* --- COLONNE PRINCIPALE --- */
.article-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.article-tag {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #72a9ff;
  background: rgba(114, 169, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: 15px;
}

.article-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.project-skills-band {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 0 0 24px;
  padding: 12px 18px;
  overflow-x: auto;
  border-radius: 6px;
  background: linear-gradient(90deg, #72a9ff, #012095);
  color: #fff;
  scrollbar-width: none;
}

/* Toutes les pages projet suivent le gabarit éditorial d'Endogamie. */
.project-page .project-skills-band {
  display: none;
}

.project-steps-section {
  grid-template-columns: 1fr;
  align-items: start;
}

.project-steps-section .project-section-copy {
  width: 100%;
}

.project-steps-section > .project-section-visual {
  display: none;
}

.project-skills-section ul {
  margin-top: 12px;
}

.project-steps-section ul {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  counter-reset: project-step;
}

.project-steps-section li {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  padding: 12px 16px 12px 58px;
  border: 1px solid rgba(114, 169, 255, 0.35);
  border-radius: 8px;
  background: #fff;
  color: #333;
}

.project-steps-section li::before {
  content: counter(project-step);
  counter-increment: project-step;
  position: absolute;
  left: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
}

/* La deuxième section garde le même rythme alterné que le modèle Endogamie. */
.project-overview-section:nth-child(2):not(:has(.project-media-gallery)):not(:has(.project-photo-carousels)) {
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr);
}

.project-overview-section:nth-child(2):not(:has(.project-media-gallery)):not(:has(.project-photo-carousels)) .project-section-visual {
  display: grid;
}

.project-skills-band::-webkit-scrollbar {
  display: none;
}

.project-skills-band h2 {
  flex: 0 0 auto;
  margin: 0;
  color: #fff681;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-skills-band ul {
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.project-skills-band li {
  position: relative;
  font-size: 0.92rem;
}

.project-skills-band li + li::before {
  content: "✦";
  margin-right: 18px;
  color: #fff681;
}

/* Séparateur ornemental sous le titre */
.article-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 15px 0 20px 0;
}

.article-ornament .line {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, #72a9ff, #012095);
}

.article-ornament .star {
  width: 16px;
  height: 16px;
  fill: #efbf04;
  flex-shrink: 0;
}

.article-meta time {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  display: block;
  margin-bottom: 30px;
}

.article-content p {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 20px;
}

.article-content h2 {
  font-size: 1.6rem;
  margin: 30px 0 15px 0;
  padding-bottom: 5px;
  border-bottom: 2px solid rgba(114, 169, 255, 0.3);
}

.article-content h3 {
  font-size: 1.3rem;
  margin: 30px 0 20px 0;
}

/* --- ÉTAPES DU PROCESSUS CRÉATIF (SÉPARATEURS ÉTOILÉS) --- */
.process-step {
  position: relative;
  padding-bottom: 35px;
  margin-bottom: 35px;
}

/* Ligne de séparation en dégradé sous chaque étape */
.process-step::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #72a9ff, #012095, transparent);
}

/* Étoile au centre de la ligne de séparation */
.process-step::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #fff681 0%, #efbf04 100%);
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
  z-index: 2;
}

/* Supprime le séparateur sur la dernière étape */
.process-step:last-of-type::after,
.process-step:last-of-type::before {
  display: none;
}

.process-content h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #012095;
}

.process-content p {
  margin-bottom: 0;
  color: #444;
}

/* --- BARRE LATÉRALE (SIDEBAR) --- */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-section {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(26, 11, 91, 0.03);
}

.sidebar-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #72a9ff;
}

.recent-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-post-item h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

.recent-post-item a {
  color: #1a0b5b;
}

.recent-post-item a:hover {
  color: #012095;
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-list li a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
  display: block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.category-list li a:hover {
  color: #012095;
  transform: translateX(4px);
  text-decoration: none;
}

@media (max-width: 900px) {
  .project-designs {
    grid-template-columns: 1fr;
  }

  .project-introduction {
    font-size: 1rem;
  }

  .article-page {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .article-title {
    font-size: 1.8rem;
  }

  .related-projects-grid {
    grid-template-columns: 1fr;
  }

  .related-projects {
    border-left: 0;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, #72a9ff, #012095) 1;
    padding: 28px 0 0;
  }

  .project-overview-section,
  .project-overview-section:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-overview-section:nth-child(even) .project-section-copy,
  .project-overview-section:nth-child(even) .project-section-visual {
    order: initial;
  }

  .project-media-gallery {
    grid-template-columns: 1fr;
  }

  .project-direct-render--gallery {
    grid-template-columns: 1fr;
  }

  .project-direct-render--gallery h2 {
    grid-column: auto;
  }

  .project-media-gallery--two {
    grid-template-columns: 1fr;
    display: grid;
  }

  .project-media-gallery--two img {
    height: auto;
  }

  .project-media-gallery--assets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-media-gallery--assets img {
    height: 140px;
  }

  .project-step {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .project-step img {
    grid-column: 2;
    height: auto;
    max-height: 220px;
  }

  .project-photo-carousels {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 560px) {
  .project-direct-render--gallery img {
    height: auto;
  }
  .project-media-gallery--assets {
    grid-template-columns: 1fr;
  }

  .project-media-gallery--assets img {
    height: auto;
  }

  .project-step {
    grid-template-columns: 1fr;
  }

  .project-step-number {
    margin-bottom: -6px;
  }

  .project-step img {
    grid-column: auto;
  }

  .project-steps-section li {
    grid-template-columns: 1fr;
    padding-left: 58px;
  }
}

/* --- RÉFÉRENCE VISUELLE COMMUNE : PAGE ENDOGAMIE --- */
.project-page .project-section-visual,
.project-page .project-direct-render--identity {
  display: none !important;
}

.project-web-renders h2 {
  margin-bottom: 14px;
}

.project-web-renders-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-web-renders-carousel {
  width: 100%;
}

.project-web-renders-carousel .project-carousel-slide {
  flex-basis: min(360px, 85%);
  min-height: 150px;
}

.project-overview-render {
  display: none !important;
}

.project-web-render-card {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border: 1px solid rgba(1, 32, 149, 0.18);
  border-radius: 10px;
  background: #f4f6ff;
  color: #012095;
  text-decoration: none;
}

.project-web-render-card:hover,
.project-web-render-card:focus-visible {
  background: #e8edff;
  text-decoration: none;
}

.project-web-render-card:focus-visible {
  outline: 3px solid #efbf04;
  outline-offset: 3px;
}

.project-web-render-card__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.project-web-render-card__action {
  font-weight: 700;
}

.project-pdf-preview {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
}

.project-pdf-preview iframe {
  display: block;
  width: 100%;
  min-height: 620px;
  border: 1px solid rgba(1, 32, 149, 0.18);
  border-radius: 10px;
  background: #f4f6ff;
}

.project-pdf-preview a {
  width: fit-content;
  color: #012095;
  font-weight: 700;
}

.project-media-gallery video,
.project-process-video {
  display: block;
  width: 100%;
  max-height: 620px;
  border-radius: 8px;
  background: #111;
}

.print-system-renders {
  max-width: 100%;
}

.print-system-domain {
  margin-top: 28px;
}

.print-system-subdomain {
  margin-top: 24px;
}

.print-system-subdomain h4 {
  margin: 0 0 8px;
  color: #012095;
  font-size: 1.08rem;
}

.print-system-subdomain-intro {
  margin: 0 0 8px;
  color: #31406f;
  font-size: 0.95rem;
}

.print-system-domain h3 {
  margin: 0 0 12px;
  color: #012095;
  font-size: 1.25rem;
}

.print-system-carousel .project-carousel-slide {
  flex: 0 0 100%;
  min-height: 0;
  padding: 12px;
}

.print-system-carousel .project-carousel-slide img,
.print-system-carousel .project-carousel-slide video {
  display: block;
  width: 100%;
  height: clamp(260px, 58vw, 560px);
  max-height: 560px;
  object-fit: contain;
  border-radius: 6px;
  background: #f4f6ff;
}

.print-system-carousel figcaption {
  margin-top: 10px;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.print-system-motion-carousel .project-carousel-slide {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 6px;
  background: #111;
}

.print-system-motion-carousel .project-carousel-slide,
.print-system-motion-carousel .project-carousel-slide video {
  height: auto;
  min-height: 260px;
  max-height: 560px;
  background: #111;
}

.print-system-bookmark-carousel .project-carousel-slide img {
  height: auto;
  aspect-ratio: 2 / 5;
  object-fit: contain;
}

.print-system-postcard-carousel .project-carousel-slide img {
  height: clamp(220px, 32vw, 360px);
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.print-system-postcard-carousel .project-carousel-slide {
  flex: 0 0 calc((100% - 14px) / 2);
}

.print-system-bookmark-carousel .project-carousel-slide {
  flex: 0 0 calc((100% - 28px) / 3);
  padding: 10px;
}

@media (max-width: 700px) {
  .print-system-bookmark-carousel .project-carousel-slide {
    flex-basis: calc((100% - 14px) / 2);
  }

  .print-system-postcard-carousel .project-carousel-slide {
    flex-basis: 100%;
  }
}

.print-system-overview {
  margin-top: 26px;
}

.game-projects {
  display: grid;
  gap: 42px;
}

.game-project {
  min-width: 0;
  padding-bottom: 34px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #72a9ff, #012095) 1;
}

.game-project:last-child {
  padding-bottom: 0;
  border-bottom: 0;
  border-image: none;
}

.game-project h2 {
  margin-bottom: 10px;
  color: #012095;
}

.game-project > p {
  max-width: 70ch;
  margin-bottom: 18px;
}

.game-project-carousel .project-carousel-slide {
  flex-basis: min(620px, 88%);
  min-height: 0;
  padding: 14px;
}

.game-project-carousel .project-carousel-slide img,
.game-project-carousel .project-carousel-slide video {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 6px;
  background: #f4f6ff;
}

.game-project-carousel .project-carousel-slide video {
  aspect-ratio: 16 / 9;
  background: #111;
}

.game-project-carousel figcaption {
  margin-top: 8px;
  color: #fff;
  font-weight: 700;
}

.project-animation-renders {
  max-width: 100%;
}

.project-animation-renders .project-carousel-shell {
  width: 100%;
}

.project-animation-renders .project-carousel-slide {
  flex-basis: min(760px, 92%);
  min-height: 0;
  padding: 18px;
}

.project-animation-render h3 {
  margin: 0 0 14px;
  color: #fff681;
  font-size: 1.15rem;
}

.project-animation-render video {
  display: block;
  width: 100%;
  max-height: 620px;
  border-radius: 6px;
  background: #111;
}

.project-page .project-overview-section,
.project-page .project-overview-section:nth-child(even),
.project-page .project-skills-section {
  grid-template-columns: 1fr;
  align-items: start;
}

.project-page .project-overview-section:nth-child(even) .project-section-copy {
  order: initial;
}

.project-page .article-content {
  min-width: 0;
  padding: 0;
}

.project-page .project-direct-render {
  width: 100%;
  max-width: 900px;
  margin: 18px 0 30px;
}

.project-page .project-introduction {
  width: 100%;
  max-width: 760px;
  margin: 0 0 28px;
}

.project-page .project-overview {
  width: 100%;
  margin: 28px 0 42px;
  gap: 18px;
}

.project-page .project-overview-section {
  width: 100%;
  min-width: 0;
  min-height: 210px;
  padding-bottom: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  gap: 34px;
  align-items: center;
}

.project-page .project-overview-section:nth-child(even) {
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr);
}

.project-page .project-overview-section:nth-child(even) .project-section-copy {
  order: 2;
}

.project-page .project-overview-section:nth-child(even) .project-section-visual {
  order: 1;
}

.project-page .project-overview-section:has(.project-media-gallery),
.project-page .project-overview-section:has(.project-photo-carousels) {
  grid-template-columns: 1fr;
  align-items: start;
}

.project-page .project-overview-section:has(.project-media-gallery) .project-section-copy,
.project-page .project-overview-section:has(.project-photo-carousels) .project-section-copy,
.project-page .project-overview-section:has(.project-media-gallery) .project-media-gallery,
.project-page .project-overview-section:has(.project-photo-carousels) .project-photo-carousels {
  order: initial;
}

.project-page .project-steps-section {
  grid-template-columns: 1fr;
  align-items: start;
}

.project-page .project-steps-section .project-section-copy {
  width: 100%;
  min-width: 0;
}

.project-page .project-steps-section > .project-section-visual {
  display: none;
}

.project-page .project-steps-section ul {
  width: 100%;
  min-width: 0;
}

.project-page .project-steps-section li {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 12px 16px 12px 58px;
}

.project-page .project-skills-section {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
}

.project-page .project-overview-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

@media (max-width: 900px) {
  .project-page .project-overview-section,
  .project-page .project-overview-section:nth-child(even),
  .project-page .project-skills-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-page .project-overview-section:nth-child(even) .project-section-copy,
  .project-page .project-overview-section:nth-child(even) .project-section-visual {
    order: initial;
  }

  /* Projets temporairement masqués des recommandations. */
  .related-projects li:has(a[href="da-de-lisopya.html"]),
  .related-projects li:has(a[href="communication-de-lisopya.html"]) {
    display: none;
  }

  .project-page .project-section-visual {
    width: min(100%, 360px);
  }

  .project-web-renders-grid {
    grid-template-columns: 1fr;
  }
}

/* Aucun visuel de remplissage : les sections utilisent toute la largeur. */
.project-page .project-overview-section,
.project-page .project-overview-section:nth-child(even),
.project-page .project-skills-section,
.project-page .project-overview-section:has(.project-media-gallery),
.project-page .project-overview-section:has(.project-photo-carousels) {
  grid-template-columns: 1fr;
}

.project-page .project-overview-section:nth-child(even) .project-section-copy,
.project-page .project-overview-section:nth-child(even) .project-section-visual {
  order: initial;
}