/* ========== PAGE D'AUTHENTIFICATION - FORMULAIRE DE CONNEXION ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body.authentication-page,
body.page-authentication,
body.page-password,
body.password-page {
    margin: 0;
    background: transparent !important;
    background-color: transparent !important;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

.authentication-page #wrapper,
.page-authentication #wrapper,
.page-password #wrapper,
.password-page #wrapper {
    background: transparent !important;
    background-color: transparent !important;
}

.authentication-page #main,
.page-authentication #main,
.page-password #main,
.password-page #main {
    background: transparent !important;
    background-color: transparent !important;
}

.authentication-page #content-wrapper,
.page-authentication #content-wrapper,
.page-password #content-wrapper,
.password-page #content-wrapper {
    background: transparent !important;
    background-color: transparent !important;
}

.authentication-page #main,
.page-authentication #main,
.page-password #main,
.password-page #main {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    width: 100%;
    background: transparent !important;
    background-color: transparent !important;
}

.authentication-page #content-wrapper,
.page-authentication #content-wrapper,
.page-password #content-wrapper,
.password-page #content-wrapper,
.authentication-page .container,
.page-authentication .container,
.page-password .container,
.password-page .container,
.authentication-page .page-content,
.page-authentication .page-content,
.page-password .page-content,
.password-page .page-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Masquer les éléments non nécessaires */
.authentication-page .breadcrumb,
.page-authentication .breadcrumb,
.page-password .breadcrumb,
.password-page .breadcrumb,
.authentication-page .page-header,
.page-authentication .page-header,
.page-password .page-header,
.password-page .page-header,
.authentication-page footer,
.page-authentication footer,
.page-password footer,
.password-page footer,
.authentication-page #footer,
.page-authentication #footer,
.page-password #footer,
.password-page #footer,
.authentication-page nav.breadcrumb,
.page-authentication nav.breadcrumb,
.page-password nav.breadcrumb,
.password-page nav.breadcrumb,
.authentication-page .breadcrumb ol,
.page-authentication .breadcrumb ol,
.page-password .breadcrumb ol,
.password-page .breadcrumb ol,
.authentication-page .breadcrumb li,
.page-authentication .breadcrumb li,
.page-password .breadcrumb li,
.password-page .breadcrumb li,
body.authentication-page .breadcrumb,
body.page-authentication .breadcrumb,
body.page-password .breadcrumb,
body.password-page .breadcrumb,
body.authentication-page footer,
body.page-authentication footer,
body.page-password footer,
body.password-page footer,
body.authentication-page #footer,
body.page-authentication #footer,
body.page-password #footer,
body.password-page #footer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Container principal */
.auth-container {
    width: 900px;
    max-width: 95%;
    margin: 40px auto;
    background: #fff;
    border-radius: 30px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 0;
}

/* Colonne gauche - Formulaire */
.auth-left {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.auth-left h1 {
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.2;
}

.auth-left p.sub {
    color: #777;
    margin-bottom: 40px;
    font-size: 15px;
    margin-top: 0;
}

/* Formulaire */
.login-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.form-fields {
    display: flex;
    flex-direction: column;
}

.field {
    margin-bottom: 20px;
}

.field input,
.login-form .form-control,
.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"],
.forgotten-password .form-control,
.forgotten-password input[type="email"],
.forgotten-password input[type="text"] {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: none !important;
    font-size: 15px;
    outline: none;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.85) !important;
    margin: 0;
    color: #333 !important;
    box-shadow: none !important;
}

/* Supprimer totalement le focus bleu Bootstrap */

.login-form input,
.login-form .form-control {
  outline: none !important;
}

.login-form input:focus,
.login-form input:focus-visible,
.login-form .form-control:focus,
.login-form .form-control:focus-visible,
.forgotten-password input:focus,
.forgotten-password input:focus-visible,
.forgotten-password .form-control:focus,
.forgotten-password .form-control:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: #ff9240 !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* Connexion : garder le fond blanc sur le champ mot de passe au focus */
.login-form input[type="password"]:focus,
.login-form input[type="password"]:focus-visible,
.login-form .js-visible-password:focus,
.login-form .js-visible-password:focus-visible {
  background: #ffffff !important;
}

.field input::placeholder,
.login-form .form-control::placeholder,
.login-form input[type="email"]::placeholder,
.login-form input[type="password"]::placeholder,
.login-form input[type="text"]::placeholder {
    color: #999;
}

/* Bouton afficher/masquer du champ mot de passe */
.login-form .input-group-btn .btn,
.login-form .input-group-btn .btn-default {
    background: #ff9240 !important;
    color: #fff !important;
    border: 1px solid #ff9240 !important;
    border-radius: 0 10px 10px 0 !important;
    padding: 0 16px !important;
    font-weight: 600;
}

.login-form .input-group {
    width: 100%;
}

/* Supprimer TOUT trait bleu sur le champ mot de passe */
.login-form .input-group .form-control:focus,
.login-form .input-group .form-control:focus-visible,
.login-form .input-group input[type="password"]:focus,
.login-form .input-group input[type="password"]:focus-visible,
.login-form .js-child-focus:focus,
.login-form .js-child-focus:focus-visible,
.login-form .js-parent-focus .form-control:focus,
.login-form .js-parent-focus .form-control:focus-visible,
.login-form .js-parent-focus input[type="password"]:focus,
.login-form .js-parent-focus input[type="password"]:focus-visible,
.login-form .js-parent-focus.focus .form-control,
.login-form .js-parent-focus.focus input[type="password"],
.login-form .js-visible-password:focus,
.login-form .js-visible-password:focus-visible,
.login-form .input-group.js-parent-focus.focus .form-control,
.login-form .input-group.js-parent-focus.focus input[type="password"] {
  outline: none !important;
  outline-offset: 0 !important;
  outline-width: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  border-color: #6a00ff !important;
  background-color: transparent !important;
}

/* Labels */
.login-form label,
.login-form .form-group label,
.forgotten-password label,
.forgotten-password .field label,
.kany-login-form-container .field label,
.kany-login-form-container .form-control-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff !important;
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
    padding-left: 0;
    opacity: 0.9;
}

.login-form label::before,
.login-form .form-group label::before {
    display: none;
}

.login-form .form-group::after {
    display: none;
}

/* Options (Remember me / Forgot password) */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.options input[type=checkbox] {
    width: auto;
    margin-right: 6px;
    cursor: pointer;
}

.options label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    color: #666;
}

.options a,
.forgot-password a,
a.kany-forgot-password,
.kany-forgot-password {
    color: #ff9240 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.options a:hover,
.forgot-password a:hover,
a.kany-forgot-password:hover,
.kany-forgot-password:hover {
    color: #ff5f2e !important;
    text-decoration: underline;
}

/* Bouton Sign In */
.btn,
.login-form .btn-primary,
.forgotten-password .btn-primary,
.kany-login-form-container .btn-primary {
    background: linear-gradient(135deg, #F4A261, #F9D65C) !important;
    border: none !important;
    width: 100%;
    padding: 14px 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #fff !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

.btn:hover,
.login-form .btn-primary:hover,
.forgotten-password .btn-primary:hover,
.kany-login-form-container .btn-primary:hover {
    background: linear-gradient(135deg, #E6914E, #F4CE50) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 162, 97, 0.4);
}

.btn:active,
.login-form .btn-primary:active,
.forgotten-password .btn-primary:active,
.kany-login-form-container .btn-primary:active {
    transform: translateY(0);
}

/* Page mot de passe : bouton plus petit + dégradé demandé */
.forgotten-password .form-footer {
    text-align: center;
}

.forgotten-password #password-submit-button {
    width: auto !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #f9c74f, #f9844a, #f3722c) !important;
    box-shadow: 0 4px 12px rgba(249, 199, 79, 0.35) !important;
}

.forgotten-password #password-submit-button:hover {
    background: linear-gradient(135deg, #f9b93c, #f37333, #ef5c20) !important;
    box-shadow: 0 6px 16px rgba(249, 199, 79, 0.45) !important;
}

/* Signup link */
.signup {
    margin-top: 35px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9) !important;
    text-align: center;
}

.signup a,
.kany-login-form-container .signup a,
.kany-login-form-container .back-to-login-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.signup a:hover,
.kany-login-form-container .signup a:hover,
.kany-login-form-container .back-to-login-link:hover {
    color: #ff9240 !important;
    text-decoration: underline;
}

.signup a i.material-icons,
.kany-login-form-container .back-to-login-link i.material-icons {
    font-size: 18px;
}

/* CAPTCHA */
.captcha-section {
    margin-top: 5px;
    margin-bottom: 0;
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.captcha-group {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.captcha-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    text-align: left;
    width: 100%;
    text-transform: none;
    letter-spacing: normal;
    padding-left: 0;
}

.captcha-group label small {
    font-weight: 400;
    color: #777;
    font-size: 13px;
}

.captcha-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.captcha-image-wrapper {
    position: relative;
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    transition: all 0.3s ease;
    max-width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.captcha-image-wrapper:hover {
    border-color: #ff9240;
    box-shadow: 0 4px 8px rgba(255, 146, 64, 0.15);
}

.captcha-image {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: pointer;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.captcha-image:hover {
    opacity: 0.9;
}

.captcha-input {
    width: 100%;
    padding: 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #fff;
    font-family: 'Inter', sans-serif;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.captcha-input:focus {
    outline: none;
    border-color: #ff9240;
    box-shadow: 0 0 0 3px rgba(255, 146, 64, 0.1);
}

.captcha-input::placeholder {
    color: #999;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-container {
        width: 100%;
        max-width: 500px;
        margin: 20px auto;
        border-radius: 20px;
    }
    
    .auth-left {
        padding: 40px 30px;
    }
    
    .auth-left h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        margin: 10px auto;
        border-radius: 20px;
    }
    
    .auth-left {
        padding: 30px 20px;
    }
    
    .auth-left h1 {
        font-size: 28px;
    }
    
    .btn,
    .login-form .btn-primary {
        width: 100%;
    }
    
    .options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .login-form button[data-action="show-password"],
    .login-form .input-group-btn button,
    .login-form .input-group-btn .btn {
        padding: 0 !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        max-width: 70px !important;
        height: 100%;
    }
}

@media (max-width: 480px) {
    .login-form button[data-action="show-password"],
    .login-form .input-group-btn button,
    .login-form .input-group-btn .btn {
        padding: 0 !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        max-width: 70px !important;
        height: 100%;
    }
}

/* Masquer les éléments Google si présents */
.google-login-btn,
.form-buttons-wrapper,
.auth-divider-inline {
    display: none !important;
}

.form-footer-links {
    display: none !important;
}

/* Erreurs de formulaire */
.login-form .alert-danger,
.login-form .form-errors,
.forgotten-password .alert-danger,
.forgotten-password .form-errors,
.forgotten-password .ps-alert-error,
.kany-login-form-container .form-errors,
.kany-login-form-container .ps-alert-error {
    background: rgba(255, 0, 0, 0.2) !important;
    border: none !important;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #fff !important;
    font-size: 14px;
    list-style: none;
}

.login-form .alert-danger ul,
.login-form .form-errors ul,
.forgotten-password .alert-danger ul,
.forgotten-password .form-errors ul,
.forgotten-password .ps-alert-error ul,
.kany-login-form-container .form-errors ul,
.kany-login-form-container .ps-alert-error ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-form .alert-danger li,
.login-form .form-errors li,
.forgotten-password .alert-danger li,
.forgotten-password .form-errors li,
.forgotten-password .ps-alert-error li,
.kany-login-form-container .form-errors li,
.kany-login-form-container .ps-alert-error li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.login-form .alert-danger li:last-child,
.login-form .form-errors li:last-child,
.forgotten-password .alert-danger li:last-child,
.forgotten-password .form-errors li:last-child,
.forgotten-password .ps-alert-error li:last-child,
.kany-login-form-container .form-errors li:last-child,
.kany-login-form-container .ps-alert-error li:last-child {
    margin-bottom: 0;
}

.login-form .alert-danger li i svg,
.login-form .form-errors li i svg,
.forgotten-password .alert-danger li i svg,
.forgotten-password .form-errors li i svg,
.forgotten-password .ps-alert-error li i svg,
.kany-login-form-container .form-errors li i svg,
.kany-login-form-container .ps-alert-error li i svg {
    width: 20px;
    height: 20px;
}
