/* 
 * Vitruve 3D – Styles pour Inca3D (c) 2025
 * Tous droits réservés – Reproduction interdite sans autorisation.
 */
/* Barre d'outils (Toolbar) */
.IncaToolbar {
    display: flex;
    gap: 10px;
    /* Espacement entre les boutons */
    padding: 10px;
    /* background: linear-gradient(to bottom, #a2b7b9, #4a7580); */
    background: rgba(129, 177, 174, 0.4);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(7.5px);
    border: 1px solid #9CB8B9;
    /* Bordure subtile */
    border-radius: 8px;
    /* Coins arrondis */
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.1);
    /* Ombre subtile */
    align-items: center;
    /* Aligner les boutons verticalement */
    flex-direction: column;
    /* Disposition verticale par défaut */
    width: auto;
    /* Largeur fixe pour contenir des boutons carrés */
    z-index: 100;
    /* Toujours au-dessus */
}

/* Disposition horizontale (si .horizontal est ajoutée) */
.IncaToolbar.horizontal {
    flex-direction: row;
    width: auto;
    /* Ajuster la largeur automatiquement */
}

/* Espacement entre les outils dans une toolbar verticale */
.IncaToolbar:not(.horizontal) .inca-tool {
    margin-bottom: 10px;
}

/* Supprimer le dernier espace en bas */
.IncaToolbar:not(.horizontal) .inca-tool:last-child {
    margin-bottom: 0;
}

/* Espacement entre les outils dans une toolbar horizontale */
.IncaToolbar.horizontal .inca-tool {
    margin-right: 10px;
}

/* Supprimer le dernier espace à droite */
.IncaToolbar.horizontal .inca-tool:last-child {
    margin-right: 0;
}

.IncaToolbar.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.inca-tool.disabled {
    filter: grayscale(100%);
    cursor: not-allowed;
    box-shadow: none !important;

}


/* Style de base des boutons */
.inca-tool {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(129, 177, 174, 0.4);
    /* <-- FORCE le fond "glass" dès le départ */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 38px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;

}

.inca-tool svg {
    width: 32px;
    height: 32px;
    display: block;
}

.inca-tool:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.inca-tool.active {
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid #ffffff;
    color: #ffffff;
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) inset;
}

/* Boutons avec une icône */
.inca-tool[style*="background"] {
    color: transparent;
    background-repeat: no-repeat;
    background-size: 30px 30px !important;
    background-position: center !important;
}

.inca-tool::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 5px;
    box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.1), inset 0 0 5px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}




/* Désactivé */
.inca-tool:disabled {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    background-color: rgba(129, 177, 174, 0.2);
    /* fond cohérent même quand inactif */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
}


/************************************************
boutons radio
************************************************/
/* Conteneur global */
.toggle-switch-container {
    display: flex;
    flex-direction: column;
    /* Place le texte sous le switch */
    align-items: center;
    gap: 8px;
    /* Espacement entre le switch et le texte */
    position: relative;
}

/* Masquer l'input checkbox */
.toggle-switch {
    display: none;
}

/* Le bouton coulissant (toggle) */
.toggle-btn {
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    position: relative;
    display: block;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-btn::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
}

/* Changement d'état du bouton */
#controls-type-switch:checked+.toggle-btn {
    background: #4CAF50;
}

#controls-type-switch:checked+.toggle-btn::before {
    transform: translateX(30px);
}

/* Texte sous le switch */
.toggle-text {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: black;
    width: 250px;
    /* Ajuster la largeur selon besoin */
}

/* Mode Libre affiché par défaut */
.mode-free {
    display: none;
}

/* Afficher "Mode Carte" quand la checkbox est cochée */
#controls-type-switch:checked~.mode-free {
    display: none;
}

#controls-type-switch:checked~.mode-map {
    display: block;
}

/* Afficher "Mode Libre" quand la checkbox est décochée */
#controls-type-switch:not(:checked)~.mode-map {
    display: none;
}

#controls-type-switch:not(:checked)~.mode-free {
    display: block;
}



/* Adaptation pour les écrans mobiles */
@media (max-width: 768px) {
    .IncaToolbar {
        display: flex;
        gap: 5px;
        /* Espacement entre les boutons */
        padding: 5px;
        flex-direction: column;
        /* Disposition horizontale */
        width: 38px;
        /* Ajuster la largeur */
        height: auto;
        gap: 8px;
        /* Espacement réduit */
        top: 5%;
        left: 10px;
        /* Centré horizontalement */
    }

    .inca-tool {
        width: 35px;
        /* Taille légèrement réduite */
        height: 35px;
    }
}


/***************************
Tablettes
******************************/
@media (max-width: 991.98px) and (min-width: 768px) {
    .col-lg-5th {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/***************************
Téléphones
******************************/
@media (max-width: 768px) {

    .IncaToolbar {
        display: flex;
        gap: 5px;
        /* Espacement entre les boutons */
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 25px;
        padding-right: 25px;
    }

}