/* ==========================================================
   Styles de navigation partagés — pages client
   (mes-contrats, mes-reservations, mon-historique)
   Extrait de styleConcess.css — indépendant du reste du site
   ========================================================== */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --topbar-h-desktop: 70px;
  --topbar-h-mobile:  60px;
  --topbar-h:         var(--topbar-h-desktop);
  --modern-gradient:  linear-gradient(135deg, #dc2626 0%, #ef4444 30%, #f97316 70%, #fbbf24 100%);
  --line:             rgba(255,255,255,.06);
}

html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
}

/* ---------- TOPBAR — pleine largeur ---------- */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: var(--topbar-h);
  background: rgba(2,8,16,0.92);
  backdrop-filter: blur(25px) saturate(200%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: none;
  padding: 0 32px;
  z-index: 1000;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 2px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
}

/* ---------- LOGO ---------- */
.logo {
  width: 56px; height: 56px;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  flex: 0 0 auto;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  background: linear-gradient(135deg, rgba(220,38,38,0.1), rgba(239,68,68,0.05));
}
.logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(220,38,38,0.4)) brightness(1.1) contrast(1.1);
  transition: filter 0.4s ease;
}
.logo:hover img {
  filter: drop-shadow(0 6px 20px rgba(220,38,38,0.7)) brightness(1.2) contrast(1.2) saturate(1.3);
}

/* ---------- NAV DESKTOP ---------- */
.mainmenu-desktop {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mainmenu-desktop a {
  color: #9aa6b3;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all .4s cubic-bezier(0.4,0,0.2,1);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
}
.mainmenu-desktop a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(220,38,38,.3), 0 0 40px rgba(220,38,38,.1);
  border-color: rgba(220,38,38,.2);
}
.mainmenu-desktop a.active {
  color: #fff;
  background: var(--modern-gradient);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 8px 30px rgba(220,38,38,.5), 0 0 50px rgba(220,38,38,.2), inset 0 1px 0 rgba(255,255,255,.2);
  transform: translateY(-2px);
}
.mainmenu-desktop a.nav-compte {
  color: #fff;
  background: linear-gradient(135deg,#dc2626,#991b1b);
  border-color: rgba(220,38,38,.5);
  margin-left: 8px;
}
.mainmenu-desktop a.nav-compte:hover {
  background: linear-gradient(135deg,#ef4444,#b91c1c);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(220,38,38,.45);
}

/* ---------- DROPDOWN UTILISATEUR CONNECTÉ (desktop) ---------- */
.nav-user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}
.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg,#dc2626,#991b1b);
  border: 1px solid rgba(220,38,38,.5);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .4s cubic-bezier(0.4,0,0.2,1);
}
.nav-user-btn:hover {
  background: linear-gradient(135deg,#ef4444,#b91c1c);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(220,38,38,.45);
}
.nav-user-btn svg {
  width: 13px; height: 13px;
  transition: transform .25s ease;
  flex-shrink: 0;
}
.nav-user-dropdown.open .nav-user-btn svg { transform: rotate(180deg); }

.nav-user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: rgba(8,16,26,.97);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 8px;
  z-index: 600;
  backdrop-filter: blur(24px);
  box-shadow: 0 16px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  animation: navDropIn .18s ease;
  flex-direction: column;
  gap: 4px;
}
@keyframes navDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-user-dropdown.open .nav-user-menu { display: flex; }

.nav-user-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  color: #e6eef6;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: .86rem;
  font-weight: 500;
  text-align: left;
  border-radius: 9px;
  cursor: pointer;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.nav-user-menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }

.nav-logout-btn {
  color: #f87171;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: 4px;
  padding-top: 14px !important;
}
.nav-logout-btn:hover {
  background: rgba(220,38,38,.15) !important;
  color: #fca5a5 !important;
}

/* ---------- SECTION UTILISATEUR CONNECTÉ (mobile) ---------- */
.mobile-user-header {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  padding: 10px 20px;
  text-align: center;
  background: linear-gradient(135deg,rgba(220,38,38,.18),rgba(153,27,27,.12));
  border: 1px solid rgba(220,38,38,.25);
  border-radius: 10px;
  letter-spacing: .3px;
}
.menu-logout-btn {
  color: #f87171 !important;
  background: rgba(220,38,38,.1) !important;
  border: 1px solid rgba(220,38,38,.25) !important;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  border-radius: 10px;
  transition: all .3s ease;
  width: 100%;
}
.menu-logout-btn:hover {
  background: rgba(220,38,38,.25) !important;
  color: #fca5a5 !important;
}

/* ---------- BOUTON MENU MOBILE ---------- */
.menu-btn {
  display: none;
  background: none;
  border: 1px solid rgba(220,38,38,0.3);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  margin-left: auto;
  transition: all 0.3s ease;
}
.menu-btn:hover {
  background: rgba(220,38,38,0.1);
  border-color: rgba(220,38,38,0.5);
}

/* ---------- MENU MODAL (fullscreen) ---------- */
.menu-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7,18,26,0.98);
  backdrop-filter: blur(20px);
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.menu-modal.open { display: flex; }

.menu-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: 1px solid rgba(220,38,38,0.3);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.menu-close:hover {
  background: rgba(220,38,38,0.2);
  border-color: rgba(220,38,38,0.6);
}

.menu-modal-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  max-width: 300px;
}

.menu-link {
  color: #e6eef6;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}
.menu-link:hover {
  background: var(--modern-gradient);
  color: #fff;
  transform: scale(1.05);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .topbar { width: clamp(320px, 88%, 960px); }
}
@media (max-width: 900px) {
  .topbar { width: clamp(320px, 94%, 960px); }
}
@media (max-width: 720px) {
  :root { --topbar-h: var(--topbar-h-mobile); }

  .topbar {
    left: 0; right: 0; top: 0;
    transform: none;
    width: 100%; max-width: 100%;
    border-radius: 0;
    padding: 8px 12px;
    justify-content: space-between;
    background: rgba(7,18,26,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    border: none;
    box-shadow: none;
  }

  .logo { width: 44px; height: 44px; }

  .mainmenu-desktop { display: none !important; }
  .menu-btn { display: inline-block !important; }

  .menu-modal { animation: slideIn 0.3s ease-out; }
  @keyframes slideIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .menu-modal-content { gap: 16px; }

  .menu-link {
    width: 100%;
    padding: 14px 20px;
    font-size: 18px;
    background: rgba(255,255,255,0.08);
  }
  .menu-link:active {
    background: rgba(220,38,38,0.3);
    transform: scale(0.98);
  }
}
