/* ============================================================
   GODTHIC — Archive Wheel : Alignement sur la Référence Visuelle
   Layout 3 colonnes Desktop :
   [ GAUCHE : Intro + Contrôles ] [ CENTRE : Roue + Orbite SVG ] [ DROITE : Panneau Smoke Glass ]
   - Contrôles desktop (←) (→) + compteur 01 / 07 dans la colonne intro
   - Œuvres inclinées le long de la tangente de courbure
   - Item actif agrandi avec halo chaud vibrant (glow rouge/ambré)
   - Orbite circulaire continue estompée
   - Face arrière gauche de la roue fondue dans le noir pour laisser respirer le titre
   - Mobile : AUCUNE flèche, manipulation directe au doigt, micro-indication
   - Panneau Smoke / Black Liquid Glass hiérarchisé avec bouton "Voir en grand"
   ============================================================ */

/* ── Variables & Tokens ── */
:root {
  --wheel-red: #e5000f;
  --wheel-glow: rgba(240, 60, 20, 0.6);
  --smoke-glass-bg: linear-gradient(145deg, rgba(26, 26, 28, 0.82), rgba(12, 12, 14, 0.92) 65%, rgba(6, 6, 8, 0.96));
  --smoke-glass-border-top: rgba(255, 255, 255, 0.30);
  --smoke-glass-border-side: rgba(255, 255, 255, 0.12);
  --smoke-glass-border-bottom: rgba(255, 255, 255, 0.04);
  --smoke-glass-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.42), inset 0 -1px 1px rgba(0, 0, 0, 0.65), 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* ── Section Archives ── */
.archives {
  position: relative;
  scroll-margin-top: 88px;
  overflow: hidden;
  padding: 60px 0 100px;
  width: 100%;
}

/* ── Wrapper Roue 3 Colonnes Desktop ── */
.archive-wheel {
  display: grid;
  grid-template-columns: minmax(0, 25fr) minmax(0, 46fr) minmax(0, 29fr);
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3.5vw, 56px);
  gap: clamp(12px, 1.2vw, 20px);
  min-height: 0;
  position: relative;
  box-sizing: border-box;
}

/* ── Colonne 1 : Introduction éditoriale Gauche + Contrôles ── */
.archives-intro {
  flex: 0 0 clamp(260px, 25vw, 340px);
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 15;
  user-select: none;
}

.archives-intro .wp-kicker {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--wheel-red);
  margin: 0 0 14px;
}

.archives-intro .archives-title {
  font-size: clamp(44px, 4vw, 58px);
  font-weight: 900;
  line-height: 0.93;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 22px 0;
  font-family: inherit;
}

.archives-intro .archives-note {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
  max-width: 30ch;
}

/* Contrôles Desktop dans la colonne Intro (B) */
.wheel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(24px, 3.5vw, 44px);
  z-index: 30;
  pointer-events: all;
}

.wheel-counter {
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
  user-select: none;
}

/* ── Colonne 2 : Scène de la Roue Centre ── */
.wheel-stage {
  flex: 1 1 48%;
  position: relative;
  height: clamp(660px, 80vh, 800px);
  min-height: 0;
  min-width: 0;
  overflow: clip;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  touch-action: none;
}

.wheel-stage:active {
  cursor: grabbing;
}

/* Container items */
.wheel-items {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Chaque Œuvre de la Roue (inclinée sur la tangente) ── */
.wheel-item {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center center;
  cursor: pointer;
  pointer-events: all;
  /* JS owns interpolation; CSS easing here would lag behind the finger. */
  transition: none;
  will-change: transform, opacity;
  border-radius: 14px;
}

.wheel-item.no-transition {
  transition: none !important;
}

.wheel-item img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: box-shadow .35s ease;
}

/* ── Item Actif : Taille dominante + Halo chaud vibrant (glow rouge/ambré) ── */
.wheel-item.is-active {
  cursor: default;
}

.wheel-item.is-active img {
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.45),
    0 0 35px var(--wheel-glow),
    0 0 75px rgba(200, 20, 10, 0.38),
    0 24px 60px rgba(0, 0, 0, 0.92);
}

/* Halo doux radiant derrière l'item actif */
.wheel-item.is-active::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 24px;
  background: radial-gradient(circle at center, rgba(255, 80, 30, 0.24), rgba(200, 0, 10, 0.08) 55%, transparent 76%);
  pointer-events: none;
  z-index: -1;
}

/* Micro-indication mobile masquée sur desktop */
.wheel-hint {
  display: none;
}

/* ── Colonne 3 : Panneau de Détail Smoke Liquid Glass ── */
.wheel-panel {
  flex: 0 0 clamp(380px, 29vw, 460px);
  width: 100%;
  min-width: 0;
  position: relative;
  isolation: isolate;
  border-radius: 24px;
  background: var(--smoke-glass-bg);
  border-top: 1px solid var(--smoke-glass-border-top);
  border-left: 1px solid var(--smoke-glass-border-side);
  border-right: 1px solid var(--smoke-glass-border-side);
  border-bottom: 1px solid var(--smoke-glass-border-bottom);
  box-shadow: var(--smoke-glass-shadow);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  padding: 28px 22px 24px;
  z-index: 25;
  box-sizing: border-box;
  overflow: hidden;
}

.wheel-panel::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.03) 28%, transparent 60%, rgba(255, 255, 255, 0.02) 100%);
  z-index: -1;
  pointer-events: none;
}

.wheel-panel:empty::before {
  content: '—';
  display: block;
  opacity: .2;
  font-size: 20px;
  text-align: center;
  padding: 80px 0;
}

/* Typographie & Hiérarchie du Panneau */
.wp-panel-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wheel-red);
  margin: 0 0 12px;
}

.wp-name {
  font-size: clamp(26px, 2.2vw, 32px);
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 22px;
}

.wp-meta {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 20px;
}

.wp-meta-row {
  display: flex;
  font-size: 13.5px;
  line-height: 1.55;
  align-items: baseline;
  gap: 12px;
}

.wp-meta-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  width: 110px;
  flex: 0 0 110px;
}

.wp-meta-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  flex: 1;
}

/* Badge Streaming Pill */
.wp-streaming {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.wp-streaming::before {
  content: '▶';
  font-size: 8px;
  color: var(--wheel-red);
}

.wp-description {
  font-size: 15px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.74);
  margin: 0 0 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.wp-variants-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 12px;
}

.wp-variants-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.wp-variant {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  background: #000;
  padding: 0;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
}

.wp-variant:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

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

.wp-variant-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
  padding: 10px 4px 4px;
  text-align: center;
  line-height: 1.1;
}

/* Bouton "Voir en grand" */
.wp-expand-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.wp-doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .2s ease, opacity .2s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wp-doc-btn:hover {
  color: #fff;
  opacity: 1;
}

.wp-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .2s ease, opacity .2s ease;
}

.wp-expand-btn:hover {
  color: #fff;
  opacity: 1;
}

.wp-expand-icon {
  font-size: 14px;
  opacity: 0.8;
}

/* ── Lightbox HD ── */
.wheel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.wheel-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

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

.lb-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(28, 28, 30, 0.85), rgba(12, 12, 14, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  transition: opacity .2s ease;
}

.lb-close:hover { opacity: .75; }

.lb-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(28, 28, 30, 0.85), rgba(12, 12, 14, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s ease;
  z-index: 2001;
}

.lb-nav-btn:hover { opacity: .7; }
.lb-nav-btn.lb-prev { left: 20px; }
.lb-nav-btn.lb-next { right: 20px; }

.lb-caption {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  pointer-events: none;
}

/* ── Responsive : Tablette (761px - 1024px) ── */
@media (max-width: 1024px) and (min-width: 761px) {
  .archive-wheel {
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    min-height: auto;
    gap: 24px;
  }

  .archives-intro {
    flex: 0 0 100%;
    width: 100%;
    margin-bottom: 8px;
  }

  .wheel-stage {
    flex: 1 1 52%;
    height: 580px;
    min-height: 0;
  }

  .wheel-panel {
    grid-column: 1 / -1;
    flex: 1 1 42%;
    width: auto;
    padding: 26px 22px;
  }

  .wp-name {
    font-size: 26px;
  }

  .wp-description {
    font-size: 15px;
  }
}

/* ── Responsive : Mobile (<= 760px) ── */
@media (max-width: 760px) {
  .archives {
    padding: 32px 0 60px;
  }

  .archive-wheel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 0 18px;
    gap: 0;
  }

  /* Intro en tête */
  .archives-intro {
    flex: 0 0 auto;
    width: 100%;
    margin-bottom: 20px;
    padding: 0 4px;
  }

  .archives-intro .archives-title {
    font-size: 32px;
    line-height: 1.02;
    margin-bottom: 16px;
  }

  /* C — AUCUNE FLÈCHE SUR MOBILE (décision UX définitive) */
  .wheel-controls {
    display: none !important;
  }

  /* Scène de la roue mobile */
  .wheel-stage {
    width: 100%;
    height: clamp(410px, 112vw, 480px);
    min-height: 0;
    flex: 0 0 auto;
    overflow: hidden;
  }

  /* C8 — Micro-indication tactile subtile */
  .wheel-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    z-index: 10;
    animation: hint-float 2.6s ease-in-out infinite;
    white-space: nowrap;
    transition: opacity .35s ease;
  }

  .wheel-hint-arrow {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.32);
  }

  @keyframes hint-float {
    0%, 100% { transform: translateX(-50%); opacity: .45; }
    50%      { transform: translateX(-50%) translateX(4px); opacity: .78; }
  }

  /* Panneau en dessous de la roue mobile */
  .wheel-panel {
    width: 100%;
    flex: 0 0 auto;
    margin: 20px 0 0 0;
    border-radius: 20px;
    padding: 24px 20px;
  }

  .wp-name {
    font-size: 24px;
  }

  .wp-meta-row {
    font-size: 13px;
    gap: 10px;
  }

  .wp-meta-label {
    width: 103px;
    flex: 0 0 103px;
    font-size: 10px;
  }

  .wp-description {
    font-size: 15px;
  }

  .wp-variant {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
  }

  .lb-nav-btn.lb-prev { left: 10px; }
  .lb-nav-btn.lb-next { right: 10px; }
}
