body {
  font-family:
    "Source Sans 3",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  color: #3f3f3f;
}

h2 {
  font-weight: 600;
}
h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: #04419c;
}

a {
  text-decoration: none;
  color: #0d6efd;
}

/* Uniformiser la hauteur des champs */
input[type="password"] {
  height: 44px;
  line-height: 1.2;
  padding-right: 40px; /* espace pour l'icône */
}

.strength-bar {
  height: 10px;
  width: 100%;
  background-color: #eee;
  border-radius: 5px;
  margin-top: 5px;
  position: relative;
}
/*Affichage de la box en forme de cadre*/
.card-form {
  max-width: 500px;
  margin: auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
/* Style de l’icône 👁️ */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px; /* espace pour l’œil */
}

.toggle-password {
  position: absolute;
  top: 25px;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #666;
  user-select: none;
}

#suggestions {
  position: absolute;
  z-index: 1000;
  width: 100%;
}
#suggestions .list-group-item {
  cursor: pointer;
}

.side-nav {
  width: 300px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 0.25rem 0.5rem 0.5rem 0.5rem;
}
.side-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-start;
  padding: 0.65rem 0.9rem;
  border-radius: 0.6rem;
  color: #212529;
  text-decoration: none;
  transition: all 0.18s ease;
}
.nav-item.root {
  font-weight: 700;
  background: #0d6efd;
  color: #fff;
  margin: 0.25rem;
}
.nav-item:hover {
  background: #f5f7fb;
}
.nav-item.is-active {
  background: #e7f0ff;
  color: #0d6efd;
  font-weight: 600;
}

.nav-section {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #f0f1f3;
}
.side-nav .nav-section-btn {
  width: 100%;
  background: transparent;
  border: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 0.6rem;
  font-weight: 600;
}
.nav-section-btn:hover {
  background: #f8f9fb;
}
.nav-icon {
  width: 1.35rem;
  text-align: center;
  opacity: 0.9;
}

.side-nav .chevron {
  transition: transform 0.2s ease;
}
.nav-section-btn:not(.collapsed) .chevron {
  margin-left: auto;
  transform: rotate(180deg);
}

.nav-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #6c757d;
  padding: 0.4rem 0.9rem;
  margin: 0.35rem 0 0.25rem;
  border-left: 4px solid #0d6efd;
  background: #f8f9fa;
  border-radius: 0.4rem;
}

/* Sous-liens avec filet vertical pour la lecture */
.side-nav .nav-item.sub {
  position: relative;
  padding-left: 2rem;
}
.nav-item.sub::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: #eaeef3;
  border-radius: 2px;
}
.nav-item.sub.is-active::before {
  background: #cfe2ff;
}
.nav-item.sub:hover {
  padding-left: 2.2rem;
  color: #0d6efd;
}

/* Logout */
.nav-item.logout {
  color: #dc3545;
  font-weight: 700;
  margin-top: 0.5rem;
}
.nav-item.logout:hover {
  background: #fff5f5;
}

@media (max-width: 767.98px) {
  .app-shell {
    max-width: 100%;
    padding: 1rem 0.75rem !important;
  }

  h1,
  h2,
  h3 {
    line-height: 1.15;
  }

  h2 {
    font-size: 1.45rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .card-form {
    max-width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .side-nav {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
  }

  .offcanvas .side-nav {
    padding: 0.25rem;
  }

  .navbar-brand {
    max-width: calc(100vw - 6rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.05rem;
  }

  .btn,
  .form-control,
  .form-select {
    min-height: 44px;
  }

  .d-flex.gap-2,
  .mt-4.d-flex.gap-2,
  .d-flex.justify-content-between.align-items-center,
  .d-flex.align-items-center.justify-content-between {
    flex-wrap: wrap;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive > .table,
  table.table {
    min-width: 680px;
  }

  #tableLignes,
  #tableLignesA,
  #tableLignesV,
  #tableSeances,
  #tableDocuments {
    min-width: 760px;
  }

  .card,
  .modal-content {
    border-radius: 0.75rem;
  }
}
/* Agenda / FullCalendar responsive */
#calendar {
  overflow: hidden;
}

#calendar .fc-toolbar-title {
  font-size: 1.2rem;
}

@media (max-width: 767.98px) {
  #calendar {
    padding: 0.5rem !important;
    border-radius: 0.75rem;
  }

  #calendar .fc-header-toolbar {
    gap: 0.5rem;
    align-items: stretch;
    flex-wrap: wrap;
  }

  #calendar .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  #calendar .fc-toolbar-chunk:nth-child(2) {
    order: -1;
    width: 100%;
  }

  #calendar .fc-toolbar-title {
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.2;
  }

  #calendar .fc-button {
    padding: 0.35rem 0.55rem;
    min-height: 38px;
    font-size: 0.85rem;
  }

  #calendar .fc-col-header-cell-cushion,
  #calendar .fc-timegrid-slot-label,
  #calendar .fc-event-title,
  #calendar .fc-event-time {
    font-size: 0.82rem;
  }

  #calendar .fc-timegrid-slot {
    height: 2.5rem;
  }

  #calendar .fc-view-harness {
    min-height: 560px;
  }
}
