/* ===========================================
   ISET-Kikwit — Feuille de styles principale
   =========================================== */
:root {
  --primary: #0b3d91;
  --primary-dark: #082b6a;
  --primary-light: #1f5fc7;
  --accent: #f5a623;
  --accent-dark: #d18910;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #1a2233;
  --muted: #5a6478;
  --border: #e3e8f0;
  --success: #1a8754;
  --danger: #c0392b;
  --shadow-sm: 0 2px 8px rgba(11, 61, 145, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 61, 145, 0.12);
  --shadow-lg: 0 20px 48px rgba(11, 61, 145, 0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 880px; }
.hidden { display: none !important; }

/* ============ HEADER ============ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; border: 2px solid var(--primary); }
.brand strong { display: block; font-size: 17px; font-weight: 800; color: var(--primary-dark); }
.brand span { font-size: 12px; color: var(--muted); }

.nav-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-weight: 500;
  color: var(--text); transition: all var(--transition);
}
.nav-links a:hover { background: var(--bg); color: var(--primary); }
.nav-links a.active { background: var(--primary); color: white; }

.menu-toggle {
  display: none; background: none; border: none; font-size: 24px;
  cursor: pointer; color: var(--primary-dark);
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; width: 100%; flex-direction: column; gap: 4px; padding: 12px 0; }
  .nav-links.open { display: flex; }
  .nav-bar { flex-wrap: wrap; }
}

/* ============ HERO + CAROUSEL ============ */
.hero { padding: 0; background: linear-gradient(135deg, #f0f4fb 0%, #e6edf8 100%); }
.carousel {
  position: relative; height: 560px; overflow: hidden;
  background: #000;
}
.carousel-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s ease-in-out;
  background-size: cover; background-position: center;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,43,106,0.15) 0%, rgba(8,43,106,0.75) 100%);
}
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2; padding: 60px 24px 80px; color: white;
  max-width: 1200px; margin: 0 auto;
}
.carousel-caption .badge {
  display: inline-block; background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
  padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
  margin-bottom: 18px; border: 1px solid rgba(255,255,255,0.3);
}
.carousel-caption h1 {
  font-size: clamp(28px, 4.5vw, 48px); font-weight: 800;
  line-height: 1.15; max-width: 820px; margin-bottom: 18px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.carousel-caption p {
  font-size: clamp(15px, 1.6vw, 18px); max-width: 640px;
  margin-bottom: 28px; opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.carousel-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.carousel-controls {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; display: flex; justify-content: space-between;
  padding: 0 20px; z-index: 3; pointer-events: none;
}
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.25); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.4);
  color: white; font-size: 22px; cursor: pointer;
  pointer-events: auto; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: rgba(255,255,255,0.45); transform: scale(1.08); }

.carousel-dots {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 3;
}
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.45); border: none; cursor: pointer;
  transition: all var(--transition);
}
.carousel-dot.active { background: white; width: 28px; border-radius: 5px; }

@media (max-width: 720px) {
  .carousel { height: 480px; }
  .carousel-caption { padding: 40px 20px 70px; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: white; color: var(--primary); border-color: white; }
.btn-secondary:hover { background: var(--bg); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn.full { width: 100%; }

/* ============ SECTIONS ============ */
.section { padding: 70px 0; }
.section.muted { background: var(--surface); }
.section.dark-band { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); color: white; }
.section.dark-band strong { color: var(--accent); display: block; font-size: 18px; margin-bottom: 6px; }
.section.dark-band p { opacity: 0.9; }
.inner-section { padding: 50px 0 0; }

.section-title { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-title.left { text-align: left; margin-left: 0; }
.section-title .eyebrow {
  display: inline-block; background: rgba(11,61,145,0.1); color: var(--primary);
  padding: 4px 14px; border-radius: 20px; font-size: 12px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.section-title h1, .section-title h2 {
  font-size: clamp(26px, 3vw, 36px); font-weight: 800;
  color: var(--primary-dark); margin-bottom: 12px; line-height: 1.2;
}
.section-title p { color: var(--muted); font-size: 16px; }

/* ============ CARDS ============ */
.cards { display: grid; gap: 24px; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards.four { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--surface); padding: 26px; border-radius: var(--radius);
  border: 1px solid var(--border); transition: all var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.card h2, .card h3 { color: var(--primary-dark); margin-bottom: 10px; font-weight: 700; }
.card h2 { font-size: 20px; }
.card h3 { font-size: 17px; }
.card p { color: var(--muted); }
.card.highlight { background: linear-gradient(135deg, #f0f6ff 0%, #fff 100%); border-color: var(--primary-light); }
.card.contact-card { display: flex; flex-direction: column; gap: 12px; }
.card.contact-card .btn { margin-top: auto; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }

/* ============ GALLERY ============ */
.gallery-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery-item {
  aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm);
  position: relative; cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

/* ============ PROGRAMS ============ */
.program-grid {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.program-pill {
  padding: 12px 22px; border-radius: 28px;
  background: white; border: 2px solid var(--primary);
  color: var(--primary); font-weight: 600; font-size: 14px;
  transition: all var(--transition); cursor: default;
}
.program-pill:hover { background: var(--primary); color: white; transform: translateY(-2px); }

/* ============ FORMS ============ */
.form-card {
  background: var(--surface); padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.form-card h2 {
  color: var(--primary-dark); font-size: 20px; margin-bottom: 18px;
  padding-bottom: 12px; border-bottom: 2px solid var(--bg);
}
.form-grid { display: flex; flex-direction: column; gap: 20px; }
.grid.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }

label {
  display: flex; flex-direction: column; gap: 6px;
  font-weight: 500; font-size: 14px; color: var(--text);
}
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 15px;
  background: var(--surface); color: var(--text); transition: all var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,61,145,0.12);
}
textarea { resize: vertical; min-height: 100px; }

.checkbox-row {
  flex-direction: row; align-items: flex-start; gap: 10px;
  font-weight: 400; font-size: 14px;
}
.checkbox-row input { width: auto; margin-top: 4px; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.message-box {
  margin-top: 20px; padding: 16px 20px; border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary); background: #eef4ff;
  color: var(--primary-dark); font-weight: 500;
}
.message-box.success { background: #e7f5ee; border-color: var(--success); color: #0e5a37; }
.message-box.error { background: #fdecea; border-color: var(--danger); color: #8a2620; }
.small-note { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* ============ NEWS ============ */
.news-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 28px;
}
@media (max-width: 900px) {
  .news-layout { grid-template-columns: 1fr; }
}
.news-list { display: flex; flex-direction: column; gap: 18px; }
.news-item {
  background: var(--surface); padding: 22px; border-radius: var(--radius);
  border-left: 4px solid var(--primary); box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.news-item:hover { box-shadow: var(--shadow-md); transform: translateX(2px); }
.news-item h3 { color: var(--primary-dark); font-size: 19px; margin-bottom: 8px; }
.news-item .meta {
  display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px;
  color: var(--muted); margin-bottom: 12px;
}
.news-item .tag {
  background: rgba(11,61,145,0.1); color: var(--primary);
  padding: 2px 10px; border-radius: 12px; font-weight: 600;
}
.news-item .tag.urgent { background: rgba(192,57,43,0.12); color: var(--danger); }
.news-item p { color: var(--text); line-height: 1.7; white-space: pre-wrap; }
.news-item .item-actions { margin-top: 12px; display: flex; gap: 8px; }
.news-item .icon-btn {
  background: transparent; border: 1px solid var(--border); padding: 4px 10px;
  border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted);
}
.news-item .icon-btn:hover { color: var(--danger); border-color: var(--danger); }

.sticky-card { position: sticky; top: 90px; align-self: start; }

/* ============ RESULTS / TABLE ============ */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.honour-card {
  background: linear-gradient(135deg, #fff8e8 0%, #fff 100%);
  border: 1px solid #f5d97a; padding: 22px; border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.honour-card::before {
  content: '🏆'; position: absolute; top: 12px; right: 14px;
  font-size: 28px; opacity: 0.7;
}
.honour-card h3 { color: var(--accent-dark); margin-bottom: 6px; }
.honour-card .matricule { font-size: 12px; color: var(--muted); font-family: 'Courier New', monospace; }
.honour-card .result {
  display: inline-block; background: var(--primary); color: white;
  padding: 4px 12px; border-radius: 14px; font-size: 13px;
  font-weight: 600; margin-top: 10px;
}

.data-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table thead { background: var(--primary); color: white; }
.data-table th { padding: 12px 14px; text-align: left; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover { background: var(--bg); }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

.pill-status {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.pill-status.success { background: #e7f5ee; color: var(--success); }
.pill-status.pending { background: #fff3cd; color: #8a6100; }
.pill-status.danger { background: #fdecea; color: var(--danger); }

/* ============ AUTH GATE ============ */
.auth-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8,43,106,0.92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  background: white; padding: 36px; border-radius: var(--radius-lg);
  max-width: 420px; width: 100%; box-shadow: var(--shadow-lg);
  text-align: center;
}
.auth-card .lock-icon {
  font-size: 48px; color: var(--primary); margin-bottom: 14px;
}
.auth-card h2 { color: var(--primary-dark); margin-bottom: 8px; }
.auth-card p { color: var(--muted); margin-bottom: 24px; font-size: 14px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }

/* ============ ADMIN PANEL ============ */
.tabs {
  display: flex; gap: 6px; border-bottom: 2px solid var(--border);
  margin-bottom: 28px; flex-wrap: wrap;
}
.tab-btn {
  padding: 12px 20px; background: none; border: none; cursor: pointer;
  font-weight: 600; color: var(--muted); font-size: 15px;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.admin-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--primary); color: white; padding: 14px 20px;
  border-radius: var(--radius); margin-bottom: 24px;
}
.admin-bar .user-info { display: flex; align-items: center; gap: 10px; }
.admin-bar .user-info::before {
  content: '👤'; width: 32px; height: 32px;
  background: rgba(255,255,255,0.2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ============ FOOTER ============ */
.site-footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white; padding: 50px 0 24px; margin-top: 60px;
}
.site-footer.compact { padding: 28px 0; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px; margin-bottom: 28px;
}
.footer-grid h3, .footer-grid h4 { color: white; margin-bottom: 14px; }
.footer-grid h3 { font-size: 20px; }
.footer-grid h4 { font-size: 15px; }
.footer-grid a, .footer-grid p, .footer-grid span {
  display: block; color: rgba(255,255,255,0.85); margin-bottom: 6px;
  font-size: 14px;
}
.footer-grid a:hover { color: var(--accent); }
.site-footer .container > p { text-align: center; opacity: 0.8; font-size: 14px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px; text-align: center; font-size: 13px; opacity: 0.75;
}

/* ============ HERO LEGACY ============ */
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
  padding: 80px 24px;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding: 50px 24px; } }
.hero-grid .badge {
  display: inline-block; background: rgba(11,61,145,0.1); color: var(--primary);
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  margin-bottom: 16px;
}
.hero-grid h1 { font-size: clamp(28px, 4vw, 44px); color: var(--primary-dark); margin-bottom: 16px; line-height: 1.15; }
.hero-grid p { color: var(--muted); font-size: 17px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ TOAST ============ */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: white; padding: 14px 20px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); border-left: 4px solid var(--primary);
  min-width: 280px; max-width: 380px;
  animation: slideIn 0.3s ease-out;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast strong { display: block; font-size: 14px; margin-bottom: 2px; color: var(--primary-dark); }
.toast span { font-size: 13px; color: var(--muted); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
