/* ====== CONTENEUR ====== */
.donnees-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xxl);
}

.donnees-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* ====== GRILLE FORMATS ====== */
.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

.format-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-xl) var(--sp-lg);
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-card);
  transition: all var(--transition);
  cursor: pointer;
}

.format-card:hover {
  border-color: var(--primary-light);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.format-card.active {
  border-color: var(--secondary);
  background: var(--secondary-light);
}

.format-label {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--primary);
}

.format-desc {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

/* ====== ZONE D'IMPORT ====== */
.import-zone-wrapper {
  min-height: 160px;
}

.import-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-xxl);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  transition: all var(--transition);
  min-height: 160px;
}

.import-dropzone.dragover {
  border-color: var(--secondary);
  background: var(--secondary-light);
}

.dropzone-text {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-secondary);
}

.dropzone-subtext {
  font-size: var(--fs-sm);
  color: var(--text-light);
}

/* ====== CAPYTAB ====== */
.capytab-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.capytab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.capytab-status {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
}

.capytab-status.connected .status-dot {
  background: var(--success);
}

.capytab-frame-wrapper {
  height: 400px;
}

.capytab-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ====== APERÇU ====== */
.apercu-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

.apercu-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 320px;
  overflow-y: auto;
}

.apercu-table {
  font-size: var(--fs-sm);
}

.apercu-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.apercu-table th {
  background: var(--primary);
  color: white;
  padding: var(--sp-sm) var(--sp-md);
  text-align: left;
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.apercu-table td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apercu-table tbody tr:hover {
  background: var(--bg-hover);
}

.apercu-table tbody tr:nth-child(even) {
  background: var(--bg);
}

.apercu-table tbody tr:nth-child(even):hover {
  background: var(--bg-hover);
}