
/* Custom responsive fixes (keeps existing graphic charter) */

/* Make all media fluid */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Nav base */
nav {
  position: relative;
  z-index: 999;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}
nav ul li {
  position: relative;
}

/* Dropdown */
nav ul li .sous {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
}
nav ul li:hover .sous {
  display: block;
}

/* Toggle button (mobile) */
.navToggle {
  display: none;
  margin: 0.75rem auto 0;
  width: max-content;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  background: rgba(30,58,95,0.92);
  color: #fff !important;
}
/* Ensure header text wraps on small screens */
#header h1, #header p {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Small screens */
@media screen and (max-width: 736px) {

  /* Slightly reduce header sizes for mobile */
  #header h1 {
    font-size: 1.35em !important;
    line-height: 1.35 !important;
  }

  /* Show toggle and collapse nav */
  .navToggle { display: block; }
  nav ul {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  body.nav-open nav ul {
    display: flex;
  }

  nav ul li a {
    display: block;
    padding: 0.9rem 1rem;
  }

  /* Dropdowns become inline blocks (tap friendly) */
  nav ul li .sous {
    position: static;
    display: none;
    min-width: 100%;
  }
  nav ul li.open .sous {
    display: block;
  }

  /* Prevent hover-only dropdown behavior on touch */
  nav ul li:hover .sous {
    display: none;
  }

  /* Tables if any */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}
