@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --bms-dark-blue: #1b2ba4; /* Updated primary blue */
    --bms-gold: #FF8C00;
    --bms-light: #f8f9fa;
    --bms-dark: #212529;
    --font-family-sans-serif: 'Poppins', sans-serif;

    /* New variables for typography */
    --bms-heading-color-dark: var(--bms-dark-blue);
    --bms-heading-color-light: #2a3cbf; /* A slightly lighter shade of the new dark blue */
    --bms-text-color-accent: var(--bms-gold);
    --bms-font-weight-normal: 300;
    --bms-font-weight-medium: 400;
    --bms-font-weight-bold: 700;
}

/* General Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-sans-serif);
    color: var(--bms-heading-color-dark);
    font-weight: var(--bms-font-weight-bold);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--bms-gold);
    padding-bottom: 0.3em;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* Added text-shadow */
}

/* Specific styling for main page titles */
.page-title {
    font-size: 3rem; /* Slightly larger for main page titles */
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--bms-gold);
    padding-bottom: 0.3em;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    color: var(--bms-heading-color-dark);
    font-weight: var(--bms-font-weight-bold);
    margin-bottom: 0.5em; /* Add some bottom margin */
}

h2 {
    font-size: 2rem;
    color: var(--bms-heading-color-dark); /* Use dark blue for main section titles */
    margin-top: 2em; /* Add some top margin */
    margin-bottom: 1em; /* Add some bottom margin */
    border-bottom: 1px solid rgba(0,0,0,0.1); /* Added border-bottom */
    padding-bottom: 0.5em; /* Added padding-bottom */
}

h3 {
    font-size: 1.85rem; /* Slightly increased font-size */
    font-weight: var(--bms-font-weight-bold); /* Make h3 bold */
    color: var(--bms-heading-color-light); /* Use lighter blue for subtitles */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h4 {
    font-size: 1.6rem; /* Slightly increased font-size */
    font-weight: var(--bms-font-weight-medium);
    color: var(--bms-dark);
}

.navbar {
    background-color: var(--bms-dark-blue) !important; /* Use new dark blue */
}


html {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-sans-serif);
    background: linear-gradient(to bottom right, var(--bms-light), #e0e7ef); /* Subtle gradient */
    min-height: 100vh; /* Ensure gradient covers full viewport height */
    background-attachment: fixed; /* Fix background during scroll */
    
}

/* Hide scrollbar on homepage only */
body.home {
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
body.home::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Override Bootstrap Variables */
.bg-primary {
    background-color: var(--bms-dark-blue) !important; /* Use new dark blue */
}


.btn-primary {
    background-color: var(--bms-dark-blue);
    border-color: var(--bms-dark-blue);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #152080; /* Darker shade of the new primary blue */
    border-color: #152080;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* More prominent shadow on hover */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Subtle text shadow */
}

.btn-outline-secondary {
    font-weight: 600;
    border-color: var(--bms-dark-blue);
    color: var(--bms-dark-blue);
}

.btn-outline-secondary:hover {
    background-color: var(--bms-dark-blue);
    color: white;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Add shadow to outline button hover */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Subtle text shadow */
}

.navbar-brand strong {
    color: var(--bms-gold);
}

.navbar-dark .nav-item .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.navbar-dark .nav-item .nav-link:hover,
.navbar-dark .nav-item .nav-link.active {
    color: var(--bms-gold) !important;
}

/* Hero Slider Styles */
.hero-slider {
    width: 100%;
    height: 95vh;
    position: relative;
    color: white;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.swiper-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 61, 109, 0.5); /* Lighter blue overlay */
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem; /* Keep original size for hero */
    font-weight: var(--bms-font-weight-bold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white; /* Explicitly set to white */
}

.hero-content p {
    font-size: 1.35rem; /* Slightly larger for impact */
    font-weight: var(--bms-font-weight-medium);
    color: white; /* Explicitly set to white */
}

/* Swiper Navigation/Pagination Styles */
.swiper-button-next,
.swiper-button-prev {
    color: var(--bms-gold) !important;
    transition: transform 0.2s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.2);
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7) !important;
    width: 10px !important;
    height: 10px !important;
    transition: background-color 0.2s ease;
}

.swiper-pagination-bullet-active {
    background: var(--bms-gold) !important;
}

/* General Card Styles */
.card {
    border: 1px solid rgba(0, 0, 0, 0.05); /* Subtle border */
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); /* More pronounced shadow */
    transition: box-shadow 0.3s ease;
    border-left: 5px solid var(--bms-gold); /* Added left border accent */
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15); /* More pronounced shadow on hover */
}

.card-title {
    color: var(--bms-heading-color-dark);
    font-weight: var(--bms-font-weight-bold);
    font-size: 1.3rem; /* Slightly larger for card titles */
    margin-top: 0; /* Remove top margin */
    padding-top: 0; /* Remove top padding */
}

.card .card-body {
    padding: 1.5rem; /* Default padding for card body */
    padding-top: 1rem; /* Reduce top padding specifically */
}

.feature-box {
    width: 180px; /* Reverted width */
    height: 150px; /* Reverted height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.feature-box:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--bms-gold);
}

.feature-box i {
    font-size: 2.5rem; /* Reverted icon size */
    color: var(--bms-dark-blue);
    margin-bottom: 10px;
    transition: color 0.4s ease;
}

.feature-box:hover i {
    color: #CC7000; /* Dark orange icon color on hover */
}

.feature-box h6 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bms-dark);
    margin-bottom: 0;
}

/* Remove default container padding for main content area */
.site-content {
    padding-top: 0 !important;
}

/* Expertise Page Styles */
.expertise-section {
    background-color: white;
    border-radius: 15px;
    padding: 3rem;
}

.expertise-section:nth-child(odd) {
    background-color: var(--bms-light);
}

.expertise-section h2 {
    margin-top: 0; /* Completely remove top margin for h2 in expertise sections */
}

.expertise-domains li {
    display: inline-flex;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.expertise-domains .badge {
    background-color: var(--bms-gold) !important;
    color: var(--bms-dark-blue) !important;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.5em 0.7em;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

#verticalMenuToggle {
    height: 40px;
    width: 40px;
    padding: 0; /* Remove default padding */
    display: flex; /* Use flexbox to center the icon */
    justify-content: center;
    align-items: center;
    margin-right: 0; /* Bring closer to the edge */
}

div.p-5 h2 {
    margin-top: 0; /* Remove top margin for h2 inside p-5 div */
}

/* Vertical Menu Styles */
.vertical-menu {
    position: fixed;
    top: 0;
    left: -300px; /* Hidden by default */
    width: 300px;
    height: 100%;
    background-color: var(--bms-dark-blue);
    color: white;
    z-index: 1050; /* Above navbar */
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.vertical-menu.open {
    left: 0;
}

.vertical-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none; /* Hidden by default */
}

.vertical-menu-overlay.show {
    display: block;
}

.vertical-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 1rem 1rem; /* Top, Right, Bottom, Left - remove right padding */
    background-color: #152080; /* Slightly darker blue for header */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vertical-menu-header .btn-close {
    margin-left: auto; /* Push to the far right */
    margin-right: 0.5rem; /* Add a small margin to the right of the button itself */
}

.vertical-menu-header h5 {
    margin-bottom: 0;
    color: white;
    font-weight: var(--bms-font-weight-bold);
}

.vertical-menu-nav {
    padding: 1rem 0;
}

.menu-block {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.menu-block-title {
    color: var(--bms-gold);
    font-weight: var(--bms-font-weight-bold);
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 5px;
    margin: 0 0.5rem;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.navbar-brand {
    display: flex;
    align-items: center; /* Vertically align items in the middle */
}

.brand-text-container {
    display: flex;
    flex-direction: column;
    margin-left: 10px; /* Space from logo */
}

.navbar-brand-text {
    color: white;
    font-weight: bold;
    border-bottom: 2px solid var(--bms-gold); /* Dark orange underline */
    padding-bottom: 2px; /* Small padding to separate text from line */
    font-size: 0.9em; /* Adjusted font size */
    position: relative; /* For positioning subtitle */
}

.navbar-brand-subtitle {
    font-size: 0.6rem; /* Very small font size */
    color: rgba(255, 255, 255, 0.7); /* Slightly faded white */
    /* margin-left: 5px; /* Moved to brand-text-container */
    /* display: block; /* Handled by flex-direction: column */
    line-height: 1; /* Reduce line height */
    margin-top: 0px; /* Adjust as needed */
}

.task-status-sm {
    height: 25px; /* Smaller height */
    padding: 2px 5px; /* Reduced padding */
    font-size: 0.75rem; /* Smaller font size */
}

.tab-pane#lancement .card-body .card-title {
    font-size: 1.1rem; /* Smaller card title */
}

.tab-pane#lancement .card-body .task-table th,
.tab-pane#lancement .card-body .task-table td {
    font-size: 0.8rem; /* Smaller table text */
    padding: 0.4rem; /* Reduced padding for table cells */
}

.tab-pane#lancement .card-body .form-control.task-input,
.tab-pane#lancement .card-body .form-select.task-status {
    font-size: 0.85rem; /* Smaller font size */
    padding: 0.25rem 0.5rem; /* Reduced padding */
    height: auto; /* Allow height to adjust based on content */
}

.tab-pane#lancement .card-body .btn.btn-sm {
    font-size: 0.85rem; /* Smaller font size for buttons */
    padding: 0.25rem 0.5rem; /* Reduced padding */
    line-height: 1; /* Ensure consistent line height */
}

.tab-pane#lancement .card-body .btn.btn-sm i {
    font-size: 0.8rem; /* Slightly smaller icon size */
}

@media (max-width: 768px) {
    .tab-pane#lancement .card-body .form-control.task-input,
    .tab-pane#lancement .card-body .form-select.task-status,
    .tab-pane#lancement .card-body .btn.btn-sm {
        font-size: 0.75rem; /* Even smaller on mobile */
        padding: 0.2rem 0.4rem;
    }
    .tab-pane#lancement .card-body .btn.btn-sm i {
        font-size: 0.7rem;
    }
}

.service-info {
    display: flex;
    flex-direction: row;
    align-items: center; /* Align items vertically in the middle */
    gap: 5px; /* Add a small gap between the service name and person */
}

/* Styling for Director Names and Titles */
.director-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bms-dark-blue);
    margin-top: 0.5rem; /* Space from image */
    margin-bottom: 0.2rem; /* Space from title */
}

.director-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6c757d; /* Bootstrap text-muted color */
    margin-bottom: 1rem; /* Space before HR or next element */
}

/* Styling for Chef Service within departments */
.service-info {
    display: flex;
    flex-direction: column; /* Stack name and person */
    align-items: flex-start; /* Align text to the start */
    margin-bottom: 0.5rem; /* Space before image */
}

.service-info .service-name {
    font-weight: 600;
    color: var(--bms-dark);
    font-size: 0.95rem;
}

.service-info .service-person {
    font-weight: 400;
    color: #495057; /* Slightly darker than text-muted */
    font-size: 0.85rem;
    margin-top: 0.1rem; /* Small space between title and name */
}

/* Ensure consistent image styling for service chiefs */
.org-department li img {
    border-radius: 50%;
    border: 2px solid var(--bms-gold); /* Gold border for emphasis */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.org-department li img:hover {
    transform: scale(1.05);
}

/* Form Styles for Contact Page */
.form-label {
    font-weight: var(--bms-font-weight-medium);
    color: var(--bms-dark-blue);
    margin-bottom: 0.5rem;
}

.form-control {
    border-color: #ced4da; /* Default Bootstrap border color */
    transition: all 0.3s ease-in-out;
    padding: 0.75rem 1rem; /* Consistent padding for all inputs */
    font-size: 1rem; /* Consistent font size */
}

.form-control:focus {
    border-color: var(--bms-dark-blue); /* Primary color border on focus */
    box-shadow: 0 0 0 0.25rem rgba(27, 43, 164, 0.25); /* Primary color glow on focus */
    outline: 0;
}

.form-control.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important; /* Slightly more defined shadow */
}

textarea.form-control {
    resize: vertical; /* Allow only vertical resizing */
}

/* Input Group Specific Styles */
.input-group-text {
    background-color: var(--bms-light); /* Light background for the icon */
    color: var(--bms-dark-blue); /* Dark blue icon color */
    border-color: #ced4da;
    padding: 0.75rem 1rem; /* Match padding of form-control */
    border-right: none; /* No border between icon and input */
}

.input-group .form-control {
    border-left: none; /* No border between icon and input */
}

/* Ensure consistent border-radius for input group and its children */
.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3),
.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
.input-group > .form-floating:not(:last-child) > .form-control,
.input-group > .form-floating:not(:last-child) > .form-select,
.input-group > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.input-group > :not(:first-child):not(.dropdown-menu):not(.form-floating) {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}
.input-group-text:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group-text:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group-text, .input-group .form-control {
    height: calc(2.875rem + 2px); /* Adjust height to match form-control-lg */
}

/* Custom class to force no wrapping for a row */
.no-wrap-row {
    display: flex;
    flex-wrap: nowrap; /* Forces items not to wrap */
    /* This can cause horizontal scrolling on small screens if content's combined width exceeds viewport. */
}

/* Flag Icons for "Présence africaine" */
.flag-icon {
    width: 16px; /* Très petite taille */
    height: 12px; /* Maintien du ratio */
    vertical-align: middle; /* Align with text */
    margin-right: 5px; /* Réduction de l'espace */
    border: 1px solid #ccc; /* Subtle border for definition */
}
