/* ─── Fonts ─── */
@font-face {
  font-family: 'Sligoil';
  src: url('../fonts/SligoilVF.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'GTWalsheim';
  src: url('../fonts/GTWalsheim-Light.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}

/* ─── Grain texture variables ─── */
:root {
  --grain-opacity: 0.30;
  --grain-blend: hard-light;
  --grain-frequency: 0.60;
  --grain-octaves: 4;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: #0d0d0d;
  color: #fff;
  font-family: 'GTWalsheim', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── Global grain/noise texture overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  isolation: isolate;
}

/* ─── Sidebar ─── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 84px;
  height: 100vh;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  background: rgb(96, 38, 158);
}

.sidebar__title {
  font-family: 'Sligoil', serif;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}

.sidebar__logo-link {
  display: block;
  flex-shrink: 0;
  width: 40px;
  height: 177px;
  position: relative;
}
.sidebar__logo-link::before,
.sidebar__logo-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity 0.3s;
}
.sidebar__logo-link::before {
  background-image: var(--logo-url);
  opacity: 0.9;
}
.sidebar__logo-link::after {
  background-image: var(--logo-url-color);
  opacity: 0;
}
.sidebar__logo-link:hover::before { opacity: 0; }
.sidebar__logo-link:hover::after  { opacity: 1; }
.sidebar__logo-img { display: none !important; }

.sidebar__heff-label {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Sligoil', serif;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 20px 9px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.sidebar__heff-label:hover {
  border-color: #fff;
  color: #fff;
}

/* ─── Menu burger ─── */
.menu-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 110;
  background: rgb(96, 38, 158);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.menu-toggle:hover {
  opacity: 0.8;
}

body.detail-open .menu-toggle {
  opacity: 0;
  pointer-events: none;
}

/* ─── Encart intro (grid item sous le hero) ─── */
.grid__intro {
  background: rgb(96, 38, 158);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 20px;
  font-size: 14px;
  line-height: 1.6;
}

.grid__intro strong {
  font-family: 'Sligoil', serif;
  font-weight: 700;
}

.grid__intro p + p {
  margin-top: 10px;
}

.grid__intro-options {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
  margin: 16px 0 8px;
}

.grid__intro-list {
  font-size: 16px;
  line-height: 20px;
}

.grid__intro-sections {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 0;
}

.grid__intro-section {
  font-family: 'GTWalsheim', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: #fff;
  text-decoration: none;
  line-height: 1.35;
  transition: opacity 0.2s;
}

.grid__intro-section:hover {
  opacity: 0.6;
}

/* ─── Grille mosaïque (vitrine — 12 projets) ─── */
.grid {
  margin-left: 84px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, calc(100vh / 4)) repeat(2, minmax(200px, auto));
  grid-template-areas:
    "a  a  s  c"
    "a  a  b  c"
    "e  f  g  d"
    "e  f  h  d"
    "i  t  t  k"
    "i  j  l  k";
  transition: opacity 0.4s;
}

body.detail-open .grid {
  opacity: 0.3;
  pointer-events: none;
}

/* ─── Encadré école (grid item) ─── */
.grid__school {
  background: rgb(96, 38, 158);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  line-height: 20px;
}

.grid__school-name {
  font-family: 'GTWalsheim', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.4;
  margin-bottom: 12px;
}

.grid__school-address {
  font-family: 'GTWalsheim', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.4;
  opacity: 0.85;
}

/* ─── Grid items ─── */
.grid__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 0;
}

/* ─── Tooltip violet (hover) ─── */
.grid__tooltip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgb(96, 38, 158);
  color: #fff;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.5;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.grid__item:hover .grid__tooltip {
  transform: translateY(0);
}

.grid__tooltip-option {
  display: inline-block;
  font-family: 'Sligoil', serif;
  font-weight: 300;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 4px 12px;
}

.grid__tooltip-title {
  display: block;
  font-family: 'Sligoil', serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.grid__tooltip-etudiants {
  display: block;
  font-family: 'GTWalsheim', sans-serif;
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 8px;
  opacity: 0.85;
}

.grid__tooltip-desc {
  font-family: 'GTWalsheim', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.85;
}

.grid__tooltip-author {
  display: block;
  font-size: 11px;
  opacity: 0.7;
}

/* ─── Grille archive (CSS Grid colonnes variables 2fr 1fr 1.5fr 0.8fr) ─── */
.grid-archive {
  margin-left: 84px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 0.8fr;
  gap: 0;
  align-items: start;
}

.grid-archive__col {
  display: flex;
  flex-direction: column;
}

.grid-archive__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.grid-archive__item img {
  display: block;
  width: 100%;
  height: auto; /* ratio natif préservé */
}

.grid-archive__item:hover img {
  filter: brightness(0.7);
}

/* Cacher la zone archive quand un détail est ouvert (comme la vitrine) */
body.detail-open .grid-archive {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.4s;
}

/* Responsive: sur mobile, 2 colonnes */
@media (max-width: 768px) {
  .grid-archive {
    margin-left: 44px;
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Vue détail ─── */
.detail {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.50);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  overflow-y: auto;
}

.detail__inner {
  margin: 60px;
  margin-left: calc(84px + 60px);
}

.detail[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.detail__close {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 210;
  background: rgb(96, 38, 158);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  line-height: 1;
}

.detail__close:hover {
  opacity: 0.8;
}

.detail__masonry {
  columns: 3;
  column-gap: 8px;
  padding: 4px;
  min-height: 100%;
}

.detail__media,
.detail__info,
.detail__video-wrap {
  break-inside: avoid;
  margin-bottom: 8px;
  display: block;
  background: #0d0d0d;
}

.detail__media {
  width: 100%;
  height: auto;
}

/* ─── Three.js viewer ─── */

/* L'overlay detail--threejs ne scrolle pas et n'a pas de padding */
.detail--threejs {
  overflow: hidden;
}

.detail--threejs .detail__masonry {
  display: block;
  padding: 0;
  min-height: 0;
}

/* La vignette info : position fixe en haut à gauche, par-dessus le canvas */
.detail--threejs .detail__info {
  position: fixed;
  top: 1.5rem;
  left: calc(84px + 1.5rem); /* après la sidebar */
  z-index: 220;
  max-width: 340px;
  background: rgb(96, 38, 158);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  pointer-events: auto;
}

/* Le viewer occupe tout le viewport */
.detail__threejs-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.detail__threejs-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.detail__threejs-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.detail__threejs-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.detail__threejs-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail__threejs-spinner svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: tg-spinner-rotate 2s linear infinite;
}

.detail__threejs-spinner-arc {
  transition: stroke-dashoffset 0.3s ease-out;
}

@keyframes tg-spinner-rotate {
  from { transform: rotate(0deg);   transform-origin: center; }
  to   { transform: rotate(360deg); transform-origin: center; }
}

.detail__threejs-loading-pct {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

.detail__threejs-loading-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  white-space: nowrap;
}

.detail__threejs-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  margin: 0;
}

.detail__threejs-hint svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.detail__threejs-hint-sep {
  opacity: 0.4;
  margin: 0 0.1rem;
}

/* ─── Iframe externe ─── */
.detail__iframe-wrap {
  column-span: all;
  width: 100%;
  height: 80vh;
  border-radius: 8px;
  overflow: hidden;
}

.detail__iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ─── Video poster overlay ─── */
.detail__video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.detail__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail__video-poster {
  position: relative;
  width: 100%;
  display: block;
  cursor: pointer;
}

.detail__video-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.detail__video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: rgba(96, 38, 158, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.detail__video-play svg {
  width: 28px;
  height: 28px;
}

.detail__video-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(96, 38, 158, 1);
}

.detail__thumb.detail__video-wrap {
  position: relative;
}

.detail__thumb .detail__video-play {
  width: 40px;
  height: 40px;
}

.detail__thumb .detail__video-play svg {
  width: 20px;
  height: 20px;
}

.detail__info {
  flex-shrink: 0;
  background: rgb(96, 38, 158);
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.6;
}

.detail__info-option {
  display: inline-block;
  font-family: 'Sligoil', serif;
  font-weight: 300;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 6px 18px;
}

.detail__info-title {
  font-family: 'Sligoil', serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 14px;
}

.detail__info-title strong {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail__info-desc {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.3;
}

.detail__info-sep {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.25);
  margin: 14px 0;
}

.detail__info-realisation {
  display: block;
  font-family: 'GTWalsheim', sans-serif;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.detail__info-link {
  display: inline-block;
  color: #fff;
  font-family: 'Sligoil', serif;
  font-size: 12px;
  font-weight: 300;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}

.detail__info-link:hover {
  opacity: 0.75;
}

.detail__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}

.detail__edit-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.detail__edit-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.detail__right {
  display: none;
  height: 100vh;
}

.detail__video-wrap.detail__media video {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Figure avec légende étudiant ─── */
.detail__figure {
  margin: 0 0 8px 0;
  position: relative;
}

.detail__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.detail__media-caption {
  display: block;
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
  font-style: italic;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.5);
}

/* ─── Lightbox ─── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__content img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox__content video {
  max-width: 90vw;
  max-height: 82vh;
  display: block;
}

.lightbox__caption {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  min-height: 1.2em;
}

.lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  z-index: 310;
  display: none;
}

#lightbox[aria-hidden="false"] .lightbox__close {
  display: block;
}

.lightbox__close:hover { color: #fff; }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  z-index: 10;
  line-height: 1;
}

.lightbox__prev { left: 0.5rem; }
.lightbox__next { right: 0.5rem; }
.lightbox__prev:hover,
.lightbox__next:hover { color: #fff; }

.lightbox-trigger { cursor: zoom-in; }

/* ─── Footer ─── */
.footer {
  margin-left: 84px;
  background: #d4b8e8;
  color: #652da1;
  padding: 32px 40px;
  font-size: 13px;
  line-height: 1.6;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer__label {
  font-family: 'Sligoil', serif;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}

.footer__col p + p {
  margin-top: 10px;
}

.footer__col a {
  color: #652da1;
  text-decoration: none;
}

.footer__col a:hover {
  text-decoration: underline;
}

.footer__col--logos {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.footer__logo-heff {
  height: 48px;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.footer__col--logos a:hover .footer__logo-heff {
  opacity: 1;
}

/* ─── Menu overlay ─── */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(13, 13, 13, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
  overflow: hidden;
}

.menu-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.menu-overlay__inner {
  margin-left: 84px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.menu-overlay__options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  flex: 7;
}

.menu-overlay__col {
  padding: 0 36px 32px;
  padding-top: 25%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.menu-overlay__col:hover {
  filter: brightness(1.15);
}


.menu-overlay__col--web {
  background: rgb(150, 100, 200);
}

.menu-overlay__col--edition {
  background: rgb(115, 55, 170);
}

.menu-overlay__col--3d {
  background: rgb(80, 25, 140);
}

.menu-overlay__badge {
  display: inline-block;
  font-family: 'GTWalsheim', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  padding: 7px 20px;
  border-radius: 50px;
  margin-top: auto;
  margin-bottom: 16px;
  align-self: flex-start;
}

.menu-overlay__col ul {
  list-style: none;
  font-family: 'Sligoil', serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  margin-top: 0;
}

.menu-overlay__arrow {
  display: block;
  opacity: 1;
  margin-top: 0;
  padding-top: 20px;
  align-self: flex-start;
  color: inherit;
  text-decoration: none;
  font-size: 32px;
  line-height: 1;
}
.menu-overlay__arrow svg {
  width: 42px;
  height: 32px;
  display: block;
}

.menu-overlay__bottom {
  flex: 3;
  background: #d4b8e8;
  color: rgb(96, 38, 158);
  padding: 36px 36px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.menu-overlay__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.menu-overlay__info-title {
  font-family: 'GTWalsheim', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.menu-overlay__info .menu-overlay__arrow {
  padding-top: 0;
  opacity: 1;
}

.menu-overlay__info-list {
  list-style: none;
  font-family: 'Sligoil', serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
}

/* Menu toggle open state */
body.menu-open .menu-toggle {
  background: transparent;
  border: 2px solid #fff;
}

body.menu-open .menu-toggle span {
  position: absolute;
  width: 20px;
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
}

/* ─── Large screens (4 colonnes visuelles) ─── */
@media (min-width: 1520px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, calc(100vh / 4)) repeat(2, minmax(200px, auto));
    grid-template-areas:
      "a  a  s  c"
      "a  a  b  c"
      "e  f  g  d"
      "e  f  h  d"
      "i  t  t  k"
      "i  j  l  k";
  }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .sidebar {
    width: 44px;
    padding: 16px 0;
  }

  .sidebar__title {
    font-size: 12px;
  }

  .grid {
    margin-left: 44px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "s  s  s  s"
      "a  a  c  c"
      "a  a  c  c"
      "b  b  b  b"
      "t  t  t  t"
      "e  e  f  f"
      "g  g  d  d"
      "g  g  d  d"
      "h  h  h  h"
      "i  i  k  k"
      "i  i  k  k"
      "j  j  l  l";
  }

  .intro {
    right: 16px;
    bottom: 16px;
    font-size: 11px;
  }

  .detail__masonry {
    columns: unset;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 56px 0 40px;
  }

  .detail__media,
  .detail__info,
  .detail__video-wrap {
    break-inside: unset;
    width: 100%;
  }

  .detail__info {
    font-size: 14px;
    order: -1;
  }

  .detail__info-title {
    font-size: 1.2rem;
  }

  .detail__layout {
    flex-direction: column;
    margin-left: 44px;
    overflow-y: auto;
  }

  .detail__left {
    flex: none;
  }

  .detail__image-main {
    height: 50vw;
  }

  .detail__right {
    min-height: 60vw;
  }

  .footer {
    margin-left: 44px;
    padding: 24px 20px;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer__col--logos {
    grid-column: 1 / -1;
  }

  .menu-overlay {
    overflow-y: auto;
    background: rgba(13, 13, 13, 0.97);
  }

  .menu-overlay__inner {
    margin-left: 0;
    height: auto;
    min-height: 100vh;
  }

  .menu-overlay__options {
    grid-template-columns: 1fr;
  }

  .menu-overlay__col {
    padding: 28px 24px 24px 24px;
    padding-top: 28px;
    min-height: 0;
  }

  .menu-overlay__badge {
    font-size: 0.7rem;
    padding: 6px 14px;
  }

  .menu-overlay__col ul {
    margin-top: 12px;
    gap: 6px;
  }

  .menu-overlay__col ul li {
    font-size: 0.8rem;
  }

  .menu-overlay__arrow {
    margin-top: 16px;
  }

  .menu-overlay__bottom {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }
}

/* ═══════════════════════════════════════════════════════════
   PAGES SECTION
   ═══════════════════════════════════════════════════════════ */

.sp-page {
  margin-left: 84px;
}

.sp-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.sp-section {
  padding: 6rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Hero */
.sp-hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 8rem;
}
.sp-section--web {
  background: rgb(150, 100, 200);
}
.sp-section--edition {
  background: rgb(115, 55, 170);
}
.sp-section--3d-vfx {
  background: rgb(80, 25, 140);
}
.sp-hero__inner {
  padding: 0 2rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}
.sp-hero__badge {
  display: inline-block;
  font-family: 'GTWalsheim', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 50px;
  padding: 7px 20px;
  margin-bottom: 1.5rem;
}
.sp-hero__title {
  font-family: 'Sligoil', serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #fff;
  margin: 0;
}

/* Intro & IA */
.sp-intro p,
.sp-ia p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #fff;
  margin-bottom: 1.5rem;
}
.sp-ia h2 {
  font-family: 'Sligoil', serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 1.5rem;
}

/* Programme – grid donut + compétences */
.sp-programme__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 640px) {
  .sp-programme__grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  .sp-page {
    margin-left: 44px;
  }
  .page-template-page-section .footer {
    margin-left: 44px;
  }
  .sp-hero {
    padding-bottom: 4rem;
    min-height: 100svh;
  }
  .sp-hero__inner {
    padding: 0 1.25rem;
  }
  .sp-hero__title {
    font-size: clamp(1.6rem, 8vw, 2.8rem);
  }
  .sp-section {
    padding: 3.5rem 0;
  }
  .sp-container {
    padding: 0 1.25rem;
  }
  .sp-cards {
    grid-template-columns: 1fr;
  }
  .sp-tags {
    gap: 0.4rem;
  }
  .sp-cta {
    text-align: center;
  }
  .sp-cta .sp-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* Donut SVG */
.sp-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.sp-donut {
  overflow: visible;
}
.sp-donut__seg {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sp-donut__legend {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  color: #fff;
  line-height: 1.8;
  width: 100%;
}
.sp-donut__legend li { display: flex; align-items: center; gap: 0.5rem; }
.sp-donut__dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-donut__legend em { margin-left: auto; font-style: normal; }

/* Compétences */
.sp-competences h2 {
  font-family: 'Sligoil', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.sp-competences ul {
  list-style: none;
  padding: 0; margin: 0;
}
.sp-competences li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
  color: #fff;
}

/* Stage & TFE */
.sp-parcours__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 640px) {
  .sp-parcours__grid { grid-template-columns: 1fr; }
}
.sp-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2rem;
}
.sp-card h3 {
  font-family: 'Sligoil', serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 400;
}
.sp-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #fff;
  margin-bottom: 0.75rem;
}

/* Workshops */
.sp-workshops h2 {
  font-family: 'Sligoil', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.sp-workshops p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #fff;
}

/* Témoignage */
.sp-quote {
  border-left: 2px solid rgba(255,255,255,0.15);
  padding-left: 2rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #fff;
  font-style: italic;
}
.sp-quote footer {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  font-style: normal;
  color: #fff;
}
.sp-quote footer strong {
  color: #fff;
}

/* Débouchés */
.sp-debouches h2 {
  font-family: 'Sligoil', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: #fff;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}
.sp-tags {
  list-style: none;
  padding: 0; margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  line-height: 2.2;
}
.sp-tags li {
  font-size: 0.9rem;
  color: #fff;
  letter-spacing: 0.02em;
}
.sp-tags li + li::before {
  content: ' / ';
  margin: 0 0.4em;
  opacity: 0.4;
}
.sp-debouches__milieux {
  font-size: 0.85rem;
  color: #fff;
  line-height: 1.6;
}

/* CTA */
.sp-cta { text-align: center; }
.sp-btn {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.85rem 2rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0.5rem;
  transition: background 0.2s, border-color 0.2s;
}
.sp-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.5);
}
.sp-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.sp-cta__contact {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #fff;
}
.sp-cta__contact a {
  color: #fff;
  text-decoration: none;
}

/* ─── Loader archive ─── */
.archive-loader {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 500;
  background: rgba(255,255,255,0.08);
}
.archive-loader__bar {
  height: 100%;
  width: 0%;
  background: rgb(96, 38, 158);
  transition: width 0.3s ease;
}
.archive-loader--done {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* ─── Filtre section ─── */
.filter-badge {
  position: fixed;
  top: 1rem;
  left: calc(84px + 1.5rem);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(20,20,20,0.92);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  font-family: 'GT Walsheim', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 2rem;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.filter-badge__reset {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  padding: 0;
  transition: color 0.2s;
}
.filter-badge__reset:hover {
  color: #fff;
}
