/* Fix accordion icons display */
.contentCompanyPage > .col-8 .card-title > span .fa-plus-square {
    display: none;
    color: #559DD3;
}

.contentCompanyPage > .col-8 .card-title > span .fa-minus-square {
    display: block;
    color: #559DD3;
}

.contentCompanyPage > .col-8 .card-title > span.collapsed .fa-plus-square {
    display: block;
    color: #559DD3;
}

.contentCompanyPage > .col-8 .card-title > span.collapsed .fa-minus-square {
    display: none;
}

/* ======================================
   ACCORDION SMOOTH EXPAND/COLLAPSE
   ====================================== */

/* Amélioration de l'animation de dépliage Bootstrap */
#accordionCardsCompany .collapse,
#accordionCardsOpportunity .collapse {
    transition: none;
}

#accordionCardsCompany .collapsing,
#accordionCardsOpportunity .collapsing {
    transition: height 0.4s ease-in-out;
}

/* Style de la carte active */
#accordionCardsCompany .card,
#accordionCardsOpportunity .card {
    transition: box-shadow 0.3s ease;
}

#accordionCardsCompany .card:has(.collapse.show),
#accordionCardsOpportunity .card:has(.collapse.show) {
    box-shadow: 0 4px 15px rgba(85, 157, 211, 0.15);
}

/* Bootstrap-select tags styling - orange like registration */
.bootstrap-select .dropdown-toggle .filter-option-inner-inner .badge,
.bootstrap-select .dropdown-menu .selected span.text .badge {
    color: #5B5E61 !important;
    background-color: #FDEFE7 !important;
    font-family: 'Nunito', sans-serif;
    font-weight: normal;
    border-radius: 10px;
    padding: 6px 12px;
}

/* Select2 tags - orange styling */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #FDEFE7 !important;
    border: none !important;
    color: #5B5E61 !important;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 14px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #5B5E61 !important;
    margin-right: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #272829 !important;
}

/* Bootstrap tagsinput - orange styling */
.bootstrap-tagsinput .badge,
.bootstrap-tagsinput .tag {
    background-color: #FDEFE7 !important;
    color: #5B5E61 !important;
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.bootstrap-tagsinput .badge [data-role="remove"],
.bootstrap-tagsinput .tag [data-role="remove"] {
    color: #5B5E61;
    margin-left: 8px;
}

.bootstrap-tagsinput .badge [data-role="remove"]:hover,
.bootstrap-tagsinput .tag [data-role="remove"]:hover {
    color: #272829;
}

/* Improve circle completion design */
.containerInfoCompletion {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    padding: 15px 10px;
}

.containerInfoCompletion h4 {
    font-size: 16px;
    font-weight: 700;
    color: #272829;
    margin-bottom: 15px;
}

.containerPercentCircle {
    margin: 0 auto 10px;
    display: flex;
    justify-content: center;
}

.circle-completion {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    position: relative;
}

.circle-completion svg {
    display: block;
}

.circle-completion-bg {
    stroke: #E8F4FA;
    stroke-width: 20;
    fill: none;
}

.circle-completion-progress {
    stroke: #559DD3;
    stroke-width: 20;
    fill: none;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 2s ease-out;
}

.circle-completion-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: #559DD3;
}

.containerInfoCompletion p {
    font-size: 14px;
    color: #5B5E61;
    line-height: 1.5;
    margin: 10px 0;
    padding: 0 5px;
}

.containerInfoCompletion a {
    color: #559DD3;
    text-decoration: none;
    font-weight: 600;
}

.containerInfoCompletion a:hover {
    color: #3a7fb8;
    text-decoration: underline;
}

/* Status bullet styling */
.containerInfoCompletion .mt-4 {
    font-size: 14px;
    color: #5B5E61;
    padding: 0 10px;
    margin-top: 15px !important;
}

.bullet {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex-shrink: 0;
    display: block;
    margin: 0 auto 5px auto!important;
}

.bullet-success {
    background-color: #28a745;
}

.bullet-danger {
    background-color: #dc3545;
}

/* ======================================
   GALLERY DRAG & DROP STYLING
   ====================================== */

/* Gallery container */
.pictures-activity {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.pictures-activity [data-gallery-manager-target="collection"] {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

/* Individual image preview container */
.containerImagePreview {
    position: relative;
    width: 200px;
    height: 200px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.containerImagePreview .vich-file {
    width: 100%;
    height: 100%;
}

.containerImagePreview .vich-file .custom-file {
    height: 100%;
}

.containerImagePreview .vich-file label.custom-file-label {
    height: 100%;
    background: transparent;
}

/* Hover effect on image container */
.containerImagePreview:hover {
    border-color: #559DD3;
    box-shadow: 0 4px 12px rgba(85, 157, 211, 0.15);
    transform: translateY(-2px);
}

/* Image styling */
.containerImagePreview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Hide VichUploader default checkboxes and links */
.pictures-activity .vich-file input[type="checkbox"],
.pictures-activity .vich-file a {
    display: none !important;
}

.pictures-activity label.vich-file {
    margin: 0 !important;
}

/* Hide the delete checkbox and download link from VichUploader */
.containerImagePreview .form-check,
.containerImagePreview a[download] {
    display: none !important;
}

/* Remove/delete button styling */
.containerImagePreview .removePicture {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
    cursor: pointer;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.containerImagePreview .removePicture:hover {
    background-color: #c82333;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.containerImagePreview .removePicture i {
    font-size: 14px;
    margin: 0;
}

/* Drag handle styling */
.drag-handle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    cursor: move;
    background-color: rgba(85, 157, 211, 0.95);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drag-handle:hover {
    background-color: #3a7fb8;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.drag-handle i {
    font-size: 14px;
    margin: 0;
    line-height: 1;
}

/* Browse button styling */
.containerImagePreview .btn.btn-light.bordered {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 !important;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-top: 2px solid #e0e0e0;
    border-radius: 0 0 6px 6px;
    color: #559DD3;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    z-index: 5;
    cursor: pointer;
}

.containerImagePreview .btn.btn-light.bordered:hover {
    color: #fff!important;
}

.containerImagePreview .btn.btn-light.bordered:hover {
    background-color: #559DD3;
    color: white;
    border-top-color: #3a7fb8;
}

/* Sortable states */
.sortable-ghost {
    opacity: 0.4;
    background-color: #E8F4FA;
    border: 2px dashed #559DD3;
}

.sortable-drag {
    opacity: 0.9;
    transform: rotate(2deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    border-color: #559DD3;
}

/* Amélioration du bouton "Ajouter une image" */
.buttonAddFileInput {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    vertical-align: middle;
    min-height: 140px;
    min-width: 180px;
    padding: 20px;
    border: 2px dashed #559DD3;
    border-radius: 8px;
    color: #559DD3;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    background-color: #f8fbfd;
    margin-top: 20px;
}

.buttonAddFileInput:hover {
    background-color: #559DD3;
    color: #fff;
    border-color: #3a7fb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 157, 211, 0.3);
}

.buttonAddFileInput i {
    font-size: 24px;
}

.buttonAddFileInput span {
    display: inline-block;
    line-height: 1.4;
    max-width: 120px;
}

/* ======================================
   VISIBILITY TOGGLE SWITCH
   ====================================== */

/* Custom switch aux couleurs Bhubbles */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #559DD3;
    border-color: #559DD3;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: none;
}

.custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
    border-color: #A8D0EC;
}

.custom-control-input:not(:disabled):active ~ .custom-control-label::before {
    background-color: #A8D0EC;
    border-color: #A8D0EC;
}

.custom-switch .custom-control-label {
    font-size: 14px;
    color: #5B5E61;
    font-weight: 500;
    cursor: pointer;
}

/* Responsive gallery styling */
@media screen and (max-width: 768px) {
    .containerImagePreview {
        width: calc(50% - 10px);
        height: 180px;
    }

    .pictures-activity {
        gap: 15px;
    }

    .pictures-activity [data-gallery-manager-target="collection"] {
        gap: 15px;
    }
}

@media screen and (max-width: 550px) {
    .containerImagePreview {
        width: 100%;
        height: 200px;
        margin-right: 0;
    }

    .pictures-activity {
        gap: 15px;
    }

    .pictures-activity [data-gallery-manager-target="collection"] {
        gap: 15px;
    }

    .buttonAddFileInput {
        width: 100%;
        height: auto;
        min-height: 60px;
        margin-top: 15px;
        font-size: 16px;
        border-radius: 8px;
        border-style: solid;
        border-width: 2px;
    }

    .buttonAddFileInput i {
        font-size: 20px;
    }

    .buttonAddFileInput span {
        max-width: 200px;
        font-size: 15px;
    }
}

/* Mobile: Remove horizontal padding on accordionCardsOpportunity */
@media screen and (max-width: 767px) {
    #accordionCardsOpportunity {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #accordionCardsOpportunity > .card {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
