:root {
  --navy: #0b1f3a;
  --navy-2: #102b4f;
  --gold: #c9a227;
  --gold-2: #e0bd48;
  --cream: #f8f5ef;
  --white: #ffffff;
  --text: #243044;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 20px 60px rgba(11, 31, 58, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
}

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

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

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.section-padding {
  padding: 90px 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 31, 58, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar {
  width: min(1220px, calc(100% - 32px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--gold-2);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--white);
  font-weight: 600;
}

.nav-menu a {
  opacity: 0.92;
  transition: 0.2s ease;
}

.nav-menu a:hover {
  color: var(--gold-2);
}

.nav-cta {
  padding: 11px 18px;
  background: var(--gold);
  color: var(--navy) !important;
  border-radius: 999px;
  opacity: 1 !important;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--white);
  margin: 6px auto;
  border-radius: 5px;
  transition: 0.2s ease;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("assets/img/chapel.jpg") center/cover no-repeat;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,31,58,0.92), rgba(11,31,58,0.67), rgba(11,31,58,0.35)),
    radial-gradient(circle at 20% 30%, rgba(201,162,39,0.22), transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding-top: 90px;
  max-width: 900px;
  margin-left: max(20px, calc((100vw - 1160px) / 2));
  margin-right: 20px;
  animation: fadeUp 0.9s ease both;
}

.hero-logos {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.hero-logos img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.8);
  background: var(--white);
}

.eyebrow,
.section-kicker {
  color: var(--gold-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  max-width: 950px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-text {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 12px 30px rgba(201,162,39,0.28);
}

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

.btn-outline {
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.full-width {
  width: 100%;
}

.center-btn {
  margin: 34px auto 0;
  display: flex;
}

.prestige {
  background: var(--gold);
  color: var(--navy);
  font-weight: 900;
}

.prestige-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  font-size: 1.05rem;
}

.stats {
  padding-top: 60px;
}

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

.stats-grid article {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stats-grid strong {
  display: block;
  color: var(--navy);
  font-size: 2.4rem;
  line-height: 1;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 700;
}

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-heading h2 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  margin-bottom: 16px;
}

.section-heading p:not(.section-kicker) {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading.light h2,
.section-heading.light p:not(.section-kicker) {
  color: var(--white);
}

.timeline {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 2px var(--navy);
}

.timeline-item:last-child::before {
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-date {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.timeline-item h3 {
  color: var(--navy);
  margin-bottom: 6px;
}

.timeline-item p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.timeline-item h3,
.history-more h3 {
  color: var(--navy);
  margin-bottom: 8px;
}

.history-more {
  display: none;
  max-width: 920px;
  margin: 28px auto 0;
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}

.history-more.open {
  display: block;
}

.formation-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 30px;
}

.formation-steps span {
  background: var(--cream);
  color: var(--navy);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.rectors-list {
  columns: 2;
  column-gap: 35px;
}

.rectors-list p {
  break-inside: avoid;
  margin-bottom: 10px;
}

.formations-section,
.support-section {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
}

.cards-grid {
  display: grid;
  gap: 26px;
}

.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.program-card,
.support-card {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}

.program-card i,
.support-card i,
.team-card i {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,162,39,0.14);
  color: var(--gold);
  font-size: 1.55rem;
  margin-bottom: 18px;
}

.program-card h3,
.support-card h3,
.team-card h3 {
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.25;
}

.program-card ul {
  margin-top: 18px;
  padding-left: 22px;
}

.program-card li {
  margin-bottom: 7px;
  font-weight: 650;
}

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

.team-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  min-height: 245px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: 0.2s ease;
}

.team-card:hover,
.event-card:hover,
.program-card:hover,
.support-card:hover {
  transform: translateY(-5px);
}

.team-card p {
  color: var(--muted);
}

.events-grid {
  display: grid;
  gap: 22px;
}

.event-card {
  background: var(--white);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 115px 1fr;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: 0.2s ease;
}

.event-date {
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.event-date strong {
  font-size: 2.7rem;
  line-height: 1;
  color: var(--gold-2);
}

.event-body {
  padding: 26px;
}

.event-body h3 {
  color: var(--navy);
  margin-bottom: 8px;
}

.event-body span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.contact-info,
.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.contact-info {
  display: grid;
  gap: 20px;
}

.contact-info article {
  display: flex;
  gap: 16px;
}

.contact-info i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,162,39,0.14);
  color: var(--gold);
  flex: 0 0 auto;
}

.contact-info h3,
.contact-form h3 {
  color: var(--navy);
}

.contact-info a {
  color: var(--navy);
  font-weight: 700;
  word-break: break-all;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--navy);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  font: inherit;
  outline: none;
  background: #fbfbfb;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,162,39,0.14);
}

.form-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer {
  background: #071529;
  color: rgba(255,255,255,0.84);
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 40px;
}

.footer h3,
.footer h4 {
  color: var(--white);
  margin-bottom: 14px;
}

.footer a {
  display: block;
  color: rgba(255,255,255,0.78);
  margin-bottom: 8px;
}

.footer a:hover {
  color: var(--gold-2);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 20px;
  margin-top: 42px;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 30;
}

.back-to-top.show {
  display: flex;
}

/* Scroll animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Navbar renforcée au scroll */
.site-header.scrolled {
  background: rgba(11, 31, 58, 0.98);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 82px;
    left: 0;
    right: 0;
    background: rgba(11,31,58,0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li a {
    display: block;
    padding: 14px 0;
  }

  .nav-menu .nav-cta {
    background: transparent;
    color: var(--gold-2) !important;
    border-radius: 0;
    padding: 14px 0;
    opacity: 0.92;
  }

  .stats-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid,
  .two-cols,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .section-padding {
    padding: 65px 0;
  }

  .navbar {
    height: 72px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand strong {
    font-size: 0.92rem;
  }

  .nav-menu {
    top: 72px;
  }

  .hero {
    min-height: 92vh;
  }

  .hero-content {
    padding-top: 88px;
    margin-left: 14px;
  }

  .hero-logos img {
    width: 62px;
    height: 62px;
  }

  .hero-actions,
  .btn {
    width: 100%;
  }

  .stats-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-item::before {
    left: -23px;
  }

  .rectors-list {
    columns: 1;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-date {
    min-height: 92px;
    flex-direction: row;
    gap: 10px;
  }

  .contact-info,
  .contact-form,
  .program-card,
  .support-card,
  .history-more {
    padding: 24px;
  }
}
