
/* ==========================================================
   KRILIH.MA
   css/header.css
   HEADER V22
   Header vertical premium
========================================================== */


/* ==========================================================
   RESET LOCAL
========================================================== */

.krilih-header,
.krilih-header * {
    box-sizing: border-box;
}


/* ==========================================================
   VARIABLES
========================================================== */

.krilih-header {

    --green-dark: #123c2b;
    --green: #16804b;
    --green-light: #eaf8f0;

    --orange: #f97316;
    --orange-light: #fff3e8;

    --white: #ffffff;
    --background: #f5f7f6;

    --text: #24332b;
    --muted: #718078;

    --border: #e3e9e5;

    --shadow:
        0 15px 40px rgba(18, 60, 43, .10);

    --sidebar-width: 255px;

    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;

    position: relative;

    z-index: 1000;
}


/* ==========================================================
   HEADER GLOBAL
========================================================== */

.krilih-header {
    min-height: 80px;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.header-sidebar {

    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f9fcfa 100%
        );

    border-right:
        1px solid var(--border);

    box-shadow:
        10px 0 35px rgba(18, 60, 43, .07);

    display: flex;

    flex-direction: column;

    z-index: 3000;

    overflow: visible;
}


/* ==========================================================
   LOGO
========================================================== */

.header-logo {

    height: 90px;

    display: flex;

    align-items: center;

    padding:
        0 24px;

    border-bottom:
        1px solid var(--border);
}


.header-logo-link {

    display: flex;

    align-items: center;

    gap: 11px;

    color: var(--green-dark);

    text-decoration: none;
}


.header-logo-mark {

    width: 43px;
    height: 43px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 13px;

    color: white;

    font-size: 20px;
    font-weight: 900;

    background:
        linear-gradient(
            135deg,
            var(--green),
            #20a864
        );

    box-shadow:
        0 8px 18px rgba(22, 128, 75, .25);
}


.header-logo-text {

    font-size: 23px;

    font-weight: 900;

    letter-spacing: -1px;
}


/* ==========================================================
   NAV
========================================================== */

.header-main-nav {

    padding:
        18px 13px;

    display: flex;

    flex-direction: column;

    gap: 6px;
}


/* ==========================================================
   NAV LINK
========================================================== */

.header-nav-link {

    position: relative;

    width: 100%;

    min-height: 48px;

    padding:
        0 15px;

    display: flex;

    align-items: center;

    gap: 12px;

    border: 0;

    border-radius: 12px;

    background: transparent;

    color: var(--text);

    font-size: 13px;

    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform .18s ease,
        background .18s ease,
        color .18s ease,
        box-shadow .18s ease;
}


.header-nav-link:hover {

    color: var(--green);

    background:
        var(--green-light);

    transform:
        translateX(3px);
}


.header-nav-link:active {

    transform:
        translateX(3px)
        scale(.98);
}


.header-nav-icon {

    position: relative;

    width: 25px;

    height: 25px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--green);

    font-size: 16px;
}


/* ==========================================================
   PUBLISH
========================================================== */

.header-publish-link {

    margin-top: 7px;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--orange),
            #fb8a32
        );

    box-shadow:
        0 8px 20px rgba(249, 115, 22, .20);
}


.header-publish-link:hover {

    color: white;

    background:
        linear-gradient(
            135deg,
            #ea6208,
            var(--orange)
        );

    transform:
        translateX(3px);
}


/* ==========================================================
   CHEVRON
========================================================== */

.header-chevron {

    margin-left: auto;

    font-size: 10px;

    transition:
        transform .2s ease;
}


/* ==========================================================
   CATÉGORIES
========================================================== */

.header-categories-wrapper {

    position: relative;
}


.header-category-button {

    font-family: inherit;

    text-align: left;
}


.header-categories-wrapper:has(
    .header-category-nav.open
) .header-chevron {

    transform:
        rotate(90deg);
}


/* ==========================================================
   CATEGORY DROPDOWN
========================================================== */

.header-category-nav {

    position: absolute;

    left: calc(
        100% + 10px
    );

    top: 0;

    width: 245px;

    max-height: 70vh;

    overflow-y: auto;

    padding: 10px;

    background:
        #ffffff;

    border:
        1px solid var(--border);

    border-radius: 16px;

    box-shadow:
        0 25px 60px rgba(18, 60, 43, .16);

    opacity: 0;

    visibility: hidden;

    transform:
        translateX(-8px)
        scale(.98);

    transform-origin:
        left top;

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;

    z-index: 5000;
}


.header-category-nav.open {

    opacity: 1;

    visibility: visible;

    transform:
        translateX(0)
        scale(1);
}


.header-category-title {

    padding:
        10px 12px 13px;

    border-bottom:
        1px solid var(--border);

    color: var(--green-dark);

    font-size: 12px;

    font-weight: 900;

    text-transform: uppercase;

    letter-spacing: .5px;
}


.dynamic-categories {

    display: flex;

    flex-direction: column;

    gap: 3px;

    padding-top: 7px;
}


.dynamic-categories > a {

    min-height: 42px;

    padding:
        0 11px;

    display: flex;

    align-items: center;

    gap: 10px;

    border-radius: 10px;

    color: var(--text);

    text-decoration: none;

    font-size: 12px;

    font-weight: 650;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}


.dynamic-categories > a i {

    width: 20px;

    text-align: center;

    color: var(--green);

    font-size: 14px;
}


.dynamic-categories > a:hover {

    color: var(--orange);

    background:
        var(--orange-light);

    transform:
        translateX(3px);
}


.header-category-loading {

    padding: 15px;

    color: var(--muted);

    font-size: 12px;

    text-align: center;
}


/* ==========================================================
   SIDEBAR BOTTOM
========================================================== */

.header-sidebar-bottom {

    margin-top: auto;

    padding:
        12px;

    display: flex;

    flex-direction: column;

    gap: 5px;

    border-top:
        1px solid var(--border);
}


/* ==========================================================
   BADGE
========================================================== */

.header-badge {

    position: absolute;

    top: -6px;
    right: -7px;

    min-width: 17px;
    height: 17px;

    padding: 0 5px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background:
        var(--orange);

    color: white;

    font-size: 9px;

    font-weight: 900;

    border:
        2px solid white;

    box-shadow:
        0 3px 8px rgba(249, 115, 22, .25);
}


/* ==========================================================
   NOTIFICATIONS
========================================================== */

.header-notifications {

    position: relative;
}


.header-notification-button {

    font-family: inherit;

    text-align: left;
}


.header-notifications.open
.header-chevron {

    transform:
        rotate(90deg);
}


.header-notifications-dropdown {

    position: absolute;

    left: calc(
        100% + 10px
    );

    bottom: 0;

    width: 350px;

    background:
        #ffffff;

    border:
        1px solid var(--border);

    border-radius: 17px;

    box-shadow:
        0 25px 60px rgba(18, 60, 43, .17);

    opacity: 0;

    visibility: hidden;

    transform:
        translateX(-8px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;

    overflow: hidden;

    z-index: 6000;
}


.header-notifications.open
.header-notifications-dropdown {

    opacity: 1;

    visibility: visible;

    transform:
        translateX(0);
}


.header-notifications-head {

    height: 55px;

    padding:
        0 15px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid var(--border);
}


.header-notifications-head strong {

    color: var(--green-dark);

    font-size: 13px;
}


.header-notifications-head button {

    border: 0;

    background: transparent;

    color: var(--orange);

    font-size: 11px;

    font-weight: 800;

    cursor: pointer;
}


.header-notifications-list {

    max-height: 360px;

    overflow-y: auto;
}


.header-notification-item {

    display: flex;

    gap: 11px;

    padding:
        13px 15px;

    border-bottom:
        1px solid #eef2ef;

    transition:
        background .18s ease;
}


.header-notification-item:hover {

    background:
        #f8fbf9;
}


.header-notification-item.unread {

    background:
        #f1faf5;
}


.header-notification-icon {

    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        var(--green-light);

    color: var(--green);

    font-size: 13px;
}


.header-notification-content {

    min-width: 0;
}


.header-notification-content strong {

    display: block;

    color: var(--text);

    font-size: 11px;
}


.header-notification-content p {

    margin:
        4px 0;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.4;
}


.header-notification-content small {

    color: #9aa59f;

    font-size: 9px;
}


.notifications-loading {

    padding: 25px 15px;

    color: var(--muted);

    text-align: center;

    font-size: 11px;
}


.header-notifications-footer {

    display: block;

    padding: 13px;

    color: var(--green);

    background: #fafcfb;

    border-top:
        1px solid var(--border);

    text-align: center;

    font-size: 11px;

    font-weight: 800;

    text-decoration: none;
}


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

.header-user-menu {

    position: relative;
}


.header-user-button {

    width: 100%;

    min-height: 52px;

    padding:
        6px 10px;

    display: flex;

    align-items: center;

    gap: 10px;

    border:
        1px solid var(--border);

    border-radius: 13px;

    background:
        #ffffff;

    color: var(--text);

    cursor: pointer;

    font-family: inherit;

    transition:
        border .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}


.header-user-button:hover {

    border-color:
        #cbd8d0;

    background:
        #f9fcfa;

    box-shadow:
        0 5px 15px rgba(18, 60, 43, .06);
}


.header-user-avatar {

    width: 35px;
    height: 35px;

    flex: 0 0 35px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        var(--green-light);

    color: var(--green);
}


.header-user-name {

    flex: 1;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    text-align: left;

    font-size: 11px;

    font-weight: 800;
}


.header-user-chevron {

    font-size: 9px;

    color: var(--muted);

    transition:
        transform .2s ease;
}


.header-user-menu.open
.header-user-chevron {

    transform:
        rotate(90deg);
}


/* ==========================================================
   USER DROPDOWN
========================================================== */

.header-user-dropdown {

    position: absolute;

    left: calc(
        100% + 10px
    );

    bottom: 0;

    width: 245px;

    padding:
        8px 0;

    background:
        #ffffff;

    border:
        1px solid var(--border);

    border-radius: 16px;

    box-shadow:
        0 25px 60px rgba(18, 60, 43, .17);

    opacity: 0;

    visibility: hidden;

    transform:
        translateX(-8px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;

    overflow: hidden;

    z-index: 6000;
}


.header-user-menu.open
.header-user-dropdown {

    opacity: 1;

    visibility: visible;

    transform:
        translateX(0);
}


.dropdown-header {

    padding:
        13px 16px;

    border-bottom:
        1px solid var(--border);
}


.dropdown-header strong {

    display: block;

    color: var(--green-dark);

    font-size: 12px;
}


.dropdown-header span {

    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 10px;
}


.header-dropdown-link {

    width: 100%;

    min-height: 43px;

    padding:
        0 16px;

    display: flex;

    align-items: center;

    gap: 10px;

    border: 0;

    background: transparent;

    color: #66736a;

    font-family: inherit;

    font-size: 11px;

    font-weight: 700;

    text-decoration: none;

    text-align: left;

    cursor: pointer;

    transition:
        background .18s ease,
        color .18s ease;
}


.header-dropdown-link:hover {

    background:
        var(--orange-light);

    color:
        var(--orange);
}


.header-dropdown-link i {

    width: 18px;

    text-align: center;
}


.logout-btn {

    border-top:
        1px solid var(--border);
}


/* ==========================================================
   TOPBAR
========================================================== */

.header-topbar {

    position: fixed;

    top: 0;

    left: var(--sidebar-width);

    right: 0;

    height: 80px;

    padding:
        0 28px;

    display: flex;

    align-items: center;

    gap: 20px;

    background:
        rgba(255,255,255,.97);

    border-bottom:
        1px solid var(--border);

    box-shadow:
        0 5px 25px rgba(18,60,43,.04);

    z-index: 2000;

    backdrop-filter:
        blur(15px);
}


/* ==========================================================
   SEARCH
========================================================== */

.header-search {

    width: min(
        680px,
        100%
    );

    height: 47px;

    display: flex;

    align-items: center;

    border:
        1px solid #dfe7e2;

    border-radius: 14px;

    background:
        #f8faf9;

    overflow: hidden;

    transition:
        border .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.header-search:focus-within {

    border-color:
        var(--green);

    background:
        white;

    box-shadow:
        0 0 0 4px rgba(22,128,75,.08);
}


.header-search-icon {

    width: 47px;

    display: flex;

    align-items: center;
    justify-content: center;

    color:
        var(--muted);

    font-size: 14px;
}


.header-search input {

    flex: 1;

    min-width: 0;

    height: 100%;

    border: 0;

    outline: 0;

    background: transparent;

    color: var(--text);

    font-family: inherit;

    font-size: 13px;
}


.header-search input::placeholder {

    color:
        #9aa59f;
}


.header-search-button {

    width: 43px;
    height: 43px;

    margin-right: 2px;

    border: 0;

    border-radius: 11px;

    color: white;

    background:
        var(--green);

    cursor: pointer;

    transition:
        background .18s ease,
        transform .18s ease;
}


.header-search-button:hover {

    background:
        var(--orange);

    transform:
        scale(.95);
}


/* ==========================================================
   TOP ACTION
========================================================== */

.header-top-actions {

    margin-left: auto;

    display: flex;

    align-items: center;
}


.header-top-publish {

    min-height: 43px;

    padding:
        0 17px;

    display: flex;

    align-items: center;

    gap: 8px;

    border-radius: 12px;

    color: white;

    background:
        var(--orange);

    text-decoration: none;

    font-size: 11px;

    font-weight: 800;

    box-shadow:
        0 8px 18px rgba(249,115,22,.16);

    transition:
        transform .18s ease,
        background .18s ease;
}


.header-top-publish:hover {

    background:
        #e9670b;

    transform:
        translateY(-2px);
}


/* ==========================================================
   MOBILE TOGGLE
========================================================== */

.header-mobile-toggle {

    display: none;

    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: white;

    color: var(--green-dark);

    cursor: pointer;

    font-size: 17px;
}


/* ==========================================================
   MOBILE OVERLAY
========================================================== */

.header-mobile-overlay {

    position: fixed;

    inset: 0;

    background:
        rgba(8, 24, 17, .48);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .25s ease,
        visibility .25s ease;

    z-index: 2500;
}


.header-mobile-overlay.mobile-visible {

    opacity: 1;

    visibility: visible;
}


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

@media (max-width: 1050px) {

    .header-sidebar {

        width: 220px;
    }


    .header-topbar {

        left: 220px;
    }


    .header-top-publish span {

        display: none;
    }

}


@media (max-width: 850px) {

    .header-sidebar {

        width: 275px;

        transform:
            translateX(-100%);

        transition:
            transform .25s ease;

        box-shadow:
            15px 0 45px rgba(0,0,0,.16);
    }


    .header-sidebar.mobile-open {

        transform:
            translateX(0);
    }


    .header-topbar {

        left: 0;

        height: 70px;

        padding:
            0 13px;

        gap: 10px;
    }


    .header-mobile-toggle {

        display: flex;

        align-items: center;

        justify-content: center;
    }


    .header-search {

        height: 43px;
    }


    .header-top-actions {

        display: none;
    }


    .header-category-nav,
    .header-notifications-dropdown,
    .header-user-dropdown {

        position: fixed;

        left: 275px;

        top: 50%;

        bottom: auto;

        transform:
            translateY(-50%)
            translateX(-8px);

        max-width:
            calc(100vw - 290px);
    }


    .header-category-nav.open,
    .header-notifications.open
    .header-notifications-dropdown,
    .header-user-menu.open
    .header-user-dropdown {

        transform:
            translateY(-50%)
            translateX(0);
    }

}


@media (max-width: 600px) {

    .header-sidebar {

        width: min(
            300px,
            86vw
        );
    }


    .header-category-nav,
    .header-notifications-dropdown,
    .header-user-dropdown {

        left:
            min(
                300px,
                86vw
            );

        width:
            calc(
                100vw -
                min(300px, 86vw) -
                15px
            );

        max-width:
            none;
    }


    .header-search-icon {

        width: 38px;
    }


    .header-search-button {

        width: 38px;
        height: 38px;
    }

}


/* ==========================================================
   PAGE OFFSET
   IMPORTANT :
   Le contenu de la page ne passe jamais derrière le header
========================================================== */

body {

    margin: 0;
}


@media (min-width: 851px) {

    body {

        padding-left:
            var(--krilih-sidebar-width, 255px);
    }

}


@media (max-width: 850px) {

    body {

        padding-top:
            70px;
    }

}


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

.header-sidebar,
.header-topbar,
.header-category-nav,
.header-notifications-dropdown,
.header-user-dropdown {

    isolation: isolate;
}


/* ==========================================================
   SCROLLBAR
========================================================== */

.header-category-nav::-webkit-scrollbar,
.header-notifications-list::-webkit-scrollbar {

    width: 5px;
}


.header-category-nav::-webkit-scrollbar-thumb,
.header-notifications-list::-webkit-scrollbar-thumb {

    background:
        #cbd8d0;

    border-radius: 20px;
}
/* ==========================================================
   KRILIH — ÉLÉMENTS RÉSERVÉS AUX UTILISATEURS CONNECTÉS
   ========================================================== */

.header-auth-only[hidden] {
    display: none !important;
}





/* ==========================================================
   KRILIH — CORRECTION BOUTON RECHERCHER
   Contraste permanent + effet Liquid
   ========================================================== */

button[type="submit"],
.btn-search,
.search-btn,
.btn-rechercher,
button.search,
.search-form button {
    position: relative;
    z-index: 2;

    /* Fond visible même sans hover */
    background: linear-gradient(
        135deg,
        rgba(255, 140, 0, 0.95),
        rgba(255, 105, 0, 0.90)
    ) !important;

    /* Texte toujours visible */
    color: #ffffff !important;

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

    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.35);

    box-shadow:
        0 8px 20px rgba(255, 115, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.45),
        inset 0 -2px 5px rgba(120, 45, 0, 0.18);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    opacity: 1 !important;
    visibility: visible !important;
}

/* Reflet Liquid */
button[type="submit"]::before,
.btn-search::before,
.search-btn::before,
.btn-rechercher::before,
button.search::before,
.search-form button::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;

    background: linear-gradient(
        120deg,
        rgba(255,255,255,0.35),
        transparent 35%,
        transparent 70%,
        rgba(255,255,255,0.12)
    );

    pointer-events: none;
}

/* Hover */
button[type="submit"]:hover,
.btn-search:hover,
.search-btn:hover,
.btn-rechercher:hover,
button.search:hover,
.search-form button:hover {
    background: linear-gradient(
        135deg,
        #ff9d24,
        #ff6a00
    ) !important;

    color: #ffffff !important;

    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(255, 115, 0, 0.40),
        0 0 18px rgba(255, 145, 0, 0.25),
        inset 0 1px 2px rgba(255,255,255,0.55);

    filter: brightness(1.08);
}

/* Clic */
button[type="submit"]:active,
.btn-search:active,
.search-btn:active,
.btn-rechercher:active,
button.search:active,
.search-form button:active {
    transform: translateY(1px) scale(0.97);

    box-shadow:
        0 4px 10px rgba(255, 115, 0, 0.25),
        inset 0 3px 6px rgba(0,0,0,0.18);
}











/* ==========================================================
   KRILIH.MA
   LOGO HEADER — LIQUID ENERGY BACKGROUND
   Même identité visuelle que les cartes
   ========================================================== */

.header-logo,
.logo,
.site-logo,
.brand-logo {

    position: relative;

    isolation: isolate;

    overflow: hidden;

    /* fond animé vert + orange */
    background:
        linear-gradient(
            135deg,
            rgba(15,118,110,.18),
            rgba(20,184,166,.12),
            rgba(245,158,11,.16),
            rgba(15,118,110,.18)
        );

    background-size: 300% 300%;

    border:
        1px solid rgba(255,255,255,.16);

    border-radius: 14px;

    padding: 7px 12px;

    box-shadow:

        0 8px 25px
        rgba(15,118,110,.12),

        inset 0 1px 0
        rgba(255,255,255,.18);

    backdrop-filter:
        blur(14px)
        saturate(140%);

    -webkit-backdrop-filter:
        blur(14px)
        saturate(140%);

    animation:
        krilihLogoBackground 5s ease-in-out infinite,
        krilihLogoPulse 3.5s ease-in-out infinite;

    transition:
        transform .35s cubic-bezier(.2,.8,.2,1),
        box-shadow .35s ease,
        border-color .35s ease;

}


/* ==========================================================
   LUMIÈRE ANIMÉE DERRIÈRE LE LOGO
========================================================== */

.header-logo::before,
.logo::before,
.site-logo::before,
.brand-logo::before {

    content: "";

    position: absolute;

    z-index: -2;

    inset: -30%;

    border-radius: inherit;

    background:
        conic-gradient(
            from 0deg,
            rgba(20,184,166,0),
            rgba(20,184,166,.75),
            rgba(255,255,255,.30),
            rgba(245,158,11,.80),
            rgba(251,191,36,.35),
            rgba(20,184,166,.75),
            rgba(20,184,166,0)
        );

    filter:
        blur(14px);

    opacity: .65;

    animation:
        krilihLogoRotate 6s linear infinite;

}


/* ==========================================================
   REFLET LIQUIDE QUI TRAVERSE LE LOGO
========================================================== */

.header-logo::after,
.logo::after,
.site-logo::after,
.brand-logo::after {

    content: "";

    position: absolute;

    z-index: 5;

    top: -100%;

    left: -45%;

    width: 30%;

    height: 300%;

    transform:
        rotate(25deg)
        translateX(-220%);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.08),
            rgba(255,255,255,.70),
            rgba(255,255,255,.10),
            transparent
        );

    filter:
        blur(4px);

    pointer-events: none;

    animation:
        krilihLogoReflection 4.5s
        cubic-bezier(.16,1,.3,1)
        infinite;

}


/* ==========================================================
   ANIMATION DU BACKGROUND
========================================================== */

@keyframes krilihLogoBackground {

    0% {

        background-position:
            0% 50%;

    }

    25% {

        background-position:
            100% 20%;

    }

    50% {

        background-position:
            100% 80%;

    }

    75% {

        background-position:
            20% 100%;

    }

    100% {

        background-position:
            0% 50%;

    }

}


/* ==========================================================
   ROTATION DU HALO
========================================================== */

@keyframes krilihLogoRotate {

    from {

        transform:
            rotate(0deg);

    }

    to {

        transform:
            rotate(360deg);

    }

}


/* ==========================================================
   REFLET LIQUIDE
========================================================== */

@keyframes krilihLogoReflection {

    0% {

        transform:
            rotate(25deg)
            translateX(-260%);

        opacity: 0;

    }

    15% {

        opacity: 1;

    }

    45% {

        opacity: 1;

    }

    65% {

        opacity: .8;

    }

    100% {

        transform:
            rotate(25deg)
            translateX(650%);

        opacity: 0;

    }

}


/* ==========================================================
   RESPIRATION LUMINEUSE
========================================================== */

@keyframes krilihLogoPulse {

    0%,
    100% {

        box-shadow:

            0 8px 25px
            rgba(15,118,110,.12),

            inset 0 1px 0
            rgba(255,255,255,.18);

    }

    50% {

        box-shadow:

            0 10px 32px
            rgba(15,118,110,.20),

            0 0 18px
            rgba(20,184,166,.12),

            0 0 10px
            rgba(245,158,11,.07),

            inset 0 1px 0
            rgba(255,255,255,.25);

    }

}


/* ==========================================================
   HOVER
========================================================== */

.header-logo:hover,
.logo:hover,
.site-logo:hover,
.brand-logo:hover {

    transform:
        translateY(-2px)
        scale(1.025);

    border-color:
        rgba(255,255,255,.30);

    box-shadow:

        0 14px 35px
        rgba(15,118,110,.22),

        0 0 25px
        rgba(20,184,166,.14),

        0 0 18px
        rgba(245,158,11,.10),

        inset 0 1px 0
        rgba(255,255,255,.30);

}


/* ==========================================================
   DARK MODE
========================================================== */

[data-theme="dark"] .header-logo,
[data-theme="dark"] .logo,
[data-theme="dark"] .site-logo,
[data-theme="dark"] .brand-logo {

    background:
        linear-gradient(
            135deg,
            rgba(15,118,110,.20),
            rgba(20,184,166,.10),
            rgba(245,158,11,.14),
            rgba(5,20,18,.55)
        );

    border-color:
        rgba(255,255,255,.13);

    box-shadow:

        0 10px 30px
        rgba(0,0,0,.35),

        inset 0 1px 0
        rgba(255,255,255,.14);

}


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

@media (max-width: 600px) {

    .header-logo,
    .logo,
    .site-logo,
    .brand-logo {

        padding:
            6px 9px;

        border-radius:
            11px;

    }

}


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

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

    .header-logo,
    .logo,
    .site-logo,
    .brand-logo {

        animation: none;

    }

    .header-logo::before,
    .header-logo::after,
    .logo::before,
    .logo::after,
    .site-logo::before,
    .site-logo::after,
    .brand-logo::before,
    .brand-logo::after {

        animation: none;

    }

}
/* ==========================================================
   I18N / LANGUE V5
========================================================== */
.header-language-switcher { padding: 10px 12px; display: grid; gap: 6px; }
.header-language-switcher label { font-size: 12px; opacity: .72; }
.header-language-switcher select { width: 100%; min-height: 38px; border: 1px solid var(--border, #e3e9e5); border-radius: 12px; background: rgba(255,255,255,.82); color: var(--text, #24332b); padding: 0 10px; font: inherit; }
html[dir="rtl"] .krilih-header { direction: rtl; }
html[dir="rtl"] .header-category-nav,
html[dir="rtl"] .header-notifications-dropdown,
html[dir="rtl"] .header-user-dropdown { direction: rtl; }


/* ==========================================================
   KRILIH.MA — V6.1
   ALIGNEMENT SIDEBAR / CONTENU ENTRE 851px ET 1050px
   ========================================================== */

@media (min-width: 851px) and (max-width: 1050px) {
    body {
        padding-left: 220px;
    }
}


/* ==========================================================
   KRILIH V7.1 — LOGO HEADER COMPACT
   ----------------------------------------------------------
   Taille réduite pour éviter un logo trop imposant
   et améliorer l'équilibre de la sidebar.
   ========================================================== */

.header-logo {
    height: 76px;
    min-height: 76px;
    padding: 6px 15px;
    border-radius: 0 0 14px 14px;
}

.header-logo-link {
    gap: 9px;
    width: fit-content;
    max-width: 100%;
}

.header-logo-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    font-size: 17px;
}

.header-logo-text {
    font-size: 20px;
    letter-spacing: -.7px;
    line-height: 1;
}

@media (max-width: 1050px) and (min-width: 851px) {

    .header-logo {
        height: 72px;
        min-height: 72px;
        padding-left: 13px;
        padding-right: 13px;
    }

    .header-logo-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 16px;
    }

    .header-logo-text {
        font-size: 19px;
    }

}

@media (max-width: 850px) {

    .header-logo {
        height: 72px;
        min-height: 72px;
    }

}

