/*
Theme Name: Christian Molle Immobilier Blog
Theme URI: https://www.christianmolleimmobilier.fr
Author: Thème sur mesure
Description: Thème WordPress sur mesure pour le blog de Christian Molle Immobilier (agence immobilière, Belfort). Charte reprise du site : navy et or, police Manrope, boutons carrés. Page blog = header + menu (liens vers le site principal, sur une seule ligne, CTA épinglé) + liste des articles + footer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: christianmolle-blog
*/

/* =========================================================
   1. VARIABLES — charte Christian Molle Immobilier
   ========================================================= */
:root {
  --cm-navy:    #0e365d;   /* navy de marque */
  --cm-navy-dk: #0a2a49;   /* survol */
  --cm-gold:    #d09a04;   /* or (accent, CTA) */
  --cm-gold-dk: #b3850a;

  --cm-text:    #25282b;   /* texte courant */
  --cm-muted:   #6b7075;   /* texte secondaire */
  --cm-bg:      #ffffff;   /* fond */
  --cm-alt:     #f7f8fa;   /* fond alternatif */
  --cm-border:  #e5e7eb;   /* bordures */

  --cm-font: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --cm-max-width: 1220px;
  --cm-radius: 0;          /* boutons carrés, comme le site */
  --cm-shadow: 0 14px 34px rgba(14,54,93,.10);
}

/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--cm-font);
  color: var(--cm-text);
  background: var(--cm-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cm-navy); text-decoration: none; }
a:hover { color: var(--cm-gold-dk); }
h1, h2, h3, h4 {
  font-family: var(--cm-font);
  font-weight: 800;
  line-height: 1.18;
  color: var(--cm-navy);
  margin: 0 0 .5em;
}
.cm-container {
  width: 100%;
  max-width: var(--cm-max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden;
}

/* Bouton (style du site : carré) */
.cm-btn {
  display: inline-block;
  background: var(--cm-gold);
  color: #fff !important;
  padding: 12px 24px;
  border-radius: var(--cm-radius);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .85rem;
  transition: background .2s ease;
}
.cm-btn:hover { background: var(--cm-gold-dk); color: #fff; }

/* =========================================================
   3. HEADER + NAVIGATION (menu sur UNE seule ligne)
   ========================================================= */
.site-header {
  background: var(--cm-bg);
  border-bottom: 1px solid var(--cm-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  flex-wrap: nowrap;
}

/* Marque / logo */
.site-branding { flex: 0 0 auto; display: flex; align-items: center; }
.site-branding .custom-logo { max-height: 66px; width: auto; }
.brand-word { display: inline-flex; flex-direction: column; line-height: 1; white-space: nowrap; }
.brand-word .cm-name { font-weight: 800; font-size: 1.45rem; color: var(--cm-navy); letter-spacing: .02em; }
.brand-word .cm-sub { font-size: .66rem; font-weight: 600; letter-spacing: .42em; text-indent: .42em; color: var(--cm-gold); margin-top: 4px; text-transform: uppercase; }

/* Zone droite : menu + CTA */
.header-actions { display: flex; align-items: center; gap: 22px; flex: 1 1 auto; min-width: 0; justify-content: flex-end; }

/* Navigation : tous les éléments sur UNE SEULE LIGNE */
.main-navigation { min-width: 0; }
.main-navigation ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: nowrap;          /* ← une seule ligne, jamais de retour */
  align-items: center;
  gap: 24px;
  overflow-x: auto;           /* sécurité : le menu défile si trop long */
  scrollbar-width: none;
}
.main-navigation ul::-webkit-scrollbar { display: none; }
.main-navigation li { flex: 0 0 auto; white-space: nowrap; }
.main-navigation a {
  display: inline-block;
  padding: 6px 0;
  color: var(--cm-navy);
  font-weight: 600;
  font-size: .95rem;
  position: relative;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--cm-gold-dk); }
.main-navigation a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--cm-gold);
  transition: width .25s ease;
}
.main-navigation a:hover::after { width: 100%; }

/* CTA "Faire estimer son bien" épinglé à droite, toujours visible */
.header-cta { flex: 0 0 auto; }
.header-cta a {
  display: inline-block;
  background: var(--cm-gold);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--cm-radius);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: .8rem;
  white-space: nowrap;
  transition: background .2s ease;
}
.header-cta a:hover { background: var(--cm-gold-dk); color: #fff; }

/* =========================================================
   4. LISTE DES ARTICLES (page blog)
   ========================================================= */
.blog-main { padding: 54px 0 70px; }
.blog-header { margin-bottom: 38px; }
.blog-header .overline { color: var(--cm-gold-dk); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin-bottom: 10px; }
.blog-header h1 { font-size: 2.6rem; }
.blog-header .blog-sub { color: var(--cm-muted); margin-top: 8px; font-size: 1.05rem; }

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}
.post-card {
  background: var(--cm-bg);
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--cm-shadow); }
.post-card__thumb { display: block; aspect-ratio: 16/10; background: var(--cm-alt); overflow: hidden; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__thumb img { transform: scale(1.05); }
.post-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .78rem; color: var(--cm-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.post-card__meta .cat { color: var(--cm-gold-dk); font-weight: 700; }
.post-card__title { font-size: 1.3rem; margin: 0 0 12px; line-height: 1.25; }
.post-card__title a { color: var(--cm-navy); }
.post-card__title a:hover { color: var(--cm-gold-dk); }
.post-card__excerpt { color: var(--cm-muted); font-size: .96rem; margin: 0 0 18px; flex: 1; }
.post-card__more { align-self: flex-start; font-weight: 700; color: var(--cm-gold-dk); text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; }
.post-card__more::after { content: " →"; }

/* Pagination */
.cm-pagination { margin-top: 52px; text-align: center; }
.cm-pagination .page-numbers {
  display: inline-block; padding: 9px 15px; margin: 0 4px;
  border: 1px solid var(--cm-border); border-radius: var(--cm-radius); color: var(--cm-navy); background: #fff;
}
.cm-pagination .page-numbers.current,
.cm-pagination .page-numbers:hover {
  background: var(--cm-navy); color: #fff; border-color: var(--cm-navy);
}
.no-posts { padding: 60px 0; text-align: center; color: var(--cm-muted); }

/* =========================================================
   5. ARTICLE SEUL
   ========================================================= */
.single-article { padding: 54px 0 70px; max-width: 760px; }
.single-article__header h1 { font-size: 2.7rem; }
.single-article__meta { color: var(--cm-muted); font-size: .9rem; margin-bottom: 24px; }
.single-article__thumb { margin: 0 0 32px; border-radius: var(--cm-radius); overflow: hidden; }
.single-article__content { font-size: 1.08rem; }
.single-article__content p { margin: 0 0 1.3em; }
.single-article__content img { margin: 1.5em 0; }
.back-to-blog { display: inline-block; margin-top: 40px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; }
.back-to-blog::before { content: "← "; }

/* =========================================================
   6. FOOTER
   ========================================================= */
.site-footer {
  background: var(--cm-navy);
  color: #b8c6d6;
  padding: 50px 0 28px;
  margin-top: 54px;
}
.site-footer a { color: #dbe4ee; }
.site-footer a:hover { color: var(--cm-gold); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px;
}
.site-footer__brand { display: inline-flex; flex-direction: column; line-height: 1; }
.site-footer__brand .cm-name { font-weight: 800; font-size: 1.3rem; color: #fff; letter-spacing: .02em; }
.site-footer__brand .cm-sub { font-size: .62rem; font-weight: 600; letter-spacing: .4em; text-indent: .4em; color: var(--cm-gold); margin-top: 4px; text-transform: uppercase; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 20px; max-width: 620px; font-size: .92rem; }
.footer-contact { font-size: .92rem; line-height: 1.6; }
.footer-contact strong { color: #fff; display: block; margin-bottom: 2px; }
.site-footer__copy {
  width: 100%; text-align: center; opacity: .75; font-size: .84rem;
  margin-top: 26px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px;
}

/* =========================================================
   7. RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .site-header__inner { min-height: 64px; gap: 14px; }
  .brand-word .cm-name { font-size: 1.15rem; }
  .blog-header h1 { font-size: 1.95rem; }
  .header-actions { gap: 14px; }
  /* Le menu reste sur une seule ligne et défile horizontalement */
  .main-navigation ul { gap: 18px; }
}
