/* ===== STRUCTURE GLOBALE ===== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f5f2; /* Couleur de fond douce */
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* ===== HEADER ===== */
header {
    background-color: #5D4037;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin:0;
    gap: 2rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

header nav a:hover {
    opacity: 0.8;
}

/* ===== CONTENU PRINCIPAL ===== */
.auth-container {
    max-width: 600px;
    margin: 12rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.1);
    margin-bottom: 2rem;
}

.auth-card h1 {
    color: #5D4037;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #5D4037;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #D7CCC8;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #8D6E63;
    box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.2);
    outline: none;
}

.is-invalid {
    border-color: #d32f2f !important;
}

.invalid-feedback {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-text {
    color: #795548;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* ===== CHECKBOX ===== */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    color: #5D4037;
}

.form-check-label a {
    color: #8D6E63;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #5D4037;
    color: white;
    width: 100%;
    padding: 1rem;
}

.btn-primary:hover {
    background-color: #3E2723;
}

/* ===== LIENS ===== */
.text-center {
    text-align: center;
}

.text-center a {
    color: #8D6E63;
    text-decoration: none;
    font-weight: 500;
}

.text-center a:hover {
    text-decoration: underline;
}

/* ===== FOOTER ===== */
footer {
    background-color: #5D4037;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-container {
        padding: 0 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    animation: fadeIn 0.5s ease-out;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 2rem;
    background-color: #f9f5f2;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(93, 64, 55, 0.1);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.auth-header {
    padding: 2rem;
    background-color: #5D4037;
    color: white;
    text-align: center;
}

.auth-header h1 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.auth-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-weight: 300;
}

/* Auth Form */
.auth-form {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #5D4037;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #D7CCC8;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #8D6E63;
    box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.2);
}

.is-invalid {
    border-color: #e74c3c !important;
}

.invalid-feedback {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.form-text {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.form-text a {
    color: #5D4037;
    text-decoration: none;
    transition: color 0.3s;
}

.form-text a:hover {
    color: #3E2723;
    text-decoration: underline;
}

/* Auth Button */
.btn-auth {
    width: 100%;
    padding: 1rem;
    background-color: #8D6E63;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.btn-auth:hover {
    background-color: #5D4037;
    transform: translateY(-2px);
}

/* Auth Footer */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: #7f8c8d;
}

.auth-footer a {
    color: #5D4037;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: #3E2723;
    text-decoration: underline;
}

/* Alert */
.alert {
    padding: 0.8rem 1rem;
    margin: 0 2rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: #fdecea;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
}