/* Extrait de student_dashboard.html. Ordre historique : 12. */
/* Modal styles */
#ozturkHelpModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999999;  /* AU-DESSUS DE TOUT (jeux = 999999) */
  backdrop-filter: blur(5px);
  padding: 20px;   /* etait orpheline hors de la regle : declaration perdue */
}

#ozturkHelpModal.show {
  display: flex;
}

.ozturk-modal-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  width: 900px;        /* ✅ Taille par défaut */
  height: 650px;       /* ✅ Hauteur par défaut */
  resize: both;        /* ✅ REDIMENSIONNABLE ! */
  overflow: auto;
  min-width: 600px;    /* ✅ Minimum */
  min-height: 500px;
  max-width: 95vw;     /* ✅ Maximum */
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
  position: relative;
}

@media (max-width: 1024px) {
  .ozturk-modal-content {
    padding: 20px;
    border-radius: 15px;
  }
}

/* ✅ Indicateur visuel de redimensionnement */
.ozturk-modal-content::after {
  content: "⇲";
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 16px;
  color: #cbd5e1;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.ozturk-modal-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.ozturk-modal-icon {
  font-size: 3rem;
}

@media (max-width: 1024px) {
  .ozturk-modal-icon { font-size: 2rem; }
}

.ozturk-modal-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
}

@media (max-width: 1024px) {
  .ozturk-modal-title { font-size: 1.2rem; }
}

.ozturk-modal-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.ozturk-modal-body {
  margin-bottom: 20px;
}

.ozturk-modal-label {
  display: block;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 8px;
  font-size: 14px;
}

.ozturk-modal-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.ozturk-modal-textarea:focus {
  outline: none;
  border-color: #3498db;
}

/* 🤖 STYLES CHAT IA */
.ai-message {
  display: flex;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.message-content {
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  color: #1e293b;
}

.user-message .message-content {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

.message-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: #0f172a;
}

.user-message .message-content strong {
  color: rgba(255,255,255,0.9);
}

.message-content p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.message-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 4px 0;
  line-height: 1.4;
}

.quick-topic-btn {
  background: white;
  border: 2px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #475569;
}

.quick-topic-btn:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  transform: translateY(-2px);
}

.guidance-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.guidance-btn {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.guidance-btn:hover {
  background: #e0f2fe;
  border-color: #2563eb;
  transform: translateX(4px);
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.resource-link:hover {
  background: #eff6ff;
}

#aiChatInput:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ozturk-modal-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
  font-style: italic;
}

.ozturk-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .ozturk-modal-actions { flex-direction: column; }
  .message-content { max-width: 280px; }
}

.ozturk-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
}

.ozturk-btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.ozturk-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2980b9, #21618c);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.6);
}

.ozturk-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ozturk-btn-secondary {
  background: #e5e7eb;
  color: #4b5563;
}

.ozturk-btn-secondary:hover {
  background: #d1d5db;
}
