body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9fafc;
  color: #222;
}

/* ===== En-tête générale Accueil ===== */
header {
  position: relative;
  height: 350px;
  overflow: hidden;
  margin-bottom: 1.2em;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 10px rgba(44,62,80,0.08);
}

/* ===== En-tête avec image fond pour les rubriques (sauf accueil) ===== */
.header-section-bg {
  position: relative;
  min-height: 260px;
  background: linear-gradient(to bottom, rgba(41,128,185,0.78), rgba(255,255,255,0.10)),
              url('mon-fond2.png') center center/cover no-repeat;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 10px rgba(44,62,80,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.header-section-bg h1 {
  color: #fff;
  font-size: 2.4em;
  padding: 2.3em 0 0.7em 0;
  text-shadow: 2px 2px 18px #2227;
  margin: 0;
}
.header-section-bg nav ul {
  background: rgba(255,255,255,0.16);
  border-radius: 18px;
  padding: 0.2em 1em;
  margin-bottom: 1em;
}
.header-section-bg nav a {
  color: #fff;
}

/* ===== Accueil : slider fond d'écran ===== */
.slider-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
}
.slider-bg img {
  position: absolute;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(.77,0,.18,1);
}
.slider-bg img.active {
  opacity: 1;
  z-index: 2;
}
.header-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(44,62,80,0.73) 10%, rgba(41,128,185,0.30) 80%, rgba(255,255,255,0.01) 100%);
}

/* ===== Styles généraux menu ===== */
header h1 {
  margin: 0.2em 0 0.1em 0;
  font-size: 2.7em;
  letter-spacing: 2px;
  font-weight: 700;
  color: #fff;
  text-shadow: 2px 2px 18px #2227;
}
header nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5em;
  margin: 1em 0 0 0;
  padding: 0;
  list-style: none;
}
header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 1000;
  font-size: 1.1em;
  padding: 0.2em 0.7em;
  border-radius: 20px;
  transition: background 0.2s;
}
header nav a:hover,
header nav a.active {
  background: rgba(255,255,255,0.18);
}

/* ===== Réseaux sociaux dans le header ===== */
.social-links {
  display: flex;
  gap: 1em;
  justify-content: center;
  margin: 1.2em 0 0.2em 0;
}
.social-links a {
  color: #fff;
  background: #2980b9;
  font-size: 1.45em;
  width: 2.3em;
  height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0 2px 6px #2c3e5022;
  text-decoration: none;
}
.social-links a:hover {
  background: #fff;
  color: #2980b9;
  transform: scale(1.14) rotate(-7deg);
  box-shadow: 0 4px 14px #2980b933;
}

/* ===== Main ===== */
main {
  max-width: 950px;
  margin: 2em auto;
  background: #fff;
  padding: 2em 2em 2em 2em;
  box-shadow: 0 6px 30px rgba(44,62,80,0.07);
  border-radius: 14px;
}

h2 {
  color: #2980b9;
  margin-top: 1.4em;
}
section {
  margin-bottom: 2em;
}
ul {
  list-style: disc inside;
  margin: 1em 0 1em 1em;
}
footer {
  text-align: center;
  color: #fff;
  background: linear-gradient(to right, #2980b9, #2c3e50);
  padding: 1em 0;
  font-size: 1em;
  margin-top: 2em;
  border-radius: 0 0 14px 14px;
}

/* --- Publications --- */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 2.5em;
}

.publication {
  display: flex;
  background: #f4f8fc;
  border-radius: 10px;
  box-shadow: 0 2px 16px #2980b911;
  overflow: hidden;
  margin-bottom: 1em;
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.publication:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px #2980b933;
}

.pub-img {
  min-width: 140px;
  max-width: 170px;
  background: #e7eef6;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
}

.pub-img img {
  width: 100%;
  height: 95%;
  object-fit: contain;
  display: block;
  border-radius: 10px 0 0 10px;
  box-shadow: 0 0 6px #c6d7e622;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.pub-details {
  flex: 1;
  padding: 1.5em 1.2em;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pub-details h2 {
  margin-top: 0;
  color: #2980b9;
  font-size: 1.15em;
}

.pub-details p {
  margin: 0.4em 0;
}

.pub-links {
  margin-top: 1em;
  display: flex;
  gap: 1.2em;
}

.pub-links a {
  background: #2980b9;
  color: #fff;
  padding: 0.32em 1.1em;
  border-radius: 16px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.98em;
  transition: background 0.2s;
  display: inline-block;
}
.pub-links a:hover {
  background: #145078;
}

/* --- Formations --- */
.formations-list {
  display: flex;
  flex-direction: column;
  gap: 2em;
}
.formation-card {
  display: flex;
  align-items: center;
  background: #f7fafc;
  border-radius: 12px;
  box-shadow: 0 2px 16px #2980b911;
  padding: 1em;
  transition: transform 0.3s;
  margin-bottom: 0.5em;
}
.formation-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px #2980b933;
}
.formation-logo {
  min-width: 80px;
  max-width: 100px;
  padding: 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.formation-logo img {
  width: 70px;
  max-width: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 0 6px #d5e0ec22;
  padding: 4px;
}
.formation-details {
  flex: 1;
  padding-left: 1.5em;
}
.formation-details h2 {
  margin: 0.1em 0 0.3em 0;
  font-size: 1.22em;
  color: #2980b9;
}
.formation-details a {
  color: #145078;
  text-decoration: underline;
}
.formation-details p {
  margin: 0.2em 0;
}

/* --- Excursions --- */
.excursions-list {
  display: flex;
  flex-direction: column;
  gap: 2.5em;
}

.excursion-card {
  background: #f7fafc;
  border-radius: 12px;
  box-shadow: 0 2px 16px #2980b911;
  padding: 1.5em 1em 1em 1em;
  transition: transform 0.3s;
  margin-bottom: 0.5em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.excursion-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px #2980b933;
}

.excursion-header {
  display: flex;
  align-items: baseline;
  gap: 2em;
  width: 100%;
  flex-wrap: wrap;
}

.excursion-header h2 {
  margin: 0 0 0.15em 0;
  font-size: 1.22em;
  color: #2980b9;
  flex: 1;
}

.excursion-period {
  font-size: 1em;
  color: #555;
  background: #eaf3fb;
  border-radius: 12px;
  padding: 0.2em 1em;
  margin-left: auto;
}

.excursion-location {
  margin: 0.3em 0 0.7em 0;
  font-size: 1em;
}
.excursion-location a {
  color: #145078;
  text-decoration: underline;
  font-weight: 500;
}

.excursion-summary {
  margin-bottom: 1em;
}

.excursion-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em;
  margin-top: 0.3em;
  margin-bottom: 0.5em;
}

.excursion-gallery img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px #2c3e5022;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  transition: transform 0.18s;
}

.excursion-gallery img:hover {
  transform: scale(1.12) rotate(-1.5deg);
  box-shadow: 0 6px 16px #2980b955;
}

/* --- Recherche --- */
.research-list {
  display: flex;
  flex-direction: column;
  gap: 2.5em;
}
.research-card {
  background: #f7fafc;
  border-radius: 12px;
  box-shadow: 0 2px 16px #2980b911;
  padding: 1.5em 1em 1em 1em;
  margin-bottom: 0.5em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s;
}
.research-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px #2980b933;
}
.research-header {
  display: flex;
  align-items: baseline;
  gap: 2em;
  width: 100%;
  flex-wrap: wrap;
}
.research-header h2 {
  margin: 0 0 0.15em 0;
  font-size: 1.15em;
  color: #2980b9;
  flex: 1;
}
.research-type {
  font-size: 1em;
  color: #555;
  background: #eaf3fb;
  border-radius: 12px;
  padding: 0.2em 1em;
  margin-left: auto;
}
.research-infos {
  display: flex;
  gap: 2em;
  margin-bottom: 0.7em;
  font-size: 1em;
  flex-wrap: wrap;
}
.research-summary {
  margin-bottom: 1em;
}
.research-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em;
  margin-top: 0.3em;
  margin-bottom: 0.5em;
}
.research-gallery img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px #2c3e5022;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  transition: transform 0.18s;
}
.research-gallery img:hover {
  transform: scale(1.12) rotate(-1.5deg);
  box-shadow: 0 6px 16px #2980b955;
}

/* --- Evénements récents (accueil) --- */
.evenements {
  margin-top: 3em;
  background: #f7faff;
  border-radius: 14px;
  padding: 2em 1.2em;
  box-shadow: 0 2px 16px #2980b911;
}
.evenements-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  margin-bottom: 1.2em;
  justify-content: center;
}
.evenement-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px #2980b911;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 240px;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 0.7em;
}
.evenement-card:hover {
  transform: scale(1.04) rotate(-1deg);
  box-shadow: 0 8px 32px #2980b933;
}
.evenement-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}
.evenement-card div {
  padding: 1em;
  text-align: center;
}
.evenement-card h3 {
  margin: 0.3em 0;
  font-size: 1.1em;
  color: #2c3e50;
}
.evenement-gallery {
  display: flex;
  gap: 0.8em;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.3em;
}
.evenement-gallery img {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px #2c3e5022;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  transition: transform 0.18s;
}
.evenement-gallery img:hover {
  transform: scale(1.14) rotate(-2deg);
  box-shadow: 0 6px 16px #2980b955;
}

/* --- Autres blocs (compétences, expériences, responsive) --- */
.animated-section {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 1s, transform 1.2s cubic-bezier(.77,0,.18,1);
}
.animated-section.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 900px) {
  main {
    padding: 1em 0.4em;
  }
  .pub-details {
    padding: 1em 0.7em;
  }
  .formation-details {
    padding-left: 1em;
  }
  .research-infos {
    gap: 1em;
  }
}

@media (max-width: 700px) {
  .publication {
    flex-direction: column;
    align-items: center;
  }
  .pub-img img {
    border-radius: 10px 10px 0 0;
  }
  .pub-img, .pub-img img {
    min-width: 100%;
    max-width: 100%;
    height: 120px;
  }
  .pub-details {
    padding: 1em 0.5em;
  }
  .formation-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .formation-details {
    padding-left: 0;
    padding-top: 0.7em;
  }
  .excursion-gallery,
  .research-gallery {
    justify-content: flex-start;
  }
  .excursion-gallery img,
  .research-gallery img {
    width: 80px;
    height: 60px;
  }
  .excursion-header,
  .research-header {
    flex-direction: column;
    gap: 0.4em;
  }
  .research-infos {
    flex-direction: column;
    gap: 0.3em;
  }
  .evenements-list {
    flex-direction: column;
    gap: 1em;
    align-items: center;
  }
  .evenement-card {
    width: 95%;
  }
  .evenement-gallery img {
    width: 70px;
    height: 46px;
  }
}
