/* ================================================================
   FLSH Saïs Fès — Unified Design System v2.0
   Faculté des Lettres et Sciences Humaines Saïs-Fès
   ================================================================ */

/* ── Google Fonts ───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Almarai:wght@400;700;800&family=Playfair+Display:wght@700;800&display=swap');

/* ── CSS Custom Properties ──────────────────────────────────────── */
:root {
  --c-primary:    #0a2352;
  --c-primary-2:  #163a73;
  --c-primary-3:  #1a4a8a;
  --c-gold:       #c9a23a;
  --c-gold-light: #f0d98b;
  --c-sky:        #0ea5d8;
  --c-sky-light:  #e0f5fd;
  --c-sky-mid:    #b8e8f7;
  --c-teal:       #10b981;
  --c-amber:      #f59e0b;
  --c-violet:     #8b5cf6;
  --c-rose:       #f43f5e;
  --c-ink:        #0f172a;
  --c-muted:      #475569;
  --c-border:     #e2e8f0;
  --c-bg:         #f8faff;
  --c-card:       #ffffff;
  --c-card-hover: #f4f8ff;

  --shadow-xs: 0 1px 4px rgba(10,35,82,.05);
  --shadow-sm: 0 2px 10px rgba(10,35,82,.07);
  --shadow-md: 0 8px 24px rgba(10,35,82,.10);
  --shadow-lg: 0 16px 40px rgba(10,35,82,.13);
  --shadow-xl: 0 24px 56px rgba(10,35,82,.17);

  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-pill: 999px;

  --t-fast: all 0.18s ease;
  --t-base: all 0.25s ease;
  --t-slow: all 0.4s ease;

  --header-h: 96px;
  --topbar-h: 44px;
}

/* ── Reset & Global RTL Base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  direction: rtl;
}
body {
  font-family: 'Almarai', 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--t-fast); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

[lang="ar"], [dir="rtl"] {
  font-family: 'Almarai', 'Arial', sans-serif;
  direction: rtl;
  text-align: right;
}
h1, h2, h3, h4 {
  font-family: 'Almarai', 'Playfair Display', serif;
  color: var(--c-primary);
  line-height: 1.4;
  text-align: right;
}
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3,
[dir="rtl"]  h1, [dir="rtl"]  h2, [dir="rtl"]  h3 {
  font-family: 'Almarai', sans-serif;
  font-weight: 800;
  line-height: 1.5;
  text-align: right;
}
p { margin-bottom: 1em; text-align: right; }

/* ── Layout Utilities ───────────────────────────────────────────── */
.container { width: min(1200px, 92vw); margin-inline: auto; }
.section { padding: 64px 0; }
.section-white { background: #fff; }
.section-soft  { background: var(--c-bg); }
.mt-6 { margin-top: 48px; }
.mt-4 { margin-top: 32px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── Section Titles ─────────────────────────────────────────────── */
.section-title {
  position: relative;
  display: inline-block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: 40px;
  font-family: 'Almarai', 'Playfair Display', serif;
  text-align: right;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  left: auto;
  width: 70px;
  height: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(to left, var(--c-sky), var(--c-gold));
}
.section-title-center {
  display: block;
  text-align: center;
}
.section-title-center::after {
  margin: 10px auto 0;
  width: 80px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(90deg, var(--c-primary) 0%, #11346e 100%);
  color: #eaf3ff;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 6px 0;
  flex-wrap: wrap;
}
.topbar-brand {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  opacity: .88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}
.top-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.top-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.15);
  color: #eaf3ff;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--t-base);
  background: rgba(255,255,255,.06);
  font-family: 'Almarai', sans-serif;
}
.top-links a:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}
.top-links .top-cta { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); }

/* ── Site Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #ffffff;
  border-bottom: 1px solid rgba(226,232,240,.8);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(10,35,82,.12);
  border-color: rgba(226,232,240,1);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
}
.brand img {
  height: 86px;
  width: auto;
  max-height: 96px;
  transition: opacity .2s, transform .2s ease;
}
.brand:hover img {
  opacity: .92;
  transform: scale(1.02);
}

/* ── Navigation ─────────────────────────────────────────────────── */
.main-nav { display: flex; align-items: center; }
.nav-drawer-header { display: none; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; }

.nav-link {
  display: block;
  padding: 8px 11px;
  font-family: 'Almarai', 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  color: var(--c-primary);
  border-radius: var(--r-sm);
  position: relative;
  transition: var(--t-base);
  white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 10px; right: 10px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.nav-link:hover { color: var(--c-primary-3); background: rgba(14,165,216,.07); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.dd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  font-family: 'Almarai', 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  color: var(--c-primary);
  background: none;
  border: none;
  border-radius: var(--r-sm);
  transition: var(--t-base);
  white-space: nowrap;
  cursor: pointer;
}
.dd-toggle:hover { color: var(--c-primary-3); background: rgba(14,165,216,.07); }
.chev { font-size: .75rem; transition: transform .25s ease; display: inline-block; }
.dd-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(.98);
  transform-origin: top right;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 200;
}
.has-dd.open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.dropdown li + li { border-top: 1px solid #f0f4f8; }
.dropdown a {
  display: block;
  padding: 10px 14px;
  font-family: 'Almarai', 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  color: var(--c-primary);
  border-radius: var(--r-sm);
  transition: var(--t-base);
}
.dropdown a:hover { background: var(--c-sky-light); color: var(--c-primary-3); padding-inline-end: 18px; }

/* ── Burger ─────────────────────────────────────────────────────── */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
  background: none;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  transition: var(--t-base);
  cursor: pointer;
}
.burger:hover { background: var(--c-bg); border-color: var(--c-primary); }
.burger-line {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  transform-origin: center;
}
.burger[aria-expanded="true"] .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded="true"] .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Nav Overlay ────────────────────────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(10,35,82,.6);
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.nav-overlay.active { display: block; opacity: 1; pointer-events: auto; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; line-height: 0; }
.hero-bg {
  width: 100%;
  height: clamp(200px, 32vw, 520px);
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 10s ease;
}
.hero:hover .hero-bg { transform: scale(1.04); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,35,82,.52) 0%, rgba(10,35,82,.22) 100%);
  z-index: 1;
}

/* ── Page Hero ──────────────────────────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(160px, 20vw, 280px);
}
.page-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
  transition: transform 10s ease;
}
.page-hero:hover .page-hero-bg { transform: scale(1.04); }
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(10,35,82,.82) 0%, rgba(10,35,82,.5) 100%);
  z-index: 1;
}
.page-hero-content {
  position: relative; z-index: 2;
  padding: 32px 0; color: #fff;
  animation: fadeInUp .6s ease both;
}
.page-hero-content h1 {
  font-family: 'Almarai', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 800; color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 2px 14px rgba(0,0,0,.3);
  line-height: 1.35;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .84rem; color: rgba(255,255,255,.78);
  font-family: 'Almarai', sans-serif; flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.82); }
.breadcrumb a:hover { color: var(--c-gold-light); }
.breadcrumb-sep { opacity: .5; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px; border-radius: var(--r-md);
  font-family: 'Almarai', 'Inter', sans-serif; font-weight: 800;
  font-size: .92rem; letter-spacing: .2px; border: 2px solid transparent;
  cursor: pointer; transition: var(--t-base); text-decoration: none;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-2); border-color: var(--c-primary-2); }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: transparent; }
.btn-ghost:hover { background: var(--c-bg); border-color: var(--c-border); }
.btn-gold { background: var(--c-gold); color: var(--c-primary); border-color: var(--c-gold); }
.btn-gold:hover { background: #b8911f; border-color: #b8911f; color: #fff; }

/* ── Filter Buttons ─────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-pill);
  border: 1.5px solid var(--c-border); background: #fff;
  color: var(--c-primary); font-family: 'Almarai', 'Inter', sans-serif;
  font-weight: 700; font-size: .85rem; cursor: pointer;
  transition: var(--t-base); box-shadow: var(--shadow-xs);
}
.filter-btn:hover { border-color: var(--c-sky); background: var(--c-sky-light); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.filter-btn.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); box-shadow: var(--shadow-md); }

/* ── News Cards ──────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: stretch; }
.news-grid-full { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: stretch; }

.news-card {
  position: relative; background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column;
  overflow: hidden; transition: var(--t-base); box-shadow: var(--shadow-sm);
}
.news-card::before {
  content: ''; position: absolute;
  top: 0; bottom: 0; right: 0; left: auto;
  width: 4px; background: linear-gradient(180deg, var(--c-sky), var(--c-gold));
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(14,165,216,.25); }
.news-card .tag {
  display: inline-block; align-self: flex-start;
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 800; letter-spacing: .4px;
  text-transform: uppercase; background: var(--c-sky-light); color: #0b4f78;
  border: 1px solid rgba(14,165,216,.2); margin-bottom: 12px;
  font-family: 'Inter', 'Almarai', sans-serif;
}
/* Category tag colors */
.news-card .tag.tag-student   { background: #d1fae5; color: #065f46; border-color: rgba(16,185,129,.2); }
.news-card .tag.tag-research  { background: #e0f5fd; color: #0b4f78; border-color: rgba(14,165,216,.2); }
.news-card .tag.tag-phd       { background: #dcfce7; color: #15803d; border-color: rgba(34,197,94,.2); }
.news-card .tag.tag-mobility  { background: #ede9fe; color: #4b2bb6; border-color: rgba(139,92,246,.2); }
.news-card .tag.tag-employment{ background: #fef3c7; color: #7a4a00; border-color: rgba(245,158,11,.2); }

.news-title--lg { font-family: 'Almarai','Inter',sans-serif; font-size:1rem; font-weight:800; color:var(--c-primary); line-height:1.65; margin-bottom:8px; }
.news-subtitle--md { font-family: 'Almarai','Inter',sans-serif; font-size:.88rem; color:var(--c-muted); line-height:1.75; flex:1; margin-bottom:14px; }
.news-link--sm {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; color: var(--c-primary);
  text-decoration: none; transition: gap .2s ease, color .2s ease;
  font-family: 'Almarai','Inter',sans-serif; padding: 6px 0;
  border-bottom: 1.5px solid transparent;
}
.news-link--sm:hover { gap: 10px; color: var(--c-gold); border-bottom-color: var(--c-gold); }
.news-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.news-actions a { font-family: 'Almarai',sans-serif; font-size: .78rem; font-weight: 800; color: var(--c-primary-3); transition: var(--t-fast); }
.news-actions a:hover { color: var(--c-gold); text-decoration: underline; }

/* ── All News CTA ───────────────────────────────────────────────── */
.all-news-cta-wrap { text-align: center; margin-top: 40px; }
.all-news-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; background: var(--c-primary); color: #fff;
  border-radius: var(--r-md); font-family: 'Almarai',sans-serif;
  font-weight: 800; font-size: 1rem; text-decoration: none;
  transition: var(--t-base); box-shadow: var(--shadow-md);
}
.all-news-cta:hover { background: var(--c-primary-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ── Program Cards ───────────────────────────────────────────────── */
.programs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.program-card {
  display: block; background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 18px; text-decoration: none;
  color: var(--c-primary); position: relative;
  border-inline-start: 4px solid transparent;
  transition: var(--t-base); box-shadow: var(--shadow-xs);
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); background: var(--c-card-hover); }
.program-card[data-type="licence"]  { border-inline-start-color: var(--c-sky); }
.program-card[data-type="licencex"] { border-inline-start-color: var(--c-amber); }
.program-card[data-type="master"]   { border-inline-start-color: var(--c-teal); }
.program-card[data-type="masterx"]  { border-inline-start-color: var(--c-violet); }
.program-tag     { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 800; margin-bottom: 8px; font-family: 'Almarai','Inter',sans-serif; background: #e0f5fd; color: #0a3a57; }
.program-tag-x   { background: #fef3c7; color: #7a4a00; }
.program-tag-m   { background: #d1fae5; color: #0b6b4e; }
.program-tag-xm  { background: #ede9fe; color: #4b2bb6; }
.program-card h3 { font-family: 'Almarai','Inter',sans-serif; font-size: .95rem; font-weight: 700; line-height: 1.55; margin: 0; color: var(--c-primary); }

/* ── Dept Cards ──────────────────────────────────────────────────── */
.depts-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.dept-card {
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 26px 18px; border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--c-primary-2) 0%, var(--c-primary-3) 100%);
  color: #fff; font-family: 'Almarai',sans-serif; font-size: 1.05rem;
  font-weight: 800; text-decoration: none; position: relative;
  overflow: hidden; transition: var(--t-base); box-shadow: var(--shadow-md); min-height: 88px;
}
.dept-card::before {
  content: ''; position: absolute; top: -45px; right: -45px;
  width: 140px; height: 140px;
  background: radial-gradient(closest-side, rgba(255,255,255,.22), transparent);
  border-radius: 50%; pointer-events: none;
}
.dept-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); filter: brightness(1.06); }

/* ── Digital Platform Cards ──────────────────────────────────────── */
.cards-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }
.digital-platform-card {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  padding: 24px 14px; min-height: 140px;
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); text-decoration: none; color: var(--c-primary);
  box-shadow: var(--shadow-sm); overflow: hidden; transition: var(--t-base);
}
.digital-platform-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0;
  height: 3px; background: linear-gradient(90deg, var(--c-sky), var(--c-gold));
  transform: scaleX(.3); transform-origin: center; transition: transform .25s ease;
}
.digital-platform-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(14,165,216,.3); }
.digital-platform-card:hover::before { transform: scaleX(1); }
.platform-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #f0f6ff 0%, #fdfbf3 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: inset 0 0 0 1px rgba(14,165,216,.15); flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
}
.platform-icon img, .platform-icon svg {
  width: 40px; height: 40px; object-fit: contain;
  transition: transform 0.25s ease;
}
.digital-platform-card:hover .platform-icon {
  transform: scale(1.08) rotate(2deg);
  box-shadow: inset 0 0 0 1.5px var(--c-gold), 0 6px 18px rgba(201,162,58,.22);
}
.digital-platform-card:hover .platform-icon img,
.digital-platform-card:hover .platform-icon svg {
  transform: scale(1.05);
}
.platform-name { font-family: 'Almarai',sans-serif; font-size: .92rem; font-weight: 800; text-align: center; color: var(--c-primary); line-height: 1.4; }
.platform-arrow {
  position: absolute; bottom: 11px; inset-inline-end: 13px;
  font-size: 14px; color: var(--c-gold); opacity: .7; transition: transform .25s ease;
}
.digital-platform-card:hover .platform-arrow { transform: translateX(-3px); }

/* ── Unified Academic Formation Cycle Tiles ────────────────────── */
.formation-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  direction: rtl;
}
.formation-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 14px 20px;
  min-height: 155px;
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--c-primary);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--t-base);
  direction: rtl;
  text-align: center;
}
.formation-tile::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to left, var(--c-gold), var(--c-sky));
  transform: scaleX(0.35);
  transform-origin: center;
  transition: transform 0.28s ease;
}
.formation-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 216, 0.45);
  box-shadow: var(--shadow-lg);
  background: var(--c-card-hover);
}
.formation-tile:hover::before {
  transform: scaleX(1);
}
.formation-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9f8fd, #f8f3df);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 216, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}
.formation-tile:hover .formation-tile-icon {
  transform: scale(1.1);
  box-shadow: inset 0 0 0 1.5px var(--c-gold);
}
.formation-tile-title {
  font-family: 'Almarai', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1.4;
  margin: 0;
}
.formation-tile-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--c-sky-light);
  color: #0b4f78;
  font-family: 'Almarai', sans-serif;
}
.formation-tile-arrow {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 14px;
  font-size: 14px;
  color: var(--c-gold);
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.formation-tile:hover .formation-tile-arrow {
  transform: translateX(-4px);
  opacity: 1;
}

/* ── Data Table ──────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-family: 'Almarai','Inter',sans-serif; font-size: .9rem; background: #fff; direction: rtl; text-align: right; }
.data-table th { background: var(--c-primary); color: #fff; padding: 14px 16px; text-align: right; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-top: 1px solid var(--c-border); text-align: right; transition: background .2s; }
.data-table tbody tr:hover td { background: var(--c-sky-light); }
.badge-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; background: var(--c-primary); color: #fff;
  border-radius: var(--r-pill); font-size: .8rem; font-weight: 700; transition: var(--t-base);
}
.badge-link:hover { background: var(--c-primary-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ── Appel d'Offres ──────────────────────────────────────────────── */
.ao-block { margin-bottom: 28px; border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--t-base); direction: rtl; text-align: right; }
.ao-block:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ao-block-title { background: linear-gradient(90deg, var(--c-primary), var(--c-primary-3)); color: #fff; text-align: center; font-family: 'Almarai','Inter',sans-serif; font-size: 1.08rem; font-weight: 800; padding: 16px 20px; margin: 0; }
.download-link { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; background: var(--c-primary); color: #fff; border-radius: var(--r-pill); font-size: .82rem; font-weight: 700; transition: var(--t-base); }
.download-link:hover { background: var(--c-primary-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ── Dean Section ────────────────────────────────────────────────── */
.dean-section { display: flex; gap: 36px; align-items: flex-start; direction: rtl; }
.dean-photo-wrap { flex-shrink: 0; text-align: center; }
.dean-photo { width: 200px; height: auto; border-radius: var(--r-md); box-shadow: var(--shadow-md); transition: var(--t-base); }
.dean-photo:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.dean-name { font-family: 'Almarai',sans-serif; font-weight: 700; margin-top: 10px; font-size: .9rem; color: var(--c-primary); text-align: center; }
.dean-quote { flex: 1; font-family: 'Almarai',sans-serif; font-size: 1.05rem; line-height: 2.1; color: var(--c-ink); text-align: justify; border-right: 4px solid var(--c-gold); border-left: none; padding-right: 24px; padding-left: 0; direction: rtl; }
.dean-quote p { font-family: 'Almarai',sans-serif; font-size: 1.05rem; line-height: 2.1; margin: 0; text-align: justify; }

/* ── Video ───────────────────────────────────────────────────────── */
.video-wrapper { position: relative; width: 100%; max-width: 900px; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16/9; }
.video-wrapper video { width: 100%; height: 100%; object-fit: cover; }

/* ── Announcement Filters ────────────────────────────────────────── */
.announcement-filters { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin: 0 auto 32px; padding: 8px; direction: rtl; }
.announcement-filter {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  padding: 7px 14px; border: 1.5px solid var(--c-border); border-radius: var(--r-pill);
  background: #fff; color: var(--c-primary); font-family: 'Almarai','Inter',sans-serif;
  font-size: .82rem; font-weight: 800; cursor: pointer; box-shadow: var(--shadow-xs); transition: var(--t-base);
}
.announcement-filter:hover { transform: translateY(-2px); border-color: var(--c-sky); box-shadow: var(--shadow-md); background: var(--c-sky-light); }
.announcement-filter.is-active,
.announcement-filter.active { color: #fff; border-color: var(--c-primary); background: linear-gradient(135deg, var(--c-primary), var(--c-primary-3)); box-shadow: var(--shadow-md); }
.filter-count { min-width: 20px; height: 20px; padding: 2px 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill); background: rgba(14,165,216,.12); color: var(--c-primary); font-size: .68rem; }
.announcement-filter.is-active .filter-count,
.announcement-filter.active .filter-count { background: rgba(255,255,255,.2); color: #fff; }

/* ── Announcement Quick Search ──────────────────────────────────── */
.news-search-container {
  max-width: 660px;
  margin: 0 auto 28px;
  position: relative;
  direction: rtl;
}
.news-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--c-border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  transition: var(--t-base);
}
.news-search-box:focus-within {
  border-color: var(--c-sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 216, 0.15), var(--shadow-md);
  transform: translateY(-2px);
}
.news-search-icon {
  position: absolute;
  right: 18px;
  font-size: 1.15rem;
  color: var(--c-primary);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.news-search-input {
  width: 100%;
  height: 52px;
  padding: 0 52px 0 44px;
  border: none;
  background: transparent;
  font-family: 'Almarai', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--c-ink);
  outline: none;
  border-radius: var(--r-pill);
  direction: rtl;
}
.news-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.news-search-clear {
  position: absolute;
  left: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--t-fast);
}
.news-search-clear:hover {
  background: #cbd5e1;
  color: #0f172a;
  transform: scale(1.08);
}
.news-count {
  font-family: 'Almarai', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-muted);
  text-align: center;
  margin-bottom: 24px;
}
.news-count strong { color: var(--c-primary); }
.news-count em { font-style: normal; color: var(--c-gold); }
mark.search-hl {
  background: #fef08a;
  color: #854d0e;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: inherit;
}
.no-search-results {
  grid-column: 1 / -1;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 48px 24px;
  box-shadow: var(--shadow-sm);
}
.no-search-results h3 {
  font-family: 'Almarai', sans-serif;
  font-size: 1.25rem;
  color: var(--c-primary);
  margin-bottom: 8px;
}
.no-search-results p {
  font-family: 'Almarai', sans-serif;
  font-size: 0.95rem;
  color: var(--c-muted);
  margin-bottom: 20px;
}

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination, .news-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 36px; direction: rtl; }
.page-btn, .page-number, .news-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; min-height: 42px; padding: 8px 14px; border-radius: var(--r-sm);
  font-family: 'Almarai','Inter',sans-serif; font-weight: 700; font-size: .88rem;
  transition: var(--t-base); cursor: pointer;
}
.page-btn, .news-page-btn { background: var(--c-primary); color: #fff; border: none; }
.page-btn:hover:not(:disabled), .news-page-btn:hover:not(:disabled) { background: var(--c-primary-2); transform: translateY(-2px); }
.page-btn:disabled, .news-page-btn:disabled { background: var(--c-border); color: var(--c-muted); cursor: not-allowed; }
.page-number { background: #fff; border: 1.5px solid var(--c-border); color: var(--c-primary); }
.page-number:hover, .page-number.active, .news-page-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ── Doctorat Box ────────────────────────────────────────────────── */
.doctorat-box { background: #f1f5ff; border: 1.5px solid #dfe8ff; border-radius: var(--r-md); padding: 20px 24px; font-family: 'Almarai',sans-serif; font-size: 1rem; line-height: 1.9; direction: rtl; text-align: right; }
.doctorat-box a { color: var(--c-primary-3); font-weight: 700; text-decoration: underline; }

/* ── Docs List ───────────────────────────────────────────────────── */
.docs-list { counter-reset: doc-counter; padding: 0; margin: 0 0 32px; direction: rtl; text-align: right; }
.docs-list > li {
  counter-increment: doc-counter;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--c-border);
  font-family: 'Almarai',sans-serif; font-size: 1rem; line-height: 1.8;
  color: var(--c-ink); direction: rtl; text-align: right;
}
.docs-list > li::before {
  content: counter(doc-counter);
  min-width: 32px; height: 32px; background: var(--c-primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; flex-shrink: 0; font-family: 'Inter',sans-serif;
}
.docs-list ul { margin-top: 8px; padding-right: 16px; list-style: disc; direction: rtl; text-align: right; }
.docs-list ul li { border-bottom: none; padding: 4px 0; display: list-item; }
.docs-list ul li::before { display: none; }

/* ── Statistics Section (الكلية في أرقام) ─────────────────────────── */
.section-stats {
  background: linear-gradient(180deg, #f8faff 0%, #edf3fc 100%);
  position: relative;
  overflow: hidden;
  padding: 85px 0 95px;
  direction: rtl;
}

.section-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 216, 0.35), transparent);
}

.section-stats::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 58, 0.3), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 42px 28px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 32px rgba(10, 35, 82, 0.06);
  border: 1px solid rgba(14, 165, 216, 0.12);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--stat-c1, #0ea5d8), var(--stat-c2, #2563eb));
  opacity: 0.85;
  transition: height 0.3s ease, opacity 0.3s ease;
}

.stat-card[data-stat="students"] {
  --stat-c1: #0ea5d8;
  --stat-c2: #1d4ed8;
  --stat-glow: rgba(14, 165, 216, 0.25);
}

.stat-card[data-stat="professors"] {
  --stat-c1: #f59e0b;
  --stat-c2: #c9a23a;
  --stat-glow: rgba(201, 162, 58, 0.25);
}

.stat-card[data-stat="admin"] {
  --stat-c1: #10b981;
  --stat-c2: #059669;
  --stat-glow: rgba(16, 185, 129, 0.25);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 48px var(--stat-glow, rgba(10, 35, 82, 0.12));
  border-color: rgba(14, 165, 216, 0.35);
}

.stat-card:hover::after {
  height: 6px;
  opacity: 1;
}

/* ── Circular Progress & Animation ───────────────────────────────── */
.stat-circle-container {
  position: relative;
  width: 172px;
  height: 172px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-svg-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.stat-circle-track {
  fill: none;
  stroke: #ebf1fa;
  stroke-width: 9;
}

.stat-circle-progress {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 2.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Orbit dashed ring */
.stat-circle-container::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(10, 35, 82, 0.1);
  pointer-events: none;
  animation: statOrbitSpin 30s linear infinite;
}

.stat-card:hover .stat-circle-container::before {
  border-color: var(--stat-c1, rgba(14, 165, 216, 0.35));
  animation-duration: 15s;
}

@keyframes statOrbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.stat-circle-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  transition: transform 0.35s ease, background-color 0.35s ease;
}

.stat-card:hover .stat-icon-wrap {
  transform: scale(1.15) rotate(5deg);
}

.stat-icon-blue {
  background: rgba(14, 165, 216, 0.12);
  color: #0284c7;
}

.stat-icon-gold {
  background: rgba(201, 162, 58, 0.14);
  color: #b48516;
}

.stat-icon-teal {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.stat-counter-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  direction: ltr;
}

.stat-number {
  font-family: 'Almarai', 'Inter', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-plus {
  font-family: 'Almarai', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--stat-c1, var(--c-gold));
  line-height: 1;
}

.stat-meta {
  margin-top: 6px;
}

.stat-label {
  font-family: 'Almarai', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: 8px;
}

.stat-desc {
  font-family: 'Almarai', sans-serif;
  font-size: 0.88rem;
  color: var(--c-muted);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .stat-card:last-child {
    grid-column: span 2;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .section-stats {
    padding: 60px 0 70px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .stat-card:last-child {
    grid-column: auto;
  }
  .stat-circle-container {
    width: 154px;
    height: 154px;
  }
  .stat-number {
    font-size: 1.95rem;
  }
}

/* ── Footer 100% Right-to-Left (RTL) ─────────────────────────────── */
.site-footer {
  background: linear-gradient(175deg, #0d2b60 0%, var(--c-primary) 100%);
  color: #c8d9f5;
  position: relative;
  margin-top: auto;
  direction: rtl;
  text-align: right;
}
.footer-wave { line-height: 0; margin-bottom: -2px; }
.footer-wave svg { display: block; width: 100%; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding: 50px 0 42px;
  direction: rtl;
  text-align: right;
}
.footer-col {
  text-align: right;
  direction: rtl;
}
.footer-logo-wrap {
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.footer-logo-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}
.footer-logo {
  max-height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}
.footer-desc {
  font-family: 'Almarai', sans-serif;
  font-size: .84rem;
  line-height: 2;
  color: rgba(200,217,245,.75);
  margin: 0;
  text-align: justify;
  direction: rtl;
}
.footer-heading {
  font-family: 'Almarai', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
  text-align: right;
  direction: rtl;
}
.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: auto;
  width: 50px;
  height: 3px;
  background: linear-gradient(to left, var(--c-gold), var(--c-sky));
  border-radius: var(--r-pill);
}
.footer-list {
  padding: 0;
  margin: 0;
  text-align: right;
  direction: rtl;
}
.footer-list li + li { margin-top: 11px; }
.footer-list a {
  font-family: 'Almarai', sans-serif;
  font-size: .88rem;
  color: rgba(200,217,245,.8);
  transition: var(--t-fast);
  display: inline-block;
  text-align: right;
  direction: rtl;
}
.footer-list a:hover {
  color: var(--c-gold-light);
  transform: translateX(-5px);
}
.footer-social-list {
  padding: 0;
  margin: 0;
  text-align: right;
  direction: rtl;
}
.footer-social-list li + li { margin-top: 12px; }
.social-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-pill);
  color: rgba(200,217,245,.9);
  font-family: 'Almarai', sans-serif;
  font-size: .84rem;
  font-weight: 700;
  transition: var(--t-base);
  direction: rtl;
}
.social-link:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
  transform: translateY(-2px);
  border-color: rgba(201,162,58,.5);
  box-shadow: var(--shadow-sm);
}
.social-link img,
.social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  border-radius: 50%;
  object-fit: contain;
}
.footer-contact-list {
  padding: 0;
  margin: 0;
  text-align: right;
  direction: rtl;
}
.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: 'Almarai', sans-serif;
  font-size: .88rem;
  color: rgba(200,217,245,.85);
  direction: rtl;
  text-align: right;
}
.contact-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  color: var(--c-gold-light);
}
.footer-contact-list a {
  color: rgba(200,217,245,.85);
  transition: color .2s;
  direction: ltr;
  unicode-bidi: embed;
}
.footer-contact-list a:hover { color: var(--c-gold-light); }
.sub-footer {
  background: rgba(0,0,0,.25);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
  text-align: center;
  direction: rtl;
}
.sub-footer p {
  font-family: 'Almarai', 'Inter', sans-serif;
  font-size: .84rem;
  color: rgba(200,217,245,.65);
  margin: 0;
  text-align: center;
}

/* ── Scroll Reveal ───────────────────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }

/* ── Keyframes ───────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes announcementAppear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.announcement-visible { animation: announcementAppear .28s ease both; }

@keyframes ddSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sectionPulse {
  0%   { background-color: transparent; }
  25%  { background-color: rgba(201, 162, 58, 0.18); }
  100% { background-color: transparent; }
}

.section-highlight {
  animation: sectionPulse 1.4s ease-out;
  border-radius: var(--r-sm);
}

/* ── Formation Cycle Sections & In-page Anchors ───────────────── */
.formation-cycle-section {
  margin-bottom: 52px;
  scroll-margin-top: calc(var(--header-h) + 26px);
}
#licence, #licencex, #master, #masterx, #doctorat,
.section-title[id] {
  scroll-margin-top: calc(var(--header-h) + 26px);
}

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cards-5, .formation-tiles { grid-template-columns: repeat(3,1fr); }
  .depts-grid { grid-template-columns: repeat(3,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); gap: 28px; }
}
@media (max-width: 900px) {
  :root { --header-h: 76px; }
  .topbar-brand { display: none; }
  .header-inner { padding: 6px 0; }
  .brand img {
    height: 66px;
    max-height: 76px;
    width: auto;
  }
  .burger {
    display: flex;
    position: relative;
    z-index: 10001;
  }
  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(340px, 86vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    flex-direction: column;
    background: #ffffff;
    padding: 20px 16px 36px;
    gap: 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -10px 0 50px rgba(10,35,82,.3);
    transform: translateX(110%);
    transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10005;
    pointer-events: auto;
    align-items: stretch;
  }
  .nav-list.open { transform: translateX(0); }
  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 14px;
    margin-bottom: 6px;
    border-bottom: 1.5px solid var(--c-border);
  }
  .nav-drawer-title {
    font-family: 'Almarai', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--c-primary);
  }
  .nav-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: rgba(10,35,82,.05);
    border: 1px solid var(--c-border);
    color: var(--c-primary);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--t-base);
  }
  .nav-drawer-close:hover {
    background: var(--c-primary);
    color: #fff;
  }
  .nav-link, .dd-toggle {
    font-size: .98rem;
    padding: 12px 14px;
    width: 100%;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--r-sm);
    transition: var(--t-base);
    background: #f8faff;
    border: 1px solid rgba(10,35,82,.06);
    color: var(--c-primary);
    pointer-events: auto;
    cursor: pointer;
  }
  .nav-link:hover,
  .nav-link.active {
    background: var(--c-primary);
    color: #ffffff;
    border-color: var(--c-primary);
  }
  .dd-toggle {
    background: #f8faff;
    border: 1px solid rgba(10,35,82,.06);
    color: var(--c-primary);
  }
  .dd-toggle:hover,
  .has-dd.open > .dd-toggle {
    background: rgba(14,165,216,.1);
    border-color: rgba(14,165,216,.35);
    color: var(--c-primary-3);
  }
  .nav-link::after { display: none; }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 1.5px solid rgba(14,165,216,.22);
    border-inline-start: 4px solid var(--c-gold);
    background: #f0f6fc;
    border-radius: var(--r-md);
    margin: 4px 0 10px;
    padding: 6px 4px;
    display: none;
  }
  .has-dd.open > .dropdown {
    display: block;
    animation: ddSlideIn .22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .dropdown li + li {
    border-top: 1px solid rgba(10,35,82,.06);
  }
  .dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--c-primary);
    border-radius: var(--r-sm);
    transition: var(--t-base);
    pointer-events: auto;
    cursor: pointer;
  }
  .dropdown a:hover,
  .dropdown a.active {
    background: rgba(14,165,216,.16);
    color: var(--c-primary-3);
    padding-inline-start: 20px;
  }
  .formation-cycle-section {
    scroll-margin-top: calc(var(--header-h) + 16px);
    margin-bottom: 40px;
  }
  .grid-3, .news-grid-full { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .depts-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; padding: 36px 0; }
  .dean-section { flex-direction: column; align-items: center; }
  .dean-quote { border-inline-end: none; border-top: 4px solid var(--c-gold); padding-inline-end: 0; padding-top: 18px; }
}
@media (max-width: 700px) {
  .section { padding: 48px 0; }
  .cards-5 { grid-template-columns: 1fr; gap: 12px; }
  .digital-platform-card { flex-direction: row; justify-content: flex-start; min-height: 78px; padding: 14px 18px; gap: 14px; }
  .formation-tiles { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .announcement-filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding: 5px 2px 12px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .announcement-filter { flex: 0 0 auto; }
}
@media (max-width: 600px) {
  .news-grid-full { grid-template-columns: 1fr; }
  .announcement-filters { flex-wrap: wrap !important; overflow-x: visible !important; padding: 0 4px 12px !important; justify-content: center !important; }
}
@media (max-width: 480px) {
  :root { --header-h: 70px; }
  .brand img {
    height: 58px;
    max-height: 66px;
  }
  .section { padding: 40px 0; }
  .depts-grid, .formation-tiles { grid-template-columns: 1fr; }
  .page-hero-content h1 { font-size: 1.4rem; }
  .btn { padding: 10px 18px; font-size: .88rem; }
}
@media print {
  .topbar, .site-header, .site-footer, .nav-overlay, .burger { display: none !important; }
  body { background: #fff; color: #000; }
}
