:root {
  --sidebar-width: 280px;
  --sidebar-bg: #0e3a74;
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --sidebar-title: #a6c9ff;
  --sidebar-link: #e8f0ff;
  --sidebar-active: #ffc857;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  display: flex;
  min-height: 100vh;
}

.sidebar-shell {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: #fff;
  box-shadow: 0 10px 30px rgba(14, 58, 116, 0.35);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.sidebar {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: rgba(14, 58, 116, 0.92);
  color: #fff;
  border: 1px solid var(--sidebar-border);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 1200;
  box-shadow: 0 10px 30px rgba(14, 58, 116, 0.3);
}

.sidebar-toggle__icon {
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
  display: inline-block;
}

.sidebar-toggle__icon::before,
.sidebar-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.sidebar-toggle__icon::before {
  top: -6px;
}

.sidebar-toggle__icon::after {
  top: 6px;
}

.sidebar-toggle__label {
  font-size: 0.8rem;
}

.sidebar__logo {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1rem;
}

.sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar__section--highlight {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1rem;
}

.sidebar__section--spacing {
  margin-top: 5rem;   /* espace avant la section */
  margin-bottom: 0;     /* ou autre valeur si besoin après */
}

.sidebar__title {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--sidebar-title);
  font-weight: 600;
}

.sidebar__links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--sidebar-border);
}

.sidebar__links a,
.sidebar__links button {
  all: unset;
  cursor: pointer;
  color: var(--sidebar-link);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar__links a:hover,
.sidebar__links a:focus-visible,
.sidebar__links button:hover,
.sidebar__links button:focus-visible {
  color: #fff;
  transform: translateX(4px);
}

.sidebar__links a.active,
.sidebar__links button.active {
  color: var(--sidebar-active);
}

.sidebar__links span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(232, 240, 255, 0.7);
}

.sidebar__links--social {
  gap: 0.2rem;
  border-left: none;
  padding-left: 0;
  margin-left: 0;
}

.sidebar__social-links {
  display: flex;
  gap: 0.6rem;
  margin-left: 0.4rem;
}

.sidebar__footer {
  margin-top: auto;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid var(--sidebar-border);
  padding-top: 1rem;
}

main {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
}

.sidebar-spacer {
  display: none;
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar-shell {
    width: 100%;
    height: auto;
    min-height: auto;
    background: transparent;
    border-right: none;
    box-shadow: none;
    position: static;
    align-self: stretch;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(var(--sidebar-width), 85vw);
    height: 100vh;
    z-index: 1100;
    background: var(--sidebar-bg);
    padding: 4.5rem 1.5rem 2rem;
    box-shadow: 0 15px 40px rgba(14, 58, 116, 0.35);
    border-right: 1px solid var(--sidebar-border);
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .sidebar-shell.is-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-shell.is-open .sidebar-toggle__icon {
    background: transparent;
  }

  .sidebar-shell.is-open .sidebar-toggle__icon::before {
    transform: translateY(6px) rotate(45deg);
  }

  .sidebar-shell.is-open .sidebar-toggle__icon::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .sidebar__links {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }

  main {
    margin-top: 0;
    padding-top: 2rem;
  }

  .sidebar-spacer {
    display: block;
    height: 4.5rem;
  }

}
