/* ==================================================== */
/* VUE ADMINISTRATION & PARAMETRES - STYLE FLAT EPURE   */
/* Whisp It - Harmonise a 100% avec Accueil et Rapports */
/* ==================================================== */

.admin-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 4px 4px max(80px, calc(env(safe-area-inset-bottom, 0px) * 0.45 + 72px)) 4px;
  box-sizing: border-box;
}

/* ---------------------------------------------------- */
/* 1. EN-TETE ADMINISTRATION                            */
/* ---------------------------------------------------- */
.admin-header-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 0 4px;
}

.admin-header-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-header-pretitle {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.admin-view-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.admin-view-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Bouton Retour (Meme style que reports.css) */
.btn-back-to-home {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.btn-back-to-home:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-primary);
  transform: translateX(-2px);
}

/* ---------------------------------------------------- */
/* 2. SELECTEUR D ONGLETS SEGMENTES                     */
/* ---------------------------------------------------- */
.admin-segmented-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-card);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.admin-switcher-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-switcher-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.admin-switcher-btn.active {
  background-color: var(--btn-primary-bg);
  color: #ffffff;
}

.admin-switcher-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-input);
  color: var(--text-secondary);
}

.admin-switcher-btn.active .admin-switcher-badge {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ---------------------------------------------------- */
/* 3. PANNEAUX DE CONTENU                               */
/* ---------------------------------------------------- */
.admin-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.admin-panel.active {
  display: flex;
}

/* Sections 4 a 6 (chiffres, recherche, tableau des comptes) : voir admin-accounts.css */

/* Sections 7 et 9 (Modeles IA, Incidents) : voir admin-onglets.css */

/* ---------------------------------------------------- */
/* 8. MODAL AJOUT COLLABORATEUR                         */
/* ---------------------------------------------------- */
.admin-modal-backdrop {
  position: fixed;
  top: -100px;
  left: -100px;
  right: -100px;
  bottom: -100px;
  width: calc(100vw + 200px);
  height: calc(100vh + 200px);
  min-width: 100%;
  min-height: 100%;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.admin-modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.btn-close-sidebar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.admin-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-modal-card .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-modal-card .form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-modal-card .input-pill {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

.admin-modal-card .input-pill:focus {
  background-color: var(--bg-card);
  border-color: var(--border-focus);
}

.admin-modal-card .btn-primary-pill {
  width: 100%;
  height: 46px;
  border-radius: var(--radius-pill);
  background-color: var(--btn-primary-bg);
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: all var(--transition-fast);
}

.admin-modal-card .btn-primary-pill:hover {
  background-color: var(--btn-primary-hover);
}
