/* ============================================
   CENTRE DE CARDIOLOGIE DELÉMONT — style.css
   ============================================ */

/* --- Variables & Reset --- */
:root {
  --red:        #c0392b;
  --red-dark:   #962d22;
  --red-light:  #e74c3c;
  --navy:       #1e2d40;
  --navy-light: #2c3e50;
  --blue:       #2980b9;
  --blue-light: #3498db;
  --green:      #27ae60;
  --purple:     #8e44ad;
  --bg:         #f8f9fa;
  --bg-alt:     #eef1f5;
  --white:      #ffffff;
  --text:       #2c3e50;
  --text-muted: #6c757d;
  --border:     #dee2e6;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
  --shadow-md:  0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.14);
  --radius:     12px;
  --radius-sm:  8px;
  --trans:      0.25s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--trans), box-shadow var(--trans);
}

.navbar.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-logo svg { width: 40px; height: 40px; }

.nav-title { display: flex; flex-direction: column; }
.nav-title-main {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.nav-title-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: .02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--trans), background var(--trans);
}
.nav-link:hover,
.nav-link.active { color: var(--red); background: rgba(192,57,43,.07); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--red);
  color: var(--white);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--trans), transform var(--trans);
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--red-dark); transform: translateY(-1px); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 6px;
  margin-left: auto;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--trans), opacity var(--trans);
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--navy) 0%, #112233 50%, #1a0a0a 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(192,57,43,.25) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 15% 70%, rgba(41,128,185,.15) 0%, transparent 50%);
}

/* Decorative ECG line */
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 30%;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,57,43,.3) 20%, rgba(192,57,43,.3) 80%, transparent);
  animation: ecgPulse 3s ease-in-out infinite;
}

@keyframes ecgPulse {
  0%, 100% { opacity: .3; }
  50% { opacity: .7; }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: rgba(192,57,43,.25);
  border: 1px solid rgba(192,57,43,.4);
  color: #f5b7b1;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.hero-title span { color: var(--red-light); }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--trans);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(192,57,43,.4); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.btn-full { width: 100%; justify-content: center; }

.hero-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,.7);
  font-size: 0.875rem;
}
.hero-info-item svg { color: var(--red-light); flex-shrink: 0; }
.hero-info-item.urgence { color: #f5b7b1; }
.hero-info-item.urgence strong { color: var(--white); font-size: 1rem; }

.hero-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 60px; }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-tag.light { color: #f5b7b1; }

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.section-dark .section-title { color: var(--white); }

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-dark .section-desc { color: rgba(255,255,255,.7); }

/* ============================================
   ÉQUIPE
   ============================================ */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.doctor-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform var(--trans), box-shadow var(--trans);
}
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.doctor-avatar svg { width: 80px; height: 80px; }

.doctor-specialty-tag {
  display: inline-block;
  background: rgba(192,57,43,.08);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 0.25rem;
}

.doctor-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.doctor-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.doctor-cv {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.doctor-cv li {
  font-size: 0.875rem;
  color: var(--text);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.5;
}
.doctor-cv li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

/* Staff bar */
.staff-bar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.staff-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.staff-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.staff-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}
.staff-item small { color: var(--text-muted); font-size: 0.78rem; }

.staff-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(192,57,43,.08);
  border-radius: 50%;
  color: var(--red);
  flex-shrink: 0;
}
.staff-icon svg { width: 16px; height: 16px; }

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.service-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}
.service-icon svg { width: 24px; height: 24px; }

.service-icon--blue   { background: rgba(41,128,185,.1);  color: var(--blue); }
.service-icon--red    { background: rgba(192,57,43,.1);   color: var(--red); }
.service-icon--dark   { background: rgba(30,45,64,.1);    color: var(--navy); }
.service-icon--green  { background: rgba(39,174,96,.1);   color: var(--green); }
.service-icon--purple { background: rgba(142,68,173,.1);  color: var(--purple); }

.service-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 0.9rem;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.service-list li {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}
.service-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 0.75rem;
  top: 2px;
}

/* ============================================
   PARTENAIRES
   ============================================ */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.partner-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans);
}
.partner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.partner-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.partner-name { font-weight: 700; color: var(--navy); margin-bottom: 0.35rem; font-size: 1rem; }
.partner-detail { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.partner-tel { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 1.75rem; }

.contact-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  color: var(--white);
}
.contact-icon svg { width: 20px; height: 20px; }
.urgence-icon { background: rgba(231,76,60,.3); }

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  margin-bottom: 0.2rem;
}

.contact-value {
  font-size: 1rem;
  color: var(--white);
  line-height: 1.5;
}
.contact-link:hover { color: #f5b7b1; text-decoration: underline; }
.urgence-tel { font-size: 1.6rem; font-weight: 700; color: #f5b7b1; }

.contact-sublabel { font-size: 0.8rem; color: rgba(255,255,255,.5); margin-top: 0.2rem; }

.contact-map-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,.6);
  transition: color var(--trans);
}
.contact-map-link:hover { color: var(--white); }

/* Form */
.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 1.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,.12);
  background: var(--white);
}

.form-notice {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(192,57,43,.05);
  border-left: 3px solid var(--red);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.form-success {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(39,174,96,.1);
  border: 1px solid rgba(39,174,96,.3);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 500;
}
.hidden { display: none !important; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #111820;
  color: rgba(255,255,255,.7);
  padding-top: 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: auto;
}
.footer-logo svg { width: 32px; height: 32px; }
.footer-name { font-weight: 600; color: var(--white); font-size: 0.9rem; }
.footer-sub { font-size: 0.75rem; color: rgba(255,255,255,.45); }

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,.6);
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--white); }

.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  transition: background var(--trans), color var(--trans);
}
.footer-social a:hover { background: var(--red); color: var(--white); }

.footer-bottom {
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,.35);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { order: 2; }
  .contact-form { order: 1; }
}

@media (max-width: 768px) {
  /* Navbar mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 1rem; }
  .nav-cta { display: none; }
  .burger { display: flex; }

  /* Hero */
  .hero { min-height: auto; padding: 5rem 0 4rem; }
  .hero-content { padding: 3rem 1.5rem 2rem; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .hero-info-bar { flex-direction: column; gap: 0.75rem; }

  /* Sections */
  .section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2.5rem; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.75rem 1.25rem; }

  /* Doctors */
  .doctors-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .footer-brand { margin-right: 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .services-grid { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: 1fr; }
  .staff-list { flex-direction: column; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp .5s ease both;
}

.doctor-card, .service-card, .partner-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease, box-shadow var(--trans);
}
.doctor-card.visible, .service-card.visible, .partner-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for cards */
.doctor-card:nth-child(2)  { transition-delay: .1s; }
.service-card:nth-child(2) { transition-delay: .05s; }
.service-card:nth-child(3) { transition-delay: .10s; }
.service-card:nth-child(4) { transition-delay: .15s; }
.service-card:nth-child(5) { transition-delay: .20s; }
.partner-card:nth-child(2) { transition-delay: .07s; }
.partner-card:nth-child(3) { transition-delay: .14s; }
