/* ============================================================
   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=Playfair+Display:wght@700&family=Inter:wght@400;500;600;700&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: 'Playfair Display', Georgia, 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-subtitle {
  font-size: 15px;
  color: #5a6a82;
  line-height: 1.7;
  margin: 0 0 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.pc-meta {
  font-size: 13px;
  color: #8a96a8;
  margin: 0 0 36px;
}

.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: 'Playfair Display', Georgia, 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 32px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  width: 100%;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
}

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

.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; }

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

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

.pc-progress-info #pc-section-name {
  font-size: 13px;
  font-weight: 600;
  color: #1B2A4A;
}

.pc-progress-info #pc-progress-count {
  font-size: 13px;
  font-weight: 700;
  color: #E8481A;
  background: #fff4f0;
  padding: 3px 12px;
  border-radius: 20px;
}

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

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

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

/* ============================================================
   QCM
============================================================ */
.pc-question-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #1B2A4A;
  line-height: 1.4;
  margin: 0 0 32px;
  text-align: center;
}

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

.pc-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}

.pc-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #fff;
  border: 1.5px solid #dde3eb;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #1B2A4A;
  text-align: left;
  transition: all .15s;
  width: 100%;
}

.pc-option:hover { border-color: #E8481A; background: #fff8f6; }
.pc-option.pc-selected { border-color: #E8481A; background: #fff8f6; }

.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 {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f3f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #1B2A4A;
}

.pc-option.pc-correct .pc-option-letter { background: #16a34a; color: #fff; }
.pc-option.pc-wrong .pc-option-letter   { background: #dc2626; color: #fff; }

/* ============================================================
   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: 'Playfair Display', Georgia, 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: 'Playfair Display', Georgia, 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; }
