/* ============================================
   VARIABLES & RESET - TACTICAL/FIREARMS THEME
   Les variables de thème sont maintenant chargées depuis /css/themes/
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
}

/* ============================================
   LAYOUT
   ============================================ */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
}

.app-main {
    flex: 1;
    padding: 2rem 1rem;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background: var(--bg-dark);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensure header is above most content */
    border-bottom: 3px solid;
    border-image: linear-gradient(to right, #0055A4 33.3%, #FFFFFF 33.3%, #FFFFFF 66.6%, #EF4135 66.6%) 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for Driver.js onboarding tour when highlighting elements in sticky header */
.app-header.driver-fix-stacking {
    position: static;
}

html.driver-active .mobile-nav {
    z-index: 10001; /* Just below the driver.js popover */
}

html.driver-active .dropdown-menu {
    z-index: 10003; /* Above all driver.js elements */
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.header-right-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sélecteur de thème */
.theme-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.9em;
    margin: 0;
    cursor: pointer;
}

.theme-label-text {
    display: none;
}

.theme-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    font-size: 0.9em;
    cursor: pointer;
    transition: var(--transition);
}

.theme-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-light);
}

.theme-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 124, 109, 102), 0.3);
}

.theme-select option {
    background: var(--bg-dark);
    color: var(--text-light);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--transition);
}

.tool-title-header {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.tool-title-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
}

.tool-title-link:hover {
    background: var(--primary-color);
    color: white;
}

.tool-title-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

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

.logo-icon {
    font-size: 1.5rem;
}

.main-nav {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
    position: relative; /* Added for positioning the dot */
}

.nav-link:hover {
    background: var(--primary-color);
    color: var(--accent-color);
}

.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--error-color);
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

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

.user-info-link {
    text-decoration: none;
}

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

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid var(--accent-light);
}

.user-name {
    font-weight: 500;
    color: var(--text-light);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-dark);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid var(--border-dark);
}

.logout-btn:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.mobile-menu-button {
    display: block;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    flex-shrink: 0;
    min-width: auto;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
}

/* Dropdown Menu */
.nav-item.dropdown, .dropdown-submenu {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1001; /* Default z-index */
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
}

.nav-item.dropdown:hover > .dropdown-menu,
.dropdown-submenu:hover > .dropdown-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: var(--accent-light);
}

/* Mobile navigation dropdown */
.mobile-nav .nav-item.dropdown .nav-link,
.mobile-nav .dropdown-submenu > .dropdown-item {
    cursor: pointer;
}

.mobile-nav .dropdown-menu {
    display: none;
    position: static;
    background-color: transparent;
    box-shadow: none;
    padding-left: 1rem;
}

.mobile-nav .nav-item.dropdown.open > .dropdown-menu,
.mobile-nav .dropdown-submenu.open > .dropdown-menu {
    display: block;
}

/* ============================================
   AUTHENTICATION & FORMS
   ============================================ */
.auth-container {
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    border-bottom: 3px solid var(--primary-light);
}

.auth-logo {
    margin-bottom: 1rem;
}

.auth-logo .logo-icon {
    font-size: 3rem;
}

.auth-logo .logo-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.privacy-notice {
    padding: 2rem;
    text-align: center;
}

.privacy-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.privacy-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

.privacy-text {
    text-align: justify;
    margin-bottom: 1rem;
}

.privacy-warning {
    font-weight: 600;
}

.auth-body {
    padding: 2rem;
}

.auth-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    text-align: center;
}

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

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.form, .auth-form, .profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input, .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

.form-input:focus, .form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 124, 109, 102), 0.15);
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    min-height: 1.25rem;
}

.form-error ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border: 1px solid var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    font-size: 1.25rem;
}

/* ============================================
   ALERTS & FLASH MESSAGES
   ============================================ */
.flash-messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background: var(--success-color);
    color: white;
}

.flash-error {
    background: var(--error-color);
    color: white;
}

.flash-info {
    background: var(--info-color);
    color: white;
}

.flash-icon {
    font-size: 1.25rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.alert-icon {
    font-size: 1.25rem;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent-light);
}

.dashboard-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

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

.dashboard-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-top-color: var(--accent-light);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-info {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.card-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--bg-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    color: var(--text-light);
}

.profile-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #bcada6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-card {
    background-color: var(--bg-dark);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--bg-darker);
    border-bottom: 2px solid var(--primary-light);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    border: 3px solid var(--accent-light);
}

.profile-user-info {
    flex-grow: 1;
}

.profile-username {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.profile-registration-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.profile-card-body {
    padding: 2rem;
}

.profile-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-dark);
    color: var(--accent-light);
}

/* ============================================
   CONVERSATION & MESSAGING
   ============================================ */
.conversation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.conversation-card {
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 5px solid var(--primary-light);
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.conversation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-left-color: var(--primary-color);
}

.conversation-card.unread {
    background: var(--primary-color);
    border-left-color: var(--accent-light);
}

.conversation-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.conversation-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.conversation-last-message {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.conversation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-dark);
    padding-top: 1rem;
    margin-top: 1rem;
}

.message-thread {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.message-bubble {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xl);
    position: relative;
}

.message-bubble .author {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.message-bubble .content {
    line-height: 1.5;
    white-space: pre-wrap;
}

.message-bubble .timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    text-align: right;
}

.message-bubble.user {
    background-color: var(--primary-color);
    color: var(--text-light);
    align-self: flex-end;
    border-bottom-right-radius: var(--radius-sm);
}

.message-bubble.admin {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: var(--radius-sm);
}

.reply-form-container {
    background: var(--bg-dark);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.reply-form-container .form-label {
    color: var(--text-light);
}

.close-conversation-container {
    margin-top: 2rem;
}

/* ============================================
   PETITES ANNONCES
   ============================================ */
.pa-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pa-nav {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.pa-nav-link {
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.pa-nav-link:hover {
    background-color: var(--primary-color);
    color: var(--accent-light);
}

.pa-nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.pa-content {
    background-color: var(--bg-dark);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.img-thumbnail {
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.img-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary-light);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.modal-content, #caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.photo-preview-wrapper {
    position: relative;
    display: inline-block;
}

.remove-photo-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
}


/* ============================================
   COMING SOON
   ============================================ */
.coming-soon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-dark);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin: 2rem auto;
    max-width: 800px;
    color: var(--text-light);
    border-top: 5px solid var(--primary-color);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-light);
}

.coming-soon-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 1rem;
}

.coming-soon-container p {
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
    background: var(--bg-darker);
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 3rem;
    border-top: 2px solid var(--primary-light);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.text-white {
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 769px) {
    .main-nav {
        display: flex;
        flex: 1;
        justify-content: center;
        gap: 1rem;
    }

    .user-info {
        display: flex;
    }

    .mobile-menu-button {
        display: none;
    }

    .mobile-nav {
        display: none;
    }

    .theme-label-text {
        display: inline;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0.5rem;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
    }

    .header-right-actions {
        gap: 0.5rem;
    }

    .theme-selector-wrapper {
        gap: 3px;
    }

    .theme-label {
        font-size: 0.8em;
    }

    .theme-select {
        padding: 5px 8px;
        font-size: 0.8em;
        min-width: 80px;
    }

    .tool-title-header {
        margin-left: 0.5rem;
    }

    .tool-title-link {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }

    .tool-title-link span {
        /*display: none;*/
    }

    .tool-title-header:has(> *:nth-child(2)) .tool-title-link span {
        display: none;
    }

    .tool-title-link i {
        font-size: 1.2rem;
    }

    #header-logo {
        height: 38px;
    }

    .main-nav {
        display: none;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .mobile-menu-button {
        display: block;
    }

    .dashboard-title {
        font-size: 1.75rem;
    }

    .dashboard-subtitle {
        font-size: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        max-width: 100%;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .privacy-notice {
        margin: 0 1rem;
        padding: 1rem;
    }

    .privacy-title {
        font-size: 1rem;
    }

    .privacy-text {
        text-align: left;
    }

    .flash-messages {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.5rem 0.4rem;
        gap: 0.3rem;
    }

    #header-logo {
        height: 32px;
    }

    .logo a {
        font-size: 1rem;
        gap: 0.3rem;
    }

    .mobile-menu-button {
        font-size: 1.3rem;
    }

    .app-main {
        padding: 1rem 0.5rem;
    }

    .auth-body {
        padding: 1.5rem;
    }

    .auth-footer {
        padding: 1rem 1.5rem;
    }

    .dashboard-header {
        margin-bottom: 2rem;
    }
}

@media (max-width: 390px) {
    .header-content {
        padding: 0.4rem 0.3rem;
        gap: 0.25rem;
    }

    #header-logo {
        height: 30px;
    }

    .mobile-menu-button {
        font-size: 1.2rem;
    }
}

#header-logo {
    height: 50px;
    width: auto;
    vertical-align: middle;
    border-radius: 15px;
}

.app-main {
    flex: 1;
    padding: 0 !important;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px; /* Ajout de cette ligne pour l'espacement */
}
