﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
a{text-decoration:none !important;}

body {
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    background: #f4f4f4;
    color: #222;
}

/* ── NAVBAR ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 0 30px;
    height: 50px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    color: #222;
}

.navbar-links a {
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: 28px;
    padding-bottom: 4px;
}

    .navbar-links a:hover {
        color: #222;
    }

    .navbar-links a.active {
        color: #2d7dd2;
        border-bottom: 2px solid #2d7dd2;
    }

/* ── CONTENU ── */
.page-content {
    padding: 30px 40px;
    max-width: 1800px;
    margin: 0 auto;
}

h1 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 20px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ── CARDS DASHBOARD ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e5e5e5;
}

    .stat-card .stat-value {
        font-size: 32px;
        font-weight: 700;
        color: #222;
    }

    .stat-card .stat-label {
        font-size: 13px;
        color: #888;
        margin-top: 4px;
    }

/* ── TABLE BÂTIMENTS ── */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

    table th {
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
    }

    table td {
        padding: 10px 12px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }

    table tr:last-child td {
        border-bottom: none;
    }

    table tr:hover td {
        background: #fafafa;
    }

    table a {
        color: #2d7dd2;
        text-decoration: none;
    }

/* ── BADGES ÉTAT ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-bon {
    background: #e6f4ea;
    color: #2e7d32;
}

.badge-moyen {
    background: #fff8e1;
    color: #f57c00;
}

.badge-degrade {
    background: #fdecea;
    color: #c62828;
}

.badge-travaux {
    background: #e3f2fd;
    color: #1565c0;
}

/* ── FORMULAIRES ── */
.form-group {
    margin-bottom: 16px;
}

    .form-group label {
        display: block;
        font-size: 13px;
        color: #555;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 9px 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        background: #f9f9f9;
        color: #222;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #2d7dd2;
            background: #fff;
        }

/* ── BOUTONS ── */
.btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #2d7dd2;
    color: #fff;
}

    .btn-primary:hover {
        background: #1a6abf;
    }

.btn-danger {
    background: #e53935;
    color: #fff;
}

.btn-secondary {
    background: #eee;
    color: #333;
}

/* ── ALERTES ── */
.alert-error {
    background: #fdecea;
    color: #c62828;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ── PAGE LOGIN ── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
}

.login-left-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 60px;
    justify-content: center;
}

    .login-left-overlay h1 {
        color: #fff;
        font-size: 36px;
        font-weight: 700;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }

    .login-left-overlay p {
        color: rgba(255,255,255,0.85);
        font-size: 15px;
    }

.login-right {
    width: 480px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 50px;
}

    .login-right h2 {
        font-size: 24px;
        font-weight: 400;
        margin-bottom: 30px;
        color: #333;
    }

    .login-right .form-group label {
        color: #666;
    }

@media (max-width: 700px) {
    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
    }
}

.vignette {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.2s;
    cursor: pointer;
}

    .vignette:hover {
        transform: scale(7.5);
        z-index: 10;
        position: relative;
        transform-origin: left center;
    }


/* Bouton caméra visible uniquement sur mobile/tablette */
.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: inline-flex;
    }
}

/* ── RESPONSIVE ─────────────────────────────── */

/* Tablette paysage et moins */
@media (max-width: 1024px) {
    .page-content {
        padding: 20px 20px;
    }

    /* Grilles 2 colonnes → 1 colonne */
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Tablette portrait et mobile */
@media (max-width: 768px) {
    .page-content {
        padding: 14px 12px;
    }

    /* Navbar : masquer les liens, afficher menu burger */
    .navbar-links {
        display: none;
    }

        .navbar-links.open {
            display: flex;
            flex-direction: column;
            position: fixed;
            top: 50px;
            left: 0;
            right: 0;
            background: #fff;
            border-bottom: 1px solid #ddd;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            padding: 10px 20px;
            z-index: 9999;
            gap: 0;
        }

            .navbar-links.open a {
                padding: 10px 0;
                border-bottom: 0.5px solid #eee;
                margin: 0;
            }

    .burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 8px;
    }

        .burger span {
            display: block;
            width: 22px;
            height: 2px;
            background: #333;
            border-radius: 2px;
        }

    /* Toutes les grilles → 1 colonne sur mobile */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Stats dashboard */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Photos 6 colonnes → 4 sur mobile */
    div[style*="repeat(6"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Table responsive : scroll horizontal */
    .card {
        overflow-x: auto;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 16px;
    }

    /* Login */
    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
        padding: 30px 20px;
    }
}

/* Mobile portrait uniquement */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    div[style*="repeat(6"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Burger : caché sur desktop, visible sur mobile */
@media (min-width: 769px) {
    .burger {
        display: none;
    }
}


.btn-blue-dash {
    background: #2f80ed;
    color: #fff;
    border: none;
    padding: 3px 7px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.btn-green-dash {
    background: #21870e;
    color: #fff;
    border: none;
    padding: 3px 7px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.btn-grey-dash {
    background: #889fbf;
    color: #fff;
    border: none;
    padding: 3px 7px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.btn-blue {
    background: #2f80ed;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

    .btn-blue:hover {
        background: #1c6fdc;
        color: #fff;
    }


.btn-red {
    background: #e60000;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

    .btn-red:hover {
        background: #c40000;
        color: #fff;
    }


.btn-grey {
    background: #777;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

    .btn-grey:hover {
        background: #5f5f5f;
        color: #fff;
    }

.btn-or {
    background: #e78632;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

    .btn-or:hover {
        background: #c17430;
        color: #fff;
    }