/* Montaris - Espace Pro */
:root {
    --mep-blue: #16263A;
    --mep-blue-soft: #233852;
    --mep-yellow: #F2C05C;
    --mep-bg: #F5F7F9;
    --mep-text: #16263A;
    --mep-muted: #667487;
    --mep-border: #E2E7EC;
    --mep-white: #FFFFFF;
}

/* Écran d'accès */
.mep-login-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 15%, rgba(242, 192, 92, .13), transparent 25rem),
        linear-gradient(145deg, #16263A 0%, #1B2E46 52%, #132235 100%);
    color: var(--mep-text);
    font-family: Montserrat, Arial, sans-serif;
}

.mep-login-page * {
    box-sizing: border-box;
}

.mep-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 36px 20px;
}

.mep-card {
    width: min(100%, 520px);
    background: rgba(255,255,255,.985);
    border-radius: 26px;
    padding: 44px 44px 38px;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    position: relative;
    overflow: hidden;
}

.mep-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--mep-yellow);
}

.mep-brand {
    min-height: 52px;
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.mep-logo {
    display: block;
    max-width: 180px;
    max-height: 58px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mep-wordmark {
    font-size: 25px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--mep-blue);
}

.mep-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(242, 192, 92, .18);
    color: #8A6418;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    margin-bottom: 16px;
}

.mep-card h1 {
    margin: 0;
    color: var(--mep-blue);
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 800;
}

.mep-intro {
    margin: 16px 0 30px;
    color: var(--mep-muted);
    font-size: 15px;
    line-height: 1.7;
}

.mep-form label {
    display: block;
    margin-bottom: 9px;
    color: var(--mep-blue);
    font-weight: 700;
    font-size: 13px;
}

.mep-password-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #D9E0E6;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.mep-password-wrap:focus-within {
    border-color: var(--mep-yellow);
    box-shadow: 0 0 0 4px rgba(242,192,92,.16);
}

.mep-password-wrap input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    padding: 15px 17px;
    font: inherit;
    font-size: 16px;
    color: var(--mep-blue);
    background: transparent;
}

.mep-password-wrap input::placeholder {
    color: #A5AFBA;
}

.mep-eye {
    width: 52px;
    border: 0;
    background: transparent;
    color: #7C8997;
    cursor: pointer;
    font-size: 18px;
}

.mep-submit {
    width: 100%;
    margin-top: 14px;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    padding: 14px 20px;
    background: var(--mep-yellow);
    color: var(--mep-blue);
    font: inherit;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.mep-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(242,192,92,.28);
    filter: brightness(1.02);
}

.mep-alert {
    border-radius: 12px;
    padding: 13px 14px;
    margin: -10px 0 18px;
    background: #FFF0F0;
    border: 1px solid #F0CACA;
    color: #9A2B2B;
    font-size: 13px;
    line-height: 1.5;
}

.mep-alert-warning {
    background: #FFF8E8;
    border-color: #F3D694;
    color: #74510C;
}

.mep-separator {
    height: 1px;
    background: var(--mep-border);
    margin: 28px 0 19px;
}

.mep-note {
    margin: 0;
    color: #7C8997;
    font-size: 11.5px;
    line-height: 1.65;
}

.mep-back {
    display: inline-block;
    margin-top: 22px;
    color: var(--mep-blue);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.mep-back:hover {
    text-decoration: underline;
}

/* Menu automatique de l'Espace Pro */
.mep-pro-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.mep-pro-card {
    display: grid;
    grid-template-columns: 54px 1fr 24px;
    align-items: center;
    gap: 16px;
    min-height: 108px;
    padding: 20px;
    border: 1px solid var(--mep-border);
    border-radius: 18px;
    background: #fff;
    text-decoration: none !important;
    box-shadow: 0 7px 24px rgba(22,38,58,.06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mep-pro-card:hover {
    transform: translateY(-2px);
    border-color: rgba(242,192,92,.75);
    box-shadow: 0 12px 32px rgba(22,38,58,.10);
}

.mep-pro-card-code {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--mep-blue);
    color: var(--mep-yellow);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .08em;
}

.mep-pro-card-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.mep-pro-card-content strong {
    color: var(--mep-blue);
    font-size: 15px;
    line-height: 1.3;
}

.mep-pro-card-content span {
    color: var(--mep-muted);
    font-size: 12px;
    line-height: 1.45;
}

.mep-pro-card-arrow {
    color: var(--mep-blue);
    font-size: 20px;
    font-weight: 600;
    transition: transform .18s ease;
}

.mep-pro-card:hover .mep-pro-card-arrow {
    transform: translateX(3px);
}

.mep-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--mep-blue);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease;
}

.mep-logout-button:hover {
    transform: translateY(-1px);
    background: var(--mep-blue-soft);
}

.mep-empty {
    color: var(--mep-muted);
}

@media (max-width: 767px) {
    .mep-shell {
        padding: 18px 14px;
    }

    .mep-card {
        border-radius: 22px;
        padding: 34px 25px 30px;
    }

    .mep-brand {
        margin-bottom: 24px;
    }

    .mep-logo {
        max-width: 155px;
    }

    .mep-pro-grid {
        grid-template-columns: 1fr;
    }

    .mep-pro-card {
        grid-template-columns: 48px 1fr 20px;
        gap: 13px;
        min-height: 96px;
        padding: 17px;
    }

    .mep-pro-card-code {
        width: 48px;
        height: 48px;
        border-radius: 13px;
    }
}


/* Accueil complet de l'Espace Pro */
.mep-home {
    width: 100%;
    font-family: Montserrat, Arial, sans-serif;
    color: var(--mep-text);
}

.mep-home-head {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 5vw, 54px);
    margin-bottom: 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 88% 20%, rgba(242,192,92,.16), transparent 18rem),
        var(--mep-blue);
    color: #fff;
}

.mep-home-head::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -80px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
}

.mep-home-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--mep-yellow);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .17em;
}

.mep-home-head h1 {
    margin: 0 0 14px !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: clamp(30px, 5vw, 46px) !important;
    line-height: 1.08 !important;
    font-weight: 800 !important;
    letter-spacing: -.035em;
}

.mep-home-head p {
    max-width: 720px;
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: 14px;
    line-height: 1.7;
}

.mep-home-menu {
    margin-top: 20px;
}

.mep-home-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--mep-border);
}

.mep-home-private {
    color: var(--mep-muted);
    font-size: 11.5px;
}

.mep-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--mep-border);
    border-radius: 999px;
    background: #fff;
    color: var(--mep-blue) !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    transition: transform .18s ease, border-color .18s ease;
}

.mep-back-button:hover {
    transform: translateY(-1px);
    border-color: var(--mep-yellow);
}

@media (max-width: 767px) {
    .mep-home-head {
        border-radius: 20px;
        padding: 30px 24px;
    }

    .mep-home-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
