﻿/* === Icons === */
.fa-solid {
    color: #7a7e8a;
}

/* === Unified brand color for call-related icons === */
.call-icon {
    color: #0f4c81;
}

.card:hover .call-icon {
    color: #0f4c81;
}

.call-icon-btn {
    color: #0f4c81;
    border-color: #0f4c81;
}

.call-icon-btn:hover,
.call-icon-btn:focus {
    color: #fff;
    background-color: #0f4c81;
    border-color: #0f4c81;
}

/* === Global Page Styling === */
body {
    font-family: Arial, sans-serif;
    background-color: #fdfdfd;
    overflow-x: hidden;
    margin: 0;
}

/* === Top Navigation Bar === */
.topbar {
    height: 50px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ebebe9;
    color: #333;
    padding: 0 15px;
    z-index: 1050;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* === Sidebar Navigation === */
.sidebar {
    width: 250px;
    height: calc(100vh - 50px);
    position: fixed;
    top: 50px;
    left: 0;
    background-color: #fafafa;
    border-right: 1px solid #d6d6d6;
    padding: 20px 10px;
    transition: transform 0.3s ease-in-out;
    z-index: 1040;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
   
}

    /* === Sidebar Section Title === */
    .sidebar h6 {
        margin-top: 15px;
        font-size: 14px;
        color: #555;
        text-transform: uppercase;
    }

    /* === Sidebar Navigation Links === */
    .sidebar .nav-link {
        display: flex;
        align-items: center;
        padding: 8px 10px;
        color: #333;
        text-decoration: none;
        font-size: 15px;
        transition: background 0.3s;
    }

        .sidebar .nav-link i {
            margin-right: 10px;
            font-size: 18px;
        }

        .sidebar .nav-link:hover {
            background-color: #e9ebf9;
            border-radius: 5px;
            color: black;
        }

            .sidebar .nav-link:hover i {
                color: cornflowerblue;
            }

        /* === Active Sidebar Link === */
        .sidebar .nav-link.active {
            background-color: #e9ebf9;
            border-radius: 5px;
            color: black;
        }

            .sidebar .nav-link.active i {
                color: cornflowerblue;
            }

    /* === Sidebar Scrollbar === */
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.4);
        }

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}


.sidebar-links {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.logout-link {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    color: #333;
    text-decoration: none;
}

.logout-form {
    margin-top: auto;
}

.logout-form .logout-link {
    display: block;
    width: 100%;
    margin-top: 0;
    background: none;
    border: 0;
    border-top: 1px solid #ddd;
    text-align: left;
    cursor: pointer;
}

/* === Page Content === */
.content {
    margin-left: 250px;
    margin-top: 50px;
    min-height: calc(100vh - 50px);
    overflow: auto;
    padding: 20px;
    background-color: #ffffff;
    transition: margin-left 0.3s ease-in-out;
}

/* === Logo and Title === */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
    width: auto;
}

.project-title {
    font-size: 18px;
    font-weight: bold;
}

/* === User Image === */
.user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc;
}

/* === User Dropdown Menu === */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ebebe9;
    border: 1px solid #ccc;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .user-btn:hover {
        background-color: #ddd;
    }

.user-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    width: 160px;
    z-index: 1060;
}

    .user-menu a {
        display: block;
        padding: 10px;
        text-decoration: none;
        color: #333;
        transition: background 0.2s;
        font-size: 14px;
    }

        .user-menu a:hover {
            background: #e9ebf9;
            color: black;
        }

            .user-menu a:hover i {
                color: cornflowerblue;
            }

.user-dropdown.active .user-menu {
    display: block;
}

/* === Divider Line === */
hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 8px 0;
}

/* === Custom Input Background === */
.input {
    background-color: #fafafa;
}
#globalSpinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

    #globalSpinner.hidden {
        opacity: 0;
        pointer-events: none;
    }

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

.card:hover {
    transform: scale(1.02);
    transition: 0.3s;
}

.card i {
    transition: color 0.3s;
}

.card:hover i {
    color: #0d6efd;
}

/* === Responsive Design: Mobile View === */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 230px;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .content {
        margin-left: 0;
    }

    .project-title {
        display: none;
    }

    .logo {
        height: 30px;
    }

    .overlay {
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: calc(100vh - 50px);
        background-color: rgba(0, 0, 0, 0.6);
        display: none;
        z-index: 1030;
    }

        .overlay.active {
            display: block;
        }
}

/* === layout project === */
.transition-overlay {
    position: fixed;
    z-index: 9999;
    background: rgba(0,0,0,0.9);
    color: white;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Style interface like form-select */
.select2-container--bootstrap-5 .select2-selection {
    background-color: #fafafa !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    height: calc(2.25rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    display: flex;
    align-items: center;
}

/* Scroll inside selection list */
.select2-results__options {
    max-height: 200px;
    overflow-y: auto;
}

.select2-container--bootstrap-5 .select2-selection__arrow {
    height: 100% !important;
    right: 0.75rem !important;
}
.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030; /* Same level as navbar */
    background-color: white; /* If you don't use Bootstrap bg-white */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1); /* Light shadow */
}

/* ===== Letter avatars — one distinct style per entity type (project / user / call) ===== */

/* Projects: indigo gradient, rounded square, project title initial */
.project-avatar {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Users / profiles: blue gradient, circle, initials */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Calls: brand-blue gradient, rounded square, call title initial */
.call-avatar {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f4c81 0%, #1c6ea4 60%, #2e8b9a 100%);
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* jQuery Validate -> red invalid fields (Bootstrap look, with warning icon) */
.form-control.input-validation-error,
.form-select.input-validation-error,
textarea.input-validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(.375em + .1875rem) center !important;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem) !important;
    padding-right: calc(1.5em + .75rem) !important;
}

.field-validation-error,
.form-control.input-validation-error + .field-validation-error {
    color: #dc3545 !important;
}

/* Bootstrap is-invalid (jQuery Validate highlight + JS addFeedback) -> guaranteed red border + icon */
.form-control.is-invalid,
.form-select.is-invalid,
textarea.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(.375em + .1875rem) center !important;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem) !important;
    padding-right: calc(1.5em + .75rem) !important;
}

.note-editor.is-invalid,
.note-editor.input-validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right .5rem center !important;
}

.needs-validation .form-control:valid,
.needs-validation .form-select:valid,
.needs-validation textarea:valid {
    border-color: initial;
}

/* ===== Debug tab: hide "Remplir un exemple" buttons when disabled ===== */
.fill-example-disabled [data-fill-example],
.fill-example-disabled #btnFillExample,
.fill-example-disabled #btnFillExampleProject {
    display: none !important;
}
/* ===== Floating bug report button ===== */
.bug-report-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
    border: 0;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.bug-report-fab:hover,
.bug-report-fab:focus {
    background: #bb2d3b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .3);
}

.bug-report-fab:focus-visible {
    outline: 3px solid rgba(220, 53, 69, .35);
    outline-offset: 2px;
}

.bug-report-fab i {
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .bug-report-fab {
        right: 1rem;
        bottom: 1rem;
        padding: .7rem;
    }

    .bug-report-fab-label {
        display: none;
    }
}