﻿/* ======= TYPOGRAPHIE DE BASE ======= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 56px;
}


/* ======= FOCUS ACCESSIBILITÉ ======= */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ======= NAVBAR ======= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 1030;
    background-color: #0d6efd;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
}

.navbar a {
    z-index: 1001;
    pointer-events: auto;
}

/* ======= SIDEBAR STANDARD ======= */
.sidebar1 {
    position: fixed;
    top: 56px;
    left: 0;
    width: 250px;
    height: calc(100vh - 56px);
    background-color: #e0f0ff !important;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
    z-index: 1000;
    padding: 20px;
    transition: all 0.3s ease-in-out;
}

    .sidebar1 .nav-link {
        color: #212529;
        font-size: 15px;
        border-radius: 5px;
        transition: all 0.2s;
    }

        .sidebar1 .nav-link:hover {
            background-color: #bbdefb;
            color: #000;
        }

        .sidebar1 .nav-link.active {
            background-color: #90caf9;
            font-weight: 500;
        }

/* ======= CONTENU PRINCIPAL ======= */
.content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 1rem;
    padding-top: 72px;
    flex-grow: 1;
    background-color: #ffffff;
    transition: all 0.3s ease-in-out;
    overflow-x: hidden;
}

/* ======= RESPONSIVE (MOBILE) ======= */
@media (max-width: 768px) {
    .content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem;
        padding-top: 72px;
        box-sizing: border-box;
    }

    .site-footer {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar1 {
        width: 80%;
        left: -100%;
        transition: left 0.3s ease-in-out;
    }

        .sidebar1.active {
            left: 0;
        }

    #toggleSidebar {
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        z-index: 1100;
    }
}

/* ======= LISTE PAR RÉGION ======= */
.Text1 {
    font-size: 25px;
    color: #00303d;
    font-weight: 500;
    margin-bottom: 1rem;
}

.Text2,
.btn-upload {
    width: 100%;
    background-color: white;
    color: black;
    border: 1px solid #00303d;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .btn-upload:hover {
        background-color: #0d6efd;
        color: white;
    }

    .btn-upload .icon-left,
    .btn-upload .icon-right {
        font-size: 1.2rem;
        color: #0d6efd;
        transition: color 0.3s ease;
    }

    .btn-upload:hover .icon-left,
    .btn-upload:hover .icon-right {
        color: white !important;
    }

/* ======= HERO SECTION ======= */
.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/accueil-immo.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    color: white;
}

/* ======= COMPOSANTS UTILES ======= */
blockquote {
    background: white;
    padding: 1.5rem;
    border-left: 5px solid #0d6efd;
    border-radius: 0.5rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.region-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-weight: 500;
    background-color: transparent;
    border: none;
    padding: 0.5rem;
    text-align: left;
}

    .region-btn:focus {
        outline: none;
        box-shadow: none;
    }

.collapse .list-group-item {
    font-size: 0.95rem;
}

.actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

/* ======= SIDEBAR COLLAPSÉ ======= */
.sidebar-collapsed {
    width: 60px !important;
    transition: width 0.3s ease;
}

    .sidebar-collapsed .nav-link {
        text-align: center;
    }

        .sidebar-collapsed .nav-link span,
        .sidebar-collapsed .dropdown-toggle::after {
            display: none !important;
        }

    .sidebar-collapsed .dropdown-menu {
        position: absolute;
        left: 60px;
        top: 0;
    }

    .sidebar-collapsed .nav-link i {
        font-size: 1.2rem;
        display: inline-block;
        text-align: left;
        width: 100%;
        padding-left: 8px;
        margin-left: -40px;
    }

/* ======= SIDEBAR COULEUR ALTERNATIVE ======= */
.sidebar-blue {
    background-color: #e0f0ff !important;
    min-height: 100vh;
    padding-top: 1rem;
    transition: background-color 0.3s ease;
}

    .sidebar-blue .nav-link {
        color: #000;
        font-weight: 500;
    }

        .sidebar-blue .nav-link:hover {
            background-color: #cce4ff;
            color: #000;
        }

/* ======= BOUTONS DYNAMIQUES ======= */
.btn-toggle {
    width: 100%;
    text-align: left;
    font-weight: 600;
}

/* ======= FOOTER ======= */
.site-footer {
    flex-shrink: 0;
    background-color: #0d6efd;
    color: white;
    padding: 1rem 0;
    text-align: center;
    transition: all 0.3s ease-in-out;
    width: 100%;
    margin-left: 0;
}

@media (min-width: 769px) {
    .layout-wrapper.sidebar-collapsed + .site-footer {
        width: 100% !important;
        margin-left: 0 !important;
    }
}


/* ======= STRUCTURE GLOBALE ======= */
.layout-wrapper {
    display: flex;
    flex-grow: 1;
    width: 100%;
}

    .layout-wrapper:not(.sidebar-hidden) .content {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .layout-wrapper.sidebar-hidden .content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .layout-wrapper.sidebar-hidden .sidebar1 {
        display: none !important;
    }

/* === STRUCTURE DE BASE === */
.layout-wrapper {
    display: flex;
    flex-grow: 1;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.sidebar1 {
    width: 250px;
    transition: all 0.3s ease-in-out;
}

    .sidebar1.collapsed {
        width: 70px !important;
        padding: 1rem 0.5rem !important;
        overflow: hidden;
    }

/* === CONTENU ADAPTATIF SELON LA LARGEUR DU SIDEBAR === */
.content {
    flex-grow: 1;
    padding: 1rem;
    padding-top: 72px;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

/* Cacher complètement le sidebar */
.layout-wrapper.sidebar-collapsed .sidebar1 {
    display: none !important;
}

/* Étendre le contenu sur toute la largeur */
.layout-wrapper.sidebar-collapsed .content {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Empêche le logo de bouger en position absolue */
.navbar .logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
    pointer-events: none; /* facultatif si tu ne veux pas cliquer dessus */
}

    .navbar .logo-container img,
    .navbar .logo-container span {
        pointer-events: auto; /* laisse les éléments internes cliquables */
    }

.navbar .navbar-nav .nav-item {
    margin-left: 0.5rem;
}

.navbar .navbar-nav .btn {
    padding: 0.4rem 1rem;
    line-height: 1.2;
}

/* ===== Boutons d'action compacts ===== */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-action i {
        font-size: 1rem;
        margin: 0;
    }

/* Responsivité mobile */
@media (max-width: 768px) {
    .actions-cell {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .btn-action {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

        .btn-action i {
            font-size: 1.1rem;
        }
}
.description {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Nombre de lignes visibles */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .description.expanded {
        -webkit-line-clamp: unset; /* Affiche tout */
    }

.toggle-description {
    font-size: 0.9rem;
    color: #0d6efd;
    cursor: pointer;
}
