/*
    CCBA Admin - CSS
    Author: NIATECHNOLOGIE
*/

@font-face { font-family: 'aptos'; src: url("../aptos/aptos.ttf"); }
@font-face { font-family: 'aptos-bold'; src: url("../aptos/aptos-bold.ttf"); }
@font-face { font-family: 'aptos-italic'; src: url("../aptos/aptos-italic.ttf"); }
@font-face { font-family: 'aptos-light'; src: url("../aptos/aptos-light.ttf"); }
@font-face { font-family: 'aptos-semibold'; src: url("../aptos/aptos-semibold.ttf"); }
@font-face { font-family: 'aptos-extrabold'; src: url("../aptos/aptos-extrabold.ttf"); }
@font-face { font-family: 'aptos-medium'; src: url("../aptos/aptos-medium.ttf"); }

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    padding: 0;
    margin: 0;
    font-family: 'aptos', sans-serif;
    min-height: 100vh;
    background: #338c36;
}

/* Page background */
.main {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #338c36;
}

/* Card deux colonnes */
.login-card {
    display: flex;
    width: 800px;
    min-height: 460px;
    border-radius: 20px;
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Colonne gauche - brand */
.card-left {
    width: 40%;
    background: #f39200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
}

#intro-logo {
    text-align: center;
    margin-bottom: 20px;
}

#intro-logo img {
    display: inline-block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

.brand-label {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-family: 'aptos-semibold', sans-serif;
}

/* Colonne droite - formulaire */
.card-right {
    width: 60%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
}

#conn {
    width: 100%;
}

.form-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-family: 'aptos-bold', sans-serif;
    color: #1a1a1a;
}

.form-hint {
    margin: 0 0 28px;
    font-size: 13px;
    color: #9e9e9e;
    line-height: 1.5;
}

/* Groupes de champs */
.input-group {
    margin-bottom: 20px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b0b0;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.input-group:focus-within .input-icon {
    color: #f39200;
}

#conn input[type=text],
#conn input[type=password] {
    width: 100%;
    padding: 20px 42px 8px 42px;
    border: 1.5px solid #e2e2e2;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'aptos', sans-serif;
    background: #fafafa;
    color: #222;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

#conn input[type=text]:focus,
#conn input[type=password]:focus {
    border-color: #f39200;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(243, 146, 0, 0.1);
}

/* Label flottant */
.floating-label {
    position: absolute;
    left: 43px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #b0b0b0;
    font-family: 'aptos', sans-serif;
    pointer-events: none;
    transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease;
}

#conn input:focus ~ .floating-label,
#conn input:not(:placeholder-shown) ~ .floating-label {
    top: 10px;
    font-size: 10px;
    color: #f39200;
    font-family: 'aptos-semibold', sans-serif;
    letter-spacing: 0.3px;
}

/* Version */
.version-tag {
    margin: 18px 0 0;
    font-size: 11px;
    color: #d0d0d0;
    text-align: center;
    font-family: 'aptos-light', sans-serif;
    letter-spacing: 0.5px;
}

/* Bouton oeil */
.toggle-pass {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #b0b0b0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-pass:hover {
    color: #f39200;
}

/* Bouton submit */
.submit-group {
    margin-top: 28px;
}

#conn input[type=submit] {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #f39200;
    color: #ffffff;
    font-size: 14px;
    font-family: 'aptos-semibold', sans-serif;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
}

#conn input[type=submit]:hover {
    background: #e08500;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(243, 146, 0, 0.35);
}

#conn input[type=submit]:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Loader */
#jauge {
    position: fixed;
    left: 0; right: 0;
    top: 0; bottom: 0;
    margin: auto;
    width: 50px;
    height: 50px;
    z-index: 100;
}

.afficher_jauge {
    display: none !important;
}

/* Responsive */
@media screen and (max-width: 700px) {
    .login-card {
        flex-direction: column;
        width: calc(100% - 32px);
        min-height: unset;
    }
    .card-left {
        width: 100%;
        padding: 32px 24px;
    }
    .card-right {
        width: 100%;
        padding: 32px 24px;
    }
}
