:root {
  --hecm-green: #0AA64B;
  --hecm-green-dark: #077A38;
  --hecm-red: #E31E24;
  --hecm-black: #0B0B0B;
  --hecm-white: #FFFFFF;
  --hecm-gray-50: #F7F7F8;
  --hecm-gray-100: #EFEFF1;
  --hecm-gray-700: #3F3F46;
  --hecm-gray-900: #18181B;
  --radius: 18px;
  --shadow: 0 14px 32px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--hecm-gray-900);
  background: var(--hecm-gray-50);
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--hecm-green);
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.topbar a {
  color: rgba(255,255,255,0.95);
}

.brandbar {
  background: #101010;
  border-bottom: 3px solid var(--hecm-green);
}

.navbar-hecm {
  background: #FFF;
}

.navbar-hecm .nav-link,
.navbar-hecm .navbar-brand {
  color: #000 !important;
}

.navbar-hecm .nav-link:hover {
  color: var(--hecm-green) !important;
}

.navbar-hecm .nav-link.active {
  color: var(--hecm-green) !important;
  font-weight: 700;
}

.btn-hecm {
  background: var(--hecm-red);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}

.btn-hecm:hover {
  filter: brightness(0.95);
  color: #fff;
  text-decoration: none;
}

.btn-outline-hecm {
  border: 2px solid rgba(255,255,255,0.9);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}

.btn-outline-hecm:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  background: rgba(10,166,75,0.12);
  color: var(--hecm-green-dark);
}

.hero {
  background-size: cover;
  background-position: center;
  border-bottom-left-radius: calc(var(--radius) + 12px);
  border-bottom-right-radius: calc(var(--radius) + 12px);
  overflow: hidden;
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.60), rgba(0,0,0,0.78));
  padding: 86px 0;
}

.hero h1 {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.hero p {
  color: rgba(255,255,255,0.92);
}

.section-title {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.card-hecm {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}

.card-media {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kpi {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.kpi .value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--hecm-green)!important;
}

.footer {
  background: var(--hecm-red);
  color: rgba(255,255,255,0.78);
  margin-top: 70px;
}

.footer a {
  color: rgba(255,255,255,0.82);
}

.footer a:hover {
  color: #fff;
}

.small-muted {
  color: #6b7280;
}

.breadcrumb-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
}

.hidden {
  display: none !important;
}

.uppercase {
  text-transform: uppercase;
}

/* Table styles for admissions/frais */
.hecm-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border: 1px solid #D1D5DB; /* outer grey border */
}
.hecm-table .cycle-bg {
  background: linear-gradient(90deg, var(--hecm-green), white)
}
.hecm-table thead th {
  color: #fff;
  padding: 12px 14px;
  text-align: center;
  font-weight: 800;
  border-bottom: 2px solid rgba(255,255,255,0.08);
}
.hecm-table th,
.hecm-table td {
  padding: 10px 12px;
  border: 1px solid #E6E7EA; /* cell borders (light grey) */
  vertical-align: middle;
}
.hecm-table tbody tr:nth-child(even) td {
  background: #fbfbfc;
}
.hecm-table tbody tr:last-child td { border-bottom: none; }
.hecm-table td[colspan] {
  font-weight: 700;
  text-align: left;
  background: linear-gradient(90deg, rgba(10,166,75,0.06), transparent);
}
/* .hecm-table td:first-child { width: 6%; } */
/* .hecm-table td:nth-child(2) { width: 34%; } */
.hecm-table td:nth-last-child(-n+2) { text-align: center; }

/* Grid for latest news thumbnails */
.latest-actualites { }
.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.thumb {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.thumb-media { height: 140px; overflow: hidden; }
.thumb-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-body { background: #fff; }
.thumb-title { font-weight: 800; margin-top: 6px; }

/* Limiter les titres d'actualités à 2 lignes */
.thumb-title,
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* Résumé : limiter à 4 lignes */
.card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1rem;
}


/* Equal height cards on contact page */
.equalize-cards > .col-lg-6 { display: flex; }
.equalize-cards .card-hecm { display: flex; flex-direction: column; width: 100%; }
/* Make the main content area grow to fill height */
.equalize-cards .card-hecm > .p-4,
.equalize-cards .card-hecm > form,
.equalize-cards .card-hecm > .overflow-hidden > .p-4 { flex: 1; }
.equalize-cards .card-hecm .card-media { flex: 0 0 auto; }
.equalize-cards .card-hecm iframe { max-width: 100%; height: auto; }
