body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background-color: #f4f6f9 !important;
    color: #495057;
    -webkit-font-smoothing: antialiased;
    /* Sticky Footer Setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content-wrapper {
    flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-weight: 600 !important;
    letter-spacing: -0.5px;
    color: #1c5980;
}

.navbar {
    background: linear-gradient(90deg, #1c5980 0%, #008c9e 100%) !important;
    border: none !important;
    border-radius: 7px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: #ffffff !important;
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: #dbeaff !important;
}

.navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar .dropdown-menu {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    margin-top: 10px !important;
    padding: 8px 0 !important;
    min-width: 220px !important;
    width: max-content !important;
    overflow: hidden !important;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.navbar .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar .dropdown-item {
    padding: 10px 40px 10px 20px !important;
    color: #555 !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    background: transparent !important;
    white-space: nowrap !important;
    transition: padding 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: #f0f7ff !important;
    color: #1c5980 !important;
    padding: 10px 34px 10px 26px !important;
}

.navbar .dropdown-item.active {
    background-color: #1c5980 !important;
    color: white !important;
}

/* ==================
   FOOTER STYLES
   ================== */

.app-footer {
    background: linear-gradient(90deg, #1c5980 0%, #008c9e 100%) !important;
    /* Gradient background */
    color: #f8f9fa;
    /* Lighter text for better contrast on blue */
    padding: 40px 0;
    font-size: 0.9rem;

    /* Navbar-like styling */
    border-radius: 7px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    margin: 20px !important;
    margin-top: auto !important;
    /* Forces footer to bottom of flex container */
    border: none !important;
}

/* Titles */
.footer-title {
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.footer-subtitle {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Description Text */
.footer-desc {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e9ecef;
    /* Very light gray */
}

/* Links */
.footer-link {
    color: #e9ecef;
    text-decoration: underline;
}

.footer-link:hover {
    color: #ffffff;
}

/* Copyright Badge and Text */
.copyright {
    color: #e9ecef;
    font-size: 0.85rem;
}

.repo-badge {
    background-color: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white */
    color: white;
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 3px;
    margin-right: 5px;
    font-weight: bold;
}

/* Lists */
.footer-list li {
    margin-bottom: 8px;
    color: #e9ecef;
    font-size: 1rem;
}

/* Right Section Borders / Spacing */
.border-right-footer {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    /* Softer border */
}

/* Contact Area */
/* .contact-area { } removed empty rule */

.contact-intro {
    font-style: italic;
    color: #e9ecef;
    margin-bottom: 5px;
}

/* Anonymous Contact Box */
.contact-anonymous {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(5px); /* Premium glassmorphism effect */
    transition: all 0.3s ease;
}

.contact-anonymous p {
    color: #f8f9fa;
    margin-bottom: 15px;
    font-weight: 400;
}

.contact-anonymous .btn-outline-primary {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: transparent !important;
}

.contact-anonymous .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
    transform: translateY(-2px);
}

/* Status Indicator */
.status-indicator {
    font-size: 0.8rem;
    color: #d4edda;
    /* Light green */
    font-weight: 600;
    display: flex;
    align-items: center;
}

.status-indicator .dot {
    height: 8px;
    width: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

/* Form Styles Override */
.footer-contact-form .form-control {
    background-color: #fdfdfd;
    /* White-ish background */
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    /* Rounded corners like feasibility form */
    height: 45px;
    /* Consistent height */
    padding: 0 20px;
    color: #333;
    /* Dark text for readability on white */
}

.footer-contact-form .form-control::placeholder {
    color: #8898aa;
    /* Specific placeholder color */
}

.footer-contact-form .form-control:focus {
    background-color: #ffffff;
    border-color: #1c5980;
    box-shadow: 0 0 0 3px rgba(28, 89, 128, 0.1);
    /* Specific focus shadow */
    color: #333;
}

.footer-contact-form .btn-primary {
    background: #1B5A81 !important;
    /* Requested dark blue */
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600;
    height: 45px;
    transition: all 0.2s ease;
}

.footer-contact-form .btn-primary:hover {
    background: #154a6b !important;
    /* Slightly darker on hover */
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Hover shadow */
}

/* ==================
   PAGINATION STYLES
   ================== */
.pagination {
    justify-content: center;
    margin-top: 20px;
}

.pagination .page-item {
    margin: 0 3px;
}

.pagination .page-link {
    border-radius: 50px !important;
    /* Pill shape */
    border: none !important;
    color: #1c5980 !important;
    font-weight: 500;
    padding: 8px 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: #f0f7ff !important;
    color: #008c9e !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(90deg, #1c5980 0%, #008c9e 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(28, 89, 128, 0.3);
}

/* ==================
   FLASK ADMIN BUTTONS & TABS
   ================== */
.btn {
    border-radius: 50px !important;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: #0D7490 !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(13, 116, 144, 0.2) !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(28, 89, 128, 0.3) !important;
}

.btn-default,
.btn-secondary {
    background-color: #ffffff;
    border: 1px solid #ddd;
    color: #555;
}

.btn-default:hover,
.btn-secondary:hover {
    background-color: #f8f9fa;
    color: #1c5980;
    transform: translateY(-1px);
}

/* Tabs like "List", "Create" */
.nav-tabs {
    margin-bottom: 20px !important;
    border-bottom: none !important;
}

.table,
.table thead th {
    border-top: 1px solid #dee2e6 !important;
}

.table-responsive {
    padding-top: 10px !important;
}

.actions {
    margin-bottom: 20px !important;
}

.nav-tabs > li > a {
    border-radius: 50px !important;
    margin-right: 5px;
    border: 1px solid #ced4da !important;
    color: #0D7490 !important;
    /* Solid color for inactive text */
    transition: all 0.2s ease;
}

.nav-tabs > li > button {
    border-radius: 50px !important;
    margin-right: 5px;
    border: 1px solid #ced4da !important;
    color: #0D7490 !important;
    /* Solid color for inactive text */
    transition: all 0.2s ease;
}

.table a,
.table .fa,
.table .fas,
.table .far {
    color: #0D7490 !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

.table a:hover {
    opacity: 0.8;
}

/* Ensure sorting icons in headers also get the gradient */
.table th.sortable > a {
    color: #0D7490 !important;
}


.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    /* Solid Color for Active Tab */
    background-color: #0D7490 !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(13, 116, 144, 0.3);
}

.glyphicon-pencil::before {
    content: "\f303" !important; /* Code unicode du crayon car FontAwesome a changé la notation de fa-pencil */
}

.profile-avatar-navbar {
    width: 1.47rem;
    height: 1.47rem;
    color: #5e35b1;
    display: flex;
    border-radius: 50%;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.role-switcher-floating-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    padding: 10px 18px;
    background: linear-gradient(90deg, #1c5980 0%, #008c9e 100%);
    color: #ffffff;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(28, 89, 128, 0.4);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.role-switcher-floating-button:hover {
    box-shadow: 0 6px 20px rgba(28, 89, 128, 0.6);
    transform: translateY(-2px);
    opacity: 0.95;
}

.role-switcher-floating-card {
    position: fixed;
    bottom: 135px;
    right: 20px;
    z-index: 9999;
    width: 340px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.role-switcher-header {
    background: linear-gradient(90deg, #1c5980 0%, #008c9e 100%);
    color: #ffffff;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.role-switcher-body {
    padding: 16px;
}

.role-switcher-body label {
    margin-bottom: 4px;
}

.role-switcher-body select,
.role-switcher-body input {
    height: auto !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    border-radius: 6px;
    border: 1px solid #d1d3e2;
}

.role-switcher-body .btn-primary {
    background: linear-gradient(90deg, #1c5980 0%, #008c9e 100%);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    padding: 10px 16px !important;
    transition: all 0.2s ease;
}

.role-switcher-body .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(28, 89, 128, 0.4);
    opacity: 0.95;
}
