/**
 * All Articles Page Styles
 * Template: Tous les articles — Hero gauche
 * 
 * @package AI_DragonFly
 */

/* Variables (reprises depuis style.css) */
.all-articles-page {
  --bg: #fff;
  --text: #364145;
  --muted: #6b7a80;
  --accent: #F47920;
  --border: #e5e8ea;
  --container: 1280px;
  --gap: 20px;
  --radius: 12px;
  --sidebar: 280px;
}

/* Page Head */
.all-articles-page .page-head {
  margin-bottom: 16px;
}

.all-articles-page .page-head h1 {
  font-size: 1.9rem;
  margin: 0 0 6px;
}

.all-articles-page .page-head .subhead {
  color: var(--muted);
  margin: 0;
}

/* Layout 2 colonnes */
.all-articles-page .layout {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .all-articles-page .layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar (menu vertical fixe) */
.all-articles-page .sidebar {
  position: sticky;
  top: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fafbfc;
  padding: 16px;
}

.all-articles-page .sb-section {
  margin-bottom: 16px;
}

.all-articles-page .sb-section:last-child {
  margin-bottom: 0;
}

.all-articles-page .sb-section h3 {
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--muted);
}

.all-articles-page .field {
  margin-bottom: 12px;
}

.all-articles-page .field:last-child {
  margin-bottom: 0;
}

.all-articles-page .field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.all-articles-page .field input[type="search"],
.all-articles-page .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
}

.all-articles-page .tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.all-articles-page .tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
}

.all-articles-page .tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.all-articles-page .sb-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.all-articles-page .btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.all-articles-page .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Cards (structure commune) */
.all-articles-page .card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.all-articles-page .thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: cover;
  background: #eef1f3;
}

.all-articles-page .thumb.fallback {
  background: linear-gradient(135deg, #f3f5f6 0%, #e9eef1 100%);
}

.all-articles-page .card-body {
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 10px;
}

.all-articles-page .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.all-articles-page .meta a {
  color: inherit;
  text-decoration: none;
}

.all-articles-page .meta a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.all-articles-page .title {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-height: calc(1.35em * 2);
}

.all-articles-page .title a {
  color: var(--text);
  text-decoration: none;
}

.all-articles-page .title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.all-articles-page .excerpt {
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  min-height: calc(1.5em * 3);
}

.all-articles-page .tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

/* Card footer (auteur + tags collés en bas) */
.all-articles-page .card-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Author row (social style) */
.all-articles-page .author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.all-articles-page .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9eef1;
  flex: 0 0 44px;
  box-shadow: 0 0 0 2px #fff;
}

.all-articles-page .author-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.all-articles-page .author-name {
  font-weight: 600;
  color: #223037;
  text-decoration: none;
}

.all-articles-page .author-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.all-articles-page .author-handle {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.all-articles-page .author-handle:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* HERO (très grand) */
.all-articles-page .hero {
  margin-bottom: 0;
}

.all-articles-page .hero .card {
  border-radius: 18px;
}

.all-articles-page .hero .thumb {
  aspect-ratio: 21/9; /* stabilise la hauteur du HERO et évite l’espace fantôme */
}

.all-articles-page .hero .title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  min-height: calc(1.25em * 3);
}

.all-articles-page .hero .meta {
  font-size: 0.95rem;
}

/* 2 gros articles (ligne horizontale) */
.all-articles-page .featured-row {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(1, minmax(0, 1fr));
  margin-bottom: var(--gap);
}

@media (min-width: 800px) {
  .all-articles-page .featured-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.all-articles-page .featured-row .title {
  font-size: 1.1rem;
}

/* Grille 3 colonnes */
.all-articles-page .grid-4 {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 700px) {
  .all-articles-page .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .all-articles-page .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Pagination */
.all-articles-page .pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 28px 0 8px;
  list-style: none;
  padding: 0;
}

.all-articles-page .pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.all-articles-page .pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.all-articles-page .pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.all-articles-page .pagination .dots {
  border: none;
  background: transparent;
  padding: 0;
  min-width: auto;
}

.all-articles-page .note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
  text-align: center;
}

/* Fixed navbar offset + WP admin bar handling */
.all-articles-page {
  --navbar-height: 70px;
  padding-top: calc(var(--navbar-height) + 16px);
}
.admin-bar .all-articles-page {
  padding-top: calc(var(--navbar-height) + 32px + 16px);
}
@media (max-width: 782px) {
  .admin-bar .all-articles-page {
    padding-top: calc(var(--navbar-height) + 46px + 16px);
  }
}

/* Override global home hero styles for the Articles page */
.all-articles-page .hero {
  height: auto;
  background: none;
  display: block;
  position: static !important;
  text-align: left;
  padding: 0;
  overflow: hidden;
  transform: none !important;
  animation: none !important;
  will-change: auto;
  backface-visibility: hidden;
}

.all-articles-page .hero .card {
  overflow: hidden;
  position: relative;
  transform: none !important;
  animation: none !important;
  opacity: 1 !important;
  will-change: auto;
  backface-visibility: hidden;
}

.all-articles-page .hero .card * {
  transform: none !important;
  animation: none !important;
}
.all-articles-page .hero::before {
  content: none;
}
.all-articles-page .hero .card-body,
.all-articles-page .hero .title,
.all-articles-page .hero .meta,
.all-articles-page .hero .excerpt {
  text-align: left;
}

/* Hide tags everywhere on the All Articles page */
.all-articles-page .tag-list {
  display: none !important;
}
