/* ===== BASE ===== */
* { box-sizing: border-box; }
body { font-family: "Segoe UI", Arial, sans-serif; margin: 0; background: #f5f7fb;}

a:hover{
    text-decoration: none;
}

#sidebar {
    width: 240px;
    background: #2f3fa8;
    color: #fff;
    transition: width 0.3s;
}
#sidebar.collapsed {
    width: 70px;
}
#sidebar .text-label {
    transition: opacity 0.3s;
    white-space: nowrap;
}
#sidebar.collapsed .text-label {
    opacity: 0;
    white-space: nowrap;
}
#sidebar.collapsed .reverse {
    flex-direction: column-reverse;
}
#content {
    transition: margin-left 0.3s;
    /*margin-left: 240px;*/
}
#content.collapsed {
    margin-left: 70px;
}

.sidebar h1 {
    font-size: 18px;
    margin: 0 0 20px;
}
.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    margin: 16px 0 6px;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-menu li {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.sidebar-menu li.active,
.sidebar-menu li:hover {
    background: rgba(255, 255, 255, 0.14);
}
.menu-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}
.sidebar a{
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
}

/* MAIN AREA */
.main {
    flex: 1;
    padding: 20px 20px;
    max-width: 800px;
}

.topbar-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}
.breadcrumb {
    font-size: 12px;
    color: #7b8194;
    margin-bottom: 16px;
}
.breadcrumb span + span::before {
    content: " / ";
    margin: 0 4px;
}

.tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.tab-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: #e3e8f2;
    font-size: 12px;
    cursor: pointer;
}
.tab-btn.active {
    background: #4b6fe8;
    color: #fff;
}

.card {
    background: #fff;
    padding: 18px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn-secondary {
    background: #e3e8f2;
    color: #1c2340;
}
.btn-secondary:hover { background: #d3d8e8; }
.btn-primary {
    background: #4b6fe8;
    color: #fff;
    box-shadow: 0 2px 4px rgba(75,111,232,0.35);
}
.btn-primary:hover { background: #3f61d0; }
.btn-danger {
    background: #e04b4b;
    color: #fff;
}
.btn-danger:hover { background: #c43f3f; }
.btn-primary:active,
.btn-secondary:active,
.btn-danger:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* ===== TRÉSORERIE ===== */

.treso-header {
    background: #4b6fe8;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}
.treso-header-title {
    font-weight: 600;
    font-size: 15px;
}

header.qcm-header,
header.simple-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #4b6fe8;
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 16px;
}
.timer-pill {
    background: rgba(0,0,0,0.15);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
}

.progress-card {
    margin: 18px 0;
    background: #fff;
    padding: 18px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}
.progress-bar {
    width: 100%;
    background: #e3e8f2;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
}
.progress-bar-fill {
    width: 34%;
    height: 100%;
    background: #4b6fe8;
}

.question-block,
.card {
    background: #fff;
    padding: 22px 22px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}
.question-meta {
    font-size: 12px;
    color: #7b8194;
    margin-bottom: 6px;
}
.question-block h2,
.card h2 {
    margin: 0 0 10px;
    font-size: 17px;
}
.answers label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f2f8;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.answers input {
    transform: scale(1.2);
}

/* FORM INFOS CANDIDAT */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin-top: 10px;
}
.form-field {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}
.form-field label {
    margin-bottom: 4px;
}
.form-field span.required {
    color: #e04b4b;
    margin-left: 2px;
}
.form-field input,
.form-field textarea {
    border-radius: 6px;
    border: 1px solid #c6cbe0;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
}
.form-help {
    font-size: 11px;
    color: #7b8194;
    margin-top: 8px;
}

/* RESULT LIST */
.question-result {
    border-top: 1px solid #e3e8f2;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 16px;
}
.question-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.badge-ok {
    background: #e3f7ea;
    color: #1d7a3b;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}
.badge-ko {
    background: #fde7e7;
    color: #b43232;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}



.btn-small {
    padding:4px 10px;
    border-radius:999px;
    border:1px solid #28a745;
    background:#28a745;
    color:#fff;
    font-size:12px;
    cursor:pointer;
}
.btn-small.secondary {
    border-color:#e04b4b;
    background:#e04b4b;
}
.full-height{
    min-height: 100vh;
}

.days-slider-wrapper {
    position: relative;
}

.days-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 0;
}

.days-slider::-webkit-scrollbar {
    display: none;
}

.day-slide {
    min-width: 110px;
    text-align: center;
    flex-shrink: 0;
    padding: 8px 6px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.day-slide.selected {
    background-color: #f0f6ff;
    border: 1px solid #cfe0ff;
}

.day-slide.selected .day-title,
.day-slide.selected .day-date {
    color: #1a73e8;
}

.day-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.day-date {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 6px;
}

.day-slide.hidden {
    display: none;
}

.slot {
    background-color: #e9f2ff;
    color: #1a73e8;
    border-radius: 999px;
    padding: 4px 0;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    border: none;
    width: 100%;
    cursor: pointer;
}

.slot:hover {
    background-color: #d6e7ff;
}

.slot.empty {
    background: transparent;
    color: #adb5bd;
    cursor: default;
}

.slot.active {
    background-color: #1a73e8;
    color: #fff;
}

.slider-btn {
    position: absolute;
    /*top: 35%;*/
    /*transform: translateY(-50%);*/
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s;
}

.slider-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.slider-btn.left {
    left: -18px;
}

.slider-btn.right {
    right: -18px;
}

.validate-btn {
    background-color: #1a73e8;
    color: #fff;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    border: none;
}

.validate-btn:disabled {
    background-color: #c7d7f5;
    cursor: not-allowed;
}

/*@media (max-width: 768px) {
    .slider-btn {
        display: none;
    }
}*/

@media (max-width: 900px) {
    .main { padding:16px; }
    th, td { padding:6px 4px; font-size:11px; }
    #sidebar.collapsed {
        width: 50px;
    }
}

/* Séparation et matérialisation des semaines */
.day-slide.new-week {
    border-left: 2px dashed #cfe0ff;
    padding-left: 16px;
    margin-left: 16px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
