:root {
    color-scheme: light;
    --cp-navy: #142b3c;
    --cp-navy-dark: #0d1d2b;
    --cp-copper: #c28c62;
    --cp-ivory: #faf7f1;
    --cp-white: #ffffff;
    --cp-ink: #20303d;
    --cp-muted: #647482;
    --cp-border: #e2e5e7;
    --cp-danger: #a72f37;
    --cp-radius: 18px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--cp-ink);
    background: var(--cp-ivory);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.cp-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
}

.cp-auth__story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 50px;
    padding: clamp(32px, 6vw, 90px);
    overflow: hidden;
    background: linear-gradient(145deg, var(--cp-navy), var(--cp-navy-dark));
    color: var(--cp-white);
}

.cp-auth__story::after {
    content: "";
    position: absolute;
    width: 470px;
    height: 470px;
    right: -230px;
    bottom: -210px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    box-shadow: 0 0 0 65px rgba(255,255,255,.025),
                0 0 0 130px rgba(255,255,255,.018);
    pointer-events: none;
}

.cp-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -.6px;
}

.cp-brand__mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 12px;
    color: var(--cp-copper);
    font-size: 23px;
}

.cp-eyebrow {
    margin: 0 0 22px;
    color: #e6bb96;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.4px;
}

.cp-story-title {
    max-width: 600px;
    margin: 0;
    font-size: clamp(38px, 4.5vw, 70px);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -2.5px;
}

.cp-story-title span { color: #e4b68f; }

.cp-story-text {
    max-width: 490px;
    margin: 26px 0 0;
    color: #d1dce3;
    font-size: 16px;
    line-height: 1.85;
}

.cp-story-footer {
    position: relative;
    z-index: 1;
    color: #b6c7d1;
    font-size: 13px;
}

.cp-auth__form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px 35px;
}

.cp-panel {
    width: 100%;
    max-width: 430px;
}

.cp-panel__tag {
    color: #a16e48;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.cp-panel h1 {
    margin: 15px 0 12px;
    color: var(--cp-navy-dark);
    font-size: clamp(30px, 3vw, 39px);
    line-height: 1.2;
    letter-spacing: -1.2px;
}

.cp-panel__intro {
    margin: 0 0 35px;
    color: var(--cp-muted);
    font-size: 15px;
    line-height: 1.7;
}

.cp-field { margin-bottom: 22px; }

.cp-field label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 700;
}

.cp-field input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border: 1px solid var(--cp-border);
    border-radius: 11px;
    outline: none;
    background: var(--cp-white);
    color: var(--cp-ink);
    font: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.cp-field input:focus {
    border-color: var(--cp-navy);
    box-shadow: 0 0 0 3px rgba(20,43,60,.12);
}

.cp-field input[aria-invalid="true"] {
    border-color: var(--cp-danger);
}

.cp-field__error {
    margin: 7px 0 0;
    color: var(--cp-danger);
    font-size: 12px;
}

.cp-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 4px 0 28px;
    font-size: 13px;
}

.cp-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.cp-remember input { accent-color: var(--cp-navy); }

.cp-link {
    color: var(--cp-navy);
    font-weight: 700;
    text-decoration: none;
}

.cp-link:hover { text-decoration: underline; }

.cp-button {
    display: inline-flex;
    width: 100%;
    min-height: 53px;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border: 0;
    border-radius: 11px;
    background: var(--cp-navy);
    color: var(--cp-white);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.cp-button:hover { background: #23455d; }
.cp-button:active { transform: translateY(1px); }

.cp-alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    border-radius: 10px;
    background: #fff0f0;
    color: #8e2730;
    font-size: 13px;
    line-height: 1.6;
}

.cp-success {
    background: #eaf5ee;
    color: #24683e;
}

.cp-panel__footer {
    margin-top: 34px;
    color: var(--cp-muted);
    text-align: center;
    font-size: 12px;
    line-height: 1.7;
}

:focus-visible {
    outline: 3px solid var(--cp-copper);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .cp-auth { grid-template-columns: 1fr; }

    .cp-auth__story {
        min-height: 230px;
        gap: 28px;
        padding: 30px 28px;
    }

    .cp-story-title {
        font-size: clamp(29px, 7vw, 43px);
        letter-spacing: -1.3px;
    }

    .cp-story-text, .cp-story-footer { display: none; }

    .cp-auth__form-side { padding: 42px 25px 65px; }
}

@media (max-width: 480px) {
    .cp-auth__story { min-height: 205px; padding: 24px 21px; }
    .cp-brand { font-size: 19px; }
    .cp-auth__form-side { padding: 35px 20px 55px; }
    .cp-options { flex-wrap: wrap; }
    .cp-panel__intro { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
/* COLIS-02E5 — Illustration logistique France / Côte d'Ivoire */
.cp-auth__story {
    isolation: isolate;
    background-image:
        linear-gradient(
            90deg,
            rgba(9, 25, 39, .88) 0%,
            rgba(9, 25, 39, .68) 47%,
            rgba(9, 25, 39, .18) 100%
        ),
        url("../images/connexion-logistique.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.cp-auth__story::after {
    z-index: -1;
}

.cp-auth__story > * {
    position: relative;
    z-index: 1;
}

.cp-story-title {
    text-shadow: 0 2px 20px rgba(0, 0, 0, .25);
}

.cp-story-text {
    color: #f1f5f8;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}

@media (max-width: 900px) {
    .cp-auth__story {
        background-position: center 43%;
    }
}

@media (max-width: 480px) {
    .cp-auth__story {
        background-image:
            linear-gradient(
                90deg,
                rgba(9, 25, 39, .86),
                rgba(9, 25, 39, .48)
            ),
            url("../images/connexion-logistique.png");
    }
}
/* COLIS-02G — Bouton afficher / masquer le mot de passe */
.cp-password {
    position: relative;
}

.cp-password input {
    padding-right: 58px;
}

.cp-password__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #526575;
    cursor: pointer;
}

.cp-password__toggle:hover {
    background: rgba(20, 43, 60, .07);
    color: #142b3c;
}

.cp-password__toggle[aria-pressed="true"] {
    color: #a16e48;
}
/* COLIS-02H — Correction du bouton oeil */
.cp-field .cp-password {
    position: relative;
    display: block;
    width: 100%;
}

.cp-field .cp-password input {
    display: block;
    width: 100%;
    padding-right: 62px;
}

.cp-field .cp-password .cp-password__toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: #526575;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.cp-field .cp-password .cp-password__toggle:hover {
    background: rgba(20, 43, 60, .06);
    color: #142b3c;
}

.cp-field .cp-password .cp-password__toggle:focus-visible {
    outline: 2px solid #c28c62;
    outline-offset: 1px;
}

.cp-password__eye {
    display: block;
    width: 21px;
    height: 21px;
    pointer-events: none;
}
/* COLIS-02I — Oeil barre lorsque le mot de passe est visible */
.cp-password__toggle[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    width: 27px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(-43deg);
    pointer-events: none;
}