@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap');

:root {
  --color-text: white;
}

.header {
  position: absolute;
  height: 130px;
  width: 100%;
  background-image: linear-gradient(
    rgba(0, 0, 0, 0.8) 1%,
    rgba(0, 0, 0, 0.5),
    rgba(0, 0, 0, 0)
  );
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
  z-index: 15;
  transition: all 0.5s;
}


.header_content {
  width: 1280px;
  display: grid;
  padding: 40px 90px;
  grid-template-columns: 1fr 1fr;
  grid-gap: 216px;
  justify-content: space-between;
  align-items: center;
  transition: all 0.5s;
}





.left_header, .right_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  transition: all 0.5s;
}

.right_header > *:not(.buttons_icons_right) {
  transition: all .3s;  
}

.slideRight{
  transform: translateX(-50px);
  opacity: 0;
}

.input_search{
  position: absolute;
  opacity: 0;
  transform: translateX(-30rem);
  z-index: -100;
  width: 30rem;
  height: 3.5rem;
  border: none;
  border-bottom: 1px solid var(--color-btn);
  outline: none;
  background: transparent;
  color: white;
  padding: 1rem;
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.168), transparent);
  transition: all .3s;
  
}

.input_search::placeholder{
  color: white;

}

.reveal{
  z-index: 20;
  transform: translateX(-35rem);
  opacity: 1;
}

.link {
  text-decoration: none;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.link_deroulant_container {
  position: relative;
}

.parent_link_deroulant {
  position: relative;
  display: flex;
  justify-content: start;
  align-items: center;
  width: 100%;
  transition: all 0.5s;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  z-index: 1001;
}

.p_deroulant {
  position: relative;
  margin-right: 5px;
  z-index: 1001;
  transition: all 0.5s;

}

.links_deroulant_container {
  position: absolute;
  top: 100%;
  height: auto;
  width: max-content;
  padding-right: 1.5rem;
  padding-top: 20px;
  background-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 20%, rgba(0, 0, 0, 0.5) 50%);
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: all 0.3s;
  z-index: 1000;
}

.deroulant_content {
  padding-left: .8rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding-bottom: 8px;
  transition: transform 0.3s ease;
}

.menu-separator {
  min-width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-white),
    transparent
  );
  margin: 1rem -1rem;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.deroulant_content .link_deroulant {
  text-decoration: none;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 400;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1000;
}


.link_deroulant_container:hover .links_deroulant_container {
  opacity: 1;
  visibility: visible;
}

.link_deroulant_container:hover .deroulant_content {
  transform: translateY(0);
}

.link_deroulant_container:hover .p_deroulant {
  text-decoration: underline;
  color: var(--color-white);
}

.link_deroulant_container:hover .icon_style_header {
  transform: rotate(90deg);
  fill: var(--color-white);
}

.icon_style_header {
  width: 1rem;
  height: 1rem;
  fill: var(--color-text);
  transition: all 0.3s;
  position: relative;
  z-index: 1001;
}

.icon_arrow_link_deroulant{
  width: 1rem;
  height: 1rem;
  fill: var(--color-text);
  position: relative;
  z-index: 1001;
  transform: rotate(0deg) translateX(-20px);
  transition: all 0.1s;
}

.link_deroulant:hover .icon_arrow_link_deroulant {
  transform: translateX(-5px);
}

.link_deroulant:hover{
  transform: translateX(5px);
}


.link_logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.logo {
  width: 120px;
  height: 80px;
  object-fit: cover;
}

.btn_header {
  border: none;
  outline: none;
  background-color: transparent;
  font-size: 20px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
}



.btn_header:hover {
  opacity: 0.8;
}

.buttons_icons_right {
  width: 6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn_langages{
  display: flex;
  justify-content: center;
  align-items:center;
}

.btn_langages .icon_style_header {
    width: 2.5rem;
    height: 2.5rem;
}

/* Suppression des styles pour les liens actifs */
.link.item_left.active,
.link.item_right.active {
  text-decoration: underline;
}

/* Amélioration de l'accessibilité */
.link:focus,
.btn_header:focus {
  outline: none;
  outline-offset: 0;
}

/* Styles pour les résultats de recherche */
.search-results {
    position: absolute;
    top: 2rem;
    transform: translateX(-35rem);
    width: 30rem;
    max-height: 200px;
    overflow-y: auto;
    background: var(--color-btn);
    padding: 1rem;
    margin-top: 0.5rem;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    text-decoration: none;
    color: white;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-bottom: 0.5rem;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-image {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
}

.search-result-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: white;
}

.search-result-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.5rem 0;
}

.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-result-tags .tag {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.no-results, .error {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 1rem;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.language_selector {
  position: relative;
}

.language_menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  padding: 0.5rem;
  display: none;
  z-index: 1000;
  min-width: 150px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all .3s;
}

.language_menu a:hover{
  background: var(--color-btn);

}

.language_selector:hover .language_menu,
.language_selector.open .language_menu {
  display: block;
}

.language_option {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  transition: background-color 0.2s;
  border-radius: 4px;
}


.language_option img {
  width: 24px;
  height: 24px;
  margin-right: 0.5rem;
}

.language_option span {
  font-size: 14px;
}

.language_mobile{
  width: 100%;
  display: flex;
  justify-content: end;
}

/* Menu burger */
.burger-menu {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.burger-menu:hover {
  opacity: 0.8;
}

/* Navigation mobile */


.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

/* Voile gris sur le header */
.header.overlay {
  background-image: none !important;
  backdrop-filter: blur(5px);
}

/* Navigation mobile avec voile sur header */
.mobile-nav.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(128, 128, 128, 0.9);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav.header-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 400;
  transition: all 0.3s ease;
  padding: 1rem 0rem;
  border-radius: 8px;
}


/* Header du menu mobile */
.mobile-nav-header {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 2001;
}

.mobile-close-btn {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.mobile-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

/* Contenu du menu mobile */
.mobile-nav-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  padding-top: 14rem;
}

/* Liens de navigation mobile */
.mobile-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, auto);
  justify-content: start;
  gap: 0.5rem 2rem;
  max-width: 500px;
  width: 100%;
  padding: 0 0rem;
}

.mobile-nav-separator{
  width: 90vw;
}

.mobile-link {
  display: flex;
  align-items: center;
  width: min-content;
  font-size: 1.1rem;
  padding: 0.7rem 0.5rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 400;
  border-radius: 0;
  transition: color 0.2s, background 0.2s, text-decoration 0.2s;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.mobile-link:hover,
.parent-mobile-link-deroulant:hover {
  color: #fff;
  text-decoration: underline;
}

/* Les sous-menus déroulants s'affichent à l'intérieur de la case parent, en dessous du label */
.mobile-link-deroulant-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  grid-column: span 1;
}

.mobile-links-deroulant-container {
  display: none;
  flex-direction: column;
  width: 100%;
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  animation: growDown 0.25s ease-in;
}

.mobile-link-deroulant-container.open > .mobile-links-deroulant-container {
  display: flex;
}

@keyframes growDown {
  0% { opacity: 0; transform: scaleY(0.8); }
  100% { opacity: 1; transform: scaleY(1); }
}

.mobile-link-deroulant {
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  transition: background 0.2s;
  width: 100%;
  white-space: nowrap;
}

.mobile-link-deroulant:hover {
  background: rgba(255,255,255,0.07);
  text-decoration: underline;
}

/* Media queries pour responsive */
@media (max-width: 1280px) {
  .header_content {
    width: 100%;
    padding: 40px 20px;
    grid-template-columns: auto 1fr auto;
    grid-gap: 0;
  }

  /* Masquer les liens de navigation */
  .left_header .link:not(.link_logo),
  .right_header .link:not(.btn_header) {
    display: none;
  }

  /* Masquer les conteneurs de liens déroulants */
  .link_deroulant_container {
    display: none;
  }

  /* Afficher le menu burger */
  .burger-menu {
    display: block;
  }

  /* Ajuster la position du logo à gauche */
  .link_logo {
    position: absolute;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 1;
    justify-self: start;
  }

  /* Réorganiser les éléments du header */
  .left_header {
    grid-column: 2;
    justify-content: center;
  }

  .right_header {
    grid-column: 3;
    justify-content: flex-end;
  }

  /* Ajuster la largeur des boutons d'icônes */
  .buttons_icons_right {
    width: auto;
    gap: 1rem;
  }

  .right_header .language_selector {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .header_content {
    padding: 20px 0px;
  }

  .logo {
    width: 100px;
    height: 70px;
  }

  .buttons_icons_right {
    gap: 0.5rem;
  }

  .btn_header {
    font-size: 18px;
  }
}

/* Media queries pour la barre de recherche responsive */
@media (max-width: 1400px) {
  .input_search {
    width: 28rem;
  }
  
  .reveal {
    transform: translateX(-35rem);
  }
  
  .search-results {
    width: 28rem;
    transform: translateX(-35rem);
  }
}

@media (max-width: 1200px) {
  .input_search {
    width: 28rem;
  }
  
  .reveal {
    transform: translateX(-35rem);
  }
  
  .search-results {
    width: 28rem;
    transform: translateX(-35rem);
  }
}

@media (max-width: 1000px) {
  .input_search {
    width: 25rem;
  }
  
  .reveal {
    transform: translateX(-30rem);
  }
  
  .search-results {
    width: 25rem;
    transform: translateX(-30rem);
  }
}

@media (max-width: 900px) {
  .input_search {
    width: 25rem;
  }
  
  .reveal {
    transform: translateX(-30rem);
  }
  
  .search-results {
    width: 25rem;
    transform: translateX(-30rem);
  }
}

@media (max-width: 768px) {
  .input_search {
    width: 22rem;
  }
  
  .reveal {
    transform: translateX(-25rem);
  }
  
  .search-results {
    width: 22rem;
    transform: translateX(-25rem);
  }
}

@media (max-width: 600px) {
  .input_search {
    width: 20rem;
  }
  
  .reveal {
    transform: translateX(-20rem);
  }
  
  .search-results {
    width: 20rem;
    transform: translateX(-20rem);
  }
}
@media (max-width: 400px) {
  .input_search {
    width: 14rem;
  }
  
  .reveal {
    transform: translateX(-16rem);
  }
  
  .search-results {
    width: 14rem;
    transform: translateX(-16rem);
  }
}

/* Media queries pour la recherche mobile */
@media (max-width: 480px) {
  .mobile-search {
    max-width: 100%;
  }
  
  .mobile-search-container {
    border-radius: 20px;
    padding: 0.3rem;
  }
  
  .mobile-input-search {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
  
  .mobile-btn-search {
    padding: 0.8rem;
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .mobile-input-search {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .mobile-btn-search {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
}

/* Header du menu mobile (ligne logo, titre, recherche, croix) */
.mobile-nav-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2rem 2rem 1.5rem 2rem;
  box-sizing: border-box;
}

.mobile-nav-logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-nav-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff2;
}

.mobile-nav-title {
  color: white;
  font-size: 2.2rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Roboto', Arial, sans-serif;
}

.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.mobile-btn-search, .mobile-close-btn {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.7rem;
  border-radius: 50%;
  transition: background 0.2s;
}

.mobile-btn-search:hover, .mobile-close-btn:hover {
  background: rgba(255,255,255,0.08);
}

/* Sélecteur de langue mobile */
.mobile-language {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.mobile-language h3 {
  color: var(--color-text);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.mobile-language-options {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.mobile-language-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}


.mobile-language-option img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.mobile-language-option span {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 500;
  white-space: nowrap;
}

/* Fond flouté et sombre */
.mobile-nav.header-overlay {
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(8px);
}

/* Sous-menus mobile cachés par défaut */
.mobile-links-deroulant-container {
  display: none;
  flex-direction: column;
  margin-left: 1.2rem;
}

.mobile-link-deroulant-container.open > .mobile-links-deroulant-container {
  display: flex;
}

.parent-mobile-link-deroulant {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min-content;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-text);
  padding: 0.7rem 0.5rem;
  background: none;
  border: none;
  outline: none;
  transition: background 0.2s;
  flex-direction: row;
  gap: 0.7rem;
  white-space: nowrap;
}

.parent-mobile-link-deroulant span {
  display: inline-block;
  white-space: nowrap;
}

.parent-mobile-link-deroulant svg {
  transition: transform 0.2s;
  display: inline-block;
  vertical-align: middle;
}

.mobile-link-deroulant-container.open .parent-mobile-link-deroulant svg {
  transform: rotate(90deg);
}

.mobile-link-deroulant {
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.mobile-link-deroulant:hover {
  background: rgba(255,255,255,0.07);
  text-decoration: underline;
}

/* Sélecteur de langue mobile déroulant */
.language_selector.mobile-language-bottom {
  position: static;
  right: auto;
  bottom: auto;
  margin-top: 1.2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.mobile-language-bottom .language_menu {
  z-index: 3001;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  padding: 0.5rem;
  display: none;
  min-width: 150px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-language-bottom:hover .language_menu,
.mobile-language-bottom.open .language_menu {
  display: block;
}

.mobile-btn-langages {
  background: none;
  border: none;
  padding: 0.2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
}

.mobile-btn-langages img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mobile-language-menu {
  display: none;
  flex-direction: column;
  background: rgba(30,30,30,0.97);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  margin-top: 0.5rem;
  padding: 0.5rem 0.7rem;
  min-width: 48px;
  align-items: flex-end;
}

.mobile-language-bottom.open .mobile-language-menu {
  display: flex;
}

.mobile-language-option {
  background: none;
  border: none;
  padding: 0.2rem;
  border-radius: 50%;
  margin-bottom: 0.2rem;
  transition: box-shadow 0.2s;
  display: flex;
  align-items: center;
}

.mobile-language-option img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.mobile-language-option.active img {
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,0.12);
}

.burger-menu,
.buttons_icons_right,
.logo {
  z-index: 9999 !important;
  position: relative;
}

/* Titre de la page actuelle dans le menu mobile */
.mobile-page-title {
  position: absolute;
  top: 65px;
  left: 50%;
  transform: translate(-50%,-50%);
  text-align: center;
  padding: 0 1rem;
}

.mobile-page-title h2 {
  color: var(--color-text);
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  font-family: 'Roboto', Arial, sans-serif;
}
