/* ============================================================
   preparation_tests.css — E-Shelle 2026
   Leçons & exercices Français (TEF/TCF/DELF/DALF)
   ============================================================ */

/* ─── Animations ─────────────────────────────────────────── */
@keyframes pt-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pt-fade-up { animation: pt-fade-up .45s cubic-bezier(.22,1,.36,1) both; }

/* ─── Container ─────────────────────────────────────────── */
.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Hero section ───────────────────────────────────────── */
.pt-hero {
  background: linear-gradient(135deg,
    rgba(46,125,50,.22) 0%,
    rgba(10,10,10,.9) 100%);
  border-bottom: 1px solid rgba(76,175,80,.18);
  padding: 2.5rem 0 2rem;
  margin-top: 4.5rem;
}
.pt-hero--lesson {
  padding-bottom: 1.5rem;
}
.pt-hero--session {
  padding: 1.5rem 0 1.25rem;
}

/* Badge (TEF · CE · A2) */
.pt-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(76,175,80,.15);
  border: 1px solid rgba(76,175,80,.3);
  color: #4CAF50;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .3rem .85rem;
  border-radius: 999px;
  margin-bottom: .85rem;
}

/* Titre principal */
.pt-title {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  color: #e8f5e9;
  letter-spacing: -.025em;
  line-height: 1.25;
  margin: 0 0 .75rem;
}

/* Lead text */
.pt-lead {
  font-size: .92rem;
  color: rgba(255,255,255,.6);
  line-height: 1.65;
  margin: .75rem 0 0;
  max-width: 680px;
}
.pt-lead strong { color: #e8f5e9; }

/* Mode tag */
.pt-mode-tag {
  display: inline-block;
  background: rgba(255,152,0,.12);
  border: 1px solid rgba(255,152,0,.25);
  color: #FF9800;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .25rem .75rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}

/* Stats row */
.pt-stats-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  margin-top: .5rem;
}
.pt-stats-row strong { color: #4CAF50; font-weight: 700; }

/* ─── Progress bar ───────────────────────────────────────── */
.pt-progress-wrap {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  max-width: 640px;
}
.pt-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}
.pt-progress-label {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
}
.pt-progress-stats {
  font-size: .78rem;
  font-weight: 700;
  color: #4CAF50;
}
.pt-progress-bar {
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.pt-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2E7D32, #4CAF50);
  transition: width .5s ease;
}
.pt-progress-hint {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  margin: .4rem 0 0;
}

/* ─── Sections ───────────────────────────────────────────── */
.pt-section {
  padding: 1.75rem 0;
}

/* ─── Grid layout (main + sidebar) ──────────────────────── */
.pt-grid-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 840px) {
  .pt-grid-layout {
    grid-template-columns: 1fr 260px;
  }
  .pt-side {
    align-self: start;
    position: sticky;
    top: 84px;
  }
}

/* ─── Cards ──────────────────────────────────────────────── */
.pt-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 1.6rem 1.75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
  color: #e8f5e9;
  margin-bottom: 1.25rem;
}
.pt-card--premium-cta {
  background: rgba(255,152,0,.08);
  border-color: rgba(255,152,0,.25);
}
.pt-card--premium-cta strong { color: #FF9800; }
.pt-card--premium-cta p { color: rgba(255,255,255,.6); font-size: .88rem; }

.pt-card--question {
  padding: 1.75rem 2rem;
}
.pt-card--side {
  padding: 1.25rem 1.4rem;
}
.pt-card--side h3 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.45);
  margin: 0 0 .85rem;
}

/* ─── Question header ────────────────────────────────────── */
.pt-question-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.pt-question-scope {
  font-size: .95rem;
  font-weight: 700;
  color: #4CAF50;
  margin: 0;
}
.pt-question-time {
  font-size: .75rem;
  color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  padding: .2rem .65rem;
}

/* ─── Question stem ──────────────────────────────────────── */
.pt-question-stem {
  font-size: .95rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,.03);
  border-left: 3px solid rgba(76,175,80,.4);
  border-radius: 0 8px 8px 0;
}

/* ─── Audio block ────────────────────────────────────────── */
.pt-audio-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.pt-audio-box::before { content: '🔊'; font-size: 1.2rem; }
.pt-audio-box audio {
  flex: 1;
  border-radius: 8px;
  height: 38px;
  filter: invert(1) hue-rotate(100deg) brightness(.85);
}

/* ─── Choices (QCM) ──────────────────────────────────────── */
.pt-choices {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 1.25rem;
}
.pt-choice {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1.1rem;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 10px;
  cursor: pointer;
  font-size: .9rem;
  color: rgba(255,255,255,.72);
  background: transparent;
  transition: border-color .15s, background .15s, transform .1s;
  user-select: none;
}
.pt-choice:hover {
  border-color: rgba(76,175,80,.4);
  background: rgba(76,175,80,.06);
  transform: translateX(2px);
}
.pt-choice input[type=radio] {
  accent-color: #4CAF50;
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.pt-choice:has(input:checked) {
  border-color: #4CAF50;
  background: rgba(76,175,80,.1);
  color: #e8f5e9;
}

/* ─── Open text (EE/EO) ──────────────────────────────────── */
.pt-open-text textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #e8f5e9;
  font-family: inherit;
  font-size: .93rem;
  line-height: 1.65;
  padding: .85rem 1.1rem;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.pt-open-text textarea:focus {
  border-color: #4CAF50;
  background: rgba(76,175,80,.04);
}
.pt-open-text textarea::placeholder { color: rgba(255,255,255,.25); }

/* ─── Card footer ────────────────────────────────────────── */
.pt-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ─── Buttons ────────────────────────────────────────────── */
.pt-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: linear-gradient(135deg, #2E7D32, #4CAF50);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .8rem 1.75rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(46,125,50,.35);
}
.pt-btn-primary:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(46,125,50,.5);
  color: #fff;
}

.pt-link-muted {
  font-size: .83rem;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .15s;
}
.pt-link-muted:hover { color: rgba(255,255,255,.7); }

/* ─── Sidebar list ───────────────────────────────────────── */
.pt-side-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pt-side-list li {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  line-height: 1.55;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  padding-left: 1.1rem;
  position: relative;
}
.pt-side-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #4CAF50;
  font-weight: 700;
  font-size: .75rem;
}
.pt-side-list li:last-child { border-bottom: none; }
.pt-side-list li em { color: rgba(255,152,0,.85); font-style: italic; }

/* ─── Banner retry ────────────────────────────────────────── */
.pt-banner {
  padding: .75rem 1.25rem;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
}
.pt-banner--retry {
  background: rgba(255,152,0,.1);
  border-bottom: 1px solid rgba(255,152,0,.25);
  color: #FF9800;
}

/* ─── Lesson content (.pt-lesson-content) ────────────────── */
.pt-lesson-content {
  font-size: .95rem;
  color: rgba(255,255,255,.72);
  line-height: 1.75;
}
.pt-lesson-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4CAF50;
  margin: 1.75rem 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(76,175,80,.2);
}
.pt-lesson-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8f5e9;
  margin: 1.4rem 0 .6rem;
}
.pt-lesson-content p { margin: .75rem 0; }
.pt-lesson-content ul, .pt-lesson-content ol {
  padding-left: 1.4rem;
  margin: .75rem 0;
}
.pt-lesson-content li { margin: .4rem 0; }
.pt-lesson-content strong { color: #e8f5e9; }
.pt-lesson-content em { color: #FF9800; }
.pt-lesson-content blockquote {
  border-left: 3px solid #FF9800;
  background: rgba(255,152,0,.07);
  margin: 1rem 0;
  padding: .85rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: rgba(255,152,0,.85);
}

/* EE sample answer */
.ee-instructions {
  background: rgba(76,175,80,.07);
  border: 1px solid rgba(76,175,80,.2);
  border-radius: 8px;
  padding: .85rem 1.1rem;
  margin: .75rem 0;
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}
.ee-minwords {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}
.ee-sample {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  margin: .75rem 0;
  padding: .85rem 1.1rem;
}
.ee-sample summary {
  cursor: pointer;
  color: #4CAF50;
  font-size: .85rem;
  font-weight: 600;
}
.ee-sample p { font-size: .88rem; color: rgba(255,255,255,.6); margin: .5rem 0 0; }

/* EO expected points */
.eo-instructions {
  background: rgba(255,152,0,.07);
  border: 1px solid rgba(255,152,0,.2);
  border-radius: 8px;
  padding: .85rem 1.1rem;
  margin: .75rem 0;
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}
.eo-points {
  margin: .75rem 0;
  padding-left: 1.4rem;
}
.eo-points li {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  line-height: 1.65;
  margin: .4rem 0;
}

/* ─── CEFR bar ────────────────────────────────────────────── */
.pt-cefr-bar {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin: 1rem 0 0;
}
.pt-cefr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}
.pt-cefr-bubble {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  border: 2px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.04);
  transition: all .2s;
}
.pt-cefr-item.active .pt-cefr-bubble {
  background: linear-gradient(135deg, #2E7D32, #4CAF50);
  border-color: #4CAF50;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(76,175,80,.25);
}
.pt-cefr-item.done .pt-cefr-bubble {
  background: rgba(76,175,80,.2);
  border-color: rgba(76,175,80,.4);
  color: #4CAF50;
}
.pt-cefr-label {
  font-size: .62rem;
  color: rgba(255,255,255,.3);
  font-weight: 600;
}
.pt-cefr-item.active .pt-cefr-label { color: #4CAF50; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .container { padding: 0 .85rem; }

  /* Hero */
  .pt-hero { padding: 1.5rem 0 1rem; margin-top: 3.5rem; }
  .pt-title { font-size: 1.15rem; }
  .pt-lead { font-size: .86rem; }
  .pt-stats-row { gap: .75rem; font-size: .78rem; }

  /* Grid — single column */
  .pt-grid-layout { grid-template-columns: 1fr; gap: 1rem; }

  /* Cards */
  .pt-card { padding: 1rem 1rem; border-radius: 12px; }
  .pt-card--question { padding: 1rem; }
  .pt-card--side { padding: .9rem 1rem; }

  /* Progress */
  .pt-progress-wrap { padding: .85rem 1rem; }

  /* QCM choices */
  .pt-choice {
    padding: .7rem .85rem;
    font-size: .88rem;
    min-height: 48px;
  }

  /* Open text */
  .pt-open-text textarea {
    min-height: 120px;
    font-size: .9rem;
  }

  /* CEFR bar */
  .pt-cefr-bar { gap: .25rem; }
  .pt-cefr-bubble { width: 30px; height: 30px; font-size: .65rem; }

  /* Question stem */
  .pt-question-stem { font-size: .88rem; padding: .75rem .85rem; }

  /* Section heading */
  .pt-lesson-content h2 { font-size: 1rem; }
  .pt-lesson-content p, .pt-lesson-content li { font-size: .88rem; }
}
