/*
Theme Name: Oscar AI Blog
Theme URI: https://oscar-seo.ai
Author: Oscar AI
Description: Thème WordPress sur mesure pour le blog de communication interne d'Oscar AI. Charte reprise du site oscar-seo.ai : bleu de marque, police Geist + Inter, accents verts. 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: oscar-ai-blog
*/

/* =========================================================
   1. VARIABLES — charte Oscar AI
   ========================================================= */
:root {
  --os-blue:     #4494fc;   /* bleu de marque Oscar AI */
  --os-blue-dk:  #2f7de0;   /* survol */
  --os-green:    #06b67a;   /* accent vert (succès / points forts) */
  --os-ink:      #0f1720;   /* fond footer / éléments sombres */

  --os-text:     #111827;   /* texte courant */
  --os-muted:    #6b7280;   /* texte secondaire */
  --os-bg:       #ffffff;   /* fond */
  --os-bg-alt:   #fbfbfb;   /* fond alternatif */
  --os-border:   #eeeff1;   /* bordures */

  --os-font-heading: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --os-font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --os-max-width: 1160px;
  --os-radius: 8px;         /* coins arrondis du site */
  --os-shadow: 0 10px 30px rgba(17,24,39,.08);
}

/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--os-font-body);
  color: var(--os-text);
  background: var(--os-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--os-blue-dk); text-decoration: none; }
a:hover { color: var(--os-blue); }
h1, h2, h3, h4 {
  font-family: var(--os-font-heading);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--os-text);
  margin: 0 0 .5em;
}
.os-container {
  width: 100%;
  max-width: var(--os-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;
}

/* =========================================================
   3. HEADER + NAVIGATION (menu sur UNE seule ligne)
   ========================================================= */
.site-header {
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--os-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 68px;
  flex-wrap: nowrap;
}

/* Marque / logo */
.site-branding { flex: 0 0 auto; display: flex; align-items: center; }
.site-branding .custom-logo { max-height: 34px; width: auto; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;          /* icône arrondie, comme sur le site */
  display: block;
  box-shadow: 0 2px 6px rgba(68,148,252,.25);
}
.site-title-text {
  font-family: var(--os-font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--os-text);
}
.brand-dot { color: var(--os-blue); }

/* Navigation : tous les éléments sur UNE SEULE LIGNE */
.main-navigation { flex: 1 1 auto; 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;
  justify-content: flex-end;
  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; }
.main-navigation a {
  display: inline-block;
  padding: 6px 0;
  color: var(--os-text);
  font-weight: 500;
  font-size: .96rem;
}
.main-navigation a:hover { color: var(--os-blue); }
.main-navigation .current-menu-item > a { color: var(--os-blue); }

/* Entrée CTA "Commencer maintenant" : mise en bouton bleu */
.main-navigation .menu-item-cta a {
  background: var(--os-blue);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--os-radius);
  font-weight: 600;
  transition: background .2s ease;
}
.main-navigation .menu-item-cta a:hover { background: var(--os-blue-dk); color: #fff; }

/* =========================================================
   4. LISTE DES ARTICLES (page blog)
   ========================================================= */
.blog-main { padding: 52px 0 68px; }
.blog-header { margin-bottom: 36px; }
.blog-header h1 { font-size: 2.4rem; }
.blog-header .blog-sub { color: var(--os-muted); font-size: 1.05rem; margin-top: 6px; }
.blog-header h1::after {
  content: "";
  display: block;
  width: 68px; height: 4px;
  background: var(--os-blue);
  border-radius: 2px;
  margin-top: 16px;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}
.post-card {
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--os-shadow); border-color: #dfe3e8; }
.post-card__thumb { display: block; aspect-ratio: 16/9; background: var(--os-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: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .78rem; color: var(--os-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.post-card__meta .cat { color: var(--os-green); font-weight: 600; }
.post-card__title { font-size: 1.25rem; margin: 0 0 10px; line-height: 1.25; }
.post-card__title a { color: var(--os-text); }
.post-card__title a:hover { color: var(--os-blue); }
.post-card__excerpt { color: var(--os-muted); font-size: .96rem; margin: 0 0 18px; flex: 1; }
.post-card__more { align-self: flex-start; font-weight: 600; color: var(--os-blue); }
.post-card__more::after { content: " →"; }

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

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

/* =========================================================
   6. FOOTER
   ========================================================= */
.site-footer {
  background: var(--os-ink);
  color: #9aa4b2;
  padding: 48px 0 28px;
  margin-top: 52px;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--os-blue); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.site-footer__brand { font-family: var(--os-font-heading); font-weight: 700; font-size: 1.3rem; color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.site-footer__brand .footer-mark { width: 30px; height: 30px; border-radius: 8px; display: block; }
.site-footer__brand .brand-dot { color: var(--os-blue); }
.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: .8; font-size: .85rem;
  margin-top: 26px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px;
}

/* =========================================================
   7. RESPONSIVE
   ========================================================= */
@media (max-width: 820px) {
  .site-header__inner { min-height: 58px; gap: 14px; }
  .site-title { font-size: 1.2rem; }
  .blog-header h1 { font-size: 1.9rem; }
  /* Le menu reste sur une seule ligne et défile horizontalement */
  .main-navigation ul { gap: 18px; justify-content: flex-start; }
}
