/* ============================================
   IMSAA Design System — Modern CSS
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Primary Palette */
  --primary-deep: #1a1f71;
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-lighter: #93c5fd;

  /* Accent / CTA */
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-light: #fbbf24;

  /* Neutrals */
  --dark: #0f172a;
  --gray-900: #1e293b;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-300: #cbd5e1;
  --gray-100: #f1f5f9;
  --white: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1a1f71 0%, #2563eb 100%);
  --gradient-accent: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-hero: linear-gradient(135deg, rgba(26, 31, 113, .85) 0%, rgba(37, 99, 235, .7) 100%);
  --gradient-footer: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', 'Roboto', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, .15);
  --shadow-card: 0 4px 20px rgba(26, 31, 113, .08);
  --shadow-card-hover: 0 12px 36px rgba(26, 31, 113, .15);

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --duration: .3s;
}

/* ---------- Base Reset & Typography ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--gray-700);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.3rem, 3vw, 1.85rem);
}

h4 {
  font-size: 1.35rem;
}

h5 {
  font-size: 1.15rem;
}

p {
  color: var(--gray-500);
  font-size: 1rem;
  line-height: 1.8;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--primary-deep);
}

/* ---------- Section Utilities ---------- */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
}

.section-subtitle {
  color: var(--gray-500);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

/* Section spacing */
.content-section {
  padding: 5rem 0;
}

.content-section-sm {
  padding: 3rem 0;
}

/* ---------- Navbar ---------- */
.navbar {
  padding: .85rem 0;
  transition: all var(--duration) var(--ease);
  background: var(--gradient-primary) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow-md);
  z-index: 1200;
}

.navbar.scrolled {
  padding: .55rem 0;
  background: rgba(26, 31, 113, .97) !important;
  box-shadow: var(--shadow-lg);
}

.navbar .navbar-brand img {
  transition: transform var(--duration) var(--ease);
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

.navbar .navbar-brand img:hover {
  transform: scale(1.05);
}

@media (max-width: 767px) {
  .navbar .navbar-brand img {
    max-height: 35px;
  }
}

.navbar .navbar-brand .brand-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: .5px;
}

.navbar .nav-link {
  color: rgba(255, 255, 255, .85) !important;
  font-weight: 500;
  font-size: .92rem;
  padding: .5rem 1rem !important;
  position: relative;
  transition: color var(--duration) var(--ease);
}

.navbar .nav-link:not(.dropdown-toggle)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width var(--duration) var(--ease), left var(--duration) var(--ease);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--white) !important;
}

.navbar .nav-link:not(.dropdown-toggle):hover::after,
.navbar .nav-link:not(.dropdown-toggle).active::after {
  width: 70%;
  left: 15%;
}

.navbar .dropdown-menu {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: .75rem 0;
  margin-top: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  pointer-events: none;
}

.navbar .dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(8px);
  pointer-events: auto;
}

@media (min-width: 992px) {
  .navbar .nav-item.dropdown:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(8px);
    pointer-events: auto;
  }

  /* Bridge the gap between nav-link and dropdown-menu to prevent hover loss */
  .navbar .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
  }
}

.navbar .dropdown-item {
  padding: .55rem 1.25rem;
  font-size: .9rem;
  border-radius: var(--radius-sm);
  margin: 0 .35rem;
  transition: all .2s var(--ease);
}

.navbar .dropdown-item:hover {
  background: var(--gray-100);
  color: var(--primary);
  transform: translateX(4px);
}

.navbar .btn-cta-nav {
  background: var(--accent);
  color: var(--dark) !important;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: .5rem 1.5rem !important;
  border: none;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 2px 10px rgba(245, 158, 11, .3);
}

.navbar .btn-cta-nav:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, .4);
}

.navbar .btn-cta-nav::after {
  display: none !important;
}

.navbar .social-icon {
  color: rgba(255, 255, 255, .7) !important;
  transition: color .2s var(--ease), transform .2s var(--ease);
  font-size: .95rem;
}

.navbar .social-icon:hover {
  color: var(--accent) !important;
  transform: translateY(-2px);
}

.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, .3) !important;
  padding: .4rem .65rem;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 1210;
}

.navbar-toggler i {
  color: var(--white) !important;
  transition: transform 0.4s var(--ease);
}

.navbar-toggler[aria-expanded="true"] i.fa-bars::before {
  content: "\f00d";
  /* FontAwesome 'times' / X icon */
}

.navbar-toggler[aria-expanded="true"] i {
  transform: rotate(90deg);
}

/* Mobile nav */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--primary-deep);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: .75rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1205;
  }

  .navbar .dropdown-menu {
    display: block;
    /* Keep in flow for animation */
    position: static !important;
    float: none !important;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    visibility: visible;
    transform: none;
    background: rgba(255, 255, 255, .08);
    box-shadow: none;
    margin-top: 0;
    pointer-events: none;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    padding: 0;
  }

  .navbar .dropdown-menu.show {
    opacity: 1;
    max-height: 500px;
    /* Large enough value */
    padding: .5rem 0;
    margin-top: .5rem;
    pointer-events: auto;
  }

  .navbar .dropdown-item {
    color: rgba(255, 255, 255, .9);
    padding: .65rem 1.25rem .65rem 2.5rem;
  }

  .navbar .dropdown-item:hover {
    background: rgba(255, 255, 255, .15);
    color: var(--white);
    transform: none;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Hero / Page Banner ---------- */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.hero-section .hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 1;
}

.hero-section .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
}

.hero-section .hero-content h1 {
  color: var(--white);
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  margin-bottom: 1rem;
}

.hero-section .hero-content p {
  color: rgba(255, 255, 255, .9);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.page-banner {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.page-banner .hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 1;
}

.page-banner .banner-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.page-banner .banner-content h1 {
  color: var(--white);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.page-banner .banner-content .breadcrumb {
  background: none;
  padding: 0;
  margin-bottom: 0;
}

.page-banner .banner-content .breadcrumb a {
  color: rgba(255, 255, 255, .8);
}

.page-banner .banner-content .breadcrumb-item.active {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn-primary-custom {
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  padding: .75rem 2rem;
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

.btn-primary-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .4);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  color: var(--dark);
  border: none;
  border-radius: var(--radius-full);
  padding: .75rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 4px 14px rgba(245, 158, 11, .3);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, .4);
  color: var(--dark);
}

.btn-outline-light-custom {
  border: 2px solid rgba(255, 255, 255, .5);
  color: var(--white);
  border-radius: var(--radius-full);
  padding: .7rem 1.8rem;
  font-weight: 600;
  transition: all var(--duration) var(--ease);
  background: transparent;
}

.btn-outline-light-custom:hover {
  background: var(--white);
  color: var(--primary-deep);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* ---------- Cards ---------- */
.card-modern {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: all var(--duration) var(--ease);
  overflow: hidden;
}

.card-modern:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.card-modern .card-body {
  padding: 1.75rem;
}

/* Card with top colored border */
.card-accent-top {
  border-top: 4px solid var(--primary);
}

.card-accent-top:hover {
  border-top-color: var(--accent);
}

/* Formation / Program Cards */
.program-card {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: all .4s var(--ease);
  overflow: hidden;
  position: relative;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

.program-card:hover::before {
  transform: scaleX(1);
}

.program-card .card-body {
  padding: 1.5rem;
}

.program-card .card-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}

.program-card:hover .card-icon {
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

.program-card h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dark);
  font-size: .95rem;
  margin-bottom: .75rem;
}

.program-card p {
  font-size: .88rem;
  line-height: 1.7;
}

.program-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--primary);
  font-weight: 600;
  font-size: .88rem;
  transition: gap .3s var(--ease), color .3s var(--ease);
}

.program-card:hover .card-link {
  gap: .65rem;
  color: var(--accent);
}

/* ---------- Teacher Cards ---------- */
.teacher-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--gray-100);
  transition: all var(--duration) var(--ease);
}

.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-lighter);
}

.teacher-card img {
  border: 3px solid var(--primary-lighter);
  transition: border-color var(--duration) var(--ease);
}

.teacher-card:hover img {
  border-color: var(--primary);
}

.teacher-card .teacher-name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--dark);
  font-size: .9rem;
  margin-top: .5rem;
  margin-bottom: .25rem;
}

.teacher-card .teacher-title {
  font-size: .82rem;
  color: var(--gray-500);
}

.teacher-card .teacher-exp {
  display: inline-block;
  background: var(--gray-100);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .75rem;
  border-radius: var(--radius-full);
  margin-top: .35rem;
}

/* ---------- Feature / Why IMSAA ---------- */
.feature-box {
  text-align: center;
  padding: 2rem 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: all var(--duration) var(--ease);
}

.feature-box:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateY(-6px);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform var(--duration) var(--ease), background var(--duration) var(--ease);
}

.feature-box:hover .feature-icon {
  transform: scale(1.08);
  background: var(--accent);
}

.feature-icon i {
  font-size: 1.5rem;
  color: var(--white);
}

/* ---------- Gradient Section (Why IMSAA) ---------- */
.gradient-section {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.gradient-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(124, 58, 237, .2);
  filter: blur(80px);
}

.gradient-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(245, 158, 11, .1);
  filter: blur(60px);
}

.gradient-section>* {
  position: relative;
  z-index: 2;
}

/* ---------- Info / Note Cards ---------- */
.info-card {
  border: none;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all var(--duration) var(--ease);
}

.info-card:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent);
}

.info-card h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: .75rem;
}

/* ---------- Content Lists ---------- */
.styled-list {
  list-style: none;
  padding: 0;
}

.styled-list li {
  padding: .6rem 0 .6rem 1.75rem;
  position: relative;
  color: var(--gray-700);
  transition: color .2s var(--ease);
}

.styled-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transition: background .2s var(--ease);
}

.styled-list li:hover::before {
  background: var(--accent);
}

.styled-list li a {
  font-weight: 500;
}

/* ---------- Tabs (Formation) ---------- */
.nav-pills-custom .nav-link {
  border-radius: var(--radius-full);
  padding: .65rem 1.5rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-100);
  border: 2px solid transparent;
  transition: all var(--duration) var(--ease);
  margin: 0 .25rem;
}

.nav-pills-custom .nav-link:hover {
  color: var(--primary);
  background: var(--white);
  border-color: var(--primary-lighter);
}

.nav-pills-custom .nav-link.active {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

/* ---------- Blockquote (Mot du DG) ---------- */
.blockquote-modern {
  position: relative;
  padding: 2.5rem 2rem 2rem;
  border-left: 5px solid var(--primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.blockquote-modern::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 5rem;
  color: var(--primary-lighter);
  position: absolute;
  top: -.5rem;
  left: 1rem;
  line-height: 1;
  opacity: .4;
}

/* ---------- Contact Form ---------- */
.form-modern .form-control,
.form-modern .form-outline .form-control {
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-300);
  padding: .85rem 1.1rem;
  font-size: .95rem;
  transition: all var(--duration) var(--ease);
  background: var(--white);
}

.form-modern .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.form-modern .form-outline .form-label {
  background: var(--white);
  padding: 0 8px;
  margin-left: -4px;
  color: var(--gray-500);
}

.form-modern .form-outline .form-control:focus~.form-label,
.form-modern .form-outline .form-control.active~.form-label {
  color: var(--primary) !important;
  font-weight: 600;
}

/* ---------- Footer ---------- */
footer.footer-modern {
  background: transparent;
  color: rgba(255, 255, 255, .85);
  position: relative;
  overflow: visible;
  /* Allow wave to overflow if needed, though hidden is safer for horizontal */
}

.footer-body {
  background: var(--gradient-footer);
  padding-top: 2rem;
  position: relative;
  z-index: 1;
}

footer.footer-modern::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .06);
  filter: blur(80px);
}

footer.footer-modern h5 {
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: .75rem;
}

footer.footer-modern h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

footer.footer-modern .text-center h5::after {
  left: 50%;
  transform: translateX(-50%);
}

footer.footer-modern a {
  color: rgba(255, 255, 255, .7);
  transition: all .2s var(--ease);
  display: inline-block;
}

footer.footer-modern a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

footer.footer-modern .footer-link-list li {
  padding: .35rem 0;
}

footer.footer-modern .footer-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .7);
  margin: 0 .3rem;
  transition: all var(--duration) var(--ease);
}

footer.footer-modern .footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
  transform: translateY(-3px) translateX(0);
}

footer.footer-modern .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 1.25rem 0;
  margin-top: 2rem;
}

footer.footer-modern .contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .75rem;
}

footer.footer-modern .contact-info-item i {
  color: var(--accent);
  margin-top: .2rem;
  flex-shrink: 0;
}

footer.footer-modern .contact-info-item span,
footer.footer-modern .contact-info-item a {
  transform: none;
}

/* ---------- Scroll-to-Top Button ---------- */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration) var(--ease);
  z-index: 999;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ---------- Animations ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children>*:nth-child(1) {
  transition-delay: .05s;
}

.stagger-children>*:nth-child(2) {
  transition-delay: .1s;
}

.stagger-children>*:nth-child(3) {
  transition-delay: .15s;
}

.stagger-children>*:nth-child(4) {
  transition-delay: .2s;
}

.stagger-children>*:nth-child(5) {
  transition-delay: .25s;
}

.stagger-children>*:nth-child(6) {
  transition-delay: .3s;
}

.stagger-children>*:nth-child(7) {
  transition-delay: .35s;
}

.stagger-children>*:nth-child(8) {
  transition-delay: .4s;
}

/* Pulse animation for CTA */
@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, .5);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
  }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* Float animation */
@keyframes floatY {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.float-anim {
  animation: floatY 3s ease-in-out infinite;
}

/* ---------- SVG Wave Divider ---------- */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Student Portal Cards ---------- */
.student-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--white);
  transition: all .4s var(--ease);
  height: 100%;
}

.student-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

.student-card .card-img-wrapper {
  overflow: hidden;
  height: 200px;
}

.student-card .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.student-card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.student-card .card-body {
  padding: 1.5rem;
}

.student-card .card-body h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark);
  margin-bottom: .75rem;
}

.student-card .btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary);
  transition: all var(--duration) var(--ease);
  background: transparent;
}

.student-card .btn-read-more:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateX(4px);
}

/* ---------- Partner Section ---------- */
.partner-logo {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--gray-100);
  transition: all var(--duration) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
}

.partner-logo:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-lighter);
  transform: scale(1.03);
}

.partner-logo img {
  max-height: 60px;
  max-width: 100%;
  filter: grayscale(100%);
  opacity: .6;
  transition: all var(--duration) var(--ease);
}

.partner-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---------- Formation Detail UE Cards ---------- */
.ue-card {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: all .4s var(--ease);
  overflow: hidden;
  position: relative;
  height: 100%;
}

.ue-card .ue-header {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
}

.ue-card .card-body {
  padding: 1.25rem;
}

.ue-card .card-body h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
}

.ue-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

/* ---------- Accordion inside card-modern ---------- */
.card-modern .accordion-button {
  background: var(--white);
  font-family: var(--font-heading);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1rem 1.5rem;
}

.card-modern .accordion-button:not(.collapsed) {
  background: var(--gray-100);
  color: var(--primary-deep);
  box-shadow: none;
}

.card-modern .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .hero-section {
    min-height: 55vh;
  }

  .page-banner {
    min-height: 30vh;
  }

  .content-section {
    padding: 3rem 0;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .feature-box {
    margin-bottom: 1rem;
  }

  .nav-pills-custom .nav-link {
    padding: .5rem 1rem;
    font-size: .85rem;
    margin-bottom: .35rem;
  }

  .program-card .card-icon {
    width: 80px;
    height: 80px;
  }

  .scroll-top-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .hero-section {
    min-height: 60vh;
  }

  .content-section {
    padding: 4rem 0;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1180px;
  }
}

/* ---------- Misc Overrides ---------- */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-light-custom {
  background: var(--gray-100);
}

/* Smooth image rendering */
img {
  max-width: 100%;
  height: auto;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--primary-lighter);
  outline-offset: 2px;
}

/* ---------- Mot du DG Profile Section (Wrap-Around Layout) ---------- */
.dg-profile-section {
  padding: 3rem 0;
  background: var(--white);
}

.dg-profile-title {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--primary-deep);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  width: 100%;
  border-bottom: 2px solid var(--gray-100);
  padding-bottom: 1rem;
}

.dg-profile-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--primary-lighter);
  border-radius: var(--radius-full);
}

.dg-profile-container {
  display: block;
  /* Removed flex */
  overflow: hidden;
  /* Clearfix */
}

.dg-image-wrapper {
  float: left;
  width: 300px;
  height: 300px;
  /* Fixed height requested */
  margin-right: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.dg-image-wrapper img {
  width: 100%;
  height: 100%;
  /* Ensure it fills the wrapper */
  object-fit: cover;
  /* Professional cropping */
  object-position: top center;
  display: block;
}

/* Gradient effect on the sides of the image */
.dg-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, transparent 15%, transparent 85%, rgba(37, 99, 235, 0.05) 100%);
  pointer-events: none;
}

.dg-message-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--dark);
  font-weight: 700;
  /* Increased to 700 for uniformity */
  text-align: justify;
}

.dg-message-content p {
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.8;
  /* Consistent interligne */
}

/* Premium List Styles - Updated for Float Wrap-around & Indentation */
.premium-list {
  list-style: none;
  padding: 1.5rem 2.5rem;
  /* Increased indentation */
  margin: 1.5rem 0;
  clear: left;
  /* Starts below the image */
  background: rgba(37, 99, 235, 0.03);
  /* Subtle background for appeal */
  border-left: 4px solid var(--primary-lighter);
  /* Visual accent */
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.premium-list li {
  margin-bottom: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  transition: transform 0.2s var(--ease);
  position: relative;
  padding-left: 2rem;
  line-height: 1.8;
  /* Consistent interligne */
}

.premium-list li:hover {
  transform: translateX(5px);
}

.premium-list li::before {
  content: '\f058';
  /* FontAwesome check-circle */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--primary);
  font-size: 1.15rem;
}

.dg-name-header {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--dark);
  /* Dark black */
  margin-bottom: 0.25rem;
  display: block;
}

.dg-title-small {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.5rem;
  display: block;
  font-style: italic;
}

.signature-text {
  font-style: italic;
  font-weight: 700;
  color: var(--dark);
  margin-top: 1.5rem;
}

@media (max-width: 767px) {
  .dg-profile-section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .dg-profile-title {
    font-size: 1.8rem;
    text-align: center;
    padding-bottom: 0.75rem;
  }

  .dg-profile-title::after {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
  }

  .dg-image-wrapper {
    float: none;
    width: 100%;
    max-width: 280px;
    height: 280px;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-lg);
  }

  .dg-message-content {
    text-align: left;
    font-size: 1rem;
  }

  .dg-name-header {
    font-size: 1.4rem;
    text-align: center;
  }

  .dg-title-small {
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 1.25rem;
  }

  .premium-list {
    padding: 1.25rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
  }

  .premium-list li {
    font-size: 0.95rem;
    padding-left: 1.75rem;
  }
}

/* Selection color */
::selection {
  background: var(--primary);
  color: var(--white);
}
