* {
  margin: 0;
  /* padding: 0; */
  box-sizing: border-box;
}

body {
  font-family: "Roboto Slab", serif;
  color: #333;
}

img {
  max-width: 100%;
}

/* Conteneur global pour les menus */
.header-glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Glass effect appliqué au conteneur */
.header-glass.scrolled {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Premier menu */
.top-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: transparent;
}

.email-link a {
  color: #4a5a5c;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.email-link a:hover {
  color: #ddd;
}

/* Menu déroulant langues */
.language-selector {
  position: relative;
}

.language-btn {
  background: none;
  border: none;
  color: #4a5a5c;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.language-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.language-dropdown {
  display: none;
  position: absolute;
  z-index: 1001;
  right: 0;
  top: 100%;
  margin-top: 5px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-width: 100px;
}

.language-dropdown.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-dropdown a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.language-dropdown a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Ligne de séparation */
.separator {
  height: 1px;
  background-color: #a9a9a9;
  margin: 0;
}

/* Ligne de séparation invisible au scroll */
.header-glass.scrolled .separator {
  opacity: 0;
}

/* Deuxième menu - Navigation */
.main-nav {
  display: flex;
  justify-content: flex-end;
  padding: 20px 40px;
  background-color: transparent;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.main-nav a {
  color: #4a5a5c;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: white;
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a:hover {
  color: #ddd;
}

/* Texte plus contrasté sur fond clair */
.header-glass.scrolled .top-menu a,
.header-glass.scrolled .main-nav a,
.header-glass.scrolled .language-btn {
  color: #333;
}

/* Section hero avec image de fond */
.hero {
  height: 100vh;
  background-image: url("../images/background-header.png");
  background-size: cover;
  background-position: bottom;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background: rgba(244, 244, 244, 0.3);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.logo {
  max-width: 400px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  opacity: 0;
  transform: scale(0.5);
  animation: zoomIn 0.8s ease forwards;
  margin: auto;
}

@keyframes zoomIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background-color: #e5a2a1;
  color: white;
  text-decoration: none;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease 0.3s forwards;
}

.cta-button:hover {
  background-color: #ec6d6a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px #ec6d6a;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tagline {
  font-size: 28px;
  font-weight: 300;
  margin-top: 20px;
  max-width: 900px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease 0.6s forwards;
  color: rgba(56, 56, 56, 0.9);
}

/* Sections pour les ancres */
.section {
  min-height: 50vh;
  padding: 80px 40px;
  transition: all 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section:nth-child(even) {
  background-color: #f8f9fa;
}

.section h2 {
  font-size: 36px;
  color: #333;
  font-weight: 400;
  text-align: right;
}

/* -----------------PROJET------------ */
#project-content {
  max-width: 800px;
  font-size: 1.3em;
  line-height: 1.5em;
}

.button-more {
  border: 2px solid #e5a2a1;
  width: max-content;
  padding: 5px 12px;
  float: right;
  margin-top: 20px;
  border-radius: 30px;
  font-size: 15px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.button-more:hover {
  background-color: #e5a2a1;
  color: white;
  cursor: pointer;
}

.project-more-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.5s ease,
    margin-top 0.5s ease,
    opacity 0.5s ease;
  opacity: 0;
  clear: both;
}

#project-content.expanded .project-more-content {
  max-height: 1500px;
  margin-top: 30px;
  opacity: 1;
}

.button-more .arrow-icon {
  transition: transform 0.3s ease;
  display: inline-block;
}

/* #project-content.expanded .button-more .arrow-icon {
  transform: rotate(180deg);
} */

/* -----------------TIMELINE------------ */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 0;
}

:root {
  --line-color: #ddd;
  --point-color: #e5a2a1;
  --text-color: #333;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-color);
  transform: translateY(-50%);
}

.timeline-items {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.timeline-item {
  position: relative;
  text-align: center;
  width: 1px;
}

.timeline-point {
  width: 12px;
  height: 12px;
  background: var(--point-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.timeline-text {
  position: absolute;
  width: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  font-size: 14px;
  color: var(--text-color);
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  background: white;
}

.timeline-item:nth-child(odd) .timeline-text {
  bottom: 30px;
}

.timeline-item:nth-child(even) .timeline-text {
  top: 30px;
}

/* ===== ANIMATION ===== */

.timeline.visible .timeline-point {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.timeline.visible .timeline-text {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.timeline.visible .timeline-item:nth-child(1) * {
  transition-delay: 0.05s;
}

.timeline.visible .timeline-item:nth-child(2) * {
  transition-delay: 0.1s;
}

.timeline.visible .timeline-item:nth-child(3) * {
  transition-delay: 0.15s;
}

.timeline.visible .timeline-item:nth-child(4) * {
  transition-delay: 0.2s;
}

.timeline.visible .timeline-item:nth-child(5) * {
  transition-delay: 0.25s;
}

.timeline.visible .timeline-item:nth-child(6) * {
  transition-delay: 0.3s;
}

.timeline.visible .timeline-item:nth-child(7) * {
  transition-delay: 0.35s;
}

/* ===== TIMELINE STATES ===== */

/* Par défaut (future) */
.timeline-item.future .timeline-point {
  background: white;
  border: 2px solid #ddd;
  opacity: 0.6;
}

.timeline-item.future .timeline-text {
  color: #aaa;
}

/* Étapes passées */
.timeline-item.past .timeline-point {
  background: #e5a2a1;
  border: none;
}

.timeline-item.past .timeline-text {
  color: #777;
}

.timeline-item.past::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: white;
}

/* Étape en cours */
.timeline-item.current .timeline-point {
  background: #e5a2a1;
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 0 6px rgba(229, 162, 161, 0.25);
  animation: pulse 2s infinite;
}

.timeline-item.current .timeline-text {
  color: #333;
  font-weight: 600;
}

/* Animation douce */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 6px rgba(229, 162, 161, 0.25);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(229, 162, 161, 0.1);
  }

  100% {
    box-shadow: 0 0 0 6px rgba(229, 162, 161, 0.25);
  }
}

/* ---------------------------------------NEWS------------------------------- */
.news-container {
  max-width: 800px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
}

.section-header h1 {
  color: #000;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  padding: 32px 0;
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.news-item:hover {
  opacity: 0.6;
}

.news-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: #999;
}

.section .news-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
  text-align: left;
}

.news-excerpt {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* News expanded content */
.news-full-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    margin-top 0.4s ease,
    opacity 0.4s ease;
  opacity: 0;
}

.news-item.expanded .news-full-content {
  max-height: 2000px;
  margin-top: 20px;
  opacity: 1;
}

.news-item.expanded {
  opacity: 1 !important;
}

.news-full-text {
  color: #444;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.news-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ---------------------------------------PARTNERS------------------------------- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 0 20px;
}

.partner-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.partner-card:hover {
  transform: translateY(-5px);
}

.partner-logo {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  transition: all 0.3s ease;
  padding: 20px;
}

.partner-card:hover .partner-logo {
  border-color: #e5a2a1;
  box-shadow: 0 8px 20px rgba(229, 162, 161, 0.15);
}

.partner-logo img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Modal Overlay - FIXED POSITIONING */
.partner-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.partner-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.partner-modal {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin: auto;
}

.partner-modal-overlay.active .partner-modal {
  transform: scale(1) translateY(0);
}

.partner-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #666;
  transition: all 0.3s ease;
  z-index: 10;
}

.partner-modal-close:hover {
  background: #e5a2a1;
  color: white;
  transform: rotate(90deg);
}

.partner-modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 60px 40px 40px;
  text-align: center;
  border-radius: 20px 20px 0 0;
}

.partner-modal-logo {
  width: 200px;
  height: 100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.partner-modal-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-modal-name {
  font-size: 1.8rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.partner-modal-body {
  padding: 40px;
}

.partner-modal-section {
  margin-bottom: 30px;
}

.partner-modal-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5a2a1;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.partner-modal-description {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
}

.partner-modal-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.partner-modal-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.partner-modal-contact-item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.partner-modal-contact-item i {
  color: #e5a2a1;
  width: 20px;
  font-size: 16px;
  text-align: center;
}

.partner-modal-contact-item span {
  color: #666;
  font-size: 0.95rem;
}

.partner-modal-contact-item a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.partner-modal-contact-item a:hover {
  color: #e5a2a1;
}

/* ---------------------------------------FOOTER------------------------------- */
footer {
  background-color: white;
  color: #333;
  padding: 40px 40px 20px;
  text-align: center;
  border-top: 1px solid #e5e5e5;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  width: 100%;
}

.footer-logo img {
  max-width: 340px;
  height: auto;
}

.footer-credit {
  width: 100%;
}

.footer-credit p {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
}

.footer-credit a {
  color: #e5a2a1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-credit a:hover {
  color: #ec6d6a;
}

#logo-erasmus-text {
  font-size: 10px;
  max-width: 326px;
  margin: auto;
  text-align: justify;
  color: #034ea2;
}

#cc-logo {
  max-width: 100%;
  width: 150px;
  margin-top: 30px;
}

/* -----------------PUBLICATIONS------------ */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.publication-card {
  /* display: flex; */
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: white;
  transition: all 0.3s ease;
}

.publication-card:hover {
  border-color: #e5a2a1;
  box-shadow: 0 4px 16px rgba(229, 162, 161, 0.15);
  transform: translateY(-2px);
}

.publication-icon {
  font-size: 2rem;
  color: #e5a2a1;
  flex-shrink: 0;
}

.publication-info {
  flex: 1;
}

.publication-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.publication-desc {
  font-size: 0.9rem;
  color: #777;
  line-height: 1.5;
}

.publication-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #e5a2a1;
  color: white;
  text-decoration: none;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.publication-download:hover {
  background-color: #ec6d6a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 109, 106, 0.3);
}

@media (max-width: 768px) {
  .publication-card {
    flex-wrap: wrap;
  }

  .publication-download {
    width: 100%;
    justify-content: center;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h1 {
    font-size: 1.75rem;
  }

  .news-item {
    padding: 24px 0;
  }

  .news-title {
    font-size: 1.125rem;
  }

  .top-menu,
  .main-nav {
    padding: 15px 20px;
  }

  .main-nav ul {
    gap: 15px;
    flex-wrap: wrap;
  }

  .main-nav a {
    font-size: 13px;
  }

  .main-nav {
    justify-content: center;
    padding: 12px 10px;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
  }

  .main-nav a {
    font-size: 14px;
    /* padding: 6px 10px; */
    padding: 6px 0px;
    white-space: nowrap;
  }

  .top-menu {
    padding: 10px 15px;
  }

  .header-glass {
    position: static;
    height: 95px;
  }

  .separator {
    display: none;
  }

  body {
    padding-top: 0;
  }

  .language-btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .hero {
    margin-top: 0;
    height: calc(100vh - 95px);
  }

  .logo {
    width: 150px;
    height: 150px;
    font-size: 20px;
  }

  .tagline {
    font-size: 20px;
    padding: 0 20px;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 14px;
  }

  .timeline {
    padding: 40px 0;
  }

  .timeline-line {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
  }

  .timeline-items {
    flex-direction: column;
    gap: 48px;
  }

  .timeline-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }

  .timeline-point {
    position: relative;
    top: auto;
    left: auto;
    transform: scale(0.6);
    margin-bottom: 12px;
  }

  .timeline.visible .timeline-point {
    transform: scale(1);
  }

  .timeline-text {
    position: static;
    width: 100%;
    max-width: 260px;
    text-align: center;
    transform: translateY(10px);
    opacity: 0;
  }

  .timeline.visible .timeline-text {
    transform: translateY(0);
    opacity: 1;
  }

  .timeline-item:nth-child(odd) .timeline-text,
  .timeline-item:nth-child(even) .timeline-text {
    top: auto;
    bottom: auto;
  }

  .partners-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
  }

  .partner-logo {
    height: 120px;
  }

  /* Modal responsive */
  .partner-modal {
    max-height: 90vh;
    border-radius: 16px;
  }

  .partner-modal-header {
    padding: 50px 20px 30px;
  }

  .partner-modal-logo {
    width: 150px;
    height: 75px;
  }

  .partner-modal-name {
    font-size: 1.4rem;
  }

  .partner-modal-body {
    padding: 20px;
  }

  .partner-modal-description {
    font-size: 0.95rem;
  }

  .partner-modal-overlay {
    padding: 10px;
  }

  footer {
    padding: 30px 20px 15px;
  }

  .footer-logo img {
    max-width: 290px;
  }
}
