/* public/css/style.css */

/* --- Variables de couleurs (Thème Moderne/Crypto Premium) --- */
:root {
    --primary-color: #FCD535; /* Jaune Binance */
    --primary-dark: #E0B91C;
    --primary-glow: rgba(252, 213, 53, 0.25); /* Halo lumineux jaune */
    --bg-dark: #0B0E11;       /* Fond principal très profond */
    --bg-card: #181A20;       /* Fond des cartes (légèrement plus clair) */
    --bg-input: #2B3139;      /* Fond des champs de saisie */
    --text-main: #EAECEF;     /* Texte clair principal */
    --text-muted: #848E9C;    /* Texte secondaire grisé */
    --success: #0ECB81;       /* Vert Crypto */
    --success-glow: rgba(14, 203, 129, 0.25);
    --danger: #F6465D;        /* Rouge Crypto */
    --danger-glow: rgba(246, 70, 93, 0.25);
    --border-color: #2B3139;  /* Bordures subtiles */
}

/* --- Reset de base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Rend le texte plus net */
}

/* --- Barre de navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    padding: 15px 50px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar .logo a {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* --- BOUTONS MODERNES (Le cœur de ton design) --- */
.btn, .btn-deposit, .btn-register, button {
    background-color: var(--primary-color);
    color: #000 !important;
    padding: 12px 24px;
    border-radius: 8px; /* Coins modernisés */
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animation ultra fluide */
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Effet au survol : le bouton se soulève et s'illumine */
.btn:hover, .btn-deposit:hover, .btn-register:hover, button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px var(--primary-glow);
}

/* Bouton Achat (Vert) */
.btn-buy { 
    background-color: var(--success); 
    color: white !important; 
}
.btn-buy:hover { 
    background-color: #0ba86b;
    box-shadow: 0 8px 15px var(--success-glow); 
}

/* Bouton Vente / Retrait (Rouge) */
.btn-sell, .btn-withdraw { 
    background-color: var(--danger); 
    color: white !important; 
}
.btn-sell:hover, .btn-withdraw:hover { 
    background-color: #d73a4c;
    box-shadow: 0 8px 15px var(--danger-glow); 
}

.btn-logout {
    color: var(--danger) !important;
    font-weight: bold;
}

/* --- Conteneur Principal --- */
.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 75vh;
}

/* --- En-têtes de pages --- */
.page-header {
    margin-bottom: 30px;
}
.page-header h2 {
    font-size: 32px;
    color: var(--text-main);
    font-weight: 700;
}
.page-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 5px;
}

/* --- CARTES ET BLOCS (Design flottant) --- */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.wallet-card, .p2p-card, .auth-container, .trade-details, .trade-chat {
    background-color: var(--bg-card);
    border-radius: 12px; /* Plus doux */
    padding: 24px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Animation au survol des cartes */
.wallet-card:hover, .p2p-card:hover {
    transform: translateY(-5px);
    border-color: #4a515c;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.wallet-header, .p2p-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.currency-code {
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

/* --- FORMULAIRES ET INPUTS (Design Premium) --- */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input, .form-group select, .chat-input-area input {
    width: 100%;
    padding: 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Effet lumineux quand on clique dans un champ */
.form-group input:focus, .form-group select:focus, .chat-input-area input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: #1E2329;
}

/* --- Badges et Petits détails --- */
.badge-method {
    background-color: var(--bg-input);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

/* --- Messages Flash (Alertes) --- */
.alert-message {
    animation: slideDown 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 25px;
    background-color: var(--bg-dark);
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* --- RESPONSIVITÉ MOBILE (Écrans < 768px) --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column; 
        padding: 20px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-top: 20px;
    }
    .main-container {
        margin: 20px auto;
    }
    .wallet-grid {
        grid-template-columns: 1fr;
    }
    .hero-section h1 {
        font-size: 1.8rem !important;
    }
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}