/* ==========================================================================
   MODULE RADIOLOGIE & IMAGERIE MÉDICALE - DESIGN SYSTEM MODERNE
   Fichier : assets/css/imagerie.css
   ========================================================================== */

.img-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-body, #f8fafc);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.img-sidebar {
  width: 260px;
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.img-sidebar .sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.img-sidebar .sidebar-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.img-sidebar .sidebar-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.img-sidebar .sidebar-title span {
  font-size: 0.75rem;
  color: #94a3b8;
}

.img-sidebar .sidebar-nav {
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.img-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.img-sidebar .nav-link svg {
  width: 20px;
  height: 20px;
}

.img-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.img-sidebar .nav-link.active {
  background: #7c3aed;
  color: #ffffff;
}

.img-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.img-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.img-topbar h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

/* Boutons d'action modernes */
.btn-action-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #0284c7;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-action-img:hover {
  background: #0369a1;
}

.btn-action-img.btn-purple {
  background: #7c3aed;
}

.btn-action-img.btn-purple:hover {
  background: #6d28d9;
}

.badge-imagerie {
  background: #ede9fe;
  color: #6d28d9;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  display: inline-block;
}

/* Formulaires & Champs stylisés */
.img-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.img-form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.img-input-control {
  font-family: inherit !important;
  font-size: 0.9rem !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0.65rem 0.85rem !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.img-input-control:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}

/* Zone d'upload & Prévisualisation */
.upload-dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone-box:hover {
  border-color: #7c3aed;
  background: #faf5ff;
}

.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item span.pdf-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #dc2626;
}
