/* =====================================================
   Auto-évaluation cyber – CSM
   Portée strictement limitée au wrapper
   ===================================================== */

.csm-auto-eval-wrapper {
    margin: 30px auto;
    width: 100%;
    max-width: none;
    padding: 0 20px;
}

/* =====================================================
   Zone formulaire
   ===================================================== */

.csm-auto-eval-wrapper #form-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =====================================================
   Cadre question
   ===================================================== */

.csm-auto-eval-wrapper .cadre {
    border: 1px solid #a6a4a4;
    padding: 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    min-height: 145px;
    width: 100%;
    max-width: 1200px;
    //box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =====================================================
   Questions
   ===================================================== */

.csm-auto-eval-wrapper .questions {
    text-align: center;
}

.csm-auto-eval-wrapper .questions p {
    margin: 0;
}

.csm-auto-eval-wrapper .questions strong {
    font-weight: 700;
    color: #444;
}

.csm-auto-eval-wrapper .questions span {
    display: block;
    font-weight: 600;
    color: #353535;
    line-height: 1.6;
    margin-top: 6px;
    padding: 0 0 10px 0;
}

/* =====================================================
   Barre de progression
   ===================================================== */

.csm-auto-eval-wrapper .progress {
    background-color: #f3f6fb;
    height: 8px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 12px;
    width: 100%;
}

.csm-auto-eval-wrapper .progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(
        90deg,
        #2138A0 0%,
        #194BB8 50%,
        #0084FF 100%
    );
    transition: width .8s cubic-bezier(.2,.8,.2,1);
}

/* =====================================================
   Options de réponse
   ===================================================== */

.csm-auto-eval-wrapper .options {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    width: 100%;
}

.csm-auto-eval-wrapper .options label {
    flex: 1;
    padding: 14px;
    border: 1px solid #a6a4a4;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    background-color: #fff;
    user-select: none;
    transition: all .2s ease;
}

.csm-auto-eval-wrapper .options label:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.csm-auto-eval-wrapper .options input[type="radio"] {
    display: none;
}

.csm-auto-eval-wrapper .options label.selected {
    background-color: #115ED0;
    color: #fff;
    border-color: #115ED0;
}

/* =====================================================
   Résultats
   ===================================================== */

.csm-auto-eval-wrapper #result h2 {
    margin-bottom: 10px;
    text-align: center;
}

.csm-auto-eval-wrapper #graph-wrap {
    max-width: 900px;
    margin: 0 auto 30px;
}

.csm-auto-eval-wrapper #graph-wrap {
    max-width: 720px;
    margin: 0 auto 30px;
}

.csm-auto-eval-wrapper #graph-wrap canvas {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
}

/* =====================================================
   Résumé scores
   ===================================================== */

.csm-auto-eval-wrapper #summary {
    max-width: 900px;
    margin: 0 auto 40px;
}

.csm-auto-eval-wrapper #summary p {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 20px;
}

.csm-auto-eval-wrapper #summary ul {
    padding-left: 20px;
}

.csm-auto-eval-wrapper #summary ul li {
    margin: 10px 0;
    line-height: 1.6;
}

/* =====================================================
   Bouton PDF
   ===================================================== */

.csm-auto-eval-wrapper .pdf-actions {
    display: flex;
    justify-content: center;
    margin: 35px 0;
}

.csm-auto-eval-wrapper .pdf-actions button {
    border: 2px solid #2138a0 !important;
  color: #2138a0 !important;
  background-color: #ffffff !important;
  padding: 6px 5px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 16px;
  font-weight: 500;
    cursor: pointer;
    transition: background-color .2s ease;
}

.csm-auto-eval-wrapper .pdf-actions button:hover {
    background-color: #2138a0 !important;
  color: #f2f2f2 !important;
}

/* =====================================================
   États masqués
   ===================================================== */

.csm-auto-eval-wrapper .hidden1,
.csm-auto-eval-wrapper .hidden2 {
    display: none !important;
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 700px) {

    .csm-auto-eval-wrapper {
        padding: 0 10px;
    }

    .csm-auto-eval-wrapper .options {
        flex-direction: column;
    }

    .csm-auto-eval-wrapper #graph-wrap canvas {
        height: 380px !important;
    }
}

