/* ============================================================
   PAGE DETAIL ARTICLE
   ============================================================ */

:root {
  --article-ivory: #f6f1ea;
  --article-teal: #307276;
  --article-dark: #042825;
  --article-gold: #d9a33e;
  --article-grey: #666666;
  --article-green-block: #2f5d50;
}

.article-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 30px 60px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 55px;
  align-items: start;
}

/* ── Éléments communs des colonnes latérales ────────────── */

.article-side {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.article-side-label {
  display: block;
  font-family: var(--font-heading-secondary);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--article-dark);
  margin-bottom: 12px;
}

/* ── Lien retour ────────────────────────────────────────── */

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--article-grey);
  font-family: var(--font-heading-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
  width: fit-content;
}

.article-back-link .back-arrow {
  position: relative;
  width: 55px;
  height: 1px;
  background: var(--article-gold);
  flex-shrink: 0;
  transition: width 0.3s ease;
}

.article-back-link .back-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-bottom: 1px solid var(--article-gold);
  border-left: 1px solid var(--article-gold);
  transform: rotate(45deg);
}

.article-back-link:hover .back-arrow {
  width: 75px;
}

/* ── Méta (catégorie, date, temps de lecture) ───────────── */

.article-category {
  display: inline-block;
  font-family: var(--font-heading-secondary);
  font-size: var(--text-base);
  color: var(--article-grey);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--article-gold);
  margin-bottom: 14px;
}

.article-meta-line {
  color: #9b9b9b;
  font-size: var(--text-sm);
  margin: 4px 0;
}

/* ── Partage ────────────────────────────────────────────── */

.article-share .article-side-label {
  margin-bottom: 10px;
}

.article-share-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-share-buttons a,
.article-share-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d8d2c6;
  background: transparent;
  color: var(--article-grey);
  cursor: pointer;
  transition: all 0.2s ease;
}

.article-share-buttons svg {
  width: 15px;
  height: 15px;
}

.article-share-buttons a:hover,
.article-share-buttons button:hover {
  background: var(--article-teal);
  border-color: var(--article-teal);
  color: #ffffff;
}

.article-share-buttons button.is-copied {
  background: var(--article-gold);
  border-color: var(--article-gold);
  color: #ffffff;
}

/* ── Sommaire ───────────────────────────────────────────── */

.article-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc li {
  margin-bottom: 18px;
}

.article-toc a {
  display: block;
  color: var(--article-grey);
  font-family: var(--font-heading-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
  line-height: var(--leading-snug);
  transition: color 0.2s ease;
}

.article-toc a:hover {
  color: var(--article-teal);
}

.article-toc-number {
  display: block;
  color: var(--article-teal);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

/* ── Cartes citation (gauche + Feng Shui à droite) ──────── */

.article-quote-card,
.article-fengshui-card {
  background: var(--article-ivory);
  border-radius: 16px;
  padding: 30px 26px;
}

.article-quote-drawing {
  display: block;
  width: 100%;
  border-radius: 12px;
  margin-bottom: 26px;
}

.article-quote-mark {
  display: block;
  font-family: Georgia, serif;
  font-size: 3rem;
  line-height: 0.5;
  color: var(--article-gold);
  margin-bottom: 14px;
}

.article-quote-card p,
.article-fengshui-card p {
  font-style: italic;
  font-family: Georgia, serif;
  color: var(--article-dark);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin: 0 0 20px;
}

.article-quote-card cite,
.article-fengshui-card cite {
  font-style: italic;
  font-family: Georgia, serif;
  color: var(--article-grey);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* ── Contenu central ────────────────────────────────────── */

.article-main {
  min-width: 0;
}

.article-title {
  font-family: var(--font-heading-secondary);
  color: var(--article-teal);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  -webkit-text-stroke: 0.6px currentcolor;
  margin: 0 0 12px;
  position: relative;
  padding-bottom: 22px;
}

/* Trait de pinceau sous le titre */
.article-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 130px;
  height: 7px;
  border-radius: 6px 10px 4px 8px / 8px 4px 10px 6px;
  background: linear-gradient(95deg, #35667d 0%, #4a7d92 60%, #35667d 100%);
  opacity: 0.85;
  transform: rotate(-1deg);
}

.article-intro {
  margin: 25px 0 35px;
}

.article-intro p {
  text-align: justify;
  line-height: var(--leading-relaxed);
}

/* ── Image d'en-tête avec bloc vert décalé ──────────────── */

.article-hero-image {
  position: relative;
  margin: 0 0 70px;
}

.article-hero-image::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 45%;
  height: 70%;
  background: var(--article-green-block);
  border-radius: 10px;
  z-index: 0;
}

.article-hero-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 10px;
  display: block;
  box-shadow: 0 12px 30px rgba(4, 40, 37, 0.15);
}

/* ── Sections numérotées ────────────────────────────────── */

.article-part {
  margin-bottom: 70px;
  scroll-margin-top: 120px;
}

.article-part-header {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 25px;
}

.article-part-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #bcd8d3;
  color: var(--article-dark);
  font-family: var(--font-heading-secondary);
  font-size: var(--text-xl);
}

.article-part-header h2 {
  font-family: var(--font-heading-secondary);
  color: var(--article-teal);
  font-size: var(--text-xl);
  -webkit-text-stroke: 0.5px currentcolor;
  margin: 0;
}

.article-part-content {
  border-left: 2px solid #c9dcd8;
  padding-left: 30px;
  margin-left: 26px;
}

.article-part-content p {
  text-align: justify;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--article-dark);
}

.article-part-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 15px 0;
}

/* ── Section "En résumé" : montagne aquarelle à droite ──── */

.article-summary-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.article-summary-text {
  flex: 1;
  min-width: 0;
}

.article-part-content img.article-summary-mountain {
  flex-shrink: 0;
  width: 250px;
  max-width: 35%;
  border-radius: 0;
  margin: 0;
}

/* ── Colonne droite ─────────────────────────────────────── */

.article-info-card {
  background: var(--article-ivory);
  border-radius: 16px;
  padding: 26px;
}

.article-reading-time {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--article-dark);
  font-family: var(--font-heading-secondary);
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-reading-time svg {
  width: 24px;
  height: 24px;
  color: var(--article-grey);
}

/* Article suivant */

.article-next-card {
  display: block;
  text-decoration: none;
  text-align: center;
}

.article-next-card .article-side-label {
  text-align: center;
}

.article-next-image {
  width: 130px;
  height: 165px;
  margin: 0 auto 18px;
  border-radius: 100px 100px 8px 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(4, 40, 37, 0.15);
}

.article-next-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.article-next-card:hover .article-next-image img {
  transform: scale(1.06);
}

.article-next-card p {
  color: var(--article-grey);
  font-family: var(--font-heading-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  text-align: center;
  margin: 0 auto;
  max-width: 220px;
}

/* FAQ */

.article-faq-card {
  background: var(--article-ivory);
  border-radius: 16px;
  padding: 30px 26px;
  text-align: center;
}

.article-faq-card ul {
  list-style: none;
  margin: 0 0 25px;
  padding: 0;
  text-align: left;
}

.article-faq-card li + li {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0d8ca;
}

.article-faq-card li a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  color: var(--article-dark);
  font-family: var(--font-heading-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-faq-card li a:hover {
  color: var(--article-teal);
}

.article-faq-plus {
  flex-shrink: 0;
  color: var(--article-grey);
  font-size: var(--text-lg);
}

.article-faq-all {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--article-gold);
  border-radius: 30px;
  color: var(--article-dark);
  font-family: var(--font-heading-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.25s ease;
}

.article-faq-all:hover {
  background: var(--article-gold);
  color: #ffffff;
}

/* ── Pagination bas de page ─────────────────────────────── */

.article-pagination {
  max-width: 1100px;
  margin: 0 auto 80px;
  background: var(--article-ivory);
  border-radius: 16px;
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.article-pagination-link {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  max-width: 45%;
}

.article-pagination-next {
  text-align: right;
  margin-left: auto;
}

.article-pagination-label {
  display: block;
  font-family: var(--font-heading-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--article-dark);
  margin-bottom: 6px;
}

.article-pagination-title {
  display: block;
  color: var(--article-grey);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

.pagination-arrow {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 1px;
  background: var(--article-gold);
  transition: width 0.3s ease;
}

.pagination-arrow-left::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-bottom: 1px solid var(--article-gold);
  border-left: 1px solid var(--article-gold);
  transform: rotate(45deg);
}

.pagination-arrow-right::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--article-gold);
  border-right: 1px solid var(--article-gold);
  transform: rotate(45deg);
}

.article-pagination-link:hover .pagination-arrow {
  width: 80px;
}

/* ── Article introuvable ────────────────────────────────── */

.article-not-found {
  text-align: center;
  padding: 120px 20px;
}

.article-not-found .article-back-link {
  margin-top: 20px;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1250px) {
  .article-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
  }

  .article-side-right {
    grid-column: 1 / -1;
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    align-items: stretch;
  }
}

@media (max-width: 850px) {
  .article-layout {
    grid-template-columns: 1fr;
    padding: 35px 20px 50px;
    gap: 40px;
  }

  .article-side {
    position: static;
  }

  .article-side-left .article-quote-card {
    display: none;
  }

  .article-toc {
    background: var(--article-ivory);
    border-radius: 16px;
    padding: 25px;
  }

  .article-hero-image::after {
    right: -10px;
    bottom: -10px;
  }

  .article-part-content {
    margin-left: 0;
    padding-left: 20px;
  }

  .article-summary-content {
    flex-direction: column;
    gap: 20px;
  }

  .article-part-content img.article-summary-mountain {
    width: 200px;
    max-width: 60%;
  }

  .article-pagination {
    flex-direction: column;
    align-items: stretch;
    margin: 0 20px 60px;
  }

  .article-pagination-link {
    max-width: 100%;
  }

  .article-pagination-next {
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* ── iPhone (≤480px) : lisibilité et débordement ────────── */
@media (max-width: 480px) {
  /* Numéros du sommaire : plus gros et moins fins pour rester lisibles */
  .article-toc-number {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: 6px;
  }

  /* Titres de sections dans le sommaire (texte des <li>) : un peu plus gros
     et moins fins */
  .article-toc a {
    font-size: var(--text-base);
    -webkit-text-stroke: 0.4px currentcolor;
  }

  /* Aucun défilement horizontal : tout le texte reste dans l'écran */
  .article-layout {
    overflow-x: hidden;
  }

  .article-title,
  .article-intro p,
  .article-part-header h2,
  .article-part-content p,
  .article-part-content li {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* "En résumé" : le texte occupe toute la largeur et s'aligne le long du
     trait au lieu d'être centré (sinon il passe sous la bordure de gauche).
     L'image montagne reste centrée. */
  .article-summary-text {
    align-self: stretch;
    width: 100%;
  }
}
