body {
  background-color: var(--color-surface);
}

/* ==========================================================================
  Navbar
  ========================================================================== */

.navbar {
  background-color: var(--color-white);
  border-radius: var(--radius-block);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.navbarBrand {
  display: flex;
  align-items: center;
  justify-self: start;
}

/* Titre du site façon terminal : > e-enseignement▌ */
.title-navbar {
  font-family: var(--font-family-secondary);
  font-size: 20px;
  font-weight: 500; /* IBM Plex Mono n'est chargée qu'en 400 et 500 */
  text-align: center;
  color: var(--color-ink);
  margin: 0;
}

/* Le ">" de l'invite de commande, en violet */
.title-prompt {
  color: var(--color-primary);
}

/* Curseur de saisie qui clignote après le titre */
.title-curseur {
  display: inline-block;
  width: 0.5em;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background-color: var(--color-primary);
  /* steps(1) : on/off net, sans fondu, comme un vrai terminal */
  animation: clignote 1s steps(1) infinite;
}

@keyframes clignote {
  50% {
    opacity: 0;
  }
}

/* Pas de clignotement si l'utilisateur a demandé moins d'animations */
@media (prefers-reduced-motion: reduce) {
  .title-curseur {
    animation: none;
  }
}

/* ==========================================================================
  Container (sidebar + main)
  ========================================================================== */

.container {
  display: flex;
  flex-direction: row;
  gap: var(--space-4);
  flex: 1;
  min-height: 0;
  width: 100%;
}

.sidebar {
  background-color: #ede4fb;
  border-radius: var(--radius-block);
  padding: var(--space-4);
  width: 252px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebarLabel {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-weight: 500;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: 10px;
  color: var(--color-ink);
  text-decoration: none;
  font-size: 14px;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover {
  background-color: var(--color-white);
  transform: translate(-2px);
  box-shadow: 0 4px 10px rgba(20, 18, 31, 0.1);
}

.nav-item-active,
.nav-item-active:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.main-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background-color: var(--color-white);
  border-radius: var(--radius-block);
  padding: 28px 32px 36px 32px;
}

.main-content-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  h1 {
    font-size: var(--fs-h3);
    font-weight: 600;
    margin: 0;
  }
  p {
    font-size: var(--fs-label);
    color: var(--color-text-secondary);
    margin: 0;
  }
}

/* Sections de contenu sous l'en-tete (accueil, documentation) */
.section-contenu {
  margin-bottom: 64px;
}

.section-contenu:last-child {
  margin-bottom: 0;
}

.section-titre {
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: var(--ls-h3);
  margin: 0 0 var(--space-3);
}

/* ==========================================================================
  Footer
  ========================================================================== */

.footer {
  position: relative;
  background-color: var(--color-ink);
  border-radius: var(--radius-block);
  height: 40px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Le logo Ynov est violet : le filtre le rend blanc pour rester
   lisible sur le fond fonce du pied de page. */
.footerBrand {
  position: absolute;
  left: 24px;
  display: flex;
  align-items: center;
  filter: brightness(0) invert(1);
}

/* Taille reelle du logo : les attributs width/height du HTML ne servent
   qu'a reserver la place avant le chargement de l'image. */
.footerBrand img {
  width: 60px;
  height: auto;
}

.footerAddress {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--color-white);
}

.footerSocial {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  color: var(--color-white);
}

.footerSocial svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
  Responsive
  ========================================================================== */

@media (max-width: 720px) {
  .navbar {
    grid-template-columns: auto 1fr;
  }

  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
  }

  .footer {
    justify-content: flex-start;
    padding-right: 60px;
  }

  .footerBrand {
    display: none;
  }
}

@media (max-width: 768px) {
  .section-contenu {
    margin-bottom: var(--space-6);
  }
}
