/* PORTFOLIO CNED — PAGES DÉTAIL ARTICLES */

/* Style de base pour les pages détail - Thème section Parcours */
.article-detail-page {
  background: var(--color-noir);
  color: var(--color-text-clair);
}

/* ============================================
   NAVBAR DÉTAIL
   ============================================ */

.navbar-detail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--color-noir);
  border-bottom: 1px solid var(--color-text-clair);
  z-index: 1000;
}

.navbar-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.navbar-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-principale);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--color-text-clair);
  text-decoration: none;
  text-transform: lowercase;
  transition: opacity 0.2s ease;
}

.navbar-detail-back svg {
  width: 20px;
  height: 20px;
}

.navbar-detail-back:hover {
  opacity: 0.7;
}

/* ============================================
   ARTICLE PRINCIPAL
   ============================================ */

.article-detail-main {
  padding: 8rem 0 6rem;
}

.article-detail-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* Méta-informations (date, auteur) */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-family: var(--font-principale);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-text-clair);
  opacity: 0.7;
  text-transform: lowercase;
}

/* Titre principal */
.article-title {
  font-family: "Stack Sans Notch", sans-serif;
  font-weight: 600;
  font-size: 4rem;
  line-height: 1.1;
  color: var(--color-text-clair);
  margin: 0 0 1.5rem;
}

/* Description */
.article-description {
  font-family: var(--font-principale);
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text-clair);
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

/* Actions (boutons GitHub, etc.) */
.article-actions {
  margin-bottom: 2rem;
}

.article-github-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-principale);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-clair);
  background: transparent;
  border: 1px solid var(--color-text-clair);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.article-github-button svg {
  width: 20px;
  height: 20px;
}

.article-github-button:hover {
  background: var(--color-text-clair);
  color: var(--color-noir);
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.article-tags .tag {
  font-family: var(--font-principale);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-clair);
  background: transparent;
  border: 1px solid var(--color-text-clair);
  padding: 0.25rem 0.75rem;
  letter-spacing: 0.02em;
}

/* Photo principale */
.article-main-image {
  width: 100%;
  margin: 0 0 3rem;
  overflow: hidden;
}

.article-main-image img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.article-main-image img:hover {
  transform: scale(1.02);
}

/* ============================================
   CONTENU PRINCIPAL
   ============================================ */

.article-content {
  font-family: var(--font-principale);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-clair);
}

.article-content h2 {
  font-family: var(--font-principale);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.3;
  color: var(--color-text-clair);
  margin: 3rem 0 1rem;
}

.article-content h3 {
  font-family: var(--font-principale);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--color-text-clair);
  margin: 2.5rem 0 1rem;
}

.article-content h4 {
  font-family: var(--font-principale);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--color-text-clair);
  margin: 2rem 0 0.75rem;
}

.article-content p {
  margin: 0 0 1.5rem;
}

.article-content strong {
  font-weight: 700;
}

.article-content em {
  font-style: italic;
}

/* Images dans le contenu */
.content-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 2.5rem 0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.content-image:hover {
  transform: scale(1.02);
}

/* ============================================
   GALERIES
   ============================================ */

.article-galleries {
  margin-top: 5rem;
}

.gallery-section {
  margin-bottom: 4rem;
}

.gallery-title {
  font-family: var(--font-principale);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.3;
  color: var(--color-text-clair);
  margin: 0 0 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-card {
  background: transparent;
  border: 1px solid var(--color-text-clair);
  overflow: hidden;
  padding: 1rem;
}

.gallery-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.05);
}

.gallery-card-title {
  font-family: var(--font-principale);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--color-text-clair);
  margin: 1rem 0 0.5rem;
}

.gallery-card-description {
  font-family: var(--font-principale);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-clair);
  margin: 0 0 0;
  opacity: 0.85;
}

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

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 4, 3, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid var(--color-text-clair);
  color: var(--color-text-clair);
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.lightbox-close:hover {
  background: var(--color-text-clair);
  color: var(--color-noir);
}

.lightbox-image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-principale);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--color-text-clair);
  text-align: center;
  max-width: 600px;
}

/* ============================================
   FICHIERS TÉLÉCHARGEABLES
   ============================================ */

.article-downloads {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-text-clair);
}

.downloads-title {
  font-family: var(--font-principale);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.3;
  color: var(--color-text-clair);
  margin: 0 0 2rem;
}

.downloads-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: transparent;
  border: 1px solid var(--color-text-clair);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.download-card:hover {
  background: rgba(176, 179, 208, 0.05);
  transform: translateX(8px);
}

.download-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-name {
  font-family: var(--font-principale);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text-clair);
  line-height: 1.3;
}

.download-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-principale);
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--color-text-clair);
  opacity: 0.7;
}

.download-type {
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.download-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-clair);
}

.download-icon svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .article-title {
    font-size: 3rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-detail-container {
    padding: 1rem 1.5rem;
  }
  
  .article-detail-main {
    padding: 6rem 0 4rem;
  }
  
  .article-detail-container {
    padding: 0 2rem;
  }
  
  .article-title {
    font-size: 2.5rem;
  }
  
  .article-description {
    font-size: 1.1rem;
  }
  
  .article-content {
    font-size: 1rem;
  }
  
  .article-content h2 {
    font-size: 1.75rem;
  }
  
  .article-content h3 {
    font-size: 1.35rem;
  }
  
  .article-content h4 {
    font-size: 1.15rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  
  .article-downloads {
    margin-top: 4rem;
    padding-top: 2rem;
  }
  
  .downloads-title {
    font-size: 1.75rem;
  }
  
  .download-card {
    padding: 1rem 1.25rem;
  }
  
  .download-name {
    font-size: 0.95rem;
  }
  
  .download-meta {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .navbar-detail-container {
    padding: 1rem;
  }
  
  .navbar-detail-back {
    font-size: 0.85rem;
  }
  
  .article-detail-container {
    padding: 0 1.5rem;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .article-description {
    font-size: 1rem;
  }
  
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .lightbox {
    padding: 1rem;
  }
  
  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
  
  .article-downloads {
    margin-top: 3rem;
    padding-top: 1.5rem;
  }
  
  .downloads-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .downloads-grid {
    gap: 0.75rem;
  }
  
  .download-card {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .download-card:hover {
    transform: none;
  }
  
  .download-info {
    width: 100%;
  }
  
  .download-name {
    font-size: 0.9rem;
  }
  
  .download-meta {
    gap: 0.75rem;
    font-size: 0.75rem;
  }
  
  .download-icon {
    align-self: flex-end;
    margin-top: 0.5rem;
  }
}
