/* ----------------------------------------------------------
   CHARTE GRAPHIQUE MRT · RGO365
   Luxe & élégance
   Couleurs : bleu profond #0a0f1e / or #d4af37
   Polices : Playfair Display (titres), Montserrat (texte)
---------------------------------------------------------- */

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0a0f1e;
    font-family: 'Montserrat', sans-serif;
    color: #eaeef2;
    line-height: 1.5;
}

h1, h2, h3, .logo, .logo-nav {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d4af37;
}

h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #d4af37;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #d4af37;
}

a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #eaeef2;
}

/* ---------- COULEURS & BORDURES ---------- */
.gold {
    color: #d4af37;
}

.gold-border {
    border-left: 3px solid #d4af37;
}

/* ---------- BOUTONS ---------- */
.btn-gold {
    display: inline-block;
    background: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-gold:hover {
    background: #d4af37;
    color: #0a0f1e;
}

.btn-outline {
    background: transparent;
    border: 1px solid #8f9bb3;
    color: #8f9bb3;
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: #d4af37;
    color: #d4af37;
}

/* ---------- FORMULAIRES ---------- */
.input-group {
    margin-bottom: 1rem;
    position: relative;
}

input[type="text"],
input[type="password"],
.form-control {
    width: 100%;
    background: #1e253a;
    border: none;
    padding: 12px 15px;
    color: #eaeef2;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, .form-control:focus {
    outline: none;
    background: #2a324b;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.password-group {
    display: flex;
    align-items: center;
}

.password-group input {
    flex: 1;
}

.toggle-pwd {
    background: transparent;
    border: none;
    color: #d4af37;
    font-size: 1.2rem;
    padding: 0 12px;
    cursor: pointer;
}

.forgot-password {
    text-align: right;
    margin: 0.5rem 0 1.5rem;
}

.forgot-password a {
    font-size: 0.85rem;
}

.error-message {
    color: #d4af37;
    text-align: center;
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* ---------- PAGE CONNEXION (LOGIN) ---------- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, #0a0f1e, #03050a);
}

.login-container {
    width: 100%;
    padding: 1rem;
}

.login-card {
    max-width: 450px;
    margin: 0 auto;
    background: #0e1424;
    padding: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.logo {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.logo .mrt {
    color: #eaeef2;
}

.logo .dot {
    color: #d4af37;
}

.logo .rgo {
    color: #eaeef2;
    font-size: 2rem;
}

.logo .gold {
    font-size: 2rem;
}

.signature {
    text-align: center;
    margin: 0.5rem 0 1rem;
}

.signature img {
    max-height: 70px;
    width: auto;
}

.login-card h2 {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #d4af37;
}

.fingerprint {
    margin-top: 1.5rem;
    text-align: center;
}

/* ---------- NAVBAR (DASHBOARD / RECHERCHE) ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #060913;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    flex-wrap: wrap;
}

.logo-nav {
    font-size: 1.6rem;
}

.nav-links a {
    color: #eaeef2;
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #d4af37;
}

/* ---------- CONTENEUR PRINCIPAL ---------- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

/* ---------- CARTES STATISTIQUES (DASHBOARD) ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: #0e1424;
    padding: 1.5rem;
    border-left: 4px solid #d4af37;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.stat-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #b0b8c5;
    font-family: 'Montserrat', sans-serif;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: #d4af37;
    font-family: 'Playfair Display', serif;
}

/* ---------- GRAPHIQUES ---------- */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.chart-card {
    background: #0e1424;
    padding: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ---------- TABLEAUX (RELEVÉS, CHÈQUES) ---------- */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #0e1424;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #1f2538;
}

.table th {
    color: #d4af37;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.table tr:hover {
    background: #1a1f30;
}

/* ---------- SECTION RECHERCHE ---------- */
.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
    background: #1e253a;
    border: none;
    padding: 12px;
    color: #eaeef2;
}

.search-box input:focus {
    outline: none;
    background: #2a324b;
}

.appartement-card {
    background: #0e1424;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #d4af37;
}

.appartement-card p {
    margin-bottom: 0.5rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links a {
        margin: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }

    .search-box {
        flex-direction: column;
    }

    .login-card {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* ---------- MESSAGES D'ERREUR / INFO ---------- */
.info-message {
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid #d4af37;
    padding: 1rem;
    margin: 1rem 0;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card, .chart-card, .appartement-card {
    animation: fadeIn 0.4s ease-out;
}