:root{
  --bg: rgba(255,255,255,.92);
  --bg-solid: #ffffff;
  --text: #0f172a;
  --muted: #334155;
  --primary: #144990;
  --ring: rgba(37,99,235,.20);
  --shadow: 0 18px 45px rgba(2,6,23,.10);
  --radius: 16px;
}

/* Espace sous navbar fixe */
body{ padding-top: 84px; }

/* ===============================
   NAVBAR FIXE
================================ */
.rsg-header{ position: relative; z-index: 9999; }

.rsg-nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  background: var(--bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,.06);
  transition: box-shadow .25s ease, background .25s ease, padding .25s ease;
}

.rsg-nav.scrolled{
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 35px rgba(2,6,23,.12);
}

.rsg-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.rsg-brand{ display:flex; align-items:center; }
.rsg-logo{ height: 80px; width:auto; }

.rsg-menu{ display:flex; align-items:center; }

/* ===============================
   LIENS
================================ */
.rsg-links{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.rsg-link{
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 5px 10px;
  color: var(--primary);
  text-decoration: none;
  font-family:  'Roboto', sans-serif;
  font-weight: 600;
  letter-spacing: .3px;
  font-size: 13.5px;

  border-radius: 12px;
  position: relative;

  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.rsg-subitem {
  padding: 5px;
}

/* Hover général */
.rsg-link:hover{
  color: var(--muted);
  background: rgba(37,99,235,.06);
  transform: translateY(-1px);
}

/* Active */
.rsg-link.active{
  color: var(--muted);
  background: rgba(37,99,235,.10);
}

.rsg-link:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* ===============================
   BOUTON LOGIN
================================ */
.rsg-cta{ margin-left: 8px; }

.rsg-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;
  border-radius: 999px;

  font-weight: 900;
  font-size: 13px;

  border: 2px solid var(--primary);
  color: var(--primary);
  text-decoration: none;

  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.rsg-btn:hover{
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ===============================
   DROPDOWN
================================ */
.rsg-dropdown{ position: relative; }

.rsg-dropdown-toggle .rsg-caret{
  width: 10px;
  height: 10px;
  display: inline-block;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
  transition: transform .2s ease;
}

/* IMPORTANT : stabiliser le dropdown
   -> on ne fait pas bouger le bouton dropdown au hover */
.rsg-dropdown > .rsg-dropdown-toggle:hover{
  transform: none;              /* ✅ évite que le sous-menu “bouge” */
  box-shadow: none;
}

/* Sous-menu - base (desktop) */
.rsg-submenu{
  list-style: none;
  margin: 0;
  padding: 10px;

  min-width: 260px;
  background: var(--bg);
 
  box-shadow: var(--shadow);
 

  opacity: 0;
  pointer-events: none;
}

/* Items */
.rsg-subitem{
  display: flex;
  align-items: center;
  font-family:  'Roboto', sans-serif;
  padding: 8px 8px;
  border-radius: opx;

  text-decoration: none;
  color: var(--primary);
  font-weight: 500;

  transition: background .2s ease, transform .2s ease, color .2s ease;
}

.rsg-subitem:hover{
  background: rgba(37,99,235,.10);
  color: var(--muted);
  transform: translateX(4px);
}

.rsg-subitem.active{
  background: var(--primary);
  color: #fff;
}

.rsg-sep{
  height: 1px;
  background: rgba(15,23,42,.08);
  margin: 8px 6px;
}

/* ===============================
   DROPDOWN DESKTOP : STABLE (NE BOUGE PAS)
   Animation via top + opacity (pas transform)
================================ */
@media (min-width: 992px){
  .rsg-submenu{
    position: absolute;
    left: 50%;
    top: calc(100% + 12px);
    transform: translateX(-50%);     /* ✅ une seule transform */
    z-index: 9999;

    transition: opacity .18s ease, top .18s ease;
  }

  .rsg-dropdown.open .rsg-submenu{
    opacity: 1;
    pointer-events: auto;
    top: calc(100% + 8px);
  }

  .rsg-dropdown.open .rsg-dropdown-toggle .rsg-caret{
    transform: rotate(225deg);
  }
}

/* ===============================
   BURGER
================================ */
.rsg-burger{
  display: none;
  border: 0;
  background: transparent;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
}

.rsg-burger:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.rsg-burger span{
  display:block;
  height: 2px;
  background: var(--text);
  margin: 7px 10px;
  border-radius: 99px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ===============================
   RESPONSIVE MOBILE
================================ */
@media (max-width: 991.98px){
  body{ padding-top: 78px; }
  .rsg-logo{ height: 60px; }

  .rsg-burger{ display: inline-block; }

  .rsg-menu{
    position: fixed;
    left: 0; right: 0;
    top: 72px;

    padding: 12px 16px 18px;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15,23,42,.06);

    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;

    transition: opacity .18s ease, transform .18s ease;
  }

  .rsg-menu.open{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .rsg-links{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .rsg-link, .rsg-btn{
    width: 100%;
    justify-content: space-between;
  }

  .rsg-cta{
    margin-left: 0;
    margin-top: 6px;
  }

  /* Submenu mobile: dans le flux */
  .rsg-submenu{
    position: static;
    min-width: 100%;
    box-shadow: none;
    border-radius: none;
    border: 0px solid rgba(15,23,42,.08);
    padding: 8px;
    margin-top: 6px;

    opacity: 1;
    pointer-events: auto;
    display: none;
  }

  .rsg-dropdown.open .rsg-submenu{ display: block; }

  /* Caret rotation en mobile aussi */
  .rsg-dropdown.open .rsg-dropdown-toggle .rsg-caret{
    transform: rotate(225deg);
  }
}


