/* ============================================================
   Trace Detail
   ============================================================ */

/* La navbar est fixed → on compense */
.detail-wrapper {
  padding-top: 52px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  min-height: calc(100vh - 52px);
}

/* Séparateur vertical */
.detail-left {
  padding: 40px 36px;
  border-right: 2px solid var(--white);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

/* Grand titre de page : "TRACE" */
.detail-page-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(64px, 8vw, 100px);
  line-height: 0.88;
  text-transform: uppercase;
  color: var(--white);
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-light);
}

/* "Description :" et "Progression :" — même taille */
.detail-section-title {
  font-family: var(--font-sub);
  font-size: 18px;
  font-weight: normal;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

/* Titre de la trace — même taille que "Description :" */
.detail-trace-name {
  font-family: var(--font-title);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.detail-text {
  font-size: 12px;
  color: var(--gray-light);
  line-height: 1.8;
}

.detail-cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* ---- Panneau droit — bento images ---- */
.detail-right {
  padding: 40px 36px;
  overflow-y: auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bento-item {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #1a1a1a;
}

.bento-item.large {
  grid-column: 1 / -1;
}

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.bento-item.large img { height: auto; object-fit: unset; }
.bento-item img:hover { transform: scale(1.02); }

/* Vidéo custom */
.video-wrapper {
  position: relative;
  cursor: pointer;
}

.video-wrapper video {
  width: 100%;
  display: block;
  border-radius: var(--radius-card);
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius-card);
  transition: opacity 0.2s;
}

.video-wrapper.playing .video-overlay { opacity: 0; pointer-events: none; }

.video-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.video-play-btn svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.video-wrapper:hover .video-play-btn { transform: scale(1.1); }

/* ---- Commentaires — sans bordure de séparation ---- */
.comments-section {
  padding: 40px 40px 60px;
}

.comments-title {
  font-family: var(--font-sub);
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--white);
}

.comment-card {
  background: rgba(20,20,20,0.85);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-author { font-size: 13px; font-weight: 600; color: var(--pink); }
.comment-date   { font-size: 11px; color: var(--gray); }

.comment-text {
  font-size: 13px;
  color: var(--gray-light);
  line-height: 1.6;
}

.comment-delete {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 12px;
  transition: color 0.2s;
}
.comment-delete:hover { color: #ff4f4f; }

.comment-form {
  margin-top: 24px;
  background: rgba(15,15,15,0.8);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 20px;
}

.comment-form textarea {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--white);
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s;
}
.comment-form textarea:focus { border-color: var(--pink); }

.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

.comments-locked {
  background: rgba(20,20,20,0.85);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--gray);
  font-size: 13px;
}
.comments-locked a { color: var(--pink); }

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-left {
    border-right: none;
    border-bottom: 2px solid var(--white);
    padding: 28px 20px;
  }
  .detail-right { padding: 28px 20px; }
  .bento-grid { columns: 1; }
  .comments-section { padding: 28px 20px 48px; }
}
