/* ===========================
   Header principal
=========================== */
.header {
  font-size: 18px;
  background-image: url('../images/DegHD.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 150;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-wrap: nowrap;
}

.headerAR {
  font-size: 18px;
  background-image: url('../images/DegHG.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 150;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-wrap: nowrap;
}


.left-group {
  display: flex;
  align-items: center;
  gap: 20px;
  /* espace entre logo et menu */
}

/* ===========================
   Logo
=========================== */
.logo {
  display: flex;
  align-items: center;
  border-radius: 4px;
  font-weight: bold;
  color: rgb(69, 69, 69);
}

.bu-logo {
  height: 40px;
  border-radius: 4px;
  margin: 0 4px;
}

/* ===========================
   Menu principal
=========================== */
.menu {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  color: white;
  flex: 0 0 auto;
}

.menu-txt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
}

.txt-label {
  color: rgb(69, 69, 69);
  text-decoration: none;
  font-size: 18px;
}

.menu-txt:hover {
  background-image: url('../images/DegHG.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* ===========================
   Sous-menu
=========================== */
.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-image: url('../images/DegHG.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 4px;
  width: fit-content;
  white-space: nowrap;
  box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  flex-direction: column;
  z-index: 50;
}

.menu-txt:hover .sub-menu {
  opacity: 1;
  pointer-events: auto;
}

.sub-label {
  display: block;
  padding: 10px 15px;
  color: rgb(69, 69, 69);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.sub-label:hover {
  background-image: url('../images/DegHD.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* ===========================
   Langue
=========================== */
.lang-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-link img {
  height: 35px;
  width: auto;
  display: block;
  position: relative;
}

/* ===========================
   Compteur visiteurs
=========================== */
/* Groupe droit : burger + visitor */
.right-group {
  display: flex;
  align-items: center;
  /* vertical centré */
  gap: 20px;
  /* espace entre burger et visitor */
}

/* Burger */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 3px;
  background-color: rgb(69, 69, 69);
  border-radius: 2px;
  transition: 0.3s;
}

/* Visitor */
.visitor-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  cursor: default;
  flex-shrink: 0;
}

/*LOGO OPAC*/
.opac-img {
  margin-top: 150px;
  margin-right: 10px;
  width: 200px;
  height: auto;
  cursor: pointer;
  background-color: rgba(223, 220, 12, 0.4);
  border-radius: 100px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.opac-img:hover {
  transform: scale(1.2);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  background-image: url('../images/DegHD.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* ===========================
   Responsive
=========================== */
@media screen and (max-width: 1024px) {
  .menu {
    flex-wrap: wrap;
    /*justify-content: center;*/
    justify-content: flex-start;
  }

  .menu-txt {
    margin: 5px;
  }
}

@media screen and (max-width: 768px) {
  .header {
    /*flex-direction: column;*/
    align-items: flex-start;
    padding: 10px 15px;
  }

  .menu {
    flex-direction: column;
    width: 100%;
  }

  .menu-txt {
    width: 100%;
  }

  .sub-menu {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
  }

  .visitor-counter {
    margin-left: 0;
    margin-top: 5px;
  }

  .opac-img {
    margin-top: 10px;
    margin-right: 10px;
    width: 150px;
    /* réduit la largeur */
  }
}

@media screen and (max-width: 480px) {
  .txt-label {
    font-size: 16px;
  }

  .sub-label {
    font-size: 14px;
    padding: 8px 10px;
  }

  .lang-link img {
    height: 30px;
  }

  .bu-logo {
    height: 30px;
  }

  .opac-img {
    width: 100px;
    margin-top: 10px;
    margin-right: 10px;
  }
}