/*
Theme Name: FW Résine Blog
Theme URI: https://www.fwresine.fr
Author: Thème sur mesure
Description: Thème WordPress sur mesure pour le blog de FW.Résine (revêtements de sol en résine). Charte reprise du site : accent or/taupe, serif Merriweather + Montserrat, boutons à angles droits, barre téléphone. Page blog = header + menu (liens vers le site principal, sur une seule ligne) + 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: fwresine-blog
*/

/* =========================================================
   1. VARIABLES — charte FW.Résine
   ========================================================= */
:root {
  --fw-gold:    #b4926b;   /* accent or/taupe (boutons, liens forts) */
  --fw-gold-dk: #9c7d59;   /* survol */
  --fw-dark:    #111111;   /* barre téléphone / footer */
  --fw-green:   #38413a;   /* vert foncé secondaire */

  --fw-text:    #343434;   /* texte courant */
  --fw-muted:   #6b6b6b;   /* texte secondaire */
  --fw-bg:      #ffffff;   /* fond */
  --fw-bg-alt:  #f7f5f2;   /* fond alternatif (cartes) */
  --fw-border:  #ededed;   /* bordures */

  --fw-font-heading: "Merriweather", Georgia, "Times New Roman", serif;
  --fw-font-body:    "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fw-max-width: 1180px;
  --fw-radius: 0;          /* boutons à angles droits, comme le site */
  --fw-shadow: 0 10px 30px rgba(17,17,17,.08);
}

/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--fw-font-body);
  color: var(--fw-text);
  background: var(--fw-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fw-gold-dk); text-decoration: none; }
a:hover { color: var(--fw-gold); }
h1, h2, h3, h4 {
  font-family: var(--fw-font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--fw-text);
  margin: 0 0 .5em;
}
.fw-container {
  width: 100%;
  max-width: var(--fw-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é, or/taupe) */
.fw-btn {
  display: inline-block;
  background: var(--fw-gold);
  color: #fff !important;
  padding: 12px 22px;
  border-radius: var(--fw-radius);
  font-weight: 600;
  letter-spacing: .01em;
  transition: background .2s ease;
}
.fw-btn:hover { background: var(--fw-gold-dk); color: #fff; }

/* =========================================================
   3. BARRE TÉLÉPHONE (haut de page, comme le site)
   ========================================================= */
.topbar {
  background: var(--fw-dark);
  color: #fff;
  text-align: center;
  font-size: .98rem;
  letter-spacing: .04em;
}
.topbar a { color: #fff; font-weight: 600; display: inline-block; padding: 9px 0; }
.topbar a:hover { color: var(--fw-gold); }
.topbar .tel-icon { color: var(--fw-gold); margin-right: 8px; }

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

/* Marque / logo */
.site-branding { flex: 0 0 auto; display: flex; align-items: center; }
.site-branding .custom-logo { max-height: 62px; width: auto; }
/* Repli monogramme "FW / RÉSINE" (serif) si aucun logo n'est téléversé */
.brand-mono { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; color: var(--fw-text); }
.brand-mono .mono-fw { font-family: var(--fw-font-heading); font-weight: 700; font-size: 2rem; letter-spacing: .04em; }
.brand-mono .mono-resine { font-family: var(--fw-font-body); font-weight: 500; font-size: .68rem; letter-spacing: .5em; text-indent: .5em; margin-top: 3px; color: var(--fw-muted); }

/* Navigation : tous les éléments sur UNE SEULE LIGNE */
.header-actions { display: flex; align-items: center; gap: 22px; flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
.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: 26px;
  overflow-x: auto;           /* sécurité : défilement si menu très long */
  scrollbar-width: none;
}
.main-navigation ul::-webkit-scrollbar { display: none; }
.main-navigation li { flex: 0 0 auto; white-space: nowrap; position: relative; }
.main-navigation a {
  display: inline-block;
  padding: 6px 0;
  color: var(--fw-text);
  font-weight: 600;
  font-size: .96rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  position: relative;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--fw-gold); }
.main-navigation a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--fw-gold);
  transition: width .25s ease;
}
.main-navigation a:hover::after { width: 100%; }

/* Sous-menu (ex. Galeries) */
.main-navigation ul ul {
  display: none;
  position: absolute; top: 100%; left: 0;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--fw-border);
  box-shadow: var(--fw-shadow);
  padding: 8px 0; min-width: 240px; overflow: visible;
}
.main-navigation li:hover > ul { display: flex; }
.main-navigation ul ul li { width: 100%; }
.main-navigation ul ul a { padding: 9px 18px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.main-navigation ul ul a::after { display: none; }

/* CTA "Rappel gratuit" en bouton or */
.header-cta { flex: 0 0 auto; }
.header-cta a { background: var(--fw-gold); color: #fff; padding: 12px 22px; font-weight: 600; letter-spacing: .02em; transition: background .2s ease; white-space: nowrap; }
.header-cta a:hover { background: var(--fw-gold-dk); color: #fff; }

/* =========================================================
   5. LISTE DES ARTICLES (page blog)
   ========================================================= */
.blog-main { padding: 54px 0 70px; }
.blog-header { margin-bottom: 38px; }
.blog-header h1 { font-size: 2.5rem; }
.blog-header .blog-sub { color: var(--fw-muted); margin-top: 6px; font-size: 1.05rem; }
.blog-header h1::after {
  content: "";
  display: block;
  width: 72px; height: 4px;
  background: var(--fw-gold);
  margin-top: 16px;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}
.post-card {
  background: var(--fw-bg);
  border: 1px solid var(--fw-border);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--fw-shadow); }
.post-card__thumb { display: block; aspect-ratio: 16/10; background: var(--fw-bg-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(--fw-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.post-card__meta .cat { color: var(--fw-gold-dk); font-weight: 600; }
.post-card__title { font-size: 1.35rem; margin: 0 0 12px; line-height: 1.3; }
.post-card__title a { color: var(--fw-text); }
.post-card__title a:hover { color: var(--fw-gold); }
.post-card__excerpt { color: var(--fw-muted); font-size: .96rem; margin: 0 0 18px; flex: 1; }
.post-card__more { align-self: flex-start; font-weight: 700; color: var(--fw-gold-dk); text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.post-card__more::after { content: " →"; }

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

/* =========================================================
   6. ARTICLE SEUL
   ========================================================= */
.single-article { padding: 54px 0 70px; max-width: 760px; }
.single-article__header h1 { font-size: 2.6rem; }
.single-article__meta { color: var(--fw-muted); font-size: .9rem; margin-bottom: 24px; }
.single-article__thumb { margin: 0 0 32px; 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: .85rem; }
.back-to-blog::before { content: "← "; }

/* =========================================================
   7. FOOTER
   ========================================================= */
.site-footer {
  background: var(--fw-dark);
  color: #b9b9b9;
  padding: 50px 0 28px;
  margin-top: 54px;
}
.site-footer a { color: #d8d8d8; }
.site-footer a:hover { color: var(--fw-gold); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.site-footer__brand { font-family: var(--fw-font-heading); font-weight: 700; font-size: 1.4rem; color: #fff; letter-spacing: .04em; }
.site-footer__phone { color: #fff; font-weight: 600; }
.site-footer__phone .tel-icon { color: var(--fw-gold); margin-right: 6px; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; text-transform: uppercase; font-size: .82rem; letter-spacing: .04em; }
.site-footer__copy {
  width: 100%; text-align: center; opacity: .75; font-size: .84rem;
  margin-top: 26px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px;
}

/* =========================================================
   8. RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .site-header__inner { min-height: 66px; gap: 14px; }
  .brand-mono .mono-fw { font-size: 1.6rem; }
  .blog-header h1 { font-size: 1.9rem; }
  .header-actions { gap: 14px; }
  /* Le menu reste sur une seule ligne et défile horizontalement */
  .main-navigation ul { gap: 18px; }
}
