/* Test d'orientation RIASEC (test-riasec.html) */
.riasec-page {
  --rx-ink: var(--text-primary, #0f172a);
  --rx-ink-2: var(--text-secondary, #475569);
  --rx-muted: var(--text-muted, #64748b);
  --rx-surface: var(--surface-raised, #ffffff);
  --rx-soft: var(--surface-soft, #f8fafc);
  --rx-border: var(--border-subtle, #e2e8f0);
  --rx-navy: var(--color-primary, #0f2b46);
  --rx-gold: var(--color-secondary, #f5a623);
  --rx-chart: #2a78d6;
  --rx-grid: #e2e8f0;
  background: var(--rx-soft);
}
[data-theme="dark"] .riasec-page,
[data-theme="dark"].riasec-page {
  --rx-ink: #f1f5f9;
  --rx-ink-2: #cbd5e1;
  --rx-muted: #94a3b8;
  --rx-surface: #111827;
  --rx-soft: #0b1220;
  --rx-border: #1f2a3c;
  --rx-chart: #3987e5;
  --rx-grid: #253246;
}
.rx-main { min-height: 70vh; }
.rx-main [hidden] { display: none !important; }

/* ---------- Présentation ---------- */
.rx-intro { background: radial-gradient(120% 90% at 50% 0%, #1a3f5f 0%, #0f2b46 45%, #081a2c 100%); color: #f8fafc; padding: 2.5rem 0 3rem; }
.rx-intro-inner { max-width: 920px; }
.rx-back { display: inline-block; color: #cbd5e1; text-decoration: none; font-size: 0.9rem; margin-bottom: 1.25rem; }
.rx-back:hover { color: #fff; }
.rx-kicker { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rx-gold); }
.rx-title { margin: 0.6rem 0 0.8rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; color: #fff; }
.rx-title em { color: var(--rx-gold); }
.rx-lead { margin: 0 0 1.5rem; font-size: 1.05rem; line-height: 1.65; color: #cbd5e1; max-width: 46rem; }
.rx-types { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 0.6rem; }
.rx-types li { padding: 0.75rem 0.8rem; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.rx-types b { display: block; font-size: 0.95rem; color: #fff; }
.rx-types span { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: #94a3b8; line-height: 1.35; }
.rx-types .rx-letter { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-right: 0.35rem; border-radius: 8px; font-weight: 800; font-size: 0.85rem; color: #fff; }
.rx-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.85rem; }
.rx-mode { text-align: left; padding: 1.1rem 1.25rem; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: #f8fafc; cursor: pointer; font: inherit; transition: transform 0.15s ease, background 0.15s ease; }
.rx-mode:hover, .rx-mode:focus-visible { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); }
.rx-mode strong { display: block; font-size: 1.1rem; }
.rx-mode small { margin-left: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--rx-gold); color: #0f2b46; font-size: 0.7rem; font-weight: 800; vertical-align: middle; }
.rx-mode span { display: block; margin-top: 0.25rem; font-size: 0.88rem; color: #cbd5e1; }
.rx-mode-main { border-color: var(--rx-gold); background: rgba(245, 166, 35, 0.12); }
.rx-privacy { margin: 1.1rem 0 0; font-size: 0.85rem; color: #94a3b8; }
.rx-resume { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 14px; background: rgba(245, 166, 35, 0.12); border: 1px solid rgba(245, 166, 35, 0.4); display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; justify-content: space-between; }
.rx-resume p { margin: 0; color: #f8fafc; font-size: 0.92rem; }

/* ---------- Questionnaire ---------- */
.rx-quiz { padding: 2rem 0 3rem; }
.rx-quiz-inner { max-width: 720px; }
.rx-progress-head { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--rx-muted); margin-bottom: 0.4rem; }
.rx-progress-track { height: 8px; border-radius: 999px; background: var(--rx-border); overflow: hidden; }
.rx-progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #f5a623, #ffc078); transition: width 0.25s ease; }
.rx-card { margin-top: 1.25rem; padding: 2rem 1.5rem; border-radius: 22px; background: var(--rx-surface); border: 1px solid var(--rx-border); box-shadow: 0 18px 40px rgba(15, 43, 70, 0.08); text-align: center; }
.rx-ask { margin: 0; font-size: 0.9rem; color: var(--rx-muted); font-weight: 600; }
.rx-item { margin: 0.5rem 0 1.5rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: clamp(1.35rem, 3.6vw, 1.85rem); line-height: 1.3; color: var(--rx-ink); min-height: 4.8rem; display: flex; align-items: center; justify-content: center; }
.rx-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.rx-choice { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.85rem 0.3rem; border-radius: 14px; border: 1.5px solid var(--rx-border); background: var(--rx-soft); color: var(--rx-ink); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: border-color 0.12s ease, transform 0.12s ease, background 0.12s ease; }
.rx-choice:hover, .rx-choice:focus-visible { border-color: var(--rx-gold); transform: translateY(-1px); }
.rx-choice[aria-checked="true"] { border-color: var(--rx-navy); background: var(--rx-navy); color: #fff; }
[data-theme="dark"] .rx-choice[aria-checked="true"] { border-color: var(--rx-gold); background: rgba(245, 166, 35, 0.2); color: #fff; }
.rx-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; opacity: 0.6; }
.rx-choice:nth-child(1) .rx-dot { width: 22px; height: 22px; }
.rx-choice:nth-child(2) .rx-dot { width: 18px; height: 18px; }
.rx-choice:nth-child(3) .rx-dot { width: 14px; height: 14px; }
.rx-choice:nth-child(4) .rx-dot { width: 18px; height: 18px; }
.rx-choice:nth-child(5) .rx-dot { width: 22px; height: 22px; }
.rx-choice[aria-checked="true"] .rx-dot { background: currentColor; opacity: 1; }
.rx-hint { margin: 1rem 0 0; font-size: 0.78rem; color: var(--rx-muted); }
.rx-quiz-actions { display: flex; justify-content: space-between; margin-top: 1rem; }
.rx-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.65rem 1.1rem; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; text-decoration: none; }
.rx-btn:disabled { opacity: 0.45; cursor: default; }
.rx-btn-primary { background: var(--rx-gold); color: #0f2b46; }
.rx-btn-navy { background: var(--rx-navy); color: #fff; }
[data-theme="dark"] .rx-btn-navy { background: #1e3a5f; }
.rx-btn-ghost { background: transparent; border-color: var(--rx-border); color: var(--rx-ink-2); }
@media (max-width: 520px) {
  .rx-scale { grid-template-columns: 1fr; }
  .rx-choice { flex-direction: row; justify-content: flex-start; padding: 0.8rem 1rem; font-size: 0.95rem; }
  .rx-choice .rx-dot { width: 18px !important; height: 18px !important; }
  .rx-card { padding: 1.5rem 1rem; }
}

/* ---------- Résultats ---------- */
.rx-results { padding: 2rem 0 3.5rem; }
.rx-results .container { max-width: 1040px; }
.rx-hero { padding: 1.75rem; border-radius: 24px; background: radial-gradient(120% 120% at 0% 0%, #1a3f5f 0%, #0f2b46 55%, #081a2c 100%); color: #f8fafc; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.rx-hero h1 { margin: 0.35rem 0 0.5rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: clamp(1.7rem, 4vw, 2.4rem); color: #fff; }
.rx-hero p { margin: 0; color: #cbd5e1; line-height: 1.6; }
.rx-code { display: flex; gap: 0.5rem; }
.rx-code span { width: 4.9rem; height: 4.6rem; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-display, 'Playfair Display', serif); font-size: 2rem; font-weight: 800; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18); }
.rx-code small { font-family: 'Inter', sans-serif; font-size: 0.56rem; font-weight: 700; letter-spacing: 0.04em; opacity: 0.9; }
.rx-code span:nth-child(2) { opacity: 0.88; }
.rx-code span:nth-child(3) { opacity: 0.76; }
@media (max-width: 720px) { .rx-hero { grid-template-columns: 1fr; } }

.rx-section { margin-top: 1.5rem; padding: 1.5rem; border-radius: 20px; background: var(--rx-surface); border: 1px solid var(--rx-border); }
.rx-section h2 { margin: 0 0 0.35rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: 1.45rem; color: var(--rx-ink); }
.rx-section > p.rx-sub { margin: 0 0 1.1rem; color: var(--rx-muted); font-size: 0.92rem; }

.rx-chart-wrap { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 1.5rem; align-items: center; }
@media (max-width: 760px) { .rx-chart-wrap { grid-template-columns: 1fr; } }
.rx-hex { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
.rx-hex .grid { fill: none; stroke: var(--rx-grid); stroke-width: 1; }
.rx-hex .axis { stroke: var(--rx-grid); stroke-width: 1; }
.rx-hex .area { fill: var(--rx-chart); fill-opacity: 0.18; stroke: var(--rx-chart); stroke-width: 2; stroke-linejoin: round; }
.rx-hex .pt { fill: var(--rx-chart); stroke: var(--rx-surface); stroke-width: 2; }
.rx-hex text { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; fill: var(--rx-ink-2); }
.rx-hex text.val { font-weight: 600; fill: var(--rx-muted); font-size: 11px; }
.rx-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.rx-bar { display: grid; grid-template-columns: 9.5rem 1fr 3rem; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--rx-ink); }
.rx-bar b { font-weight: 700; }
.rx-bar-track { display: block; height: 12px; border-radius: 4px; background: var(--rx-soft); border: 1px solid var(--rx-border); overflow: hidden; }
.rx-bar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--rx-chart); }
.rx-bar.is-top .rx-bar-fill { background: var(--rx-navy); }
[data-theme="dark"] .rx-bar.is-top .rx-bar-fill { background: #f5a623; }
.rx-bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--rx-ink-2); }
@media (max-width: 520px) { .rx-bar { grid-template-columns: 7.5rem 1fr 2.6rem; font-size: 0.85rem; } }

.rx-indicators { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.85rem; }
.rx-ind { padding: 1rem; border-radius: 16px; background: var(--rx-soft); border: 1px solid var(--rx-border); }
.rx-ind span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rx-muted); }
.rx-ind strong { display: block; margin: 0.25rem 0 0.35rem; font-size: 1.1rem; color: var(--rx-ink); }
.rx-ind p { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--rx-ink-2); }
.rx-alert { margin-top: 0.85rem; padding: 0.85rem 1rem; border-radius: 14px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 0.9rem; line-height: 1.5; }
[data-theme="dark"] .rx-alert { background: rgba(234, 88, 12, 0.12); border-color: rgba(234, 88, 12, 0.4); color: #fdba74; }

.rx-type-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.rx-type-card { padding: 1.25rem; border-radius: 18px; border: 1px solid var(--rx-border); background: var(--rx-soft); border-top: 5px solid var(--rx-type, #2a78d6); }
.rx-type-card h3 { margin: 0 0 0.2rem; font-size: 1.15rem; color: var(--rx-ink); }
.rx-type-card .rx-rank { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rx-muted); }
.rx-type-card p { margin: 0.5rem 0; font-size: 0.9rem; line-height: 1.55; color: var(--rx-ink-2); }
.rx-type-card h4 { margin: 0.8rem 0 0.3rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rx-muted); }
.rx-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rx-tag { padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--rx-surface); border: 1px solid var(--rx-border); color: var(--rx-ink-2); }

.rx-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.rx-filter { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--rx-border); background: var(--rx-soft); color: var(--rx-ink-2); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.rx-filter[aria-pressed="true"] { background: var(--rx-navy); border-color: var(--rx-navy); color: #fff; }
[data-theme="dark"] .rx-filter[aria-pressed="true"] { background: #f5a623; border-color: #f5a623; color: #0f2b46; }
.rx-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem; }
.rx-job { display: flex; flex-direction: column; gap: 0.45rem; padding: 1rem; border-radius: 16px; border: 1px solid var(--rx-border); background: var(--rx-soft); text-decoration: none; color: inherit; transition: transform 0.15s ease, border-color 0.15s ease; }
.rx-job:hover, .rx-job:focus-visible { transform: translateY(-2px); border-color: var(--rx-gold); }
.rx-job-head { display: flex; align-items: flex-start; gap: 0.6rem; }
.rx-job-icon { font-size: 1.5rem; line-height: 1; }
.rx-job h3 { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--rx-ink); }
.rx-job-family { font-size: 0.78rem; color: var(--rx-muted); }
.rx-job p { margin: 0; font-size: 0.85rem; line-height: 1.5; color: var(--rx-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rx-job-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: var(--rx-muted); }
.rx-aff { font-weight: 800; color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-aff-track { display: block; flex: 1; height: 6px; border-radius: 999px; background: var(--rx-border); overflow: hidden; }
.rx-aff-fill { display: block; height: 100%; background: var(--rx-chart); }
.rx-mini-code { font-weight: 800; letter-spacing: 0.12em; color: var(--rx-ink-2); }
.rx-more { margin-top: 1rem; text-align: center; }
.rx-note { margin: 0.85rem 0 0; font-size: 0.8rem; color: var(--rx-muted); line-height: 1.5; }

.rx-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.75rem; }
.rx-form { display: flex; gap: 0.6rem; align-items: center; padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--rx-border); background: var(--rx-soft); text-decoration: none; color: var(--rx-ink); font-weight: 600; font-size: 0.92rem; }
.rx-form:hover { border-color: var(--rx-gold); }
.rx-form span:first-child { font-size: 1.4rem; }

.rx-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.rx-method { font-size: 0.86rem; line-height: 1.6; color: var(--rx-ink-2); }
.rx-method p { margin: 0 0 0.6rem; }

/* ---------- Impression : profil complet sur le document signé WOW ---------- */
@media print {
  .rx-intro, .rx-quiz, .rx-actions, .rx-filters, .rx-more, .rx-back { display: none !important; }
  body[data-print="dossier"] .rx-results { display: block !important; padding: 0; }
  /* Bandeau clair pour l'encre ; les lettres du code gardent leur couleur */
  body[data-print="dossier"] .rx-hero { background: #fff !important; border: 2px solid #0f2b46; padding: 5mm; break-inside: avoid; }
  body[data-print="dossier"] .rx-hero p, body[data-print="dossier"] .rx-hero .rx-kicker { color: #334155 !important; }
  body[data-print="dossier"] .rx-section { margin-top: 5mm; padding: 4mm 5mm; border-color: #cbd5e1; break-inside: auto; }
  body[data-print="dossier"] .rx-section > h2 { break-after: avoid; }
  body[data-print="dossier"] .rx-chart-wrap { display: block; break-inside: avoid; }
  body[data-print="dossier"] .rx-hex { max-width: 85mm; }
  body[data-print="dossier"] .rx-bars { margin-top: 4mm; }
  body[data-print="dossier"] .rx-indicators { grid-template-columns: repeat(3, 1fr); }
  /* Le conteneur des cartes (classe en « -cards ») peut se couper entre deux pages, pas les cartes */
  body[data-print="dossier"] .rx-type-cards { display: block; break-inside: auto !important; page-break-inside: auto !important; border: 0 !important; background: none !important; }
  body[data-print="dossier"] .rx-type-card { margin-bottom: 4mm; break-inside: avoid; }
  body[data-print="dossier"] .rx-jobs { grid-template-columns: repeat(2, 1fr); }
  body[data-print="dossier"] .rx-job { break-inside: avoid; }
  body[data-print="dossier"] .rx-code span, body[data-print="dossier"] .rx-bar-fill, body[data-print="dossier"] .rx-aff-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Le site masque les span vides (styles.css : span:empty) : barres et pastilles sont vides par nature */
.riasec-page .rx-bar-fill, .riasec-page .rx-aff-fill, .riasec-page .rx-aff-track, .riasec-page .rx-bar-track { display: block !important; }
.riasec-page .rx-dot { display: inline-block !important; flex: none; }
