html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
}

a {
    text-decoration: none;
}

/* ========================= */
/* 🔹 FOCUS */
/* ========================= */
.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;
}

/* ========================= */
/* 🔹 PAGE (ZONE / EMPLACEMENT) */
/* ========================= */
.page-flex {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.bloc-plan {
    flex: 2;
}

.bloc-info {
    flex: 1;
    font-size: 14px;
}

#plan {
    width: 100%;
    height: auto;
    display: block;
}


/* ========================= */
/* 🔹 FICHE EMPLACEMENT */
/* ========================= */
.fiche-flex {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.fiche-left {
    flex: 2;
}

.fiche-info {
    flex: 1;
}

/* PLAN */
#zonePlan {
    position: relative;
}

/* ========================= */
/* 🔹 PHOTOS */
/* ========================= */
.photos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-item {
    position: relative;
}

    .photo-item img {
        width: 100px;
        cursor: pointer;
    }

.btn-del {
    position: absolute;
    top: 0;
    right: 0;
    background: red;
    color: white;
    padding: 2px 5px;
    text-decoration: none;
}

/* ========================= */
/* 🔹 BLOCS */
/* ========================= */
.bloc-section {
    margin-top: 15px;
}

/* ========================= */
/* 🔹 COULEURS (LÉGENDE) */
/* ========================= */
.c {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
}

.c-green {
    background: green;
}

.c-blue {
    background: blue;
}

.c-orange {
    background: orange;
}

.c-red {
    background: red;
}

/* ========================= */
/* 🔹 RESPONSIVE GLOBAL */
/* ========================= */
@media (max-width: 900px) {

    .page-flex,
    .fiche-flex {
        flex-direction: column;
    }

    .bloc-plan,
    .bloc-info,
    .fiche-left,
    .fiche-info {
        width: 100%;
    }

    #plan {
        max-width: 100%;
    }
}





/* ========================= */
/* 🔹 LOGIN */
/* ========================= */

.login_page {
    display: flex;
    height: 100vh;
}

.login_left {
    flex: 1;
    background: url('/images/fond.jpg') center center;
    background-size: cover;
    position: relative;
}

    .login_left::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.35);
    }

    /* TEXTE GAUCHE */
    .login_left .overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: white;
        text-align: center;
        z-index: 2;
    }

    .login_left h1 {
        font-size: 48px;
        margin: 0;
        letter-spacing: 2px;
    }

    .login_left p {
        margin-top: 10px;
        font-size: 18px;
        opacity: 0.9;
    }

/* PARTIE DROITE */
.login_right {
    width: 440px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BOX LOGIN */
.login_box {
    width: 80%;
}

    .login_box h2 {
        margin-bottom: 20px;
    }

h2 {
    font-weight: 400;
}

    /* INPUT LOGIN (on surcharge sans casser bootstrap) */
    .login_box input {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
    }

    /* BOUTON */
    .login_box button {
        width: 100%;
        padding: 12px;
        background: #2484ff;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

        .login_box button:hover {
            background: #2257a3;
        }

/* ERREUR */
.erreur {
    color: #c62828;
    margin-top: 10px;
}

/* RESPONSIVE LOGIN */
@media (max-width:768px) {
    

    .login_right {
        width: 100%;
    }
}



/* RESET GLOBAL */
body {
    margin: 0;
    padding: 0;
}

/* pleine largeur */
.main-container {
    width: 100%;
    padding: 10px 10px;
    box-sizing: border-box;
}



@media (max-width:768px) {

    table tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 8px;
    }

    table td {
        display: block;
        border: none;
        padding: 3px 0;
    }

    table th {
        display: none;
    }
}
      

/* LOGOUT */
.logout {
    margin-left: 0px;
    color: #777;
}


body {
    position: relative;
    background: #f5f5f5;
}

 
/* wrapper */
.plan-wrapper
{
    display:flex;
    justify-content:center;
    align-items:center;

    height:calc(100vh - 120px);
}

/* image */
#planImage
{
    max-height:100%;
    max-width:100%;

    width:auto;
    height:auto;

    object-fit:contain;

    display:block;

    box-shadow:0 4px 12px rgba(0,0,0,0.15);
    border-radius:6px;
}

.adex_bloc {
    background: white !important;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.15s, box-shadow 0.15s;
}

/* ========================= */
/* 🔹 FICHE 3 COLONNES */
/* ========================= */

.fiche-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
}

/* colonnes */
.col-plan,
.col-form,
.col-media {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* inputs */
.input-full {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* bouton */
.btn-save {
    width: 100%;
    padding: 12px;
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 5px;
}

/* photos */
.photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .photos img {
        width: 100%;
        max-width: 160px;
        cursor: pointer;
        border-radius: 4px;
    }

/* PLAN */
#zonePlan {
    position: relative;
}



/* RESPONSIVE */
@media (max-width:1000px) {
    .fiche-3col {
        grid-template-columns: 1fr;
    }
}



#zonePlan {
    position: relative;
    display: inline-block;
    transform-origin: top left;
    cursor: grab;
    user-select: none;
}

    #zonePlan.dragging {
        cursor: grabbing;
    }



#canvas {
    position: absolute;
    left: 0;
    top: 0;
}
.uc {
    text-transform: uppercase;
}

.button-del {
    background: red;
    color: white;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: bold;
}
.input100 {
    width: 100%;
}
.table-hover tr:hover {
    background: #f2f7ff;

}
.c-yellow {
    background: rgba(255,220,0,0.7);
}

.c-grey {
    background: rgba(120,120,120,0.6);
}

.menuDisabled {
    color: #999;
    pointer-events: none;
}
.defunt.concession {
    background: #e8f5e9;
}

.defunt.hors {
    background: #fffde7;
}

.defunt.archive {
    background: #eeeeee;
    color: #777;
}




/* MOBILE */
@media (max-width:700px) {

    table.responsive-table thead {
        display: none;
    }

    table.responsive-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
    }

    table.responsive-table td {
        display: block;
        padding: 5px 0;
    }

    .col-actions {
        display: none;
    }

    .mobile-actions {
        display: block;
        margin-top: 5px;
    }
}

.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;
    }

.table-concessions{
    margin-top: 0px;
}

    /* ligne plus aérée */
    .table-concessions tr td {
        padding: 5px 0px;
        vertical-align: bottom;

    }
    /* boutons espacés */
    .actions a {
        display: inline-block;
        margin-right: 8px;
        margin-bottom: 5px;
    }
    /* responsive */
    @media (max-width:700px) {
        .table-concessions tr td {
            padding: 0px 0px;
            vertical-align: top;
        }

        .table-concessions .btn-blue, .btn-or, .btn-red {
            padding: 3px 3px;
        }

        .table-concessions tr {
            display: block;
            border-bottom: 2px solid #ddd;
            margin-bottom: 10px;
            padding-bottom: 10px;
           
        }

        .table-concessions td {
            display: block;
            width: 100%;

        }

        .actions a {
            display: inline-block;
            margin-right: 5px;
            margin-bottom: 6px;
        }
    }

    .table-concessions tr:hover {
        background: #fcffc8;
    }

    .mobile-only {
        display: none;
    }

    @media screen and (max-width: 1024px) {
        .mobile-only {
            display: inline-block;
        }
    }

    .bloc-histo-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .bloc-histo-grid2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 20px;
    }

    .col-histo {
        border: 1px solid #ddd;
        padding: 10px;
        background: #fafafa;
    }
    /* responsive */
    @media (max-width: 900px) {
        .bloc-histo-grid {
            grid-template-columns: 1fr 1fr;
        }
    }

    @media (max-width: 500px) {
        .bloc-histo-grid,
        .bloc-histo-grid2 {
            grid-template-columns: 1fr;
        }
    }

    #pophistory h3 {
        font-size: 18px;
    }

    .layout-2col {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 20px;
    }

    @media(max-width:900px) {
        .layout-2col {
            grid-template-columns: 1fr;
        }
    }

    #menuContextuel {
        user-select: none;
    }

    .login_page {
        display: flex;
        min-height: 100vh;
    }

    .login_left,
    .login_right {
        width: 50%;
    }

    .login_left {
        background-size: cover;
        background-position: center;
        position: relative;
    }

        .login_left .overlay {
            position: absolute;
            bottom: 20px;
            left: 20px;
            color: #fff;
        }
    /* MOBILE */
    @media screen and (max-width: 768px) {

        .login_page {
            flex-direction: column;
        }

        .login_left,
        .login_right {
            width: 100%;
        }

        .login_left {
            max-height: 320px;
            height: 320px;
        }

        .login_right {
            padding: 20px;
        }

        .login_box {
            width: 100%;
        }
    }

    #planImg {
        width: 100%;
        height: auto;
    }
    /* ========================= */
    /* 🔹 TOPBAR CLEAN */
    /* ========================= */

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        background: white;
        border-bottom: 1px solid #e5e5e5;
    }
    /* LOGO */
    .topbar-left {
        font-size: 18px;
        font-weight: 600;
        color: #222;
    }
    /* MENU */
    .topbar-center {
        display: flex;
        gap: 15px;
        
    }



        .topbar-center a {
            color: #444;
            font-size: 14px;
            text-transform: uppercase;
            position: relative;
            
        }
            /* hover */
            .topbar-center a:hover {
                color: #000;
            }
            /* actif */
            .topbar-center a.active {
                color: #2484ff;
                font-weight: 600;
            }

                .topbar-center a.active::after {
                    content: "";
                    position: absolute;
                    left: 0;
                    bottom: -6px;
                    width: 100%;
                    height: 3px;
                    background: #2484ff;
                }


    /* BURGER */
    .burger {
        display: none;
        font-size: 22px;
        cursor: pointer;
    }
    /* ========================= */
    /* 🔹 MOBILE */
    /* ========================= */
#closemenux {
    display: none;
}
    @media (max-width:768px) {
        .topbar-center .amenu::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -6px;
            width: 100%;
            height: 1px;
            background: #ccc;
        }
        .burger {
            display: block;
        }
        #closemenux {
            display: block;
        }

        .topbar-center {
            display: none;
            position: absolute;
            top: 50px;
            left: 0;
            width: 100%;
            background: #f7f6f6;
            flex-direction: column;
            padding: 10px;
            border-top: 1px solid #ccc;
        }

            .topbar-center.show {
                display: flex;
            }
    }

    .card {
        background: white;
        padding: 20px;
        border-radius: 10px;
        min-width: 180px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        font-size: 18px;
    }

    .legend.big div {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .legend.big a {
        text-decoration: none;
        color: inherit;
    }

        .legend.big a:hover {
            text-decoration: underline;
        }

    .bloc-info {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        margin-top: 20px;
    }

        .bloc-info h3 {
            margin-bottom: 10px;
        }

    .dashboard {
        display: flex;
        gap: 30px;
        margin-top: 20px;
    }

    .dash-right {
        width: 70%;
    }

    .dash-left {
        width: 30%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .dash-left img {
            max-height: 100%;
        }

        .dash-left img {
            width: 100%;
            border-radius: 10px;
        }



    @media (max-width: 800px) {
        .dashboard {
            flex-direction: column;
        }

        .dash-left, .dash-right {
            width: 100%;
        }
    }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-conc {
    width: 100%;
    border-collapse: collapse;
}
.table-conc tr:hover {
    background: #fcffc8;
}

    .table-conc th,
    .table-conc td {
        padding: 5px;
        border-bottom: 1px solid #ddd;
        text-align: left;
    }

    .table-conc th {
        background: #f5f5f5;
    }

/* MOBILE */
@media (max-width: 700px) {

    .table-conc thead {
        display: none;
    }

    .table-conc tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 8px;
    }

    .table-conc td {
        display: block;
        border: none;
        padding: 0px 0;
    }

        

        .table-conc td:nth-child(3):before {
            content: "Concessions";
        }

        
}

.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;
}

.dashboard a.btn-green-dash:hover {
    color: #fff !important;
}