/* =========================================================
   conseilsdentaire.fr — Feuille de style principale
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a5276;
  --primary-light: #2e86c1;
  --accent: #148f77;
  --bg: #f4f6f8;
  --card-bg: #ffffff;
  --text: #2c3e50;
  --text-light: #5d6d7e;
  --border: #d5d8dc;
  --cta-bg: #eaf4fc;
  --cta-border: #2e86c1;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(26,82,118,.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

/* ── Header ─────────────────────────────────────────────── */
header {
  background: var(--primary);
  color: #fff;
  padding: 0 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .9rem 0;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.logo span { color: #7fb3d3; }
.logo:hover { text-decoration: none; color: #fff; }

nav { display: flex; flex-wrap: wrap; gap: .25rem; }

nav a {
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  padding: .35rem .7rem;
  border-radius: 4px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
nav a:hover, nav a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
}

/* ── Hero (index seulement) ──────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #21618c 100%);
  color: #fff;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  opacity: .88;
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* ── Grille de cartes (index) ────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  border-top: 4px solid var(--primary-light);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(26,82,118,.16); }

.card-icon { font-size: 2rem; }

.card h2 { font-size: 1.15rem; color: var(--primary); }

.card p { font-size: .9rem; color: var(--text-light); flex: 1; }

.card a.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: .5rem 1.1rem;
  border-radius: 5px;
  font-size: .88rem;
  font-weight: 600;
  align-self: flex-start;
  transition: background .15s;
}
.card a.btn:hover { background: var(--primary-light); text-decoration: none; }

/* ── Layout article ──────────────────────────────────────── */
.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 820px) {
  .page-wrapper { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* ── Article ─────────────────────────────────────────────── */
article {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.25rem 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .82rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.article-meta .tag {
  background: #eaf4fc;
  color: var(--primary);
  padding: .2rem .65rem;
  border-radius: 20px;
  font-weight: 600;
}

article h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.article-intro {
  font-size: 1.05rem;
  color: var(--text-light);
  border-left: 4px solid var(--primary-light);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

article h2 {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 2rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
}

article h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 1.25rem 0 .5rem;
  font-weight: 700;
}

article p { margin-bottom: .9rem; }

article ul, article ol {
  margin: .5rem 0 1rem 1.25rem;
}
article li { margin-bottom: .4rem; }

article strong { color: var(--primary); }

/* ── CTA Box ─────────────────────────────────────────────── */
.cta-box {
  background: var(--cta-bg);
  border: 1px solid var(--cta-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
.cta-box h3 { color: var(--primary); margin: 0 0 .6rem; font-size: 1.05rem; }
.cta-box p { margin: 0 0 1rem; font-size: .93rem; }
.cta-box a.btn-cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: .6rem 1.3rem;
  border-radius: 5px;
  font-weight: 700;
  font-size: .9rem;
  transition: background .15s;
}
.cta-box a.btn-cta:hover { background: var(--primary-light); text-decoration: none; }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  background: var(--primary);
  color: #fff;
  padding: .65rem .9rem;
  text-align: left;
}
td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
tr:nth-child(even) td { background: #f8fbfd; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.sidebar-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.sidebar-card h3 {
  font-size: .95rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: .45rem;
  margin-bottom: .9rem;
}
.sidebar-card ul { list-style: none; margin: 0; }
.sidebar-card li { border-bottom: 1px solid var(--border); }
.sidebar-card li:last-child { border-bottom: none; }
.sidebar-card a {
  display: block;
  padding: .55rem .25rem;
  font-size: .88rem;
  color: var(--text);
  transition: color .15s, padding-left .15s;
}
.sidebar-card a:hover { color: var(--primary-light); padding-left: .4rem; text-decoration: none; }
.sidebar-card a.current { color: var(--primary-light); font-weight: 700; }

.badge-mega {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  font-size: .85rem;
  text-align: center;
}
.badge-mega strong { display: block; font-size: 1rem; margin-bottom: .4rem; }
.badge-mega a {
  display: inline-block;
  background: #fff;
  color: var(--accent);
  padding: .4rem .9rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: .85rem;
  margin-top: .6rem;
}
.badge-mega a:hover { background: #e8f8f5; text-decoration: none; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: .6rem 1.5rem;
  font-size: .82rem;
  color: var(--text-light);
}
.breadcrumb .bc-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb .sep { color: var(--border); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .85rem;
  margin-top: 3rem;
}
footer a { color: rgba(255,255,255,.75); }
footer a:hover { color: #fff; }
footer .footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .75rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  article { padding: 1.25rem 1rem; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  nav { gap: .15rem; }
  nav a { font-size: .8rem; padding: .3rem .55rem; }
}
