@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    
    /* Fond Mesh Gradient subtil et moderne */
    background-color: #f3f4f6;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.1) 0px, transparent 50%);
}

/* Titres */
h1, h2 {
    font-size: 1.5rem; /* Taille raisonnable */
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #0f172a;
    letter-spacing: -0.025em;
}

/* La carte de connexion */
form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px); /* Effet verre fin */
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem; /* Espacement interne aéré mais pas énorme */
    border-radius: 16px;
    width: 100%;
    max-width: 400px; /* Largeur maîtrisée */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05), 
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset; /* Bordure interne lumière */
    border: 1px solid rgba(255,255,255,0.6);
    max-height: 90vh;
    overflow-y: auto;
}

/* Labels discrets */
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    margin-top: 1rem;
}

/* Inputs fins et précis */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select {
    width: 100%;
    padding: 0.6rem 0.8rem; /* Padding réduit pour éviter l'effet "gros doigt" */
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Select custom arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Bouton élégant */
button[type="submit"] {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.7rem;
    background-color: var(--text-main); /* Noir doux pour le luxe */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

button[type="submit"]:hover {
    background-color: #000;
    transform: translateY(-1px);
}

/* Messages d'erreur */
p[style*="color:red"], div[style*="color: red"] {
    font-size: 0.85rem;
    color: #dc2626 !important;
    background: #fef2f2;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #fee2e2;
    margin-top: 1rem;
    text-align: center;
}

/* Liens */
p {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
a:hover { text-decoration: underline; }