/* ── Reset & base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: #F0F7FF; min-height: 100vh; }

/* ── Header ────────────────────────────────────────────────────────────── */
.pg-header {
  background: #1B4FD8;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.pg-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.pg-logo-text { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.pg-logo-sub { font-size: 12px; color: #93C5FD; }
.pg-nav { display: flex; gap: 8px; align-items: center; }
.pg-nav-link {
  font-size: 13px; color: #BFDBFE; padding: 6px 12px;
  border-radius: 20px; text-decoration: none; cursor: pointer; transition: all 0.15s;
}
.pg-nav-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.pg-login-btn {
  background: #F97316; color: #fff; border: none; border-radius: 20px;
  padding: 7px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  text-decoration: none; transition: background 0.15s;
}
.pg-login-btn:hover { background: #EA6C0A; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.pg-hero {
  background: #1B4FD8;
  padding: 2rem 1.5rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden; min-height: 200px;
}
.pg-hero-left { flex: 1; position: relative; z-index: 1; }
.pg-hero-title { font-size: 30px; font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 0.75rem; }
.pg-hero-title span { color: #FCD34D; }
.pg-hero-desc { font-size: 15px; color: #BFDBFE; line-height: 1.6; max-width: 380px; }
.pg-hero-right { flex-shrink: 0; padding-right: 1rem; position: relative; z-index: 1; }
.pg-stars { position: absolute; top: 0; right: 0; left: 0; bottom: 0; pointer-events: none; }
.star { fill: rgba(255,255,255,0.5); }

/* ── Conteneur centré (accueil) ────────────────────────────────────────── */
.pg-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
/* hero aussi centré à l'intérieur */
.pg-hero { padding-left: max(1.5rem, calc(50% - 550px)); padding-right: max(1.5rem, calc(50% - 550px)); }

/* ── Catégories ────────────────────────────────────────────────────────── */
.pg-categories-outer {
  background: #fff;
  border-bottom: 1px solid #E5EAF3;
  position: sticky; top: 64px; z-index: 90;
}
.pg-categories {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 1rem 1.5rem;
  max-width: 1100px; margin: 0 auto;
}
.pg-cat {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  user-select: none; text-decoration: none; transition: opacity 0.15s, box-shadow 0.15s;
}
.pg-cat:hover { opacity: 0.85; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.pg-cat.active { border-color: currentColor; }
.pg-cat-all { background: #F1F5F9; color: #475569; }

/* ── Section title ─────────────────────────────────────────────────────── */
.pg-section-title {
  font-size: 18px; font-weight: 700; color: #1E293B;
  padding: 1.5rem 0 0.75rem;
}

/* ── Articles grid ─────────────────────────────────────────────────────── */
.pg-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  padding: 0 0 1.5rem;
}
.pg-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  border: 1px solid #E5EAF3; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none; display: block;
}
.pg-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.pg-card-thumb {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.pg-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pg-card-play {
  position: absolute;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  bottom: 8px; right: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.pg-card-play-tri {
  width: 0; height: 0;
  border-left: 10px solid #1B4FD8;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}
.pg-card-body { padding: 12px; }
.pg-card-cat {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  display: inline-block; margin-bottom: 6px;
}
.pg-card-title { font-size: 14px; font-weight: 600; color: #1E293B; line-height: 1.4; margin-bottom: 4px; }
.pg-card-date { font-size: 11px; color: #94A3B8; }
.pg-thumb-default { background: #F1F5F9; }
.pg-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 3rem;
  color: #94A3B8; font-size: 15px;
}

/* ── About section (accueil) ───────────────────────────────────────────── */
.pg-about {
  margin: 0 0 1.5rem;
  background: #fff; border-radius: 16px;
  border: 1px solid #E5EAF3; padding: 1.25rem;
  display: flex; gap: 16px; align-items: center;
}
.pg-about-text h3 { font-size: 15px; font-weight: 700; color: #1E293B; margin-bottom: 6px; }
.pg-about-text p { font-size: 13px; color: #64748B; line-height: 1.6; }
.pg-about-link {
  display: inline-block; margin-top: 8px;
  font-size: 12px; color: #1B4FD8; font-weight: 600; text-decoration: none;
}
.pg-about-link:hover { text-decoration: underline; }

/* ── Page Article ──────────────────────────────────────────────────────── */
.pg-article-wrapper {
  max-width: 780px; margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.pg-article-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #1B4FD8; text-decoration: none;
  margin-bottom: 1.5rem; font-weight: 600;
}
.pg-article-back:hover { text-decoration: underline; }
.pg-article-header { margin-bottom: 1.5rem; }
.pg-article-title { font-size: 28px; font-weight: 700; color: #1E293B; line-height: 1.3; margin: 0.5rem 0; }
.pg-article-meta { font-size: 12px; color: #94A3B8; }
.pg-article-cover { width: 100%; border-radius: 12px; margin-bottom: 1.5rem; max-height: 400px; object-fit: cover; }
.pg-article-video { margin-bottom: 1.5rem; border-radius: 12px; overflow: hidden; position: relative; padding-top: 56.25%; }
.pg-article-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.pg-article-content {
  font-size: 16px; color: #334155; line-height: 1.8;
}
.pg-article-content h1, .pg-article-content h2, .pg-article-content h3 {
  color: #1E293B; margin: 1.5rem 0 0.75rem;
}
.pg-article-content p { margin-bottom: 1rem; }
.pg-article-content img { max-width: 100%; border-radius: 8px; margin: 0.5rem 0; }
.pg-article-content a { color: #1B4FD8; }
.pg-article-content blockquote {
  border-left: 4px solid #3B82F6; padding-left: 1rem;
  color: #64748B; font-style: italic; margin: 1rem 0;
}
.pg-article-content ul, .pg-article-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.pg-article-content li { margin-bottom: 0.3rem; }
.pg-article-content pre, .pg-article-content code {
  background: #F1F5F9; border-radius: 4px; font-family: monospace; font-size: 14px;
}
.pg-article-content pre { padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }
.pg-article-content code { padding: 2px 5px; }
.pg-article-content .ql-video { width: 100%; aspect-ratio: 16/9; border-radius: 8px; }

/* ── Page À propos ─────────────────────────────────────────────────────── */
.pg-about-page { max-width: 680px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.pg-about-hero { text-align: center; margin-bottom: 2rem; }
.pg-about-hero h1 { font-size: 28px; font-weight: 700; color: #1E293B; margin-top: 1rem; }
.pg-about-hero p { color: #64748B; font-size: 15px; line-height: 1.7; margin-top: 0.5rem; }
.pg-about-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid #1B4FD8; }
.pg-about-avatar-placeholder {
  width: 100px; height: 100px; border-radius: 50%; background: #FFF7ED;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px; border: 4px solid #1B4FD8; margin: 0 auto;
}
.pg-section-card {
  background: #fff; border-radius: 16px; padding: 1.25rem;
  border: 1px solid #E5EAF3; margin-bottom: 1rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.pg-section-icon { font-size: 32px; flex-shrink: 0; }
.pg-section-card h3 { font-size: 16px; font-weight: 700; color: #1E293B; margin-bottom: 0.4rem; }
.pg-section-card p { font-size: 14px; color: #64748B; line-height: 1.6; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.pg-footer {
  text-align: center; font-size: 12px; color: #94A3B8; padding: 1.5rem 1rem;
  border-top: 1px solid #E5EAF3; margin-top: 1rem;
}

/* ── 404 ───────────────────────────────────────────────────────────────── */
.pg-404 { text-align: center; padding: 4rem 1.5rem; }
.pg-404 .emoji { font-size: 64px; display: block; margin-bottom: 1rem; }
.pg-404 h1 { font-size: 28px; font-weight: 700; color: #1E293B; margin-bottom: 0.5rem; }
.pg-404 p { color: #64748B; margin-bottom: 1.5rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: #1B4FD8; color: #fff; text-decoration: none;
  padding: 10px 20px; border-radius: 20px; font-weight: 600; font-size: 14px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .pg-hero { flex-direction: column; }
  .pg-hero-right { display: none; }
  .pg-nav-link { display: none; }
  .pg-article-title { font-size: 22px; }
}
