.content > div:first-child {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.-list {
	width: 300px;
	border-right: 1px solid #ccc;
	overflow-y: auto;
	background: #f9f9f9;
	flex: 1;
	min-height: 0;
}

.-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 16px;
	border-bottom: 1px solid #eee;
	text-decoration: none;
	color: #333;
}

.-list a:hover {
	background-color: #eee;
}

.-details {
	width:50%;
	max-width:400px;
	padding: 20px;
}

.-details.testbook-details {
	width: 100%;
	max-width: none;
	height: 100%;
	overflow: auto;
	box-sizing: border-box;
	padding-bottom: 60px;
}

.-list a.active {
	background-color: rgb(18, 70, 153);
	color: #fff;
}

.-list a.sub-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-left: 32px;
	font-size: 0.9em;
	background-color: #eef2fa;
}

.-list a.sub-item.active {
	background-color: rgb(18, 70, 153);
	color: #fff;
}

.sub-item-label {
	flex: 1;
	min-width: 0;
}

.ts-stats {
	display: flex;
	flex-shrink: 0;
	gap: 8px;
	font-size: 0.85em;
	font-weight: bold;
	white-space: nowrap;
}

.ts-pct-workshop {
	color: #b8860b;
}

.ts-pct-site {
	color: #2e7d32;
}

.-list a.active .ts-pct-workshop,
.-list a.active .ts-pct-site {
	color: #fff;
}

body.only-workshop .ts-pct-site {
	display: none;
}

body.only-site .ts-pct-workshop {
	display: none;
}

.list-group-title {
	padding: 10px 16px 4px;
	font-size: 0.8em;
	font-weight: bold;
	text-transform: uppercase;
	color: #666;
	background-color: #eef0f3;
	border-bottom: 1px solid #ddd;
}

.-details h2 {
	margin-bottom: 15px;
}

.-details p {
	margin: 8px 0;
}

.-details input,
.-details select {
  width: 100%;
  padding: 8px;
  margin: 5px 0;
  font-size: 14px;
  box-sizing: border-box;
}

.-details button {
  margin-right: 10px;
  padding: 8px 14px;
  background-color: rgb(18, 70, 153);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  height:50px;
}
.-details textarea {
	width:50%;
}

.right .icon-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-icon {
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(18, 70, 153);
  text-decoration: none;
  font-size: 20px;
  cursor: pointer;
}

.search-bar {
  display: flex;
  padding: 10px;
  gap: 5px;
  background-color: #fff;
  border-bottom: 1px solid #ccc;
}

.search-bar input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-bar button {
  background-color: rgb(18, 70, 153);
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}



.add-bar,
.export-bar {
  padding: 10px;
  text-align: center;
  background-color: #f4f4f4;
  border-bottom: 1px solid #ccc;
}

.add-bar button ,
.export-bar button{
  padding: 8px 12px;
  background-color: rgb(18, 70, 153);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.novo-form {
  position: fixed;
  top: 100px;
  right: 10px;
  background-color: #fff;
  width: 300px;
  padding: 8px;
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
  z-index: 999;
  justify-items: center;
  box-sizing: border-box;
}

.novo-form h3 {
  margin-top: 0;
}
.novo-form input,
.novo-form select,
.novo-form button{
  margin:5% auto;
  width: 100%;
  padding: 10px;
  font-size: 14px;
}
.novo-form input{
  max-width:260px;
}
.novo-form button {
  color: white;
  background-color: rgb(18, 70, 153);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.testbook-form {
  width: 380px;
  text-align: left;
}
.testbook-form label {
  display: block;
  font-size: 13px;
  margin-top: 8px;
  width: 100%;
}
.testbook-form .mode-toggle {
  margin: 10px 0;
}
.testbook-form .mode-toggle label {
  display: block;
  font-weight: normal;
  margin: 4px 0;
}

.loan-open {
    background-color: #fff3cd; /* jaune/orange clair */
    color: #856404;
    padding: 5px;
    display: block;
    border-radius: 5px;
    margin-bottom: 5px;
}

.loan-closed {
    background-color: #d4edda; /* vert */
    color: #155724;
    padding: 5px;
    display: block;
    border-radius: 5px;
    margin-bottom: 5px;
}
.testbook-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.treeview {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.tree-header,
.tree-item-book {
  display: grid;
  grid-template-columns: 30px 50px 1fr 1fr 90px 90px 110px 1.5fr;
  align-items: center;
  gap: 8px;
}

.tree-header {
  background-color: #f4f4f4;
  font-weight: bold;
  padding: 10px 12px;
  border-bottom: 1px solid #ccc;
}

.tree-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.tree-item:hover {
  background-color: #f0f4fb;
}

.tree-toggle {
  display: inline-block;
  width: 14px;
  color: rgb(18, 70, 153);
}

.tree-item-sheet {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-children {
  display: none;
  padding-left: 30px;
  background-color: #fbfbfd;
  overflow-x: auto;
}

.tree-node.open > .tree-children {
  display: block;
}

.mode-selector {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 20px;
  padding: 10px 0;
  margin: 0;
  background-color: #fff;
  box-sizing: content-box;
}

.mode-selector select {
  box-sizing: border-box;
  height: 20px;
  max-width: 140px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 18px;
  border: 1px solid rgb(18, 70, 153);
  border-radius: 4px;
  color: rgb(18, 70, 153);
  background-color: #fff;
  cursor: pointer;
}

.mode-selector button {
  box-sizing: border-box;
  margin-top: 0;
  width: auto;
  height: 20px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  border: none;
  border-radius: 4px;
  background-color: rgb(18, 70, 153);
  color: #fff;
  cursor: pointer;
}

.test-items-wrapper {
  margin-top: 10px;
}

.test-items-table.only-workshop .col-site {
  display: none;
}

.test-items-table.only-site .col-workshop {
  display: none;
}

.test-items-table {
  width: 100%;
  min-width: 1300px;
  border-collapse: separate;
  border-spacing: 0;
  margin: 10px 0;
  font-size: 13px;
}

.test-items-table th,
.test-items-table td {
  border: 1px solid #ddd;
  padding: 6px;
  text-align: left;
}

.test-items-table th {
  background-color: rgb(18, 70, 153);
  color: #fff;
  text-align: center;
}

.test-items-table th.group-header {
  background-color: rgb(18, 70, 153);
}

.test-items-table th.sub-header {
  background-color: #e0e0e0;
  color: #333;
}

.test-items-table thead th {
  position: sticky;
  z-index: 2;
  box-sizing: border-box;
  vertical-align: middle;
}

.test-items-table thead tr:first-child th {
  top: 40px;
  height: 40px;
}

.test-items-table thead tr:nth-child(2) th {
  top: 80px;
  height: 36px;
}

.test-items-table input,
.test-items-table select {
  width: 100%;
  box-sizing: border-box;
  padding: 4px;
  font-size: 12px;
}

.test-items-table textarea.auto-grow {
  width: 100%;
  box-sizing: border-box;
  padding: 4px;
  font-size: 12px;
  font-family: inherit;
  resize: none;
  overflow: hidden;
  min-height: 24px;
  display: block;
}

.test-items-form button {
  margin: 10px 0 20px;
  padding: 8px 14px;
  background-color: rgb(18, 70, 153);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.save-toast {
  display: inline-block;
  background-color: #d4edda;
  color: #155724;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.field-disabled {
  background-color: #e9e9e9 !important;
  color: #999 !important;
  cursor: not-allowed;
}

.designation-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.designation-content {
  flex: 1;
  min-width: 0;
}

.attach-btn {
  flex-shrink: 0;
  width: auto;
  margin: 0;
  padding: 4px 6px;
  font-size: 14px;
  line-height: 1;
  background: #eef2fa;
  color: rgb(18, 70, 153);
  border: 1px solid rgb(18, 70, 153);
  border-radius: 4px;
  cursor: pointer;
}

.attach-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1998;
}

.attach-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.attach-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1999;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.attach-panel.open {
  transform: translateX(0);
}

.attach-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #ddd;
  background-color: rgb(18, 70, 153);
  color: #fff;
}

.attach-panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.attach-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: auto;
  line-height: 1;
}

.attach-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.attach-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f4f4f4;
  border-radius: 6px;
  padding: 8px;
  min-height: 220px;
  box-sizing: border-box;
}

.attach-carousel img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.attach-nav {
  background: rgb(18, 70, 153);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.attach-carousel-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
}

.attach-pdfs {
  margin-top: 20px;
}

.attach-pdfs h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  color: #666;
}

.attach-pdfs ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attach-pdfs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.attach-pdfs li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-empty {
  color: #999;
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.attach-error {
  color: #a94442;
  font-size: 13px;
  text-align: center;
  padding: 10px 0;
}

.attach-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 8px;
  align-items: center;
}

.attach-panel-footer input[type="file"] {
  flex: 1;
  font-size: 12px;
  width: auto;
  margin: 0;
  padding: 0;
}

.attach-panel-footer button {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 13px;
}

.attach-delete {
  width: auto;
  margin: 0;
  padding: 2px 7px;
  font-size: 12px;
  background: #f8d7da;
  color: #a94442;
  border: 1px solid #a94442;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.attach-pdf-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
