@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none !important;
  list-style: none !important;
}
body {
  font-family: 'poppins', sans-serif;
}

p,
a {
  font-size: clamp(12.5px, 2vw, 14px);
}

.header {
  width: 100%;
  position: relative;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.box-nav {
  width: 75%;
  margin: 0 auto;
}

.top-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  background-color: #f8f4f4;
}

.top-bar .box-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  gap: 10px;
}

.top-bar .logofnac img {
  width:60px;
  /*height: 70px;*/
  height: auto;
  object-fit: cover, contain;
}

.links .mttcp {
  width: 80px;
  object-fit: contain;
  display: inline-block;
  position: relative;
  right: 15px;
}

.links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.links a {
  display: flex;
  align-items: center;
  color: #092a49;
  text-decoration: none;
  margin-right: 5px;
}

.icon-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: inline-block;
}

.links span {
  line-height: 20px;
  display: inline-block;
}

.search {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

/* style  search-overlay */

.search-bar_button {
  background: #0056a1;
  border: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  padding: 8px 10px;
  border-radius: 40px;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  -webkit-border-radius: 40px;
  -moz-border-radius: 40px;
  -ms-border-radius: 40px;
  -o-border-radius: 40px;
  -webkit-transition: background-color 0.3s ease;
  -moz-transition: background-color 0.3s ease;
  -ms-transition: background-color 0.3s ease;
  -o-transition: background-color 0.3s ease;
}

.search-bar_button:hover {
  background: #003d7a;
}

.search-bar_button i {
  font-size: 14px;
}
.search-bar_button p {
  font-size: 14px;
}
.navbar .social a:hover {
  color: #0056a1;
}

/* ========== STYLE POUR LA RECHERCHE OVERLAY ========== */
.search-overlay {
  position: relative;
  width: 100%;
  background-color: rgba(9, 42, 73, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 0;
  overflow: hidden;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-overlay.active {
  height: 100px;
}

.search-overlay-container {
  width: 75%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  animation: slideInRight 0.5s ease forwards;
}

.search-overlay.active .search-overlay-container {
  animation: slideInRight 0.5s ease forwards;
}

.search-overlay:not(.active) .search-overlay-container {
  animation: slideOutLeft 0.5s ease forwards;
}

.search-overlay-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  font-size: 14px;
  border: none;
  border-radius: 40px;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  outline: none;
  font-family: 'poppins', sans-serif;
}

.search-overlay-input:focus {
  box-shadow: 0 4px 20px rgba(25, 143, 217, 0.3);
}

.search-overlay-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size:14px;
  color: #092a49;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.search-overlay-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Animations */
@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }
}

/* Navigation Start */
.navbar {
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  backdrop-filter: blur(1.1);
  /* z-index:100; */
}

.navbar .box-nav {
  color: #198fd9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  flex-direction: row;
  list-style: none;
  gap: 1.5rem;
}

.navbar .box-nav .social {
  display: flex;
  gap: 20px;
  align-items: center;
}

.navbar .social a {
  color: white;
  transition: 0.3s;
  font-size: 18px;
}

.nav-links li {
  position: relative;
  align-items: center;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-links a i {
  margin-right: 5px;
  color: #fff;
}

/* Sous-menus desktop améliorés */
.dropdown, .sub-dropdown {
  background: #004080;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  padding: 0.75rem 1rem;
  width: 260px;
  position: absolute;
  top: 100%;
  left: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index:10;
}

.nav-links a:hover{
  color:#198fd9;
}
.nav-links li:hover > .dropdown,
.dropdown li:hover > .sub-dropdown {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a, .sub-dropdown a {
  color: #fff;
  padding: 0.75rem 0;
  display: block;
  font-weight: 500;
  transition: color 0.2s ease;
}

.dropdown a:hover, .sub-dropdown a:hover {
  color:#198fd9;
}

/* Flèche pour sous-menu imbriqué desktop */
.dropdown li {
  position: relative;
}

.dropdown li > a::after {
  content: '';
  font-size: 12px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
}

/* Style du sélecteur de langue */
.lang-selector {
  display: inline-flex;
  margin-left: 12px;
  position: relative;
}

.lang-btn {
  background: #fff;
  border: 1.5px solid #003366;
  color: #003366;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.lang-btn:hover {
  background: #eef5ff;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.12);
}

.lang-btn:focus-visible {
  outline: 2px solid #198fd9;
  outline-offset: 2px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  right: -10px;
  background: #fff;
  border: 1px solid #e6ecf3;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  /* width: 180px; */
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index:1000!important;
}

.lang-selector.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  margin: 0;
  padding: 9px 12px;
  color: #0f2742;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-option:hover {
  background: #f5f9ff;
  color: #003366;
}

.lang-option.active {
  background: #e9f3ff;
  color: #003366;
  font-weight: 700;
}

@media (max-width: 768px) {
  .lang-selector {
    margin: 10px 0;
    width: 100%;
  }

  .lang-btn {
    width: 100%;
    justify-content: space-between;
  }

  .lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    margin-top: 8px;
    min-width: 180px;
    display: block;
  }

  .lang-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .lang-option {
    border: 0;
    line-height: 1;
  }
}
   
/* Sticky navbar */
.header-absolute {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: transparent;
}

.nav-sticky {
  position: fixed;
  top: 0;
  background-color: #092a49 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
  z-index: 999;
}

body:not(.home) .navbar {
  background-color: #092a49;
}

/* Lien actif */
.nav-links a.active {
  color: #198fd9;
}

/* ========== Responsive Header & Topbar ========== */
@media (max-width: 1210px) {
  .top-bar .logofnac img {
    width: 50px;
    height: 60px;
  }

  .search-bar {
    width: 50%;
  }

  .links {
    flex-wrap: wrap;
    gap: 5px;
  }

  .icon-img {
    width: 24px;
    height: 24px;
  }

  .nav-toggle {
    display: block;
    color: white;
    background-color: transparent;
    border: none;
    font-size: 28px;
  }

  .navbar .box-nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .navbar .social a i {
    margin-right: 20px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 250px;
    position: fixed;
    left: 0;
    height: 100vh;
    top: 0;
    padding: 20px 20px;
    background-color:#003366;
    border-right: 1px solid;
    z-index: 100;
    transition: 0.33s ease;
    bottom: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    margin: 20px 0;
  }
}

/* Responsive pour l'overlay de recherche */
@media (max-width: 1199px) {
  .search-overlay-container {
    width: 90%;
  }
}

@media (max-width: 768px) {
  .search-overlay.active {
    height: 80px;
  }
  
  .search-overlay-input {
    padding: 12px 45px 12px 15px;
    font-size: 16px;
  }
  
  .search-overlay-close {
    right: 10px;
    font-size: 20px;
  }
}

/* 📲 Ajustement petits écrans */
@media (max-width: 480px) {
  .navbar .social a i {
    margin-right: 8px;
  }

  .top-bar .logofnac img {
    width: 45px;
    height: 55px;
  }
}

@media (max-width: 500px) {
  i {
    font-size: 20px;
  }
}

@media (max-width: 1599px) and (min-width: 1210px) {
  .box-nav {
    width: 90%;
  }

  .top-bar .box-nav {
    padding: 8px;
  }
}

@media (max-width: 1210px) {
  .box-nav {
    width: 90%;
  }

  .top-bar .box-nav {
    padding: 8px;
  }
}

/* ========== Ajout burger menu pour .top-bar (responsive) ========== */
.topbar-toggle {
  display: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  color: #092a49;
}

@media (max-width: 1210px) {
  .topbar-toggle {
    display: block;
  }

  .top-bar .box-nav {
    width: 90%;
  }

  .links {
    display: none;
    flex-direction: column;
    width: 250px;
    position: fixed;
    right: 0;
    height: 50vh;
    top: 80px;
    gap: 30px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    align-items: center;
    background-color: #f8f4f4;
    z-index: 100;
    transition: 0.33s ease;
  }

  .links.show {
    display: flex;
  }
}