/* iManage — login_box */

#login_greeting_wrap {
	position: fixed;
	left: 0;
	right: 0;
	text-align: center;
	z-index: 1060;
	pointer-events: none;
	display: none;
}

/* Police manuscrite pour le greeting du login — Caveat Bold (SIL OFL, commercial OK). */
@font-face {
	font-family: 'Caveat';
	src: url('../../fonts/CaveatBold-latin-ext.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: block;
	unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Caveat';
	src: url('../../fonts/CaveatBold-latin.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: block;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

#login_greeting_wrap span {
	font-family: "Caveat", cursive;
	font-size: 6.5rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #fff;
	white-space: nowrap;
	line-height: 1;
	display: inline-block;
	transition: opacity 1.8s ease-in-out;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}

/* ── Entrée du greeting : glisse du bas vers le haut ── */
@keyframes lb-greeting-rise {
	from { transform: translateY(14px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}
.lb-greeting-animated {
	animation: lb-greeting-rise 2.4s ease-out both;
}

.login-brand-col {
	/* Fond défini par l'app via app.css — ne pas surcharger ici */
	min-height: 260px;
}

/* ─── Login box redesign ──────────────────────────────── */
.lb-dialog { max-width: 520px; }
#login_box .modal-content {
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18), 0 4px 16px rgba(15, 23, 42, 0.08);
}
/* Sur mobile : quasi plein écran, sans marge excessive */
@media (max-width: 575.98px) {
    .lb-dialog { max-width: 100%; margin: 0.75rem; }
    #login_box .modal-content { border-radius: 16px; }
}
@media (min-width: 576px) {
    .lb-dialog { max-width: 460px; }
}
@media (min-width: 768px) {
    .lb-dialog { max-width: 680px; }
}

/* Sidebar */
.lb-sidebar {
    background: var(--notification-bg);
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px 20px;
}
.lb-sidebar-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}
.lb-sidebar-icon-wrap .fa-utensils {
    font-size: 2rem;
    color: #fff;
}
.lb-sidebar-logo-img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: contain;
}
.lb-sidebar-name {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.95);
    text-transform: uppercase;
}
.lb-sidebar-tagline {
    font-size: .72rem;
    color: rgba(255,255,255,0.55);
    text-align: center;
    letter-spacing: 0.04em;
    max-width: 140px;
    line-height: 1.5;
}

/* Form column */
.lb-form-col {
    background: var(--paper);
    padding: 36px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
@media (max-width: 767.98px) {
    .lb-form-col { padding: 28px 24px 26px; }
}

/* En-tête mobile (visible uniquement sans sidebar) */
.lb-mobile-brand {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
@media (max-width: 767.98px) {
    .lb-mobile-brand { display: flex; }
}
.lb-mobile-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--notification-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lb-mobile-icon .fa-utensils { font-size: .9rem; color: #fff; }
.lb-mobile-name {
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--ink);
    text-transform: uppercase;
}

/* ── Avatar ── */
.lb-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
}
.lb-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--notification-bg);
    border: 3px solid var(--line);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.lb-avatar.lb-avatar-has-pic {
    border-color: var(--accent-light);
    box-shadow: 0 4px 22px rgba(15, 118, 110, 0.28);
}
#lb_avatar_icon {
    font-size: 2.1rem;
    color: rgba(255,255,255,0.88);
    position: absolute;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
#lb_avatar_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    position: absolute;
    top: 0; left: 0;
}

@keyframes lb-avatar-reveal {
    from { transform: scale(0.82); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.lb-avatar-animated {
    animation: lb-avatar-reveal 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Username input */
.lb-username-input {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.lb-username-input::placeholder {
    text-align: center;
    color: var(--muted);
    font-weight: 400;
}

/* Password + button group */
.lb-pwd-group {
    position: relative;
}
.lb-pwd-group .input-group-text {
    border-right: none;
    background: var(--line-soft);
}
.lb-pwd-group #user_password {
    border-left: none;
    border-right: none;
    text-align: center;
    padding-right: 32px;
}
.lb-pwd-group #user_password::placeholder {
    text-align: center;
    color: var(--muted);
}
.lb-pwd-group #user_password:focus { z-index: 2; }
.lb-submit-btn {
    border-radius: 0 8px 8px 0 !important;
    padding: 0 20px;
    font-size: 1rem;
    min-width: 52px;
}

/* ── Pulsation du bouton quand le mot de passe est reconnu ── */
@keyframes lb-pulse {
    0%,100% { background-color: var(--accent);     border-color: var(--accent); }
    50%     { background-color: var(--accent-dark); border-color: var(--accent-dark); }
}
#login_box .lb-btn-pulse {
    animation: lb-pulse 2.8s ease-in-out infinite;
}

/* ── Bouton œil (afficher/masquer mot de passe) ── */
.lb-eye-btn {
    position: absolute !important;
    right: 72px;
    top: calc(50% + 2px);
    transform: translateY(-50%);
    z-index: 5;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--muted);
    font-size: .78rem;
    padding: 4px 6px;
    opacity: 0.38;
    cursor: pointer;
    transition: opacity 0.15s ease;
    line-height: 1;
}
.lb-eye-btn:hover  { opacity: 0.72; }
.lb-eye-btn:focus  { box-shadow: none !important; outline: none; }
.lb-eye-btn:active { opacity: 0.9; }

/* ── Messages d'erreur inline ── */
#login_box .lb-field-error {
    font-size: .79rem;
    color: #dc2626;
    text-align: left;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.22s ease-out, opacity 0.2s ease-out;
    line-height: 1.4;
}
#login_box .lb-field-error.lb-error-visible {
    max-height: 52px;
    opacity: 1;
}

/* ── Shake sur mauvais mot de passe ── */
@keyframes lb-shake {
    0%,100% { transform: translateX(0); }
    15%     { transform: translateX(-7px); }
    30%     { transform: translateX(7px); }
    45%     { transform: translateX(-5px); }
    60%     { transform: translateX(5px); }
    75%     { transform: translateX(-3px); }
    90%     { transform: translateX(3px); }
}
#login_box .lb-shake { animation: lb-shake 0.46s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

/* ── État chargement du bouton ── */
#login_box .lb-submit-btn.lb-loading { pointer-events: none; opacity: 0.8; }

/* ── Horloge sidebar ── */
.lb-sidebar-time {
    font-size: 1.55rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.75);
    margin-top: 18px;
    font-variant-numeric: tabular-nums;
}

/* ── Avatar plus petit sur mobile ── */
@media (max-width: 575.98px) {
    .lb-avatar { width: 68px; height: 68px; }
    #lb_avatar_icon { font-size: 1.7rem; }
}

#login_box .btn-primary { font-weight: 600; }
