/* Thème ECT personnalisé avec couleurs dynamiques */
:root {
    /* Couleurs par défaut (seront remplacées dynamiquement par JavaScript) */
    --color-primary: #14487e;
    --color-secondary: #2ac0ff;
    --color-secondary-light: #6dd3ff;
    --color-danger: #db3552;
    --color-success: #38be68;
    --color-warning: #f46441;
    
    /* Alias pour compatibilité */
    --color1: var(--color-primary);
    --color2: var(--color-secondary);
    --color2-light: var(--color-secondary-light);
    --color3: var(--color-warning);
    --color4: var(--color-success);
    --color5: var(--color-danger);
    
    font-size: 16px;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Roboto Condensed', sans-serif;
}

html, body {
    height: 100%;
    line-height: normal;
}

.form-control {
    height: auto;
}

.login-pf body {
    background: var(--color-secondary);
}

@font-face {
    font-family: 'LineariconsNG_v1_7';
    src: url('../fonts/LineariconsNG_v1_7.eot?e2w23n');
    src: url('../fonts/LineariconsNG_v1_7.eot?e2w23n#iefix') format('embedded-opentype'),
    url('../fonts/LineariconsNG_v1_7.ttf?e2w23n') format('truetype'),
    url('../fonts/LineariconsNG_v1_7.woff?e2w23n') format('woff'),
    url('../fonts/LineariconsNG_v1_7.svg?e2w23n#LineariconsNG_v1_7') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="icon-"], [class*=" icon-"] {
    font-family: 'LineariconsNG_v1_7' !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

li {
    margin-bottom: 2px;
}

#kc-content {
    background: #FFF;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.zocial, a.zocial {
    text-shadow: none;
    background-image: none;
    border: none;
}

.zocial:hover, .zocial:active, .zocial:focus {
    outline: none;
    background-image: none;
    background-color: var(--color-secondary);
    box-shadow: none;
    color: var(--color-secondary);
}

#kc-content-logo {
    text-align: center;
}

.logo {
    width: 100%;
    max-width: 200px;
    height: 80px;
    margin: 2rem auto;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

#kc-content-logo img {
    max-width: 60%;
    max-height: 320px;
    margin: 5% 0 5%;
}

#kc-form-login, #kc-update-profile-form {
    display: flex;
    flex-direction: column;
}

#kc-form-wrapper {
    border: none;
    margin-bottom: 30px;
}

.libelle {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.libelle-instruction {
    font-size: 0.9rem;
    font-weight: 300;
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.input-group-stacked {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
}

.input-stacked-top .login-input {
    border-bottom: 1px solid #d0d0d0;
    border-radius: 4px 4px 0 0;
}

.input-stacked-middle .login-input {
    border-bottom: 1px solid #d0d0d0;
}

.input-stacked-bottom .login-input {
    border-radius: 0 0 4px 4px;
}

.login-input {
    border: none;
    width: 100%;
    padding: 1rem;
    outline: none;
    font-size: 1rem;
    background-color: #FFF;
    background-image: linear-gradient(to right, var(--color-secondary) 75%, var(--color-secondary) 75%);
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 0 2px;
    transition: background-size ease 0.2s, border ease 0.2s, box-shadow ease 0.2s;
    color: var(--color-primary);
    box-shadow: none !important;
    box-sizing: border-box;
}

.login-input:focus {
    background-size: 100% 2px;
    box-shadow: 0 0 0 2px rgba(42,192,255,0.2);
}

input[type=text].is-alert,
input[type=password].is-alert {
    border-color: red;
    background-image: linear-gradient(to right, red 75%, red 75%);
}

.login-pf-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.login-pf-page .login-pf-social-link a {
    line-height: 35px;
    border-radius: 50%;
    padding: 0.5rem 0rem 0.5rem 0.5rem;
    margin-right: 5px;
}

.login-pf-main {
    display: flex;
    flex-direction: row;
    flex: 1;
}

.login-pf-accounts {
    padding: 0 3rem 3rem;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.zocial:before {
    line-height: 35px;
    border-radius: 12px;
    float: none;
}

#kc-social-providers li:first-of-type,
#kc-social-providers li {
    margin-right: 3px;
    margin-bottom: 10px;
}

#kc-form-buttons {
    display: flex;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

#kc-form-buttons .btn:not(:last-child) {
    display: flex;
    margin-right: 0.5rem;
}

.btn-login {
    background:  var(--color-secondary);
    font-weight: normal;
    width: fit-content;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border: none;
    border-color:  var(--color-secondary);
    border-radius: 999rem;
    color: white;
    font-size: 1rem;
    transition: box-shadow ease 0.1s, background-color ease 0.1s;
}

.btn {
    font-weight: normal;
    width: fit-content;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border: none;
    border-radius: 999rem;
    border-color: var(--color-secondary);
    background: var(--color-secondary);
    color: white;
    font-size: 1rem;
    transition: box-shadow ease 0.1s, background-color ease 0.1s;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.btn-login:hover, .btn-primary:hover, .btn-login:focus {
    color: white;
    background: var(--color-secondary);
    cursor: pointer;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px var(--color-secondary);
}

.btn-login:disabled {
    cursor: pointer;
    box-shadow: none;
}

.btn:focus, .btn:active:focus {
    outline: none;
}

.btn-login:active {
    color: white;
    transition: none;
    cursor: pointer;
    box-shadow: none;
    background:  var(--color-secondary);
}

.btn-inverted {
    background-color: transparent;
    color: var(--color-secondary);
    border: 2px solid transparent;
    text-decoration: none;
}

.login-pf-page .btn-primary {
    margin-top: auto;
}

.btn-inverted:hover, .btn-inverted:focus {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-secondary);
}

/* Souligner uniquement le texte, pas l'icône */
.btn-inverted:hover > span:not(.icon),
.btn-inverted:focus > span:not(.icon) {
    text-decoration: underline;
}

.btn-inverted:active {
    transition: none;
    cursor: pointer;
    background-color: rgba(42,192,255,0.05);
    border-color: transparent;
}

.btn-inverted:active > span:not(.icon) {
    text-decoration: underline;
}

.icon-lifebuoy:before {
    content: "\e7ed";
}

.icon-lifebuoy {
    margin-right: 0.5rem;
    font-size: 20px;
}

.login-pf-main-image {
    flex: 1;
    position: relative;
    color: white;
    padding: 5rem 12rem 0 6rem;
}

.login-pf-main-image .title {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.login-pf-main-image .subtitle {
    font-size: 1.8rem;
    line-height: 2.4rem;
    font-weight: 300;
    color: #FFF;
}

#login-background-img {
    flex-grow: 1;
    background-size: cover;
    background-position: center center;
    opacity: 0.1;
    z-index: -2;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

#kc-info {
    padding-bottom: 0;
    margin-bottom: 0;
}

.login-pf-social-all {
    display: flex;
}

.login-pf-social-link .zocial, a.zocial {
    width: fit-content;
}

.login-pf-social-link .zocial, a.zocial:before {
    box-shadow: none;
}

.forgot-password-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: var(--color-secondary);
    box-shadow: none;
    margin-right: 42px;
}

.inline-link {
    color: var(--color-secondary);
    font-weight: 400;
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: none;
}

.username-input {
    position: relative;
}

.info-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
}

.info-icon-trigger {
    cursor: pointer;
    color: var(--color-secondary);
}

.info-icon-trigger:hover + .info-icon-hint {
    display: block;
}

.info-icon-hint {
    display: none;
    position: absolute;
    background: black;
    color: white;
    width: 200px;
    right: calc(100% + 15px);
    transform: translateY(-50%);
    top: 50%;
    border-radius: 5px;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.info-icon-hint:before {
    content: "";
    width: 0;
    height: 0;
    position: absolute;
    border-left: 10px solid transparent;
    border-right: 10px solid black;
    border-top: 10px solid black;
    border-bottom: 10px solid transparent;
    transform: translateY(-50%) rotateZ(45deg);
    right: 0;
    top: 50%;
}

.instruction {
    color: #f46441;
    font-size: 1rem;
}

.instruction-list li {
    color: #f46441;
    font-size: 1rem;
}

.form-horizontal .form-group {
    margin-left: 0;
    margin-right: 0;
}

.login-pf-page .login-pf-social-section:last-of-type,
.login-pf-page .login-pf-social-section:first-of-type {
    padding-left: 0;
    padding-right: 0;
    margin-right: 0;
}

.error-message {
    color: #db3552;
    margin-top: 5px;
    font-size: 1rem;
}

@media (max-width: 500px) {
    #kc-content-logo {
        display: none;
    }

    #kc-header {
        padding: 0;
    }

    #kc-header-logo {
        width: 100%;
        height: 80px;
        max-width: 200px;
        margin: 2rem auto;
        display: block;
    }

    #kc-content {
        background: none;
        height: 100%;
    }
}

@media (max-width: 1600px) {
    .login-pf-main-image .title {
        font-size: 3rem;
    }

    .login-pf-main-image .subtitle {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 0.8rem;
    }

    .login-pf-main-image {
        padding: 3rem 9rem 0 4rem;
    }
}

@media (min-width: 501px) {
    #kc-header-logo {
        display: none;
    }

    .mobile-header__bubble {
        display: none;
    }

    .mobile-header__sub-bubble {
        display: none;
    }

    .color-mdp {
        color: var(--color-secondary);
        text-decoration: none;
    }

    #kc-info-wrapper, .color-text {
        color: var(--color-secondary);
    }

    .form-control:hover {
        border-color: #949494;
    }

    #kc-content-wrapper {
        width: 500px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    @media (max-width: 1200px) {
        #kc-content-wrapper {
            width: 320px;
        }
    }
}

.mobile-bubble-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.mobile-header__bubble {
    top: -42vh;
    width: 500px;
    height: 90vh;
    position: absolute;
    background-color: #ffffff;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
    mask-image: url(../img/login_background_bubble.svg);
    -webkit-mask-image: url(../img/login_background_bubble.svg);
}

.mobile-header__sub-bubble {
    top: -42vh;
    width: 500px;
    height: 90vh;
    position: absolute;
    background-color: #ffffff;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
    mask-image: url(../img/login_background_bubble.svg);
    -webkit-mask-image: url(../img/login_background_bubble.svg);
    transform: rotate(5deg);
    opacity: 0.3;
    top: -39.5vh;
    left: 2px;
}

.toast-warning {
    background-color: #f46441;
}

.toast-error {
    background-color: #db3552;
}

.toast-success {
    background-color: #38be68;
}

#myBtn, #myBtnPlus {
    width: 20vh;
    margin-top: 10px;
    background: var(--color-secondary);
    color: #FFF;
    display: block;
}

@media (max-width: 767px) {
    .login-pf-main-image {
        display: none;
    }

    .login-pf-main {
        width: 100%;
    }

    .login-pf-accounts {
        padding: 0 1rem 2rem;
        width: 100%;
    }

    #kc-header-logo {
        display: none;
    }

    #kc-content-logo {
        display: block;
        width: 100%;
        max-width: 200px;
        height: 80px;
        margin: 2rem auto;
    }

    #kc-content-logo img {
        max-width: 100%;
        max-height: 100%;
        margin: 0;
    }

    #kc-content-wrapper {
        margin-top: auto;
        margin-bottom: auto;
    }
}

@media (min-width: 768px) {
    .only-mobile {
        display: none;
    }

    #kc-social-providers {
        padding-left: 0;
    }
}

#kc-content-sentence {
    text-align: center;
    padding-top: 20px;
    padding-left: 20px;
    padding-right: 20px;
}

.text-size {
    font-size: 16px;
}

#kc-info-wrapper {
    font-size: 14px;
    background-color: #FFF;
}

.login-footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

.login-footer a {
    color: var(--color-secondary);
    font-size: 1rem;
    outline: none;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.help-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-help {
    flex: 1;
    min-width: 200px;
}

.btn-forgot {
    flex: 1;
    min-width: 180px;
}
