/* ========== GLOBAL STYLES ========== */
* {
  color: white;
  font-size: 1.3rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #131B2D;
  min-height: 100vh;
  border: 3px solid #EDD387;
  border-radius: 10px;
  overflow-x: hidden;
}

/* ========== HEADER ========== */
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 60px;
    margin-bottom: 40px;
    flex-wrap: nowrap;
    background-color: #131B2D;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header img {
    height: 180px; /* Logo agrandi */
    width: auto;
    transition: transform 0.3s ease;
}

header img:hover {
    transform: scale(1.05);
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

nav a {
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #EDD387;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #EDD387;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #131B2D;
    border: 2px solid #EDD387;
    box-shadow: 0 0 10px  #EDD387;
    border-radius: 6px;
    min-width: 180px;
    padding: 10px 0;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dropdown:hover .content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown .content a {
    display: block;
    padding: 10px 20px;
    text-align: left;
    color: white;
    transition: all 0.3s ease;
}

.dropdown .content a:hover {
    background-color: #EDD387;
    color: #131B2D;
    padding-left: 25px;
}


/* ========== DROPDOWN MENU ========== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown .content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #131B2D;
  border: 2px solid #EDD387;
  box-shadow: 0 0 10px #EDD387;
  border-radius: 6px;
  min-width: 180px;
  padding: 10px 0;
  z-index: 100;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.dropdown:hover .content {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown .content a {
  display: block;
  padding: 10px 20px;
  text-align: left;
  transition: all 0.2s ease;
  transform: translateX(-10px);
  opacity: 0;
}

.dropdown:hover .content a {
  transform: translateX(0);
  opacity: 1;
}

.dropdown .content a:nth-child(1) { transition-delay: 0.1s; }
.dropdown .content a:nth-child(2) { transition-delay: 0.15s; }
.dropdown .content a:nth-child(3) { transition-delay: 0.2s; }
.dropdown .content a:nth-child(4) { transition-delay: 0.25s; }

.dropdown .content a:hover {
  background-color: #EDD387;
  color: #131B2D;
  transform: translateX(5px);
}

/* ========== MAIN SECTION ========== */
main {
  padding: 80px 40px;
  text-align: center;
  animation: fadeInUp 0.8s ease-out 0.3s both;
  position: relative;
  z-index: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  font-size: 1.5rem;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from {
    text-shadow: 0 0 5px #EDD387;
  }
  to {
    text-shadow: 0 0 15px #EDD387, 0 0 20px #EDD387;
  }
}

.container {
  position: relative;
  /* LOWER z-index so social media can appear above it */
  z-index: 10;
  box-shadow: 0 0 100px #ffffff;
  margin: 0 auto;
  height: 800px;
  width: 95%;
  border-radius: 50px;
  background-color: #00040D;
  padding: 90px 0;
  clip-path: polygon(50% 0, 100% 35%, 100% 100%, 50% 85%, 0 99%, 0% 35%);
  filter: drop-shadow(0 0 25px #EDD387);
  animation: containerFloat 6s ease-in-out infinite;
  overflow: visible;
}

@keyframes containerFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.team-mates {
  position: relative;
  animation: slideInLeft 0.8s ease-out 0.5s both;
}

.team-mates-number2 {
  animation: slideInRight 0.8s ease-out 0.7s both;
}

.team-mates-number3 {
  animation: slideInLeft 0.8s ease-out 0.9s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.team-mates,
.team-mates-number2,
.team-mates-number3 {
  background-color: #928971;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  width: 450px;
  height: 200px;
  margin: 0 auto;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 0;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* HIGHER z-index than container */
  z-index: 20;
  border: 2px solid transparent;
  overflow: visible;
}

.team-mates:hover,
.team-mates-number2:hover,
.team-mates-number3:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 40px #EDD387, 0 0 60px rgba(237, 211, 135, 0.3);
  border-color: #EDD387;
}

.container .team-mates {
  margin-bottom: 60px;
}

.container .other-team-mates {
  display: flex;
  justify-content: center;
  gap: 80px;
}

/* ========== NAME + FUNCTION ========== */
.name-fonction {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  position: relative;
}

.name {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #131B2D;
  box-shadow: 0 0 15px #131B2D;
  font-size: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.name::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(237, 211, 135, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.name:hover::before {
  opacity: 1;
  animation: shine 1.5s ease;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.name:hover {
  transform: scale(1.1) rotate(360deg);
  border-color: #EDD387;
  box-shadow: 0 0 20px #EDD387, 0 0 30px rgba(237, 211, 135, 0.5);
}

.fonction {
  background-color: #CDBE91;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 10px 20px;
  color: black;
  font-size: 1rem;
  width: 220px;
  text-align: center;
  transition: all 0.3s ease;
  transform: translateY(0);
}

.team-mates:hover .fonction,
.team-mates-number2:hover .fonction,
.team-mates-number3:hover .fonction {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ========== SOCIAL MEDIA DROPDOWN ========== */
.social-medias {
  background-color: #E1E1E1;
  color: black;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  width: 85%;
  padding: 15px 0;
  opacity: 0;
  transform: translate(-50%, -10px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 50%;
  /* AUGMENTER le z-index */
  z-index: 10000; /* Augmenté à 10000 */
  overflow: visible;
}

.team-mates:hover .social-medias,
.team-mates-number2:hover .social-medias,
.team-mates-number3:hover .social-medias {
  opacity: 1;
  transform: translate(-50%, 10px) scale(1);
  pointer-events: auto;
}


.team-mates,
.team-mates-number2,
.team-mates-number3 {
  background-color: #928971;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  width: 450px;
  height: 200px;
  margin: 0 auto;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 0;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* RÉDUIRE le z-index des cartes */
  z-index: 100; /* Réduit à 100 */
  border: 2px solid transparent;
  overflow: visible;
}

/* ICONS */
.social-medias .links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  margin: 8px 30px;
  color: black;
  transition: all 0.3s ease;
  transform: translateX(0);
}

.social-medias .links:hover {
  transform: translateX(5px);
}

.social-medias span {
  font-size: 18px;
  color: black;
  transition: all 0.3s ease;
}

.social-medias .links:hover span {
  color: #131B2D;
  font-weight: bold;
}

.fa-instagram {
  color: transparent;
  background: radial-gradient(circle at 30% 107%, 
    #fdf497 0%, #fdf497 5%, 
    #fd5949 45%, #d6249f 60%, #285AEB 90%);
  -webkit-background-clip: text;
  background-clip: text;
  transition: all 0.3s ease;
}

.fa-x-twitter {
  color: #1DA1F2;
  transition: all 0.3s ease;
}

.fa-linkedin {
  color: #0077B5;
  transition: all 0.3s ease;
}

.social-medias i {
  font-size: 1.5rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: scale(1);
}

.social-medias i:hover {
  transform: scale(1.3) rotate(10deg);
  filter: brightness(1.2);
}

/* ========== FOOTER ========== */
footer {
    padding: 50px 40px;
}

.footer-container {
    height: auto;
    border: 4px solid #EDD387;
    box-shadow: 0 0 15px #EDD387;
    margin: 0 auto;
    width: 95%;
    border-radius: 8px;
    background-color: #00040D;
    padding: 40px;
}

.footer-container img {
    height: 180px;
    width: auto;
    transition: transform 0.3s ease;
}

.footer-container img:hover {
    transform: scale(1.05);
}

.footer-container .logo-contact {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.contact {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-right: 20px;
    font-size: 1.4rem;
}

.contact h3 {
    color: #EDD387;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 600;
}

.email {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.email i {
    color: #EDD387;
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.email:hover i {
    transform: scale(1.2);
}

.footer-container .copyright {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-top: 40px;
    color: #EDD387;
}

/* ========== TABLET RESPONSIVE ========== */
@media (max-width: 1440px) {
  body {
    font-size: 1rem;
  }

  header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    padding: 10px 20px;
  }

  .logo {
    margin: 30px 5px;
    width: 110px;
    height: 110px;
  }

  nav {
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .container {
    width: 90%;
    padding: 30px 20px;
    height: auto;
    clip-path: none;
    animation: none;
    overflow: visible;
    z-index: 10;
  }

  /* Layout like mockup */
  .container .team-mates {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
  }

  .container .other-team-mates {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
  }

  .team-mates,
  .team-mates-number2,
  .team-mates-number3 {
    width: 320px;
    height: 190px;
    animation: fadeInUp 0.8s ease-out 0.7s both;
    overflow: visible;
    z-index: 800;
  }

  .team-mates,
  .team-mates-number2,
  .team-mates-number3 {
    z-index: 100; /* Même valeur pour tablette */
  }
  
  .social-medias {
    z-index: 10000; /* Même valeur pour tablette */
  }
}


  .team-mates-number3 {
    animation: fadeInUp 0.8s ease-out 0.9s both;
  }

  .social-medias {
    width: 250px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 10px);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    overflow: visible;
  }

  .team-mates:hover .social-medias,
  .team-mates-number2:hover .social-medias,
  .team-mates-number3:hover .social-medias {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .name-fonction {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .name {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  .fonction {
    font-size: 0.9rem;
    width: 200px;
  }

  .footer-container {
    width: 90%;
    height: auto;
    padding: 30px 20px;
  }

  .logo-contact {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .contact {
    align-items: center;
    font-size: 1rem;
  }

  .copyright {
    font-size: 0.9rem;
    padding-top: 40px;
    text-align: center;
  }


/* Loading animation for initial page load */
@keyframes pageLoad {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

body {
  animation: pageLoad 0.8s ease-out;
}