/* CM2I — Clinique de Médecine Interne et d'Infectiologie */

:root {
  --primary: #1b7a3c;
  --primary-dark: #0f5227;
  --primary-light: #e7f4ea;
  --accent: #e8ab00;
  --text: #23281f;
  --text-muted: #5c6459;
  --bg: #ffffff;
  --bg-alt: #f7faf5;
  --border: #e2e8dd;
  --danger: #c92a2a;
  --radius: 10px;
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

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

/* Top bar */
.topbar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: #fff; }
.topbar a:hover { text-decoration: underline; }
.topbar .emergency {
  color: #ffd9d9;
  font-weight: 600;
}

/* Header / nav */
header.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.brand-text .name {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.05rem;
  display: block;
}
.brand-text .tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

nav.main-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
nav.main-nav a {
  color: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
}
nav.main-nav a:hover { background: var(--primary-light); text-decoration: none; }
nav.main-nav a.active { color: var(--primary-dark); font-weight: 700; }

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--primary-dark); text-decoration: none; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 64px 0;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: 2.3rem;
  line-height: 1.25;
  margin: 0 0 16px;
}
.hero p.lead {
  font-size: 1.1rem;
  color: #dcefee;
  margin: 0 0 24px;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.98rem;
}
.btn-primary { background: var(--accent); color: #2a1e00; }
.btn-primary:hover { background: #b8822a; text-decoration: none; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

.hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 24px;
}
.hero-card h3 { margin-top: 0; font-size: 1rem; color: #ffe9c2; }
.hero-card ul { margin: 0; padding-left: 18px; }
.hero-card li { margin-bottom: 8px; font-size: 0.95rem; }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}
.section-head h2 {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin: 8px 0 12px;
}
.section-head p { color: var(--text-muted); margin: 0; }

/* Cards grid */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin: 0 0 8px; color: var(--primary-dark); font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.card.soon {
  border-style: dashed;
  opacity: 0.9;
}
.badge-soon {
  display: inline-block;
  background: #fff3e0;
  color: #8a5a00;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Emergency strip */
.emergency-strip {
  background: #fdecec;
  border: 1px solid #f3c9c9;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.emergency-strip .label {
  font-weight: 700;
  color: var(--danger);
}
.emergency-strip .num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--danger);
}

/* Doctor / about */
.doctor-block {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.doctor-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--primary-light);
  overflow: hidden;
  border: 1px solid var(--border);
}
.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 15%;
}
.doctor-block h2 { color: var(--primary-dark); margin-top: 0; }
.doctor-block .role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.doctor-block ul { padding-left: 20px; color: var(--text-muted); }

/* Team */
.team-card h3 {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 1.05rem;
}
.team-specialties {
  color: var(--text-muted);
  font-size: 0.83rem;
  font-style: italic;
  margin: 0 0 14px;
}
.team-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.team-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
}
.team-list li:first-child { border-top: none; }
.team-list li span {
  color: var(--text-muted);
  font-size: 0.83rem;
  white-space: nowrap;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.contact-info .item {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.contact-info .icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info .icon svg { width: 20px; height: 20px; }
.contact-info h3 { margin: 0 0 4px; font-size: 1rem; color: var(--primary-dark); }
.contact-info p { margin: 0; color: var(--text-muted); }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 280px;
}
.map-embed iframe { width: 100%; height: 100%; min-height: 280px; border: 0; }

.booking-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.booking-embed iframe {
  width: 100%;
  height: 720px;
  border: 0;
  display: block;
}
@media (max-width: 720px) {
  .booking-embed iframe { height: 640px; }
}

form.contact-form {
  display: grid;
  gap: 14px;
}
form.contact-form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}
form.contact-form input,
form.contact-form textarea,
form.contact-form select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}
form.contact-form textarea { min-height: 120px; resize: vertical; }

/* Footer */
footer.site-footer {
  background: var(--primary-dark);
  color: #dcefee;
  padding: 44px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-grid h4 { color: #fff; margin: 0 0 14px; font-size: 0.95rem; }
.footer-grid p, .footer-grid a { color: #b9d8d6; font-size: 0.92rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 18px;
  text-align: center;
  font-size: 0.82rem;
  color: #9fc4c1;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 100;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; }

/* Responsive */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .doctor-block { grid-template-columns: 1fr; }
  .doctor-photo { max-width: 220px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .menu-toggle { display: inline-block; }
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    display: none;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 12px 8px; }
  .topbar .container { font-size: 0.78rem; }
  .hero h1 { font-size: 1.7rem; }
  .whatsapp-float { width: 52px; height: 52px; bottom: 16px; right: 16px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}
