/*
Theme Name: DoctoCompta Blog
Theme URI: https://doctocompta.fr
Author: Thème sur mesure
Description: Thème WordPress sur mesure pour le blog de DoctoCompta (expert-comptable des professions de santé). Charte reprise du site : header dégradé navy/teal, accents cyan et teal, polices Clash Display + Montserrat. 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: doctocompta-blog
*/

/* =========================================================
   1. VARIABLES — charte DoctoCompta
   ========================================================= */
:root {
  --dc-ink:    #1b2631;   /* navy (texte, header, footer) */
  --dc-teal:   #249e8a;   /* accent vert/teal */
  --dc-cyan:   #00a4d1;   /* accent cyan */
  --dc-cyan-dk:#0089b0;
  --dc-blue:   #004966;   /* bleu profond */
  --dc-mint:   #bff5db;   /* bandeau promo (vert menthe) */

  --dc-text:   #1b2631;   /* texte courant */
  --dc-muted:  #5a6a76;   /* texte secondaire */
  --dc-bg:     #ffffff;   /* fond */
  --dc-alt:    #f5f8fa;   /* fond alternatif */
  --dc-border: #e4ebf0;   /* bordures */

  --dc-header-grad: linear-gradient(125deg, #172a37 0%, #0d4f62 55%, #10707f 100%);

  --dc-font-heading: "Clash Display", "Montserrat", system-ui, sans-serif;
  --dc-font-body:    "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --dc-max-width: 1180px;
  --dc-radius: 12px;
  --dc-radius-pill: 9999px;   /* boutons pilule, comme le site */
  --dc-shadow: 0 14px 36px rgba(27,38,49,.10);
}

/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--dc-font-body);
  color: var(--dc-text);
  background: var(--dc-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dc-cyan-dk); text-decoration: none; }
a:hover { color: var(--dc-cyan); }
h1, h2, h3, h4 {
  font-family: var(--dc-font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--dc-ink);
  margin: 0 0 .5em;
}
.dc-container {
  width: 100%;
  max-width: var(--dc-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 pilule (style du site) */
.dc-btn {
  display: inline-block;
  background: var(--dc-cyan);
  color: #fff !important;
  padding: 11px 24px;
  border-radius: var(--dc-radius-pill);
  font-weight: 600;
  transition: background .2s ease, transform .2s ease;
}
.dc-btn:hover { background: var(--dc-cyan-dk); color: #fff; transform: translateY(-1px); }

/* =========================================================
   3. BANDEAU PROMO (haut de page, comme le site)
   ========================================================= */
.promobar {
  background: var(--dc-mint);
  color: var(--dc-ink);
  text-align: center;
  font-size: .95rem;
  font-weight: 500;
  padding: 9px 16px;
}
.promobar strong { font-weight: 700; }

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

/* Marque / logo */
.site-branding { flex: 0 0 auto; display: flex; align-items: center; }
.site-branding .custom-logo { max-height: 40px; width: auto; }
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo-img { height: 38px; width: auto; display: block; }
.brand-word { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--dc-cyan), var(--dc-teal), var(--dc-cyan));
  display: inline-block; flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(0,164,209,.4);
}
.brand-text { font-family: var(--dc-font-heading); font-weight: 500; font-size: 1.5rem; color: #fff; letter-spacing: -.01em; }
.brand-text b { font-weight: 700; }

/* Zone droite : menu + CTA */
.header-actions { display: flex; align-items: center; gap: 26px; 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: 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: rgba(255,255,255,.88);
  font-weight: 500;
  font-size: .96rem;
  position: relative;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: #fff; }
.main-navigation a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--dc-cyan);
  transition: width .25s ease;
}
.main-navigation a:hover::after { width: 100%; }

/* Entrée CTA "Prendre rendez-vous" : pilule blanche (comme le site) */
.main-navigation .menu-item-cta a {
  background: #fff;
  color: var(--dc-blue);
  padding: 10px 20px;
  border-radius: var(--dc-radius-pill);
  font-weight: 600;
}
.main-navigation .menu-item-cta a:hover { background: var(--dc-mint); color: var(--dc-blue); }
.main-navigation .menu-item-cta a::after { display: none; }

/* =========================================================
   5. LISTE DES ARTICLES (page blog)
   ========================================================= */
.blog-main { padding: 54px 0 70px; }
.blog-header { margin-bottom: 38px; }
.blog-header .overline { color: var(--dc-teal); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; margin-bottom: 10px; }
.blog-header h1 { font-size: 2.6rem; }
.blog-header .blog-sub { color: var(--dc-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(--dc-bg);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-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(--dc-shadow); }
.post-card__thumb { display: block; aspect-ratio: 16/10; background: var(--dc-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(--dc-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.post-card__meta .cat { color: var(--dc-teal); font-weight: 600; }
.post-card__title { font-size: 1.3rem; margin: 0 0 12px; line-height: 1.25; }
.post-card__title a { color: var(--dc-ink); }
.post-card__title a:hover { color: var(--dc-cyan-dk); }
.post-card__excerpt { color: var(--dc-muted); font-size: .96rem; margin: 0 0 18px; flex: 1; }
.post-card__more { align-self: flex-start; font-weight: 600; color: var(--dc-cyan-dk); }
.post-card__more::after { content: " →"; }

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

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

/* =========================================================
   7. FOOTER
   ========================================================= */
.site-footer {
  background: var(--dc-ink);
  color: #9fb0bc;
  padding: 50px 0 28px;
  margin-top: 54px;
}
.site-footer a { color: #d5e0e7; }
.site-footer a:hover { color: var(--dc-cyan); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.site-footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.site-footer__brand .footer-logo-img { height: 30px; width: auto; display: block; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer__copy {
  width: 100%; text-align: center; opacity: .7; 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: 62px; gap: 14px; }
  .brand-text { font-size: 1.25rem; }
  .blog-header h1 { font-size: 1.95rem; }
  .header-actions { gap: 16px; }
  /* Le menu reste sur une seule ligne et défile horizontalement */
  .main-navigation ul { gap: 18px; }
}
