/*
Theme Name: Prox Immo
Theme URI: https://prox-immo.fr
Author: Prox Immo Team
Author URI: https://prox-immo.fr
Description: Thème WordPress sur-mesure pour Prox Immo - Portail et magazine d'information immobilière en ligne.
Version: 1.0.0
Requires at least: 5.6
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: prox-immo-fr
*/

:root {
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --primary: #dd3333;
  --primary-hover: #b91c1c;
  --primary-soft: #fef2f2;
  --primary-border: #fecaca;
  
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  
  --card-bg: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  
  --container-max: 1200px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate-700);
  background-color: var(--slate-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--slate-900);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* TOP STRIP */
.site-top-strip {
  background: var(--slate-900);
  color: var(--slate-400);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 2px solid var(--primary);
}
.site-top-strip .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-top-strip a {
  color: var(--slate-300);
}
.site-top-strip a:hover {
  color: #ffffff;
}

/* HEADER */
.site-header {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo-img {
  height: 52px;
  width: auto;
}

/* NAVIGATION */
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-menu {
  display: flex;
  list-style: none;
  gap: 22px;
  align-items: center;
}
.nav-menu a {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-700);
  padding: 6px 0;
  position: relative;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-cat > a {
  color: var(--primary);
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}
.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after {
  width: 100%;
}

.header-action {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-contact {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(221, 51, 51, 0.25);
}
.btn-contact:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* MOBILE TOGGLE */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate-800);
  margin: 5px 0;
  transition: var(--transition);
}

/* HERO BANNER */
.hero-magazine {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1e293b 100%);
  color: #ffffff;
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}
.hero-magazine::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(221, 51, 51, 0.15) 0%, rgba(221, 51, 51, 0) 70%);
  pointer-events: none;
}
.hero-content {
  max-width: 820px;
  position: relative;
  z-index: 1;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(221, 51, 51, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(221, 51, 51, 0.4);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-title {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
  font-weight: 800;
}
.hero-description {
  font-size: 17px;
  line-height: 1.6;
  color: var(--slate-200);
  margin-bottom: 24px;
}

/* CATEGORIES QUICK PILLS */
.quick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.category-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}
.category-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* MAIN LAYOUT */
.main-wrapper {
  padding: 48px 0;
}
.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
}

/* SECTION TITLES */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--slate-200);
  padding-bottom: 12px;
  position: relative;
}
.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary);
}

/* POSTS GRID */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* CARD ITEM */
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card-thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-100);
}
.card-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .card-thumbnail-wrap img {
  transform: scale(1.05);
}

.category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-meta {
  font-size: 13px;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.card-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.35;
}
.card-title a {
  color: var(--slate-900);
}
.card-title a:hover {
  color: var(--primary);
}
.card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--slate-600);
  margin-bottom: 18px;
  flex-grow: 1;
}
.card-footer {
  padding-top: 14px;
  border-top: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.read-more-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.read-more-link:hover {
  color: var(--primary-hover);
  transform: translateX(4px);
}

/* SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.widget {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--slate-100);
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.author-box {
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
  border: 1px solid var(--primary-border);
}
.author-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.author-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}
.author-info h4 {
  font-size: 16px;
  margin-bottom: 2px;
}
.author-info span {
  font-size: 13px;
  color: var(--slate-500);
}
.author-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--slate-600);
}

.widget-categories ul {
  list-style: none;
}
.widget-categories li {
  border-bottom: 1px solid var(--slate-100);
}
.widget-categories li:last-child {
  border-bottom: none;
}
.widget-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
}
.widget-categories a:hover {
  color: var(--primary);
  padding-left: 4px;
}
.cat-count {
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* SINGLE ARTICLE & PAGES */
.article-header {
  margin-bottom: 32px;
}
.breadcrumbs {
  font-size: 13px;
  color: var(--slate-500);
  margin-bottom: 16px;
}
.breadcrumbs a {
  color: var(--slate-600);
}
.breadcrumbs a:hover {
  color: var(--primary);
}
.single-post-title {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.25;
  margin-bottom: 16px;
}
.single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--slate-500);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--slate-200);
}
.single-meta .cat-badge {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
}

.article-content {
  background: #ffffff;
  padding: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  font-size: 17px;
  line-height: 1.8;
  color: var(--slate-800);
}
.article-content h2 {
  font-size: 24px;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--slate-100);
}
.article-content h3 {
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 12px;
}
.article-content p {
  margin-bottom: 20px;
}
.article-content ul, .article-content ol {
  margin-bottom: 22px;
  padding-left: 24px;
}
.article-content li {
  margin-bottom: 8px;
}
.article-content strong {
  color: var(--slate-900);
}
.article-content img {
  border-radius: var(--radius-md);
  margin: 28px auto;
  box-shadow: var(--shadow-md);
}

/* PAGINATION */
.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-weight: 600;
  font-size: 15px;
}
.pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.pagination .page-numbers:hover:not(.current) {
  border-color: var(--primary);
  color: var(--primary);
}

/* FOOTER */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 60px 0 24px;
  margin-top: 60px;
  border-top: 4px solid var(--primary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  color: var(--slate-400);
  font-size: 15px;
  margin-top: 14px;
  max-width: 380px;
  line-height: 1.6;
}
.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--primary);
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 10px;
}
.footer-col a {
  color: var(--slate-300);
  font-size: 14px;
}
.footer-col a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--slate-400);
}
.footer-bottom a {
  color: var(--slate-300);
}
.footer-bottom a:hover {
  color: #ffffff;
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    border-top: 1px solid var(--slate-200);
  }
  .main-nav.active {
    display: flex;
  }
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 12px;
  }
  .nav-menu li {
    width: 100%;
  }
  .nav-menu a {
    display: block;
    padding: 8px 0;
    width: 100%;
    border-bottom: 1px solid var(--slate-100);
  }
  .header-action {
    width: 100%;
    padding-top: 10px;
  }
  .btn-contact {
    width: 100%;
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .article-content {
    padding: 22px;
  }
}
