/* ═══════════════════════════════════════════════════
   CHC — CENTRE HOSPITALIER — MAIN STYLES
   Aesthetic: Clinical precision meets warm humanity
   ═══════════════════════════════════════════════════ */

:root {
  --chc-blue: #0a4f8c;
  --chc-blue-light: #1a6bb5;
  --chc-blue-pale: #e8f1fb;
  --chc-red: #c0392b;
  --chc-green: #1a7a4a;
  --chc-orange: #d97706;
  --chc-teal: #0e7490;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }
a { color: var(--chc-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--chc-blue-light); }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
  padding: 0 1.5rem; height: 68px;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--gray-900) !important;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-icon {
  width: 40px; height: 40px;
  background: var(--chc-blue);
  color: white; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-weight: 700;
}
.brand-name {
  display: block; font-family: var(--font-display);
  font-weight: 700; font-size: 1.1rem; color: var(--chc-blue);
  line-height: 1;
}
.brand-sub {
  display: block; font-size: 0.7rem; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.nav-links {
  display: flex; gap: 0.25rem; flex: 1;
}
.nav-link {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-weight: 500; font-size: 0.875rem;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: var(--chc-blue-pale);
  color: var(--chc-blue);
}
.nav-actions { margin-left: auto; }
.btn-nav-staff {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--chc-blue); color: white !important;
  padding: 0.5rem 1.2rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600;
  position: relative; transition: var(--transition);
}
.btn-nav-staff:hover { background: var(--chc-blue-light); transform: translateY(-1px); }
.notif-badge {
  background: #ef4444; color: white;
  font-size: 0.7rem; font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: -6px; right: -6px;
}
.hamburger {
  display: none; background: none; border: none;
  font-size: 1.4rem; cursor: pointer; color: var(--gray-700);
  margin-left: auto;
}
.mobile-menu {
  display: none; flex-direction: column;
  background: white; border-top: 1px solid var(--gray-200);
  padding: 0.5rem;
}
.mobile-menu a {
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  color: var(--gray-700); font-weight: 500;
}
.mobile-menu a:hover { background: var(--chc-blue-pale); color: var(--chc-blue); }
.mobile-menu.open { display: flex; }

/* ── FLASH MESSAGES ── */
.flash-container {
  position: fixed; top: 80px; right: 1.5rem;
  z-index: 999; display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 420px; width: 100%;
}
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem; font-weight: 500;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.flash button { background: none; border: none; font-size: 1.2rem; cursor: pointer; margin-left: 1rem; opacity: 0.7; }
.flash button:hover { opacity: 1; }
.flash-success { background: #dcfce7; color: #166534; border-left: 4px solid #22c55e; }
.flash-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.flash-warning { background: #fef9c3; color: #854d0e; border-left: 4px solid #eab308; }
.flash-info { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--chc-blue) 0%, #1565a0 50%, var(--chc-teal) 100%);
  color: white; padding: 6rem 1.5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  padding: 0.4rem 1rem; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.25rem;
  font-weight: 700;
}
.hero p {
  font-size: 1.1rem; opacity: 0.85; margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
}
.hero-stat {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius); padding: 1.5rem;
  text-align: center;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; display: block;
}
.hero-stat-label { font-size: 0.8rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--chc-blue); color: white; }
.btn-primary:hover { background: var(--chc-blue-light); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(10,79,140,0.35); color: white; }
.btn-secondary { background: white; color: var(--chc-blue); border: 2px solid var(--chc-blue); }
.btn-secondary:hover { background: var(--chc-blue-pale); }
.btn-white { background: white; color: var(--chc-blue); }
.btn-white:hover { background: var(--gray-100); color: var(--chc-blue); }
.btn-outline-white { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); color: white; }
.btn-danger { background: var(--chc-red); color: white; }
.btn-danger:hover { background: #a93226; color: white; }
.btn-success { background: var(--chc-green); color: white; }
.btn-success:hover { background: #145a38; color: white; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ── SECTIONS ── */
.section { padding: 5rem 1.5rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
  display: inline-block;
  background: var(--chc-blue-pale); color: var(--chc-blue);
  padding: 0.35rem 0.9rem; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--gray-900); margin-bottom: 0.75rem; }
.section-desc { color: var(--gray-500); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ── CARDS ── */
.card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
  overflow: hidden; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }
.card-header-strip {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}

/* ── GRID LAYOUTS ── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.5rem; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--gray-700); margin-bottom: 0.4rem; }
.form-control {
  width: 100%; padding: 0.7rem 1rem;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; color: var(--gray-800);
  background: white; transition: var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--chc-blue);
  box-shadow: 0 0 0 3px rgba(10,79,140,0.1);
}
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-card {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 2.5rem;
  border: 1px solid var(--gray-200);
}
.form-title {
  font-size: 1.5rem; font-weight: 700; color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.form-subtitle { color: var(--gray-500); margin-bottom: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── TABLES ── */
.table-wrapper {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
  overflow: hidden;
}
.table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  background: white;
}
.table-title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.table-scroll { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem;
}
thead { background: var(--gray-50); }
th {
  text-align: left; padding: 0.9rem 1.2rem;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.3rem 0.75rem; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; white-space: nowrap;
}
.badge-attente { background: #fef9c3; color: #854d0e; }
.badge-pris { background: #dbeafe; color: #1d4ed8; }
.badge-termine { background: #dcfce7; color: #166534; }
.badge-visible { background: #dcfce7; color: #166534; }
.badge-admin { background: linear-gradient(135deg, var(--chc-blue), var(--chc-teal)); color: white; }
.badge-employe { background: var(--chc-blue-pale); color: var(--chc-blue); }
/* Vehicle statuses */
.badge-disponible { background: #dcfce7; color: #166534; }
.badge-indisponible { background: #fee2e2; color: #991b1b; }
.badge-en-route { background: #dbeafe; color: #1d4ed8; }
.badge-sur-intervention { background: #fef9c3; color: #854d0e; }
.badge-retour-intervention { background: #f3e8ff; color: #7e22ce; }
.badge-inventaire { background: #f1f5f9; color: #475569; }
.badge-exercice { background: #e0f2fe; color: #0369a1; }

/* ── PAGE HEADER ── */
.page-header {
  background: white; border-bottom: 1px solid var(--gray-200);
  padding: 2.5rem 1.5rem 2rem;
}
.page-header-inner { max-width: 1200px; margin: 0 auto; }
.page-header h2 { font-size: 1.75rem; color: var(--gray-900); margin-bottom: 0.25rem; }
.page-header p { color: var(--gray-500); }
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: var(--gray-400); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--chc-blue); }
.breadcrumb span { color: var(--gray-300); }

/* ── NEWS CARDS ── */
.news-card { overflow: hidden; }
.news-date { font-size: 0.75rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.news-title { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.75rem; line-height: 1.4; }
.news-excerpt { color: var(--gray-500); font-size: 0.875rem; line-height: 1.6; }
.news-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; }
.news-author { font-size: 0.8rem; color: var(--gray-400); }

/* ── SERVICES SECTION ── */
.service-card {
  background: white; border-radius: var(--radius);
  padding: 2rem; text-align: center;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--chc-blue); }
.service-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--chc-blue-pale); color: var(--chc-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 1.25rem;
}
.service-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--gray-900); }
.service-card p { font-size: 0.875rem; color: var(--gray-500); line-height: 1.6; margin-bottom: 1.25rem; }

/* ── REVIEWS ── */
.review-card {
  background: white; border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200); position: relative;
}
.review-stars { color: #f59e0b; font-size: 1.1rem; margin-bottom: 0.75rem; }
.review-text { color: var(--gray-600); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1rem; font-style: italic; }
.review-author { font-weight: 600; font-size: 0.8rem; color: var(--gray-500); }
.review-date { font-size: 0.75rem; color: var(--gray-400); }

/* ── FILTER BAR ── */
.filter-bar {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  align-items: center;
}
.filter-bar .form-control { width: auto; min-width: 140px; padding: 0.55rem 0.9rem; }
.filter-bar input { min-width: 220px; }

/* ── FOOTER ── */
.footer {
  background: var(--gray-900); color: white; padding: 3rem 1.5rem;
  margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.brand-icon-sm {
  width: 32px; height: 32px; background: var(--chc-blue);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--gray-400); font-size: 0.875rem; }
.footer-links a:hover { color: white; }
.footer-copy { color: var(--gray-500); font-size: 0.8rem; }

/* ── UTILS ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { font-size: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 3rem 1rem; }
  .section { padding: 3rem 1rem; }
  .form-card { padding: 1.5rem; }
  .flash-container { right: 0.5rem; left: 0.5rem; }
}
