/**
 * ============================================================================
 * COURSMARKETING.FR — HEADER GLOBAL
 * ============================================================================
 *
 * Maquette de référence :
 * header compact bleu marine, identité à gauche,
 * navigation fine et CTA KreaBoard compact.
 * ============================================================================
 */

.cm-site-header {
    position: relative;
    z-index: 1000;

    width: 100%;

    background: #031b3d;
}

.cm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(calc(100% - 40px), 1280px);
    height: 72px;

    margin: 0 auto;
}

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

.cm-brand {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    gap: 8px;

    color: #ffffff;
    text-decoration: none;
}

.cm-brand:hover,
.cm-brand:focus {
    color: #ffffff;
    text-decoration: none;
}

.cm-brand-logo {
    display: block;

    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    object-fit: contain;
}

.cm-brand-text {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.cm-brand-title {
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.cm-brand-subtitle {
    width: 245px;

    color: rgba(255, 255, 255, 0.68);

    font-size: 8px;
    font-weight: 400;
    line-height: 1.25;
}

/* ==========================================================================
   NAVIGATION DESKTOP
   ========================================================================== */

.cm-main-nav {
    display: flex;
    align-items: center;

    gap: 26px;
}

.cm-nav-link {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    color: rgba(255, 255, 255, 0.90);

    font-size: 11px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    white-space: nowrap;
}

.cm-nav-link:hover,
.cm-nav-link:focus {
    color: #ffffff;
    text-decoration: none;
}

.cm-nav-arrow {
    position: relative;
    top: -1px;

    font-size: 10px;
}

/* ==========================================================================
   RECHERCHE
   ========================================================================== */

.cm-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    margin: 0;
    padding: 0;

    border: 0 !important;
    outline: 0;

    background: transparent !important;
    color: #ffffff !important;

    box-shadow: none !important;

    cursor: pointer;
}

.cm-search svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: #ffffff;
    stroke-width: 1.7;
    stroke-linecap: round;
}

/* ==========================================================================
   CTA KREABOARD
   ========================================================================== */

.cm-kreaboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    height: 38px;

    padding: 0 16px;

    border-radius: 4px;

    background: #1268f5;
    color: #ffffff;

    font-size: 10px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    white-space: nowrap;
}

.cm-kreaboard:hover,
.cm-kreaboard:focus {
    background: #0d5fe8;

    color: #ffffff;
    text-decoration: none;
}

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

.cm-menu-toggle {
    display: none !important;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    gap: 4px;

    border: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}

.cm-menu-toggle span {
    display: block;

    width: 18px;
    height: 2px;

    border-radius: 2px;

    background: #ffffff;
}

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

.cm-mobile-menu[hidden] {
    display: none;
}

.cm-mobile-menu {
    padding: 12px 20px 18px;

    border-top: 1px solid rgba(255,255,255,.08);

    background: #031b3d;
}

.cm-mobile-menu a {
    display: flex;
    align-items: center;

    min-height: 42px;

    border-bottom: 1px solid rgba(255,255,255,.07);

    color: #ffffff;

    font-size: 13px;

    text-decoration: none;
}

.cm-mobile-kreaboard {
    justify-content: center;

    margin-top: 12px;

    border: 0 !important;
    border-radius: 5px;

    background: #1268f5;
}

/* ==========================================================================
   LAPTOP
   ========================================================================== */

@media (max-width: 1000px) {

    .cm-header-inner {
        width: calc(100% - 30px);
    }

    .cm-main-nav {
        gap: 15px;
    }

    .cm-brand-subtitle {
        display: none;
    }
}

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

@media (max-width: 820px) {

    .cm-main-nav {
        display: none;
    }

    .cm-menu-toggle {
        display: flex !important;
    }

    .cm-header-inner {
        height: 58px;
    }
}

@media (max-width: 480px) {

    .cm-header-inner {
        width: calc(100% - 24px);
    }

    .cm-brand-logo {
        width: 27px;
        height: 27px;

        flex-basis: 27px;
    }

    .cm-brand-title {
        font-size: 11px;
    }
}


/* ==========================================================================
   HEADER — LISIBILITÉ DESKTOP / LAPTOP
   ==========================================================================

   Agrandissement réservé aux écrans à partir de 1025 px.

   Les comportements tablette et mobile restent gérés par les règles
   existantes du header.
   ========================================================================== */

@media (min-width: 1025px) {

    .cm-header-inner {
        height: 82px;
    }

    .cm-brand {
        gap: 10px;
    }

    .cm-brand-logo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .cm-brand-text {
        gap: 4px;
    }

    .cm-brand-title {
        font-size: 18px;
        line-height: 1.05;
    }

    .cm-brand-subtitle {
        width: 310px;

        font-size: 11px;
        line-height: 1.3;
    }

    .cm-brand-subtitle > span {
        display: block;
    }

    .cm-main-nav {
        gap: 28px;
    }

    .cm-nav-link {
        gap: 5px;

        font-size: 13px;
        line-height: 1;
    }

    .cm-nav-arrow {
        font-size: 11px;
    }

    .cm-search {
        width: 34px;
        height: 34px;
    }

    .cm-search svg {
        width: 19px;
        height: 19px;
    }

    .cm-kreaboard {
        gap: 8px;

        height: 42px;
        padding: 0 18px;

        font-size: 12px;
    }
}
