/*
Theme Name: Annuaire Médical
Description: Annuaire RPPS des professionnels de santé libéraux en France
Version: 1.0
*/

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1E293B; background: #F1F5F9; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }

/* === CSS Variables === */
:root {
  --pri:    #1B3E8A;
  --pri2:   #2563EB;
  --acc:    #0EA5E9;
  --grn:    #059669;
  --bg:     #F1F5F9;
  --surf:   #FFFFFF;
  --bdr:    #E2E8F0;
  --txt:    #1E293B;
  --txt2:   #64748B;
  --r:      10px;
  --shd:    0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
  --shd2:   0 4px 20px rgba(37,99,235,.14);
  --wrap:   1200px;
}

/* === Typography === */
h1, h2, h3, h4 { color: var(--pri); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: .9rem; }
h2 { font-size: clamp(1.15rem, 2.5vw, 1.7rem); margin-bottom: .7rem; }
h3 { font-size: 1.05rem; margin-bottom: .5rem; }
p  { margin-bottom: .9rem; color: #334155; }
a  { color: var(--pri2); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--acc); }

/* === Layout === */
.site-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.site-body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main  { flex: 1; padding: 0 0 64px; }

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--pri);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 800; font-size: 1.05rem;
  text-decoration: none; flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; color: #e0eaff; }
.logo-icon { font-size: 1.5rem; }
.logo-sub  { font-size: .65rem; font-weight: 400; opacity: .75; display: block; }

.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  display: block; padding: 5px 9px; border-radius: 6px;
  color: rgba(255,255,255,.82); font-size: .78rem; font-weight: 500;
  transition: background .15s, color .15s; white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 2px solid rgba(255,255,255,.4);
  border-radius: 6px; color: #fff; cursor: pointer; padding: 5px 9px; font-size: 1.1rem;
}

/* ─── PAGE HERO (titre de chaque page) ──────────────────────────────────── */
.page-hero-bar {
  background: linear-gradient(135deg, var(--pri) 0%, var(--pri2) 100%);
  padding: 36px 24px 32px; text-align: center; margin-bottom: 0;
}
.page-hero-bar h1 { color: #fff; margin-bottom: 6px; }
.page-hero-bar .hero-meta { color: rgba(255,255,255,.75); font-size: .9rem; }

/* ─── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--surf); border-bottom: 1px solid var(--bdr);
  padding: 10px 24px; font-size: .8rem; color: var(--txt2);
}
.breadcrumb-bar .bc-inner { max-width: var(--wrap); margin: 0 auto; }
.breadcrumb-bar a { color: var(--pri2); }
.breadcrumb-bar a:hover { color: var(--acc); }
.breadcrumb-bar span.sep { margin: 0 6px; }

/* ─── ENTRY CONTENT ─────────────────────────────────────────────────────── */
.entry-wrap { max-width: var(--wrap); margin: 0 auto; padding: 36px 24px; }

/* ─── ANNUAIRE COMPONENTS ────────────────────────────────────────────────── */

/* Hero intro (Haiku) */
.as-hero {
  background: #EFF6FF;
  border-left: 4px solid var(--pri2);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.as-hero p { margin: 0; color: #1E3A5F; font-size: .97rem; }
.as-hero strong { color: var(--pri); }

/* Count badge */
.as-practitioners-count {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ECFDF5; border: 1px solid #A7F3D0;
  border-radius: 20px; padding: 5px 14px;
  font-size: .84rem; color: #065F46; margin-bottom: 18px;
}
.as-practitioners-count strong { color: var(--grn); }

/* City card grid */
.as-city-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 11px; margin: 0 0 32px;
}
.as-city-list li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; gap: 8px;
  background: var(--surf); border: 1px solid var(--bdr);
  border-radius: var(--r); color: var(--txt); font-weight: 500;
  box-shadow: var(--shd); transition: all .18s; text-decoration: none;
}
.as-city-list li a:hover {
  border-color: var(--pri2); background: #EFF6FF;
  color: var(--pri); box-shadow: var(--shd2);
  transform: translateY(-2px); text-decoration: none;
}
.as-city-list li a span {
  font-size: .74rem; font-weight: 400; color: var(--txt2);
  background: #F1F5F9; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
  flex-shrink: 0;
}
.as-city-list li a:hover span { background: #DBEAFE; color: var(--pri); }

/* Practitioners table */
.as-table-wrap {
  width: 100%; overflow-x: auto; border-radius: var(--r);
  box-shadow: var(--shd); border: 1px solid var(--bdr); margin-bottom: 28px;
}
.as-practitioners-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
  background: var(--surf); min-width: 420px;
}
.as-practitioners-table thead { background: var(--pri); color: #fff; }
.as-practitioners-table th {
  padding: 11px 16px; text-align: left; font-weight: 600;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
}
.as-practitioners-table td {
  padding: 9px 16px; border-bottom: 1px solid #F1F5F9; color: var(--txt);
}
.as-practitioners-table tr:last-child td { border-bottom: none; }
.as-practitioners-table tbody tr:nth-child(even) { background: #F8FAFC; }
.as-practitioners-table tbody tr:hover { background: #EFF6FF; }

/* Data source note */
.as-data-source {
  font-size: .76rem; color: var(--txt2);
  border-top: 1px solid var(--bdr); padding-top: 10px; margin-top: 4px;
}
.as-data-source a { color: var(--pri2); }

/* ─── HOMEPAGE ────────────────────────────────────────────────────────────── */
.hp-hero {
  background: linear-gradient(150deg, #0C1F57 0%, var(--pri) 45%, var(--pri2) 100%);
  padding: 80px 24px 70px; text-align: center; color: #fff;
}
.hp-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 14px; }
.hp-hero p  { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 560px; margin: 0 auto 28px; }
.hp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px; padding: 6px 16px; font-size: .82rem; color: #fff;
}

.hp-stats {
  background: var(--surf); border-bottom: 1px solid var(--bdr); padding: 20px 24px;
}
.hp-stats-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0;
}
.hp-stat { text-align: center; padding: 8px 36px; }
.hp-stat + .hp-stat { border-left: 1px solid var(--bdr); }
.hp-stat-num   { font-size: 1.55rem; font-weight: 800; color: var(--pri); display: block; }
.hp-stat-label { font-size: .78rem; color: var(--txt2); font-weight: 500; }

.hp-section { padding: 56px 24px; }
.hp-section-title { text-align: center; margin-bottom: 6px; }
.hp-section-sub   { text-align: center; color: var(--txt2); font-size: .94rem; margin-bottom: 36px; }

.hp-grid {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px;
}
.hp-card {
  background: var(--surf); border: 1px solid var(--bdr);
  border-radius: 14px; padding: 22px; box-shadow: var(--shd);
  text-decoration: none; display: flex; flex-direction: column;
  border-top: 4px solid var(--pri2);
  transition: transform .2s, box-shadow .2s, border-top-color .2s;
}
.hp-card:hover {
  transform: translateY(-4px); box-shadow: var(--shd2);
  border-top-color: var(--acc); text-decoration: none;
}
.hp-card-icon  { font-size: 2.2rem; margin-bottom: 10px; }
.hp-card-title { font-size: 1rem; font-weight: 700; color: var(--pri); margin-bottom: 4px; }
.hp-card-sub   { font-size: .8rem; color: var(--txt2); margin-bottom: 12px; }
.hp-card-tags  { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.hp-card-tag   {
  font-size: .72rem; background: #EFF6FF; color: var(--pri2);
  padding: 2px 9px; border-radius: 20px; font-weight: 500;
}
.hp-card-cta {
  margin-top: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: .82rem; font-weight: 600; color: var(--pri2);
}
.hp-card-cta::after { content: '→'; }

.hp-trust {
  background: #EFF6FF; border-top: 1px solid #BFDBFE; padding: 40px 24px;
  text-align: center;
}
.hp-trust h3 {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--txt2); margin-bottom: 20px;
}
.hp-trust-items {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 28px;
  max-width: 860px; margin: 0 auto;
}
.hp-trust-item { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: #1E3A5F; }
.hp-trust-item .ti { font-size: 1.3rem; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--pri); color: rgba(255,255,255,.65);
  padding: 22px 24px; text-align: center; font-size: .79rem;
}
.site-footer strong { color: #fff; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav { display: none; position: absolute; }
  .site-nav.open {
    display: flex; top: 60px; left: 0; right: 0;
    background: var(--pri); padding: 8px 0; flex-direction: column;
  }
  .site-nav ul { flex-direction: column; width: 100%; }
  .site-nav a { padding: 11px 20px; border-radius: 0; font-size: .88rem; }
  .nav-toggle { display: block; }
}
@media (max-width: 640px) {
  .hp-grid { grid-template-columns: 1fr 1fr; }
  .as-city-list { grid-template-columns: 1fr 1fr; }
  .hp-hero { padding: 52px 20px 44px; }
  .hp-section { padding: 36px 20px; }
  .entry-wrap { padding: 24px 16px; }
  .hp-stat { padding: 8px 18px; }
}
@media (max-width: 420px) {
  .hp-grid { grid-template-columns: 1fr; }
  .as-city-list { grid-template-columns: 1fr; }
}


/* === Dropdown specialites nav === */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.13); border: 1.5px solid rgba(255,255,255,.32);
  border-radius: 8px; color: #fff; cursor: pointer;
  padding: 7px 16px; font-size: .88rem; font-weight: 600;
  font-family: inherit; transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.nav-dropdown-btn:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.55); }
.nav-dd-arrow { font-size: .62rem; transition: transform .2s; line-height:1; }
.nav-dropdown-btn[aria-expanded="true"] .nav-dd-arrow { transform: rotate(180deg); }

.nav-dropdown-panel {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: #fff; border: 1px solid var(--bdr); border-radius: 14px;
  box-shadow: 0 10px 48px rgba(27,62,138,.18); padding: 14px; z-index: 500;
  min-width: 360px;
}
.nav-dropdown-panel.open { display: block; animation: ddFade .15s ease; }
@keyframes ddFade { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }

.nav-dropdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.nav-spec-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  text-decoration: none; color: var(--txt); font-size: .84rem; font-weight: 500;
  transition: background .14s, color .14s; white-space: nowrap;
}
.nav-spec-item:hover { background: #EFF6FF; color: var(--pri); text-decoration: none; }
.nav-spec-icon { font-size: 1.3rem; flex-shrink: 0; }
.nav-spec-label { flex: 1; }

/* Mobile */
.site-nav { display: none !important; }
.nav-toggle { display: none !important; }
.nav-toggle-m {
  display: none; background: none; border: 2px solid rgba(255,255,255,.4);
  border-radius: 6px; color: #fff; cursor: pointer; padding: 5px 10px; font-size: 1.1rem;
}
.nav-mobile-panel {
  display: none; background: var(--pri);
  border-top: 1px solid rgba(255,255,255,.15); padding: 10px 16px 14px;
}
.nav-mobile-panel.open { display: block; }
.nav-mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.nav-mobile-panel .nav-spec-item { color: rgba(255,255,255,.9); padding: 9px 12px; border-radius: 7px; }
.nav-mobile-panel .nav-spec-item:hover { background: rgba(255,255,255,.15); color: #fff; }

@media (max-width: 900px) {
  .nav-dropdown { display: none; }
  .nav-toggle-m { display: block; }
}
