/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #EBF4FF 0%, #E1EFFE 100%);
    color: #1a202c;
    line-height: 1.5;
}

.min-h-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.container {
    width: 100%;
    max-width: 32rem;
}

/* Carte de connexion */
.login-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem 3rem;
    margin-bottom: 1.5rem;
}

/* Logo et en-tête */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.credit-card-icon {
    color: #2563eb;
    width: 2.5rem;
    height: 2.5rem;
}

.brand-name {
    margin-left: 0.75rem;
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
}

.title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
}

.subtitle {
    font-size: 1.125rem;
    color: #4a5568;
    margin-bottom: 2.5rem;
}

/* Formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 1.125rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.125rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Boutons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background-color: #2563eb;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-back {
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 1rem;
    color: #4a5568;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #2563eb;
}

/* Code dots */
.code-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.code-dot {
    width: 3rem;
    height: 4rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.code-dot.filled {
    position: relative;
}

.code-dot.filled::after {
    content: '';
    width: 1rem;
    height: 1rem;
    background-color: #2563eb;
    border-radius: 50%;
}

/* Numpad */
.numpad {
    max-width: 360px;
    margin: 0 auto;
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.numpad-button {
    height: 4rem;
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a202c;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.numpad-button:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.numpad-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Footer */
.footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.footer-links {
    display: flex;
    justify-content: space-between;
}

.footer-link {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #2563eb;
}

/* Terms */
.terms {
    text-align: center;
    color: #4a5568;
    font-size: 1rem;
}

.terms-link {
    color: #2563eb;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Error message */
.error-message {
    background-color: #FEE2E2;
    color: #DC2626;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 640px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .code-dots {
        gap: 0.5rem;
    }

    .code-dot {
        width: 2.5rem;
        height: 3.5rem;
    }

    .numpad-button {
        height: 3.5rem;
    }
}