.form-wrap { max-width: 780px; margin: 0 auto; padding: 24px 20px 80px; }

/* Progress */
.form-progress { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 20px 0 6px; }
.form-progress .dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--muted);
  border: 1px solid rgba(255,255,255,0.1); font-weight: 700; font-size: 0.9rem;
}
.form-progress .dot.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border: none;
}
.form-progress .line { width: 46px; height: 2px; background: rgba(255,255,255,0.12); }
.form-progress-label { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }

.form-title { font-size: 2rem; text-align: center; margin-bottom: 12px; }
.form-intro { color: var(--muted); text-align: center; max-width: 600px; margin: 0 auto 30px; }

/* Tags */
.req, em.req {
  background: rgba(255, 99, 132, 0.15); color: #ff9db0;
  font-style: normal; font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em;
}
.reco, em.reco {
  background: rgba(108, 140, 255, 0.15); color: #a9bcff;
  font-style: normal; font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em;
}

/* Cards / fieldsets */
.card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
}
.card legend { font-weight: 700; font-size: 1.1rem; padding: 0 6px; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 6px 0 14px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }

input, textarea, select {
  background: #0f1220; border: 1px solid rgba(255,255,255,0.12);
  color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }

.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { width: auto; }

.photo-upload { margin-top: 14px; }
.photo-preview { width: 110px; height: 140px; object-fit: cover; border-radius: 10px; margin-top: 12px; border: 1px solid rgba(255,255,255,0.15); }

.hidden { display: none !important; }

/* Repeatable blocks */
.repeat-item {
  border: 1px dashed rgba(255,255,255,0.15); border-radius: 12px;
  padding: 16px; margin-bottom: 14px; position: relative;
}
.repeat-item .btn-remove {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,99,132,0.15); color: #ff9db0; border: none;
  border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 0.8rem;
}
.btn-add {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 600;
}
.btn-add:hover { background: rgba(108,140,255,0.12); }

.form-actions { text-align: center; margin-top: 10px; }
.form-error { background: rgba(255,99,132,0.15); color: #ff9db0; padding: 12px; border-radius: 10px; margin-bottom: 14px; }

/* Choix du niveau */
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 20px; }
.level-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 28px 22px; text-align: center;
  cursor: pointer; color: var(--text); font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.level-card:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(108,140,255,0.25);
}
.level-emoji { font-size: 2.4rem; margin-bottom: 10px; }
.level-card h3 { font-size: 1.35rem; margin-bottom: 8px; }
.level-card p { color: var(--muted); margin-bottom: 12px; }
.level-detail { display: block; font-size: 0.85rem; color: var(--accent); }

/* --- Page de choix (CV / Rapport) : options simples, en petit, à gauche --- */
.doc-page { margin: 0; max-width: 460px; }
.doc-page .form-title { text-align: left; font-size: 1.4rem; margin-bottom: 6px; }
.doc-list { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; align-items: flex-start; }
.doc-option {
  display: inline-flex; flex-direction: column; gap: 2px;
  text-decoration: none; color: var(--text);
}
.doc-option-name {
  font-size: 1rem; font-weight: 500; color: var(--text);
  transition: color 0.15s ease;
}
.doc-option:hover .doc-option-name { color: var(--accent); }
/* La description n'apparaît qu'au survol, juste en dessous */
.doc-option-hint {
  font-size: 0.9rem; color: var(--muted);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}
.doc-option:hover .doc-option-hint { max-height: 2rem; opacity: 1; }

/* --- Page des types de rapports --- */
.rep-cat { margin-top: 28px; }
.rep-cat-title { font-size: 1.05rem; color: var(--muted); margin-bottom: 14px; letter-spacing: 0.3px; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rep-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 16px 18px; text-align: left;
  cursor: pointer; color: var(--text); font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.rep-card:hover {
  transform: translateY(-3px); border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(108,140,255,0.22);
}
.rep-emoji { font-size: 1.7rem; flex: 0 0 auto; line-height: 1.2; }
.rep-text { display: flex; flex-direction: column; gap: 4px; }
.rep-name { font-weight: 600; font-size: 1.02rem; }
.rep-desc { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }

/* --- Upload de documents (questionnaire rapport) --- */
.doc-reco { color: var(--accent); font-size: 0.9rem; font-weight: 600; margin: 6px 0; }
.doc-files { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.doc-files li {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px 12px; font-size: 0.9rem;
}
.doc-size { color: var(--muted); font-size: 0.82rem; }
.doc-remove {
  margin-left: auto; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.doc-remove:hover { color: #ff6b6b; background: rgba(255,107,107,0.1); }

/* --- Étape génération du rapport --- */
.rm-loading { text-align: center; padding: 60px 20px; color: var(--muted); }
.rm-spinner {
  width: 44px; height: 44px; margin: 0 auto 20px;
  border: 4px solid rgba(255,255,255,0.12); border-top-color: var(--accent);
  border-radius: 50%; animation: rm-spin 0.9s linear infinite;
}
@keyframes rm-spin { to { transform: rotate(360deg); } }
.rm-error { text-align: center; padding: 40px 20px; }
.rm-error .btn { margin-top: 14px; }
.rm-summary {
  display: flex; gap: 28px; flex-wrap: wrap; margin: 6px 0 24px;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 16px 20px; font-size: 1.05rem;
}
.rm-summary strong { color: var(--accent); }
.rm-h2 { font-size: 1.1rem; margin: 22px 0 12px; }
.rm-templates { display: flex; flex-wrap: wrap; gap: 10px; }
.rm-tpl {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); border-radius: 10px; padding: 10px 18px; cursor: pointer;
  font: inherit; transition: border-color 0.15s ease, background 0.15s ease;
}
.rm-tpl:hover { border-color: var(--accent); }
.rm-tpl.active { border-color: var(--accent); background: rgba(108,140,255,0.15); color: var(--accent); font-weight: 600; }
.rm-preview {
  background: #fff; color: #1f2933; border-radius: var(--radius);
  padding: 34px 40px; margin-top: 4px; max-height: 460px; overflow-y: auto;
}
.rmp-title { font-size: 1.5rem; font-weight: 700; color: #1f3a5f; }
.rmp-sub { font-style: italic; color: #52606d; margin-top: 4px; }
.rmp-meta { font-size: 0.85rem; color: #616e7c; margin-top: 8px; }
.rmp-section { margin-top: 18px; }
.rmp-section h3 { font-size: 1.05rem; color: #1f3a5f; margin-bottom: 6px; }
.rmp-section p { font-size: 0.92rem; line-height: 1.6; margin-bottom: 8px; text-align: justify; }
