/* ==========================================================
KRILIH.MA
css/profil-premium.css
VERSION PREMIUM V4
========================================================== */


/* ==========================================================
PAGE
========================================================== */

.profil-page {

    width: 100%;

    min-height:
        calc(
            100vh - 80px
        );

    padding:
        50px 20px 80px;

    background:
        var(
            --bg-primary,
            #f5f7fb
        );

}


.profil-container {

    width: 100%;

    max-width: 1180px;

    margin: 0 auto;

}


/* ==========================================================
HEADER PAGE
========================================================== */

.profil-page-header {

    margin-bottom: 30px;

}


.profil-page-header-content {

    max-width: 760px;

}


.profil-page-kicker,
.profil-section-kicker {

    display: block;

    margin-bottom: 8px;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    color:
        var(
            --primary,
            #0f766e
        );

}


.profil-page-header h1 {

    margin:
        0 0 10px;

    font-size:
        clamp(
            32px,
            5vw,
            48px
        );

    line-height: 1.1;

    color:
        var(
            --text-primary,
            #111827
        );

}


.profil-page-header p {

    margin: 0;

    max-width: 650px;

    font-size: 16px;

    line-height: 1.7;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


/* ==========================================================
CARTE PROFIL
========================================================== */

.profil-main-card {

    position: relative;

    overflow: hidden;

    padding: 32px;

    margin-bottom: 45px;

    border:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

    border-radius: 24px;

    background:
        var(
            --bg-card,
            #ffffff
        );

    box-shadow:
        0 18px 50px
        rgba(
            15,
            23,
            42,
            0.08
        );

}


.profil-main-card::before {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 5px;

    background:
        linear-gradient(
            90deg,
            #0f766e,
            #14b8a6,
            #2dd4bf
        );

}


/* ==========================================================
IDENTITÉ
========================================================== */

.profil-main-top {

    display: flex;

    align-items: center;

    gap: 24px;

    margin-bottom: 32px;

}


.profil-avatar {

    flex: 0 0 auto;

    width: 92px;

    height: 92px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    font-size: 27px;

    font-weight: 900;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #0f766e,
            #14b8a6
        );

    box-shadow:
        0 12px 30px
        rgba(
            15,
            118,
            110,
            0.25
        );

}


.profil-account-label {

    display: block;

    margin-bottom: 5px;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.3px;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


.profil-identity h2 {

    margin:
        0 0 5px;

    font-size: 28px;

    color:
        var(
            --text-primary,
            #111827
        );

}


.profil-identity p {

    margin:
        0 0 12px;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


/* ==========================================================
BADGES RÔLE
========================================================== */

.profil-role-badge {

    display: inline-flex;

    align-items: center;

    padding:
        6px 11px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 0.7px;

}


.profil-role-user {

    color: #166534;

    background: #dcfce7;

}


.profil-role-admin {

    color: #92400e;

    background: #fef3c7;

}


.profil-role-superadmin {

    color: #6d28d9;

    background: #ede9fe;

}


/* ==========================================================
INFORMATIONS
========================================================== */

.profil-info-grid {

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap: 15px;

    margin-bottom: 28px;

}


.profil-info-item {

    padding: 18px;

    border-radius: 16px;

    background:
        var(
            --bg-secondary,
            #f8fafc
        );

    border:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

}


.profil-info-label {

    display: block;

    margin-bottom: 7px;

    font-size: 12px;

    font-weight: 700;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


.profil-info-item strong {

    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 14px;

    color:
        var(
            --text-primary,
            #111827
        );

}


/* ==========================================================
ACTIONS
========================================================== */

.profil-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 12px;

}


.profil-btn {

    min-height: 46px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    padding:
        0 18px;

    border: 0;

    border-radius: 12px;

    cursor: pointer;

    font-family: inherit;

    font-size: 14px;

    font-weight: 800;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;

}


.profil-btn:hover {

    transform:
        translateY(-2px);

}


.profil-btn-primary {

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #0f766e,
            #14b8a6
        );

    box-shadow:
        0 8px 20px
        rgba(
            15,
            118,
            110,
            0.18
        );

}


.profil-btn-danger {

    color: #b91c1c;

    background: #fee2e2;

}


.profil-btn-icon {

    font-size: 16px;

}


/* ==========================================================
SECTIONS
========================================================== */

.profil-section {

    margin-bottom: 45px;

}


.profil-section-heading {

    margin-bottom: 18px;

}


.profil-section-heading h2 {

    margin: 0;

    font-size: 25px;

    color:
        var(
            --text-primary,
            #111827
        );

}


/* ==========================================================
STATISTIQUES
========================================================== */

.profil-stats-grid {

    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap: 18px;

}


.profil-stat-card {

    display: flex;

    align-items: center;

    gap: 16px;

    padding: 22px;

    border-radius: 20px;

    border:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

    background:
        var(
            --bg-card,
            #ffffff
        );

    box-shadow:
        0 10px 30px
        rgba(
            15,
            23,
            42,
            0.05
        );

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.profil-stat-card:hover {

    transform:
        translateY(-3px);

    box-shadow:
        0 16px 35px
        rgba(
            15,
            23,
            42,
            0.09
        );

}


.profil-stat-icon {

    width: 52px;

    height: 52px;

    flex: 0 0 auto;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 15px;

    font-size: 23px;

    background:
        var(
            --bg-secondary,
            #f1f5f9
        );

}


.profil-stat-content span {

    display: block;

    margin-bottom: 4px;

    font-size: 13px;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


.profil-stat-content strong {

    font-size: 26px;

    color:
        var(
            --text-primary,
            #111827
        );

}


/* ==========================================================
MENU PROFIL
========================================================== */

.profil-menu-grid {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 18px;

}


.profil-menu-card {

    display: flex;

    align-items: center;

    gap: 16px;

    min-width: 0;

    padding: 22px;

    text-decoration: none;

    border:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

    border-radius: 20px;

    background:
        var(
            --bg-card,
            #ffffff
        );

    box-shadow:
        0 8px 25px
        rgba(
            15,
            23,
            42,
            0.04
        );

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}


.profil-menu-card:hover {

    transform:
        translateY(-3px);

    border-color:
        #14b8a6;

    box-shadow:
        0 14px 35px
        rgba(
            15,
            23,
            42,
            0.08
        );

}


.profil-menu-icon {

    width: 52px;

    height: 52px;

    flex: 0 0 auto;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 15px;

    font-size: 23px;

    background:
        #ecfeff;

}


.profil-menu-content {

    min-width: 0;

    flex: 1;

}


.profil-menu-content h3 {

    margin:
        0 0 5px;

    font-size: 16px;

    color:
        var(
            --text-primary,
            #111827
        );

}


.profil-menu-content p {

    margin: 0;

    font-size: 13px;

    line-height: 1.5;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


.profil-menu-arrow {

    flex: 0 0 auto;

    font-size: 22px;

    font-weight: 800;

    color: #0f766e;

}


/* ==========================================================
SUPERADMIN / ADMIN
========================================================== */

.superadmin-container {

    grid-column:
        1 / -1;

    width: 100%;

}


.superadmin-card {

    position: relative;

    overflow: hidden;

    display: flex;

    align-items: center;

    gap: 20px;

    width: 100%;

    min-height: 145px;

    padding: 25px;

    text-decoration: none;

    border:
        1px solid
        rgba(
            124,
            58,
            237,
            0.25
        );

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #faf5ff 50%,
            #f5f3ff 100%
        );

    box-shadow:
        0 15px 40px
        rgba(
            109,
            40,
            217,
            0.10
        );

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;

}


.superadmin-card:hover {

    transform:
        translateY(-4px);

    border-color:
        rgba(
            124,
            58,
            237,
            0.50
        );

    box-shadow:
        0 22px 50px
        rgba(
            109,
            40,
            217,
            0.16
        );

}


.superadmin-card-glow {

    position: absolute;

    width: 180px;

    height: 180px;

    top: -100px;

    right: 80px;

    border-radius: 50%;

    background:
        rgba(
            139,
            92,
            246,
            0.12
        );

    filter: blur(5px);

    pointer-events: none;

}


.superadmin-card-icon {

    position: relative;

    z-index: 1;

    width: 65px;

    height: 65px;

    flex: 0 0 auto;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 18px;

    font-size: 30px;

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #8b5cf6
        );

    box-shadow:
        0 10px 25px
        rgba(
            124,
            58,
            237,
            0.25
        );

}


.superadmin-card-content {

    position: relative;

    z-index: 1;

    flex: 1;

    min-width: 0;

}


.superadmin-card-label {

    display: block;

    margin-bottom: 5px;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1.5px;

    color: #7c3aed;

}


.superadmin-card-content h3 {

    margin:
        0 0 6px;

    font-size: 21px;

    color: #4c1d95;

}


.superadmin-card-content p {

    max-width: 650px;

    margin:
        0 0 10px;

    font-size: 13px;

    line-height: 1.6;

    color: #6b7280;

}


.superadmin-card-status {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    font-size: 11px;

    font-weight: 800;

    color: #6d28d9;

}


.superadmin-status-dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow:
        0 0 0 4px
        rgba(
            34,
            197,
            94,
            0.12
        );

}


.superadmin-card-arrow {

    position: relative;

    z-index: 1;

    flex: 0 0 auto;

    font-size: 30px;

    font-weight: 900;

    color: #7c3aed;

    transition:
        transform 0.2s ease;

}


.superadmin-card:hover
.superadmin-card-arrow {

    transform:
        translateX(5px);

}


/* ==========================================================
SÉCURITÉ
========================================================== */

.profil-security-section {

    margin-bottom: 45px;

}


.profil-security-card {

    display: flex;

    align-items: center;

    gap: 16px;

    padding: 22px;

    border:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

    border-radius: 18px;

    background:
        var(
            --bg-card,
            #ffffff
        );

}


.profil-security-icon {

    width: 48px;

    height: 48px;

    flex: 0 0 auto;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 14px;

    background: #f1f5f9;

    font-size: 21px;

}


.profil-security-content h3 {

    margin:
        0 0 5px;

    font-size: 15px;

    color:
        var(
            --text-primary,
            #111827
        );

}


.profil-security-content p {

    margin: 0;

    font-size: 13px;

    line-height: 1.6;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


/* ==========================================================
MODIFICATION MOT DE PASSE
========================================================== */

.profil-password-card {

    margin-top: 18px;

    padding: 28px;

    border:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

    border-radius: 22px;

    background:
        var(
            --bg-card,
            #ffffff
        );

    box-shadow:
        0 10px 30px
        rgba(
            15,
            23,
            42,
            0.05
        );

}


.profil-password-header {

    margin-bottom: 0;

}


.profil-password-kicker {

    display: block;

    margin-bottom: 7px;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 1.3px;

    color: #0f766e;

}


.profil-password-header h3 {

    margin:
        0 0 7px;

    font-size: 21px;

    color:
        var(
            --text-primary,
            #111827
        );

}


.profil-password-header p {

    margin: 0;

    font-size: 14px;

    line-height: 1.6;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


/* ==========================================================
MESSAGE
========================================================== */

.password-message {

    display: none;

    margin-top: 22px;

    padding:
        13px 15px;

    border-radius: 12px;

    font-size: 13px;

    font-weight: 700;

}


.password-message.success {

    display: block;

    color: #166534;

    background: #dcfce7;

    border:
        1px solid
        #bbf7d0;

}


.password-message.error {

    display: block;

    color: #991b1b;

    background: #fee2e2;

    border:
        1px solid
        #fecaca;

}


/* ==========================================================
FORMULAIRE MOT DE PASSE
========================================================== */

.profil-password-form {

    max-width: 650px;

    margin-top: 25px;

}


.password-field {

    margin-bottom: 20px;

}


.password-field label {

    display: block;

    margin-bottom: 8px;

    font-size: 13px;

    font-weight: 800;

    color:
        var(
            --text-primary,
            #111827
        );

}


.password-input-wrapper {

    position: relative;

    display: flex;

    align-items: center;

}


.password-input-wrapper input {

    width: 100%;

    height: 48px;

    padding:
        0 48px 0 15px;

    border:
        1px solid
        var(
            --border-color,
            #d1d5db
        );

    border-radius: 12px;

    outline: none;

    font-family: inherit;

    font-size: 14px;

    color:
        var(
            --text-primary,
            #111827
        );

    background:
        var(
            --bg-primary,
            #ffffff
        );

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}


.password-input-wrapper input:focus {

    border-color: #14b8a6;

    box-shadow:
        0 0 0 3px
        rgba(
            20,
            184,
            166,
            0.12
        );

}


.password-toggle {

    position: absolute;

    right: 6px;

    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 0;

    border-radius: 9px;

    cursor: pointer;

    background: transparent;

    color: #64748b;

}


.password-toggle:hover {

    background: #f1f5f9;

    color: #0f766e;

}


.password-field small {

    display: block;

    margin-top: 6px;

    font-size: 12px;

    color:
        var(
            --text-secondary,
            #64748b
        );

}


.password-actions {

    display: flex;

    justify-content: flex-start;

    margin-top: 8px;

}


#btnModifierMotDePasse:disabled {

    cursor: not-allowed;

    opacity: 0.65;

    transform: none;

}


/* ==========================================================
FOOTER
========================================================== */

.profil-footer {

    padding:
        25px 20px;

    border-top:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

    background:
        var(
            --bg-card,
            #ffffff
        );

}


.profil-footer-inner {

    width: 100%;

    max-width: 1180px;

    margin: 0 auto;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    font-size: 13px;

}


.profil-footer-inner strong {

    color:
        var(
            --text-primary,
            #111827
        );

}


.profil-footer-inner span {

    color:
        var(
            --text-secondary,
            #64748b
        );

}


/* ==========================================================
RESPONSIVE TABLETTE
========================================================== */

@media (max-width: 900px) {


    .profil-info-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

    }


    .profil-menu-grid {

        grid-template-columns:
            1fr;

    }


    .profil-stats-grid {

        grid-template-columns:
            1fr;

    }

}


/* ==========================================================
RESPONSIVE MOBILE
========================================================== */

@media (max-width: 600px) {


    .profil-page {

        padding:
            30px 14px 60px;

    }


    .profil-main-card {

        padding: 22px;

        border-radius: 20px;

    }


    .profil-main-top {

        align-items: flex-start;

        gap: 16px;

    }


    .profil-avatar {

        width: 70px;

        height: 70px;

        font-size: 21px;

    }


    .profil-identity h2 {

        font-size: 22px;

    }


    .profil-info-grid {

        grid-template-columns:
            1fr;

    }


    .profil-actions {

        flex-direction: column;

    }


    .profil-btn {

        width: 100%;

    }


    .profil-menu-card {

        padding: 18px;

    }


    .superadmin-card {

        align-items: flex-start;

        padding: 20px;

    }


    .superadmin-card-icon {

        width: 52px;

        height: 52px;

        font-size: 24px;

    }


    .superadmin-card-content h3 {

        font-size: 18px;

    }


    .superadmin-card-arrow {

        display: none;

    }


    .profil-password-card {

        padding: 20px;

        border-radius: 18px;

    }


    .password-actions {

        width: 100%;

    }


    #btnModifierMotDePasse {

        width: 100%;

    }


    .profil-footer-inner {

        flex-direction: column;

        align-items: flex-start;

    }

}


/* ==========================================================
MODE SOMBRE
========================================================== */

html.dark .profil-page,
body.dark .profil-page {

    background: #0f172a;

}


html.dark .profil-page-header h1,
body.dark .profil-page-header h1,

html.dark .profil-section-heading h2,
body.dark .profil-section-heading h2,

html.dark .profil-identity h2,
body.dark .profil-identity h2,

html.dark .profil-info-item strong,
body.dark .profil-info-item strong,

html.dark .profil-stat-content strong,
body.dark .profil-stat-content strong,

html.dark .profil-menu-content h3,
body.dark .profil-menu-content h3,

html.dark .profil-security-content h3,
body.dark .profil-security-content h3,

html.dark .profil-password-header h3,
body.dark .profil-password-header h3,

html.dark .password-field label,
body.dark .password-field label {

    color: #f8fafc;

}


html.dark .profil-main-card,
body.dark .profil-main-card,

html.dark .profil-stat-card,
body.dark .profil-stat-card,

html.dark .profil-menu-card,
body.dark .profil-menu-card,

html.dark .profil-security-card,
body.dark .profil-security-card,

html.dark .profil-password-card,
body.dark .profil-password-card {

    background: #111827;

    border-color: #1f2937;

}


html.dark .profil-info-item,
body.dark .profil-info-item {

    background: #0f172a;

    border-color: #1f2937;

}


html.dark .profil-info-label,
body.dark .profil-info-label,

html.dark .profil-page-header p,
body.dark .profil-page-header p,

html.dark .profil-identity p,
body.dark .profil-identity p,

html.dark .profil-stat-content span,
body.dark .profil-stat-content span,

html.dark .profil-menu-content p,
body.dark .profil-menu-content p,

html.dark .profil-security-content p,
body.dark .profil-security-content p,

html.dark .profil-password-header p,
body.dark .profil-password-header p,

html.dark .password-field small,
body.dark .password-field small {

    color: #94a3b8;

}


html.dark .profil-footer,
body.dark .profil-footer {

    background: #111827;

    border-color: #1f2937;

}


html.dark .profil-footer-inner strong,
body.dark .profil-footer-inner strong {

    color: #f8fafc;

}


html.dark .profil-footer-inner span,
body.dark .profil-footer-inner span {

    color: #94a3b8;

}


/* ==========================================================
SUPERADMIN — DARK MODE
========================================================== */

html.dark .superadmin-card,
body.dark .superadmin-card {

    background:
        linear-gradient(
            135deg,
            #17122a,
            #1e1735,
            #19152d
        );

    border-color:
        rgba(
            139,
            92,
            246,
            0.35
        );

}


html.dark .superadmin-card-content h3,
body.dark .superadmin-card-content h3 {

    color: #ddd6fe;

}


html.dark .superadmin-card-content p,
body.dark .superadmin-card-content p {

    color: #a78bfa;

}


/* ==========================================================
DARK MODE — CHAMPS MOT DE PASSE
========================================================== */

html.dark .password-input-wrapper input,
body.dark .password-input-wrapper input {

    background: #0f172a;

    border-color: #334155;

    color: #f8fafc;

}


html.dark .password-toggle:hover,
body.dark .password-toggle:hover {

    background: #1e293b;

}


/* ==========================================================
ICÔNES DARK MODE
========================================================== */

html.dark .profil-stat-icon,
body.dark .profil-stat-icon,

html.dark .profil-menu-icon,
body.dark .profil-menu-icon,

html.dark .profil-security-icon,
body.dark .profil-security-icon {

    background: #1e293b;

}


/* ==========================================================
ACCESSIBILITÉ
========================================================== */

.profil-btn:focus-visible,
.profil-menu-card:focus-visible,
.superadmin-card:focus-visible,
.password-toggle:focus-visible {

    outline:
        3px solid
        rgba(
            20,
            184,
            166,
            0.35
        );

    outline-offset: 3px;

}


/* ==========================================================
RÉDUCTION ANIMATIONS
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .profil-btn,
    .profil-stat-card,
    .profil-menu-card,
    .superadmin-card,
    .superadmin-card-arrow {

        transition: none;

    }

}

/* ==========================================================
   KRILIH V7.2 — BOUTON SÉCURITÉ MOT DE PASSE
   ----------------------------------------------------------
   Couleur volontairement différente des actions orange/vert.
   ========================================================== */

#btnModifierMotDePasse {
    color: #ffffff !important;

    background:
        linear-gradient(
            135deg,
            #1e3a8a 0%,
            #2563eb 52%,
            #3b82f6 100%
        ) !important;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .28
        ) !important;

    box-shadow:
        0 10px 24px
        rgba(
            37,
            99,
            235,
            .28
        ),
        inset 0 1px 0
        rgba(
            255,
            255,
            255,
            .24
        ) !important;
}

#btnModifierMotDePasse:hover:not(:disabled) {
    background:
        linear-gradient(
            135deg,
            #172554 0%,
            #1d4ed8 52%,
            #2563eb 100%
        ) !important;

    box-shadow:
        0 14px 30px
        rgba(
            37,
            99,
            235,
            .36
        ),
        inset 0 1px 0
        rgba(
            255,
            255,
            255,
            .30
        ) !important;
}

#btnModifierMotDePasse:focus-visible {
    outline:
        3px solid
        rgba(
            59,
            130,
            246,
            .32
        );

    outline-offset: 3px;
}

#btnModifierMotDePasse:disabled {
    cursor: not-allowed;
    opacity: .58;
    transform: none;
    box-shadow: none !important;
}

