/*
 * Page de connexion - ecran partage (marque / formulaire)
 * Couleurs de l'entreprise : bleu #1E90FF, orange #FF6600
 */
body:has(.gl-auth),
body:has(.gl-auth) .right-col {
    background: linear-gradient(135deg, #0b1f3a 0%, #133d73 100%) !important;
}

body:has(.gl-auth) .right-col {
    min-height: 100vh;
    padding-top: 72px !important;
}

.gl-auth {
    display: flex;
    max-width: 980px;
    min-height: 560px;
    margin: 0 auto 24px;
    overflow: hidden;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

/* Panneau de marque */
.gl-brand {
    flex: 0 0 44%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    color: #fff;
    background: linear-gradient(145deg, #1E90FF 0%, #1565c0 100%);
    position: relative;
    overflow: hidden;
}

.gl-brand::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.08;
}

.gl-brand-name {
    text-transform: capitalize;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.gl-brand-tagline {
    margin: 12px 0 28px;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.gl-brand-features {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gl-brand-features li {
    position: relative;
    margin-bottom: 12px;
    padding-left: 30px;
    font-size: 15px;
}

.gl-brand-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background: #FF6600 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
    border-radius: 50%;
}

/* Formulaire */
.gl-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
}

.gl-mobile-brand {
    text-transform: capitalize;
    display: none;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 800;
    color: #1E90FF;
}

.gl-title {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a !important;
}

.gl-subtitle {
    margin: 0 0 28px;
    font-size: 14px;
    color: #64748b;
}

.gl-field {
    margin-bottom: 18px;
}

.gl-field label,
.gl-label-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.gl-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.gl-input {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 12px;
    background-color: #fff;
    border: 1.5px solid #d1d9e3;
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.gl-input:focus-within {
    border-color: #1E90FF;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.18);
}

.gl-field.has-error .gl-input {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.gl-input > svg {
    width: 20px;
    height: 20px;
    flex: none;
    color: #94a3b8;
}

.gl-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    font-size: 15px;
    color: #0f172a;
    background: transparent;
    border: none;
    outline: none;
}

.gl-eye {
    display: flex;
    padding: 4px;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
}

.gl-eye svg {
    width: 22px;
    height: 22px;
}

.gl-error {
    min-height: 0;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #dc2626;
}

.gl-error:empty {
    display: none;
}

.gl-capslock {
    display: none;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #b45309;
}

.gl-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 22px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
}

.gl-remember input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #1E90FF;
}

.gl-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background-color: #FF6600;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.28);
    transition: background-color 0.15s, transform 0.05s;
    cursor: pointer;
}

.gl-submit:hover {
    background-color: #E65C00;
}

.gl-submit:active {
    transform: translateY(1px);
}

.gl-submit:disabled {
    opacity: 0.85;
    cursor: default;
}

.gl-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gl-spin 0.7s linear infinite;
}

.gl-submit.is-loading .gl-spinner {
    display: inline-block;
}

@keyframes gl-spin {
    to {
        transform: rotate(360deg);
    }
}

.gl-link {
    font-size: 13px;
    font-weight: 600;
    color: #1E90FF;
}

.gl-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

.gl-register {
    margin: 22px 0 0;
    font-size: 14px;
    text-align: center;
    color: #64748b;
}

.gl-footer {
    margin: 26px 0 0;
    font-size: 12px;
    text-align: center;
    color: #94a3b8;
}

/* Telephone : formulaire seul */
@media (max-width: 767px) {
    body:has(.gl-auth) .right-col {
        padding-top: 64px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .gl-auth {
        min-height: 0;
        border-radius: 16px;
    }

    .gl-brand {
        display: none;
    }

    .gl-mobile-brand {
        display: block;
    }

    .gl-form-panel {
        padding: 32px 22px;
    }
}

/* Messages (ex. lien de reinitialisation envoye) */
.gl-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
}

.gl-alert-success {
    color: #166534;
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
}

.gl-alert-warning {
    color: #92400e;
    background-color: #fef3c7;
    border: 1px solid #fde68a;
}

/* Lien ou bouton presente comme .gl-submit / .gl-link (page « poste non autorise ») */
a.gl-submit,
a.gl-submit:hover {
    color: #fff;
    text-decoration: none;
}

button.gl-link {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

/* Oeil barre quand le mot de passe est affiche */
.gl-eye.is-visible {
    color: #1E90FF;
}

/* ==========================================================================
   Page d'inscription (formulaire en etapes) harmonisee avec la connexion
   ========================================================================== */
body:has(.gl-register-card),
body:has(.gl-register-card) .right-col {
    background: linear-gradient(135deg, #0b1f3a 0%, #133d73 100%) !important;
}

body:has(.gl-register-card) .right-col {
    min-height: 100vh;
    padding-top: 72px !important;
}

.gl-register-card {
    max-width: 980px;
    margin: 0 auto 32px;
    overflow: hidden;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.gl-register-header {
    position: relative;
    overflow: hidden;
    padding: 28px 40px;
    color: #fff;
    background: linear-gradient(145deg, #1E90FF 0%, #1565c0 100%);
}

.gl-register-header .gl-brand-name {
    text-transform: capitalize;
    font-size: 26px;
    font-weight: 800;
}

.gl-register-header p {
    margin: 4px 0 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
}

.gl-register-body {
    padding: 28px 32px 32px;
}

/* Etapes */
.gl-register-card .wizard > .steps > ul > li a,
.gl-register-card .wizard > .steps > ul > li a:hover {
    border-radius: 12px;
}

.gl-register-card .wizard > .steps .current a,
.gl-register-card .wizard > .steps .current a:hover,
.gl-register-card .wizard > .steps .current a:active {
    background: #1E90FF;
}

.gl-register-card .wizard > .steps .done a,
.gl-register-card .wizard > .steps .done a:hover,
.gl-register-card .wizard > .steps .done a:active {
    background: #dbeafe;
    color: #1565c0;
}

.gl-register-card .wizard > .content {
    background: transparent;
}

/* Champs */
.gl-register-card .form-control,
.gl-register-card .input-group-addon {
    height: 44px;
    border-color: #d1d9e3;
}

.gl-register-card .input-group-addon {
    color: #94a3b8;
    background-color: #f8fafc;
    border-radius: 10px 0 0 10px;
}

.gl-register-card .input-group .form-control:last-child,
.gl-register-card .input-group .select2-container:last-child .select2-selection {
    border-radius: 0 10px 10px 0;
}

.gl-register-card .form-control:focus {
    border-color: #1E90FF;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.18);
}

.gl-register-card label {
    color: #334155;
}

.gl-register-card legend {
    border-bottom-color: #eef2f7;
    font-weight: 700;
    color: #0f172a !important;
}

/* Boutons Precedent / Suivant / Terminer */
.gl-register-card .wizard > .actions a,
.gl-register-card .wizard > .actions a:hover,
.gl-register-card .wizard > .actions a:active {
    padding: 10px 22px;
    font-weight: 700;
    color: #fff;
    background: #FF6600;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.25);
}

.gl-register-card .wizard > .actions .disabled a,
.gl-register-card .wizard > .actions .disabled a:hover,
.gl-register-card .wizard > .actions a[href="#previous"] {
    color: #1565c0;
    background: #eef2ff;
    box-shadow: none;
}

@media (max-width: 767px) {
    .gl-register-header {
        padding: 22px;
    }

    .gl-register-body {
        padding: 18px 12px 24px;
    }
}

/* Listes deroulantes (select2) a la meme hauteur que les champs */
.gl-register-card .select2-container .select2-selection--single {
    height: 44px;
    border-color: #d1d9e3;
}

.gl-register-card .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
}

.gl-register-card .select2-container .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.gl-register-card .wizard > .actions a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.25);
}

@media (max-width: 767px) {
    /* Etapes compactes sur telephone */
    .gl-register-card .wizard > .steps > ul > li {
        width: 33.33%;
    }

    .gl-register-card .wizard > .steps a,
    .gl-register-card .wizard > .steps a:hover,
    .gl-register-card .wizard > .steps a:active {
        margin: 0 3px 8px;
        padding: 8px 6px;
        font-size: 12px;
        line-height: 1.3;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .gl-register-card .wizard > .steps .number {
        display: block;
        font-size: 16px;
    }

    /* Champs sur toute la largeur */
    .gl-register-card .wizard > .content > .body {
        width: 100%;
        padding: 8px 0;
    }

    .gl-register-card fieldset > [class*="col-"] {
        padding-left: 4px;
        padding-right: 4px;
    }
}
