/* Modern and Clean Design */
:root {
    --primary-color: #183949; /* Dark blue-gray */
    --primary-gradient-color: #102C3C; /* Dark petrol blue */
    --accent-color: #6DE4A3; /* Mint green for interactive elements */
    --text-primary: #FFFFFF; /* Pure white for main text */
    --text-secondary: #C5D0D8; /* Light gray for secondary text */
    --background-color: #183949; /* Main background color */
    --border-color: rgba(197, 208, 216, 0.2); /* Semi-transparent light gray */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Deeper shadow for more depth */
    --radius: 12px; /* Generous border radius */
    --transition-speed: 200ms; /* Animation speed for interactions */
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-color) 100%);
    background-attachment: fixed;
    padding-top: 90px; /* Add padding for floating navbar */
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Style pour les titres */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    color: #ffffff;
}

/* Style spécifique pour le titre principal */
.page-header h1,
.page-header .h1,
.header-title {
    color: #ffffff !important;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Style pour le texte en général */
p, .body-text {
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Style pour les éléments d'interface */
.btn, .form-control, .nav-link {
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    margin-top: 2rem;
    margin-bottom: 4rem !important;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform var(--transition-speed) ease-in-out, box-shadow var(--transition-speed) ease-in-out;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: var(--accent-color);
}

.stat-card__icon i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.stat-card__content {
    flex: 1;
    min-width: 0;
}

.stat-card__label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-card__value {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card.frosted-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.card-header h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
    background: transparent;
}

/* Timeline Styles */
.timeline {
    padding: 1rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.timeline-content {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.timeline-content p {
    margin: 0;
    color: var(--text-primary);
}

.timeline-content small {
    color: var(--text-secondary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hide old header navigation when user is logged in */
body.logged-in header nav {
    display: none;
}

/* Header Styles */
header {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo img {
    height: 32px;
}

/* Header and Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-menu {
    margin-left: auto;
    margin-right: 2rem;
}

.main-menu ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

/* Style pour les titres de navigation */
.nav-title,
.page-title,
nav h1,
nav h2,
nav h3,
nav .h1,
nav .h2,
nav .h3 {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin: 0;
    padding: 0;
}

/* Style spécifique pour l'icône et le texte dans la navigation */
.nav-icon-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary) !important;
}

.nav-icon-title i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.nav-icon-title span,
.nav-icon-title h1,
.nav-icon-title h2,
.nav-icon-title h3 {
    color: var(--text-primary) !important;
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-speed);
}

nav a:hover {
    color: var(--accent-color);
}

/* Button Styles */
.btn-subscription {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    border-radius: 24px;
    transition: all var(--transition-speed) ease-in-out;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    min-width: 120px;
}

.btn-subscription:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-subscription.btn-primary {
    color: var(--primary-color);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-subscription.btn-primary:hover {
    background-color: #5bc991;
    border-color: #5bc991;
}

.btn-subscription.btn-outline-primary {
    color: var(--accent-color);
    background-color: transparent;
    border-color: var(--accent-color);
}

.btn-subscription.btn-outline-primary:hover {
    color: var(--primary-color);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-subscription.btn-danger {
    color: #fff;
    background-color: #ef4444;
    border-color: #ef4444;
}

.btn-subscription.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-subscription.btn-outline-danger {
    color: #ef4444;
    background-color: transparent;
    border-color: #ef4444;
}

.btn-subscription.btn-outline-danger:hover {
    color: #fff;
    background-color: #ef4444;
    border-color: #ef4444;
}

.btn-subscription i {
    font-size: 1rem;
}

/* Form action buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.form-actions .btn-subscription {
    min-width: 120px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 700;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

td {
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    background: transparent;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(109, 228, 163, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Form container styles */
.form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 2rem;
}

/* Dashboard Widgets */
.widget-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.widget-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.widget-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Team Management */
.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.team-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.team-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Notifications */
.notification-dropdown {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-item.unread {
    background-color: rgba(109, 228, 163, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
    }
    
    .widget-container {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* Avatar and Profile Styles */
.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 0.5rem;
}

.profile-toggle {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background-color var(--transition-speed);
}

.profile-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Footer Styles */
footer {
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo p {
    font-weight: 500;
    margin: 0;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Assurez-vous que les modales sont bien cachées par défaut */
.modal {
    display: none;
}

/* Mais permettez aux modales d'être visibles lorsqu'elles sont ouvertes via Bootstrap */
.modal.show {
    display: block;
}

/* Suppression de l'outline vert sur tous les éléments focusables */
*:focus,
*:focus-visible,
*:focus-within,
input:focus,
select:focus,
textarea:focus,
button:focus,
.form-control:focus,
.btn:focus,
.form-check-input:focus,
a:focus,
[tabindex]:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #3498db !important;
}

/* Règle globale pour tout élément ayant une bordure verte */
*[style*="border-color: rgb(0, 255, 0)"],
*[style*="border-color: #00ff00"],
*[style*="border-color: green"],
*[style*="outline-color: rgb(0, 255, 0)"],
*[style*="outline-color: #00ff00"],
*[style*="outline-color: green"] {
    border-color: #3498db !important;
    outline-color: #3498db !important;
    box-shadow: none !important;
}

/* Page Title Styles */
.page-header,
.section-header {
    margin-bottom: 2rem;
}

.page-header h1,
.page-header h2,
.page-header h3,
.section-header h1,
.section-header h2,
.section-header h3,
.page-title,
.section-title {
    color: var(--text-primary) !important;
    font-size: 1.75rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header i,
.section-header i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* Ensure all headings in the main content are white */
main h1,
main h2,
main h3,
main h4,
main h5,
main h6,
main .h1,
main .h2,
main .h3,
main .h4,
main .h5,
main .h6 {
    color: var(--text-primary) !important;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem;
    background: transparent;
}