/* public/css/style.css */

/* 1. VARIABLES ET RESET */
:root {
    --creme: #FDF5E6;
    --cafe: #4B3621;
    --or: #D4AF37;
    --or-clair: #F9E076;
    --blanc: #ffffff;
    --gris-texte: #666666;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--creme);
    color: var(--cafe);
    min-height: 100vh;
}

/* 2. COMPOSANTS GÉNÉRIQUES (Utilisables partout) */

h1, h2 {
    font-family: 'Playfair Display', serif;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--cafe);
    color: var(--or-clair);
}

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

/* 3. LAYOUT : LOGIN / REGISTER (Centré) */

/* On utilise une classe spécifique pour le mode "centré" du login */
body.auth-mode {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: var(--blanc);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(75, 54, 33, 0.2);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--or);
    animation: fadeIn 0.6s ease-out;
}

/* 4. LAYOUT : DASHBOARD (Navigation & Contenu) */

.navbar {
    background-color: var(--cafe);
    color: var(--or-clair);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar h2 {
    margin: 0;
    font-size: 1.5rem;
}

.main-content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.welcome-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(75, 54, 33, 0.1);
    text-align: center;
    border: 1px solid var(--or);
}

/* 5. FORMULAIRES */

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--or);
}

/* 6. ÉLÉMENTS D'INTERFACE (Messages, Badges, etc.) */

.toggle-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.toggle-link a {
    color: var(--or);
    text-decoration: none;
    font-weight: bold;
}

#message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
    font-size: 0.9rem;
}

.error { background-color: #f8d7da; color: #721c24; display: block !important; }
.success { background-color: #d4edda; color: #155724; display: block !important; }

.user-info {
    color: var(--gris-texte);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--or);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* 7. ANIMATIONS */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}