/*
Theme Name: PK Israel News
Theme URI: https://pkisrael.fr
Author: Loïc Makila
Author URI: https://pkisrael.fr
Description: Thème WordPress custom pour un site d'actualités Israel et Chrétiens. Mobile-first, SEO optimisé.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pkisrael
Tags: blog, news, one-column, custom-header, custom-menu, editor-style, featured-images, footer-widgets, block-patterns, block-styles, wide-blocks

PK Israel - Site d'actualités Israel & Chrétiens
*/

/* =========================================
   CSS CUSTOM PROPERTIES
   ========================================= */
:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2440;
  --accent: #c9a84c;
  --accent-dark: #a8893a;
  --bg: #f8f7f4;
  --bg-alt: #eceae4;
  --surface: #ffffff;
  --text: #2d2d2d;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e0ddd6;
  --error: #c0392b;
  --success: #27ae60;
  --font-heading: 'Noto Serif', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  font-weight: 700;
  color: var(--primary-dark);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =========================================
   LAYOUT
   ========================================= */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  background: var(--surface);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1rem;
}

.site-branding { display: flex; align-items: center; gap: 0.75rem; }

.site-title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 900;
  color: var(--primary-dark);
  line-height: 1.1;
}
.site-title a { color: inherit; }
.site-title a:hover { color: var(--accent); }

.site-description {
  font-size: 0.75rem;
  color: var(--text-light);
  font-family: var(--font-body);
  display: none;
}

/* Category badge in header */
.header-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--bg-alt); }
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Navigation */
.main-navigation {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 3px solid var(--primary);
  box-shadow: var(--shadow-lg);
}
.main-navigation.toggled { display: block; }

.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation li {
  border-bottom: 1px solid var(--border);
}

.main-navigation a {
  display: block;
  padding: 1rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  min-height: 48px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  background: var(--primary);
  color: white;
}

.main-navigation .sub-menu {
  display: none;
}

/* Desktop navigation */
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  
  .main-navigation {
    display: block;
    position: static;
    border-bottom: none;
    box-shadow: none;
    background: transparent;
  }
  
  .main-navigation ul {
    display: flex;
    gap: 0;
  }
  
  .main-navigation li { border-bottom: none; position: relative; }
  
  .main-navigation a {
    padding: 0.5rem 0.9rem;
    font-size: 0.88rem;
  }
  
  .main-navigation a:hover,
  .main-navigation .current-menu-item a {
    background: transparent;
    color: var(--accent);
  }
  
  .main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 200;
  }
  
  .main-navigation li:hover > .sub-menu { display: block; }
  .main-navigation .sub-menu a { padding: 0.7rem 1rem; }
  .main-navigation .sub-menu a:hover { background: var(--bg-alt); color: var(--primary); }
}

/* =========================================
   SEARCH BAR
   ========================================= */
.header-search {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  padding: 1rem;
  border-bottom: 3px solid var(--primary);
  box-shadow: var(--shadow);
}
.header-search.toggled { display: block; }

.search-form {
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 0.5rem;
}

.search-form .search-field {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color var(--transition);
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--primary);
}

.search-form .search-submit {
  padding: 0.7rem 1.2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition);
}

.search-form .search-submit:hover { background: var(--primary-dark); }

@media (min-width: 768px) {
  .header-search {
    position: static;
    display: none;
    border-bottom: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
    flex: 0 0 auto;
  }
  .header-search.toggled { display: none; }
  .search-toggle { display: flex !important; }
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  background: var(--primary-dark);
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 2fr 1fr; }
}

/* =========================================
   ARTICLE CARDS
   ========================================= */
.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.article-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-card-body { padding: 1.25rem; }

.article-card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

.article-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-card-title a { color: var(--primary-dark); }
.article-card-title a:hover { color: var(--accent); }

.article-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.article-card-meta time { display: flex; align-items: center; gap: 0.3rem; }

/* Featured card (hero) */
.article-card.featured {
  position: relative;
  min-height: 280px;
}

.article-card.featured img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card.featured .article-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: white;
  padding: 2rem 1.25rem 1.25rem;
}

.article-card.featured .article-card-category {
  background: var(--accent);
  color: var(--primary-dark);
}

.article-card.featured .article-card-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: white;
}

.article-card.featured .article-card-title a { color: white; }
.article-card.featured .article-card-title a:hover { color: var(--accent); }

.article-card.featured .article-card-excerpt { color: rgba(255,255,255,0.85); }
.article-card.featured .article-card-meta { color: rgba(255,255,255,0.7); }

/* Sidebar article in hero */
.hero-sidebar .article-card {
  display: flex;
  flex-direction: row;
  min-height: auto;
}

.hero-sidebar .article-card img {
  width: 120px;
  aspect-ratio: 1;
  flex-shrink: 0;
}

.hero-sidebar .article-card-body { padding: 0.9rem; }
.hero-sidebar .article-card-title { font-size: 0.95rem; }
.hero-sidebar .article-card.excerpt { display: none; }

/* =========================================
   CONTENT GRID
   ========================================= */
.content-section { padding: 2rem 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary);
}

.section-title {
  font-size: 1.3rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.3rem;
  background: var(--accent);
  border-radius: 2px;
}

.section-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.section-link:hover { color: var(--accent); }
.section-link::after { content: '→'; }

.articles-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* =========================================
   SIDEBAR
   ========================================= */
.content-with-sidebar .sidebar {
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
  }
  
  .sidebar { position: sticky; top: 90px; }
}

.sidebar-widget {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.sidebar-widget h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  color: var(--primary-dark);
}

.sidebar-widget ul { list-style: none; }
.sidebar-widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget li a { color: var(--text); }
.sidebar-widget li a:hover { color: var(--accent); }

/* =========================================
   SINGLE ARTICLE
   ========================================= */
.single-article { padding: 2rem 0; }

.single-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.single-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: white;
  background: var(--primary);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.single-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.single-meta .author { font-weight: 600; color: var(--text); }

.single-featured-image {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.single-featured-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content p { margin-bottom: 1.4rem; }
.article-content h2, .article-content h3, .article-content h4 {
  margin: 2rem 0 1rem;
  color: var(--primary-dark);
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-family: var(--font-heading);
}

.article-content ul, .article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content li { margin-bottom: 0.5rem; }

.article-content img {
  border-radius: var(--radius);
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.article-content figure { margin: 2rem 0; }
.article-content figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Tags */
.article-tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-tags a {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin: 0.25rem;
  color: var(--text);
  transition: all var(--transition);
}

.article-tags a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Author box */
.author-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.3rem;
}

.author-box-bio { font-size: 0.9rem; color: var(--text-light); }

/* Related posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px solid var(--primary);
}

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.pagination a {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.pagination a:hover {
  background: var(--primary);
  color: white;
}

.pagination .current {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.pagination .prev, .pagination .next {
  padding: 0 1rem;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  margin-top: 3rem;
}

.footer-top {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 640px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-widget h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.footer-widget ul { list-style: none; }
.footer-widget li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-widget a { color: rgba(255,255,255,0.7); }
.footer-widget a:hover { color: var(--accent); }

.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--accent); }

/* =========================================
   SEARCH PAGE
   ========================================= */
.search-header {
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--primary);
}

.search-header h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.search-header p { color: var(--text-light); }

/* =========================================
   404 PAGE
   ========================================= */
.error-404 {
  text-align: center;
  padding: 4rem 1rem;
}

.error-404 .error-code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-404 h1 { margin-bottom: 1rem; }
.error-404 p { color: var(--text-light); margin-bottom: 2rem; }

.error-404 .search-form {
  max-width: 500px;
  margin: 0 auto;
}

/* =========================================
   BLOCKS WORDPRESS
   ========================================= */
.wp-block-image { margin: 2rem 0; }
.wp-block-quote { border-left: 4px solid var(--accent); padding: 1rem 1.5rem; margin: 2rem 0; background: var(--bg-alt); }
.wp-block-pullquote { border-top: 3px solid var(--accent); border-bottom: 3px solid var(--accent); padding: 1.5rem; text-align: center; font-size: 1.2rem; font-style: italic; margin: 2rem 0; }

/* =========================================
   CATEGORY PAGE HEADER
   ========================================= */
.archive-header {
  background: var(--primary);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.archive-header h1 { color: white; margin-bottom: 0.5rem; }
.archive-header p { color: rgba(255,255,255,0.7); }

/* =========================================
   UTILITIES
   ========================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* =========================================
   WORDPRESS SPECIFIC
   ========================================= */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto; }

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 0.5rem; }

/* Gallery */
.gallery { display: grid; grid-grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin: 1.5rem 0; }
.gallery-item { text-align: center; }
.gallery-item img { border-radius: var(--radius); }

/* Comments */
.comments-area { margin-top: 3rem; }
.comments-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; }
.comment { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.comment-body { font-size: 0.95rem; }
.comment-author { font-weight: 700; color: var(--primary-dark); }
.comment-metadata { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.comment-content { margin-top: 0.5rem; }

/* =========================================
   LOADING ANIMATION
   ========================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-card {
  animation: fadeIn 0.4s ease forwards;
}
