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

html {
    font-size: 16px;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1a1f3a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #334155;
    line-height: 1.5;
}

/* Formulaire */
form {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.5rem;
}

form h2 {
    color: #4f46e5;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* Champs de formulaire */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 1rem;
    background-color: #f8fafc;
    color: #0f172a;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: #94a3b8;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #f97316;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    transform: translateY(-2px);
}

/* Bouton */
button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    margin-top: 0.5rem;
    background-color: #f97316;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    background-color: #ffffff;
    color: #f97316;
    border: 2px solid #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Texte et liens */
p {
    text-align: center;
    font-size: 0.875rem;
    color: #334155;
    margin-top: 1.5rem;
}



a {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

a:hover {
    color: #ea580c;
    text-decoration: underline;
}

/* Messages */
.error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success {
    color: #16a34a;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ===================== RESPONSIVE ===================== */

/* Tablettes (640px - 1024px) */
@media (min-width: 640px) {
    form {
        max-width: 450px;
        padding: 2.5rem 2rem;
    }

    form h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.875rem 1.125rem;
        font-size: 1rem;
    }

    button {
        padding: 0.875rem 1.75rem;
    }
}

/* Petits écrans (480px - 640px) */
@media (max-width: 639px) {
    body {
        padding: 0.75rem;
    }

    form {
        max-width: 100%;
        padding: 1.5rem 1.25rem;
    }

    form h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.75rem 0.875rem;
        font-size: 16px;
        margin-bottom: 0.875rem;
    }

    button {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    p {
        font-size: 0.8125rem;
        margin-top: 1.25rem;
    }
}

/* Très petits écrans (320px - 480px) */
@media (max-width: 479px) {
    html {
        font-size: 15px;
    }

    body {
        padding: 0.5rem;
    }

    form {
        border-radius: 0.375rem;
        padding: 1.25rem 1rem;
    }

    form h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.625rem 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 0.25rem;
    }

    button {
        padding: 0.625rem 1rem;
        margin-top: 0.25rem;
        font-size: 0.75rem;
    }

    p {
        font-size: 0.75rem;
        margin-top: 1rem;
    }
}

/* Grands écrans (1024px+) */
@media (min-width: 1024px) {
    form {
        max-width: 450px;
        padding: 3rem 2.5rem;
    }

    form h2 {
        font-size: 2.25rem;
        margin-bottom: 2.25rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 1rem 1.25rem;
        margin-bottom: 1.25rem;
        font-size: 1.0625rem;
    }

    button {
        padding: 1rem 2rem;
        font-size: 1.0625rem;
        margin-top: 1rem;
    }

    p {
        font-size: 0.9375rem;
        margin-top: 2rem;
    }
}
