/* =============================
   Reset et anti-overflow global
   ============================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important; /* empêche tout débordement */
  margin: 0;
  padding: 0;
}

/* =============================
   Médias fluides
   ============================= */
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================
   Navigation principale
   ============================= */
nav[role="navigation"] {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: #fff;
  overflow-x: hidden !important;
  z-index: 50;
}

/* Container nav toujours contenu */
nav[role="navigation"] .container {
  max-width: 100% !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap !important;
  justify-content: space-between;
  align-items: center;
  overflow-x: hidden !important;
}

.container {
  max-width: 1200px; /* largeur max pour confort de lecture */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Liens de navigation adaptables */
nav a {
  font-size: 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100% !important;
  display: inline-block;
}

/* Logos toujours visibles et réduits */
nav[role="navigation"] img {
  max-height: 3rem;
  max-width: 150px;
  height: auto;
  flex-shrink: 0;
}

/* =============================
   Menu mobile
   ============================= */
#mobile-menu {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}
#mobile-menu a {
  display: block;
  font-size: 1rem;
  line-height: 1.4;
  white-space: normal !important;
  word-break: break-word;
}

/* =============================
   Correctifs spécifiques mobile
   ============================= */
@media (max-width: 768px) {
  nav a {
    font-size: 0.9rem;
  }
  nav[role="navigation"] img {
    max-width: 30vw !important;
  }
}

/* =============================
   Général
   ============================= */
body {
  font-family: "Montserrat", sans-serif;
  scroll-behavior: smooth;
}
.title-font {
  font-family: "Bebas Neue", sans-serif;
}

.hero-bg {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("assets/principale.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-divider {
  height: 4px;
  background: linear-gradient(to right, #1e3a8a, #dc2626);
  margin: 2rem 0;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

button,
.button {
  cursor: pointer;
  transition: all 0.3s ease;
}
button:hover,
.button:hover {
  transform: scale(1.05);
}

/* =============================
   Footer
   ============================= */
footer {
  background-color: white;
  padding: 2rem 1rem;
  text-align: center;
}
footer a {
  color: #f9fafb;
  text-decoration: underline;
}
footer span.italic {
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}
footer a:hover {
  color: #f87171;
  text-decoration: none;
}
footer p {
  margin: 0.5rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}
