
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500&family=Open+Sans:wght@400&display=swap');

body {
  margin: 0;
  background: #002742;
  color: #ffffff;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  color: #ffffff;
}

a, p, span, li, div {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  color: #ffffff;
}

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

header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  align-items: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav ul li a {
  color: #aaa;
  text-decoration: none;
  font-weight: 300;
}

nav ul li a:hover {
  color: white;
}

main.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 500px;
  overflow: hidden;
}

.card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.3s ease;
}

.card:hover .card-hover {
  opacity: 1;
}

.card-hover h2 {
  font-size: 24px;
  margin-bottom: 15px;
}

.card-hover .desc {
  font-size: 14px;
  color: #ddd;
  flex-grow: 1;
}

.card-hover .buttons {
  margin-top: 20px;
}

.card-hover button {
  padding: 10px 20px;
  margin-right: 10px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  background: white;
  color: black;
  border-radius: 30px;
  transition: 0.2s ease;
}

.card-hover button.outline {
  background: transparent;
  border: 1px solid white;
  color: white;
}

.card-hover button:hover {
  opacity: 0.8;
}

.card-hover .meta {
  font-size: 12px;
  color: #aaa;
  margin-top: 20px;
}

.dark-header {
  background: #002742;
  padding: 20px 60px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.header-left .logo {
  height: 40px;
}

.header-center {
  justify-self: center;
}

.header-center ul {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-center ul li a {
  text-decoration: none;
  color: #666;
  font-weight: 300;
  font-size: 14px;
}

.header-center ul li a.active {
  color: #fff;
}

.hamburger {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 22px;
  background: #000;
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  text-align: center;
  line-height: 36px;
  cursor: pointer;
  z-index: 1001;
}

.overlay-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 33.33%;
  height: 100%;
  background: #002742;
  color: white;
  transition: right 0.4s ease;
  z-index: 1000;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

body.menu-open .overlay-menu {
  right: 0;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overlay-header .logo {
  height: 40px;
}

.close-btn {
  font-size: 30px;
  cursor: pointer;
}

.overlay-links {
  list-style: none;
  padding: 40px 0;
  flex-grow: 1;
}

.overlay-links li {
  margin-bottom: 20px;
}

.overlay-links a {
  color: white;
  font-size: 20px;
  text-decoration: none;
}

.overlay-footer {
  border-top: 1px solid #444;
  padding-top: 20px;
  font-size: 14px;
}

.menu-toggle {
  transition: opacity 0.3s ease;
}

body.menu-open .menu-toggle {
  opacity: 0;
  pointer-events: none;
}

.dark-header {
  background: #ffffff !important;
}

.dark-header ul li a,
.dark-header ul li a.active,
.dark-header ul li a:hover {
  color: #002742 !important;
}

.dark-header .hamburger {
  background: #002742 !important;
  color: #ffffff !important;
}


.dark-header {
  padding: 10px 60px !important; /* Padding réduit pour garder la hauteur initiale */
  align-items: center !important;
}

.dark-header .logo {
  height: 80px !important; /* Logo doublé uniquement */
  object-fit: contain !important; /* évite d'impacter la hauteur de la barre */
  margin-top: -20px !important; /* ajustement fin pour recentrer verticalement */
  margin-bottom: -20px !important;
}

.dark-header .hamburger {
  top: 15px !important; /* Ajustement précis pour alignement vertical correct */
}


/* Responsive mobile adjustments */
@media screen and (max-width: 768px) {
  
  body {
    font-size: 14px;
  }

  header.dark-header {
    padding: 10px 20px !important;
    grid-template-columns: 1fr auto !important;
  }

  .header-center {
    display: none !important;
  }

  .hamburger {
    top: 15px !important;
    right: 15px !important;
  }

  main.grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    padding: 15px !important;
  }

  .card {
    height: 250px !important;
  }

  .card-hover {
    padding: 15px !important;
  }

  .card-hover h2 {
    font-size: 20px !important;
  }

  .card-hover button {
    padding: 8px 15px !important;
  }

  .overlay-menu {
    width: 100% !important;
    padding: 20px !important;
  }
}
