:root {
    /* Couleurs principales */
    --primary: #0c71c3;  /* #4CB6D9; */
    --primary-dark: #0c68b3; /* #3ca5c8; */
    --primary-light: #e3f2fd;
    
    /* Couleurs secondaires */
    --secondary: #2196F3;
    --secondary-dark: #1976D2;
    --secondary-light: #BBDEFB;
    
    /* Couleurs de texte */
    --text-primary: #2c3e50;
    --text-secondary: #666;
    --text-light: #fff;
    
    /* Couleurs de fond */
    --bg-primary: #fff;
    --bg-secondary: #f5f5f5;
    
    /* Couleurs d'état */
    --success: #059669;
    --success-light: #ecfdf5;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --info: #3b82f6;
    --info-light: #eff6ff;

    /* Couleurs des bordures */
    --border-color: #ddd;
    --border-color-dark: #b5b5b5;

    /* Layers */
    --layer-dashboard: #2c3e50;
    --layer-clubs: #000; /*#fd9500*/
    --layer-clubs-light: #666;
    --layer-starters: #e3e306; /*#FF6B6B;*/
    --layer-starters-light: #f8f8a0;
    --layer-immonitys: #009176;
    --layer-immonitys-light: #6b9c92;
    --layer-professionals: #0c71c3;
    --layer-professionals-light: #5a9bcf;
    --layer-announcements: #dd0000;
    --layer-announcements-light: #dd9393;
    --layer-params: #3ca5c8;
    --layer-profile: #2c3e50;
    --layer-cluster-small: #999;
    --layer-cluster-medium: #777;
    --layer-cluster-large: #444;

    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 0 10px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0px 0px 5px rgba(0, 0, 0, 5);
}

/* Déclarations des polices Poppins */
@font-face {
    font-family: 'Poppins';
    src: url('../font/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../font/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../font/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../font/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../font/Poppins-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1,h2,h3,h4,h5 {
    text-transform: capitalize;
}

body { 
    margin: 0; 
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif; /*  'Montserrat', */
}

.capitalize {
    text-transform: capitalize;
}

/* Indicateur de champ obligatoire */
.text-red-500 {
    color: var(--danger);
    font-weight: bold;
    margin-left: 2px;
    cursor: help;
    position: relative;
    display: inline-block;
}

.text-red-500:hover {
    text-decoration: none;
}

.text-center {
    text-align: center;
}

#app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

#main-container {
    position: relative;
    flex: 1;
    /* padding: 1rem; */
    display: grid;
    gap: 1rem;
    height: 100vh;
    overflow: hidden;
}

#main-container.scrollable {
    overflow-y: scroll;
}

/* Styles pour le loader */      
#app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;

    &.active {
        opacity: 1;
        visibility: visible;
    }

    .loader-content {
        text-align: center;

        .loader-text {
            color: #333;
            font-size: 1.1rem;
        }
        
        .spinner {
            width: 48px;
            height: 48px;
            display: block;
            margin: 30px auto;
            box-sizing: border-box;
            position: relative;
            transform: translate(0, 0) !important;

            &::before {
                content: '';
                box-sizing: border-box;
                position: absolute;
                left: 0;
                right: 0;
                margin: auto;
                top: 150%;
                width: 24px;
                height: 4px;
                border-radius: 50%;
                background: rgba(0, 0, 0, 0.5); 
                animation: animShadow 0.4s ease-in-out infinite alternate;
            } 

            &::after {
                content: '';
                box-sizing: border-box;
                width: 48px;
                height: 48px;
                left: 0;
                bottom: 0;
                position: absolute;
                border-radius: 50% 50% 0;
                border: 15px solid #000;
                transform: rotate(45deg) translate(0, 0);
                box-sizing: border-box;
                animation: animMarker 0.4s ease-in-out infinite alternate;
            }
        }
    }
}

@keyframes animMarker {
    0% {
        transform: rotate(45deg) translate(5px, 5px);
    }
    100% {
        transform: rotate(45deg) translate(-5px, -5px);
    }
}

@keyframes animShadow {
    0% {
        transform: scale(0.5);
    }
    100% {
        transform: scale(1);
    }
}

/** app-popup */
.app-popup,
.app-popup-local-storage {
    position: relative;
    /* top: 0; */
    /* left: 0; */
    /* width: 100%; */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* transition: opacity 0.3s, visibility 0.3s; */
    padding: 2rem;
    /* margin: 0rem 2rem 1rem; */

    margin: 1rem 2rem; /* profile */

    &.active {
        display: flex;
    }

    .loader-content {
        text-align: center;

        .loader-text {
            color: #333;
            font-size: 1.1rem;
        }
        
        .spinner {
            width: 48px;
            height: 48px;
            display: block;
            margin: 30px auto;
            box-sizing: border-box;
            position: relative;
            transform: translate(0, 0) !important;

            &::before {
                content: '';
                box-sizing: border-box;
                position: absolute;
                left: 0;
                right: 0;
                margin: auto;
                top: 150%;
                width: 24px;
                height: 4px;
                border-radius: 50%;
                background: rgba(0, 0, 0, 0.5); 
                animation: animShadow 0.4s ease-in-out infinite alternate;
            } 

            &::after {
                content: '';
                box-sizing: border-box;
                width: 48px;
                height: 48px;
                left: 0;
                bottom: 0;
                position: absolute;
                border-radius: 50% 50% 0;
                border: 15px solid var(--primary);
                transform: rotate(45deg) translate(0, 0);
                box-sizing: border-box;
                animation: animMarker 0.4s ease-in-out infinite alternate;
            }
        }
    }
}

#params-section .app-popup {
    margin: 1rem 2rem 0rem;
}

/* Styles pour les alertes */
.alert {
    margin: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.alert-success {
    background-color: var(--success-light);
    border: 1px solid var(--success);
}

.text-success {
    color: var(--success);
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.blur {
    filter: blur(4px);
}

.disabled {
    pointer-events: none;
    cursor: default;
    text-decoration: none;
}

/* Style pour le geocoder Mapbox */
.geocoder {
    margin-bottom: 1rem;
}

.mapboxgl-ctrl-geocoder {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    /* border: 1px solid var(--border-color); */
    border-radius: 4px;
}

.mapboxgl-ctrl-geocoder input[type="text"] {
    height: 36px;
    padding: 6px 35px;
}

.mapboxgl-ctrl-geocoder--suggestion {
    padding: 8px 12px;
}

.mapboxgl-ctrl-geocoder--suggestion:hover {
    background-color: var(--hover-color);
}

/* Style pour les champs en lecture seule */
input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Style pour le geocoder personnalisé */
.geocoder {
    position: relative;
    margin-bottom: 1rem;
}

.mapboxgl-ctrl-geocoder--input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    /* border-radius: 4px; */
    font-size: 14px;

    --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;
    --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
    --tw-border-opacity: 1;
    border-color: rgb(209 213 219 / var(--tw-border-opacity, 1)) !important;
    border-radius: .375rem !important;
    border-width: 1px;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--hover-color);
}