/* Écran Employé : liste de comptes.
 * Style tableau aligné sur le backend Gestion → Utilisateur (.gestion-table-wrap / thead #3c4043),
 * format mobile carte (lignes pleine largeur dans un bloc arrondi). */

#gestion-compte-screen.gestion-compte-has-search.screen,
#contact-screen.gestion-compte-has-search.screen {
  padding: 0 !important;
  padding-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
}

#gestion-compte-screen.gestion-compte-has-search.screen {
  padding-top: clamp(58px, 12vw + 10px, 72px) !important;
}

#contact-screen.gestion-compte-has-search.screen {
  padding-top: clamp(48px, 12vw, 66px) !important;
}

#gestion-compte-screen.gestion-compte-has-search .formulaire-main-feuille-temps,
#contact-screen.gestion-compte-has-search .formulaire-main-feuille-temps {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

#gestion-compte-screen .gestion-compte-content,
#contact-screen .gestion-compte-content {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  min-height: 0;
  flex: 1;
}

/* Bandeau recherche : même rendu Employé / Contacts (#3c4043, champ compact, focus doré). */
#gestion-compte-screen .note-search-bg,
#contact-screen .note-search-bg {
  flex-shrink: 0;
  height: 2px;
  width: 100%;
  background: #3c4043;
  pointer-events: none;
}

#gestion-compte-screen .note-search-wrap,
#contact-screen .note-search-wrap {
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  padding: 12px max(12px, env(safe-area-inset-right, 12px)) 12px max(12px, env(safe-area-inset-left, 12px));
  box-sizing: border-box;
  overflow: hidden;
  background: #3c4043;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

#gestion-compte-screen .note-search-wrap .note-search-input,
#gestion-compte-screen .note-search-wrap .gestion-compte-list-search,
#contact-screen .note-search-wrap .note-search-input,
#contact-screen .note-search-wrap .gestion-compte-list-search {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.9375rem;
  line-height: 1.35;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#gestion-compte-screen .note-search-wrap .note-search-input::placeholder,
#gestion-compte-screen .note-search-wrap .gestion-compte-list-search::placeholder,
#contact-screen .note-search-wrap .note-search-input::placeholder,
#contact-screen .note-search-wrap .gestion-compte-list-search::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

#gestion-compte-screen .note-search-wrap .note-search-input:focus,
#gestion-compte-screen .note-search-wrap .gestion-compte-list-search:focus,
#contact-screen .note-search-wrap .note-search-input:focus,
#contact-screen .note-search-wrap .gestion-compte-list-search:focus {
  outline: none;
  border-color: rgba(253, 230, 138, 0.65);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.14);
}

#gestion-compte-screen .gestion-compte-status,
#gestion-compte-screen .gestion-compte-list-error,
#contact-screen .gestion-compte-status,
#contact-screen .gestion-compte-list-error {
  margin: 0;
  padding: 12px max(16px, env(safe-area-inset-right, 16px)) 0 max(16px, env(safe-area-inset-left, 16px));
  font-size: 0.9rem;
  box-sizing: border-box;
}

#gestion-compte-screen .gestion-compte-status,
#contact-screen .gestion-compte-status {
  color: #6b7280;
}

#gestion-compte-screen .gestion-compte-list-error,
#contact-screen .gestion-compte-list-error {
  color: #b91c1c;
}

#gestion-compte-screen .gestion-compte-bulk-feedback {
  margin: 0;
  padding: 10px max(16px, env(safe-area-inset-right, 16px)) 0 max(16px, env(safe-area-inset-left, 16px));
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  box-sizing: border-box;
  color: #44403c;
}

#gestion-compte-screen .gestion-compte-bulk-feedback:not([hidden]) {
  display: block;
}

#gestion-compte-screen .gestion-compte-bulk-feedback--error {
  color: #b45309;
  font-weight: 600;
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-bulk-feedback {
  color: #e7e5e4;
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-bulk-feedback--error {
  color: #fdba74;
}

/* Bloc liste type gestion-table-wrap (Gestion → Utilisateur) : bordure, rayures, séparateurs. */
#gestion-compte-screen .gestion-compte-list-container,
#contact-screen .gestion-compte-list-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px max(12px, env(safe-area-inset-right, 12px)) max(20px, env(safe-area-inset-bottom, 12px))
    max(12px, env(safe-area-inset-left, 12px));
  margin: 0;
  background: transparent;
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#gestion-compte-screen .gestion-compte-list-container > .gestion-compte-list-empty,
#contact-screen .gestion-compte-list-container > .gestion-compte-list-empty {
  margin: 0;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #64748b;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-sizing: border-box;
}

#gestion-compte-screen .gestion-compte-item,
#contact-screen .gestion-compte-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0.45rem 0.65rem;
  margin: 0;
  background: rgba(255, 255, 255, 0.98);
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 0;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}

#gestion-compte-screen .gestion-compte-list-container .gestion-compte-item:first-of-type,
#contact-screen .gestion-compte-list-container .gestion-compte-item:first-of-type {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#gestion-compte-screen .gestion-compte-list-container .gestion-compte-item:last-of-type,
#contact-screen .gestion-compte-list-container .gestion-compte-item:last-of-type {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

#gestion-compte-screen .gestion-compte-list-container .gestion-compte-item:only-of-type,
#contact-screen .gestion-compte-list-container .gestion-compte-item:only-of-type {
  border-radius: 10px;
}

#gestion-compte-screen .gestion-compte-list-container .gestion-compte-item:nth-child(even),
#contact-screen .gestion-compte-list-container .gestion-compte-item:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

#gestion-compte-screen .gestion-compte-item:active,
#contact-screen .gestion-compte-item:active {
  background: rgba(212, 175, 55, 0.12);
}

#gestion-compte-screen .gestion-compte-item-select-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding-left: 2px;
}

#gestion-compte-screen .gestion-compte-item-cb {
  width: 22px;
  height: 22px;
  accent-color: #c9a227;
  cursor: pointer;
}

#gestion-compte-screen .gestion-compte-bulk-reset-pw:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none !important;
}

#gestion-compte-screen .gestion-compte-bulk-reset-pw:disabled:active {
  transform: none !important;
}

/* Conteneur : la pastille d’urgence est en dehors du rond (overflow) pour rester visible. */
#gestion-compte-screen .gestion-compte-item-avatar-cell,
#contact-screen .gestion-compte-item-avatar-cell {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  min-width: 40px;
  min-height: 40px;
  align-self: center;
}

#gestion-compte-screen .gestion-compte-item-avatar,
#contact-screen .gestion-compte-item-avatar {
  position: relative;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.12);
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  overflow: hidden;
  isolation: isolate;
}

#gestion-compte-screen .gestion-compte-item-emergency-badge,
#contact-screen .gestion-compte-item-emergency-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  z-index: 2;
  pointer-events: none;
  line-height: 0;
}

#gestion-compte-screen .gestion-compte-item-emergency-icon,
#contact-screen .gestion-compte-item-emergency-icon {
  display: block;
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

#gestion-compte-screen .gestion-compte-item-avatar img,
#contact-screen .gestion-compte-item-avatar img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
  object-fit: cover;
  object-position: center;
  /* Hors flux : évite height:auto + ratio intrinsèque qui étire toute la ligne flex */
  max-width: none;
  max-height: none;
}

#contact-screen .gestion-compte-item-avatar--online {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.28);
}

#contact-screen .contact-annuaire-header {
  gap: 10px;
}

#contact-screen .contact-annuaire-header-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

#contact-screen .contact-annuaire-header-main .formulaire-title {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}

#contact-screen .contact-annuaire-stats {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  color: #334155;
  white-space: nowrap;
}

#contact-screen .contact-annuaire-stats-total {
  font-variant-numeric: tabular-nums;
}

#contact-screen .contact-annuaire-stats-sep {
  opacity: 0.45;
  font-weight: 500;
}

#contact-screen .contact-annuaire-stats-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #15803d;
  font-variant-numeric: tabular-nums;
}

#contact-screen .contact-annuaire-stats-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

#app-container.app-theme-night #contact-screen .contact-annuaire-stats {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

#app-container.app-theme-night #contact-screen .contact-annuaire-stats-online {
  color: #4ade80;
}

#app-container.app-theme-night #contact-screen .gestion-compte-item-avatar--online {
  border-color: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.32);
}

#gestion-compte-screen .gestion-compte-item-text,
#contact-screen .gestion-compte-item-text {
  flex: 1 1 auto;
  min-width: 0;
}

#gestion-compte-screen .gestion-compte-item-name,
#contact-screen .gestion-compte-item-name {
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#gestion-compte-screen .gestion-compte-item-meta,
#contact-screen .gestion-compte-item-meta {
  font-size: 0.75rem;
  line-height: 1.35;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#gestion-compte-screen .gestion-compte-item-switch-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 2px 0 0;
  padding: 0;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(254, 243, 199, 0.92) 100%);
  color: #b45309;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

#gestion-compte-screen .gestion-compte-item-switch-btn:hover,
#gestion-compte-screen .gestion-compte-item-switch-btn:focus-visible {
  border-color: rgba(180, 83, 9, 0.55);
  background: #fff7ed;
  outline: none;
}

#gestion-compte-screen .gestion-compte-item-switch-btn:active {
  transform: scale(0.96);
}

#gestion-compte-screen .gestion-compte-item-switch-icon {
  display: block;
}

#gestion-compte-screen .gestion-compte-item .formulaire-feuille-temps-item-arrow,
#contact-screen .gestion-compte-item .formulaire-feuille-temps-item-arrow {
  flex: 0 0 auto;
  opacity: 0.4;
  font-size: 1.15rem;
  line-height: 1;
  color: #64748b;
}

@media (hover: hover) and (pointer: fine) {
  #gestion-compte-screen .gestion-compte-item:hover,
  #contact-screen .gestion-compte-item:hover {
    background: rgba(212, 175, 55, 0.08);
  }
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-item,
#app-container.app-theme-night #contact-screen .gestion-compte-item {
  background: rgba(30, 41, 59, 0.95);
  border-left-color: rgba(255, 255, 255, 0.1);
  border-right-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-list-container .gestion-compte-item:first-of-type,
#app-container.app-theme-night #contact-screen .gestion-compte-list-container .gestion-compte-item:first-of-type {
  border-top-color: rgba(255, 255, 255, 0.1);
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-list-container .gestion-compte-item:last-of-type,
#app-container.app-theme-night #contact-screen .gestion-compte-list-container .gestion-compte-item:last-of-type {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-list-container .gestion-compte-item:nth-child(even),
#app-container.app-theme-night #contact-screen .gestion-compte-list-container .gestion-compte-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-item-name,
#app-container.app-theme-night #contact-screen .gestion-compte-item-name {
  color: #f1f5f9;
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-item-meta,
#app-container.app-theme-night #contact-screen .gestion-compte-item-meta {
  color: #94a3b8;
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-list-container > .gestion-compte-list-empty,
#app-container.app-theme-night #contact-screen .gestion-compte-list-container > .gestion-compte-list-empty {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-item-avatar,
#app-container.app-theme-night #contact-screen .gestion-compte-item-avatar {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fc;
}

/* Fiche employé : en-tête fixe (classes formulaire-*) + avatar dans un cadre fixe
 * (évite l’image plein écran / zoom intempestif quand le CSS manquait). */
.gestion-compte-detail-mandatory-banner {
  margin: 0 16px 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #1e3a5f;
  background: #e8f4fc;
  border: 1px solid #93c5ec;
  border-radius: 10px;
}

#gestion-compte-detail-screen.gestion-compte-detail-has-header.screen {
  padding: 0 !important;
  padding-top: clamp(48px, 12vw, 66px) !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

#gestion-compte-detail-screen .gestion-compte-detail-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px max(16px, env(safe-area-inset-right, 16px)) 24px max(16px, env(safe-area-inset-left, 16px));
  box-sizing: border-box;
}

#gestion-compte-detail-screen .gestion-compte-detail-card {
  max-width: 32rem;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

#gestion-compte-detail-screen .gestion-compte-detail-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
}

#gestion-compte-detail-screen .gestion-compte-detail-photo-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

/* Masque le contrôle natif « Choisir un fichier » (ou équivalent) : l’action est l’icône appareil. */
#gestion-compte-detail-screen .gestion-compte-detail-avatar-input,
#gestion-compte-detail-screen input.gestion-compte-detail-avatar-input[type="file"] {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 0.1px;
  height: 0.1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
}

#gestion-compte-detail-screen .gestion-compte-detail-avatar-stack {
  position: relative;
  width: min(200px, 72vw);
  max-width: 100%;
  flex-shrink: 0;
  /* Espace pour le bouton appareil qui dépasse légèrement sur le bord. */
  margin: 0 auto 4px;
  padding: 0 0 2px 2px;
  box-sizing: content-box;
}

#gestion-compte-detail-screen .gestion-compte-detail-avatar-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(200px, 72vw);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(201, 162, 39, 0.15);
  border: 2px solid rgba(201, 162, 39, 0.35);
  box-sizing: border-box;
  margin: 0 auto;
  isolation: isolate;
}

#gestion-compte-detail-screen .gestion-compte-detail-avatar-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#gestion-compte-detail-screen .gestion-compte-detail-initial {
  font-size: clamp(2.5rem, 14vw, 3.5rem);
  font-weight: 700;
  color: #b45309;
  line-height: 1;
  user-select: none;
}

#gestion-compte-detail-screen .gestion-compte-detail-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

#gestion-compte-detail-screen .gestion-compte-detail-avatar-img[hidden] {
  display: none !important;
}

/* Sur le stack, pas dans .avatar-frame : sinon overflow:hidden + cercle découpent la pastille. */
#gestion-compte-detail-screen .gestion-compte-detail-avatar-stack .gestion-compte-detail-emergency-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 9;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

#gestion-compte-detail-screen .gestion-compte-detail-emergency-badge .gestion-compte-emergency-badge__icon {
  display: block;
  width: 26px;
  height: 26px;
}

#gestion-compte-detail-screen .gestion-compte-detail-camera-fab {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c9a227;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  transition: transform 0.12s ease, background 0.12s ease;
}

#gestion-compte-detail-screen .gestion-compte-detail-camera-fab:active {
  transform: scale(0.96);
  background: #a88b1e;
}

#gestion-compte-detail-screen .gestion-compte-detail-camera-fab__icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#gestion-compte-detail-screen .gestion-compte-detail-photo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  width: 100%;
  min-height: 0;
}

/* Aucun lien visible : on cache la barre (ex. seul « Retirer » quand caché). */
#gestion-compte-detail-screen .gestion-compte-detail-photo-actions:not(:has(.gestion-compte-detail-photo-link:not([hidden]))) {
  display: none;
}

#gestion-compte-detail-screen .gestion-compte-detail-photo-link {
  padding: 0.35rem 0.5rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #b45309;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#gestion-compte-detail-screen .gestion-compte-detail-photo-link--danger {
  color: #b91c1c;
}

#gestion-compte-detail-screen .gestion-compte-detail-name {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

#gestion-compte-detail-screen .gestion-compte-detail-meta {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.4;
}

#gestion-compte-detail-screen .gestion-compte-detail-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#gestion-compte-detail-screen .gestion-compte-detail-emergency-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

#gestion-compte-detail-screen .gestion-compte-detail-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: #c9a227;
  cursor: pointer;
}

#gestion-compte-detail-screen .gestion-compte-detail-checkbox-label {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #374151;
  cursor: pointer;
  font-weight: 500;
}

#gestion-compte-detail-screen .gestion-compte-detail-section {
  margin-top: 0.5rem;
}

#gestion-compte-detail-screen .gestion-compte-detail-fields {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#gestion-compte-detail-screen .gestion-compte-detail-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
}

/* Libellés masqués visuellement ; le texte est dans le placeholder (accessibilité : label + for conservés). */
#gestion-compte-detail-screen .gestion-compte-detail-label--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

#gestion-compte-detail-screen .gestion-compte-detail-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

#gestion-compte-detail-screen .gestion-compte-detail-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}

#gestion-compte-detail-screen select.gestion-compte-detail-input.gestion-compte-detail-select,
#gestion-compte-detail-screen .gestion-compte-detail-select {
  min-height: 48px;
  color: #111827;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  background-size: 18px 18px;
  padding-right: 2.25rem;
}

#gestion-compte-detail-screen .gestion-compte-detail-submit {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background: #c9a227;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

#gestion-compte-detail-screen .gestion-compte-detail-submit:active {
  opacity: 0.92;
}

#gestion-compte-detail-screen .gestion-compte-detail-message {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

#gestion-compte-detail-screen .gestion-compte-detail-message[data-type='ok'] {
  color: #15803d;
}

#gestion-compte-detail-screen .gestion-compte-detail-message[data-type='error'] {
  color: #b91c1c;
}

/* Fiche lecture seule — écran Contact (annuaire) */
#contact-detail-screen .contact-detail-content {
  padding: 0 16px max(20px, env(safe-area-inset-bottom, 20px));
  max-width: 32rem;
  margin: 0 auto;
  box-sizing: border-box;
}

#contact-detail-screen .contact-detail-hero {
  text-align: center;
  padding: 8px 0 16px;
}

#contact-detail-screen .contact-detail-hero-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #e8c87a, #c9a227);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

#contact-detail-screen .contact-detail-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#contact-detail-screen .contact-detail-hero-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
}

#contact-detail-screen .contact-detail-quick-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}

#contact-detail-screen .contact-detail-quick {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  color: #1e40af;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

#contact-detail-screen .contact-detail-quick svg {
  width: 24px;
  height: 24px;
}

#contact-detail-screen .contact-detail-quick:active {
  opacity: 0.9;
}

#contact-detail-screen .contact-detail-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#contact-detail-screen .contact-detail-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  box-sizing: border-box;
}

#contact-detail-screen .contact-detail-item--badge {
  text-align: center;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
}

#contact-detail-screen .contact-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 4px;
}

#contact-detail-screen .contact-detail-value {
  font-size: 1rem;
  line-height: 1.4;
  color: #111827;
  word-break: break-word;
}

#contact-detail-screen .contact-detail-value a {
  color: #1d4ed8;
}

#contact-detail-screen .contact-detail-badge-urgence {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #b91c1c;
}

/* ── Fond d’écran personnel (#app-container) : calque plein opaque sur tout l’écran Employé,
 * Contacts et fiche — sans transparence ni backdrop-filter (évite les bugs iOS / WebKit où la
 * photo « cover » du parent traverse ou remplace visuellement la page). */
#app-container.app-user-custom-bg #gestion-compte-screen.gestion-compte-has-search.screen,
#app-container.app-user-custom-bg #contact-screen.gestion-compte-has-search.screen {
  background: #efede9;
  background-color: #efede9;
  isolation: isolate;
}

#app-container.app-user-custom-bg #gestion-compte-screen .formulaire-header-feuille-temps,
#app-container.app-user-custom-bg #contact-screen .formulaire-header-feuille-temps {
  background: #efede9;
  background-color: #efede9;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

#app-container.app-user-custom-bg #gestion-compte-screen .formulaire-main-feuille-temps,
#app-container.app-user-custom-bg #contact-screen .formulaire-main-feuille-temps {
  background: #efede9;
  background-color: #efede9;
}

#app-container.app-user-custom-bg #gestion-compte-screen .gestion-compte-content,
#app-container.app-user-custom-bg #contact-screen .gestion-compte-content {
  background: #efede9;
  background-color: #efede9;
}

#app-container.app-user-custom-bg #gestion-compte-screen .gestion-compte-list-container,
#app-container.app-user-custom-bg #contact-screen .gestion-compte-list-container {
  background: #efede9;
  background-color: #efede9;
}

#app-container.app-user-custom-bg #gestion-compte-detail-screen.gestion-compte-detail-has-header.screen {
  background: #efede9;
  background-color: #efede9;
  isolation: isolate;
}

#app-container.app-user-custom-bg #gestion-compte-detail-screen .formulaire-header-feuille-temps {
  background: #efede9;
  background-color: #efede9;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

#app-container.app-user-custom-bg #gestion-compte-create-screen.gestion-compte-detail-has-header.screen {
  background: #efede9;
  background-color: #efede9;
  isolation: isolate;
}

#app-container.app-user-custom-bg #gestion-compte-create-screen .formulaire-header-feuille-temps {
  background: #efede9;
  background-color: #efede9;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

#app-container.app-user-custom-bg #gestion-compte-create-screen .gestion-compte-create-main {
  background: transparent;
}

#app-container.app-user-custom-bg #gestion-compte-detail-screen .gestion-compte-detail-main {
  background: #efede9;
  background-color: #efede9;
}

#app-container.app-user-custom-bg.app-theme-night #gestion-compte-screen.gestion-compte-has-search.screen,
#app-container.app-user-custom-bg.app-theme-night #contact-screen.gestion-compte-has-search.screen,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-screen .formulaire-header-feuille-temps,
#app-container.app-user-custom-bg.app-theme-night #contact-screen .formulaire-header-feuille-temps,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-screen .formulaire-main-feuille-temps,
#app-container.app-user-custom-bg.app-theme-night #contact-screen .formulaire-main-feuille-temps,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-screen .gestion-compte-content,
#app-container.app-user-custom-bg.app-theme-night #contact-screen .gestion-compte-content,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-screen .gestion-compte-list-container,
#app-container.app-user-custom-bg.app-theme-night #contact-screen .gestion-compte-list-container {
  background: #1a1816;
  background-color: #1a1816;
}

#app-container.app-user-custom-bg.app-theme-night #gestion-compte-detail-screen.gestion-compte-detail-has-header.screen,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-detail-screen .formulaire-header-feuille-temps,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-detail-screen .gestion-compte-detail-main {
  background: #1a1816;
  background-color: #1a1816;
}

#app-container.app-user-custom-bg.app-theme-night #gestion-compte-create-screen.gestion-compte-detail-has-header.screen,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-create-screen .formulaire-header-feuille-temps,
#app-container.app-user-custom-bg.app-theme-night #gestion-compte-create-screen .gestion-compte-create-main {
  background: #1a1816;
  background-color: #1a1816;
}

/* Barre titre liste + création : même hauteur (device-adaptive <600px = min-height 42px, paddings 6+8). */
#gestion-compte-screen > .formulaire-header.formulaire-header-feuille-temps,
#gestion-compte-create-screen > .formulaire-header.formulaire-header-feuille-temps {
  align-items: center;
  overflow: visible;
}

@container app (max-width: 599px) {
  #gestion-compte-screen > .formulaire-header.formulaire-header-feuille-temps,
  #gestion-compte-create-screen > .formulaire-header.formulaire-header-feuille-temps {
    min-height: 58px;
  }

  #gestion-compte-screen .gestion-compte-topbar-icon-btn {
    width: 40px;
    height: 40px;
  }

  #gestion-compte-screen .gestion-compte-topbar-icon-btn__icon svg {
    width: 20px;
    height: 20px;
  }

  #gestion-compte-create-screen .gestion-compte-create-header-save {
    width: 40px;
    height: 40px;
  }

  #gestion-compte-create-screen .gestion-compte-create-header-save svg {
    width: 20px;
    height: 20px;
  }
}

/* Pastille « Créer un compte » (équivalent bandeau /utilisateur — icône user+ et survol or). */
#gestion-compte-screen .gestion-compte-topbar-icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  color: var(--text);
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

#gestion-compte-screen .gestion-compte-topbar-icon-btn__icon {
  display: block;
  margin-left: -2px;
  line-height: 0;
}

#gestion-compte-screen .gestion-compte-topbar-icon-btn__icon svg {
  display: block;
}

#gestion-compte-screen .gestion-compte-topbar-icon-btn--hov-gold:focus-visible {
  outline: 2px solid #e6cf6a;
  outline-offset: 3px;
}

@media (hover: hover) {
  #gestion-compte-screen .gestion-compte-topbar-icon-btn--hov-gold:hover:not(:disabled) {
    background: var(--gold, #c9a227);
    border-color: #8f7319;
    color: #fff;
    transform: scale(1.04);
  }
}

#gestion-compte-screen .gestion-compte-topbar-icon-btn--hov-gold:active:not(:disabled) {
  transform: scale(0.98);
}

#app-container.app-theme-night #gestion-compte-screen .gestion-compte-topbar-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Écran natif « Créer un compte » (#gestion-compte/creer) */
#gestion-compte-create-screen.gestion-compte-detail-has-header.screen {
  padding: 0 !important;
  padding-top: clamp(58px, 12vw + 10px, 72px) !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(165deg, #f8f6f2 0%, #f0ebe3 45%, #e8e4dc 100%);
}

#gestion-compte-create-screen .gestion-compte-create-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px max(16px, env(safe-area-inset-right, 16px)) max(28px, env(safe-area-inset-bottom, 20px))
    max(16px, env(safe-area-inset-left, 16px));
  box-sizing: border-box;
}

#gestion-compte-create-screen .gestion-compte-create-header.formulaire-header-feuille-temps .formulaire-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #44403c 0%, #78716c 40%, #a8a29e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  #gestion-compte-create-screen .gestion-compte-create-header.formulaire-header-feuille-temps .formulaire-title {
    color: #44403c;
    background: none;
  }
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-header.formulaire-header-feuille-temps .formulaire-title {
  background: linear-gradient(100deg, #fafaf9 10%, #e7e5e4 55%, #d6d3d1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  #app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-header.formulaire-header-feuille-temps .formulaire-title {
    color: #f5f5f4;
    background: none;
  }
}

#gestion-compte-create-screen .gestion-compte-create-card {
  max-width: 21.5rem;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 40px -12px rgba(17, 24, 39, 0.18),
    0 4px 16px -6px rgba(201, 162, 39, 0.12);
  overflow: hidden;
  position: relative;
}

#gestion-compte-create-screen .gestion-compte-create-card::before {
  content: '';
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #a8841f, #d4af37 40%, #e8c87a 55%, #c9a227 100%);
  opacity: 0.95;
}

#gestion-compte-create-screen .gestion-compte-create-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 16px 20px;
}

#gestion-compte-create-screen .gestion-compte-detail-section {
  margin: 0;
  padding: 18px 0 2px;
}

#gestion-compte-create-screen .gestion-compte-detail-section + .gestion-compte-detail-section {
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  margin-top: 4px;
}

#gestion-compte-create-screen .gestion-compte-detail-section-title {
  margin: 0 0 14px;
  padding: 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78716c;
  display: flex;
  align-items: center;
  gap: 8px;
}

#gestion-compte-create-screen .gestion-compte-detail-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.35), transparent);
  min-width: 2rem;
}

#gestion-compte-create-screen .gestion-compte-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

#gestion-compte-create-screen .gestion-compte-detail-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #57534e;
  letter-spacing: 0.01em;
}

#gestion-compte-create-screen .gestion-compte-detail-label--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

#gestion-compte-create-screen .gestion-compte-detail-input::placeholder {
  color: #a8a29e;
  opacity: 1;
}

#gestion-compte-create-screen .gestion-compte-detail-input {
  width: 100%;
  padding: 14px 14px;
  font-size: 1rem;
  line-height: 1.35;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 12px;
  background: #fafaf9;
  color: #111827;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

#gestion-compte-create-screen .gestion-compte-detail-input:hover:not(:focus-visible):not(:disabled) {
  border-color: rgba(201, 162, 39, 0.35);
  background: #fff;
}

#gestion-compte-create-screen .gestion-compte-detail-input:focus-visible {
  outline: none;
  border-color: #c9a227;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(201, 162, 39, 0.22),
    0 4px 14px -4px rgba(17, 24, 39, 0.12);
}

/* WebKit / mobile : sans ces contraintes, input[type=date] peut devenir anormalement haut. */
#gestion-compte-create-screen input.gestion-compte-detail-input[type='date'] {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  max-height: 54px;
  padding-block: 12px;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
}

#gestion-compte-create-screen input.gestion-compte-detail-input[type='date']::-webkit-date-and-time-value {
  text-align: left;
}

#gestion-compte-create-screen select.gestion-compte-detail-input.gestion-compte-detail-select,
#gestion-compte-create-screen .gestion-compte-detail-select {
  min-height: 50px;
  color: #111827;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #fafaf9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  padding-right: 2.5rem;
}

#gestion-compte-create-screen select.gestion-compte-detail-input:focus-visible {
  background-color: #fff;
}

/* Multi-fonctions (étiquettes) — création de compte */
#gestion-compte-create-screen .gestion-compte-fonc-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #fafaf9;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

#gestion-compte-create-screen .gestion-compte-fonc-tags:focus-within {
  border-color: #c9a227;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(201, 162, 39, 0.22),
    0 4px 14px -4px rgba(17, 24, 39, 0.12);
}

#gestion-compte-create-screen .gestion-compte-fonc-tags__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  /* Mobile : une ligne complète pour les puces ; évite que le champ list+datalist soit réduit à ~50 %. */
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

#gestion-compte-create-screen .gestion-compte-fonc-tags__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: #44403c;
}

#gestion-compte-create-screen .gestion-compte-fonc-tags__chip-remove {
  margin: 0;
  padding: 0 4px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.85;
  border-radius: 4px;
}

#gestion-compte-create-screen .gestion-compte-fonc-tags__chip-remove:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

#gestion-compte-create-screen .gestion-compte-fonc-tags__input {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: #111827;
  font-size: 1rem;
  line-height: 1.35;
  outline: none;
  padding: 4px 2px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  #gestion-compte-create-screen .gestion-compte-fonc-tags__chips {
    flex: 0 1 auto;
    width: auto;
  }

  #gestion-compte-create-screen .gestion-compte-fonc-tags__input {
    flex: 1 1 140px;
    width: auto;
    min-width: 120px;
  }
}

#gestion-compte-create-screen .gestion-compte-fonc-tags__input::placeholder {
  color: #a8a29e;
  opacity: 1;
}

#gestion-compte-create-screen .gestion-compte-create-fonc-tags-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #78716c;
}

#gestion-compte-create-screen .gestion-compte-create-default-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#gestion-compte-create-screen .gestion-compte-create-emergency-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
  padding: 14px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(201, 162, 39, 0.02));
  border: 1px solid rgba(201, 162, 39, 0.2);
}

#gestion-compte-create-screen .gestion-compte-detail-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #c9a227;
  cursor: pointer;
}

#gestion-compte-create-screen .gestion-compte-detail-checkbox-label {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #44403c;
  cursor: pointer;
  font-weight: 600;
}

#gestion-compte-create-screen .gestion-compte-create-contact-hint {
  margin: -4px 0 0;
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #57534e;
  background: rgba(201, 162, 39, 0.09);
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 10px;
}

#gestion-compte-create-screen .gestion-compte-create-contact-hint strong {
  color: #a8841f;
  font-weight: 700;
}

#gestion-compte-create-screen .gestion-compte-create-header-save {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  background: linear-gradient(160deg, #fafaf9, #e7e5e4);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: #57534e;
  box-shadow: 0 2px 8px -2px rgba(17, 24, 39, 0.12);
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

#gestion-compte-create-screen .gestion-compte-create-header-save:focus-visible {
  outline: 2px solid #e6cf6a;
  outline-offset: 3px;
}

@media (hover: hover) {
  #gestion-compte-create-screen .gestion-compte-create-header-save:hover:not(:disabled) {
    background: linear-gradient(160deg, #d4af37, #c9a227);
    border-color: #8f7319;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 20px -4px rgba(201, 162, 39, 0.55);
  }
}

#gestion-compte-create-screen .gestion-compte-create-header-save:active:not(:disabled) {
  transform: scale(0.97);
}

#gestion-compte-create-screen .gestion-compte-create-header-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#gestion-compte-create-screen .gestion-compte-detail-submit {
  margin-top: 20px;
  width: 100%;
  padding: 16px 18px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 14px;
  background: linear-gradient(165deg, #d4af37 0%, #c9a227 45%, #b89020 100%);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 24px -6px rgba(201, 162, 39, 0.55);
  transition:
    transform 0.15s,
    box-shadow 0.2s,
    filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  #gestion-compte-create-screen .gestion-compte-detail-submit:hover:not(:disabled) {
    filter: brightness(1.05);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.4) inset,
      0 12px 28px -6px rgba(201, 162, 39, 0.6);
  }
}

#gestion-compte-create-screen .gestion-compte-detail-submit:active:not(:disabled) {
  transform: scale(0.99);
  filter: brightness(0.97);
}

#gestion-compte-create-screen .gestion-compte-detail-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.2);
}

#gestion-compte-create-screen .gestion-compte-detail-message:not([hidden]) {
  display: block;
  margin: 18px 0 0;
  padding: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  border-radius: 12px;
  box-sizing: border-box;
}

#gestion-compte-create-screen .gestion-compte-detail-message[data-type='ok'] {
  color: #166534;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #86efac;
}

#gestion-compte-create-screen .gestion-compte-detail-message[data-type='error'] {
  color: #991b1b;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
}

#gestion-compte-create-screen .gestion-compte-detail-message[data-type='warn'] {
  color: #92400e;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fcd34d;
}

/* Thème nuit */
#app-container.app-theme-night #gestion-compte-create-screen.gestion-compte-detail-has-header.screen {
  background: linear-gradient(165deg, #1c1917 0%, #141210 50%, #0f0e0c 100%);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-card {
  background: #1f1d1b;
  border-color: rgba(212, 175, 55, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 48px -16px rgba(0, 0, 0, 0.55);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-section-title {
  color: #a8a29e;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-section + .gestion-compte-detail-section {
  border-top-color: rgba(255, 255, 255, 0.08);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-label {
  color: #a8a29e;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-input {
  background: #292524;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f5f5f4;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-input::placeholder {
  color: #78716c;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-input:hover:not(:focus-visible):not(:disabled) {
  border-color: rgba(212, 175, 55, 0.35);
  background: #2d2926;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-input:focus-visible {
  border-color: #d4af37;
  background: #1c1917;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

#app-container.app-theme-night #gestion-compte-create-screen select.gestion-compte-detail-input,
#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-select {
  background-color: #292524;
  color: #f5f5f4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23a8a29e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

#app-container.app-theme-night #gestion-compte-create-screen select.gestion-compte-detail-input:focus-visible {
  background-color: #1c1917;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-fonc-tags {
  background: #292524;
  border-color: rgba(255, 255, 255, 0.1);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-fonc-tags:focus-within {
  border-color: #d4af37;
  background: #1c1917;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-fonc-tags__chip {
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.35);
  color: #e7e5e4;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-fonc-tags__chip-remove:hover {
  background: rgba(255, 255, 255, 0.08);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-fonc-tags__input {
  color: #f5f5f4;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-fonc-tags__input::placeholder {
  color: #78716c;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-fonc-tags-hint {
  color: #a8a29e;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-emergency-row {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.04));
  border-color: rgba(212, 175, 55, 0.28);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-checkbox-label {
  color: #e7e5e4;
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-contact-hint {
  color: #d6d3d1;
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.28);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-contact-hint strong {
  color: #fcd34d;
}
#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-header-save {
  background: linear-gradient(160deg, #3f3b38, #292524);
  border-color: rgba(212, 175, 55, 0.35);
  color: #e7e5e4;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.45);
}

@media (hover: hover) {
  #app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-create-header-save:hover:not(:disabled) {
    background: linear-gradient(160deg, #d4af37, #b89020);
    color: #fff;
    border-color: #a8841f;
  }
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-message[data-type='ok'] {
  color: #86efac;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.45), rgba(6, 95, 70, 0.35));
  border-color: rgba(52, 211, 153, 0.45);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-message[data-type='error'] {
  color: #fca5a5;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.4), rgba(153, 27, 27, 0.3));
  border-color: rgba(248, 113, 113, 0.45);
}

#app-container.app-theme-night #gestion-compte-create-screen .gestion-compte-detail-message[data-type='warn'] {
  color: #fcd34d;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.45), rgba(146, 64, 14, 0.35));
  border-color: rgba(251, 191, 36, 0.4);
}
