/*
@author UBPartner
*/
/* ==========================================================
   HEADER - bandeau actualités, navbar, menus déroulants
   Chargé sur toutes les pages
   ========================================================== */

/*breaking news*/
.breaking-news {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1035;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background: var(--primary);
  color: var(--light);
  font-size: 14px;
  overflow: hidden;
}

.bn-viewport {
  flex: 0 0 auto;
  width: 80%;
  margin: 0 auto;
  overflow: hidden;
}

.bn-track {
  display: flex;
  width: max-content;
  animation: bnScroll 45s linear infinite;
}

.breaking-news:hover .bn-track {
  animation-play-state: paused;
}

.bn-group {
  display: flex;
  align-items: center;
}

.bn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 26px;
  white-space: nowrap;
  color: var(--light);
  text-decoration: none;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}


.bn-item:hover {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
}

/* date en pastille violet clair */
.bn-date {
  flex: 0 0 auto;
  padding: 2px 12px;
  border-radius: 20px;
  background: var(--primaryLight);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

@keyframes bnScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bn-track {
    animation: none;
  }
}

@media (max-width: 767.98px) {
  .breaking-news {
    height: 34px;
    font-size: 12.5px;
  }
  .bn-viewport {
    width: 92%;
  }
}

/*header*/
.logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.main-nav {
  transition: 0.3s ease;
  background: #fff;
  box-shadow: 0 2px 12px rgba(8, 12, 40, 0.06);
  /* hauteur réduite : écrase le py-3 du HTML */
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

.main-nav .brand-logo img {
  height: 42px;
  width: auto;
}

/* la navbar fixe se place sous le bandeau breaking news */
.main-nav.fixed-top {
  top: 40px;
}

@media (max-width: 767.98px) {
  .main-nav.fixed-top {
    top: 34px;
  }
}

.main-nav.scrolled {
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* menu blanc : liens et éléments en violet */
.main-nav .nav-link {
  color: var(--primary) !important;
}

.main-nav .nav-link:hover {
  color: var(--blueMid) !important;
}

/* séparateur vertical entre les liens du menu */
.main-nav .nav > .nav-item {
  position: relative;
  padding: 0 4px;
}

.main-nav .nav > .nav-item + .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: rgba(115, 71, 179, 0.25);
}

.main-nav .navbar-toggler {
  color: var(--primary) !important;
}

.logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.navbar-toggler {
  border: none;
  color: var(--light) !important;
}

.navbar-toggler:focus {
  box-shadow: none;
}
.nav-link {
  color: var(--light) !important;
  font-weight: 500;
}
.brand-logo i {
  color: var(--light) !important;
}
.brand-logo h4 {
  color: var(--light) !important;
}


/* ==========================================================
   MENUS DÉROULANTS ET SÉLECTEUR DE LANGUE
   ========================================================== */
/* ==========================================================
   MENUS DÉROULANTS DU MENU - même carte que le sélecteur
   de langue : fond blanc, bordure violette légère, ombre douce
   ========================================================== */
.nav-link.dropdown-toggle::after {
  display: none;
}

.nav-item.dropdown {
  position: relative;
}

/* pont invisible : sans lui, les 10px entre le lien et la carte
   coupent le survol et le menu se referme avant qu'on l'atteigne */
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 999;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  display: block;
  border: 1px solid rgba(115, 71, 179, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(36, 27, 61, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-item.dropdown:hover .nav-dropdown,
.nav-item.dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(10px);
}

.nav-dropdown .dropdown-item {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  background: none;
  color: var(--inkSoft);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown .dropdown-item:hover,
.nav-dropdown .dropdown-item:focus {
  background: rgba(115, 71, 179, 0.08);
  color: var(--primary);
}

.nav-dropdown .dropdown-item.is-active {
  color: var(--primary);
  font-weight: 600;
}

.nav-dropdown hr {
  margin: 6px 10px;
  border-color: rgba(115, 71, 179, 0.12);
  opacity: 1;
}





/* ==========================================================
   SÉLECTEUR DE LANGUE - globe + langue courante + chevron
   ========================================================== */
.lang-switcher {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle:hover,
.lang-switcher:hover .lang-toggle {
  background: rgba(115, 71, 179, 0.08);
}

.lang-toggle .bi-globe {
  font-size: 16px;
}

.lang-caret {
  font-size: 11px;
  transition: transform 0.25s ease;
}

.lang-switcher:hover .lang-caret,
.lang-switcher:focus-within .lang-caret {
  transform: rotate(180deg);
}

/* ── Menu déroulant ── */
.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 999;
  min-width: 150px;
  margin: 8px 0 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(115, 71, 179, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(36, 27, 61, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.lang-switcher:hover .lang-menu,
.lang-switcher:focus-within .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--inkSoft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-option:hover {
  background: rgba(115, 71, 179, 0.08);
  color: var(--primary);
}

.lang-option.is-active {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================
   MENU MOBILE - logo et langues en haut, liens au centre,
   bouton de contact ancré en bas
   ========================================================== */
.mobile-menu {
  width: 320px;
  max-width: 86vw;
  background: #fff;
}

/* ── Haut : logo, langues, fermeture ── */
.mobile-menu-top {
  align-items: center;
  gap: 14px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid rgba(115, 71, 179, 0.12);
}

.mobile-menu-logo {
  height: 38px;
  width: auto;
}

.mobile-menu-side {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.mobile-menu-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.mobile-lang {
  color: rgba(115, 71, 179, 0.55);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-lang:hover,
.mobile-lang.is-active {
  color: var(--primary);
}

.mobile-lang-sep {
  color: var(--primary);
  opacity: 0.3;
}

.mobile-menu .btn-close {
  padding: 0;
  margin: 0;
  opacity: 0.6;
}

/* ── Corps : liens puis bouton collé en bas ── */
.mobile-menu-body {
  display: flex;
  flex-direction: column;
  padding: 24px 22px 28px;
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-list li + li {
  border-top: 1px solid rgba(36, 27, 61, 0.08);
}

.mobile-menu-list > li > a,
.mobile-sub-toggle {
  display: block;
  width: 100%;
  padding: 15px 2px;
  border: none;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu-list > li > a:hover,
.mobile-sub-toggle:hover {
  padding-left: 8px;
  color: var(--primary);
}

/* ── Sous-menus ── */
.mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-sub-toggle i {
  font-size: 12px;
  color: var(--primary);
  transition: transform 0.25s ease;
}

/* le chevron pivote quand le sous-menu est déplié */
.mobile-sub-toggle:not(.collapsed) {
  color: var(--primary);
}

.mobile-sub-toggle:not(.collapsed) i {
  transform: rotate(180deg);
}

.mobile-sub {
  list-style: none;
  margin: 0;
  padding: 2px 0 12px 14px;
  border-left: 2px solid rgba(115, 71, 179, 0.2);
}

.mobile-sub a {
  display: block;
  padding: 9px 2px;
  color: var(--inkSoft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-sub a:hover {
  padding-left: 6px;
  color: var(--primary);
}

/* margin-top: auto pousse le bouton contre le bas du panneau */
.mobile-menu-cta {
  width: 100%;
  margin-top: auto;
}
