:root {
  --gold: #F5C518;
  --gold-light: #FFD94A;
  --gold-dark: #C9A000;
  --red: #E63946;
  --red-dark: #B52D38;
  --danger-red: #ef4444;
  --danger-red-dark: #dc2626;
  --navy: #1A3A6B;
  --navy-light: #2453A3;
  --black: #0D0F14;
  --dark: #161B27;
  --mid: #2A2F3E;
  --gray: #6B7280;
  --silver: #9CA3AF;
  --off-white: #F7F8FA;
  --white: #FFFFFF;
  --green: #10B981;

  /* ── Tokens thème clair ── */
  --bg-page: #FFFFFF;
  --bg-header: var(--navy);
  --bg-card: #FFFFFF;
  --bg-footer: var(--navy);

  --border-card: #E5E7EB;
  --border-filter: #D1D5DB;

  --text-primary: var(--black);
  --text-secondary: #374151;
  --text-muted: var(--gray);
  --text-on-dark: #F9FAFB;
  --text-on-gold: var(--black);

  --shadow-card: 0 1px 6px rgba(13, 15, 20, 0.08), 0 4px 16px rgba(13, 15, 20, 0.06);
  --shadow-hover: 0 6px 28px rgba(13, 15, 20, 0.14), 0 2px 8px rgba(201, 160, 0, 0.14);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}
ul {
  list-style: none;
}

body {
  font-family: var(--roboto);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
.blog-header {
  text-align: center;
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 45% at 50% 0%,
      rgba(245, 197, 24, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.blog-header hr {
  border: none;
  border-top: 1px solid rgba(100, 80, 6, 0.547);
  margin: 0 auto 20px;
  max-width: 640px;
}

.blog-header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.urgence-icon {
  font-size: 1.1rem;
}

.urgence-text {
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--gold-dark);
  text-transform: uppercase;
}

.blog-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 10px;
  animation: fadeSlideDown 0.65s ease both;
}

.blog-subtitle {
  font-size: 0.82rem;
  color: var(--gray);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: fadeSlideDown 0.80s ease both;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── BLOG SECTION ── */
.blog {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 20px 72px;
}

/* ── FILTERS ── */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  animation: fadeIn 0.5s ease both 0.12s;
  max-width: 1000px;
  justify-content: center;
  margin: 0 auto 40px;
}

.filter-btn {
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border-filter);
  background: var(--white);
  color: var(--gray);
  font-size: 0.80rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition);
  white-space: nowrap;
  outline: none;
}

.filter-btn:hover {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
  background: rgba(245, 197, 24, 0.06);
}

.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-on-gold);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(245, 197, 24, 0.35);
}

/* ── BLOG GRID ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── BLOG CARD ── */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: cardIn 0.42s ease both;
}

.blog-card:hover {
  transform: translateY(-5px) scale(1.012);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--off-white);
}

.blog-card:hover img {
  transform: scale(1.04);
}

/* ── Tags ── */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 16px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.tag-new {
  background: rgba(201, 160, 0, 0.10);
  color: var(--gold-dark);
  border: 1px solid rgba(201, 160, 0, 0.30);
}

.tag-new svg {
  flex-shrink: 0;
}

/* Tags catégories lisibles sur fond blanc */
.tag-cat.urgence {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
}

.tag-cat.depannage {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
}

.tag-cat.securite {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #059669;
}

.tag-cat.tarifs {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}

.tag-cat.technique {
  background: #F9FAFB;
  border: 1px solid #D1D5DB;
  color: #374151;
}

.tag-cat.vitrerie {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  color: #0369A1;
}

.tag-cat.conseils {
  background: #FAF5FF;
  border: 1px solid #DDD6FE;
  color: #6D28D9;
}

.tag-cat.domotique {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #047857;
}

.tag-cat.coproprietes {
  background: #ECFDF5;
  border: 1px solid #e7e16e;
  color: #047857;
}

.tag-cat.comparatif {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  color: #b4b109;
}

/* ── Card text ── */
.blog-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  padding: 12px 16px 6px;
  letter-spacing: -0.01em;
}

.blog-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0 16px 18px;
  line-height: 1.55;
  flex-grow: 1;
}

/* Barre or au bas de la card au hover */
.blog-card::after {
  content: '';
  display: block;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.blog-card:hover::after {
  transform: scaleX(1);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card:nth-child(1) {
  animation-delay: 0.04s;
}

.blog-card:nth-child(2) {
  animation-delay: 0.08s;
}

.blog-card:nth-child(3) {
  animation-delay: 0.12s;
}

.blog-card:nth-child(4) {
  animation-delay: 0.16s;
}

.blog-card:nth-child(5) {
  animation-delay: 0.20s;
}

.blog-card:nth-child(6) {
  animation-delay: 0.24s;
}

.blog-card:nth-child(7) {
  animation-delay: 0.28s;
}

.blog-card:nth-child(8) {
  animation-delay: 0.32s;
}

.blog-card:nth-child(9) {
  animation-delay: 0.36s;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 52px;
}

.pagination.display-none {
  display: none;
}

.page-btn {
  cursor: pointer;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-filter);
  background: var(--white);
  color: var(--gray);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  outline: none;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
  background: rgba(245, 197, 24, 0.07);
}

.page-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(26, 58, 107, 0.25);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn.prev,
.page-btn.next {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 16px;
  color: var(--navy);
  border-color: var(--navy);
  background: transparent;
}

.page-btn.prev:hover:not(:disabled),
.page-btn.next:hover:not(:disabled) {
  background: var(--navy);
  color: var(--white);
}


@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .blog-header {
    padding: 36px 16px 32px;
  }

  .blog {
    padding: 28px 14px 52px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .blog-filters {
    gap: 6px;
  }

  .filter-btn {
    font-size: 0.74rem;
    padding: 6px 12px;
  }

  .page-btn.prev,
  .page-btn.next {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}