/* =========================================
   VARIABLES LOCALES (fallback si --primary
   n'est pas défini dans style.css)
   ========================================= */
:root {
  --pw-primary: var(--primary, #1C6DD0);
  --pw-secondary: #137CB4;
  --pw-dark: #0F2341;
  --pw-text: #334155;
  --pw-muted: #7b8fa6;
  --pw-border: #eef1f6;
  --pw-bg-soft: #f8fafd;
  --pw-radius-lg: 28px;
  --pw-radius-md: 20px;
  --pw-radius-sm: 12px;
}

/* =========================================
   BARRE DE PROGRESSION DE LECTURE
   ========================================= */
.pw-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--pw-primary), var(--pw-secondary));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* =========================================
   HERO ARTICLE
   ========================================= */
.article-hero {
  position: relative;
  background: linear-gradient(135deg, var(--pw-primary) 0%, var(--pw-secondary) 100%);
  padding-bottom: clamp(60px, 10vw, 120px);
  overflow: visible;
  z-index: 1;
  font-family: 'Gevora Regular', 'Poppins', sans-serif;
}

.article-hero-image {
  position: relative;
  width: 100%;
  height: clamp(260px, 45vw, 480px);
  overflow: hidden;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(28, 109, 208, 0) 55%, rgba(28, 109, 208, 0.45) 100%);
  z-index: 1;
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Particules */
.article-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.article-dot {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0.65;
  animation-name: pwFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes pwFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(var(--move-x), var(--move-y), 0); }
}

.article-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(24px, 4vw, 60px);
  align-items: end;
  padding-top: clamp(30px, 5vw, 50px);
}

/* --- Colonne gauche : titre + meta --- */
.article-hero-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0; /* empêche le débordement du titre long */
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-breadcrumb a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s ease;
}
.article-breadcrumb a:hover { color: var(--pw-secondary); }

.article-breadcrumb-sep { color: rgba(255, 255, 255, 0.4); }
.article-breadcrumb-current {
  color: var(--pw-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.article-hero-title {
  font-size: clamp(26px, 4.2vw, 48px);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0;
  word-break: break-word;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 4px;
}

.article-hero-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}
.article-hero-date svg { width: 16px; height: 16px; color: var(--pw-secondary); flex-shrink: 0; }

.article-next-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  transition: gap 0.3s ease, color 0.3s ease;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}
.article-next-link:hover { gap: 12px; color: var(--pw-secondary); }
.article-next-link svg { width: 16px; height: 16px; }

/* --- Colonne droite : carte auteur --- */
.article-hero-right {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.article-author-card-proweb {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: clamp(14px, 2vw, 18px) clamp(16px, 2.5vw, 22px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 32px rgba(15, 35, 65, 0.1);
  max-width: 100%;
}

.article-author-initials {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--pw-primary);
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.article-author-info-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.article-author-info-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-author-info-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.article-author-info-cat {
  font-size: 12px;
  color: #ffffff !important;
  font-weight: 700;
  margin-top: 2px;
  text-decoration: none;
}

/* Ancienne variante (carte avec avatar image) — conservée si utilisée ailleurs */
.article-author-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 20px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 32px rgba(15, 35, 65, 0.1);
}
.article-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.article-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-author-info { display: flex; flex-direction: column; gap: 4px; }
.article-author-name { font-size: 17px; font-weight: 800; color: #FFFFFF; letter-spacing: -0.3px; }
.article-author-role { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.8); }
.article-author-social { font-size: 13px; font-weight: 700; color: var(--pw-secondary); text-decoration: none; transition: color 0.2s ease; }
.article-author-social:hover { color: #FFFFFF; }

/* =========================================
   CONTENU ARTICLE — EFFET "PAPER STACK"
   ========================================= */
.article-content {
  position: relative;
  z-index: 10;
  background: transparent;
  padding: 0 0 clamp(50px, 8vw, 100px) 0;
  margin-top: clamp(-50px, -6vw, -80px);
  font-family: 'Gevora Regular', 'Poppins', sans-serif;
}

.article-content-inner {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: clamp(24px, 4vw, 60px);
  position: relative;
}

/* --- Sidebar sociale --- */
.article-social-sidebar { position: relative; }

.article-social-sticky {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.article-social-label {
  font-size: 11px;
  font-weight: 700;
  color: #c5c9ce;
  text-transform: uppercase;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.article-social-line { width: 1px; height: 40px; background: var(--pw-border); }

.article-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #FFFFFF;
  border: 1px solid var(--pw-border);
  border-radius: 50%;
  color: #8f9baf;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(15, 35, 65, 0.03);
  cursor: pointer;
  flex-shrink: 0;
}
.article-social-btn:hover {
  background: var(--pw-primary);
  border-color: var(--pw-primary);
  color: #FFFFFF;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(28, 109, 208, 0.3);
}
.article-social-btn svg { width: 18px; height: 18px; }

/* --- Bloc texte central --- */
.article-text-wrapper { position: relative; }

.article-text-wrapper::before {
  content: '';
  position: absolute;
  top: 16px; left: 16px; right: -16px; bottom: -16px;
  background: var(--pw-bg-soft);
  border-radius: var(--pw-radius-lg);
  z-index: -2;
  border: 1px solid var(--pw-border);
}
.article-text-wrapper::after {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: -8px; bottom: -8px;
  background: #ffffff;
  border-radius: var(--pw-radius-lg);
  z-index: -1;
  border: 1px solid var(--pw-border);
  box-shadow: 0 8px 24px rgba(15, 35, 65, 0.04);
}

.article-text-paper {
  background: #FFFFFF;
  border-radius: var(--pw-radius-lg);
  padding: clamp(28px, 5vw, 64px) clamp(20px, 6vw, 80px);
  border: 1px solid var(--pw-border);
  box-shadow: 0 24px 48px -12px rgba(15, 35, 65, 0.08);
  position: relative;
  z-index: 1;
  overflow-wrap: break-word;
}

.article-read-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--pw-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: clamp(24px, 4vw, 40px);
  padding: 8px 16px;
  background: #EAF7FE;
  border-radius: 999px;
  flex-wrap: wrap;
}
.article-read-time svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Zone de lecture */
.article-reading-zone {
  max-width: 720px;
  margin: 0 auto;
}

.article-reading-zone img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 24px 0;
  display: block;
}

.article-reading-zone table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}

.article-reading-zone p {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.85;
  color: var(--pw-text);
  margin: 0 0 24px 0;
}

.article-reading-zone h2 {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  color: var(--pw-dark);
  margin: clamp(32px, 5vw, 56px) 0 20px 0;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.article-reading-zone h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  color: var(--pw-dark);
  margin: 32px 0 16px 0;
  line-height: 1.35;
}

.article-reading-zone a {
  color: var(--pw-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dropcap */
.article-dropcap::first-letter {
  float: left;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 0.8;
  font-weight: 800;
  color: var(--pw-primary);
  padding: 8px 12px 0 0;
  font-family: 'Gevora Regular', 'Poppins', sans-serif;
}

/* Citation */
.article-quote {
  margin: clamp(32px, 5vw, 48px) 0;
  padding: clamp(24px, 4vw, 32px) clamp(20px, 4vw, 40px);
  background: linear-gradient(to right, var(--pw-bg-soft), #ffffff);
  border-left: 4px solid var(--pw-secondary);
  border-radius: 0 16px 16px 0;
  position: relative;
}

.article-quote-icon {
  position: absolute;
  top: -16px;
  left: 24px;
  width: 32px;
  height: 32px;
  background: var(--pw-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 174, 239, 0.3);
}
.article-quote-icon svg { width: 14px; height: 14px; }

.article-quote p {
  margin: 0 !important;
  font-size: clamp(16px, 2vw, 20px) !important;
  line-height: 1.6 !important;
  color: var(--pw-dark) !important;
  font-weight: 500;
  font-style: italic;
}

/* Titre de section interne (classe manuelle) */
.article-section-title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  color: var(--pw-dark);
  margin: clamp(32px, 5vw, 56px) 0 24px 0;
  letter-spacing: -0.5px;
}

/* Liste à puces stylisée */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
}
.article-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 18px;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.7;
  color: var(--pw-text);
}
.article-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  background: var(--pw-secondary);
  border-radius: 3px;
  transform: rotate(45deg);
}
.article-list strong { color: var(--pw-dark); font-weight: 700; }

/* Navigation article précédent / suivant */
.pw-article-nav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 32px) 0 0;
  border-top: 1px solid var(--pw-border);
  margin-top: clamp(28px, 5vw, 40px);
  gap: 16px;
}

.pw-article-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pw-primary);
  text-decoration: none;
  padding: 12px 18px;
  border-radius: var(--pw-radius-sm);
  background: rgba(28, 109, 208, 0.06);
  border: 1px solid rgba(28, 109, 208, 0.12);
  transition: all 0.2s ease;
  max-width: 280px;
  min-width: 0;
}
.pw-article-nav-btn:hover {
  background: rgba(28, 109, 208, 0.12);
  transform: translateX(var(--hover-x, 0));
}
.pw-article-nav-btn.prev { --hover-x: -4px; }
.pw-article-nav-btn.next { --hover-x: 4px; margin-left: auto; }
.pw-article-nav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.pw-article-nav-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* =========================================
   ARTICLES LIÉS
   ========================================= */
.pw-related {
  padding: clamp(40px, 6vw, 60px) 0 clamp(60px, 8vw, 80px);
  background: var(--pw-bg-soft);
  font-family: 'Gevora Regular', 'Poppins', sans-serif;
}

.pw-related-title {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  color: var(--pw-dark);
  margin-bottom: clamp(20px, 3vw, 32px);
  letter-spacing: -0.5px;
}

.pw-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
}

.pw-related-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--pw-border);
  box-shadow: 0 2px 12px rgba(15, 35, 65, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.pw-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 35, 65, 0.1);
}

.pw-related-thumb {
  width: 100%;
  height: clamp(140px, 20vw, 160px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--pw-primary), var(--pw-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}
.pw-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.pw-related-card:hover .pw-related-thumb img { transform: scale(1.05); }

.pw-related-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pw-related-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--pw-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.pw-related-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--pw-dark);
  line-height: 1.4;
  margin: 0 0 12px;
  display: -webkit-box;

  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pw-related-date {
  font-size: 12px;
  color: var(--pw-muted);
  margin-top: auto;
}

/* =========================================
   RESPONSIVE — DESKTOP ÉTROIT / LAPTOP
   ========================================= */
@media (max-width: 1200px) {
  .article-text-paper {
    padding: 48px 56px;
  }
}

/* =========================================
   RESPONSIVE — TABLETTE (≤ 1100px)
   ========================================= */
@media (max-width: 1100px) {
  .article-hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-hero-right { justify-content: flex-start; }
  .article-author-card-proweb,
  .article-author-card { width: 100%; }

  .article-content-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-social-sidebar { order: 2; }
  .article-social-sticky {
    position: relative;
    top: 0;
    flex-direction: row;
    padding-bottom: 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--pw-border);
    justify-content: center;
  }
  .article-social-label { writing-mode: horizontal-tb; transform: none; }
  .article-social-line { width: 40px; height: 1px; }
  .article-social-buttons { flex-direction: row; }

  .pw-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================
   RESPONSIVE — TABLETTE PORTRAIT (≤ 900px)
   ========================================= */
@media (max-width: 900px) {
  .article-hero-image { height: 360px; }
  .pw-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================
   RESPONSIVE — MOBILE (≤ 768px)
   ========================================= */
@media (max-width: 768px) {
  .article-hero { padding-bottom: 56px; }
  .article-hero-image { height: 280px; }

  .article-text-paper {
    padding: 32px 24px;
    border-radius: 22px;
  }

  .article-breadcrumb-current { max-width: 140px; }

  .pw-article-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .pw-article-nav-btn {
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }
  .pw-article-nav-btn.next { margin-left: 0; }
}

/* =========================================
   RESPONSIVE — MOBILE ÉTROIT (≤ 580px)
   ========================================= */
@media (max-width: 580px) {
  .article-hero-image { height: 220px; }
  .article-hero-title { font-size: 24px; }

  .article-hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .article-next-link { padding-left: 0; border-left: none; }

  .article-author-card-proweb { padding: 14px 16px; gap: 12px; }
  .article-author-initials { width: 44px; height: 44px; font-size: 17px; }

  .article-content { margin-top: -32px; }

  /* Effet paper-stack coûteux visuellement à cette taille : on le retire */
  .article-text-wrapper::before,
  .article-text-wrapper::after { display: none; }

  .article-text-paper {
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 12px 28px -10px rgba(15, 35, 65, 0.1);
  }

  .article-quote { padding: 24px 18px 20px; margin: 28px 0; }
  .article-quote p { font-size: 16px !important; }
  .article-quote-icon { left: 18px; }

  .pw-related-grid { grid-template-columns: 1fr; }

  .article-social-buttons { gap: 10px; }
  .article-social-btn { width: 38px; height: 38px; }
  .article-social-btn svg { width: 16px; height: 16px; }
}

/* =========================================
   RESPONSIVE — TRÈS PETIT MOBILE (≤ 380px)
   ========================================= */
@media (max-width: 380px) {
  .article-text-paper { padding: 16px; }
  .article-hero-title { font-size: 21px; }
  .article-author-info-name { font-size: 14px; }
}