
/* =========================================================
   HEADER (déjà présent dans ton HTML)
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line)
}

.topbar {
  background: var(--violet);
  color: #fff;
  text-align: center;
  font-size: .9rem;
  padding: .35rem .75rem;
}

.row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo {
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 6px 8px;
  cursor: pointer;
  color: inherit
}

.icon-btn .nav-icon {
  width: 20px;
  height: 20px
}

.icon-btn:hover {
  opacity: .85
}

/* Recherche */
.search {
  flex: 1;
  position: relative
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 44px 10px 16px;
  outline: 0;
  background: #fff
}

.search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 45, 109, .08)
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 6px
}

.search-btn:hover {
  color: var(--brand)
}

/* Lignes responsive */
.top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  padding:0;
  margin:0;
}

.desktop-line {
  display: none;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding:0;
}

.desktop-line .search {
  flex: 1
}

.desktop-line .actions {
  margin-left: auto
}

/* Burger */
.burger {
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  display: inline-flex
}

.burger-icon {
  width: 24px;
  height: 24px
}

/* =========================================================
   NAVIGATION DESKTOP + MEGA MENU
   ========================================================= */
.nav {
  display: none;
}

@media(min-width:990px) {
  .nav {
    display: block;
  }

  .search-mobile {
    display: none
  }
}

.nav .inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding:0;

}

.topnav {
  display: flex;
  gap: 24px;
  align-items: center;
  height: 48px;
  padding:0;
}

.topnav>li {
  list-style: none;
  position: relative
}

.topnav>li>a,
.topnav>li>.nav-trigger {
  background: transparent;
  border: 0;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  padding: 6px 0;
  position: relative
}

/* Soulignement animé */
.topnav>li>a::after,
.topnav>li>.nav-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) var(--easing)
}

.topnav>li>a:hover::after,
.topnav>li>.nav-trigger:hover::after,
.topnav>li .nav-link-simple.active::after {
  transform: scaleX(1)
}

@media (min-width: 990px) {
  .topnav > li {
    position: static;
  }
}






li:hover > .mega,
li:focus-within > .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}



@media (min-width: 990px) {
  .topnav > li:hover > .mega,
  .topnav > li:focus-within > .mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}


/* ========================================================= */

/* Mega */
.mega {
  position: absolute;
  top: calc(100% + var(--mega-gap));
  left: 0;
  right: 0;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity var(--t-fast) var(--easing),
    transform var(--t-fast) var(--easing),
    visibility 0s linear var(--t-fast);
  z-index: 10;
  padding:10px;
}


/* Ajustement propre du layout des sous-éléments dans le mega menu */
.mega ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1px; /* réduit pour un rendu plus serré */
  padding: 12px;
}

.mega ul li {
  list-style:none;
  flex: 1 1 calc(33.33% - 1px);
  max-width: calc(33.33% - 1px);
  text-align: start;
}

.mega ul li a {
  display: block;
  
}



.mega.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}



.mega .wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 5px;
  padding: 20px;
}

.mega .wrap section ul li {
  break-inside: avoid;
  padding: 4px 0;
}


/* ========================================================= */


@media(min-width: 990px) {
  .nav-trigger {
    pointer-events: none;
  }
}


/* =========================================================
   DRAWER MOBILE (overlay + panels + items cartes)
   ========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--easing);
  z-index: 1000
}

.overlay.active {
  opacity: 1;
  visibility: visible
}

.drawer {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: translateX(-100%);
  transition: transform var(--t-med) var(--easing);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  scrollbar-width: none;        /* ✅ Firefox: cache la barre */
  -ms-overflow-style: none;     /* ✅ IE/Edge */
}


.drawer.open {
  transform: translateX(0)
}

/* Track panels */
.panels {
  flex: 1;
  display: flex;
  height: 100%;
  transform: translateX(0);
  transition: transform var(--t-med) var(--easing)
}

.panel {
  flex: 0 0 100%;
  overflow: auto
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1
}

.panel-title {
  font-size: 1.05rem;
  margin: 0
}

.panel-head .spacer {
  flex: 1
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 6px 8px;
  cursor: pointer
}

.back-icon {
  width: 22px;
  height: 22px
}

/* Liste d’items en cartes (visuel screenshot) */
.drawer .list {
  padding-inline: 1rem;
  padding-block: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}





.drawer .list .item,
.drawer .list .item-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.5rem;
  background: #fff;
  border: 1px solid #f1f1f1;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all .25s var(--easing);
}

.drawer .list .item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08)
}

.drawer .list .item:active {
  transform: scale(.98)
}

.drawer .list .item .chev {
  font-size: 1.2rem;
  opacity: .45;
  transition: transform .2s var(--easing)
}

.drawer .list .item:hover .chev {
  transform: translateX(4px)
}

/* pas d’images dans les items */
.drawer .thumb {
  display: none !important
}

/* Liens internes dans la liste */
.drawer .list .item a.nav-link,
.drawer .list .item-home a.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  width: 100%
}

.drawer .list .item a.nav-link span {
  flex: 1
}

/* Boutons close dans le drawer */
.drawer [data-close] {
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer
}

/* Petits ajustements Mobile */
@media(max-width:500px) {
  .icon-btn span {
    display: none
  }
}

@media(max-width:990px) {
  .actions .icon-btn[aria-label="S'enregistrer"] {
    display: none
  }
}

/* =========================================================
   DIVERS / UTILITAIRES
   ========================================================= */
.nav-link-simple {
  position: relative;
  text-decoration: none;
  color: inherit
}

.nav-link-simple.active {
  color: var(--brand)
}

a {
  color: var(--brand)
}

a:hover {
  opacity: .9
}

.container {
  max-width: 1200px;
  margin: 24px auto;
  padding:0;
}

/* Pour que tes liens “Accueil / Données / Contact” dans le drawer
   ressemblent aussi à des cartes */
.item-home .nav-icon {
  width: 18px;
  height: 18px;
  opacity: .7
}

.item-home .nav-link:hover {
  color: var(--brand)
}

/* Accessibilité focus */
:focus-visible {
  outline: 3px solid rgba(13, 45, 109, .25);
  outline-offset: 2px
}

/* =========================================================
   BREAKPOINTS DESKTOP : renforts
   ========================================================= */
@media(min-width:990px) {
  .top-line {
    display: none
  }

  .desktop-line {
    display: flex
  }

  .burger {
    display: none
  }
}



.drawer::-webkit-scrollbar {
  display: none; /* ✅ Chrome, Safari, Edge */
}





@media (max-width: 990px) {

.container {
  padding: 0 16px;
}

.row{
  padding: 12px 16px;
}

}













