/*
Theme Name: The Press
Theme URI: https://the-press.net
Author: The Press
Author URI: https://the-press.net
Description: Magazine en ligne francophone independant — actualite generale, tech, culture, economie, lifestyle, sport.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-press
*/

/* ==========================================
   BASE
   ========================================== */

*, *::before, *::after { box-sizing: border-box; }

img { display: block; max-width: 100%; }

/* ==========================================
   HEADER
   ========================================== */

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wp-block-site-title a {
  font-family: var(--wp--preset--font-family--archivo);
  font-weight: 800;
  font-size: 1.375rem;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.wp-block-navigation a {
  color: rgba(255,255,255,0.8) !important;
  font-family: var(--wp--preset--font-family--archivo);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  position: relative;
  transition: color 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wp-block-navigation a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wp-block-navigation a:hover { color: #fff !important; }
.wp-block-navigation a:hover::after { width: 100%; }

/* ==========================================
   BREAKING NEWS BAND
   ========================================== */

.breaking-band {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
}

.breaking-label {
  flex-shrink: 0;
  background: #fff;
  color: var(--wp--preset--color--accent);
  font-family: var(--wp--preset--font-family--archivo);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

.breaking-posts .wp-block-post-title {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.breaking-posts .wp-block-post-title a { color: #fff !important; text-decoration: none; }
.breaking-posts .wp-block-post-title a:hover { text-decoration: underline; }

/* ==========================================
   SECTION HEADERS
   ========================================== */

.section-heading {
  font-family: var(--wp--preset--font-family--archivo);
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--wp--preset--color--primary);
  display: block;
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem !important;
  position: relative;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 3px;
  background: var(--wp--preset--color--accent);
}

/* ==========================================
   CATEGORY BADGE
   ========================================== */

.category-badge a,
.wp-block-post-terms a {
  display: inline-block;
  background: var(--wp--preset--color--accent);
  color: #fff !important;
  font-family: var(--wp--preset--font-family--archivo);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.18s ease;
}

.category-badge a:hover,
.wp-block-post-terms a:hover { background: #0052cc; }

/* ==========================================
   HERO ARTICLE CARD
   ========================================== */

.hero-card {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(26,31,54,0.1);
  transition: box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-card:hover {
  box-shadow: 0 16px 48px rgba(26,31,54,0.18);
}

.hero-card .wp-block-post-featured-image {
  overflow: hidden;
}

.hero-card .wp-block-post-featured-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-card:hover .wp-block-post-featured-image img {
  transform: scale(1.04);
}

.hero-card-body {
  background: var(--wp--preset--color--primary);
  padding: 1.5rem;
}

.hero-card-body .wp-block-post-title {
  font-family: var(--wp--preset--font-family--archivo);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  color: #fff;
  margin: 0.5rem 0 0.75rem;
}

.hero-card-body .wp-block-post-title a { color: #fff !important; text-decoration: none; }
.hero-card-body .wp-block-post-title a:hover { color: rgba(255,255,255,0.85) !important; }

.hero-card-body .wp-block-post-excerpt__excerpt {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.hero-card-body .wp-block-post-date {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
}

/* ==========================================
   ARTICLE CARDS (GRID)
   ========================================== */

.article-card {
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #E8ECF0;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,31,54,0.13);
}

.article-card .wp-block-post-featured-image {
  overflow: hidden;
}

.article-card .wp-block-post-featured-image img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-card:hover .wp-block-post-featured-image img {
  transform: scale(1.06);
}

.article-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card .wp-block-post-terms {
  margin-bottom: 0.4rem;
}

.article-card .wp-block-post-title {
  font-family: var(--wp--preset--font-family--archivo);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: var(--wp--preset--color--primary);
}

.article-card .wp-block-post-title a {
  color: var(--wp--preset--color--primary) !important;
  text-decoration: none;
}

.article-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent) !important; }

.article-card .wp-block-post-excerpt__excerpt {
  font-size: 0.875rem;
  color: var(--wp--preset--color--muted);
  line-height: 1.55;
  flex-grow: 1;
}

.article-card .wp-block-post-date {
  font-size: 0.75rem;
  color: var(--wp--preset--color--muted);
  margin-top: 0.75rem;
}

/* ==========================================
   EQUAL CARDS GRID
   ========================================== */

.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ==========================================
   NEWSLETTER BAND
   ========================================== */

.newsletter-band .wp-block-heading {
  color: #fff;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
}

.newsletter-band p { color: rgba(255,255,255,0.7); }

.newsletter-band .wp-block-button__link {
  background: var(--wp--preset--color--accent) !important;
  color: #fff !important;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.newsletter-band .wp-block-button__link:hover {
  background: #0052cc !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,102,255,0.35);
}

/* ==========================================
   SINGLE ARTICLE
   ========================================== */

.entry-content p { line-height: 1.75; margin-bottom: 1.5rem; }

.entry-content h2, .entry-content h3 {
  font-family: var(--wp--preset--font-family--archivo);
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--wp--preset--color--muted);
  font-size: 0.875rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E8ECF0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.post-header-meta .wp-block-post-date { font-size: 0.875rem; }

.single-featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 2rem;
}

/* ==========================================
   READING PROGRESS BAR
   ========================================== */

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--wp--preset--color--accent);
  width: 0%;
  z-index: 9999;
  transition: width 0.08s linear;
}

/* ==========================================
   FOOTER
   ========================================== */

.wp-site-blocks > footer { margin-block-start: 0; }

.footer-menu .wp-block-navigation__container { flex-direction: column; gap: 0.4rem; }
.footer-menu .wp-block-navigation-item__content { color: rgba(255,255,255,0.6) !important; font-size: 0.875rem; }
.footer-menu .wp-block-navigation-item__content:hover { color: #fff !important; }

/* ==========================================
   STICKY HEADER
   ========================================== */

header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              backdrop-filter 0.3s ease;
}

header.wp-block-template-part.is-scrolled {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger-children.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
.stagger-children.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.13s; }
.stagger-children.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.21s; }
.stagger-children.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.29s; }
.stagger-children.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.37s; }
.stagger-children.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  .hero-card .wp-block-post-featured-image img { height: 240px; }
  .wp-block-columns.equal-cards { flex-direction: column; }
  .wp-block-columns.equal-cards .wp-block-column { flex-basis: 100% !important; }
}
