:root,
html,
body {
    font-family: "Inter", sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
}

@supports (font-variation-settings: normal) {

    :root,
    html {
        font-family: "Inter var", sans-serif;
    }
}

body {
    font-family: inherit;
    background-color: #e9eff4;
}

body,
* {
    font-family: inherit;
}

.container-global {
    min-height: 80vh;
}

/* primary color */
#maindj .btn-primary {
    background-color: #3f5e7d;
    border-color: #3f5e7d;
}

#maindj .btn-outline-primary.active,
#maindj .btn-outline-primary:active {
    background-color: #3f5e7d;
    border-color: #3f5e7d;
    color: #fff;
}

#maindj .btn-outline-primary:hover,
#maindj .btn-outline-primary:focus {
    background-color: #335070;
    border-color: #335070;
    color: #bbb;
}

#maindj .btn-outline-primary {
    border-color: #3f5e7d;
    color: #3f5e7d;
}

#maindj .btn-primary:hover,
#maindj .btn-primary:active,
#maindj .btn-primary:focus {
    background-color: #335070;
    border-color: #335070;
}

.container-global>div>.row {
    height: 80%;
}


.login-page td {
    padding: 10px;
}

.login-page,
.qcm-page {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    background: radial-gradient(1200px 820px at 18% 18%, rgba(232, 128, 32, .30), transparent 62%),
        radial-gradient(1100px 760px at 82% 26%, rgba(243, 164, 91, .22), transparent 60%),
        radial-gradient(1200px 860px at 60% 82%, rgba(255, 214, 165, .18), transparent 64%),
        radial-gradient(1000px 820px at 46% 54%, rgba(248, 248, 240, .10), transparent 66%),
        linear-gradient(180deg, #141823, #1B2232);
}

.aurora {
    position: fixed;
    background: conic-gradient(from 150deg at 50% 50%,
            rgba(255, 214, 165, .22),
            rgba(248, 248, 240, .18),
            rgba(243, 164, 91, .20),
            rgba(248, 248, 240, .16),
            rgba(232, 128, 32, .18));
    filter: blur(88px);
    opacity: .78;
}

.login-page .btn {
    font-weight: bold;
}

.login-page .lbl-connexion::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    margin: 10px auto 0;
    background: #3f5e7d;
}

.smalltext {
    font-size: 12px;
}

/* questionnaire */
.question-form .choice input[type="radio"] {
    display: none;
}

.question-form .choice {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-form .choice label {
    flex: 1 1 150px;
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .question-form .choice {
        flex-direction: column;
    }

    .question-form .choice label {
        flex: 1 1 auto;
        width: 100%;
    }
}

.question-form .choice label:hover {
    background: #f5f5f5;
}

.question-form .question-item {
    display: block;
    opacity: 0.25;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    height: 0;
    overflow: hidden;
}

.question-form .question-item.active {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

.question-item .btn-prev {
    display: none;
}

.question-item.current .btn-prev {
    display: inline-block;
}

.question-item:last-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.question-form .choice input[type="radio"]:checked+label {
    background-color: #3f5e7d;
    border-color: #3f5e7d;
    color: #fff;
}



/* form */

.campaign-container,
.form-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header h2 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-card {
    border-radius: 12px;
    border: none;
    overflow: hidden;
}

.form-section {
    padding: 25px;
    border-bottom: 1px solid #ecf0f1;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3f5e7d;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.form-section input[type="text"],
.form-section input[type="password"],
.form-section input[type="email"],
.form-section input[type="number"],
.form-section select,
.form-section textarea,
.form-section input[type="file"] {
    border-radius: 6px;
    border: 1px solid #bdc3c7;
    padding: 10px 12px;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

.form-section input:not([type=checkbox]):focus,
.form-section select:focus,
.form-section textarea:focus {
    border-color: #3f5e7d;
    box-shadow: 0 0 0 3px rgba(63, 94, 125, 0.1);
    outline: none;
}


.form-error {
    color: #e74c3c;
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

.logo-preview-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 6px;
    border: 1px dashed #bdc3c7;
}

.preview-image {
    max-height: 150px;
    max-width: 100%;
}

.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type="file"] {
    padding: 20px;
    border: 2px dashed #3f5e7d;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
}

.file-upload-wrapper input[type="file"]:hover {
    background: #ecf0f1;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table-header {
    background: #3f5e7d;
    color: white;
}

.table-header th {
    border: none;
    padding: 15px;
    font-weight: 600;
    font-size: 14px;
}

.table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.table-error {
    background: #ffe6e6;
    color: #c0392b;
    font-weight: 600;
}

.answer-count {
    display: inline-block;
    background: #e8f4f8;
    color: #2c3e50;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.status-box {
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.status-box i {
    font-size: 24px;
    margin-top: 2px;
}

.status-pending {
    background: #fef5e7;
    border-left-color: #f39c12;
    color: #7d6608;
}

.status-active {
    background: #e8f8f5;
    border-left-color: #27ae60;
    color: #0e4620;
}

.status-completed {
    background: #eaf5ea;
    border-left-color: #27ae60;
    color: #1e5631;
}

.status-box div {
    flex: 1;
}

.status-box strong {
    display: block;
    margin-bottom: 5px;
}

.status-box p {
    margin: 0;
    font-size: 13px;
}

.form-actions {
    padding: 25px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}


@media (max-width: 768px) {
    .form-section {
        padding: 15px;
    }

    .section-title {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .table {
        font-size: 13px;
    }

    .table td,
    .table-header th {
        padding: 8px 10px;
    }
}


.alert {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* */
.listing-container {
    padding: 20px 0;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.listing-header h2,
.campaigns-name {
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

.listing-header p {
    margin: 0;
    font-size: 14px;
}

.table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.table-listing {
    margin: 0;
    border-collapse: collapse;
}

.table-listing thead {
    background: linear-gradient(135deg, #3f5e7d 0%, #335070 100%);
    color: white;
}

.table-listing thead th,
.table-listing td {
    padding: 16px 15px;
    font-size: 14px;
    vertical-align: middle;
}

.table-listing thead th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.table-listing thead th i {
    margin-right: 8px;
    opacity: 0.8;
}

.table-listing tbody tr {
    border-top: 1px solid #eeeeee;
    transition: all 0.3s ease;

}

.table-listing tbody tr:hover {
    background-color: #f8f9fa;
    box-shadow: inset 0 0 0 1px #e9ecef;
}

.table-listing tbody tr.campaign-row[data-status="completed"] {
    opacity: 0.75;
}

.table-listing tbody tr.campaign-row[data-status="completed"] td {
    border-top: 1px solid #eeeeee;
    background-color: #dddddd;
}

.date-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 6px 12px;
}

.status-badge {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-wrapper {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #ecf0f1;
    display: flex;
    justify-content: center;
}

.pagination {
    margin: 0;
    display: flex;
    gap: 5px;
}

.pagination .page-item {
    display: flex;
}

.pagination .page-link {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #3f5e7d;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
    background: #3f5e7d;
    color: white;
    border-color: #3f5e7d;
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 64px;
    color: #bdc3c7;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 14px;
}

@media (max-width: 768px) {

    .table-listing thead th,
    .table-listing td {
        padding: 12px 10px;
        font-size: 12px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

.nb-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nb-progress-container .progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.nb-progress-container .progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
}

.nb-progress-container .progress-fill {
    height: 100%;
    background: #27ae60;
    width: 0;
    transition: width 0.4s ease;
}


.progress {
    width: 100%;
    height: 8px;
    background: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ccc;
}

.progress .progress-fill {
    height: 100%;
    width: 0%;
    background: #3f5e7d;
    transition: width 0.3s ease;
}

/*  */
#dash-select {
    max-width: 420px;
    width: 100%;
    margin: 0 0 18px 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d1d9e0;
    background: white;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
    font-weight: 600;
    color: #2c3e50;
}

.dash-campaign {
    display: none;
    background: white;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(46, 61, 73, 0.06);
    margin-bottom: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-campaign.show {
    display: block;
    transform: translateY(0);
}

.level-block {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 8px;
    background: #fbfcfd;
    border: 1px solid #eef3f6;
    margin-bottom: 10px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.level-block:hover {
    background: #f7fbff;
}

.level-block .progress-container {
    width: 180px;
    height: 14px;
    background: #edf2f6;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.level-block .progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3f5e7d 0%, #27ae60 100%);
    transition: width 0.5s ease;
}

.level-text {
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.2;
    flex: 1 1 auto;
}

.level-text strong {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: #16324a;
}

.resgen {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.resgen a.btn {
    min-width: 160px;
}

.radar {
    /*max-width: 420px;*/
    margin: 0px auto 14px;
}


#suivi-campaign p,
#suivi-campaign .empty {
    color: #67748a;
}

@media (max-width: 768px) {
    #dash-select {
        max-width: 100%;
    }

    .level-block {
        gap: 10px;
        padding: 8px;
    }

    .level-block .progress-container {
        width: 140px;
        height: 12px;
    }

    .radar .radar-canvas {
        width: 100% !important;
        min-height: 200px !important;
    }

    .resgen {
        flex-direction: column;
        align-items: stretch;
    }
}

.finished-info {
    margin-top: 6px;
}

.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(46, 61, 73, 0.04);
}

.status-inline.status-completed {
    background: #ecf4f1;
    color: #1e5631;
    border: 1px solid rgba(39, 174, 96, 0.08);
}

.status-inline i {
    font-size: 18px;
    color: #27ae60;
}

.finished-text strong {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #16324a;
}

.finished-date {
    font-size: 13px;
    color: #6b7785;
    margin-top: 2px;
}

@media (max-width: 576px) {
    .status-inline {
        gap: 8px;
        padding: 6px 10px;
    }

    .finished-text strong {
        font-size: 13px;
    }

    .finished-date {
        font-size: 12px;
    }
}


/*   */
.position-sticky {
    padding: 18px;
}

.position-sticky .text-center {
    background: linear-gradient(180deg, rgba(63, 94, 125, 0.06), rgba(63, 94, 125, 0.02));
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 18px rgba(46, 61, 73, 0.04);
}

.position-sticky .text-center.bpm {
    background-color: #fdf9f5;
    padding: 14px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}


.position-sticky .nav {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
    border: 1px solid #eef3f6;
}

.position-sticky .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 6px 4px;
    border-radius: 8px;
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
    background: transparent;
    border: 1px solid transparent;
}

.position-sticky .nav-link::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #cfd8e3;
    border-radius: 50%;
    flex-shrink: 0;
    transform: translateY(0);
    transition: background 0.15s ease, transform 0.12s ease;
}

.position-sticky .nav-link:hover {
    background: linear-gradient(90deg, rgba(63, 94, 125, 0.06), rgba(51, 80, 112, 0.03));
    color: #16324a;
    transform: translateY(-2px);
    text-decoration: none;
}

.position-sticky .nav-link:hover::before {
    background: linear-gradient(90deg, #3f5e7d, #27ae60);
    transform: scale(1.08);
}

.position-sticky .nav-link.active,
.position-sticky .nav-link[aria-current="page"] {
    background: linear-gradient(90deg, #3f5e7d, #335070);
    color: #fff;
    box-shadow: 0 6px 16px rgba(63, 94, 125, 0.12);
}

.position-sticky .nav-link.active::before,
.position-sticky .nav-link[aria-current="page"]::before {
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06) inset;
}

.position-sticky form button.nav-link {
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .position-sticky {
        padding: 12px;
    }

    .position-sticky .nav-link {
        padding: 9px 10px;
        font-size: 14px;
    }

    .position-sticky .text-center {
        padding: 10px;
    }
}


/* */
input[type=checkbox] {
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    border: 0;
    outline: 0;
    cursor: pointer;
    margin: 10px;
}

input[type=checkbox]::after {
    content: "";
    width: 40px;
    height: 24px;
    display: inline-block;
    background: rgba(196, 195, 195, 0.55);
    border-radius: 18px;
    clear: both;
}

#id_type_question:after {
    background: #3f5e7d;
}

input[type=checkbox]::before {
    content: "";
    width: 20px;
    height: 20px;
    display: block;
    position: absolute;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: rgb(255, 255, 255);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

input[type=checkbox]:checked:before {
    left: 18px;
    box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.6);
}

#id_type_question:checked:after,
input[type=checkbox]:checked:after {
    background: #95d324;
}


input[type=checkbox],
input[type=checkbox]:before,
input[type=checkbox]:after,
input[type=checkbox]:checked:before,
input[type=checkbox]:checked:after {
    transition: ease 0.3s;
    -webkit-transition: ease 0.3s;
    -moz-transition: ease 0.3s;
    -o-transition: ease 0.3s;
}

.strate-row.unchecked {
    opacity: 0.75;
}

@media (max-width: 576px) {

    .table td,
    .table th {
        display: block;
        width: 100%;
        text-align: left;
    }

    .table td input {
        width: 100%;
        margin-top: 0.25rem;
    }
}
