/* =========================================================
   ARTICLE.CSS — styles des pages article et blog
   ========================================================= */

/* ===== HERO ARTICLE ===== */
.article-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.article-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,12,10,0.25) 0%,
    rgba(10,12,10,0.5) 50%,
    rgba(10,12,10,0.92) 100%
  );
  pointer-events: none;
}
.article-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.article-hero__back {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245,245,244,0.55);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  align-self: flex-start;
  position: relative;
  z-index: 3;
}
.article-hero__back:hover { color: #fff; }
.article-hero__cat {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,245,244,0.7);
  border-bottom: 1px solid rgba(245,245,244,0.3);
  padding-bottom: 3px;
  align-self: flex-start;
}
.article-hero__title {
  font-family: var(--font-main);
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 720px;
}
.article-hero__meta {
  font-size: 0.8rem;
  color: rgba(245,245,244,0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.article-hero__sep { opacity: 0.4; }

/* ===== BARRE DE LECTURE ===== */
.reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,0.08);
  z-index: 200;
  pointer-events: none;
}
.reading-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
  transform-origin: left;
}

/* ===== EMPLACEMENTS PHOTOS ===== */
.article-photo {
  margin: 2.8rem 0;
  border-radius: 8px;
  overflow: hidden;
}
.article-photo--full .article-photo__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background: var(--rule);
}
/* Placeholder visuel quand l'image est vide */
.article-photo--full .article-photo__img[src=""],
.article-photo__duo-item .article-photo__img[src=""] {
  background: linear-gradient(135deg, #e8ece8 0%, #d4dbd4 100%);
  min-height: 280px;
}
.article-photo__duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.article-photo__duo-item {
  margin: 0;
  padding: 0;
}
.article-photo__duo-item .article-photo__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: var(--rule);
}
.article-photo__caption {
  font-size: 0.78rem;
  color: var(--muted-soft);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.5;
}
.article-photo__duo-item .article-photo__caption {
  text-align: left;
  margin-top: 0.35rem;
}

@media (max-width: 600px) {
  .article-photo__duo-grid { grid-template-columns: 1fr; }
}

/* ===== PHOTO + TEXTE CÔTE À CÔTE (portrait) ===== */
.article-photo--beside {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  margin: 2rem 0 2.5rem;
}
.article-photo--beside__img img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.article-photo--beside__img figcaption {
  font-size: 0.78rem;
  color: var(--muted-soft);
  margin-top: 0.4rem;
  font-style: italic;
}
.article-photo--beside__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Variante inversée : texte à gauche, photo à droite */
.article-photo--beside-reverse {
  grid-template-columns: 1fr 280px;
}
.article-photo--beside-reverse .article-photo--beside__img { order: 2; }
.article-photo--beside-reverse .article-photo--beside__text { order: 1; }

@media (max-width: 680px) {
  .article-photo--beside,
  .article-photo--beside-reverse {
    grid-template-columns: 1fr;
  }
  .article-photo--beside-reverse .article-photo--beside__img,
  .article-photo--beside-reverse .article-photo--beside__text {
    order: unset;
  }
}

/* ===== ENCADRÉ RÉSUMÉ (ce que vous allez apprendre) ===== */
.article-intro-box {
  background: rgba(58,74,60,0.07);
  border: 1px solid rgba(58,74,60,0.18);
  border-radius: 10px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 2.5rem;
}
.article-intro-box__label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.article-intro-box ul {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.article-intro-box li {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}
.article-intro-box a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(58,74,60,0.35);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.article-intro-box a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ===== SOMMAIRE ===== */
.article-toc {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 3rem;
}
.article-toc__title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.article-toc__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.article-toc ol {
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  counter-reset: toc;
}
.article-toc li { list-style: none; counter-increment: toc; }
.article-toc a {
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  transition: color 0.2s;
  border-bottom: none !important;
}
.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted-soft);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.article-toc a:hover { color: var(--accent); }

/* ===== ENCADRÉ CONSEIL ===== */
.article-tip {
  display: flex;
  gap: 1rem;
  background: rgba(58,74,60,0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
}
.article-tip__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.6;
}
.article-tip__body {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink);
}
.article-tip__body strong { color: var(--accent); }

/* ===== CORPS DE L'ARTICLE ===== */
.article-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.article-body {
  padding-top: 3.5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
}

.article-body p { margin: 0 0 1.2rem; }

.article-body h2 {
  font-family: var(--font-main);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 2.8rem 0 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.article-body ul,
.article-body ol {
  padding-left: 1.4rem;
  margin: 0 0 1.2rem;
}
.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.article-body strong { font-weight: 600; color: var(--ink); }

.article-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(58,74,60,0.35);
  transition: border-color 0.2s;
}
.article-body a:hover { border-color: var(--accent); }

.article-body blockquote {
  background: rgba(58,74,60,0.05);
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 1.2rem 1.6rem;
  border-radius: 0 8px 8px 0;
}
.article-body blockquote p { margin-bottom: 0.6rem; color: var(--muted); }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body blockquote strong { color: var(--accent); }

.article-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.article-conclusion {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}

/* ===== CHECKLIST ===== */
.article-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.article-checklist li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1.2rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.article-checklist li:last-child { border-bottom: none; }
.article-checklist li::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(58,74,60,0.06);
}

/* ===== AUTEURE ===== */
.article-author {
  display: flex;
  align-items: flex-start;
  gap: 1.6rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 2rem 2rem;
  margin-top: 4rem;
}
.article-author__photo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,0.25);
}
.article-author__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.25);
  transform-origin: center 20%;
}
.article-author__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.article-author__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
  font-weight: 500;
}
.article-author__name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.article-author__bio {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 0.2rem;
}
.article-author__home {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.article-author__home:hover { opacity: 0.7; }

/* ===== CTA ARTICLE SUIVANT ===== */
.article-next {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--bg);
  border: 1.5px solid var(--accent);
  color: var(--ink);
  text-decoration: none;
  border-radius: 10px;
  padding: 1.4rem 1.8rem;
  margin-top: 2.5rem;
  transition: background 0.2s, box-shadow 0.2s;
}
.article-next:hover {
  background: rgba(52,78,58,0.05);
  box-shadow: 0 2px 12px rgba(52,78,58,0.12);
}
.article-next__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.article-next__title {
  font-family: var(--font-main);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

/* ===== SECTION DÉCOUVREZ AUSSI ===== */
.article-also {
  margin: 3rem 0 0;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--rule);
}
.article-also__title {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.article-also__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.article-also__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-also__card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.article-also__img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}
.article-also__body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.article-also__cat {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.article-also__label {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.4;
  font-weight: 500;
}
@media (max-width: 640px) {
  .article-also__grid { grid-template-columns: 1fr; }
}

/* ===== CHIFFRES CLÉS ===== */
.article-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  margin: 2rem 0;
}
.article-stats__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.2rem 1rem;
  border-right: 1px solid var(--rule);
  text-align: center;
}
.article-stats__item:last-child { border-right: none; }
.article-stats__value {
  font-family: var(--font-main);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--accent);
  line-height: 1.1;
}
.article-stats__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.4;
}
@media (max-width: 640px) {
  .article-stats { grid-template-columns: repeat(2, 1fr); }
  .article-stats__item:nth-child(2) { border-right: none; }
  .article-stats__item:nth-child(1),
  .article-stats__item:nth-child(2) { border-bottom: 1px solid var(--rule); }
}

/* ===== CARTE OPENSTREETMAP ===== */
.article-map {
  margin: 2rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.article-map iframe {
  width: 100%;
  height: 340px;
  border: none;
  display: block;
}
.article-map__caption {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.7rem 1rem;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 640px) {
  .article-map iframe { height: 240px; }
}

/* ===== LIEN ARTICLE PRÉCÉDENT ===== */
.article-prev {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  border-radius: 10px;
  padding: 1.2rem 1.6rem;
  margin-bottom: 2.5rem;
  transition: border-color 0.25s;
}
.article-prev:hover { border-color: var(--accent); }
.article-prev__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
}
.article-prev__title {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.4;
}
.article-prev--bottom { margin-bottom: 0; margin-top: 2.5rem; }

/* ===== NAVIGATION BLOG ===== */
.article-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}
.article-nav__all {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 0.85rem 2rem;
  border-radius: 2px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.article-nav__all:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== PAGE BLOG LISTING ===== */
.blog-page {
  background: var(--bg);
  min-height: 100vh;
}
.blog-page__hero {
  background: var(--accent);
  padding: 10rem 4rem 5rem;
  text-align: center;
}
.blog-page__hero .section__eyebrow {
  justify-content: center;
  color: rgba(245,245,244,0.7);
}
.blog-page__hero .section__eyebrow::before { background: rgba(245,245,244,0.5); }
.blog-page__title {
  font-family: var(--font-main);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 1rem;
}
.blog-page__title em { font-style: italic; font-weight: 400; opacity: 0.75; }
.blog-page__sub {
  margin-top: 1rem;
  font-size: 1rem;
  color: rgba(245,245,244,0.65);
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.blog-page__grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ===== TABLEAU COMPARATIF ===== */
.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0 2.5rem;
  font-size: 0.88rem;
  font-family: var(--font-ui, 'Hanken Grotesk', sans-serif);
}
.article-table th,
.article-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.4;
}
.article-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light, #666);
  background: transparent;
  border-bottom: 2px solid var(--rule);
}
.article-table thead th:first-child { width: 30%; }
.article-table tbody tr:last-child td { border-bottom: none; }
.article-table tbody tr:nth-child(odd) td { background: rgba(58,74,60,0.03); }
@media (max-width: 640px) {
  .article-table { font-size: 0.78rem; }
  .article-table th, .article-table td { padding: 0.6rem 0.6rem; }
}

/* ===== SHORT VERTICAL (9:16) ===== */
.article-short-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.5rem 0;
}
.article-short {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  position: relative;
}
.article-short iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Short + texte côte à côte */
.article-short-beside {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2.5rem 0;
}
.article-short-beside .article-short {
  max-width: 280px;
}
.article-short-beside__text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (max-width: 680px) {
  .article-short-beside {
    grid-template-columns: 1fr;
  }
  .article-short-beside .article-short {
    max-width: 340px;
    margin: 0 auto;
  }
}

/* ===== VIDÉO EMBARQUÉE ===== */
.article-video-wrap {
  margin: 2.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
}
.article-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.article-video-caption {
  font-size: 0.82rem;
  color: var(--ink-light, #666);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ===== NAV active state ===== */
.nav__active { opacity: 0.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .article-hero { height: 55vh; }
  .article-hero__title { font-size: clamp(1.4rem, 5vw, 2rem); }
  .article-author { flex-direction: column; }
  .blog-page__hero { padding: 8rem 2rem 4rem; }
  .blog-page__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .article-hero { height: 50vh; min-height: 340px; }
  .article-body { font-size: 1rem; }
  .blog-page__grid { grid-template-columns: 1fr; gap: 12px; }
}
