/* Styles globaux pour le portail administratif */

/* Styles de base */
body {
  font-family: "Roboto", sans-serif;
  overflow: auto;
  margin: 0;
  padding: 0;
}

/* Couleurs gouvernementales */
.govt-blue {
  background-color: #1e3a8a; /* Bleu gouvernemental */
}

.govt-green {
  background-color: #065f46; /* Vert gouvernemental */
}

/* Sidebar */
#sidebar {
  width: 256px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
  z-index: 40;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar-collapsed {
  transform: translateX(-230px); /* 90% de la largeur */
  width: 26px !important; /* 10% de la largeur */
}

/* Main Content */
#main-content {
  position: relative;
  margin-left: 256px;
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
  width: calc(100% - 256px);
  min-height: 100vh;
  padding: 1rem;
}

.main-content-expanded {
  width: calc(
    100% - 26px
  ) !important; /* 100% moins 10% de la largeur de la sidebar */
  margin-left: 26px !important; /* 10% de la largeur de la sidebar */
}

/* Sidebar toggle button */
#sidebar-toggle {
  z-index: 30;
  position: fixed;
  top: 1rem;
  left: 1rem;
  transition: all 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

#sidebar-toggle:hover {
  background-color: #f3f4f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#sidebar-toggle svg {
  width: 24px;
  height: 24px;
  color: #374151;
  transition: transform 0.3s ease-in-out;
}

.sidebar-collapsed #sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Ajustement des icônes dans la barre latérale */
.sidebar-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  transition: background-color 0.2s;
}

.sidebar-item:hover {
  background-color: #f3f4f6;
}

.sidebar-item svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.sidebar-item span {
  flex-grow: 1;
  white-space: nowrap;
}

/* Document panel style */
.document-panel {
  height: calc(100vh - 200px);
}

/* Annotations panel style */
.annotations-panel {
  height: calc(100vh - 300px);
}

/* Right info panel style */
.info-panel {
  height: calc(100vh - 200px);
}

/* Transition class */
.sidebar-transition {
  transition: all 0.3s ease-in-out;
}

/* Status badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.status-approved {
  background-color: #d1fae5;
  color: #065f46;
}

.status-rejected {
  background-color: #fee2e2;
  color: #b91c1c;
}

.status-review {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* Form control improvements */
.form-control:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

/* Responsive fixes */
@media (max-width: 768px) {
  #main-content {
    width: 100%;
    margin-left: 0;
  }

  .main-content-expanded {
    margin-left: 0;
  }

  #sidebar {
    position: fixed;
  }
}

/* Styles pour le tableau Kanban */
.kanban-board {
  overflow-x: auto;
  min-height: 500px;
}
.kanban-column {
  min-width: 280px;
  max-width: 280px;
}
.kanban-card {
  cursor: pointer;
  transition: all 0.2s ease;
}
.kanban-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Styles pour la validation de document */
.annotation-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(220, 38, 38, 0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  z-index: 10;
}

/* Styles pour le FormBuilder */
.form-builder-container {
  min-height: 400px;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 1rem;
}
.form-actions-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.frmb .field-actions .btn {
  background-color: #1e3a8a;
  color: white;
}
.frmb .toggle-form {
  background-color: #1e3a8a;
}
.form-wrap.form-builder .frmb .form-elements .false-label:first-child {
  color: #1e3a8a;
}

/* Styles pour la vérification des documents */
.verify-badge {
  background-color: #40b3fa;
  color: white;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}
.verify-badge svg {
  width: 12px;
  height: 12px;
  margin-right: 4px;
}
.verification-result {
  display: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  margin-top: 0.5rem;
}
.verification-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.verification-error {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.verification-loading {
  display: inline-flex;
  align-items: center;
}
.verification-loading .spinner {
  border: 2px solid #d1d5db;
  border-top: 2px solid #40b3fa;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Styles pour la timeline de document */
.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 16px;
}
.timeline-item:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: #e5e7eb;
}
.timeline-item:last-child:before {
  height: 0;
}
.timeline-item .timeline-circle {
  position: absolute;
  left: -5px;
  top: 0;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background-color: #1e3a8a;
  border: 2px solid white;
}
.timeline-item.completed .timeline-circle {
  background-color: #40b3fa;
}
.timeline-item.current .timeline-circle {
  background-color: #f59e0b;
}
.timeline-item.future .timeline-circle {
  background-color: #d1d5db;
}

/* Styles pour le champ de vérification de code */
.input-code {
  letter-spacing: 0.5em;
  font-size: 1.5em;
  text-align: center;
  background: #f8fafc;
  transition: all 0.3s ease;
}
.input-code:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.verify-btn {
  background-color: #1e3a8a;
  transition: all 0.3s ease;
}
.verify-btn:hover {
  background-color: #1e40af;
}

/* Styles pour la carte de vérification */
.verification-card {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* Status supplémentaires */
.status-processing {
  background-color: #e0f2fe;
  color: #0369a1;
}
