@custom-media --xxs-down screen and (max-width: 400px);
@custom-media --xs-down screen and (max-width: 499px);
@custom-media --s-up screen and (min-width: 500px);
@custom-media --m-down screen and (max-width: 699px);
@custom-media --m-up screen and (min-width: 700px);
@custom-media --l-up screen and (min-width: 800px);
@custom-media --l-down screen and (max-width: 799px);
@custom-media --xl-down screen and (max-width: 999px);
@custom-media --xl-up screen and (min-width: 1000px);
@custom-media --xxl-up screen and (min-width: 1200px);
@custom-media --xxl-down screen and (max-width: 1199px);
@custom-media --3xl-down screen and (max-width: 1299px);
@custom-media --3xl-up screen and (min-width: 1400px);
@custom-media --4xl-up screen and (min-width: 1560px);

:root {
    --font-primary: "Noto Sans";
}
/* Status Messages */
.sames-status-message {
    padding: 12px 16px;
    margin-bottom: 16px;
    background-color: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    color: #2e7d32;
    font-size: 14px;
    line-height: 1.4;
}

.sames-login-subtitle {
    color: #6b7280;
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Sidebar */

.fi-main-ctn {
    z-index: 1;
}
.admin-locale-switcher {
    width: 200px;
    transform: translateX(-50%);
}
.fi-sidebar-header {
    border-bottom: 1px solid #e5edf3;
    border-right: 1px solid #e5edf3;
    background-color: #ffffff;
    box-shadow: none !important;
}
.fi-sidebar-nav {
    z-index: 1;
    border-right: 1px solid #e5edf3;
    justify-content: space-between;
}

aside {
    z-index: 30 !important;
    box-shadow: 20px 0px 54px 0px #0000000f !important;

    @media screen and (max-width: 699px) {
        box-shadow: none !important;
    }
}

.fi-topbar {
    nav {
        border-bottom: 1px solid #e5edf3;
    }
}

.fi-sidebar-item-button {
    color: #00508b;
}
.fi-sidebar-item-button-active,
.fi-sidebar-item-button-active:hover {
    background-color: #00508b;
    color: #ffffff;
}

.fi-sidebar-item-icon {
    color: #00508b;
}

.fi-sidebar-item-icon-active {
    color: #ffffff;
}
.fi-sidebar-item-label {
    color: #00090f;
}
.fi-sidebar-item-label-active {
    color: #ffffff;
}
.fi-header-heading {
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.4;
    color: #00508b;
}
.fi-header-subheading {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 2rem;
    color: #00060aa3;
}

.fi-sidebar-group-label {
    color: #4b5563;
    font-weight: 600;
    line-height: 1.5;
    font-size: 0.875rem;
}

.fi-sidebar-social-links {
    display: flex;
    gap: 0.625rem;
    align-items: center;

    p {
        color: #00060aa3;
        font-weight: 400;
        font-size: 1rem;
        line-height: 2rem;
    }
}
.fi-sidebar-social-links__icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
/* Panel */
.fi-wrapper-panel {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(1, 1fr);
}

.fi-wrapper-panel.-fourcolumns {
    grid-template-columns: repeat(1, 1fr);

    @media screen and (min-width: 700px) {
        grid-template-columns: repeat(2, 1fr);
    }

    @media screen and (min-width: 1400px) {
        grid-template-columns: repeat(4, 1fr);
    }
}

.fi-panel {
    background-color: #e5ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 15rem;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fi-panel__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fi-panel__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: #00508b;
    text-transform: uppercase;
    margin-block-end: 0.25rem;
}

.fi-panel__text {
    font-weight: 400;
    font-size: 1rem;
    color: #00060aa3;
    line-height: 1.2;
}

.fi-panel__button {
    margin-block-start: 1rem;
    display: flex;
    justify-content: flex-end;
    span {
        padding-block: 0.375rem;
        padding-inline: 0.625rem;
        background-color: #00508b;
        border-radius: 0.25rem;
        transition: box-shadow 0.3s ease;

        svg {
            transition: transform 0.3s ease;
        }

        &:hover {
            box-shadow: 0px 10px 10px 0px #0000001a;
            svg {
                transform: translateX(0.2rem);
            }
        }
    }
}

.fi-panel__icon {
    width: 3rem;
    height: 3rem;
    margin-block-end: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;

    svg {
        width: 3rem;
        height: 3rem;
    }
}

/* Custom Login Page */
.sames-login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    flex-direction: column;
    background-color: #002038;
    padding: 2rem;
}

@media screen and (min-width: 1000px) {
    .sames-login-container {
        flex-direction: row;
    }
}

.sames-login-left {
    padding-block: 2rem;
    flex: 1;
    order: 2;

    @media screen and (min-width: 700px) {
        padding-inline-end: 2rem;
    }

    @media screen and (min-width: 1000px) {
        min-height: calc(100vh - 4rem);
        position: relative;
        order: 1;
    }

    .sames-login-back {
        position: absolute;
        top: 1rem;
        z-index: 10;

        @media screen and (min-width: 700px) {
            top: 2rem;
        }

        .sames-login-back-link {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: white;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            letter-spacing: 0.025em;
            transition: opacity 0.2s ease;

            &:hover {
                opacity: 0.8;
            }
        }
    }

    .sames-login-content-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4rem;
        height: 100%;
        align-content: center;
        max-width: 650px;
        margin-inline: auto;
        margin-top: 1rem;
        margin-block-end: 4rem;

        @media screen and (min-width: 700px) {
            grid-template-columns: repeat(2, 1fr);
            margin-top: 4rem;
        }
    }
}

.sames-login-card {
    display: flex;
    flex-direction: column;
    max-width: 270px;
    margin-inline: auto;

    .sames-login-card__icon {
        margin-block-end: 1rem;
        display: flex;
        justify-content: center;

        @media screen and (max-width: 1000px) {
            margin-block-end: 1.5rem;
        }
        svg {
            width: 120px;
            height: 120px;
        }

        .sames-login-card__icon__placeholder {
            width: 120px;
            height: 120px;
            background-color: #002a49;
            border-radius: 50%;
        }
    }

    .sames-login-card__value {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.25rem;
        font-weight: 500;
        color: #ffffff;
        padding-block-end: 1rem;
        margin-block-end: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);

        span{
            text-align:center;
        }

        @media screen and (max-width: 1000px) {
            padding-block-end: 1.5rem;
            margin-block-end: 1.5rem;
        }

        @media screen and (max-width: 1560px) {
            font-size: 1.5rem;
        }

        strong {
            color: #cedc00;
            font-weight: 500;
        }
    }

    .sames-login-card__desc {
        font-size: 1rem;
        font-weight: 400;
        color: #ffffff;
        opacity: 0.8;

        p {
            text-align: center;
        }
    }
}

.sames-login-right {
    background: white;
    display: flex;
    padding: 1.5rem;
    flex: 1;
    max-width: 560px;
    border-radius: 0.5rem;
    order: 1;
    margin-top: 20px;

    @media screen and (min-width: 700px) {
        margin-top: 40px;
        padding: 2.5rem;
    }

    @media screen and (min-width: 1000px) {
        order: 2;
        margin-top: 0;
    }

    .sames-login-form-container {
        width: 100%;

        .sames-login-logo {
            display: flex;
            justify-content: center;
            margin-block-end: 5rem;

            img {
                height: 60px;
                width: auto;
            }
        }

        .sames-login-header {
            margin-block-end: 2.5rem;

            .sames-login-title {
                font-size: 1.5rem;
                font-weight: 500;
                color: #00508b;

                line-height: 2.5rem;
            }
        }
    }
}

.sames-login-form {
    .sames-login-forgot {
        margin-block-start: 2rem;
        text-align: right;

        @media screen and (min-width: 700px) {
            margin-block-start: -2rem;
            margin-block-end: 4.5rem;
        }

        .sames-login-forgot-link {
            font-size: 1rem;
            color: #00508b;
            font-weight: 400;
            text-decoration: none;
            line-height: 1.2;

            &:hover {
                text-decoration: underline;
            }
        }
    }

    .fi-input {
        width: 100%;
        padding: 0.875rem 1rem;
        padding-inline: 14px;
        padding-block: 16px;
        border: 1px solid #e5edf3;
        border-radius: 8px;
        font-size: 1rem;
        transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease;

        &:focus {
            border-color: transparent;
        }
    }

    .fi-fo-field-wrp-label {
        font-weight: 400;
        color: #00090f;
        line-height: 1.2;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;

        span {
            font-size: 1rem !important;
            line-height: 1.2 !important;
            font-weight: 400 !important;
            color: #00090f !important;
        }

        sup {
            margin-left: 0.25rem;
        }
    }

    .fi-checkbox {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .fi-checkbox-input {
        width: 1.125rem;
        height: 1.125rem;
        border: 1px solid #e5edf3;
        border-radius: 4px;
        background: white;
    }

    .sames-login-signup {
        text-align: center;
        font-size: 1rem;
        font-weight: 400;
        color: #00090f;
        line-height: 1.2;

        .sames-login-signup-link {
            color: #00508b;
            text-decoration: none;
            &:hover {
                text-decoration: underline;
            }
        }
    }

    .sames-login-submit {
        margin-block: 2rem;

        .sames-login-button {
            font-size: 1rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            background: #cedc00;
            border: unset;
            color: #00508b;
            border-radius: 2.188rem;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            padding-inline-end: 20px;
            width: 100%;
            transition: box-shadow 0.3s ease;

            svg {
                transition: transform 0.3s ease;
                path {
                    fill: #00508b;
                }
            }

            &:hover {
                box-shadow: 0px 10px 10px 0px #0000001a;

                svg {
                    transform: rotate(45deg);
                }
            }

            @media screen and (max-width: 699px) {
                padding: 0.5rem 1.5rem;
                text-align: center;
            }
        }
    }
}

/* Styles pour la vérification d'email */
.sames-login-message {
    margin-bottom: 2rem;
    text-align: center;

    p {
        color: #6b7280;
        line-height: 1.6;
        margin: 0;
    }
}

/* Message de succès sur la page de connexion */

.sames-login-success {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    text-align: center;
    display: block;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    @media screen and (min-width: 450px) {
        display: flex;
    }

    p {
        color: #166534;
        margin: 0;
        font-weight: 500;
        line-height: 1.5;
    }

    &::before {
        content: "✓";
        color: #166534;
        font-weight: bold;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
}

.sames-login-actions {
    margin-bottom: 2rem;

    .fi-btn {
        width: 100%;
        justify-content: center;
        background-color: #00508b;
        border-color: #00508b;

        &:hover {
            background-color: #003d6b;
            border-color: #003d6b;
        }
    }
}

/* Styles pour l'erreur de vérification d'email */
.sames-login-verification-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.sames-login-error-message {
    color: #dc2626;
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-bottom: 0.75rem;
    margin: 0 0 0.75rem 0;
}

.sames-login-resend-button {
    background-color: #00508b;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sames-login-resend-button:hover {
    background-color: #003d6b;
}

.sames-login-resend-button:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.sames-login-button:disabled {
    background-color: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.sames-login-button:disabled:hover {
    background-color: #9ca3af;
    border-color: #9ca3af;
}

/* Media Library Styles */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-library h5, .training h5 {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    line-height: 32px;
    letter-spacing: 0%;
    vertical-align: middle;
    color: #00060AA3;
}

.category-name {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0%;
    text-transform: uppercase;
    color: #00508B;
}

/* Locked Documents Styles */
/**
 * Styles pour la gestion des documents verrouillés dans l'extranet
 */

.document-locked {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.document-locked:hover {
    opacity: 0.5;
}

.document-row-locked {
    background-color: #f9fafb; /* gray-50 */
    opacity: 0.6;
}

.document-row-locked:hover {
    background-color: #f3f4f6; /* gray-100 */
}

.document-text-locked {
    color: #9ca3af; /* gray-400 */
}

.document-lock-icon {
    width: 1.25rem; /* 20px */
    height: 1.25rem; /* 20px */
    color: #9ca3af; /* gray-400 */
    cursor: help;
    transition: color 0.2s ease;
}

.document-lock-icon:hover {
    color: #6b7280; /* gray-500 */
}

.document-lock-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translate(-100%, -50%) translateX(-0.75rem);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: white;
    background-color: #00508b; /* primary color */
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    pointer-events: none;
    width: 16rem;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.document-lock-icon:hover + .document-lock-tooltip,
.document-lock-tooltip.show {
    opacity: 1;
}

.document-accessible {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.document-accessible:hover {
    background-color: #f9fafb; /* gray-50 */
}

.document-text-accessible {
    color: #111827; /* gray-900 */
}

.document-link-accessible {
    color: #00508b; /* primary-600 */
    font-weight: 500;
    transition: color 0.15s ease;
}

.document-link-accessible:hover {
    color: #003d6b; /* primary-700 */
}

.locked-documents-info-banner {
    background-color: #eff6ff; /* blue-50 */
    border-left: 4px solid #60a5fa; /* blue-400 */
    padding: 1rem;
    margin: 1rem 1.5rem;
}

.locked-documents-info-banner .icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #60a5fa; /* blue-400 */
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.locked-documents-info-banner .message {
    margin-left: 0.75rem;
    flex: 1;
}

.locked-documents-info-banner .message-text {
    font-size: 0.875rem;
    color: #1e40af; /* blue-700 */
}

.locked-documents-info-banner .action-button {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    margin-top: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    color: white;
    background-color: #2563eb; /* blue-600 */
    transition: background-color 0.15s ease;
}

.locked-documents-info-banner .action-button:hover {
    background-color: #1d4ed8; /* blue-700 */
}

.locked-documents-info-banner .action-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.5);
}

.filter-accessible-only {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb; /* gray-200 */
}

.filter-accessible-only label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-accessible-only input[type="checkbox"] {
    border-radius: 0.25rem;
    border-color: #d1d5db; /* gray-300 */
    color: #00508b; /* primary-600 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.filter-accessible-only input[type="checkbox"]:focus {
    outline: none;
    border-color: #00508b;
    box-shadow: 0 0 0 3px rgba(0, 80, 139, 0.1);
}

.filter-accessible-only .label-text {
    color: #374151; /* gray-700 */
}

/* Transitions pour feedback visuel */
.document-transition {
    transition: all 0.2s ease;
}

[data-access-state="locked"] {
    opacity: 0.6;
    cursor: not-allowed;
}

[data-access-state="hidden"] {
    display: none;
}

