

/* ===== USER LAYOUT SIDEBAR ===== */

/* ===== USER BANNER ===== */

.user-banner__top {
    position: fixed;
    top: 0;
    left: 260px;
    width: calc(100% - 260px);
    height: 92px;
    background: #ffffff;
    color: #32588b;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 28px;
    z-index: 900;
    border-bottom: 1px solid #d7e0ef;
    box-shadow: 0 8px 22px rgba(10, 28, 55, 0.1);
    overflow: hidden;
}

.user-banner__top::before {
    position: absolute;
    top: -90px;
    right: -55px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(31, 156, 147, 0.1), rgba(123, 111, 214, 0.08) 55%, transparent 75%);
    content: "";
    pointer-events: none;
}

.user-banner__greeting,
.user-banner__right {
    position: relative;
    z-index: 1;
}
.user-banner__greeting {
    min-width: 0;
}
.user-banner__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #1f9c93;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.user-banner__greeting h1 {
    margin: 0;
    color: #182a49;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
}
.user-banner__avatar-trigger {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.user-banner__welcome {
    font-size: 25px;
    font-weight: 700;
    color: #112033;
}

.user-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #32588b;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 28px 0px;
    z-index: 1000;
    box-shadow: 8px 0 28px rgba(10, 28, 55, 0.26);
}

.user-sidebar__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.user-sidebar__logo-link {
    width: 100%;
    display: block;
    margin-bottom: 80px;
}

.user-sidebar__logo {
    display: block;
    width: 150px;
    height: 51px;
    margin: 0 auto;
}

.user-sidebar__welcome {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.user-banner__right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 14px;
}
.user-banner__user-block {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-banner__user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}
.user-banner__username {
    color: #1c2436;
    font-size: 13.5px;
    font-weight: 700;
}
.user-banner__role {
    color: #707b8e;
    font-size: 12.5px;
}

.user-sidebar__avatar-trigger {
    margin-top: 10px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.user-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.user-sidebar__link,
.user-sidebar__link:visited {
    display: flex;
    align-items: center;
    color: #b8cbe0;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 25px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.user-sidebar__link i {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 10px;
}

#user-sidebar__dashboard i {background: url('../../images/icons/dashboard.svg') no-repeat center center;}
#user-sidebar__upload-cv i {background: url('../../images/icons/upload-cv.svg') no-repeat center center;}
#user-sidebar__add-action i {background: url('../../images/icons/add-section.svg') no-repeat center center;}
#user-sidebar__my-actions i {background: url('../../images/icons/actions.svg') no-repeat center center;}
#user-sidebar__my-progress i {background: url('../../images/icons/my-progress.svg') no-repeat center center;}
#user-sidebar__documents i {background: url('../../images/icons/documentary.svg') no-repeat center center;}
#user-sidebar__generate-summary i {background: url('../../images/icons/generate-summary.svg') no-repeat center center;}
#user-sidebar__help-faq i {background: url('../../images/icons/help-faq.svg') no-repeat center center;}

.user-sidebar__link:hover,
.user-sidebar__link.is-active {
    color: #6fe16a;
    background: #39649e;
}

.user-main-content {
    margin-left: 260px;
    min-height: 100vh;
    padding: 122px 36px 36px;
    background: #FFFFFF;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(234, 239, 244, 1) 50%, rgba(234, 239, 244, 1) 100%);
}
.profile-settings,
.profile-settings:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #d7e0ef;
    border-radius: 50%;
    background: #ffffff;
    color: #32588b;
    font-size: 15px;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.profile-settings:hover,
.profile-settings:focus-visible {
    border-color: #bdeae6;
    background: #e3f6f4;
    color: #167a72;
    outline: none;
    transform: translateY(-1px);
}

.user-banner__logout,
.user-banner__logout:visited {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    min-height: 38px;
    padding: 8px 15px 8px 13px;
    border: 1px solid #f7c9c6;
    border-radius: 999px;
    color: #c14a42;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.user-banner__logout:hover,
.user-banner__logout:focus-visible {
    background: #fdecea;
    box-shadow: 0 1px 2px rgba(20, 30, 50, 0.06);
    color: #b94740;
    outline: none;
    transform: translateY(-1px);
}
/* ===== AVATAR MODAL ===== */

#avatar-nav-img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #bdeae6;
}

#avatar-nav-img:hover {
    opacity: 0.8;
}

#avatar-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 24px;
}

#avatar-modal.is-open {
    display: block;
}

#avatar-modal .modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#avatar-modal .modal__panel {
    position: relative;
    width: min(460px, calc(100% - 24px));
    margin: 10vh auto;
    background: #ffffff;
    border: 1px solid var(--primary-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: supportModalIn 0.25s ease-out;
}

#avatar-modal .modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: var(--secondary-light);
    border-bottom: 1px solid var(--secondary-border);
}

#avatar-modal .modal__title {
    font-size: 19px;
    font-weight: 700;
    color: var(--secondary);
}

#avatar-modal .modal__close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--secondary-border);
    border-radius: 50%;
    background: #ffffff;
    color: var(--secondary);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#avatar-modal .modal__close:hover {
    background: var(--secondary-border);
    color: #ffffff;
    transform: rotate(90deg);
}

#avatar-modal .modal__body {
    padding: 24px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#avatar-preview-container {
    width: 120px;
    height: 120px;
}

#avatar-preview-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-border);
}

.avatar-upload-label {
    display: inline-block;
    padding: 8px 16px;
    background: var(--secondary-light);
    border: 1px solid var(--secondary-border);
    border-radius: 8px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.avatar-upload-label:hover {
    background: var(--secondary-border);
}

#avatar-delete-container {
    text-align: center;
    margin-top: 15px;
}

.avatar-delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0;
}

.avatar-delete-btn:hover {
    color: #a71d2a;
}

.avatar-delete-notice {
    font-size: 13px;
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-delete-notice button {
    background: none;
    border: none;
    color: #856404;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 13px;
}

.avatar-error-msg {
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

#avatar-modal .modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--primary-border);
    background: #fafafa;
}

/* ===== DASHBOARD CONTENT ===== */
#dashboard-conteneur {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.dashboard-card,
.dashboard-card:visited {
    border-radius: 12px;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    cursor: pointer;
    min-width: 0;
    color: #fff;
    text-decoration: none;
    container-type: inline-size;
    container-name: container-dashboard;
}

.dashboard-card:hover {
    transform: translateY(-4px);    
}
.dashboard-card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 20px;
}
.dashboard-card__title {
    font-size: 25px;
    font-weight: 400;
    color: #112033;
    margin: 0;
}
.dashboard-card__description {
    color: #fff;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.dashboard-card__icon {
    width: 90px;    
    border-radius: 0 12px 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dashboard-card__icon i {
    display: block;
    width: 51px;
    height: 51px;
    background-size: contain;
    background-repeat: no-repeat;
}

@container container-dashboard (max-width: 420px) {
    .dashboard-card__content {
        gap: 6px;
        padding: 16px;
    }

    .dashboard-card__title {
        font-size: 21px;
        line-height: 1.2;
    }

    .dashboard-card__description {
        font-size: 13px;
        letter-spacing: 1.5px;
    }

    .dashboard-card__icon {
        width: 76px;
    }
}

@container container-dashboard (max-width: 280px) {
    .dashboard-card {
        gap: 12px;
    }

    .dashboard-card__content {
        gap: 5px;
        padding: 14px;
    }

    .dashboard-card__title {
        font-size: 19px;
        line-height: 1.2;
    }

    .dashboard-card__description {
        font-size: 12.5px;
        letter-spacing: 1.2px;
    }

    .dashboard-card__icon {
        width: 64px;
    }
}

.dashboard-card:nth-child(6n+1){
    background: #26a6a1;
}
.dashboard-card:nth-child(6n+1) .dashboard-card__title {
    color: #bdedea;
}
.dashboard-card:nth-child(6n+1) .dashboard-card__icon {
    background: #bdedea;
}
.dashboard-card:nth-child(6n+1) .dashboard-card__icon i {
    filter: brightness(0) invert(53%) sepia(100%) saturate(323%) hue-rotate(129deg) brightness(85%) contrast(90%);
}

.dashboard-card:nth-child(6n+2){
    background: #4ab051;
}
.dashboard-card:nth-child(6n+2) .dashboard-card__title {
    color: #c9f4c7;
}
.dashboard-card:nth-child(6n+2) .dashboard-card__icon {
    background: #c9f4c7;
}
.dashboard-card:nth-child(6n+2) .dashboard-card__icon i {
    filter: brightness(0) invert(53%) sepia(75%) saturate(377%) hue-rotate(74deg) brightness(96%) contrast(87%);
}

.dashboard-card:nth-child(6n+3){
    background: #e86f6f;
}
.dashboard-card:nth-child(6n+3) .dashboard-card__title {
    color: #fad3d3;
}
.dashboard-card:nth-child(6n+3) .dashboard-card__icon {
    background: #fad3d3;
}
.dashboard-card:nth-child(6n+3) .dashboard-card__icon i {
    filter: brightness(0) invert(56%) sepia(18%) saturate(1417%) hue-rotate(313deg) brightness(94%) contrast(92%);
}

.dashboard-card:nth-child(6n+4){
    background: #32588b;
}
.dashboard-card:nth-child(6n+4) .dashboard-card__title {
    color: #bdd0e9;
}
.dashboard-card:nth-child(6n+4) .dashboard-card__icon {
    background: #bdd0e9;
}
.dashboard-card:nth-child(6n+4) .dashboard-card__icon i {
    filter: brightness(0) invert(26%) sepia(98%) saturate(372%) hue-rotate(175deg) brightness(97%) contrast(89%);
}

.dashboard-card:nth-child(6n+5){
    background: #6b5dd3;
}
.dashboard-card:nth-child(6n+5) .dashboard-card__title {
    color: #dcd8fa;
}
.dashboard-card:nth-child(6n+5) .dashboard-card__icon {
    background: #dcd8fa;
}
.dashboard-card:nth-child(6n+5) .dashboard-card__icon i {
    filter: brightness(0) invert(38%) sepia(95%) saturate(744%) hue-rotate(216deg) brightness(85%) contrast(93%);
}

.dashboard-card:nth-child(6n+6){
    background: #fdb406;
}
.dashboard-card:nth-child(6n+6) .dashboard-card__title {
    color: #fedf97;
}
.dashboard-card:nth-child(6n+6) .dashboard-card__icon {
    background: #fedf97;
}
.dashboard-card:nth-child(6n+6) .dashboard-card__icon i {
    filter: brightness(0) invert(76%) sepia(20%) saturate(4902%) hue-rotate(357deg) brightness(103%) contrast(98%);
}

#dashboard-card-documents .dashboard-card__icon i {background: url('../../images/icons/documentary.svg') no-repeat center center;}
#dashboard-card-upload-cv .dashboard-card__icon i {background: url('../../images/icons/upload-cv.svg') no-repeat center center;}
#dashboard-card-add-section .dashboard-card__icon i {background: url('../../images/icons/add-section.svg') no-repeat center center;}
#dashboard-card-my-actions .dashboard-card__icon i {background: url('../../images/icons/actions.svg') no-repeat center center;}
#dashboard-card-my-progress .dashboard-card__icon i {background: url('../../images/icons/my-progress.svg') no-repeat center center;}
#dashboard-card-generate-summary .dashboard-card__icon i {background: url('../../images/icons/generate-summary.svg') no-repeat center center;}
#dashboard-card-help-faq .dashboard-card__icon i {background: url('../../images/icons/help-faq.svg') no-repeat center center;}

@media (max-width: 1199px) {
    #dashboard-conteneur {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {

    #dashboard-conteneur {
        padding: 10px;
    }
}

@media (max-width: 700px) {
    #dashboard-conteneur {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .dashboard-card__content {
        padding: 16px;
    }

    .dashboard-card__title {
        font-size: 21px;
    }

    .dashboard-card__icon {
        width: 72px;
    }
}

@media (max-width: 991px) {
    .user-banner__top {
        left: 220px;
        width: calc(100% - 220px);
        height: auto;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 20px;
    }

    .user-banner__greeting h1 {
        font-size: 20px;
    }

    .user-sidebar {
        width: 220px;
        height: auto;
        min-height: 100vh;
        padding-top: 22px;
    }

    .user-sidebar__logo-link {
        margin-bottom: 52px;
    }

    .user-sidebar__link,
    .user-sidebar__link:visited {
        padding-right: 18px;
        padding-left: 18px;
    }

    .user-banner__right {
        gap: 10px;
    }

    .user-main-content {
        margin-left: 220px;
        padding: 112px 24px 24px;
    }
}

@media (max-width: 767px) {
    .user-sidebar {
        display: none;
    }

    .user-banner__top {
        position: static;
        width: 100%;
        flex-wrap: wrap;
        border-radius: 0 0 18px 18px;
        border-bottom: none;
        box-shadow: none;
        padding: 14px 18px;
    }

    .user-banner__greeting {
        width: 100%;
    }

    .user-banner__right {
        width: 100%;
        justify-content: flex-start;
    }

    .user-main-content {
        margin-left: 0;
        padding: 20px 18px 28px;
    }
}

@media (max-width: 860px) {
    .user-banner__top {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-banner__greeting,
    .user-banner__right {
        width: 100%;
    }

    .user-banner__right {
        justify-content: flex-end;
    }

}

@media (min-width: 768px) and (max-width: 860px) {
    .user-main-content {
        padding-top: 160px;
    }
}

@media (max-width: 480px) {
    .user-banner__user-meta {
        min-width: 0;
    }

    .user-banner__username {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
 
    .user-banner__logout {
        padding-right: 12px;
        padding-left: 10px;
    }
}

@media (max-width: 430px) {
    .user-banner__right {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .user-banner__user-block {
        flex: 1 1 calc(100% - 52px);
        min-width: 0;
    }

    .user-banner__logout {
        margin-left: 0;
    }
}