/*
Theme Name: Klowsh
Theme URI: https://klowsh.com
Author: Klowsh - Blog Televic Healthcare Solutions
Author URI: https://klowsh.com
Description: Theme professionnel pour blog dedie aux solutions Televic Healthcare (Aqura, appel infirmier). Palette navy/teal, page d'accueil orientee produits, typographie claire et lisible.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: klowsh
Tags: blog, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --navy-3: #1d4472;
  --teal: #00a9a5;
  --teal-dark: #007e7b;
  --teal-light: #e0f5f4;
  --bg: #f6f8fa;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(11, 37, 69, .08), 0 4px 16px rgba(11, 37, 69, .06);
  --shadow-lg: 0 8px 30px rgba(11, 37, 69, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }
h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  line-height: 1.25;
  margin: 1.4em 0 .5em;
  font-weight: 700;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
  flex-wrap: wrap;
}
.site-branding { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.site-branding .custom-logo { max-height: 44px; width: auto; border-radius: 6px; }
.site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.site-title a { color: #fff; }
.site-title a:hover { color: var(--teal); }
.site-title .dot { color: var(--teal); }
.site-tagline {
  margin: 0;
  font-size: .78rem;
  color: #9fb3c8;
  display: block;
}

/* Navigation */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.main-navigation li { position: relative; }
.main-navigation a {
  display: block;
  color: #d7e3f0;
  padding: 22px 14px;
  font-size: .95rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: #fff;
  border-bottom-color: var(--teal);
}
.main-navigation ul ul {
  position: absolute;
  left: 0; top: 100%;
  background: var(--navy-2);
  min-width: 220px;
  display: none;
  flex-direction: column;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul { display: flex; }
.main-navigation ul ul a { padding: 12px 16px; border-bottom: none; }
.main-navigation ul ul a:hover { background: var(--navy-3); }

.menu-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--teal-dark) 130%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 48px;
  align-items: center;
}
.hero-kicker {
  display: inline-block;
  background: rgba(0, 169, 165, .18);
  border: 1px solid rgba(0, 169, 165, .5);
  color: #7fe0dd;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin: 0 0 16px;
  letter-spacing: -.02em;
}
.hero p {
  color: #c9d7e6;
  font-size: 1.08rem;
  margin: 0 0 28px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #00c2bd; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,169,165,.4); }
.btn-outline { border: 2px solid rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.hero-media img {
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-title {
  margin: 0;
  font-size: 1.55rem;
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 5px;
  border-radius: 3px;
  background: var(--teal);
}
.section-link { font-weight: 700; font-size: .92rem; }

/* Category cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: block;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}
.cat-card-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.cat-card-icon svg { width: 24px; height: 24px; }
.cat-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.cat-card p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.cat-card .count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Post cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-2); }
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
}
.post-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card-cat {
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--teal-dark);
  margin-bottom: 8px;
}
.post-card h3 { margin: 0 0 10px; font-size: 1.1rem; line-height: 1.4; }
.post-card h3 a { color: var(--navy); }
.post-card h3 a:hover { color: var(--teal-dark); }
.post-card-excerpt { color: var(--muted); font-size: .92rem; margin: 0 0 14px; flex: 1; }
.post-card-meta {
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---------- Archive / index ---------- */
.page-header-bar {
  background: var(--navy);
  color: #fff;
  padding: 40px 0;
}
.page-header-bar h1 { color: #fff; margin: 0; font-size: 1.8rem; }
.page-header-bar .archive-description { color: #c9d7e6; margin: 8px 0 0; max-width: 700px; }
.archive-content { padding: 48px 0 64px; }

/* ---------- Single post / page ---------- */
.entry-wrap { padding: 48px 0 64px; }
.entry-main {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
}
.entry-hero img { width: 100%; display: block; max-height: 440px; object-fit: cover; }
.entry-inner { padding: 40px 48px 48px; }
.entry-meta {
  font-size: .85rem;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}
.entry-meta .cat-badge {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.entry-title { margin: 0 0 18px; font-size: 2rem; }
.entry-content { font-size: 1.02rem; }
.entry-content h2 { border-bottom: 2px solid var(--teal-light); padding-bottom: .3em; }
.entry-content img { border-radius: 8px; }
.entry-content blockquote {
  border-left: 4px solid var(--teal);
  background: var(--teal-light);
  margin: 1.5em 0;
  padding: 16px 24px;
  border-radius: 0 8px 8px 0;
  color: var(--navy-2);
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .95rem;
}
.entry-content th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 10px 14px;
}
.entry-content td { border: 1px solid var(--border); padding: 9px 14px; }
.entry-content tr:nth-child(even) td { background: var(--bg); }
.entry-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-link {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .82rem;
  color: var(--muted);
}
.tag-link:hover { border-color: var(--teal); color: var(--teal-dark); }

/* Post navigation */
.post-navigation .nav-links {
  max-width: 860px;
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.post-navigation a {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow);
}
.post-navigation a:hover { border-color: var(--teal); color: var(--teal-dark); }
.post-navigation .nav-next { text-align: right; }

/* Comments */
.comments-area {
  max-width: 860px;
  margin: 32px auto 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 40px;
  box-shadow: var(--shadow);
}
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--border); padding: 18px 0; }
.comment-author img { border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.comment-metadata { font-size: .8rem; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: .95rem;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: 2px solid var(--teal);
  border-color: var(--teal);
}
.comment-form .submit,
input[type="submit"] {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
}
.comment-form .submit:hover, input[type="submit"]:hover { background: var(--teal-dark); }

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 44px 0 0;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  color: var(--navy);
}
.pagination .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .page-numbers:hover { border-color: var(--teal); color: var(--teal-dark); }

/* Search */
.search-form { display: flex; gap: 10px; max-width: 520px; }
.search-form .search-field {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: .95rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--teal-dark), var(--teal));
  color: #fff;
  padding: 52px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; margin: 0 0 10px; font-size: 1.7rem; }
.cta-band p { margin: 0 auto 24px; max-width: 620px; color: #e8fbfa; }
.cta-band .btn { background: #fff; color: var(--teal-dark); }
.cta-band .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.2); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #9fb3c8;
  padding: 52px 0 0;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  padding-bottom: 40px;
}
.site-footer h4 {
  color: #fff;
  margin: 0 0 16px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #9fb3c8; }
.site-footer a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  text-align: center;
  font-size: .82rem;
}

/* WordPress core classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 6px; }
.sticky {}
.bypostauthor {}
.gallery-caption {}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; }
  .entry-inner { padding: 28px 24px 32px; }
  .comments-area { padding: 24px 20px; }
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-navigation { width: 100%; display: none; }
  .main-navigation.toggled { display: block; padding-bottom: 12px; }
  .main-navigation ul { flex-direction: column; gap: 0; }
  .main-navigation a { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-navigation ul ul { position: static; display: flex; box-shadow: none; background: transparent; }
  .main-navigation ul ul a { padding-left: 28px; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 1.9rem; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
}
