/* ============================================================
   InfoSoins — main.css
   CSS Grid + Flexbox pur | Archétype E | Magazine santé sobre
   Palette : #1C6E8C (bleu-teal) | #2E8B6F (vert) | #1F2A2E (texte)
   Typo : Lora (titres) + Inter (corps)
   ============================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #1C6E8C;
  --secondary: #2E8B6F;
  --accent:    #2E8B6F;
  --text:      #1F2A2E;
  --text-light:#4A5E65;
  --bg:        #F7FAFB;
  --bg-card:   #FFFFFF;
  --border:    #D6E8EE;
  --primary-dark: #155870;
  --secondary-light: #E8F5F0;
  --primary-light:   #E8F3F8;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --container:  1200px;
  --container-text: 780px;
  --radius:     6px;
  --radius-lg:  12px;
  --shadow-sm:  0 1px 4px rgba(28,110,140,.08);
  --shadow-md:  0 4px 16px rgba(28,110,140,.12);
  --shadow-lg:  0 8px 32px rgba(28,110,140,.15);
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--text {
  width: 100%;
  max-width: var(--container-text);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text);
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

p { margin-bottom: 1rem; }

/* ---------- NAVIGATION ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 24px;
}

.nav-logo a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 72px;
  width: auto;
}

/* Main menu */
.main-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
}

.main-menu__item {}

.main-menu__link {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.main-menu__link:hover,
.main-menu__link:focus {
  background: var(--primary-light);
  color: var(--primary);
}

/* Hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 8px 10px;
  width: 44px;
  height: 44px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-menu-wrap { display: flex; align-items: center; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu-wrap {
    position: fixed;
    top: 88px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid var(--border);
    padding: 16px 24px;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 200;
  }
  .nav-menu-wrap.is-open { display: flex; }

  .main-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
  }
  .main-menu__link {
    font-size: 1rem;
    padding: 10px 14px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .nav-logo img { height: 52px; }
  .nav-inner { min-height: 72px; }
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb-wrap {
  padding: 14px 0 8px;
  font-size: 0.85rem;
}

.breadcrumb-wrap ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  color: var(--text-light);
}

.breadcrumb-wrap ol li + li::before {
  content: "›";
  margin-right: 4px;
  color: var(--text-light);
}

.breadcrumb-wrap a { color: var(--primary); }
.breadcrumb-wrap a:hover { text-decoration: underline; }

/* ---------- INDEX — ARCHÉTYPE E : IMMERSIF OVERLAY ---------- */
.index-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--primary-dark);
}

.index-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.index-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.index-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(21, 40, 50, 0.88) 0%,
    rgba(21, 40, 50, 0.45) 50%,
    rgba(21, 40, 50, 0.15) 100%
  );
  z-index: 1;
}

.index-hero__content {
  position: relative;
  z-index: 2;
  padding: 48px 0 52px;
  max-width: 680px;
}

.index-hero__content h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  text-align: left;
}

.index-hero__baseline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.88);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
}

/* Index intro */
.index-intro {
  background: #fff;
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

.index-intro__text {
  font-size: 1.08rem;
  color: var(--text);
  max-width: 860px;
  line-height: 1.8;
}

.index-intro__text p:last-child { margin-bottom: 0; }

/* Index showcase */
.index-showcase {
  padding: 56px 0 72px;
  background: var(--bg);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--text);
  margin-bottom: 36px;
  position: relative;
  padding-bottom: 14px;
}

.section-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 992px) {
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .showcase-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- POST LOOP CARD ---------- */
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.post-card__img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--primary-light);
}

.post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card__img img {
  transform: scale(1.04);
}

.post-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
  border-bottom: 1.5px solid var(--secondary);
  padding-bottom: 2px;
}

.post-card__cat:hover { color: var(--primary); border-color: var(--primary); }

.post-card__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 10px;
  flex: 1;
}

.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--primary); }

.post-card__meta {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}

.post-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap var(--transition), color var(--transition);
}

.post-card__read-more::after { content: "→"; }
.post-card:hover .post-card__read-more { gap: 10px; color: var(--primary-dark); }

/* ---------- POST LIST ---------- */
.post-list-header {
  background: var(--primary);
  padding: 48px 0 44px;
  border-bottom: 4px solid var(--secondary);
}

.post-list-header .post-list-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
}

.post-list-header h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: left;
  max-width: 640px;
}

.post-list-body {
  padding: 52px 0 72px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

@media (max-width: 992px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .posts-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.page { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
}
.page:hover { border-color: var(--primary); color: var(--primary); }
.page.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* ---------- POST SINGLE ---------- */
.post-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 40px 0 0;
}

.post-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  border-bottom: 1.5px solid var(--secondary);
  padding-bottom: 2px;
  margin-bottom: 14px;
}

.post-header h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.2;
  max-width: 820px;
  margin-bottom: 20px;
  text-align: left;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
  padding: 16px 0 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.post-meta .sep { color: var(--border); font-size: 1.1em; }

.post-featured-img {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  background: var(--primary-light);
}

.post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Post body layout: content + ToC */
.post-body-wrap {
  padding: 52px 0 64px;
  background: var(--bg);
}

.post-body-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 992px) {
  .post-body-inner {
    grid-template-columns: 1fr;
  }
  .post-toc { order: -1; }
}

/* Table of contents */
.post-toc {
  position: sticky;
  top: 104px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
}

.post-toc__title {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-toc :is(ol, ul) {
  padding-left: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-light);
}

.post-toc a {
  color: var(--text-light);
  transition: color var(--transition);
}
.post-toc a:hover { color: var(--primary); }

/* Article content styling */
.post-content {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  font-size: 1.06rem;
  line-height: 1.85;
}

@media (max-width: 640px) {
  .post-content { padding: 24px 18px; }
}

.post-content h2 {
  font-size: 1.55rem;
  margin: 2.2em 0 0.8em;
  padding-top: 0.4em;
  color: var(--primary-dark);
  border-left: 4px solid var(--secondary);
  padding-left: 14px;
}

.post-content h3 {
  font-size: 1.2rem;
  margin: 1.8em 0 0.6em;
  color: var(--text);
}

.post-content h4 {
  font-size: 1rem;
  margin: 1.4em 0 0.5em;
  color: var(--text);
  font-weight: 700;
}

.post-content p { margin-bottom: 1.3em; }

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--border);
  transition: text-decoration-color var(--transition);
}
.post-content a:hover { text-decoration-color: var(--primary); }

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 1.3em;
}
.post-content li { margin-bottom: 0.5em; }

.post-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  margin: 2em 0;
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
  font-size: 1.05rem;
}

.post-content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}
.post-content th, .post-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.post-content th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
}
.post-content tr:nth-child(even) td { background: var(--bg); }

/* Author signature block */
.post-author-box {
  margin-top: 48px;
  background: var(--secondary-light);
  border: 1.5px solid #b8ddd1;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}

.post-author-box__heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 14px;
}

.post-author-box__inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 480px) {
  .post-author-box__inner { flex-direction: column; }
  .post-author-box { padding: 20px; }
}

/* Related articles */
.related-posts {
  padding: 48px 0 64px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.related-posts .section-heading { margin-bottom: 28px; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 992px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ---------- PAGE STATIQUE ---------- */
.page-header {
  background: var(--primary);
  padding: 40px 0 36px;
  border-bottom: 4px solid var(--secondary);
}

.page-header .page-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  text-align: left;
}

.page-content-wrap {
  padding: 56px 0 80px;
}

.page-content {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  max-width: 860px;
  font-size: 1.02rem;
  line-height: 1.8;
}

.page-content h2 {
  font-size: 1.35rem;
  color: var(--primary-dark);
  margin: 2em 0 0.7em;
  border-left: 4px solid var(--secondary);
  padding-left: 12px;
}

.page-content p { margin-bottom: 1.2em; }

.page-content a {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .page-content { padding: 24px 18px; }
}

/* ---------- PAGE AUTEUR ---------- */
.author-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 52px 0 48px;
  border-bottom: 4px solid var(--secondary);
}

.author-header .page-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
}

.author-header h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: left;
  margin-bottom: 12px;
  max-width: 700px;
}

.author-header__desc {
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem;
  max-width: 600px;
}

.author-content-wrap {
  padding: 56px 0 80px;
}

.author-intro-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 48px;
  font-size: 1.02rem;
  line-height: 1.8;
}

.author-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 768px) {
  .author-grid { grid-template-columns: 1fr; }
  .author-intro-card { padding: 24px; }
}

.author-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.author-card__img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-light);
  border: 3px solid var(--primary);
  flex-shrink: 0;
}

.author-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card__info {}

.author-card__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.author-card__specialty {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 12px;
}

.author-card__bio {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-light);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
  border-top: 4px solid var(--secondary);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
}

.footer-logo img {
  height: 44px;
  width: auto;
  opacity: 0.85;
  filter: brightness(2);
}

.footer-copy {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
}

.footer-copy a {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
}
.footer-copy a:hover { color: #fff; }

@media (max-width: 576px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- UTILITIES ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
