/* --- CSS POUR BIBLIOTHEQUE (RESSOURCES) --- */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');

body.detail-page {
  font-family: 'Tajawal', Tahoma, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f0f4f8;
  margin: 0;
  padding: 20px;
}

.detail-container {
  max-width: 210mm;
  margin: 0 auto;
  background: white;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-radius: 4px;
}

/* Header */
.sheet-header {
  display: flex;
  align-items: center;
  border-bottom: 3px solid #607d8b;
  padding-bottom: 20px;
  margin-bottom: 30px;
  gap: 15px;
}
.header-icon { font-size: 3em; }
.header-text h1 { margin: 0; font-size: 22pt; color: #455a64; }
.subtitle { margin: 5px 0 0 0; color: #78909c; }
.btn-print {
  margin-right: auto;
  background: #eceff1; color: #455a64;
  border: 1px solid #607d8b; padding: 10px 20px;
  border-radius: 5px; cursor: pointer;
  font-family: inherit; font-weight: bold;
}
.btn-print:hover { background: #cfd8dc; }

/* Section Titles */
.sheet-section { margin-bottom: 30px; }
.section-title {
  color: #37474f;
  font-size: 1.4em;
  border-bottom: 2px solid #b0bec5;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

/* Resources Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.resources-grid.two-col { grid-template-columns: 1fr 1fr; }

.res-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
}
.res-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-color: #607d8b;
}
.res-card.highlight { background: #e0f7fa; border-color: #00bcd4; }

.res-icon { font-size: 1.8em; }
.res-content { flex-grow: 1; }
.res-content strong { display: block; color: #263238; }
.res-content small { color: #546e7a; font-size: 0.85em; }
.res-arrow { font-size: 1.2em; color: #ccc; }

/* Books Shelf */
.books-shelf {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  border-bottom: 8px solid #8d6e63; /* Shelf wood color */
  padding-bottom: 0;
  margin-bottom: 20px;
  height: 140px;
  background: #f5f5f5; /* Wall background */
  padding-top: 20px;
  overflow: hidden;
}
.book-spine {
  width: 40px;
  height: 100%;
  background: #5d4037;
  color: white;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  border-radius: 3px 3px 0 0;
  padding: 5px 0;
  font-size: 0.85em;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2) inset;
  transition: transform 0.2s;
  cursor: default;
}
.book-spine:hover { transform: translateY(-10px); }
.book-spine.alt { background: #3e2723; height: 90%; }
.book-spine:nth-child(3) { background: #795548; height: 95%; }
.book-spine:nth-child(5) { background: #8d6e63; height: 85%; }

.book-title { font-weight: bold; margin-bottom: 5px; }
.book-author { font-size: 0.7em; opacity: 0.8; }

.books-list-text { background: #fff3e0; padding: 15px; border-radius: 8px; font-size: 0.9em; }
.books-list-text ul { margin: 0; padding-right: 20px; }

/* Institutions List */
.institutions-list { display: flex; flex-direction: column; gap: 10px; }
.inst-item {
  background: #f1f8e9;
  padding: 10px 15px;
  border-radius: 6px;
  border-right: 4px solid #8bc34a;
}
.inst-icon { margin-left: 10px; }

/* Training Path */
.training-path {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}
.path-step {
  text-align: center;
  width: 120px;
}
.step-circle {
  width: 40px;
  height: 40px;
  background: #263238;
  color: white;
  border-radius: 50%;
  line-height: 40px;
  margin: 0 auto 10px auto;
  font-weight: bold;
}
.path-line {
  flex-grow: 1;
  height: 2px;
  background: #ccc;
  margin-top: -30px; /* Align with circle center approx */
}
.path-step strong { display: block; font-size: 0.9em; color: #37474f; }
.path-step small { font-size: 0.75em; color: #78909c; }

/* Tips Box */
.tips-box {
  background: #fff8e1;
  border: 1px dashed #ffca28;
  padding: 15px;
  text-align: center;
  border-radius: 8px;
}
.tips-box h3 { margin: 0 0 5px 0; color: #f57f17; }
.tips-box p { margin: 0; color: #5d4037; }

/* Print Rules */
@media print {
  body { background: white; padding: 0; }
  .detail-container { box-shadow: none; padding: 0; width: 100%; border: none; }
  .btn-print { display: none; }
  .res-card { border: 1px solid #999; box-shadow: none; }
  .books-shelf { background: none; border-bottom: 2px solid #000; }
  .book-spine { border: 1px solid #000; color: #000 !important; background: none !important; box-shadow: none; }
}