/* ===================================================================
   PALETTE & THEME (Option 1 – Institutionnel bleu/gris sobre)
   =================================================================== */

:root {
  --blue-700: #264069;
  --blue-600: #1f3357;
  --blue-500: #335a91;
  --blue-400: #3b82f6;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;

  --white: #ffffff;
}

/* ===================================================================
   RESET & BASE
   =================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-100);
}

/* Liens génériques (hors menus) */
a {
  color: var(--blue-600);
  text-decoration: underline;
  font-weight: 600;
}

a:hover {
  color: var(--blue-400);
  text-decoration: underline;
}

/* Titres */
h1, h2, h3 {
  margin-top: 0;
  color: var(--blue-700);
}

h1 { font-size: 20px; margin-bottom: 12px; }
h2 { font-size: 18px; margin: 18px 0 8px 0; }
h3 { font-size: 16px; margin: 16px 0 6px 0; }

p {
  margin: 0 0 10px 0;
  font-size: 14px;
}

/* ===================================================================
   STRUCTURE GLOBALE
   =================================================================== */

#wrap {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 16px;
}

#wrap_top {
  display: none;
}

#main {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

/* ===================================================================
   HEADER — VERSION UNIFORME BLEU
   =================================================================== */

#head {
  background-color: var(--blue-700);
  color: var(--white);
  padding: 16px 20px 14px 20px;
}

#head-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-subtitle {
  font-size: 12px;
  opacity: 0.92;
}

/* ===================================================================
   NAVBAR PRINCIPALE
   =================================================================== */

.navbar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.navbar li a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background-color: rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.navbar li a:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.navbar li a[aria-current="page"] {
  background-color: var(--white);
  color: var(--blue-700);
}

/* ===================================================================
   LAYOUT : SIDEBAR + CONTENT
   =================================================================== */

#content-and-sidebar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 20px;
}

#content {
  min-width: 0;
}

/* ===================================================================
   SIDEBAR & MENU SECONDAIRE
   =================================================================== */

#leftbar { min-width: 0; }

#leftbar .box {
  margin-bottom: 18px;
  background-color: var(--gray-100);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Liste principale */
#leftbar #navmenu-v {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.4;
}

#leftbar #navmenu-v > li {
  margin-bottom: 2px;
  border-radius: 6px;
}

/* Liens de niveau 1 */
#leftbar #navmenu-v > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  color=red;
  /*color: var(--gray-900);*/
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

#leftbar #navmenu-v > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  color: var(--gray-900);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

#leftbar #navmenu-v > li > a:hover {
  background-color: var(--gray-200);
}

/* État ouvert */
#leftbar #navmenu-v > li > a.is-open {
  background-color: var(--blue-700);
  color: var(--white);
}

/* Flèche */
#leftbar #navmenu-v > li.has-submenu > a::after {
  content: "▼";
  font-size: 9px;
  opacity: 0.9;
  transition: transform 0.16s ease;
}

#leftbar #navmenu-v > li.has-submenu > a.is-open::after {
  transform: rotate(-180deg);
}

/* Sous-menu */

#leftbar #navmenu-v li ul li a {
  display: block;
  padding: 3px 4px;
  color: var(--gray-700);
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.16s ease;
}

#leftbar #navmenu-v li ul li a {
  display: block;
  padding: 3px 4px;
  color: var(--gray-700);
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.16s ease;
}

#leftbar #navmenu-v li ul li a:hover {
  background-color: var(--gray-200);
  color: var(--gray-900);
}

/* Page active optionnelle */
#leftbar #navmenu-v li ul li.is-current > a {
  background-color: var(--gray-200);
}

/* ===================================================================
   FOOTER
   =================================================================== */

#footer {
  padding: 10px 20px 14px 20px;
  font-size: 11px;
  color: var(--gray-600);
  text-align: center;
  border-top: 1px solid var(--gray-200);
  background-color: var(--gray-100);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 900px) {
  #content-and-sidebar {
    grid-template-columns: 1fr;
  }
}
