/* ===========================
   BASE SAFE (Bootstrap-first)
   =========================== */

body {
    font-family: Arial, sans-serif;
    background-color: #f7f9fb;
    margin: 0;
    padding: 0;
}

/* ===========================
   SCOPE APPLICATIF
   =========================== */

.app-scope {
    --app-max-width: 900px;
}

/* Ancien container → renommé */
.app-scope .app-box {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

/* ===========================
   TYPO / FORMULAIRES
   =========================== */

.app-scope h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.app-scope .block {
    margin-bottom: 20px;
}

.app-scope label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #222;
}

.app-scope select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #aaa;
    font-size: 16px;
}

/* ===========================
   ALERTES / INFO
   =========================== */

.app-scope .info {
    background: #eef6ff;
    border-left: 4px solid #3498db;
    padding: 10px 12px;
    margin-bottom: 20px;
    border-radius: 6px;
}

/* ===========================
   ALERTES – ne pas casser Bootstrap
   =========================== */

/* On laisse Bootstrap gérer success / danger */
.app-scope .alert-success {
    background-color: #e6f4ea;
    color: #1e6b3a;
    border-left: 5px solid #2e8b57;
}

.app-scope .alert-danger {
    background-color: #fdecea;
    color: #a93226;
    border-left: 5px solid #c0392b;
}

/* Alertes neutres uniquement */
.app-scope .alert-info {
    background-color: #eef6ff;
    color: #1f3a5f;
    border-left: 5px solid #3498db;
}


/* ===========================
   QCM
   =========================== */

.app-scope .qcm-header {
    text-align: right;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
}

.app-scope .qcm-question {
    background: #eef6ff;
    padding: 20px;
    border-radius: 10px;
    font-size: 20px;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.4;
}

.app-scope .qcm-answers .answer-btn {
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    font-size: 18px;
    background: #ffffff;
    border: 2px solid #3498db;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.app-scope .qcm-answers .answer-btn:hover {
    background: #3498db;
    color: white;
}

/* ===========================
   FEEDBACK
   =========================== */

.app-scope .feedback {
    font-size: 26px;
    text-align: center;
    font-weight: bold;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
}

.app-scope .feedback.good {
    background: #d4f8d4;
    color: #2e8b57;
    border-left: 6px solid #2e8b57;
}

.app-scope .feedback.bad {
    background: #f8d4d4;
    color: #c0392b;
    border-left: 6px solid #c0392b;
}

.app-scope .notion-box {
    background: #fff7d1;
    padding: 15px;
    border-left: 5px solid #e6b800;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* ===========================
   BOUTONS
   =========================== */

.app-scope .btn-primary-soft {
    background-color: #ffffff !important;
    color: #0d6efd !important;
    border: 2px solid #0d6efd !important;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    border-radius: 0.4rem;
}

/* ===========================
   CARTES (sans écraser Bootstrap)
   =========================== */

.app-scope .user-card {
    border-radius: 18px;
    transition: transform .08s ease, box-shadow .08s ease;
}

.app-scope .user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.app-scope .user-card .edit-link {
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 0.8rem;
    color: #6c757d;
}

/* ===========================
   ÉTOILES BRONZE – CapReviz
   =========================== */

.stars-bronze {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.star-bronze {
    width: 16px;
    height: 16px;
    fill: #CD7F32;
    stroke: #8B5A2B;
    stroke-width: 0.9;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}

/* ===========================
   ÉTOILES ARGENT – Sessions
   =========================== */

.stars-silver {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.star-silver {
  width: 18px;
  height: 18px;

  fill: #C0C0C0;        /* argent */
  stroke: #8A8A8A;
  stroke-width: 0.8;

  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));
}

/* ===========================
   ACTION BUTTONS (Result)
   =========================== */

.app-scope .buttons-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-scope a.next-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;

    background-color: #3498db;
    color: #ffffff;

    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;

    border-radius: 10px;
    text-decoration: none;

    transition: background-color 0.15s ease,
                transform 0.05s ease,
                box-shadow 0.15s ease;
}

.app-scope a.next-btn:hover {
    background-color: #2980b9;
    color: #ffffff;
}

.app-scope a.next-btn:active {
    transform: translateY(1px);
}

/* Variante secondaire (vert) */
.app-scope a.next-btn.secondary {
    background-color: #2ecc71;
}

.app-scope a.next-btn.secondary:hover {
    background-color: #27ae60;
}


/* ===========================
   FEEDBACK RÉPONSES – QCM (FIX ALIGNEMENT)
   =========================== */

/* On ne touche JAMAIS au form-check */
.app-scope .form-check {
    padding: 6px 0;
}

/* Style appliqué UNIQUEMENT au label */
.app-scope .form-check-label {
    display: inline-block;
    padding: 8px 12px;
    margin-left: 6px;              /* espace après la checkbox */
    border-radius: 8px;
}

/* Bonne réponse */
.app-scope .form-check.text-success .form-check-label {
    background-color: #eef8f1;
    border-left: 5px solid #2e8b57;
    color: #1e6b3a;
    font-weight: 600;
}

/* Mauvaise réponse sélectionnée */
.app-scope .form-check.text-danger .form-check-label {
    background-color: #fff1f0;
    border-left: 5px solid #c0392b;
    color: #a93226;
    font-weight: 600;
}

/* Checkbox reste intacte */
.app-scope .form-check-input {
    margin-top: 0.35rem;
}


/* ===========================
   CHECKBOX QCM – VISIBILITÉ & CONFORT
   =========================== */

/* Aligner proprement checkbox + texte */
.app-scope .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Checkbox plus visible (mobile friendly) */
.app-scope .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0;            /* supprime le décalage vertical */
    flex-shrink: 0;

    border: 2px solid #adb5bd;
}

/* Checkbox cochée → bien visible */
.app-scope .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Zone texte = vraie zone cliquable */
.app-scope .form-check-label {
    cursor: pointer;
    line-height: 1.4;
}

/* Amélioration mobile */
@media (max-width: 576px) {
    .app-scope .form-check-input {
        width: 22px;
        height: 22px;
    }

    .app-scope .form-check-label {
        font-size: 1.05rem;
    }
}

/* ===========================
   XP progress animation
   =========================== */
.xp-progress {
	height: 10px;
	background-color: #e9ecef;
	border-radius: 6px;
	overflow: hidden;
}

.xp-progress .progress-bar {
	transition: width 1.1s ease-out;
}

.level-up .progress-bar {
	box-shadow: 0 0 10px rgba(40, 167, 69, 0.8);
}

.level-up-box {
	animation: popLevel 0.6s ease-out;
}

@keyframes popLevel {
	0% {
		transform: scale(0.85);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.level-up-star {
	font-size: 1.3rem;
	animation: sparkle 1s ease-in-out infinite alternate;
}

@keyframes sparkle {
	from { opacity: 0.6; }
	to   { opacity: 1; }
}


.xp-progress .progress-bar {
    transition: width 900ms ease;
}

/* ===========================
   Import Admin
   =========================== */
<style>
.question-cell {
    white-space: normal;
    max-width: 600px;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 3;      /* max 3 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
</style>

/* ===========================
   Champion
   =========================== */
<style>
#fireworks-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}

.firework {
  position: absolute;
  font-size: 28px;
  animation: explode 2.5s ease-out forwards;
  opacity: 0;
}

@keyframes explode {
  0% {
    transform: scale(0.2) translateY(40px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: scale(1.8) translateY(-120px);
    opacity: 0;
  }
}
</style>

