:root {
    --primary-color: #FFD407;
    --secondary-color: #1C95CF;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --dark-color: #1B1C1D;
    --light-bg: #f8f9fa;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
    --border-radius: 16px;
    --border-radius2: 25px;
}
/* Gardez seulement Regular + Bold */
@font-face {
    font-family: 'Open Sans';
    src: url("../fonts/OpenSans-Regular-6094bb1188219fc18f8e6a44a53025f1.ttf") format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url("../fonts/OpenSans-Bold-e54416189f74fcab0927c5722d84bdc6.ttf") format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    background-color: #f2f2f2;
}
.sidebar {
    width: 80px;
    background-color: #ffffff;
    height: 100vh;
    position: fixed;
    color: #ffffff;
    padding-top: 1rem;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
    --tw-shadow-colored: 0 1px 3px 0 var(#000), 0 1px 2px -1px var(#000);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);
}
.sidebar i {
    display: block;
    text-align: center;
    font-size: 1.5rem;
    margin: 0.7rem 0;
    cursor: pointer;
    color: #18181b;
    opacity: 0.4;
}
.sidebar .active i, .sidebar i:hover {
    opacity: 1;
}
.content {
    margin-left: 80px;
    display: flex;
    height: 100vh;
}
.left-panel {
    width: 400px;
    background-color: #f2f2f2;
    padding: 2rem;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}
.left-panel-2 {
    width: 600px;
    background-color: #f2f2f2;
    padding: 2rem;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}
.full-panel {
    width: 100%;
    background-color: #f2f2f2;
    padding: 2rem;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}
.alert {
    border-radius: var(--border-radius2);
}
.map {
    flex-grow: 1;
    min-height: 400px;
}
#map {
    height: 100%;
    width: 100%;
}
.invoice {
    padding: 2rem;
    flex-grow: 1;
    min-height: 400px;
}
#profileAccordion .accordion-item:first-child, #profileAccordion .accordion-item:first-child .accordion-button {
    border-top-left-radius: var(--border-radius2);
    border-top-right-radius: var(--border-radius2);
}
#profileAccordion .accordion-item:last-child, #profileAccordion .accordion-item:last-child .accordion-button.collapsed, #profileAccordion .accordion-item:last-child .accordion-body {
    border-bottom-left-radius: var(--border-radius2);
    border-bottom-right-radius: var(--border-radius2);
}

#profileAccordion .accordion-body {
    background-color: #fcfcfc;
}
.btn-yellow {
    background-color: #ffd407;
    color: #18181b;
}
.btn-yellow:hover, .btn-yellow:active, .btn-yellow:focus {
    background-color: #ffdb0d;
    color: #18181b;
}
.btn-black {
    background-color: #18181b;
    color: #ffffff;
}
.btn-black:hover, .btn-black:active, .btn-black:focus {
    background-color: #27272a;
    color: #ffffff;
}
.btn-outline-dark-custom {
    background-color: transparent;
    border-color: #18181b;
    color: #18181b;
}
.btn-outline-dark-custom:hover, .btn-outline-dark:active, .btn-outline-dark:focus {
    background-color: #27272a0d;
    border-color: #18181b;
    color: #18181b;
}
.hr-yellow {
    opacity: 1;
    border-color: #ffd407;
}
.sidebarLogo{
    max-width: 60px;
}
.sidebar-tooltip {
    --bs-tooltip-bg: #ffd407;
    --bs-tooltip-color: #18181b;
    font-weight: bold;
}
input.customInput{
    border: 0;
    border-bottom: 1px solid #aac8f4;
    border-radius: 0;
}
li .page-link{
    color: #18181b;
}
li .page-link:hover, li .page-link:focus{
    background-color: #eee;
    color: #18181b;
}
li.active .page-link{
    background-color: #ffd407;
    border-color: #ffd407;
    color: #18181b;
}
.dropdown-item.active, .dropdown-item:active{
    color: #18181b;
    text-decoration: none;
    background-color: #ffd407;
}
.dropdown-menu{
    border-radius: var(--border-radius2);
    padding: 10px;
}
.dropdown-item{
    white-space: break-spaces;
    border-radius: var(--border-radius2);
}
.input-group>.form-control {
    border-top-left-radius: var(--border-radius2);
    border-bottom-left-radius: var(--border-radius2);
}
.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-right-radius: var(--border-radius2);
    border-bottom-right-radius: var(--border-radius2);
}
.firstPageItem.page-item:first-child .page-link {
    border-top-left-radius: var(--border-radius2);
    border-bottom-left-radius: var(--border-radius2);
}
.lastPageItem.page-item:last-child .page-link {
    border-top-right-radius: var(--border-radius2);
    border-bottom-right-radius: var(--border-radius2);
}
.customToast {
    z-index: 999;
    top: 50px;
    right: 50px;
    border-radius: var(--border-radius2);
}
.toast-container {
    z-index: 1056;
    bottom: 100px;
    left: 20px;
}
.modal-body .modal-map {
    height: 800px;
    width: 100%;
    position: relative;
}
#addRoofMap {
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
}
.rounded-full {
    border-radius: 9999px;
}
.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.card-header:first-child{
    border-radius: 25px 25px 0 0;
    border-bottom: 0;
}
.card-footer:last-child{
    border-radius: 0 0 25px 25px;
    border-top: 0;
}
.card{
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
    --tw-shadow-colored: 0 1px 3px 0 var(#000), 0 1px 2px -1px var(#000);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);
    border-radius: 25px;
}

.swal2-container h2.swal2-title{
    font-size: 1.4em;
}
.swal2-container .swal2-html-container{
    font-size: 1em;
}
.swal2-container .swal2-cancel, .swal2-container .swal2-confirm, .swal2-container .swal2-deny{
    padding: 5px 10px;
}
.btn{
    font-size: 1em;
}

.restricted-cursor {
    cursor: not-allowed !important;
}

.form-floating {
    position: relative;
}

.form-floating > .form-select,
.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    min-height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem 0.25rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem 0.75rem;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: rgba(var(--bs-body-color-rgb), 0.65);
}

.form-floating > label > i {
    pointer-events: auto; /* Autorise le survol et le clic */
    cursor: help;         /* Indique visuellement qu'il y a une aide */
    position: relative;   /* Nécessaire pour le z-index */
    z-index: 5;           /* S'assure que l'icône passe visuellement au-dessus de l'input */
}

.form-floating > .form-select:focus ~ label,
.form-floating > .form-select:not(:placeholder-shown) ~ label,
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > .form-select {
    /*padding-top: 1.625rem;
    padding-bottom: 0.625rem;*/
    height: 40px;
    min-height: 40px;
    padding: 0 0.75rem;
}

.form-floating > .form-select ~ label {
    padding-top: 1rem;
    padding-bottom: 0.625rem;
}

/* États de validation */
.form-floating > .form-select.is-valid,
.form-floating > .form-control.is-valid {
    border-color: #198754;
}

.form-floating > .form-select.is-invalid,
.form-floating > .form-control.is-invalid {
    border-color: #dc3545;
}

/* Personnalisations */
.form-floating > .form-select:focus,
.form-floating > .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-floating.custom-floating > label {
    color: #0d6efd;
    font-weight: 500;
}

.form-floating.custom-floating > .form-select:focus ~ label {
    color: #0d6efd;
}
.invalid-feedback {
    margin: .5rem 0;
}
.form-floating > .form-select:focus, .form-floating > .form-control:focus {
    box-shadow: none;
}
.form-floating>.form-control-plaintext:focus, .form-floating>.form-control-plaintext:not(:placeholder-shown), .form-floating>.form-control:focus, .form-floating>.form-control:not(:placeholder-shown) {
    padding-bottom: 0;
}
.form-check-input:checked{
    background-color: #ffd407;
    border-color: #ffd407;
    .statsFromData ul {
        margin-bottom: 0;
    }
}
.statsFromData ul {
    margin-bottom: 0;
    list-style: none;
}
.card-gradient {
    background: linear-gradient(135deg, #ffd407 0%, #ff9407 100%);
    color: white;
}
.accordion-button:not(.collapsed){
    background-color: #eeeeee;
    color: inherit;
    font-weight: 600;
}
.accordion-button.collapsed {
    background-color: #eeeeee;
    font-weight: 600;
}
.bg-primary {
    background-color: #ffd407!important;
}
.form-floating>.form-control.customFileInput {
    padding-top: 1.925rem;
}
.card-title{
    color: var(--dark-color);
    font-weight: 600;
}
.btn-circle {
    width: 36px;         /* Définir une largeur fixe */
    height: 36px;        /* Définir une hauteur fixe */
    padding: 0;          /* Supprimer le padding par défaut */
    display: flex;
    align-items: center;
    justify-content: center;
}
.customFormCheck .form-check {
    display: inline-block;
}
@media screen and (max-width: 992px) {
    .profilePage .left-panel-2 {
        width: 100%;
    }
}
@media screen and (max-width: 768px) {
    .full-panel, .left-panel {
        padding: 1rem;
    }
}

@media screen and (max-width: 767px) {
    /* --- 1. LA TOPBAR --- */
    .sidebar {
        width: 100%;
        height: auto;
        min-height: 70px;
        position: fixed;
        top: 0;
        left: 0;
        /* On garde l'arrondi en bas seulement */
        border-radius: 0 0 25px 25px;
        padding: 10px 0; /* Moins de padding horizontal pour coller aux bords */
        z-index: 1050;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        /* Transition fluide lors de l'ouverture */
        transition: all 0.3s ease-in-out;
    }

    /* Header (Logo + Burger) */
    #sidebarHeader {
        padding: 0 20px; /* Padding interne pour le header */
    }

    /* Logo plus petit sur mobile */
    .sidebarLogo {
        max-width: 45px;
    }

    /* --- 2. LE MENU DÉROULANT --- */

    /* Conteneur des liens quand ouvert */
    #sidebarContent {
        margin-top: 15px;
        padding-bottom: 10px;
        border-top: 1px solid #eee; /* Petite séparation subtile */
    }

    /* Style de CHAQUE LIEN (la ligne entière) */
    .sidebar-link {
        display: flex !important; /* Force l'alignement horizontal icône + texte */
        align-items: center;
        width: 100%;
        padding: 12px 30px; /* Espace confortable pour le doigt */
        text-decoration: none;
        color: #18181b;
        transition: background-color 0.2s;
    }

    /* Effet au survol ou clic sur mobile */
    .sidebar-link:hover, .sidebar-link:active {
        background-color: #f8f9fa; /* Gris très clair */
    }

    /* Lien actif (page courante) */
    .sidebar-link.active {
        background-color: #fff8d6; /* Fond jaune très pâle */
        color: #000;
        font-weight: 600;
    }
    .sidebar-link.active i {
        opacity: 1;
        color: #000;
    }

    /* Style de l'ICÔNE dans le menu mobile */
    .sidebar i {
        font-size: 1.4rem;
        margin: 0 !important; /* On enlève les grosses marges du desktop */
        width: 30px; /* Largeur fixe pour aligner le texte verticalement */
        text-align: center;
        opacity: 0.6;
    }

    /* Le texte à côté de l'icône */
    .sidebar-link span {
        font-size: 1rem;
        color: #333;
    }

    /* --- 3. LE CONTENU DE LA PAGE --- */
    .content {
        margin-left: 0;
        padding-top: 85px; /* On pousse le contenu sous la barre fixe */
        flex-direction: column;
    }

    /* Ajustements cartes/panels */
    .left-panel, .left-panel-2, .full-panel {
        width: 100% !important;
        padding: 1rem;
        height: auto;
        overflow: visible;
        padding-bottom: 82px;
    }

    .map {
        height: 400px;
        min-height: 400px;
    }
}