/* ══════════════════════════════════════════════════════
   programme.css — Anglais Pratique Online
   Thème CLAIR — compatible avec le nouveau design
   ══════════════════════════════════════════════════════ */

/* ── Bootstrap mini-compat (used in programme.php) ──── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.row { display: flex; flex-wrap: wrap; margin: 0 -.75rem; }
.col-md-3, .col-md-4, .col-md-6, .col-md-9, .col-lg-2, .col-lg-3 { padding: 0 .75rem; box-sizing: border-box; }
@media (min-width: 768px) {
  .col-md-3  { width: 25%; }
  .col-md-4  { width: 33.333%; }
  .col-md-6  { width: 50%; }
  .col-md-9  { width: 75%; }
}
@media (min-width: 992px) {
  .col-lg-2  { width: 16.666%; }
  .col-lg-3  { width: 25%; }
}
.g-3 > * { margin-bottom: 1rem; }
.g-4 > * { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.gap-3 { gap: 1rem; }
.text-center { text-align: center; }
.text-md-end { text-align: right; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-md-5 { padding: 2rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-5 { padding-left: 3rem; padding-right: 3rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.fs-2 { font-size: 1.75rem; }
.fs-4 { font-size: 1.25rem; }
.d-block { display: block; }
.small { font-size: .85rem; }
.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.font-monospace { font-family: monospace; }
.rounded-pill { border-radius: 50px; }
.border { border: 1px solid #e5e5e5; }
.text-muted { color: #888; }
.text-secondary { color: #666; }
.text-success { color: #58CC02; }
.text-accent { color: #FF9600; }
.btn-outline-sm { background: none; border: 1px solid #e0e0e0; border-radius: 8px; padding: .4rem .9rem; font-size: .8rem; cursor: pointer; color: #888; transition: all .15s; }
.btn-outline-sm:hover { border-color: #FF4B4B; color: #FF4B4B; }
.display-6 { font-size: 1.5rem; font-weight: 700; }
.h3 { font-size: 1.25rem; font-weight: 700; }

/* ── Hero ────────────────────────────────────────────── */
.prog-hero {
  padding: 4rem 1rem 3rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  text-align: center;
  color: #fff;
}
.prog-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  margin: .5rem 0 1rem;
}
.prog-hero h1 span { color: #58CC02; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #FF9600;
  font-weight: 700;
  font-size: .82rem;
  padding: .35rem .9rem;
  border-radius: 20px;
  letter-spacing: 1px;
}
.hero-desc { color: rgba(255,255,255,.75); font-size: .95rem; }

/* ── Niveau selection ──────────────────────────────── */
.niveau-selection-grid h3 { color: rgba(255,255,255,.85); font-size: 1rem; }
.niveau-btn {
  width: 100%;
  padding: 1.2rem .8rem;
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: #fff;
  transition: all .25s;
  cursor: pointer;
  font-family: inherit;
}
.niveau-btn:hover {
  border-color: #58CC02;
  background: rgba(88,204,2,.1);
  transform: translateY(-4px);
}
.niveau-btn.selected {
  border-color: #FF9600;
  background: rgba(255,150,0,.12);
  box-shadow: 0 0 20px rgba(255,150,0,.25);
}
.niveau-btn strong { display: block; font-size: 1.1rem; margin-top: .25rem; }

/* ── Hero status bar (when programme is started) ───── */
.prog-hero .glass-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
}

/* ── Dashboard section ──────────────────────────────── */
.bg-dark-2 { background: #f7f7f7; }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
@media(max-width:600px) { .stats-row { grid-template-columns: repeat(2,1fr); } }
.stat-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.stat-num { font-size: 2rem; font-weight: 800; color: #1a1a2e; }
.stat-label { font-size: .75rem; color: #aaa; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-top: .2rem; }

/* Section header */
.section-header { text-align: center; margin-bottom: 2rem; }
.section-tag {
  display: inline-block;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  color: #888;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .5rem;
}
.section-header h2 { font-size: 1.6rem; font-weight: 800; color: #1a1a2e; margin: 0; }

/* ── Calendar ────────────────────────────────────────── */
.calendar-30-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: .6rem;
}
@media(max-width:768px) { .calendar-30-grid { grid-template-columns: repeat(6, 1fr); } }
@media(max-width:400px) { .calendar-30-grid { grid-template-columns: repeat(5, 1fr); } }

.cal-day-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  font-weight: 700;
  font-size: .85rem;
  color: #bbb;
  transition: all .15s;
}
.cal-day-cell.day-num { color: #bbb; }
.cal-day-cell:hover { border-color: #1CB0F6; color: #1CB0F6; background: #f0f9ff; }
.cal-day-cell.current {
  border-color: #FF9600;
  color: #FF9600;
  background: #fff8e6;
  box-shadow: 0 0 12px rgba(255,150,0,.2);
}
.cal-day-cell.done { color: #58CC02; border-color: #b3e88a; background: #f6fff0; }
.cal-day-cell.all-clear {
  background: linear-gradient(135deg, #58CC02, #46A302);
  color: #fff;
  border-color: #46A302;
  box-shadow: 0 3px 10px rgba(88,204,2,.3);
}
.cal-day-cell .check {
  position: absolute; bottom: 2px; right: 3px;
  font-size: .55rem;
}
.cal-day-cell.future { color: #ddd; cursor: default; }
.cal-day-cell.future:hover { border-color: #e5e5e5; color: #ddd; background: #fff; }

/* ── Session Panel ───────────────────────────────────── */
.session-panel {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.glass-card { background: #fff; border: 1px solid #e5e5e5; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .3rem .75rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px; }
.badge-beginner { background: #fff3e0; color: #FF9600; border: 1px solid #FFE0B2; }

/* ── Activity Cards ─────────────────────────────────── */
.activity-card {
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.5rem 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all .25s cubic-bezier(.175,.885,.32,1.275);
  position: relative;
}
.activity-card:hover {
  transform: translateY(-4px);
  border-color: #1CB0F6;
  box-shadow: 0 8px 24px rgba(28,176,246,.15);
}
.activity-card.completed {
  border-color: #58CC02;
  background: #f6fff0;
  cursor: default;
}
.activity-card h4 { font-size: .95rem; font-weight: 700; color: #1a1a2e; margin: .5rem 0 .25rem; }
.activity-card p { font-size: .78rem; color: #888; margin: 0; }
.act-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.act-meta { display: flex; justify-content: center; align-items: center; margin-top: 1rem; }
.dur { font-size: .75rem; color: #aaa; font-weight: 600; }
.act-badge { font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 10px; background: #f0f0f0; color: #888; }
.done-badge { background: #D7FFB8; color: #46A302; }
.act-check { position: absolute; top: 10px; right: 12px; font-size: .9rem; }

/* Timer */
.timer-display {
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  padding: .5rem 1.2rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
}

/* ── Activity Modal ─────────────────────────────────── */
.quiz-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center;
  z-index: 2000;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
.quiz-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.quiz-modal {
  width: 100%; max-width: 780px; max-height: 92vh;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  animation: slideUp .35s cubic-bezier(.165,.84,.44,1);
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header { margin-bottom: 1rem; }
.modal-header h2 { font-size: 1.3rem; font-weight: 800; color: #1a1a2e; margin: 0; }

.modal-body-scroll {
  flex: 1; overflow-y: auto;
  padding: .5rem .5rem .5rem 0;
}
.modal-body-scroll::-webkit-scrollbar { width: 4px; }
.modal-body-scroll::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }

.modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  border: 1px solid #e5e5e5;
  background: #f7f7f7; color: #666;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  cursor: pointer; transition: all .15s; z-index: 10;
}
.modal-close:hover { background: #FF4B4B; color: #fff; border-color: #FF4B4B; transform: rotate(90deg); }

.modal-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

/* Progress bar in modal */
.progress-bar {
  height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden;
  margin-bottom: 1rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #58CC02, #1CB0F6);
  border-radius: 3px;
  transition: width 1s linear;
}

/* ── Activity section (inside modal) ─────────────────── */
.activity-section { display: flex; flex-direction: column; gap: .75rem; }

.act-section-header {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .5rem;
}
.act-badge-level {
  display: inline-block;
  background: #1a1a2e; color: #fff;
  font-size: .65rem; font-weight: 800;
  padding: .15rem .5rem; border-radius: 8px;
  letter-spacing: .5px;
}

.act-tip {
  background: #fff8e1;
  border: 1px solid #FFE082;
  border-radius: 10px;
  padding: .65rem .9rem;
  font-size: .8rem;
  color: #555;
}

/* ── Activity buttons ────────────────────────────────── */
.act-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .9rem;
  border-radius: 20px;
  border: none; cursor: pointer;
  font-size: .8rem; font-weight: 600;
  font-family: inherit;
  transition: all .15s;
}
.act-btn-blue { background: #DDF4FF; color: #1CB0F6; border: 1px solid #90D7F8; }
.act-btn-blue:hover { background: #1CB0F6; color: #fff; }
.act-btn-red  { background: #FFD7D7; color: #FF4B4B; border: 1px solid #FFAAAA; }
.act-btn-red:hover { background: #FF4B4B; color: #fff; }
.act-btn-gray { background: #f0f0f0; color: #666; border: 1px solid #e0e0e0; }
.act-btn-gray:hover { background: #e0e0e0; }
.act-btn-orange { background: #fff3e0; color: #FF9600; border: 1px solid #FFE0B2; }
.act-btn-orange:hover { background: #FF9600; color: #fff; }
.act-btn-green { background: #D7FFB8; color: #46A302; border: 1px solid #89E219; }
.act-btn-green:hover { background: #58CC02; color: #fff; }

/* Buttons used on session panel */
.btn { display: inline-flex; align-items: center; padding: .55rem 1.2rem; border-radius: 12px; border: none; cursor: pointer; font-weight: 700; font-size: .88rem; font-family: inherit; transition: all .15s; text-decoration: none; }
.btn-primary { background: #1a1a2e; color: #fff; border-bottom: 3px solid #000; }
.btn-primary:hover { background: #2d2d4e; transform: translateY(-1px); }
.btn-accent  { background: #58CC02; color: #fff; border-bottom: 3px solid #46A302; }
.btn-accent:hover { background: #64d800; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }
.ms-2 { margin-left: .5rem; }

/* ── Vocab cards (new light design) ──────────────────── */
.vocab-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}
.vocab-card-new {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: .9rem .8rem;
  text-align: center;
  transition: all .2s;
}
.vocab-card-new:hover { border-color: #1CB0F6; background: #f0f9ff; }
.vocab-word-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .35rem;
  width: 100%;
}
.vocab-en { font-size: 1rem; font-weight: 800; color: #1a1a2e; }
.vocab-speaker { font-size: .85rem; }
.vocab-phon { font-size: .7rem; color: #aaa; font-family: monospace; margin: .2rem 0; }
.vocab-fr-badge {
  display: inline-block;
  background: #fff3e0; color: #FF9600;
  border: 1px solid #FFE0B2;
  border-radius: 8px; padding: .15rem .5rem;
  font-size: .75rem; font-weight: 600;
  margin-top: .3rem;
}

/* ── Listening items ─────────────────────────────────── */
.listen-list { display: flex; flex-direction: column; gap: .5rem; }
.listen-item {
  display: flex; align-items: center; gap: .6rem;
  background: #fafafa; border: 1px solid #e8e8e8;
  border-radius: 10px; padding: .6rem .9rem;
}
.listen-num { font-size: .7rem; font-family: monospace; color: #bbb; flex-shrink: 0; }
.listen-text { flex: 1; font-size: .88rem; color: #333; line-height: 1.4; }
.listen-play-btn, .listen-repeat-btn {
  background: none; border: 1px solid #e0e0e0;
  border-radius: 20px; padding: .2rem .55rem;
  font-size: .78rem; cursor: pointer;
  flex-shrink: 0; transition: all .15s; font-family: inherit;
}
.listen-play-btn:hover { background: #DDF4FF; border-color: #1CB0F6; }
.listen-repeat-btn { border-color: #FFE0B2; }
.listen-repeat-btn:hover { background: #fff3e0; border-color: #FF9600; }
.listen-score { font-size: .75rem; font-weight: 700; min-width: 2.5rem; text-align: right; }

/* ── True / False (speaking) ─────────────────────────── */
.tf-list { display: flex; flex-direction: column; gap: .75rem; }
.tf-item {
  background: #fafafa; border: 1px solid #e8e8e8;
  border-radius: 12px; padding: .9rem 1rem;
}
.tf-sentence { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.tf-num { font-size: .72rem; font-weight: 700; color: #bbb; flex-shrink: 0; }
.tf-text { flex: 1; font-size: .9rem; color: #333; font-style: italic; }
.tf-buttons { display: flex; gap: .5rem; }
.tf-btn {
  flex: 1; padding: .4rem; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer;
  font-size: .82rem; font-weight: 700; font-family: inherit;
  transition: all .15s;
}
.tf-true  { background: #D7FFB8; color: #46A302; border-color: #89E219; }
.tf-true:hover  { background: #58CC02; color: #fff; }
.tf-false { background: #FFD7D7; color: #CC3B3B; border-color: #FFAAAA; }
.tf-false:hover { background: #FF4B4B; color: #fff; }
.tf-btn:disabled { opacity: .5; cursor: default; transform: none !important; }
.tf-feedback {
  display: none; margin-top: .4rem;
  font-size: .82rem; padding: .3rem .5rem;
  border-radius: 6px; background: #f0f0f0;
}
.tf-score-box {
  background: #f7f7f7; border: 1px solid #e5e5e5;
  border-radius: 14px; margin-top: .75rem;
}

/* ── Speaking free section ───────────────────────────── */
.act-speak-free { border-top: 1px solid #f0f0f0; padding-top: 1rem; }
.record-btn {
  display: inline-flex; align-items: center; gap: .4rem;
}
.record-btn.recording {
  background: #FF4B4B !important; color: #fff !important;
  border-color: #CC3B3B !important;
  animation: micPulse 1s infinite;
}
@keyframes micPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,75,75,.4); }
  50%     { box-shadow: 0 0 0 8px rgba(255,75,75,0); }
}

/* ── XP Popup ───────────────────────────────────────── */
.xp-popup {
  position: fixed; bottom: 2rem; right: 2rem;
  background: linear-gradient(135deg, #FF9600, #FF6B00);
  color: #fff; font-weight: 800;
  padding: .85rem 2rem; border-radius: 50px;
  display: none; z-index: 3000;
  box-shadow: 0 8px 32px rgba(255,150,0,.4);
}
@keyframes xpPop {
  0%   { transform: translateY(60px) scale(0.4); opacity: 0; }
  15%  { transform: translateY(-8px) scale(1.08); opacity: 1; }
  20%  { transform: translateY(0) scale(1); opacity: 1; }
  80%  { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-40px) scale(0.8); opacity: 0; }
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .session-panel { padding: 1rem; }
  .quiz-modal { padding: 1.2rem; border-radius: 14px; }
  .prog-hero { padding: 3rem 1rem 2rem; }
  .text-md-end { text-align: left; }
}
@media (max-width: 576px) {
  .col-md-3, .col-md-4, .col-md-6, .col-md-9 { width: 100%; }
}
