/* ============================================================
   STYLES CCTP + DPGF — Process Chiffrage IDJ
   Ajout isole, ne touche a aucun style existant.
   ============================================================ */

/* ── Bouton Modifier ──────────────────────────────────────── */
.btn-modifier { font-size: 12px; padding: 5px 12px; }

/* ── Toggle source CCTP ───────────────────────────────────── */
.cctp-source-row {
  margin-bottom: 12px;
}
.cctp-toggle-group {
  display: inline-flex;
  border: 1px solid #3a3d45;
  border-radius: 6px;
  overflow: hidden;
}
.cctp-toggle {
  background: #2a2d35;
  color: #aaa;
  border: none;
  padding: 6px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cctp-toggle.active {
  background: #5ba4e6;
  color: #fff;
}

/* ── Zone Drag & Drop ─────────────────────────────────────── */
.cctp-dropzone {
  border: 2px dashed #3a3d45;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #1a1d23;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cctp-dropzone:hover,
.cctp-drop-hover {
  border-color: #5ba4e6;
  background: rgba(91,164,230,0.05);
}
.cctp-drop-ok {
  border-color: #4ade80 !important;
  background: rgba(74,222,128,0.04) !important;
}
.cctp-drop-icon { font-size: 28px; margin-bottom: 6px; }
.cctp-drop-text { font-size: 12px; color: #888; }

/* ── Zone OneDrive ────────────────────────────────────────── */
.cctp-onedrive-info {
  background: #1a2e44;
  border: 1px solid #5ba4e6;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 12px;
  color: #a0c8f0;
}

/* ── Sections résultat ────────────────────────────────────── */
.cctp-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}
.cctp-synthese-box {
  background: #2a2d35;
  border-left: 3px solid #5ba4e6;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 12px;
  color: #d0d0d0;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ── Tags équipements ─────────────────────────────────────── */
.cctp-equipements-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cctp-eq-tag {
  background: rgba(91,164,230,0.12);
  border: 1px solid rgba(91,164,230,0.35);
  color: #5ba4e6;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: default;
}

/* ── Chapitres accordion ──────────────────────────────────── */
.cctp-chapitre {
  background: #2a2d35;
  border: 1px solid #3a3d45;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.cctp-chapitre:hover { border-color: #5ba4e6; }
.cctp-chap-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  flex-wrap: wrap;
}
.cctp-chap-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  background: #3a3d45;
  color: #5ba4e6;
  border-radius: 3px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.cctp-chap-titre {
  flex: 1;
  font-size: 12px;
  color: #e0e0e0;
  font-weight: 600;
}
.cctp-chap-pages {
  font-size: 10px;
  color: #666;
}
.cctp-chap-pdf { flex-shrink: 0; }

.cctp-chap-resume {
  display: none;
  padding: 0 12px 10px;
  font-size: 11px;
  color: #aaa;
  line-height: 1.6;
  border-top: 1px solid #3a3d45;
}
.cctp-chapitre.open .cctp-chap-resume { display: block; padding-top: 8px; }

/* ── DPGF upload row ──────────────────────────────────────── */
.dpgf-upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 6px;
}
@media (max-width: 720px) {
  .dpgf-upload-row { grid-template-columns: 1fr; }
}
.dpgf-upload-card { display: flex; flex-direction: column; gap: 8px; }
.dpgf-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dpgf-drop { min-height: 80px; padding: 16px; }

/* ── DPGF tableau ─────────────────────────────────────────── */
.dpgf-table-wrap { overflow-x: auto; }
.dpgf-preview-table { width: 100%; }
.dpgf-row-missing td { background: rgba(248,113,113,0.06); }

.dpgf-total-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: #2a2d35;
  border-top: 2px solid #4ade80;
  font-size: 13px;
  font-weight: 700;
  color: #e0e0e0;
  border-radius: 0 0 6px 6px;
}

/* ── Bouton Solder (dans le dashboard) ────────────────────── */
.btn-solder {
  background: #1a3325;
  color: #4ade80;
  border: 1px solid #4ade80;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-solder:hover { background: #1f4030; }
.btn-solder.complet {
  background: #1a2e44;
  color: #5ba4e6;
  border-color: #5ba4e6;
}

/* ── Encart instructions IA ─────────────────────────────────────────────── */
.instructions-encart {
  background: #1a1d23;
  border: 1px solid #3a3d45;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 14px;
  margin-bottom: 4px;
}
.instructions-label {
  font-size: 12px;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 8px;
}
.instructions-hint {
  font-weight: 400;
  color: #666;
  font-size: 11px;
}
.instructions-textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.5;
  color: #ccc;
  background: #13151a;
  border-color: #2a2d35;
  margin-top: 0;
}
.instructions-textarea:focus {
  border-color: #f59e0b;
  outline: none;
}

/* ── Badge modèle IA ────────────────────────────────────────────────────── */
.ai-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a1d23;
  border: 1px solid #3a3d45;
  border-radius: 5px;
  padding: 5px 12px;
  font-size: 11px;
  color: #888;
  margin-bottom: 10px;
}
.ai-model-badge strong { color: #5ba4e6; }
