/* ==========================================================================
   1. EN-TÊTE : LOGO, TITRE ET NAVIGATION PRINCIPALE
   ========================================================================== */

/* Conteneur global de l'en-tête */
.container-header {
  background: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 0.8rem 1.5rem;
}

/* Alignement du logo (blason) */
.container-header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.container-header .navbar-brand img {
  max-height: 65px;
  width: auto;
}

/* Liens du menu principal */
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
  color: #1e293b !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1rem !important;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

/* Survol des liens du menu principal */
.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li:hover > a {
  color: #0f4c81 !important;
  background-color: #f1f5f9;
}

/* Lien de la page active */
.container-header .mod-menu > li.current > a,
.container-header .mod-menu > li.active > a {
  color: #0f4c81 !important;
  border-bottom: 2px solid #0f4c81;
  border-radius: 6px 6px 0 0;
}

/* Menus déroulants (Sous-menus) */
.container-header .mod-menu .dropdown-menu {
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  margin-top: 8px;
}

.container-header .mod-menu .dropdown-menu a {
  color: #334155 !important;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
}

.container-header .mod-menu .dropdown-menu a:hover {
  background-color: #0f4c81 !important;
  color: #ffffff !important;
}


/* ==========================================================================
   2. PIED DE PAGE : EN LONGUEUR & TYPOGRAPHIE ÉLÉGANTE
   ========================================================================== */

/* Conteneur global du footer */
footer,
.container-footer,
.footer {
  background-color: #0d3b4c !important; /* Bleu foncé sobre */
  padding: 1.8rem 1rem !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Bloc englobant le module */
.menu-footer-horizontal {
  width: 100% !important;
  max-width: 1400px !important; /* Permet un bel étalement en longueur */
  margin: 0 auto !important;
  text-align: center !important;
}

/* Alignement en longueur sur une seule ligne */
.menu-footer-horizontal ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important; /* Empêche de passer à la ligne sur grand écran */
  justify-content: center !important;
  align-items: center !important;
  gap: 2.2rem !important; /* Espacement équilibré entre chaque lien */
  padding: 0 !important;
  margin: 0 auto !important;
  list-style: none !important;
  list-style-type: none !important;
}

/* Suppression des puces */
.menu-footer-horizontal li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important; /* Évite qu'un titre de lien se coupe en 2 lignes */
}

/* Typographie soignée des liens */
.menu-footer-horizontal a {
  /* Police moderne, épurée et très lisible */
  font-family: "Inter", "Montserrat", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.03em !important; /* Léger espacement entre les lettres */
  text-transform: capitalize; /* Première lettre majuscule nette */
  color: #e2e8f0 !important; /* Blanc cassé doux */
  text-decoration: none !important;
  padding: 0.5rem 0.8rem !important;
  border-radius: 6px !important;
  transition: all 0.25s ease-in-out !important;
}

/* Effet au survol */
.menu-footer-horizontal a:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
  transform: translateY(-1px);
}

/* Adaptation automatique sur smartphone et petits écrans */
@media (max-width: 992px) {
  .menu-footer-horizontal ul {
    flex-wrap: wrap !important;
    gap: 1rem !important;

}

/* ==========================================================================
   CORRECTION : SUPPRESSION DU FOND BLEU SUR LE BLOC PRÉSENTATION
   ========================================================================== */

/* Retire le fond bleu massif et rend le conteneur transparent */
.container-banner,
.banner,
div[class*="banner"],
.item-page > div:first-child,
.sp-page-builder .sppb-section {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* S'assure que les textes restent parfaitement lisibles */
.container-banner h1,
.container-banner h2,
.container-banner p {
  color: #1e293b !important; /* Gris anthracite */
}

/* Texte en filigrane d'arrière-plan (Knutange) */
div[class*="watermark"],
.bg-text {
  opacity: 0.08 !important; /* Discret et élégant */
}

/* ==========================================================================
   FORCE MENU MOBILE SUR CASSIOPEIA
   ========================================================================== */

@media (max-width: 991.98px) {
  /* 1. Force l'affichage du conteneur de navigation */
  .container-header .navbar,
  .container-header .container-nav {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  /* 2. Bouton burger de secours bien visible */
  .navbar-toggler,
  button[aria-controls="navbarSupportedContent"],
  button[data-bs-toggle="collapse"] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #0f4c81 !important; /* Bouton bleu */
    color: #ffffff !important;
    border: none !important;
    padding: 0.5rem 0.8rem !important;
    margin: 0.5rem 0 !important;
    border-radius: 6px !important;
  }

  /* Icône burger blanche */
  .navbar-toggler-icon {
    filter: brightness(0) invert(1) !important;
  }

  /* 3. Si le menu reste masqué par Bootstrap, on le rend toujours accessible */
  .container-header .mod-menu {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0.5rem 0 0 0 !important;
    list-style: none !important;
  }

  .container-header .mod-menu > li {
    width: 100% !important;
    border-bottom: 1px solid #e2e8f0;
  }

  .container-header .mod-menu > li > a {
    display: block !important;
    padding: 0.75rem 0.5rem !important;
    color: #1e293b !important;
    font-weight: 600;
  }
}

* ==========================================================================
   ALIGNEMENT DU LOGO ET DU TEXTE "VILLE DE KNUTANGE" (PC & MOBILE)
   ========================================================================== */

/* Conteneur de la marque : alignement horizontal logo + texte */
.container-header .navbar-brand,
.container-header .brand {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
}

/* Taille et proportion du blason */
.container-header .navbar-brand img,
.container-header .brand img {
  max-height: 55px !important;
  width: auto !important;
  flex-shrink: 0;
}

/* Style du texte "Ville de Knutange" */
.container-header .navbar-brand .site-title,
.container-header .brand-title,
.container-header .site-title {
  display: inline-block !important;
  font-family: "Montserrat", "Segoe UI", sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: #0f4c81 !important; /* Bleu institutionnel */
  white-space: nowrap !important; /* Reste sur une seule ligne */
  margin: 0 !important;
  padding: 0 !important;
}

/* Ajustement sur smartphone pour garder l'alignement côte à côte */
@media (max-width: 768px) {
  .container-header .navbar-brand img,
  .container-header .brand img {
    max-height: 42px !important; /* Blason légèrement plus petit */
  }

  .container-header .navbar-brand .site-title,
  .container-header .brand-title,
  .container-header .site-title {
    font-size: 1.05rem !important; /* Texte adapté à l'écran mobile */
  }
}