/* css/style-pc.css */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --bg-dark: #0f172a;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --border-color: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #f8fafc;
  color: var(--text-main);
  line-height: 1.5;
}

.app-header {
  background: var(--bg-dark);
  color: #fff;
  padding: 1rem 2rem;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-size: 0.8rem;
  background: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  vertical-align: middle;
}

.nav-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 16px;
  margin-left: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn.active, .nav-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: #fff;
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

.grid-2-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mt-20 { margin-top: 20px; }
.full-width { grid-column: 1 / -1; }
.d-none { display: none !important; }

h2 {
  font-size: 1.15rem;
  margin-bottom: 15px;
  color: #0f172a;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
}

.form-control-sm {
  padding: 4px 8px;
  font-size: 0.85rem;
}

.flex-row {
  display: flex;
  gap: 8px;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.scroll-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px;
}

.contact-row {
  display: flex;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.contact-row:last-child { border-bottom: none; }
.contact-row label {
  margin-left: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  flex: 1;
}

.actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover { opacity: 0.9; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-secondary { background: #64748b; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn-block { width: 100%; }

.stats-recap {
  display: flex;
  justify-content: space-around;
  background: #f1f5f9;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.ordered-steps {
  max-height: 400px;
  overflow-y: auto;
  padding-left: 25px;
  margin-bottom: 15px;
}

.ordered-steps li {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.placeholder-box {
  padding: 40px;
  text-align: center;
  color: #94a3b8;
  border: 2px dashed #cbd5e1;
  border-radius: 6px;
}

.alert-box {
  background: #fef3c7;
  border-left: 4px solid var(--warning);
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
}

.table-custom th, .table-custom td {
  padding: 10px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.table-custom th { background: #f8fafc; }

/* Modale QR Code */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  max-width: 360px;
  width: 90%;
}

.qr-wrapper {
  margin: 20px auto;
  display: flex;
  justify-content: center;
}

/* ==============================================================
   VERROUILLAGE MOBILE SUR L'INTERFACE BUREAU
   ============================================================== */
.rideau-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .rideau-mobile {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    background-color: #0f172a !important;
    color: #f8fafc !important;
    z-index: 2147483647 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    text-align: center !important;
  }
  
  #ecran-login, .app-header, main, #modale-qrcode {
    display: none !important;
  }
}