/* ========== 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;
  animation: pageLoad 0.8s ease-out;
}

@keyframes pageLoad {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== 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;
  z-index: 1000; /* Augmenter le z-index */
}

.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: 1001; /* Plus élevé que le header */
  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 (History Page) ========== */
main {
  padding: 60px 30px;
  text-align: center;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  position: relative;
  z-index: 1; /* Main avec z-index bas */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: #EDD387;
  animation: glowPulse 3s ease-in-out infinite alternate;
  position: relative;
  z-index: 2; /* Titre au-dessus du contenu */
}

@keyframes glowPulse {
  from {
    text-shadow: 0 0 5px #EDD387, 0 0 10px rgba(237, 211, 135, 0.3);
  }
  to {
    text-shadow: 0 0 15px #EDD387, 0 0 25px rgba(237, 211, 135, 0.5);
  }
}

.container {
  border: 4px solid #EDD387;
  box-shadow: 0 0 15px #EDD387;
  margin: 0 auto;
  width: 95%;
  border-radius: 8px;
  background-color: #00040D;
  padding: 40px;
  animation: containerFloat 6s ease-in-out infinite 1s;
  position: relative;
  overflow: hidden;
  z-index: 1; /* Container avec z-index bas */


}

@keyframes containerFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(237, 211, 135, 0.05), transparent);
  transition: left 0.8s ease;
}

.container:hover::before {
  left: 100%;
}

/* ===== FLEX-BOX SECTIONS ===== */
.flex-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 50px;
  gap: 30px;
  opacity: 0;
  animation: slideInSections 0.8s ease-out forwards;
}

.flex-box:nth-child(1) { animation-delay: 0.6s; }
.flex-box:nth-child(2) { animation-delay: 0.8s; }
.flex-box:nth-child(3) { animation-delay: 1s; }

@keyframes slideInSections {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.flex-box:nth-child(even) {
  flex-direction: row-reverse;
  animation-name: slideInSectionsRight;
}

@keyframes slideInSectionsRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.flex-box:hover {
  transform: translateY(-5px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.txt, .image {
  width: 48%;
}

.txt {
  text-align: left;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.flex-box:hover .txt {
  transform: translateX(5px);
}

.txt h3 {
  color: #EDD387;
  font-size: 1.5rem;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.txt h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #EDD387;
  transition: width 0.3s ease;
}

.flex-box:hover .txt h3::after {
  width: 100%;
}

.flex-box:hover .txt h3 {
  text-shadow: 0 0 10px rgba(237, 211, 135, 0.5);
}

.image {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(237, 211, 135, 0.2), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.image:hover::before {
  left: 100%;
}

.image img {
  width: 100%;
  border-radius: 10px;
  border: 2px solid #EDD387;
  box-shadow: 0 0 8px #EDD387;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: brightness(0.9);
}

.image:hover img {
  transform: scale(1.03);
  box-shadow: 0 0 20px #EDD387, 0 0 30px rgba(237, 211, 135, 0.3);
  filter: brightness(1);
  border-color: #ffd700;
}

/* ========== 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;
}

/* ========== RESPONSIVE (TABLET) ========== */
@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;
    animation: none;
  }

  .flex-box {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    animation: fadeInUp 0.8s ease-out forwards;
  }

  .flex-box:nth-child(1) { animation-delay: 0.6s; }
  .flex-box:nth-child(2) { animation-delay: 0.8s; }
  .flex-box:nth-child(3) { animation-delay: 1s; }

  .txt, .image {
    width: 100%;
  }

  .image img {
    width: 90%;
    margin: 0 auto;
  }

  .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;
    margin-right: 0;
  }

  .copyright {
    font-size: 0.9rem;
    padding-top: 40px;
    text-align: center;
  }
}

/* Scroll animations for better user experience */
@media (prefers-reduced-motion: no-preference) {
  .flex-box {
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .flex-box:nth-child(even) {
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
}