/* Variables ANStat */
:root {
    --anstat-primary: #49655a;
    --anstat-secondary: #f39323;
    --anstat-light: #f8f9fa;
    --anstat-text: #333333;
}

/* Body */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--anstat-light);
    color: var(--anstat-text);
}

main { flex: 1; }

/* Logo dans formulaire */
.logo-form {
    height: 70px;
    width: auto;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    background-color: var(--anstat-primary);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.card-header-logo {
    background-color: #ffffff;
    color: var(--anstat-primary);
    border-bottom: 3px solid var(--anstat-primary);
    padding: 1.5rem;
}

.card-header-secondary {
    background-color: var(--anstat-secondary);
}

/* Form Controls */
.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--anstat-primary);
    box-shadow: 0 0 0 0.2rem rgba(73, 101, 90, 0.15);
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--anstat-primary) 0%, #3a5249 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(73, 101, 90, 0.3);
    background: linear-gradient(135deg, #3a5249 0%, var(--anstat-primary) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--anstat-secondary) 0%, #e08520 100%);
    border: none;
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 147, 35, 0.3);
    background: linear-gradient(135deg, #e08520 0%, var(--anstat-secondary) 100%);
}

/* OTP Input */
#otpCode {
    font-size: 2rem;
    letter-spacing: 10px;
    font-weight: bold;
    color: var(--anstat-primary);
}

/* Success Animation */
.success-icon {
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-info {
    background-color: rgba(73, 101, 90, 0.1);
    color: var(--anstat-primary);
    border-left: 4px solid var(--anstat-primary);
}

.alert-danger {
    border-left: 4px solid var(--anstat-secondary);
}

/* Footer */
footer {
    background-color: var(--anstat-primary);
    color: white;
    padding: 1.5rem 0;
    margin-top: auto;
}

footer small {
    opacity: 0.7;
}

/* Form Select */
.form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--anstat-primary);
    box-shadow: 0 0 0 0.2rem rgba(73, 101, 90, 0.15);
}

/* Autocomplete */
.autocomplete-items {
    position: absolute;
    border: 1px solid #e9ecef;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.autocomplete-items div {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-items div:last-child {
    border-bottom: none;
}

.autocomplete-items div:hover,
.autocomplete-item-active {
    background-color: var(--anstat-primary);
    color: white;
}

.autocomplete-items .agent-info {
    font-size: 0.85rem;
    opacity: 0.8;
}

.autocomplete-items div:hover .agent-info,
.autocomplete-item-active .agent-info {
    color: rgba(255, 255, 255, 0.9);
}

/* Readonly input style */
.form-control[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 576px) {
    .logo { height: 40px; }
    header h1 { font-size: 1.2rem; }
    .card-body { padding: 1.5rem !important; }
    #otpCode { font-size: 1.5rem; letter-spacing: 5px; }
}
