/* ── Custom component styles (extends Tailwind CDN) ── */

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

/* Prevent white flash before CSS loads — set background on html immediately */
html {
  scroll-behavior: smooth;
  background: #F8FAFD;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #1A2B3C;
  background: #F8FAFD;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.65;
}

[dir="rtl"] { font-family: 'Noto Sans Arabic', 'Inter', sans-serif; }

/* ── CSS custom properties ── */
:root {
  --c-blue:    #0062A3;
  --c-blue-dk: #004E82;
  --c-blue-dkr:#003A61;
  --c-green:   #00A86B;
  --c-green-dk:#008755;
  --c-dark:    #0D1B2A;
  --c-text:    #1A2B3C;
  --c-muted:   #5A7184;
  --c-border:  #E2EAF0;
  --c-bg:      #F8FAFD;
}

/* ── Section badge ── */
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  padding: 6px 12px; border-radius: 9999px; margin-bottom: 16px;
  background: #EBF5FF; color: #0062A3;
}
.section-badge-green {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  padding: 6px 12px; border-radius: 9999px; margin-bottom: 16px;
  background: #E8F9F2; color: #008755;
}

/* ── Section titles ── */
.section-title {
  font-weight: 800; line-height: 1.15;
  color: #0D1B2A; letter-spacing: -0.02em;
  font-size: clamp(1.75rem, 4vw, 3rem);
}
.section-title.text-white { color: #ffffff; }

.section-subtitle {
  font-size: 1.1rem; line-height: 1.65;
  color: #5A7184; margin-top: 1rem;
}
.section-subtitle.text-white\/70 { color: rgba(255, 255, 255, 0.70); }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 12px;
  font-weight: 600; font-size: 14px; color: white;
  background: #0062A3; border: none; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
}
.btn-primary:hover { background: #004E82; box-shadow: 0 8px 24px rgba(0,98,163,0.3); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-green {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 12px;
  font-weight: 600; font-size: 14px; color: white;
  background: #00A86B; border: none; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
}
.btn-green:hover { background: #008755; box-shadow: 0 8px 24px rgba(0,168,107,0.3); transform: translateY(-2px); }
.btn-green:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 12px;
  font-weight: 600; font-size: 14px; color: white;
  background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-ghost:hover { background: white; color: #0062A3; transform: translateY(-2px); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 12px;
  font-weight: 600; font-size: 14px; color: #0062A3;
  background: transparent; border: 2px solid #0062A3;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-outline:hover { background: #0062A3; color: white; transform: translateY(-2px); }

/* ── Cards ── */
.card {
  background: white; border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,98,163,0.08);
  transition: all 0.3s;
}
.card:hover {
  box-shadow: 0 12px 40px rgba(0,98,163,0.16);
  transform: translateY(-4px);
}

/* ── Nav links ── */
.nav-link {
  font-size: 15.5px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  letter-spacing: 0.015em;
  transition: color 0.22s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #0062A3, #0082CC);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover { color: #0062A3; }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: #0062A3; font-weight: 700; }
.nav-link.active::after { transform: scaleX(1); }
.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.20s ease;
}
.mobile-nav-link:hover { background: #EBF5FF; color: #0062A3; }
.mobile-nav-link.active {
  background: #EBF5FF;
  color: #0062A3;
  box-shadow: inset 3px 0 0 #0062A3;
}

/* ── Admin inputs ── */
.admin-label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 6px; color: #5A7184;
}
.admin-input {
  width: 100%; border: 1px solid #E2EAF0; border-radius: 12px;
  padding: 10px 16px; font-size: 14px;
  background: #F8FAFD; color: #1A2B3C;
  transition: all 0.2s; outline: none;
  font-family: inherit;
}
.admin-input:focus {
  border-color: #0062A3; background: white;
  box-shadow: 0 0 0 3px rgba(0,98,163,0.12);
}
.admin-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px;
  font-weight: 600; font-size: 14px; color: white;
  background: #0062A3; border: none; cursor: pointer; transition: all 0.2s;
}
.admin-btn-primary:hover { background: #004E82; }
.admin-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.admin-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px;
  font-weight: 600; font-size: 14px;
  color: #5A7184; background: white;
  border: 1px solid #E2EAF0; cursor: pointer; transition: all 0.2s;
}
.admin-btn-ghost:hover { border-color: #0062A3; color: #0062A3; }

/* ── Social icons ── */
.social-icon {
  width: 36px; height: 36px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  transition: all 0.2s; text-decoration: none;
}
.social-icon:hover { background: rgba(255,255,255,0.25); color: white; }

/* ── Shadows ── */
.shadow-card  { box-shadow: 0 4px 24px rgba(0,98,163,0.08); }
.shadow-float { box-shadow: 0 8px 32px rgba(0,0,0,0.18); }

/* ── Hero slider ── */
.hero-section {
  position: relative; overflow: hidden;
}
/* All slides share the same grid cell — no position swap, no layout jump */
.hero-slides-wrap {
  display: grid;
}
.hero-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}
/* Dot pattern background */
.dot-pattern {
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Scroll-triggered animations ── */
.animate-on-scroll {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1; transform: translateY(0);
}
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

/* ── Progress bars (Technology section) ── */
.progress-bar {
  height: 6px; border-radius: 4px;
  background: #E2EAF0; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #0062A3, #00A86B);
  width: 0%; transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.animated { width: var(--target-width, 90%); }

/* ── Appointment modal ── */
#appointment-modal.open { display: flex; }
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.animate-modal { animation: modal-in 0.25s ease forwards; }

/* ── Sticky header shadow on scroll ── */
#main-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,98,163,0.12);
  border-bottom-color: transparent;
}

/* ── Admin sidebar ── */
.admin-sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: #5A7184;
  text-decoration: none; transition: all 0.15s;
}
.admin-sidebar-link:hover { background: #EBF5FF; color: #0062A3; }
.admin-sidebar-link.active { background: #EBF5FF; color: #0062A3; font-weight: 600; }
.admin-sidebar-link i { width: 18px; text-align: center; }

/* ── Toggle switch ── */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #E2EAF0; border-radius: 24px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; left: 3px; bottom: 3px;
  transition: 0.3s; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: #00A86B; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Scrollbar — Chrome, Edge, Safari ── */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb {
  background: #0062A3;
  border-radius: 10px;
  border: 2px solid #f1f1f1;   /* creates a visual gap around the thumb */
}
::-webkit-scrollbar-thumb:hover { background: #004E82; }

/* ── Scrollbar — Firefox ── */
* { scrollbar-width: thin; scrollbar-color: #0062A3 #f1f1f1; }

/* ── Scroll-to-top button ── */
.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 98, 163, 0.50);
  filter: brightness(1.15);
}

/* ── Urgences tel button hover ── */
.urgences-tel-btn:hover {
  background: #EBF5FF !important;
  box-shadow: 0 8px 28px rgba(0, 98, 163, 0.3);
}

/* ── Phone ring animation ── */
@keyframes phone-ring {
  0%, 55%, 100% { transform: rotate(0deg); }
  5%            { transform: rotate(-16deg); }
  15%           { transform: rotate(16deg); }
  25%           { transform: rotate(-10deg); }
  35%           { transform: rotate(10deg); }
  45%           { transform: rotate(-5deg); }
}
.phone-ring-icon {
  display: inline-flex;
  animation: phone-ring 3s ease-in-out infinite;
  transform-origin: top center;
}


