/* ==========================================================================
   ENCG Marrakech — Base styles (shared across all pages)
   ========================================================================== */

:root {
  /* Brand colors */
  --color-primary: #870B22;
  --color-primary-dark: #3D050F;
  --color-primary-light: #9D0D28;
  --color-accent-pink: #EEA1AE;
  --color-bg-pink: #FFF4F5;
  --color-bg-pink-2: #FCE8EB;

  /* Neutrals */
  --color-text: #101828;
  --color-text-secondary: #475467;
  --color-text-muted: #667085;
  --color-border: #EAECF0;
  --color-white: #FFFFFF;
  --color-off-white: #FFFBFA;

  /* Typography */
  --font-display: 'Playfair Display', 'Inria Serif', serif;
  --font-sans: 'Inter', 'Instrument Sans', sans-serif;

  /* Layout */
  --container-width: 1280px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 400;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-bg-pink);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-white:hover {
  background: var(--color-bg-pink);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.btn-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-link:hover svg {
  transform: translate(2px, -2px);
}

.section {
  padding: 80px 0;
}

/* Skeleton page hero (shared by non-home pages) */
.page-hero {
  padding: 72px 0 48px;
  background: var(--color-bg-pink);
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1.15;
  color: var(--color-primary-dark);
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 620px;
}

.page-placeholder {
  font-size: 16px;
  color: var(--color-text-muted);
  padding: 32px;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .page-hero h1 {
    font-size: 36px;
  }
}

@media (max-width: 900px) {
  .section {
    padding: 56px 0;
  }
}

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-logo img {
  height: 120px;
  width: auto;
  display: block;
  position: relative;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav > ul > li { position: static; }
.main-nav > ul > li.has-mega { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
  border-radius: 2px;
}

.nav-link:hover,
.nav-link[aria-expanded="true"] {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link[aria-expanded="true"]::after,
.main-nav > ul > li:hover > .nav-link::after {
  transform: scaleX(1);
}

.nav-link .chev {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

.main-nav > ul > li.has-mega:hover > .nav-link .chev,
.nav-link[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

/* Mega-menu panel ------------------------------------------- */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 780px;
  max-width: 1080px;
  background: #ffffff;
  border: 1px solid rgba(135, 11, 34, 0.12);
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(135, 11, 34, 0.28), 0 0 0 1px rgba(135, 11, 34, 0.02);
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 200;
}

.main-nav > ul > li:hover > .mega-menu,
.main-nav > ul > li.is-open > .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(6px);
}

/* Hover-bridge so the pointer can move from trigger → panel */
.mega-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mega-col-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mega-col-title::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.mega-link {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.mega-link:hover {
  background: #FFF9FA;
}

.mega-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFECEF 0%, #FFF4F5 100%);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.mega-icon svg { width: 20px; height: 20px; }

.mega-link:hover .mega-icon {
  background: linear-gradient(135deg, var(--color-primary), #6E0819);
  color: #ffffff;
}

.mega-link-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.mega-link-body strong {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.mega-link-body span {
  font-size: 12px;
  color: #666666;
  line-height: 1.4;
}

.mega-link-tagline {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(135, 11, 34, 0.18);
  font-family: var(--font-display, "Inria Serif", serif);
  font-size: 12px;
  font-style: italic;
  color: var(--color-primary);
  line-height: 1.4;
}

/* Featured card in mega menu (right column) ---------------- */
.mega-featured {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-featured-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), #6E0819);
  color: #ffffff;
  text-decoration: none;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.mega-featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.10) 1.2px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.4;
  pointer-events: none;
}

.mega-featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(135, 11, 34, 0.35);
}

.mega-featured-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  align-self: flex-start;
}

.mega-featured-card strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-display, "Inria Serif", serif);
  font-size: 20px;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.005em;
}

.mega-featured-card p {
  position: relative;
  z-index: 1;
  font-size: 13px;
  line-height: 20px;
  color: #F7D0D7;
  margin: 0;
}

.mega-featured-card .mega-featured-cta {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
}

.mega-featured-card .mega-featured-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.mega-featured-card:hover .mega-featured-cta svg {
  transform: translate(3px, -3px);
}

/* ===== Featured card variants — pure CSS decorations ===== */

/* Variant 1: QUOTE — for Director's message card */
.mega-featured-card.variant-quote {
  background: linear-gradient(135deg, #870B22 0%, #6E0819 60%, #4d0410 100%);
  overflow: hidden;
}

.mega-featured-card.variant-quote::after {
  content: "\201C";
  position: absolute;
  top: -30px;
  right: 8px;
  font-family: var(--font-display, "Inria Serif", serif);
  font-size: 200px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.10);
  z-index: 0;
  font-weight: 700;
  pointer-events: none;
}

.mega-featured-card.variant-quote > *:not(::before):not(::after) { position: relative; z-index: 1; }

/* Signature-style wave at the bottom */
.mega-featured-card.variant-quote .mega-featured-cta {
  position: relative;
  padding-bottom: 12px;
}

.mega-featured-card.variant-quote .mega-featured-cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 30%;
  bottom: 0;
  height: 6px;
  background:
    radial-gradient(circle at 20% 100%, rgba(247, 208, 215, 0.6) 2px, transparent 2.5px),
    radial-gradient(circle at 60% 100%, rgba(247, 208, 215, 0.6) 2px, transparent 2.5px),
    radial-gradient(circle at 100% 100%, rgba(247, 208, 215, 0.6) 2px, transparent 2.5px);
}

/* Variant 2: APPLY — for Programs / Ready to apply card */
.mega-featured-card.variant-apply {
  background: linear-gradient(135deg, #A21538 0%, #870B22 55%, #6E0819 100%);
  overflow: hidden;
}

/* Diagonal accent stripe */
.mega-featured-card.variant-apply::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -40%;
  width: 260px;
  height: 260px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 65%);
  transform: rotate(35deg);
  border-radius: 40px;
  z-index: 0;
  pointer-events: none;
}

/* Step-dots pattern top-right */
.mega-featured-card.variant-apply::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.28) 2.5px, transparent 3px),
    radial-gradient(circle, rgba(255, 255, 255, 0.10) 1.2px, transparent 1.5px);
  background-position: top 22px right 24px, 0 0;
  background-size: 100px 24px, 22px 22px;
  background-repeat: no-repeat, repeat;
  opacity: 0.6;
}

/* Variant 3: NETWORK — for Community / Alumni card */
.mega-featured-card.variant-network {
  background: linear-gradient(135deg, #870B22 0%, #6E0819 100%);
  overflow: hidden;
}

/* Constellation of nodes */
.mega-featured-card.variant-network::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 120px;
  height: 90px;
  background:
    radial-gradient(circle 4px at 20% 30%, #F7D0D7 100%, transparent 100%),
    radial-gradient(circle 3px at 70% 15%, #EEA1AE 100%, transparent 100%),
    radial-gradient(circle 3px at 50% 65%, #EEA1AE 100%, transparent 100%),
    radial-gradient(circle 4px at 90% 55%, #F7D0D7 100%, transparent 100%),
    radial-gradient(circle 2.5px at 15% 80%, #EEA1AE 100%, transparent 100%),
    radial-gradient(circle 3px at 88% 90%, #F7D0D7 100%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

/* Connecting lines drawn with CSS lines using gradients (as SVG-like paths) */
.mega-featured-card.variant-network::before {
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(247, 208, 215, 0.35) 49%, rgba(247, 208, 215, 0.35) 51%, transparent 52%),
    radial-gradient(circle, rgba(255, 255, 255, 0.10) 1.2px, transparent 1.5px);
  background-position: top 25px right -80px, 0 0;
  background-size: 180px 60px, 18px 18px;
  background-repeat: no-repeat, repeat;
  opacity: 0.55;
}

/* Header contact link (small text link right of Login) ------ */
.header-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary, #52323b);
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-contact-link:hover { color: var(--color-primary); }
.header-contact-link svg { width: 14px; height: 14px; }

/* ===== Homepage "Which one are you?" section ===== */
.audience {
  padding: 88px 0;
  background: linear-gradient(180deg, #FFF9FA 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.audience::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -160px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at 40% 40%, rgba(135, 11, 34, 0.10), rgba(135, 11, 34, 0) 65%);
  filter: blur(20px);
  pointer-events: none;
}

.audience .container { position: relative; z-index: 1; }

.audience-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.audience-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.audience-eyebrow::before,
.audience-eyebrow::after {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.audience h2 {
  font-family: var(--font-display, "Inria Serif", serif);
  font-size: 44px;
  line-height: 1.05;
  color: var(--color-primary-dark);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.audience-sub {
  font-size: 17px;
  line-height: 27px;
  color: var(--color-text-secondary, #52323b);
  margin: 0;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.audience-card {
  padding: 30px 26px 28px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #F0D6DE;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.audience-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), #A21538 60%, #F7D0D7);
  border-radius: 20px 20px 0 0;
  opacity: 0.9;
}

.audience-card:hover {
  transform: translateY(-6px);
  border-color: rgba(135, 11, 34, 0.4);
  box-shadow: 0 28px 50px -25px rgba(135, 11, 34, 0.32);
}

.audience-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFECEF 0%, #FFF4F5 100%);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s ease;
}

.audience-card:hover .audience-icon {
  background: linear-gradient(135deg, var(--color-primary), #6E0819);
  color: #ffffff;
  transform: scale(1.06);
}

.audience-icon svg { width: 26px; height: 26px; }

.audience-card h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.audience-card p {
  font-family: var(--font-display, "Inria Serif", serif);
  font-size: 15px;
  line-height: 23px;
  color: var(--color-text-secondary, #52323b);
  font-style: italic;
  margin: 0;
  flex: 1;
}

.audience-card .cta {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(135, 11, 34, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.audience-card .cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.audience-card:hover .cta svg { transform: translate(3px, -3px); }

@media (max-width: 900px) {
  .audience { padding: 56px 0; }
  .audience h2 { font-size: 30px; }
  .audience-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .audience-card { padding: 22px 20px; }
}

@media (max-width: 520px) {
  .audience-grid { grid-template-columns: 1fr; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-switch:hover {
  background: var(--color-bg-pink);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }

  .main-nav.is-open {
    display: block;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 20px;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .main-nav.is-open > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .main-nav > ul > li { position: relative; }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 8px;
    font-size: 16px;
    border-bottom: 1px solid rgba(135, 11, 34, 0.08);
  }

  .nav-link::after { display: none; }

  .mega-menu {
    position: static;
    transform: none;
    min-width: 0;
    max-width: none;
    border: none;
    box-shadow: none;
    padding: 8px 0 16px 12px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
  }

  .mega-menu::before { display: none; }

  .main-nav > ul > li.is-open > .mega-menu {
    display: block;
    transform: none;
  }

  .main-nav > ul > li.is-open > .nav-link {
    color: var(--color-primary);
  }

  .mega-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mega-col-title { margin-bottom: 4px; margin-top: 6px; }

  .mega-link {
    padding: 8px 8px;
  }

  .mega-featured { display: none; }

  .nav-toggle {
    display: inline-flex;
  }

  .header-actions .lang-switch { display: inline-flex; }
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--color-primary);
  color: var(--color-off-white);
}

.footer-top {
  padding-top: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-newsletter-heading {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 6px;
}

.footer-newsletter-sub {
  font-size: 14px;
  color: rgba(255, 251, 250, 0.75);
}

.footer-email-capture {
  display: flex;
  gap: 12px;
}

.footer-email-capture input {
  min-width: 260px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  font-size: 15px;
}

.footer-email-capture input::placeholder {
  color: rgba(255, 251, 250, 0.6);
}

.footer-main {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 32px;
}

.footer-brand img {
  display: block;
  width: auto;
  max-width: 150px;
  height: auto;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 251, 250, 0.75);
  max-width: 260px;
}

.footer-col-heading {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  color: var(--color-white);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255, 251, 250, 0.75);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 251, 250, 0.65);
}

.footer-social {
  display: flex;
  gap: 20px;
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  /* Two columns on mobile: À propos | Programmes, then Communauté | Profils, etc. */
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }

  /* Logo + tagline span the full width above the columns */
  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-email-capture {
    flex-direction: column;
    width: 100%;
  }

  .footer-email-capture input {
    min-width: 0;
    width: 100%;
  }
}

/* ==========================================================================
   Mobile nav polish
   ========================================================================== */
.nav-toggle {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  background: var(--color-bg-pink);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  /* Lock body scroll when mobile nav is open */
  body.nav-open {
    overflow: hidden;
  }

  /* Chevron rotates when mega is open */
  .main-nav .has-mega > .nav-link .chev {
    transition: transform 0.22s ease;
  }
  .main-nav .has-mega.is-open > .nav-link .chev {
    transform: rotate(180deg);
  }

  /* Nicer full-height slide-down panel */
  .main-nav.is-open {
    box-shadow: 0 12px 30px rgba(61, 5, 15, 0.12);
    padding-bottom: 40px;
  }

  /* Bigger tap targets on mega links */
  .mega-link {
    padding: 12px 8px !important;
    min-height: 48px;
  }
  .mega-link strong { font-size: 15px; }
  .mega-link span { font-size: 13px; }
  .mega-link-tagline { display: none; }

  /* Section-column separator for readability */
  .mega-col + .mega-col {
    border-top: 1px dashed rgba(135, 11, 34, 0.15);
    padding-top: 10px;
    margin-top: 6px;
  }
}

@media (max-width: 640px) {
  .header-content { gap: 8px; }
  .site-logo img { height: 72px !important; }
  .lang-switch { padding: 6px 10px; font-size: 13px; }
  .nav-toggle { padding: 10px; }
}

/* ==========================================================================
   Drawer navigation (em-lyon style) — replaces the horizontal mega-menu
   ========================================================================== */

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid rgba(135, 11, 34, 0.25);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--color-primary-dark, #3D050F);
  font-family: var(--font-body, "Instrument Sans", sans-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.menu-toggle:hover { background: var(--color-bg-pink, #FBEAEE); border-color: var(--color-primary, #870B22); }
.menu-toggle-icon { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-toggle-icon span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }

/* Overlay + panel */
.drawer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(61, 5, 15, 0.45);
  opacity: 0; transition: opacity 0.25s ease;
}
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(920px, 100%);
  background: #ffffff;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
  box-shadow: -24px 0 60px rgba(61, 5, 15, 0.18);
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer.is-open .drawer-panel { transform: translateX(0); }
body.drawer-open { overflow: hidden; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid #F0D9DE;
}
.drawer-title {
  font-family: var(--font-body, "Instrument Sans", sans-serif);
  font-size: 14px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--color-primary-dark, #3D050F);
}
.drawer-close {
  background: none; border: none; cursor: pointer; padding: 8px;
  color: var(--color-primary-dark, #3D050F); border-radius: 8px;
}
.drawer-close:hover { background: var(--color-bg-pink, #FBEAEE); }
.drawer-close svg { width: 22px; height: 22px; display: block; }

.drawer-body {
  flex: 1; overflow-y: auto;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 0;
}
.drawer-nav { padding: 16px 32px 40px; border-right: 1px solid #F0D9DE; }
.drawer-aside { padding: 24px 32px 40px; background: #FDF7F8; }

/* Primary items */
.drawer-item { border-bottom: 1px solid #F0D9DE; }
.drawer-trigger, .drawer-link {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer; text-decoration: none;
  padding: 18px 4px;
  font-family: var(--font-body, "Instrument Sans", sans-serif);
  font-size: 19px; font-weight: 700; color: var(--color-primary-dark, #3D050F);
  text-align: left;
}
.drawer-trigger:hover, .drawer-link:hover { color: var(--color-primary, #870B22); }
.drawer-trigger .chev { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.2s ease; color: var(--color-primary, #870B22); }
.drawer-item.is-open .drawer-trigger .chev { transform: rotate(90deg); }

.drawer-sub { list-style: none; margin: 0; padding: 0 4px 14px; display: none; }
.drawer-item.is-open .drawer-sub { display: block; }
.drawer-sub li a {
  display: block; padding: 9px 0 9px 16px;
  font-size: 15.5px; color: #5a464b; text-decoration: none;
  border-left: 2px solid #F0D9DE;
}
.drawer-sub li a:hover { color: var(--color-primary, #870B22); border-left-color: var(--color-primary, #870B22); }

/* Aside: quick links + digital services */
.drawer-quick { display: flex; flex-direction: column; border-bottom: 1px solid #F0D9DE; padding-bottom: 18px; margin-bottom: 22px; }
.drawer-quick a {
  padding: 9px 0; font-size: 16px; font-weight: 600;
  color: var(--color-primary-dark, #3D050F); text-decoration: none;
}
.drawer-quick a:hover { color: var(--color-primary, #870B22); }

.drawer-sites-title {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-primary, #870B22); margin-bottom: 12px;
}
.drawer-sites a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; font-size: 15.5px; font-weight: 600;
  color: var(--color-primary-dark, #3D050F); text-decoration: none;
}
.drawer-sites a:hover { color: var(--color-primary, #870B22); }
.drawer-sites a svg { width: 14px; height: 14px; color: var(--color-primary, #870B22); }

@media (max-width: 860px) {
  .drawer-panel { width: 100%; }
  .drawer-body { grid-template-columns: 1fr; }
  .drawer-nav { border-right: none; padding: 8px 24px 8px; }
  .drawer-aside { padding: 20px 24px 48px; }
  .menu-toggle { padding: 9px 12px; }
  .menu-toggle-label { display: none; }
}

/* ==========================================================================
   Drawer v2 — desktop drill-down: sub-menus open in a middle column
   (accordion behaviour is kept for mobile only)
   ========================================================================== */
.drawer-sub-title { display: none; }

@media (min-width: 861px) {
  .drawer-panel { width: min(1160px, 100%); }
  .drawer-body {
    position: relative;
    grid-template-columns: 400px 1fr 300px;
  }
  .drawer-nav { grid-column: 1; border-right: 1px solid #F0D9DE; }
  .drawer-aside { grid-column: 3; border-left: 1px solid #F0D9DE; }

  /* Sub-menu becomes a full-height middle panel */
  .drawer-item.is-open .drawer-sub {
    display: block;
    position: absolute;
    left: 400px;
    right: 300px;
    top: 0;
    bottom: 0;
    padding: 28px 40px;
    overflow-y: auto;
    background: #ffffff;
  }
  .drawer-sub-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary, #870B22);
    padding: 0 0 14px;
    border-bottom: 1px solid #F0D9DE;
    margin-bottom: 10px;
  }
  .drawer-sub li a {
    border-left: none;
    padding: 13px 0;
    font-size: 17.5px;
    font-weight: 600;
    color: var(--color-primary-dark, #3D050F);
    border-bottom: 1px solid #F8ECEF;
  }
  .drawer-sub li a:hover { color: var(--color-primary, #870B22); padding-left: 6px; transition: padding 0.15s ease, color 0.15s ease; }

  /* Active trigger highlight */
  .drawer-item.is-open .drawer-trigger { color: var(--color-primary, #870B22); }
  .drawer-item.is-open .drawer-trigger .chev { transform: none; }
}

/* ==========================================================================
   Header v3 — em-lyon desktop pattern: horizontal top-nav + full-width panels
   ========================================================================== */
.top-nav { flex: 1; margin: 0 24px; }
.top-nav > ul {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0; padding: 0;
}
.top-nav .top-link {
  display: inline-flex;
  align-items: center;
  background: none; border: none; cursor: pointer; text-decoration: none;
  padding: 0 14px;
  height: var(--header-height);
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--color-primary-dark, #3D050F);
  position: relative;
  white-space: nowrap;
}
.top-nav .top-link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 4px;
  background: var(--color-primary, #870B22);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.top-nav .top-link:hover { color: var(--color-primary, #870B22); }
.top-nav li.is-open > .top-link { color: var(--color-primary, #870B22); }
.top-nav li.is-open > .top-link::after,
.top-nav .top-link:hover::after { transform: scaleX(1); }

/* Full-width panel below the header (em-lyon style) */
.mega-panel {
  position: fixed;
  left: 0; right: 0;
  top: var(--header-height);
  background: #ffffff;
  border-top: 1px solid var(--color-border, #EAECF0);
  box-shadow: 0 40px 60px -30px rgba(61, 5, 15, 0.25);
  display: none;
  z-index: 90;
}
.top-nav li.is-open > .mega-panel { display: block; }
.mega-panel-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 56px;
  padding-top: 40px;
  padding-bottom: 48px;
}
.mega-group h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary, #870B22);
  margin: 0 0 14px;
}
.mega-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-primary-dark, #3D050F);
  text-decoration: none;
  border-bottom: 1px solid #F6EDEF;
}
.mega-group a:hover { color: var(--color-primary, #870B22); padding-left: 6px; transition: padding 0.15s ease, color 0.15s ease; }
.mega-group a .chev { width: 16px; height: 16px; color: var(--color-primary, #870B22); flex-shrink: 0; }

/* Desktop: top-nav visible, burger = secondary menu. Mobile: burger only. */
@media (max-width: 1200px) {
  .top-nav { display: none; }
}

/* v3 polish: logo must never shrink; panel columns hug left */
.site-header .header-content { flex-shrink: 0; }
.site-logo img { width: auto; max-width: none; }
.mega-panel-inner {
  grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
  justify-content: start;
}

/* Beat .site-header .container's flex on the panel inner */
.site-header .mega-panel-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
  justify-content: start;
  align-items: start;
  gap: 24px 56px;
}

/* Language switch — em-lyon style "Fr | En" text pair (replaces the boxed chip) */
.lang-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
}
.lang-pair .lang-current { color: var(--color-primary, #870B22); }
.lang-pair a { color: #9a8a8e; text-decoration: none; }
.lang-pair a:hover { color: var(--color-primary, #870B22); }
.lang-pair .lang-sep { color: #d8c7cb; font-weight: 400; }

/* ==========================================================================
   Header v3 polish — make everything fit on one row, em-lyon proportions
   ========================================================================== */
.site-header .container {
  max-width: 1480px;
  flex-wrap: nowrap;
  gap: 16px;
}
.site-logo img { height: 96px; }
.top-nav { margin: 0 8px; }
.top-nav > ul { gap: 2px; justify-content: center; }
.top-nav .top-link {
  font-size: 15px;
  padding: 0 11px;
  letter-spacing: -0.01em;
}
.top-nav .top-link::after { left: 11px; right: 11px; }
.header-actions { flex-shrink: 0; display: inline-flex; align-items: center; gap: 16px; }

/* Burger — icon only, em-lyon style (no border box) */
.menu-toggle {
  border: none;
  padding: 8px;
  background: none;
  border-radius: 8px;
}
.menu-toggle:hover { background: var(--color-bg-pink, #FBEAEE); border: none; }
.menu-toggle-icon { gap: 5px; }
.menu-toggle-icon span {
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--color-primary, #870B22);
}

/* Panel opening feel */
.mega-panel { animation: panelIn 0.18s ease; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 1150px) {
  .top-nav { display: none; }
}
@media (max-width: 640px) {
  .site-logo img { height: 64px !important; }
}

/* Panel links are final pages, not sub-levels — no chevrons.
   A subtle slide on hover is the only affordance. */
.mega-group a .chev { display: none; }
.mega-group a { justify-content: flex-start; }

/* Burger only on mobile — desktop uses the horizontal menu */
@media (min-width: 1151px) {
  .menu-toggle { display: none; }
}
.mega-group a .ext { width: 13px; height: 13px; color: var(--color-primary, #870B22); margin-left: 8px; flex-shrink: 0; display: inline-block; }

/* ==========================================================================
   Logo v2 — the PNG's transparent padding was cropped, so the mark itself
   renders ~70% larger while the 80px header bar keeps its exact height.
   ========================================================================== */
.site-logo img { height: 54px; }
@media (max-width: 640px) { .site-logo img { height: 40px !important; } }

/* Drawer v2 — the mobile menu mirrors the desktop mega-menu groups */
.drawer-sub .drawer-group-title {
  list-style: none;
  font-family: var(--font-sans, 'Instrument Sans', sans-serif);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary, #870B22);
  margin: 18px 0 6px;
}
.drawer-sub .drawer-group-title:first-of-type { margin-top: 6px; }

/* ==========================================================================
   Footer v2 — brand + 5 balanced columns mirroring the menu
   ========================================================================== */
.footer-main { grid-template-columns: 1.35fr repeat(5, 1fr); gap: 40px 28px; }
.footer-col-heading { white-space: nowrap; }
@media (max-width: 1150px) {
  .footer-main { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; max-width: 480px; }
}
@media (max-width: 900px) {
  .footer-main { grid-template-columns: repeat(2, 1fr); }
}

/* Success message for demo forms — used site-wide (newsletter, contact, recruitment) */
.form-success {
  padding: 28px;
  background: #F4FBF6;
  border: 1px solid #BFE5CB;
  border-radius: 12px;
  color: #1E6B3A;
  font-weight: 600;
  font-size: 15.5px;
}

/* ==========================================================================
   Language selector — single dropdown replacing the Fr | En | Ar pair
   ========================================================================== */
.lang-menu { position: relative; }
.lang-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--color-primary, #870B22);
}
.lang-menu-btn:hover { background: var(--color-bg-pink, #FBEAEE); }
.lang-menu-chev { width: 14px; height: 14px; transition: transform 0.15s ease; }
.lang-menu.is-open .lang-menu-chev { transform: rotate(180deg); }
.lang-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: #ffffff;
  border: 1px solid #EBD8DC;
  border-radius: 12px;
  box-shadow: 0 18px 46px -16px rgba(61, 5, 15, 0.3);
  padding: 6px;
  display: none;
  z-index: 300;
}
.lang-menu.is-open .lang-menu-list { display: block; }
.lang-menu-list a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: #3a2b2f;
  text-decoration: none;
}
.lang-menu-list a:hover { background: var(--color-bg-pink, #FBEAEE); color: var(--color-primary, #870B22); }
.lang-menu-list a.is-current { color: var(--color-primary, #870B22); font-weight: 700; }
.lang-menu-list a.is-current::after { content: " ✓"; }

/* Anchor targets clear the sticky header */
#event-about, #event-infos, .article-body h2[id] { scroll-margin-top: 104px; }
.article-body h3[id] { scroll-margin-top: 104px; }
