/* ============================================================
   PraxiCompta — Styles Praxis Accompagnement
   Couleurs : orange #E8481A · marine #1B2A4A · blanc #FFFFFF
   Style : épuré, aéré, serif pour titres, pill buttons
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

.pc-app {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, sans-serif;
  color: #1B2A4A;
  background: #fff;
}

/* ---- Screens ---- */
.pc-screen        { display: none; }
.pc-screen.pc-active { display: block; animation: pcFade .3s ease; }
@keyframes pcFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================================================
   ÉCRAN INTRO
============================================================ */
.pc-intro-wrap {
  text-align: center;
  padding: 64px 32px 48px;
}

.pc-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #E8481A;
  margin-bottom: 20px;
}

.pc-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  color: #1B2A4A;
  margin: 0 0 16px;
}

.pc-title span { color: #E8481A; }

.pc-app .pc-subtitle,
.pc-app p.pc-subtitle {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  color: #5a6a82 !important;
  line-height: 1.7 !important;
  margin: 0 auto 12px !important;
  max-width: 520px !important;
  width: 100% !important;
  text-align: center !important;
  display: block !important;
  letter-spacing: normal !important;
}

.pc-meta {
  font-family: 'Inter', Arial, sans-serif !important;
  font-size: 13px;
  color: #8a96a8;
  margin: 0 0 36px;
  text-align: center;
}

.pc-meta span { margin: 0 10px; }

.pc-level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 500px) {
  .pc-level-grid { grid-template-columns: 1fr; }
}

.pc-level-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
  background: #fff;
  border: 1.5px solid #dde3eb;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}

.pc-level-btn:hover {
  border-color: #E8481A;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,72,26,.12);
}

.pc-level-icon { font-size: 26px; margin-bottom: 8px; }
.pc-level-name { font-size: 16px; font-weight: 700; color: #1B2A4A; }
.pc-level-desc { font-size: 11px; color: #8a96a8; margin-top: 4px; line-height: 1.4; }

/* ============================================================
   ÉCRAN EMAIL
============================================================ */
.pc-card {
  max-width: 440px;
  margin: 56px auto;
  padding: 40px 36px;
  background: #fff;
  border: 1.5px solid #dde3eb;
  border-radius: 20px;
  text-align: center;
}

.pc-card-icon { font-size: 36px; margin-bottom: 12px; }

.pc-card h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1B2A4A;
  margin: 0 0 8px;
}

.pc-card p {
  font-size: 14px;
  color: #5a6a82;
  margin: 0 0 24px;
  line-height: 1.6;
}

.pc-form-group { text-align: left; margin-bottom: 14px; }
.pc-form-group label { display: block; font-size: 12px; font-weight: 600; color: #1B2A4A; margin-bottom: 6px; letter-spacing: .02em; }
.pc-form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #dde3eb;
  border-radius: 10px;
  font-size: 14px;
  color: #1B2A4A;
  outline: none;
  transition: border-color .2s;
  font-family: 'Inter', sans-serif;
}
.pc-form-group input:focus { border-color: #E8481A; }

.pc-privacy { font-size: 11px; color: #aab0bb; margin-top: 10px; }

/* ============================================================
   BOUTONS
============================================================ */
.pc-btn-primary {
  display: inline-block;
  background: #E8481A;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
  width: auto;
}

.pc-btn-primary:hover { background: #d03d13; transform: translateY(-1px); }

/* Pleine largeur uniquement dans les cartes formulaire */
.pc-card .pc-btn-primary { width: 100%; }

.pc-btn-secondary {
  display: inline-block;
  background: transparent;
  color: #1B2A4A;
  border: 1.5px solid #dde3eb;
  border-radius: 50px;
  padding: 11px 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s;
}
.pc-btn-secondary:hover { border-color: #1B2A4A; }

/* ============================================================
   ZONE QUESTION
============================================================ */
.pc-question-wrap {
  padding: 40px 32px 32px;
  min-height: 360px;
}

/* ============================================================
   QCM
============================================================ */
.pc-qcm {
  background: #eef1f7;
  border-radius: 20px;
  padding: 36px 28px 32px;
  max-width: 680px;
  margin: 0 auto;
}

.pc-question-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1B2A4A;
  line-height: 1.4;
  margin: 0 0 28px;
  text-align: center;
}

.pc-question-pre {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  background: #fff;
  border-left: 3px solid #E8481A;
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  line-height: 1.8;
  white-space: pre-line;
  margin-bottom: 20px;
}

.pc-options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pc-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  background: #fff;
  border: 1.5px solid #dde3eb;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #1B2A4A;
  text-align: center;
  transition: all .15s;
  width: auto;
}

.pc-option:hover    { border-color: #E8481A; color: #E8481A; }
.pc-option.pc-selected { border-color: #E8481A; color: #E8481A; }
.pc-option.pc-correct { border-color: #16a34a; background: #f0fdf4; color: #15803d; }
.pc-option.pc-wrong   { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }

.pc-option-letter { display: none; }

/* ============================================================
   EXERCICE
============================================================ */
.pc-exercice-label {
  display: inline-block;
  background: #fff4f0;
  color: #E8481A;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.pc-textarea-label {
  display: block;
  font-size: 12px;
  color: #8a96a8;
  margin: 16px 0 8px;
}

.pc-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #dde3eb;
  border-radius: 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #1B2A4A;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
  line-height: 1.6;
}
.pc-textarea:focus { border-color: #E8481A; }

.pc-btn-exercice {
  display: inline-block;
  margin-top: 16px;
  background: #E8481A;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .2s;
}
.pc-btn-exercice:hover { background: #d03d13; }

/* ============================================================
   RÉSULTATS
============================================================ */
.pc-results-wrap { padding: 40px 32px; }

.pc-results-header { text-align: center; margin-bottom: 40px; }

.pc-score-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #E8481A;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 18px;
  font-family: 'Inter', sans-serif;
}

.pc-score-circle.pc-green  { background: #16a34a; }
.pc-score-circle.pc-orange { background: #E8481A; }
.pc-score-circle.pc-red    { background: #dc2626; }

.pc-mention {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1B2A4A;
  margin: 0 0 8px;
}

.pc-score-detail { font-size: 14px; color: #8a96a8; margin: 0 0 10px; }
.pc-result-message { font-size: 15px; color: #5a6a82; line-height: 1.6; max-width: 480px; margin: 0 auto; }

.pc-corrections-wrap h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1B2A4A;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid #edf0f4;
}

.pc-correction-item {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 14px;
  border-left: 4px solid #edf0f4;
  background: #f7f9fc;
}
.pc-correction-item.pc-ok  { border-color: #16a34a; }
.pc-correction-item.pc-ko  { border-color: #dc2626; }
.pc-correction-item.pc-exercice { border-color: #E8481A; }

.pc-correction-q  { font-weight: 700; font-size: 14px; color: #1B2A4A; margin: 0 0 6px; }
.pc-correction-ans { font-size: 13px; color: #5a6a82; margin: 0 0 4px; }
.pc-correction-text { font-size: 13px; color: #5a6a82; margin: 8px 0 0; line-height: 1.7; font-style: italic; white-space: pre-line; }

.pc-results-cta {
  text-align: center;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1.5px solid #edf0f4;
}
.pc-results-cta p { font-size: 14px; color: #8a96a8; margin: 0 0 16px; }
.pc-results-cta .pc-btn-primary { width: auto; }

/* ============================================================
   LOADER
============================================================ */
.pc-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.pc-loader p { color: #5a6a82; margin-top: 16px; font-size: 14px; }

.pc-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #edf0f4;
  border-top-color: #E8481A;
  border-radius: 50%;
  animation: pcSpin .7s linear infinite;
}
@keyframes pcSpin { to { transform: rotate(360deg); } }

.pc-hidden { display: none !important; }

/* ============================================================
   INTRO — mention Praxis
============================================================ */
.pc-mention-praxis {
  font-size: 13px;
  color: #8a96a8;
  font-style: italic;
  margin: 0 0 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   RÉSULTATS — barres par niveau
============================================================ */
.pc-niveau-scores {
  background: #f7f9fc;
  border-radius: 16px;
  padding: 24px 24px 20px;
  margin-bottom: 32px;
}

.pc-niveau-scores h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1B2A4A;
  margin: 0 0 20px;
}

.pc-niveau-bar { margin-bottom: 14px; }
.pc-niveau-bar:last-child { margin-bottom: 0; }

.pc-niveau-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.pc-niveau-bar-label {
  font-size: 13px;
  font-weight: 700;
  color: #1B2A4A;
}

.pc-niveau-bar-pct {
  font-size: 13px;
  font-weight: 700;
}

.pc-niveau-bar-track {
  height: 6px;
  background: #edf0f4;
  border-radius: 6px;
  overflow: hidden;
}

.pc-niveau-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .6s ease;
}

/* Badge niveau dans les corrections */
.pc-niveau-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: #f0f3f7;
  color: #5a6a82;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: .03em;
}

/* ============================================================
   BARRE DE PROGRESSION — style Praxis exact
============================================================ */
.pc-progress-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #f0f3f7;
  padding: 10px 24px 8px;
}

.pc-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

#pc-section-name {
  font-size: 13px;
  font-weight: 500;
  color: #8a96a8;
}

#pc-progress-count {
  font-size: 13px;
  font-weight: 600;
  color: #5a6a82;
  background: #f0f3f7;
  border: 1px solid #dde3eb;
  border-radius: 20px;
  padding: 2px 12px;
}

.pc-progress-track {
  height: 4px;
  background: #edf0f4;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.pc-progress-fill {
  height: 100%;
  background: #E8481A;
  border-radius: 4px;
  transition: width .4s ease;
}

/* Bouton retour */
#pc-btn-back {
  display: none;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #E8481A;
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', sans-serif;
}
#pc-btn-back.visible { display: inline-block; }

.pc-progress-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Question wrap — plus de padding excessif */
.pc-question-wrap {
  padding: 32px 24px 28px;
  min-height: 340px;
}

/* ============================================================
   POINTS À REVOIR
============================================================ */
.pc-points-revoir-wrap {
  background: #fff8f0;
  border: 1.5px solid #fcd9c4;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.pc-points-revoir-wrap h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1B2A4A;
  margin: 0 0 18px;
}

.pc-revoir-niveau {
  margin-bottom: 16px;
}

.pc-revoir-niveau:last-child { margin-bottom: 0; }

.pc-revoir-niveau-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #E8481A;
  margin-bottom: 8px;
  display: block;
}

.pc-revoir-item {
  background: #fff;
  border: 1px solid #e8e0f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.pc-revoir-item:last-child { margin-bottom: 0; }
.pc-revoir-question {
  font-size: 13px;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 6px;
}
.pc-revoir-reponse {
  font-size: 13px;
  color: #16a34a;
  font-weight: 600;
  margin-bottom: 6px;
}
.pc-revoir-explication {
  font-size: 12px;
  color: #5a6a82;
  font-style: italic;
  line-height: 1.6;
}
