/* ================================================
   Services avec connexion (Transcription audio, Analyse de contrats)
   À charger après promptissime.css
   ================================================ */

.app-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ===== CONNEXION ===== */
.auth-card { text-align: center; max-width: 520px; margin: 0 auto; }
.auth-card img { width: 110px; margin: 0 auto 18px; }
.auth-card h2 { font-size: 24px; margin-bottom: 10px; }
.auth-card p { color: var(--muted); margin-bottom: 24px; }
.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: #fff; color: var(--navy); border: 2px solid var(--border); border-radius: 5px;
  padding: 15px 28px; cursor: pointer; font-family: Poppins, sans-serif; font-weight: 500; font-size: 15px;
  transition: border-color 0.15s;
}
.google-btn:hover { border-color: var(--navy); }
.auth-card .fine-print { margin-top: 22px; margin-bottom: 0; }
.auth-card .fine-print a { color: var(--navy); font-weight: 700; }

/* ===== BARRE DE COMPTE ===== */
.account-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 24px; font-size: 14px; color: var(--muted);
}
.account-bar strong { color: var(--navy); }
.link-btn {
  background: none; border: none; cursor: pointer; padding: 4px 0;
  font-family: Poppins, sans-serif; font-weight: 500; font-size: 14px; color: var(--navy);
  border-bottom: 2px solid var(--yellow);
}

/* ===== ÉTAPES ===== */
.phases { display: flex; align-items: center; margin-bottom: 28px; }
.phase { display: flex; align-items: center; gap: 10px; font-family: Poppins, sans-serif; font-size: 14px; font-weight: 500; color: var(--muted); }
.phase-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--track); color: var(--muted); font-weight: 700;
}
.phase.active { color: var(--navy); }
.phase.active .phase-num { background: var(--yellow); color: var(--navy); }
.phase.completed .phase-num { background: var(--navy); color: #fff; }
.phase-line { flex: 1; height: 2px; background: var(--track); margin: 0 12px; }
.phase-line.completed { background: var(--navy); }

/* ===== FORMULAIRE ===== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .required { color: var(--bad); }
textarea.input { resize: vertical; min-height: 90px; font-family: inherit; }
select.input { appearance: auto; }

.privacy-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-soft); border-radius: 8px; padding: 14px 16px; margin: 22px 0;
  font-size: 14px; color: var(--muted);
}
.privacy-note svg { flex-shrink: 0; margin-top: 2px; }
.privacy-note strong { color: var(--navy); }

/* ===== DÉPÔT DE FICHIER ===== */
.upload-area {
  border: 2px dashed #C8CDD6; border-radius: var(--radius); background: var(--bg-soft);
  padding: 32px 20px; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s;
  margin-bottom: 22px;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--navy); background: var(--yellow-light); }
.upload-area.has-file { border-style: solid; border-color: var(--navy); background: #fff; }
.upload-area h3 { font-size: 17px; font-weight: 600; margin: 10px 0 4px; }
.upload-area p { font-size: 14px; color: var(--muted); }
.upload-area .upload-icon { display: flex; justify-content: center; }
.upload-area .file-name { font-weight: 700; color: var(--navy); word-break: break-all; }
.upload-area .change-file { margin-top: 8px; font-size: 13px; color: var(--navy); text-decoration: underline; }

.form-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.form-actions .btn { min-width: 240px; }

.block-label {
  font-family: Poppins, sans-serif; font-weight: 500; font-size: 13px;
  text-transform: uppercase; letter-spacing: 3px; color: var(--yellow-text); margin-bottom: 16px;
}

/* ===== TRAITEMENT ===== */
#processingSection .progress-bar { margin-top: 6px; }
.steps-list { list-style: none; margin-top: 22px; }
.steps-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; color: var(--muted); font-weight: 700; }
.steps-list .dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--track); color: var(--muted); font-family: Poppins, sans-serif; font-size: 13px;
}
.steps-list li.active { color: var(--navy); }
.steps-list li.active .dot { background: var(--yellow); color: var(--navy); animation: pp-pulse 1.2s ease-in-out infinite; }
.steps-list li.completed { color: var(--navy); }
.steps-list li.completed .dot { background: var(--navy); color: #fff; }
@keyframes pp-pulse { 50% { transform: scale(1.12); } }

.summary { background: var(--bg-soft); border-radius: 8px; padding: 16px 18px; margin-top: 18px; font-size: 14px; }
.summary p + p { margin-top: 4px; }
.summary strong { color: var(--navy); }

/* ===== RÉSULTAT / ERREUR ===== */
.status-banner { border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.status-banner h3 { font-size: 20px; margin-bottom: 6px; }
.status-banner.ok { background: var(--ok-bg); }
.status-banner.ok h3, .status-banner.ok p { color: var(--ok); }
.status-banner.error { background: var(--bad-bg); }
.status-banner.error h3, .status-banner.error p { color: var(--bad); }

.next-steps { list-style: none; counter-reset: ns; margin: 6px 0 4px; }
.next-steps li { counter-increment: ns; position: relative; padding-left: 40px; margin-bottom: 14px; font-size: 15px; }
.next-steps li::before {
  content: counter(ns); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--navy);
  font-family: Poppins, sans-serif; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== HISTORIQUE ===== */
.history { margin-top: 28px; }
.history-item {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-title { font-weight: 700; color: var(--navy); }
.history-meta { font-size: 13px; color: var(--muted); }
.history-status {
  font-family: Poppins, sans-serif; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  border-radius: 4px; padding: 4px 10px; white-space: nowrap; flex-shrink: 0;
}
.history-status.ok { background: var(--ok-bg); color: var(--ok); }
.history-status.wait { background: var(--warn-bg); color: var(--warn); }
.history-status.error { background: var(--bad-bg); color: var(--bad); }
.history-empty { color: var(--muted); font-size: 14px; }

/* ===== NOTIFICATIONS ===== */
#notificationContainer {
  position: fixed; top: 90px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px);
}
.notification {
  padding: 14px 18px; border-radius: 8px; font-size: 15px; font-weight: 700; max-width: 360px;
  box-shadow: var(--shadow); opacity: 0; transform: translateX(20px); transition: all 0.3s ease;
  background: var(--yellow-light); color: var(--navy);
}
.notification.show { opacity: 1; transform: translateX(0); }
.notification.error { background: var(--bad-bg); color: var(--bad); }
.notification.success { background: var(--ok-bg); color: var(--ok); }
.notification.warning { background: var(--warn-bg); color: var(--warn); }

@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
  .phase-label { display: none; }
  .form-actions .btn { min-width: 0; width: 100%; }
  .history-item { flex-direction: column; align-items: flex-start; }
}
