/*
Theme Name: eTabib Modern
Theme URI: https://etabib.dz
Author: eTabib Team
Description: Theme moderne et optimise SEO pour la plateforme e-Sante eTabib
Version: 3.0.0
License: GPL v2
Text Domain: etabib-modern
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@300;400;500;600;700;800&display=swap');

:root {
  --etabib-cyan: #00BFFF;
  --etabib-cyan-dark: #0099CC;
  --etabib-green: #2ECC71;
  --etabib-purple: #7B2D8E;
  --etabib-orange: #FF6B35;
  --etabib-dark: #0A1628;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  --font-fr: 'Poppins', sans-serif;
  --font-ar: 'Noto Kufi Arabic', sans-serif;
}

.dark-mode {
  --bg: #0F172A;
  --card: #1E293B;
  --text: #F1F5F9;
  --text-light: #94A3B8;
  --border: #334155;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-fr);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
body[dir="rtl"] { font-family: var(--font-ar); }

/* NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.dark-mode .navbar { background: rgba(15,23,42,0.95); }
.nav-logo { font-size: 24px; font-weight: 800; color: var(--etabib-cyan); display: flex; align-items: center; gap: 8px; }
.nav-logo span { color: var(--text); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--text-light); font-weight: 500; font-size: 14px; position: relative; padding: 4px 0; text-decoration: none; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--etabib-cyan); transition: all 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--etabib-cyan); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  background: linear-gradient(135deg, var(--etabib-cyan), var(--etabib-cyan-dark));
  color: white; padding: 8px 20px; border-radius: 20px;
  font-weight: 600; font-size: 13px; border: none; cursor: pointer;
  transition: all 0.3s; text-decoration: none; display: inline-block;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,191,255,0.4); }
.theme-toggle {
  background: var(--border); border: none; width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 16px;
  transition: all 0.3s; color: var(--text);
}
.theme-toggle:hover { background: var(--etabib-cyan); color: white; }
.lang-switcher { display: flex; gap: 4px; align-items: center; }
.lang-switcher button {
  background: transparent; border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 6px; font-size: 12px;
  font-weight: 600; cursor: pointer; color: var(--text-light);
  transition: all 0.3s;
}
.lang-switcher button.active, .lang-switcher button:hover {
  background: var(--etabib-cyan); color: white; border-color: var(--etabib-cyan);
}
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }

/* HERO */
.hero {
  margin-top: 64px; padding: 100px 24px 80px; text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(0,191,255,0.05) 100%);
  position: relative; overflow: hidden;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,191,255,0.1); color: var(--etabib-cyan);
  padding: 8px 20px; border-radius: 50px; font-size: 13px;
  font-weight: 600; margin-bottom: 24px;
  border: 1px solid rgba(0,191,255,0.2);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 1.1;
  margin-bottom: 20px; max-width: 800px; margin-left: auto; margin-right: auto;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--etabib-cyan), var(--etabib-green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: clamp(16px, 2vw, 18px); color: var(--text-light); max-width: 600px; margin: 0 auto 32px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  background: linear-gradient(135deg, var(--etabib-cyan), var(--etabib-cyan-dark));
  color: white; padding: 14px 32px; border-radius: 12px;
  font-weight: 600; border: none; cursor: pointer; font-size: 15px;
  transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; box-shadow: 0 4px 15px rgba(0,191,255,0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,191,255,0.4); }
.btn-secondary {
  background: var(--card); color: var(--text); padding: 14px 32px;
  border-radius: 12px; font-weight: 600; border: 2px solid var(--border);
  cursor: pointer; font-size: 15px; transition: all 0.3s; text-decoration: none;
}
.btn-secondary:hover { border-color: var(--etabib-cyan); color: var(--etabib-cyan); transform: translateY(-2px); }

/* DUAL PATH */
.dual-path { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 56px; }
.section-title h2 { font-size: clamp(28px, 4vw, 36px); font-weight: 700; margin-bottom: 12px; }
.section-title p { color: var(--text-light); font-size: 16px; max-width: 500px; margin: 0 auto; }
.path-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.path-card {
  background: var(--card); border-radius: 20px; padding: 48px;
  border: 2px solid var(--border); cursor: pointer; transition: all 0.5s;
  position: relative; overflow: hidden; text-decoration: none; color: inherit; display: block;
}
.path-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--etabib-cyan); transform: scaleX(0); transition: all 0.3s;
}
.path-card:hover::before { transform: scaleX(1); }
.path-card:hover { transform: translateY(-8px); border-color: var(--etabib-cyan); box-shadow: 0 20px 60px rgba(0,191,255,0.15); }
.path-card.patient::before { background: var(--etabib-green); }
.path-card.patient:hover { border-color: var(--etabib-green); box-shadow: 0 20px 60px rgba(46,204,113,0.15); }
.path-card.pro::before { background: var(--etabib-purple); }
.path-card.pro:hover { border-color: var(--etabib-purple); box-shadow: 0 20px 60px rgba(123,45,142,0.15); }
.path-icon { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.path-icon img { width: 100%; height: 100%; object-fit: cover; }
.path-card.patient .path-icon { background: rgba(46,204,113,0.1); }
.path-card.pro .path-icon { background: rgba(123,45,142,0.1); }
.path-card h3 { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.path-card p { color: var(--text-light); font-size: 15px; line-height: 1.7; margin-bottom: 24px; }
.path-features { list-style: none; }
.path-features li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--text); }
.path-features li::before {
  content: ''; display: inline-block; width: 20px; height: 20px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232ECC71"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') center/contain no-repeat;
  flex-shrink: 0;
}
.path-card.pro .path-features li::before {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%237B2D8E"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') center/contain no-repeat;
}
.path-cta {
  margin-top: 28px; padding: 12px 24px; border-radius: 12px;
  font-weight: 600; border: none; cursor: pointer; font-size: 14px;
  transition: all 0.3s; width: 100%;
}
.path-card.patient .path-cta { background: var(--etabib-green); color: white; }
.path-card.pro .path-cta { background: var(--etabib-purple); color: white; }
.path-cta:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* PRODUCTS */
.products { padding: 80px 24px; background: linear-gradient(180deg, var(--bg), rgba(0,191,255,0.03)); }
.products-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  background: var(--card); border-radius: 16px; padding: 32px;
  border: 1px solid var(--border); transition: all 0.3s; cursor: pointer;
  position: relative; overflow: hidden; text-decoration: none; color: inherit; display: block;
}
.product-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 0;
  background: var(--etabib-cyan); transition: all 0.3s;
}
.product-card:hover::before { height: 100%; }
.product-card:hover { transform: translateY(-6px); border-color: var(--etabib-cyan); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.prod-icon { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.prod-icon img { width: 100%; height: 100%; object-fit: cover; }
.product-card h4 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.product-card p { color: var(--text-light); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.prod-tag { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-pro { background: rgba(123,45,142,0.1); color: var(--etabib-purple); }
.tag-patient { background: rgba(46,204,113,0.1); color: var(--etabib-green); }
.tag-both { background: rgba(0,191,255,0.1); color: var(--etabib-cyan); }

/* STATS */
.stats { padding: 60px 24px; }
.stats-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item { padding: 24px; }
.stat-item h3 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--etabib-cyan); margin-bottom: 8px; line-height: 1; }
.stat-item p { color: var(--text-light); font-size: 14px; font-weight: 500; }

/* DOWNLOAD CTA */
.download-cta {
  padding: 100px 24px; text-align: center;
  background: linear-gradient(135deg, var(--etabib-dark), #1a2744);
  color: white; position: relative; overflow: hidden;
}
.download-cta::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(0,191,255,0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.download-cta h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 16px; position: relative; z-index: 1; }
.download-cta p { font-size: 16px; opacity: 0.8; max-width: 500px; margin: 0 auto 36px; position: relative; z-index: 1; }
.download-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.dl-btn {
  background: white; color: var(--etabib-dark); padding: 14px 28px;
  border-radius: 12px; font-weight: 600; border: none;
  cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 10px;
  transition: all 0.3s; text-decoration: none;
}
.dl-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.dl-btn.secondary { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
.dl-btn.secondary:hover { background: rgba(255,255,255,0.2); }
.dl-version { margin-top: 24px; font-size: 13px; opacity: 0.6; position: relative; z-index: 1; }

/* BLOG PREVIEW */
.blog-preview { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
  background: var(--card); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); transition: all 0.3s; cursor: pointer;
  text-decoration: none; color: inherit; display: block;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.blog-img { height: 200px; overflow: hidden; position: relative; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; transition: all 0.5s; }
.blog-card:hover .blog-img img { transform: scale(1.05); }
.blog-content { padding: 24px; }
.blog-tag {
  display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px;
  font-weight: 600; background: rgba(0,191,255,0.1); color: var(--etabib-cyan);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.blog-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.blog-meta { color: var(--text-light); font-size: 12px; display: flex; gap: 16px; align-items: center; }

/* FOOTER */
.footer { background: var(--etabib-dark); color: white; padding: 80px 24px 24px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand h3 { font-size: 24px; color: var(--etabib-cyan); margin-bottom: 16px; font-weight: 800; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.7; }
.footer-brand .award {
  margin-top: 16px; padding: 12px 16px; background: rgba(255,255,255,0.05);
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px; color: rgba(255,255,255,0.7);
}
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 20px; color: white; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { display: block; color: rgba(255,255,255,0.5); font-size: 13px; margin-bottom: 12px; transition: all 0.3s; text-decoration: none; }
.footer-col a:hover { color: var(--etabib-cyan); transform: translateX(4px); }
.footer-bottom { max-width: 1200px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; color: rgba(255,255,255,0.4); font-size: 13px; }

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--card); flex-direction: column; padding: 24px; gap: 16px;
    border-bottom: 1px solid var(--border); box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  }
  .nav-links.active { display: flex; }
  .mobile-menu-btn { display: block; }
  .path-cards { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .download-buttons { flex-direction: column; align-items: center; }
  .dl-btn { width: 100%; max-width: 280px; justify-content: center; }
}
@media (max-width: 480px) {
  .hero { padding: 60px 16px 40px; }
  .dual-path { padding: 40px 16px; }
  .path-card { padding: 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
a:focus-visible, button:focus-visible { outline: 2px solid var(--etabib-cyan); outline-offset: 2px; }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--etabib-cyan); color: white; padding: 8px 16px; z-index: 10000; transition: top 0.3s; }
.skip-link:focus { top: 0; }

/* PRINT */
@media print {
  .navbar, .footer, .theme-toggle, .nav-cta, .mobile-menu-btn, .lang-switcher { display: none !important; }
  .hero { margin-top: 0; }
}