/* --- CSS POUR GRILLE FILM (PRINT & SCREEN) --- */

@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: #eef2f3;
  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 #ff9800;
  padding-bottom: 20px;
  margin-bottom: 25px;
  gap: 15px;
}
.header-icon { font-size: 3em; }
.header-text h1 { margin: 0; font-size: 22pt; color: #e65100; }
.subtitle { margin: 5px 0 0 0; color: #7f8c8d; }
.btn-print {
  margin-right: auto;
  background: #fff3e0; color: #e65100;
  border: 1px solid #ff9800; padding: 10px 20px;
  border-radius: 5px; cursor: pointer;
  font-family: inherit; font-weight: bold;
}
.btn-print:hover { background: #ffe0b2; }

/* Info Box */
.info-box {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.info-row { display: flex; gap: 20px; margin-bottom: 10px; }
.field { display: flex; align-items: baseline; width: 50%; }
.field.full { width: 100%; }
.field .label { font-weight: bold; color: #5d4037; white-space: nowrap; margin-left: 10px; }
.field .dots { border-bottom: 1px dashed #8d6e63; flex-grow: 1; height: 20px; }

/* Principles Grid (Guide) */
.principles-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.p-card {
  flex: 1;
  background: #f5f5f5;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #ddd;
}
.p-card small { color: #666; display: block; margin-top: 5px; }

/* Evaluation Table */
.category-header {
  background: #424242;
  color: white;
  padding: 8px 15px;
  margin: 20px 0 0 0;
  border-radius: 5px 5px 0 0;
  font-size: 1.1em;
}

.eval-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  border: 1px solid #ccc;
}
.eval-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
.sub-text { margin: 2px 0 0 0; font-size: 0.85em; color: #777; }

/* Score Circles */
.score-circles {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
}
.score-circles span {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  border: 1px solid #bbb;
  border-radius: 50%;
  color: #777;
  font-weight: bold;
  font-size: 0.9em;
}
/* Print friendly styling for circles */
@media print {
  .score-circles span { border-color: #333; color: #333; }
}

/* Summary Section */
.summary-section {
  margin-top: 30px;
  border-top: 2px solid #333;
  padding-top: 20px;
}
.total-score-box {
  background: #e0f2f1;
  border: 2px solid #009688;
  padding: 15px;
  text-align: center;
  border-radius: 8px;
  width: 200px;
  margin: 0 auto 30px auto;
}
.total-score-box .label { display: block; font-weight: bold; color: #00695c; margin-bottom: 5px; }
.score-display { font-size: 2em; font-weight: bold; color: #004d40; }
.divider { color: #80cbc4; margin: 0 5px; }

/* Feedback Grid */
.feedback-grid {
  display: flex;
  gap: 20px;
}
.fb-box {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
}
.fb-box.strength { background: #e8f5e9; border-color: #81c784; }
.fb-box.weakness { background: #fff3e0; border-color: #ffb74d; }
.fb-box h4 { margin: 0 0 10px 0; color: #333; font-size: 1em; }
.lines-area {
  height: 80px;
  background-image: linear-gradient(#ccc 1px, transparent 1px);
  background-size: 100% 25px;
  width: 100%;
}

/* Footer */
.sheet-footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

/* Print Rules */
@media print {
  body { background: white; padding: 0; }
  .detail-container { box-shadow: none; padding: 0; width: 100%; max-width: 100%; }
  .btn-print, .no-print { display: none; }
  .category-header { background-color: #ddd !important; color: #000 !important; -webkit-print-color-adjust: exact; }
  .info-box, .fb-box { border: 1px solid #999; background: none !important; }
}