/* =========================
   VARIABLES
   -------------------------
   All design tokens are now in tokens.css (imported before this file).
   Only runtime-mutable vars stay here (see mobile override below).
   ========================= */

*{ box-sizing:border-box; margin:0; }

html {
  height: 100%;
}

  body{
    height: 100vh;
    background: var(--bg);
    color: var(--c-ink);
    font-family: var(--font-system);
    padding-right: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
  }

/* Uniquement les pages qui ont le rail radio */
body.has-rail {
  padding-right: var(--rail);
}

/* Liens globaux (les .btn les surchargent localement) */
a, a:visited{ 
  color: var(--c-ink); 
  text-decoration: underline; 
  text-underline-offset: 3px; 
  text-decoration-thickness: 2px; 
}
a:hover, a:focus-visible{ color: var(--c-ink); }
a{ text-shadow: 0 1px 2px var(--c-black-soft); }

/* =========================
   HEADER
   ========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header);  /* 48px */
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-line);
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-6);
  position: fixed;
}

.header-logo,
.header-logo-link--nav,
.writing-back,
.image-back,
.video-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--logo-clickable);
  width: var(--logo-clickable);
  padding: var(--sp-3);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
  margin-left: 32px;
}

/* Images des logos */
.header-logo img,
.header-nav-logo,
.writing-back__logo,
.image-back__logo,
.video-back__logo {
  height: var(--logo-size);
  width: auto;
  display: block;
  margin: 0;
}

/* Hover uniforme */
.header-logo:hover,
.header-logo-link--nav:hover,
.writing-back:hover,
.image-back:hover,
.video-back:hover {
  opacity: 0.6;
}

/* =========================
   PAGE & CARTES
   ========================= */

main.page{
  max-width:820px;
  margin:0 auto;
  flex: 1 0 auto;

  display:grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  column-gap:16px;
  row-gap:22px;

  padding-top: calc(var(--header) + 22px);
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 48px;
}

/* LABEL DANS LE HEADER — centré */
.doors-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  text-align: center;
  font-size: var(--text-5xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--track-near-0);
  color: var(--c-ink-alt);
  font-family: var(--font-display);
  font-weight: 400;
  pointer-events: none;
}

/* LIGNE DES DOORS (section + overlay axis) */
.index-doors {
  grid-column: 1 / -1;
  grid-row: 2;

  position: relative;
  z-index: 2;

  /* IMPORTANT: ne pas centrer ici */
  display: block;

  /* ton offset vertical reste ici */

}

.index-doors-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 90px;

  /* sécurité anti “décalage” */
  width: fit-content;
  margin: 0 auto;

  /* si tu veux micro-ajuster le centrage visuel (optionnel) */
  /* transform: translateX(-2px); */
}

.doors-axis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.card {
  width: var(--card-w);
  height: var(--card-h);
  background: var(--c-bg);
  position: relative;
  transform: skewY(-10deg);
  border: 2px solid var(--c-ink);
  box-sizing: border-box;
  transition: all var(--dur-mid);
}
.card::before,
.card::after {
  content: '';
  position: absolute;
  background: var(--c-ink);
  transition: all 0.5s;
}
.card::before {
  width: var(--card-edge);
  height: var(--card-h);
  top: -2px;
  left: calc(-1 * var(--card-edge) - 2px);
  transform-origin: right;
  transform: skewY(45deg);
}
.card::after {
  height: var(--card-edge);
  width: var(--card-w);
  top: calc(-1 * var(--card-edge) - 2px);
  left: -2px;
  transform-origin: bottom;
  transform: skewX(45deg);
}
.card:hover { 
  transform: skewY(0deg); 
}
.card:hover::before { 
  width: 0; 
  height: calc(var(--card-h) - 4px); 
  left: 0; 
  top: 0; 
}

.card:hover::after  { 
  width: calc(var(--card-w) - 4px); 
  height: 0; 
  left: 0; 
  top: 0; 
}

.card__content { 
  height: 100%;
  padding: var(--sp-5);
  
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink); 
  text-align: center;

  font-family: var(--font-display);
  font-weight: 300;
  font-size: 9px;
  letter-spacing: var(--track-2xl);
  text-transform: uppercase;
}

/* Liens autour des cards */
.card-link {
  position: relative;
  z-index: 1;

  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover .card,
.card-link:focus-visible .card {
  transform: skewY(0deg);
  border-color: var(--c-ink); /* exemple : effet visuel léger */
}

.card-link:focus-visible {
  outline: none;
}


/* =========================
   MAIN PAGE
   ========================= */

/* Conteneur (reste dans la grille) */
.feature{
  grid-column: 1 / span 12;
  grid-row: 3;
  margin-top: 32px;
}

.feature-bg{
  --bg-w: 85vw;      /* ⟵ largeur de la box grise — baisse pour la réduire */
  --gap: 32px;       /* ⟵ écart entre cartes */
  --visible: 5;      /* ⟵ nb de cartes visibles à l'écran */

  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: var(--bg-w);
  overflow: hidden;

  padding: var(--sp-8) 0;
  background: radial-gradient(circle at top left,
    rgba(255,255,255,0.12),
    rgba(255,255,255,0.02)
  );
  border: 1px solid var(--c-white-soft);
}

/* Voile d'assombrissement au survol d'une carte */
.feature-bg::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);   /* ⟵ force de l'assombrissement */
  opacity:0;
  transition: opacity var(--dur-base) ease;
  pointer-events:none;
  z-index:1;
}
.feature-bg:has(.spotlight-box:hover)::after{ opacity:1; }

/* Ruban qui défile droite→gauche */
.feature-track{
  position: relative;
  z-index: 2;                  /* au-dessus du voile */
  display: flex;
  width: max-content;
  will-change: transform;
  animation: spotlight-marquee 60s linear infinite;   /* ⟵ vitesse (plus grand = plus lent) */
}
@keyframes spotlight-marquee{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* -50% = un set complet (cartes dupliquées en JS) */
}

/* Pause + flou des autres cartes quand on en survole une */
.feature-track:has(.spotlight-box:hover){ animation-play-state: paused; }
.feature-track:has(.spotlight-box:hover) .spotlight-box:not(:hover){ filter: blur(2px); }  /* ⟵ force du flou */

.spotlight-box{
  flex: 0 0 auto;
  width: calc(var(--bg-w) / var(--visible) - var(--gap));
  margin-right: var(--gap);

  display: flex;
  flex-direction: column;
  gap: 16px;

  border: 1px solid var(--c-white-mid);
  background: var(--c-black-mid);
  padding: var(--sp-8) var(--sp-10);
  cursor: pointer;

  transition:
    border-color var(--dur-base) ease,
    background var(--dur-base) ease,
    transform var(--dur-base) ease,
    box-shadow var(--dur-base) ease,
    filter var(--dur-base) ease;
}

.spotlight-box:hover{
  border-color: var(--c-white-strong);
  background: var(--c-black-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-feature-hover);
}

/* Typo */
.feature-bg-label{
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: var(--track-3xl);
  text-transform: uppercase;
  color: var(--c-white-strong);
}

.feature-bg-title{
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  letter-spacing: var(--track-sm);
  text-transform: uppercase;
}

.feature-meta-row{
  display: flex;
  align-items: center;
  width: 100%;
}

.feature-bg-meta{
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 10px;
  color: var(--c-white-strong);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.feature-bg-year{ opacity: 0.9; }

.feature-bg-cta{
  font-family: var(--font-mono);
  margin-left: auto;
  margin-top: 0;
  font-size: var(--text-sm);
  letter-spacing: var(--track-2xl);
  text-transform: uppercase;
  color: var(--c-white-strong);
  opacity: 0.9;
  white-space: nowrap;
}

/* Média */
.feature-media{
  width: 100%;
  aspect-ratio: 5 / 4;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--c-black-soft);
}

.feature-media-el{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Mix = plein cadre */
.spotlight-box[data-feature="mix"] .feature-media-el{
  object-fit: cover;
  height: auto;
  max-height: 420px;
}

.spotlight-box[data-feature="walk"] .feature-media-el{
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.feature-media--text{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.feature-media-text{
  font-family: var(--font-display-c);
  font-weight: var(--font-display-c-medium);
  font-size: 22px;
  color: rgba(255,255,255,0.9);
  text-align: center;
  pointer-events: none;
  letter-spacing: var(--track-xl);
  text-transform: uppercase;
}

/* =========================
   MEDIA TAG (RADIO / IMAGE / WRITING / VIDEO)
   ========================= */

.tag-wrapper {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  border: 2px solid var(--c-white-strong);
  border-radius: var(--radius-sm);
  padding: 2px;
  box-sizing: border-box;
}

.tag-text {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  text-transform: uppercase;
  color: var(--c-white-strong); 
  line-height: var(--leading-tight);
  letter-spacing: var(--track-0);
}

.tag-wrapper:hover .tag-text {
  color: var(--c-ink);
}

.tag-wrapper:hover {
  border-color: var(--c-ink);
}


/* =========================
   LIGHTBOX / SPOTLIGHT
   ========================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--c-black-mid);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;                /* caché par défaut */
  align-items: center;
  justify-content: center;
  z-index: var(--z-lightbox);
}

.lightbox.is-open {
  display: flex;
}

/* Contenu central : image + caption à droite */
.lightbox-figure {
  margin: 0;
  max-width: 94vw;
  max-height: 94vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

/* Image dans le spotlight */
.lightbox-image {
  max-width: 94vw;
  max-height: 94vh;
  object-fit: contain;
  display: block;
  box-shadow: var(--shadow-lightbox);

  /* POUR LE ZOOM / PAN */
  transform-origin: center center;
  transition: transform 0.08s ease-out;
}

/* Quand on n’est pas zoomé (scale = 1) -> pas de drag */
.lightbox-image.is-not-zoomed {
  cursor: default;
}

/* Quand on est zoomé mais pas en train de drag */
.lightbox:not(.is-dragging) .lightbox-image:not(.is-not-zoomed) {
  cursor: grab;
}

/* Pendant le drag */
.lightbox.is-dragging .lightbox-image {
  cursor: grabbing;
}

/* Caption à droite, petit texte */
.lightbox-caption {
  font-family: var(--font-mono);
  max-width: 260px;
  font-size: var(--text-sm);
  line-height: 1.5;
  letter-spacing: var(--track-md);
  text-transform: uppercase;
  color: var(--c-ink);
  opacity: 0.8;
  text-align: left;
}

/* Nav gauche / droite */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--c-ink);
  font-size: var(--text-6xl);
  cursor: pointer;
  padding: 0 var(--sp-6);
  display: none;
}

.lightbox-prev {
  left: var(--sp-12);
}

.lightbox-next {
  right: var(--sp-12);
}

/* Curseur sur le trigger (l’image dans le slot) */
[data-lightbox="feature-gallery"] {
  cursor: pointer;
}

/* Désactiver le scroll de la page quand le lightbox est ouvert */
body.has-lightbox-open {
  overflow: hidden;
}

/* Zones de clic gauche / droite sur une bande centrale, avec un espace neutre au milieu */
.lightbox-hit {
  position: absolute;
  top: 25vh;
  height: 50vh;

  /* au lieu de 50vw */
  width: 35vw;          /* zone cliquable plus étroite */

  z-index: 3500;        /* au-dessus de l'image, sous le bouton close */
}

/* Zone gauche : curseur w-resize */
.lightbox-hit--left {
  left: 0;
  cursor: w-resize;
}

/* Zone droite : curseur e-resize */
.lightbox-hit--right {
  right: 0;
  cursor: e-resize;
}


/* =========================
   HOME — FOOTER
   ========================= */

.site-footer {
  width: 100%;
  height: var(--header);
  background: var(--c-bg-alt);     
  border-top: 1px solid var(--c-line);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 var(--sp-16);                   /* même padding latéral que le header */
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  z-index: var(--z-header);
}

/* COORDINATES à gauche */
.footer-coords {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--track-lg);
  text-transform: uppercase;
  color: var(--c-ink-alt);
  white-space: nowrap;
}

/* ===== NAV GLITCH BUTTONS (FOOTER) ===== */

.btn-nav {
  height: var(--logo-block-h);
  width: 100%;                /* → nav étirée entièrement */
  display: flex;
  align-items: center;
  justify-content: flex-end;    /* on centre les boutons dans la largeur */
}

.btn-nav .btn-list {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  gap: 42px;
  list-style: none; /* ← supprime les points */
  padding: 0;
}

/* Wrapper fixe la taille du bouton */
.btn-nav .radio-wrapper{
  position: relative;
  width: 84px;
  height: 38px;
  margin: 3px;
}

/* Bouton glitch monochrome (le lien) */
.btn-nav .btn{
  --primary: #000;
  --shadow-primary: #fff;
  --color: #f5f5f5;
  --font-size: 9px;
  --shadow-secondary-hue: 0;
  --shadow-secondary: hsl(var(--shadow-secondary-hue), 0%, 60%);
  --clip: polygon(11% 0, 95% 0, 100% 25%, 90% 90%, 95% 90%, 85% 90%, 85% 100%, 7% 100%, 0 80%);
  --border: 5px;
  --shimmy-distance: 5;
  --clip-one: polygon(0 2%, 100% 2%, 100% 95%, 95% 95%, 95% 90%, 85% 90%, 85% 95%, 8% 95%, 0 70%);
  --clip-two: polygon(0 78%, 100% 78%, 100% 100%, 95% 100%, 95% 90%, 85% 90%, 85% 100%, 8% 100%, 0 78%);
  --clip-three: polygon(0 44%, 100% 44%, 100% 54%, 95% 54%, 95% 54%, 85% 54%, 85% 54%, 8% 54%, 0 54%);
  --clip-four: polygon(0 0, 100% 0, 100% 0, 95% 0, 95% 0, 85% 0, 85% 0, 8% 0, 0 0);
  --clip-five: polygon(0 0, 100% 0, 100% 0, 95% 0, 95% 0, 85% 0, 85% 0, 8% 0, 0 0);
  --clip-six: polygon(0 40%, 100% 40%, 100% 85%, 95% 85%, 95% 85%, 85% 85%, 85% 85%, 8% 85%, 0 70%);
  --clip-seven: polygon(0 63%, 100% 63%, 100% 80%, 95% 80%, 95% 80%, 85% 80%, 85% 80%, 8% 80%, 0 70%);

  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  line-height: 38px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--font-size);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, font-size 0.2s;
}

/* Calques de base */
.btn-nav .btn:before,
.btn-nav .btn:after{
  content:'';
  position:absolute;
  inset:0;
  clip-path: var(--clip);
  z-index:-1;
}
.btn-nav .btn:before{
  background: var(--shadow-primary);
  transform: translate(var(--border), 0);
}
.btn-nav .btn:after{
  background: var(--primary);
}

.btn-nav .btn__glitch{
  position:absolute;
  top: calc(var(--border) * -1);
  left: calc(var(--border) * -1);
  right: calc(var(--border) * -1);
  bottom: calc(var(--border) * -1);
  background: var(--shadow-primary);
  text-shadow: 2px 2px var(--shadow-primary),
               -2px -2px var(--shadow-secondary);
  clip-path: var(--clip-one);
  display:none;
  z-index:0; /* <- METS 0 ICI, surtout pas -1 */
}
.btn-nav .btn__glitch:before{
  content:'';
  position:absolute;
  inset: var(--border);
  clip-path: var(--clip);
  background: var(--primary);
  z-index:-1; /* ok, lui reste dessous le texte glitch */
}

/* Label numéro */
.btn-nav .number{
  background: var(--shadow-primary);
  color: #323232;
  font-size: 5.5px;
  font-weight: 700;
  letter-spacing: 1px;
  position: absolute;
  width: 15px;
  height: 6px;
  top: 0;
  left: 81%;
  line-height: 6.2px;
}

/* Hover / focus : déclenche le glitch (sur le wrapper) */
.btn-nav .radio-wrapper:hover .btn,
.btn-nav .radio-wrapper:focus-within .btn{
  --primary:#111;
  --font-size:11px;
}

.btn-nav .radio-wrapper:hover .btn__glitch,
.btn-nav .radio-wrapper:focus-within .btn__glitch{
  display:block;
  animation:glitch 2s infinite;
}

/* Animation glitch */
@keyframes glitch {
  0%   { clip-path: var(--clip-one); transform: translate(0,0); }
  2%,8%{ clip-path: var(--clip-two); transform: translate(calc(var(--shimmy-distance) * -1%), 0); }
  6%   { clip-path: var(--clip-two); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
  9%   { clip-path: var(--clip-two); transform: translate(0,0); }
  10%  { clip-path: var(--clip-three); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
  13%  { clip-path: var(--clip-three); transform: translate(0,0); }
  14%,21%{ clip-path: var(--clip-four); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
  25%  { clip-path: var(--clip-five); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
  30%  { clip-path: var(--clip-five); transform: translate(calc(var(--shimmy-distance) * -1%), 0); }
  35%,45%{ clip-path: var(--clip-six); transform: translate(calc(var(--shimmy-distance) * -1%), 0); }
  40%  { clip-path: var(--clip-six); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
  50%  { clip-path: var(--clip-six); transform: translate(0,0); }
  55%  { clip-path: var(--clip-seven); transform: translate(calc(var(--shimmy-distance) * 1%), 0); }
  60%  { clip-path: var(--clip-seven); transform: translate(0,0); }
  61%,100%{ clip-path: var(--clip-four); transform: translate(0,0); }
}

/* =========================
   RESPONSIVE — MOBILE (INDEX)
   ========================= */

@media (max-width: 700px){

  /* ---- Variables ---- */
  :root{
    --header: 28px;     /* hauteur du bandeau */
    --card-w: 68px;
    --card-h: 90px;
    --card-edge: 5px;
  }

  /* =========================
     INDEX — MOBILE HEADER (uniquement sur index)
     ========================= */
  body.index-page .site-header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    height: var(--header);
    padding: 0 var(--sp-6);

    background: var(--c-ink);
    border-bottom: 1px solid var(--c-line);

    display: flex;
    align-items: center;
    justify-content: flex-start;   /* logo calé à gauche */

    z-index: 3000;
  }

  body.index-page .header-logo{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: auto;
    padding: 0;
    margin-left: 0;                /* annule le margin-left:32px global */
    flex: 0 0 auto;
  }

  body.index-page .header-logo img{
    height: 14px;
    width: auto;
    display: block;
  }

  /* =========================
     MAIN GRID
     ========================= */

  /* Base mobile (toutes pages) */
  main.page{
    max-width: 100%;
    padding: 16px 16px 96px; /* pas d’offset header par défaut */
    row-gap: 28px;
    column-gap: 12px;
  }

  /* Offset uniquement quand le header existe (index) */
  body.index-page main.page{
    padding-top: calc(var(--header) + 72px);
  }

  .doors-label{
    position: absolute;
    left: auto;
    right: 12px;                    /* ⟵ aligné sur le padding du header */
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.18em;
    white-space: nowrap;
    max-width: calc(100% - 60px);   /* garde-fou vs le logo à gauche */
    overflow: hidden;
    text-overflow: ellipsis;
  }

/* ---- Doors (1×4 horizontal) ---- */
  .index-doors{
    grid-column: 1 / -1;
    grid-row: auto;
    display: block;
    margin-top: 20px;
    position: relative;
  }

  .doors-axis{
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  }

  .card-link{
    position: relative;
    z-index: 1;
  }

  .axis-line{ display: none; }

  .index-doors-row{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    width: 100%;
    margin: 0;
  }

  .card-link{
    flex: 1 1 0;
    display: flex;
    justify-content: center;
  }

  .card__content{
    font-size: 7px;
    letter-spacing: 0.08em;
    padding: 6px 4px;
  }

  /* ---- Feature ---- */
  .feature{
    grid-column: 1 / -1;
    margin-top: 24px;
  }

.feature-bg{
    --bg-w: 90vw;
    --gap: 18px;
    --visible: 2;
    padding: 16px 0;
    position: relative;
  }

  /* Spotlights : scroll latéral manuel, pas d'auto-défilement */
  .feature-track{
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    animation: none;
    transform: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .feature-track::-webkit-scrollbar{ display: none; }

  /* cartes clonées : utiles seulement pour la boucle desktop */
  .feature-track > .spotlight-box[aria-hidden="true"]{ display: none; }

  .spotlight-box{
    padding: 16px;
    gap: 12px;
    scroll-snap-align: start;
  }

  .spotlight-box.is-spotlight-open .feature-media::after{
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.18);
    pointer-events: none;
  } 

  .feature-media-el{ max-height: 320px; }

  /* ---- Lightbox ---- */
  .lightbox-figure{
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 92vw;
    max-height: 92vh;
  }

  .lightbox-caption{
    max-width: 92vw;
    text-align: center;
  }

  .lightbox-hit{
    width: 42vw;
    top: 18vh;
    height: 64vh;
  }

  /* ---- Footer (ligne compacte) ---- */
  .site-footer{
    height: 56px;
    padding: 0 24px;

    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .footer-coords{
    max-width: 68vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
  }

  .btn-nav{
    width: auto;
    height: auto;
    justify-content: flex-end;
  }

  .btn-nav .btn-list{ gap: 0; }

  .btn-nav .radio-wrapper{
    width: 64px;
    height: 30px;
    margin: 0;
  }

  .btn-nav .btn{
    --font-size: 8px;
    line-height: 30px;
    letter-spacing: 2px;
  }

  .btn-nav .number{
    width: 13px;
    height: 6px;
    font-size: 5px;
    left: 78%;
  }

  /* FOOTER NAV — mobile : pas de grossissement au hover */
  .btn-nav .radio-wrapper:hover .btn,
  .btn-nav .radio-wrapper:focus-within .btn{
    --font-size: 8px;
  }
}

/* =========================
   SMALL MOBILE (<= 420px)
   ========================= */
@media (max-width: 420px){

  :root{
    --card-w: 58px;
    --card-h: 78px;
    --card-edge: 4px;
  }
}


/* =========================
   PAGE WRITINGS
   ========================= */

.writing-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header);  /* 48px */
  background: var(--c-bg);
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-6);
}

.writing-shell {
  display: flex;
  height: calc(100vh - var(--header));
  margin-top: var(--header);
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  overflow: hidden;
}

.writing-nav {
  position: relative;
  top: auto;
  left: auto;
  width: 200px;
  min-width: 200px;
  height: 100%;
  padding: 32px 20px;
  border-right: 0.5px solid rgba(255,255,255,0.09);
  overflow-y: auto;
  flex-shrink: 0;
}

.writing-content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  max-width: none;
}

/* "MGO" */
.writing-heading {
  position: relative;
  display: inline-block;
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  letter-spacing: var(--track-lg);
  text-transform: uppercase;
  color: var(--c-ink);
  margin: 0 0 var(--sp-8);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur-base) ease;
  overflow: hidden;
  font-family: var(--font-body);
}

.writing-heading:hover {
  color: var(--c-white-strong);
}

.writing-divider {
  width: 50px;
  height: 1px;
  background: var(--c-ink);
  margin: var(--sp-10) 0;
  opacity: 0.6;
}

/* =========================
   NAVIGATION ARBORESCENTE
   ========================= */

.writing-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tree-section {
  margin-bottom: 28px;
}

.tree-root-label {
  font-family: var(--font-line);
  font-weight: 300;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 8px;
  display: block;
}

.tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
}

.tree-children.is-visible {
  display: block;
}

.tree-sublabel {
  font-family: var(--font-line);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.02em;
  display: block;
  padding: 5px 0 5px 10px;
  background: none;
  border: none;
  border-left: 1px solid transparent;
  color: rgba(255,255,255,0.45);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
  width: 100%;
}

.tree-sublabel:hover {
  color: rgba(255,255,255,0.75);
}

.tree-sublabel.is-active {
  color: rgba(255,255,255,0.95);
  border-left-color: rgba(255,255,255,0.6);
  opacity: 1;
}

/* Titre principal de la zone contenu (mis à jour en JS) */
.writing-title {
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: var(--track-2xl);
  color: var(--c-ink);
  margin: 0 0 var(--sp-12);
  font-family: var(--font-line);
  font-weight: 300;
}

/* =========================
   LISTES (WRITINGS / READINGS)
   ========================= */

/* base : caché, devient grille quand .is-active */
.writing-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;

  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  letter-spacing: var(--track-near-0);
  color: var(--c-ink);
}

/* Grille de "books" */
.writing-list.is-active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  column-gap: 12px; /* espace entre livres */
  row-gap: 48px;
}

.writing-list li {
  margin: 0;
  display: flex;
  justify-content: center; /* centre le bookwrapper dans sa cellule */
}

/* Lien container */
.writing-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.writing-link:focus,
.writing-link:active {
  outline: none;
}

/* =========================
   FRAGMENTS (Writings — notes Are.na)
   ========================= */

.writing-list--fragments {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

.writing-list--fragments.is-active {
  display: block;
  height: 100%;
}

.writing-list--fragments li {
  display: block;
  justify-content: unset;
  width: 100%;
}

/* =========================
   LIBRARY — sections par année
   ========================= */

[data-list-id="writings-library"].is-active {
  display: block;
}

[data-list-id="writings-library"] > li.lib-year-section {
  display: block;
}

.lib-year-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  border-top: 0.5px solid rgba(255,255,255,0.09);
  padding: 18px 32px;
  cursor: pointer;
  text-align: left;
}

.lib-year-label {
  font-family: var(--font-cmono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.lib-year-arrow {
  font-size: 9px;
  color: rgba(255,255,255,0.25);
  transition: transform 0.2s ease;
  display: inline-block;
}

.lib-year-header[aria-expanded="false"] .lib-year-arrow {
  transform: rotate(-90deg);
}

.lib-year-grid {
  list-style: none;
  padding: 0 32px 32px;
  margin: 0;
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  column-gap: 12px;
  row-gap: 48px;
}

.lib-year-grid.is-open {
  display: grid;
}

.lib-year-grid .bookwrapper {
  width: 6.5rem;
  height: 9rem;
}

.lib-year-grid .book__front {
  padding: 0.5rem 0.6rem 1.2rem;
}

.lib-year-grid .book__title {
  font-size: 0.55rem;
  margin-bottom: 0.3rem;
}

.lib-year-grid .book__author {
  font-size: 0.5rem;
  margin-top: 1.2rem;
}

.lib-year-grid .book__publisher {
  font-size: 0.45rem;
  bottom: 0.6rem;
  left: 0.6rem;
}

.lib-year-grid > li {
  display: flex;
  justify-content: center;
}

.frag-block {
  border-bottom: 0.5px solid rgba(0,0,0,0.18);
  cursor: pointer;
  position: relative;
}

.frag-block:nth-child(3n+1) { background: #f2efe8; }
.frag-block:nth-child(3n+2) { background: #b8b5ae; }
.frag-block:nth-child(3n+3) { background: #1e1c1a; }

.frag-inner {
  padding: 32px 30px 28px;
  position: relative;
  max-width: 100%;
}

.frag-meta {
  font-family: var(--font-cmono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.frag-title {
  font-family: var(--font-display-c);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

.frag-arrow {
  position: absolute;
  right: 30px;
  top: 32px;
  font-size: 12px;
  transition: color 0.15s, transform 0.2s;
}

/* Extrait — apparaît au hover */
.frag-excerpt {
  font-size: 12px;
  font-family: var(--font-core);
  font-weight: 300;
  line-height: 1.75;
  margin-top: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  max-width: 100%;
}

.frag-block:hover .frag-excerpt {
  max-height: 120px;
  opacity: 1;
}

/* Corps déployable */
.frag-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.frag-block.is-open .frag-body {
  max-height: 600px;
}

.frag-body-inner {
  font-family: var(--font-core);
  font-weight: 300;
  padding: 0 30px 28px;
  font-size: 13px;
  line-height: 1.75;
}

.frag-block.is-open .frag-inner {
  padding-bottom: 12px;
}

.frag-block.is-open .frag-arrow {
  transform: rotate(90deg);
}

/* Couleurs texte selon fond */
.frag-block:nth-child(3n+1) .frag-meta    { color: rgba(30,28,26,0.35); }
.frag-block:nth-child(3n+1) .frag-title   { color: rgba(30,28,26,0.88); }
.frag-block:nth-child(3n+1) .frag-excerpt { color: rgba(30,28,26,0.52); }
.frag-block:nth-child(3n+1) .frag-body-inner { color: rgba(30,28,26,0.72); }
.frag-block:nth-child(3n+1) .frag-arrow   { color: rgba(30,28,26,0.2); }
.frag-block:nth-child(3n+1):hover .frag-arrow { color: rgba(30,28,26,0.55); }

.frag-block:nth-child(3n+2) .frag-meta    { color: rgba(20,18,16,0.4); }
.frag-block:nth-child(3n+2) .frag-title   { color: rgba(20,18,16,0.9); }
.frag-block:nth-child(3n+2) .frag-excerpt { color: rgba(20,18,16,0.55); }
.frag-block:nth-child(3n+2) .frag-body-inner { color: rgba(20,18,16,0.7); }
.frag-block:nth-child(3n+2) .frag-arrow   { color: rgba(20,18,16,0.25); }
.frag-block:nth-child(3n+2):hover .frag-arrow { color: rgba(20,18,16,0.6); }

.frag-block:nth-child(3n+3) .frag-meta    { color: rgba(255,255,255,0.28); }
.frag-block:nth-child(3n+3) .frag-title   { color: rgba(255,255,255,0.88); }
.frag-block:nth-child(3n+3) .frag-excerpt { color: rgba(255,255,255,0.42); }
.frag-block:nth-child(3n+3) .frag-body-inner { color: rgba(255,255,255,0.58); }
.frag-block:nth-child(3n+3) .frag-arrow   { color: rgba(255,255,255,0.18); }
.frag-block:nth-child(3n+3):hover .frag-arrow { color: rgba(255,255,255,0.55); }

/* =========================
   BOOK DESIGN
   ========================= */

.bookwrapper {
  position: relative;
  width: 8rem;
  height: 11.6rem;
}

.bookwrapper__anchor {
  position: absolute;
  top: -.6rem;
  left: 0;
}

/* Livre (structure globale) */
.book {
  display: block;
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0 0.7rem 0.7rem 0;
  color: var(--c-ink-alt);
  text-decoration: none;
  transition: transform var(--dur-mid);
  font-family: var(--font-book);
}

/* "Pages" + bordures (arrière du livre) */
.book__back {
  position: absolute;
  top: 0.7rem;
  right: 0;
  bottom: 0;
  left: 0.7rem;
  background-color: var(--c-bg);
  border-style: solid;
  border-width: 0 2px 2px 0;
  border-color: var(--c-ink);
}

/* Couverture blanche */
.book__front {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0.8rem 1rem 1.6rem;
  box-sizing: border-box;
  background-color: var(--c-ink);
  color: var(--c-ink-alt);
}

/* Spine partant du coin inférieur gauche de la cover */
.book__spine {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3px;
  height: 0.7rem;
  background-color: var(--c-ink);
  transform-origin: 0 0 0;
  transform: skewX(45deg);
}

/* Titre + meta dans la cover */

.book__title {
  display: block;
  margin: 0 0 0.5rem;
  font-family: var(--font-book);
  font-size: 0.75rem;
  line-height: var(--leading-short);
  font-weight: var(--weight-regular);
}

.book__author {
  display: block;
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: var(--track-xl);
  text-transform: uppercase;
  font-style: normal;
  color: var(--c-ink-alt);
  opacity: 0.9;
}

/* (Optionnel si tu utilises un publisher plus tard) */
.book__publisher {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-alt);
  opacity: 0.55;
}

/* Hover */
.book:hover,
.book:focus {
  color: var(--c-ink);
}

.book:hover {
  transform: translate(-0.25rem, -0.5rem);
  transition: transform var(--dur-mid);
}

.book:hover .book__back {
  box-shadow: 0.8rem 0.8rem 1.2rem 0 #FFFFFF40;
  transition: all var(--dur-mid);
}

/* BOOK — tag en noir (cover blanche) */
.book__front .tag-text {
  color: var(--c-ink-alt);
}

.book__front .tag-wrapper {
  border-color: rgba(0,0,0,0.4);
}

/* Tags dans les books : texte noir */
.book__tags--black .tag-text { color: var(--c-ink-alt); }
.book__tags--black .tag-wrapper { border-color: rgba(0,0,0,0.4); }

/* =========================
   WRITINGS — MOBILE (Shelf scroll)
   ========================= */
@media (max-width: 768px){

  /* Back arrow (comme radio : top-left, pas de centrage) */
  body.writings-page .back-arrow{
    top: 14px !important;
    left: 12px !important;
    transform: none !important;
    position: fixed !important;
  }

  /* Descend UNIQUEMENT "MGO" sans décaler le reste */
  .writing-heading{
    margin-top: 28px;         /* pousse juste le titre sous la flèche */
    margin-bottom: 6px;       /* compense pour ne pas baisser divider + tree */
  }

  /* Compense un peu la ligne si elle te paraît trop basse */
  .writing-divider{
    margin: 14px 0;
  }

  /* Shell */
  .writing-shell{
    margin: 24px auto 48px;
    padding: 0 14px;
  }

  /* Nav au-dessus */
  .writing-nav{
    position: static;
    width: auto;
    margin: 0 0 18px 0;
    top: auto;
    left: auto;
    padding-top: 32px;
  }

  .writing-content{
    margin-left: 0;
    padding-top: 10px;
    max-width: none;
  }

  /* ===== LISTE = 1 rangée scrollable ===== */
  .writing-list.is-active{
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;

    padding: 6px 2px 18px; /* respiration + laisse voir l’ombre */
    margin: 0;

    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 18px,
      #000 calc(100% - 18px),
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 18px,
      #000 calc(100% - 18px),
      transparent 100%
    );
  }
  .writing-list.is-active::-webkit-scrollbar{ display:none; }

  .writing-list.is-active > li{
    flex: 0 0 auto;
    scroll-snap-align: start;

    /* ne pas centrer en cellule */
    display: block;
    justify-content: unset;
  }

  /* ===== FRAGMENTS : colonne, pas de rangée scrollable ===== */
  .writing-list--fragments.is-active{
    display: block;
    overflow: visible;
    padding: 0;
    margin: 0;
    scroll-snap-type: none;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .writing-list--fragments.is-active > li{
    flex: 0 0 auto;
    width: 100%;
    scroll-snap-align: none;
  }

  .frag-inner{ padding: 22px 18px 18px; }
  .frag-meta{ margin-bottom: 10px; }
  .frag-title{ font-size: 18px; padding-right: 26px; }
  .frag-arrow{ right: 18px; top: 22px; }
  .frag-body-inner{ padding: 0 18px 20px; }
  .frag-block.is-open .frag-body{ max-height: 4000px; }          /* plus de texte coupé */
  .frag-block:hover .frag-excerpt{ max-height: 0; opacity: 0; }  /* pas de hover fantôme au tactile */

  /* Taille mobile du book (plus petit) */
  .bookwrapper{
    width: 6.4rem;
    height: 9.4rem;
  }

  /* Ajustements fins */
  .book{
    padding: 0 0.55rem 0.55rem 0;
  }
  .book__back{
    top: 0.55rem;
    left: 0.55rem;
  }
  .book__front{
    padding: 0.65rem 0.75rem 1.1rem;
  }

  .book__title{
    font-size: 0.7rem;
    line-height: 1.15;
    margin: 0 0 0.4rem;
  }
  .book__author{
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  /* Mobile: pas de hover */
  .book:hover{
    transform: none;
  }
  .book:hover .book__back{
    box-shadow: none;
  }

  /* Mobile: pas de hover sur flèche non plus */
  .back-arrow:hover{ opacity: 1; }
}

/* Small mobile */
@media (max-width: 420px){
  .bookwrapper{
    width: 6.0rem;
    height: 8.8rem;
  }
}

/* === IMAGE PAGE === */

.image-body {
  background: var(--c-bg-alt);
  color: var(--c-ink-alt);

  /* OVERRIDE des règles globales du <body> */
  padding-right: 0;           /* enlève l'espace réservé au rail */
  min-height: 100vh;          /* garde un body plein écran */
  overflow-x: auto;           /* plus besoin de cacher le scroll horizontal */
}

.image-page {
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding-top: var(--sp-10);
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
  padding-bottom: 60px;
}

/* Grille petites tuiles serrées */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: 100%;
}

.gallery-section {
  position: relative;
  margin-bottom: 1px;
}

.gallery-title {
  position: absolute;
  top: var(--sp-16);
  left: var(--sp-8);
  z-index: 10;
  
  opacity: 0.45;
  pointer-events: none;
  
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--c-ink-alt);
  letter-spacing: var(--track-lg);
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.image-item {
  display: block;
  background: var(--c-bg-alt);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.image-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* recadrage pour garder une grille propre */
  transition: opacity 0.25s ease;
}

.image-item:hover img {
  opacity: 0.9;        /* léger feedback au survol */
}

.image-item video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none; /* le hover reste sur le <a> */
}

/* -----------------------------
   HEADER SUPER FIN POUR GALLERY
   ----------------------------- */

.image-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 48px;  /* unifié avec site-header */
  background: var(--c-ink);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--sp-6);
  z-index: var(--z-header-image);
  text-transform: uppercase;
  letter-spacing: var(--track-lg);
  font-size: var(--text-lg);
  color: var(--c-ink-alt);
  font-family: var(--font-body);
}

/* Liens + textes */
.image-header a,
.image-header div {
  text-decoration: none;
  color: var(--c-ink-alt);
  font-weight: var(--weight-regular);
  text-shadow: none;
}

.image-header a:hover {
  opacity: 0.5;
}

.image-header .active {
  opacity: 1 !important;
  pointer-events: none;
}

.image-header .active:hover {
  opacity: 1 !important;
}

.image-header .ih-left  { justify-self: start; }
.image-header .ih-center{ justify-self: center; }
.image-header .ih-right { justify-self: end; }

/* =========================
   IMAGE PAGE LIGHTBOX
   Cadre fin blanc + aura discrète, fond noir profond
   ========================= */

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox-image);

  display: none;
  align-items: center;
  justify-content: center;

  background: var(--c-black-strong);

  cursor: crosshair;
}

.image-lightbox.is-open {
  display: flex;
}

body.has-image-lightbox-open {
  overflow: hidden;
}

.image-lightbox-figure {
  position: relative;
  margin: 0;
  max-width: 90vw;
  max-height: 85vh;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: default;
}

.image-lightbox-media {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;

  border: 1px solid var(--c-white-strong);

  box-shadow:
    0 0 60px 8px rgba(255, 255, 255, 0.06),
    0 0 140px 30px rgba(255, 255, 255, 0.03);
  cursor: none;
}

/* Exception : sur une vidéo, on laisse le curseur visible pour pouvoir atteindre les contrôles */
.image-lightbox-media[src$=".mov"],
.image-lightbox-media[src$=".mp4"],
.image-lightbox-media[src$=".webm"],
video.image-lightbox-media {
  cursor: default;
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: none;
  color: var(--c-white-strong);
  font-size: var(--text-7xl);
  font-family: inherit;
  line-height: var(--leading-tight);

  cursor: pointer;
  transition: color var(--dur-base) ease, transform var(--dur-base) ease;
  z-index: 2;
}

.image-lightbox-nav:hover,
.image-lightbox-nav:focus-visible {
  color: var(--c-ink);
  outline: none;
}

.image-lightbox-nav--prev { left: var(--sp-12); }
.image-lightbox-nav--next { right: var(--sp-12); }

.image-lightbox-close {
  position: absolute;
  top: var(--sp-12);
  right: var(--sp-12);

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: none;
  color: var(--c-white-strong);
  font-size: var(--text-4xl);
  font-family: inherit;
  line-height: var(--leading-tight);

  cursor: pointer;
  transition: color var(--dur-base) ease;
  z-index: 2;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  color: var(--c-ink);
  outline: none;
}

.image-lightbox-counter {
  font-family: var(--font-mono);
  position: absolute;
  bottom: var(--sp-12);
  left: 50%;
  transform: translateX(-50%);

  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-sm);
  letter-spacing: var(--track-2xl);
  text-transform: uppercase;

  pointer-events: none;
  z-index: 2;
}

@media (max-width: 700px) {
  .image-lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 32px;
  }
  .image-lightbox-nav--prev { left: 8px; }
  .image-lightbox-nav--next { right: 8px; }

  .image-lightbox-close {
    top: 12px;
    right: 12px;
  }

  .image-lightbox-figure {
    max-width: 94vw;
    max-height: 80vh;
  }
  .image-lightbox-media {
    max-width: 94vw;
    max-height: 80vh;
  }
}

/* =========================
   IMAGE GRID — VOILE DE FLOU + DÉVOILEMENT CURSEUR
   Exploration pure : les images sont floutées par défaut,
   une zone circulaire autour du curseur les révèle.
   ========================= */

.image-grid {
  position: relative;
}

.image-grid__veil {
  position: absolute;
  inset: 0;
  z-index: 5;

  pointer-events: none;

  /* Flou ambiant : moyen. saturate retiré pour perf. */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  background-color: rgba(10, 10, 12, 0.15);

  --reveal-x: 50%;
  --reveal-y: 50%;
  --reveal-radius: 200px;

  -webkit-mask-image: radial-gradient(
    circle var(--reveal-radius) at var(--reveal-x) var(--reveal-y),
    transparent 0%,
    transparent 40%,
    #000 100%
  );
  mask-image: radial-gradient(
    circle var(--reveal-radius) at var(--reveal-x) var(--reveal-y),
    transparent 0%,
    transparent 40%,
    #000 100%
  );

  /* Optimisation : force le voile sur une couche GPU dédiée */
  will-change: mask-image, -webkit-mask-image;
  transform: translateZ(0);

  transition: opacity 0.3s ease;
}

/* Optimisation : désactive complètement le voile quand sa grille n'est pas visible.
   Restreint au desktop : sur mobile le voile est fixed, pas lié à la position de la grille */
@media (hover: hover) and (pointer: fine) {
  .image-grid:not(.is-in-view) .image-grid__veil {
    display: none;
  }
}

.image-grid {
  cursor: crosshair;
}

body.has-image-lightbox-open .image-grid__veil {
  opacity: 0;
}

@media (max-width: 700px) {
  .image-grid__veil {
    position: fixed;
    inset: 0;
    z-index: 5;

    --reveal-x: 50%;
    --reveal-y: 50%;
    --reveal-radius: 140px;

    -webkit-mask-image: radial-gradient(
      circle var(--reveal-radius) at 50% 50%,
      transparent 0%,
      transparent 40%,
      #000 100%
    );
    mask-image: radial-gradient(
      circle var(--reveal-radius) at 50% 50%,
      transparent 0%,
      transparent 40%,
      #000 100%
    );
  }

  .image-grid:not(:first-of-type) .image-grid__veil {
    display: none;
  }

  .image-grid {
    cursor: default;
  }
}

/* =========================
   RADIO PAGE — BASE
   ========================= */

body.radio-page {
  background: var(--c-bg-alt);
  color: var(--c-ink-alt);
}

body.radio-page main {
  padding-top: calc(50vh + var(--sp-12));
}

/* =========================
   RADIO HEADER — PROGRESSIVE SHRINK
   ========================= */

.radio-header {
  background: var(--c-bg);
  color: var(--c-ink);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header-radio);
  height: 50vh;
  overflow: hidden;
}

.radio-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 24px 32px;
}

/* Logo central dynamique (grandit/rétrécit avec le header) */
.radio-header .header-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3);
}

.radio-header .header-logo-img {
  height: 100%;
  width: auto;
  display: block;
}

/* Nav logo PETIT (en haut à gauche, visible quand compact) */
.radio-header .header-logo-link--nav {
  position: absolute;
  left: var(--sp-6);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.radio-header.header-compact {
  height: var(--header);
}

.radio-header.header-compact .header-logo-link--nav {
  opacity: 1;
  pointer-events: auto;
}

.radio-header .header-logo-link--nav:hover {
  opacity: 0.6;
}

.radio-header .header-nav-logo {
  height: 14px;
  width: auto;
  display: block;
  margin: 0;
}
/* =========================
   PLAYER (HEADER)
   ========================= */

.header-player {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 var(--sp-4);
  height: 32px;

  background: transparent;
  color: var(--c-ink);
  border: 1px solid var(--c-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;

  margin-right: 0;
  min-width: 440px;
  width: 440px;
  padding-left: var(--sp-5);
}

/* État : un audio est chargé */
.header-player.has-audio {
  justify-content: flex-start;
}

/* Le titre reprend l’espace uniquement quand il y a un audio */
.header-player.has-audio .header-player-title {
  flex: 1;
  text-align: left;
}

/* Affichage quand le header est compact */
.radio-header.header-compact .header-player {
  opacity: 1;
  pointer-events: auto;
}

/* On cache l'UI native de l'audio */
#radio-header-player {
  display: none;
}

.header-player-icon {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
  margin-right: var(--sp-5);
  cursor: pointer;
}

/* Texte NOW PLAYING (au centre, prend l'espace) */
.header-player-title {
  font-size: var(--text-xs);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: var(--sp-3);
}

/* Timer aligné à droite de la box */
.header-player-time {
  font-size: var(--text-xs);
  line-height: 1.2;
  flex-shrink: 0;
  margin-left: var(--sp-3);
}

.player-skip-btn {
  border: none;
  background: transparent;
  color: var(--c-ink);

  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  padding: 0 1px;
  margin: 0 1px;

  cursor: pointer;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.25s ease, transform var(--dur-fast) ease;
}

/* visibles seulement quand header compact + audio chargé */
.radio-header.header-compact .header-player.has-audio .player-skip-btn {
  opacity: 1;              /* bien blanc, pas gris */
  pointer-events: auto;
}

.player-skip-btn:hover {
  transform: scale(1.1);   /* léger hover, sans changer l’opacité */
}

.player-skip-btn:active {
  transform: scale(0.9);
}

/* =========================
   RADIO - MAIN CONTENT
   ========================= */

.main-content {
  max-width: var(--w-page-radio);
  margin: 0 auto var(--sp-20);
  padding: 0 var(--sp-10);
}

.main-feature-box {
  width: 100%;
  height: 480px;
  border: 1px solid var(--c-ink-alt);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-transform: uppercase;
  position: relative;
}

.main-feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  background: #000;
}


/* =========================
   RADIO - ARCHIVE SECTION
   ========================= */

.archive-section {
  max-width: var(--w-page-radio);
  margin: 60px auto 80px;
  padding: 0 var(--sp-10);
}

.archive-header {
  position: relative;
  margin-bottom: var(--sp-16);
  height: 40px;
}

.archive-header-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 1px;
  background: var(--c-ink-alt);
}

.archive-filters {
  position: absolute;
  bottom: 100%;
  right: 0;
  display: flex;
  gap: var(--sp-6);
  font-size: var(--text-base);
  text-transform: uppercase;
}

.filter-pill {
  font-family: var(--font-display);
  font-weight: 300;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-ink-alt);
  background: var(--c-ink);
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-12);
}

/* Chaque item reste un carré strict */
.audio-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--c-ink-alt);
  overflow: hidden;
  background: var(--c-ink-alt);
}

/* Le lien occupe tout le carré */
.audio-item-link {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Image plein cadre */
.audio-thumb {
  position: absolute;
  inset: 0;                  /* top:0 right:0 bottom:0 left:0 */
}

.audio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bandeau titre — état normal */
.audio-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  background: var(--c-black-mid);
  color: var(--c-ink);

  padding: var(--sp-3) var(--sp-4);           /* même padding tout le temps */
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-sm);
  text-transform: uppercase;
  line-height: var(--leading-short);
  box-sizing: border-box;

  /* Hauteur initiale (bandeau fin) */
  height: 16%;                /* ajuste à 12–18% selon ton goût */
  min-height: 28px;           /* sécurité */
  
  display: flex;
  flex-direction: column;
  align-items: flex-start;    /* texte toujours en haut du bandeau */
  justify-content: flex-start;

  /* On n'anime QUE la hauteur → transition propre */
  transition: height 0.6s ease-out;
  z-index: 2;
}


/* État hover : le bandeau s'étend */
.audio-item:hover .audio-title {
  height: 32%;                /* taille finale du bandeau */
}

/* Conteneur tags : en ligne + retour à la ligne si manque de place */
.audio-title .tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Visible uniquement au hover (quand le bandeau s’ouvre) */
.audio-item:hover .audio-title .tags {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Sécurité : chaque tag ne force pas une ligne */
.audio-title .tag-link {
  display: inline-flex;
  text-decoration: none;
}

/* Tag plus petit dans le bandeau audio */
.audio-title .tag-wrapper {
  padding: 1px 3px;
  display: inline-flex;
  align-items: center;
  border-width: 1px;
}

.audio-title .tag-text {
  font-size: 9px;
  line-height: var(--leading-tight);
  letter-spacing: var(--track-md);
}

/* Icône play au centre */
.audio-item::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: var(--c-ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) ease;
}

.audio-item:hover::after {
  opacity: 0.7;
}

.filter-pill.is-active {
  background: var(--c-ink-alt);
  color: var(--c-ink);
}

.audio-item.is-hidden {
  display: none;
}

.audio-type {
  position: absolute;
  left: var(--sp-4);
  bottom: var(--sp-3);

  font-size: var(--text-xs);
  font-family: var(--font-mono);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--dur-mid) ease;
}

.audio-item:hover .audio-type {
  opacity: 1;
}

/* =========================
   BANDEAU DROIT (rail)
   ========================= */

.rail{
  position:fixed; top:0; right:0;
  width:var(--rail); height:100dvh;
  background: var(--c-ink); border-left:1px solid var(--c-line);
  display:grid;
  grid-template-rows:auto 1fr auto; /* header tiles | scroll | footer */
  padding: var(--sp-6) var(--sp-5) var(--sp-7); 
  gap: var(--sp-5);
}
.vgrid{
  overflow:auto; 
  display:grid; 
  grid-auto-rows:min-content;
  gap:var(--gap); 
  padding-right:2px; 
  place-items:center;
}

/* Tuiles (Mixcloud) */
.tile{
  width:100%; 
  max-width:var(--size); 
  aspect-ratio:1/1;
  position:relative; 
  overflow:hidden; 
  background:transparent; 
  border:none; 
  outline:none;
}
.media{
  position:absolute; inset:0; z-index:0;
  clip-path:inset(50% 50% 50% 50%); opacity:0;
  transition:clip-path var(--dur) var(--ease), opacity .8s ease .2s;
}
.tile:hover .media, .tile:focus-within .media{
  clip-path:inset(0 0 0 0); opacity:1;
}
.media > img{
  width:100%; height:100%; object-fit:cover; display:block; user-select:none; pointer-events:none;
}

/* Seed anim */
.seed{ position:absolute; inset:0; z-index:2; }
.seed::before{
  content:""; position:absolute; left:50%; top:50%;
  width:var(--seed); height:var(--seed); transform:translate(-50%,-50%);
  background: var(--c-bg); transition:width var(--dur) var(--ease), height var(--dur) var(--ease), opacity .8s ease .2s; opacity:1;
}
.seed::after{
  content:""; position:absolute; left:50%; top:50%;
  width:var(--seed); height:var(--seed); transform:translate(-50%,-50%);
  border:var(--border) solid var(--c-bg); background:transparent;
  transition:width var(--dur) var(--ease), height var(--dur) var(--ease); pointer-events:none; z-index:3;
}
.tile:hover .seed::before, .tile:focus-within .seed::before,
.tile:hover .seed::after,  .tile:focus-within .seed::after{ width:100%; height:100%; }
.tile:hover .seed::before, .tile:focus-within .seed::before{ opacity:0; }

.rail-link,
.rail-link:visited{
  color: var(--c-ink-alt);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:2px;
  text-shadow:none;
  font-size:.9em;
}
.rail-link:hover{ color: #333; }


/* =========================
   RADIO — RESPONSIVE (CLEAN)
   ========================= */

/* TABLET & DOWN (<= 900px) */
@media (max-width: 900px){

  body.radio-page main{
    padding-top: 42vh;
  }

  .radio-header-inner{
    padding: 18px;
  }

  /* Player: stop largeur fixe (tablet) */
  .header-player{
    width: auto;
    min-width: 0;
    max-width: 70vw;
    padding: 0 10px;
  }

  .main-content,
  .archive-section{
    padding: 0 16px;
  }

  .archive-grid{
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

/* MOBILE (<= 700px) */
@media (max-width: 700px){

  /* ===== HEADER compact ===== */
  .radio-header{
    height: 64px !important;
    overflow: visible;
  }

  body.radio-page main{
    padding-top: 64px !important;
  }

  .radio-header-inner{
    position: relative; /* repère pour back-arrow */
    height: 64px;
    padding: 10px 12px;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.radio-page .back-arrow{
    position: absolute;
    left: var(--sp-6);
    top: 50%;
    transform: translateY(-50%);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;
    line-height: var(--leading-tight);
    padding: var(--sp-4) var(--sp-5);

    color: var(--c-ink);
    text-decoration: none;

    z-index: 3000;
  }

  /* Logo */
  .radio-header .header-logo{
    position: static;
    transform: none;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-logo-img{
    height: 52px;
    width: auto;
    max-height: none;
  }

  /* Player OFF (mobile) */
  .header-player{
    display: none !important;
  }

  /* ===== MAIN FEATURE ===== */
  .main-content{
    margin: 18px auto;
    padding: 0 16px;
  }

  .main-feature-box{
    height: 220px;
  }

  /* ===== ARCHIVE LAYOUT ===== */
  .archive-section{
    margin: 24px auto 60px;
    padding: 0 16px;
  }

  .archive-header{
    height: auto;
    margin-bottom: 14px;
  }

  .archive-header-line{
    display: none;
  }

  .archive-filters{
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-bottom: 14px;
  }

  .filter-pill{
    font-size: 11px;
    padding: 6px 10px;
  }

  .archive-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* ===== AUDIO ITEMS (mobile sans hover) ===== */

  /* Neutralise les effets hover desktop */
  .audio-item:hover .audio-title{
    height: auto;
  }

  .audio-item:hover::after{
    opacity: 0;
  }

  /* Bandeau “fixe” lisible: titre + tags + type */
  .audio-title{
    height: auto;
    min-height: 56px;
    padding: 8px;

    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    gap: 6px;

    transition: none !important;
  }

  .audio-title-text{
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Type en flux normal */
  .audio-type{
    position: static !important;
    opacity: 0.85 !important;
    font-size: 10px;
    margin: 0;
  }

  /* Tags visibles sans hover */
  .audio-title .tags{
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    margin-top: 0 !important;
    transition: none !important;
  }

  /* Overlay play supprimé */
  .audio-item::after{
    display: none !important;
  }
}

/* SMALL MOBILE (<= 420px) */
@media (max-width: 420px){

  .main-feature-box{
    height: 210px;
  }

  .archive-grid{
    gap: 12px;
  }
}

/* =========================
   RADIO — MOBILE PLAYER BAR
   ========================= */

.mobile-player{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-lightbox);

  padding: var(--sp-5) var(--sp-6);
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  display: none; /* caché tant que rien n'a été lancé */
}

.mobile-player.is-visible{
  display: block;
}

/* inner */
.mobile-player-inner{
  width: 100%;
}

@media (max-width: 700px){
  .mobile-player .header-player{
    display: flex !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    box-sizing: border-box;

    opacity: 1 !important;
    pointer-events: auto !important;

    height: 42px;
    padding: 0 var(--sp-5);
    border: 1px solid var(--c-ink);
    background: transparent;
    color: var(--c-ink);
  }

  .mobile-player .header-player-title,
  .mobile-player .header-player-time{
    font-size: 10px;
  }

  .mobile-player .header-player-icon{
    font-size: 22px;
    width: 26px;
    margin-right: 10px;
  }

  .mobile-player .player-skip-btn{
    font-size: 16px;
  }

  /* Important : laisser de la place en bas pour ne pas masquer la grille */
  body.radio-page main{
    padding-bottom: 76px; /* hauteur bandeau + marge */
  }
}

/* =========================
   VIDEO
   === */

body.video-page .site-header {
  background: var(--c-bg);
  border-bottom-color: transparent;
}

body.video-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   SEARCH INPUT (Uiverse)
   ========================= */
.input {
  --input-focus: #2d8cf0;
  --font-color: #323232;
  --font-color-sub: #666;
  --bg-color: #fff;
  --main-color: #323232;
  width: 200px;
  height: 40px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  background-color: var(--bg-color);
  box-shadow: 4px 4px var(--main-color);
  font-size: 15px;
  font-weight: 600;
  color: var(--font-color);
  padding: 5px 10px;
  outline: none;
}
.input::placeholder { color: var(--font-color-sub); opacity:.8; }
.input:focus { border: 2px solid var(--input-focus); }


/* =========================
   PAGE ABOUT — LAYOUT
   ========================= */

.about-page {
  padding-top: calc(var(--header) - 14px);
}

.about-layout {
  position: relative;
  max-width: 1300px;
  margin: 12px auto 0 auto;

  padding: 0 40px;
  padding-right: 360px;
  display: block;
}

/* Colonne gauche : bloc texte large, stable */
.about-text-box {
  background: var(--c-bg);
  border: 1px solid var(--c-white-mid);

  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header) - 80px);
}

/* Conteneur interne pour les panneaux */
.about-text-inner {
  position: relative;
  flex: 1 1 auto;
}

/* Panneaux superposés */
.about-panel {
  position: absolute;
  inset: 0;
  padding: 24px;

  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;

  /* CURSOR: par défaut pas cliquable */
  cursor: default;
}

.about-panel.is-active {
  opacity: 1;
  pointer-events: auto;
}

.about-panel h1 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 1px;
  margin: 0 0 42px 0;
}

.about-panel p {
  margin: 0 0 var(--sp-5) 0;
  font-size: 0.85rem;
  line-height: var(--leading-relaxed);
  color: var(--c-ink);
  font-family: var(--font-nav);
  font-weight: 300;
}

/* ABOUT panel: 2 colonnes */
.about-panel[data-about-panel="about"] .about-two-cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}

.about-panel[data-about-panel="about"] .about-two-cols .about-col{
  margin: 0;
  font-size: 0.85rem;
  line-height: var(--leading-relaxed);
  color: var(--c-ink);
  font-family: var(--font-nav);
  font-weight: 300;
}

/* CURSOR: default par défaut dans les panels */
.about-panel{
  cursor: default;
}

/* CURSOR: pointer uniquement sur les vrais interactifs */
.why-image-link{
  cursor: pointer;
}

.accordion-toggle{
  cursor: pointer;
}

/* =========================
   ABOUT — NAV GLITCH VERTICAL
   ========================= */

/* Sidebar fixe à droite, sous le header, avec marge en bas */
.about-sidebar {
  position: fixed;
  top: calc(var(--header) + 24px);             /* un peu sous le header */
  right: 40px;                                 /* même padding que le layout */
  width: 260px;
  max-width: 260px;
  height: calc(100vh - var(--header) - 24px - 40px); /* espace en bas */
  display: flex;
}

/* On réutilise btn-nav, mais pleine hauteur */
.about-sidebar .btn-nav {
  width: 100%;
  height: 100%;
  display: flex;
}

.about-sidebar .btn-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;  /* ← important */
  gap: 80px;                    /* tu ajustes ici maintenant */
  width: 100%;
  height: auto;                 /* ← pour que le contenu décide de la hauteur */
}

/* Chaque wrapper : largeur pleine, hauteur fixe */
.about-sidebar .radio-wrapper {
  position: relative;
  width: 100%;
  height: 80px;
}

/* Bouton glitch adapté à la hauteur verticale */
.about-sidebar .btn-nav .btn {
  --font-size: 11px;
  line-height: 80px;
}

/* Bouton actif : variation visuelle */
.about-sidebar .radio-wrapper.is-active .btn {
  --primary: var(--c-ink);
  --shadow-primary: var(--c-bg);
  --color: var(--c-bg);
}

/* =========================
   ABOUT — MOBILE (<= 700px)
   - box encadrée plein écran
   - nav footer fixe
   - 5 boutons visibles
   - NO glitch / NO hover
   - WHY/WHAT en FULL BLEED
   ========================= */
@media (max-width: 700px){

  :root{ --about-nav-h: 56px; }

  /* Header global inutile sur mobile */
  .site-header{ display:none; }

  /* Page */
  .about-page{
    padding-top: 0 !important;
    padding-bottom: var(--about-nav-h) !important; /* laisse la place au footer */
    min-height: 100dvh;
  }

  /* Layout */
  .about-layout{
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
    padding-right: 12px !important; /* annule le padding-right desktop */
  }

  /* BOX encadrée */
  .about-text-box{
    border: 1px solid var(--c-white-mid) !important;
    background: var(--c-bg) !important;

    height: calc(100dvh - var(--about-nav-h) - 24px) !important; /* 24px = padding layout haut+bas */
    min-height: 0 !important;

    display: flex;
    flex-direction: column;
  }

  .about-text-inner{
    position: relative;
    flex: 1 1 auto;
  }

  .about-panel{
    padding: 18px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .about-panel[data-about-panel="about"] .about-two-cols{
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* =========================
     WHY / WHAT — IMAGE ENTIÈRE (FIT DANS LA BOX)
     ========================= */

  /* panels images : pas de padding + pas de scroll */
  .about-panel[data-about-panel="why"],
  .about-panel[data-about-panel="what"]{
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* wrapper plein cadre + centrage */
  .about-panel[data-about-panel="why"] .why-image-link,
  .about-panel[data-about-panel="why"] .what-image-wrapper,
  .about-panel[data-about-panel="what"] .what-image-wrapper{
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
  }

  /* image : on voit tout, sans crop */
  .about-panel[data-about-panel="why"] .what-image,
  .about-panel[data-about-panel="what"] .what-image{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;   /* << clé */
    object-position: center !important;
    display: block !important;
  }

  /* =========================
     NAV FOOTER (FIXE)
     ========================= */
  .about-sidebar{
    position: fixed !important;

    /* FORCER le bas, neutraliser le haut */
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    max-width: none !important;
    height: var(--about-nav-h) !important;

    margin: 0 !important;
    padding: 8px 8px !important;

    background: #000 !important;

    z-index: 6000 !important;

    display: flex !important;
    align-items: center !important;
  }

  .about-sidebar .btn-nav{
    width: 100% !important;
    height: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .about-sidebar .btn-list{
    width: 100% !important;
    height: 100% !important;

    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    align-items: center !important;
    justify-content: space-between !important;

    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;

    overflow: hidden !important; /* tout doit tenir */
  }

  /* 5 boutons = 5 colonnes */
  .about-sidebar .radio-wrapper{
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 40px !important;
    margin: 0 !important;
  }

  /* =========================
     BOUTONS (NO GLITCH)
     ========================= */

  /* on tue complètement l’effet glitch */
  .about-sidebar .btn__glitch{ display:none !important; }
  .about-sidebar .btn::before,
  .about-sidebar .btn::after{ display:none !important; }

  /* pas d’animation hover */
  .about-sidebar .btn{ transition: none !important; }

  .about-sidebar .btn{
    width: 100% !important;
    height: 100% !important;

    display: block !important;
    text-align: center !important;

    border: 1px solid var(--c-ink) !important;
    background: transparent !important;
    color: var(--c-ink) !important;

    line-height: 40px !important;
    font-size: 8px !important;
    font-weight: var(--weight-bold) !important;
    letter-spacing: var(--track-btn-xs) !important;
    text-transform: uppercase !important;

    padding: 0 !important;

    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* numéros off pour gagner de la place */
  .about-sidebar .number{ display:none !important; }

  /* état actif : simple inversion */
  .about-sidebar .radio-wrapper.is-active .btn,
  .about-sidebar .btn.is-active{
    background: var(--c-ink) !important;
    color: var(--c-bg) !important;
  }

  /* neutralise tout grossissement éventuel hérité */
  .about-sidebar .radio-wrapper:hover .btn,
  .about-sidebar .radio-wrapper:focus-within .btn{
    font-size: 8px !important;
  }
}

.who-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.who-image-stack {
  flex: 0 0 40%;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: default;
}

.about-panel.is-active[data-about-panel="who"] .who-image-stack{
  cursor: pointer;
}

.who-image-stack .who-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.who-image-stack .who-image.is-active {
  opacity: 1;
  pointer-events: auto;
}

.who-text {
  flex: 1;
}

.who-subtext{
  margin: 0 0 var(--sp-5) 0;
  font-size: 0.85rem;
  line-height: var(--leading-relaxed);
  color: var(--c-ink);
  font-family: var(--font-nav);
  font-weight: 300;
}

.who-text .accordion-item:first-of-type {
  margin-top: var(--sp-16);
}

/* =========================
   WHY — CLICKABLE IMAGE
   ========================= */

.why-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* =========================
   WHO — ACCORDION
   ========================= */

.accordion-item {
  border: none;
  background: transparent;
}

.accordion-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: var(--sp-3) 0;
  margin: 0;

  display: flex;
  justify-content: space-between;
  align-items: center;

  color: var(--c-ink);
  font-size: 1rem;
  font-family: var(--font-b);
  font-weight: 300;
  text-align: left;
  cursor: pointer;
}

.accordion-icon {
  display: inline-block;
  margin-left: 12px;
}

/* Panels cachés par défaut */
.accordion-panel {
  display: none;
}

/* Affichés uniquement si .is-open est ajoutée par le JS */
.accordion-panel.is-open {
  display: block;
  margin-top: 8px;
}

.accordion-panel p {
  margin: 0 0 10px 0;
  font-size: 0.85rem;
  font-family: var(--font-nav);
  font-weight: 300;
}

.accordion-item + .accordion-item {
  margin-top: var(--sp-8);
}

.what-image-wrapper {
  width: 100%;
  height: 100%;      /* prend toute la hauteur de la box */
  display: flex;     /* évite les déformations */
}

.what-image {
  width: 100%;
  height: 100%;      /* remplissage vertical + horizontal */
  object-fit: cover; /* découpe pour remplir sans distorsion */
  display: block;
}

/* =========================
   TAG INDEX PAGE
   ========================= */

.tag-index-body {
  background: var(--c-bg);
  color: var(--c-ink);
}

.tag-index-page {
  max-width: var(--w-page-tag);
  margin: 0;
  padding: 80px var(--sp-10) 120px; /* MODIF : 40px -> 20px pour ancrer plus à gauche */
  width: min(var(--w-page-tag), 100%);
}

.tag-index-header {
  margin-bottom: 80px;
}

.tag-index-title {
  font-size: var(--text-fluid-title);
  font-weight: var(--weight-bold);
  line-height: 0.95;
  letter-spacing: var(--track-tight);
  color: var(--c-ink);
  margin-left: var(--sp-6);
}

.tag-index-title::first-letter {
  font-weight: var(--weight-light);      /* plus fin */
}

.tag-index-items {
  display: flex;
  flex-direction: column;
  gap: 120px;
  padding-left: 80px;
}

.tag-index-item {
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: 80px;
  align-items: flex-start;
}

/* AJOUT : colonne gauche bien ancrée à gauche (évite l’effet “centré”) */
.tag-index-item-left {
  display: flex;
  justify-content: flex-start;
}

/* AJOUT : force les blocs avec max-width (ex: .audio-item) à coller à gauche */
.tag-index-item-left > * {
  margin-left: 0;
  margin-right: auto;
}

.tag-index-item-right {
  max-width: 520px;
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--c-white-strong);
}

.tag-index-item-right p {
  white-space: pre-line;
}

/* Image simple */
.tag-index-image {
  width: 100%;
  display: block;
  border: 1px solid var(--c-white-mid);
}

.tag-index-empty {
  color: var(--c-white-strong);
  font-size: var(--text-xl);
}

/* TAG INDEX — remove bullets for are.na books */
.tag-index-page li {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

/* optionnel : si ton <ul> garde un padding par défaut */
.tag-index-page ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

/* TAG INDEX — livres XL */
.tag-index-page .bookwrapper {
  width: 14rem;
  height: 20.5rem;
}

/* TAG INDEX — titre de livre */
.tag-index-page .book__title {
  font-size: 1.05rem;      /* ← augmente franchement */
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

/* TAG INDEX — meta livre */
.tag-index-page .book__author {
  font-size: 0.85rem;
  letter-spacing: var(--track-2xl);
  opacity: 0.9;
}

/* TAG INDEX — face avant plus aérée */
.tag-index-page .book__front {
  padding: 1.2rem 1.4rem 2.2rem;
}

/* TAG INDEX — hover plus affirmé */
.tag-index-page .book:hover {
  transform: translate(-0.4rem, -0.7rem);
}

.tag-index-page .book:hover .book__back {
  box-shadow: 1.2rem 1.2rem 1.8rem 0 #ffffff40;
}

/* audio-item dans tag-index : limite la taille + border clair */
.tag-index-page .audio-item {
  width: 100%;
  max-width: 420px;
  border-color: var(--c-white-mid);
}

/* Safe : toutes les images dans tag-index restent contenues */
.tag-index-page img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .tag-index-page { padding: 56px 20px 96px; }
  .tag-index-item { grid-template-columns: 1fr; gap: 28px; }
  .tag-index-item-right { max-width: none; }
}

/* =========================
   FIELD OVERLAY
   ========================= */

.field-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.field-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.field-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.field-overlay__box {
  position: relative;
  z-index: 1;
  width: 70vw;
  height: 85vh;
  background: var(--c-black-strong, #0e0d0b);
  border: 1px solid rgba(255, 255, 255, 0.6);
  overflow: auto;
}

.field-overlay__canvas {
  position: relative;
  width: 2400px;
  height: 1800px;
}

.field-overlay__controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 10px;
  pointer-events: all;
}

.field-overlay__title {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  font-family: var(--font-core);
  font-weight: var(--font-core-medium);
  font-size: var(--text-6xl);
  font-style: italic;
  letter-spacing: var(--track-xl);
  text-transform: uppercase;
  color: rgba(255,255,255,1);
  pointer-events: none;
  white-space: nowrap;
}

.field-zoom-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.field-zoom-btn:hover {
  color: rgba(255,255,255,1);
}

.field-zoom-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  min-width: 32px;
  text-align: center;
}

.field-block {
  position: absolute;
  cursor: default;
  user-select: none;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}

.field-block--text {
  min-width: 60px;
  min-height: 40px;
}

.field-block--image {
  min-width: 40px;
  min-height: 40px;
}

.field-block__handle {
  height: 24px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.07), transparent);
  cursor: grab;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.field-block__handle:active {
  cursor: grabbing;
}

.field-block__label {
  display: block;
  padding: 0 10px;
  line-height: 24px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-block__content {
  padding: 16px;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-line);
  font-size: 0.9rem;
  line-height: 1.6;
  width: 100%;
  height: calc(100% - 24px);
  box-sizing: border-box;
}

.field-block--image .field-block__content {
  padding: 0;
  height: calc(100% - 24px);
}

.field-block__content img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-block__resize {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  cursor: se-resize;
  line-height: 1;
  transition: color 0.15s;
  user-select: none;
}

.field-block__resize:hover {
  color: rgba(255,255,255,0.6);
}

/* ===================================================================
   WALK OVERLAY
   =================================================================== */
.walk-overlay { position:fixed; inset:0; z-index:9000; opacity:0; pointer-events:none; transition:opacity .3s ease; }
.walk-overlay.is-open { opacity:1; pointer-events:all; }
.walk-overlay__backdrop { position:absolute; inset:0; background:rgba(20,18,16,.85); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.walk-overlay__box { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:1; width:80vw; height:80vh; background:var(--c-bg-alt); border:1px solid var(--c-ink-alt); overflow:hidden; }

/* variables locales de marche (à ajuster au feeling) */
.walk-stage { position:relative; width:100%; height:100%; overflow:hidden; outline:none;
  --ground-y:72%; --char-x:34%; --walk-dur:.6s;
  color:var(--c-ink-alt); font-family:var(--font-mono); }

.walk-ground { position:absolute; left:0; right:0; top:var(--ground-y); height:2px; background:var(--c-ink-alt); z-index:2; }

.walk-world { position:absolute; inset:0; z-index:1; }
.walk-layer { position:absolute; inset:0; will-change:transform; }

.walk-block { position:absolute; }
.walk-block img, .walk-block video { display:block; width:100%; height:100%; object-fit:cover; border:1px solid var(--c-ink-alt); background:var(--c-bg-alt); }
.walk-block__dot { position:absolute; top:0; right:-20px; width:12px; height:12px; padding:0; border:1px solid var(--c-ink-alt); background:var(--c-bg-alt); cursor:pointer; z-index:4; }
.walk-block.is-open .walk-block__dot { background:var(--c-ink-alt); }
.walk-block__text { position:absolute; left:calc(100% + 16px); top:22px; width:180px; font-size:var(--text-sm); line-height:var(--leading-normal); letter-spacing:var(--track-near-0); display:none; }
.walk-block.is-open .walk-block__text { display:block; }

.walk-walker { position:absolute; left:var(--char-x); top:var(--ground-y); width:48px; height:96px; transform:translate(-50%,-100%); z-index:3; }
.walk-walker.face-left { transform:translate(-50%,-100%) scaleX(-1); }
.walk-walker svg { display:block; width:100%; height:100%; overflow:visible; }
.walk-fig line, .walk-fig circle { stroke:var(--c-ink-alt); stroke-width:3; stroke-linecap:round; fill:none; }
.walk-fig circle.head { fill:var(--c-ink-alt); }
.walk-limb { transform-box:fill-box; transform-origin:top center; }
@keyframes walkSwingA { 0%{rotate:24deg} 50%{rotate:-24deg} 100%{rotate:24deg} }
@keyframes walkSwingB { 0%{rotate:-24deg} 50%{rotate:24deg} 100%{rotate:-24deg} }
.walk-walker.is-walking .legL, .walk-walker.is-walking .armR { animation:walkSwingA var(--walk-dur) linear infinite; }
.walk-walker.is-walking .legR, .walk-walker.is-walking .armL { animation:walkSwingB var(--walk-dur) linear infinite; }
.walk-block__resize { position:absolute; bottom:-20px; right:-20px; width:24px; height:24px; font-size:18px; cursor:grab; z-index:5; user-select:none; opacity:1; }
.walk-block__sound { position:absolute; top:-20px; right:-4px; background:none; border:none; padding:0; font-family:'Departure Mono', monospace; font-size:14px; color:var(--c-ink-alt); cursor:pointer; z-index:5; opacity:0.6; transition:opacity 0.15s; }
.walk-block__sound:hover { opacity:1; }
.walk-block { position:absolute; cursor:grab; }
.walk-stage { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; touch-action:none; }

/* ── WALK — bouton fermer (mobile) ── */
.walk-overlay__close { position:absolute; top:10px; right:12px; z-index:7; background:none; border:none; color:var(--c-ink-alt); font-family:var(--font-mono); font-size:18px; cursor:pointer; display:none; }

/* ── WALK — mobile ── */
@media (max-width: 700px) {
  .walk-overlay__box { width:100vw; height:100dvh; top:0; left:0; transform:none; border:none; }
  .walk-overlay__close { display:block; }
  .walk-block__dot  { width:16px; height:16px; right:-22px; }        /* cible tactile + grande */
  /* texte sous le bloc/le carré, plus aucun recouvrement */
  .walk-block__text { left:0; top:calc(100% + 10px); width:100%; min-width:150px; max-width:60vw; }
  .walk-block__resize { display:none; }                             /* resize supprimé */
  .walk-block { cursor:default; }
}