/* === CHANGE PASSWORD STYLES === */
.change-password-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.password-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #E78508 0%, #ff9500 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.card-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 700;
}

.card-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.security-info {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.info-box h3 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 1.1rem;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
    color: #333;
}

.info-box li {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.password-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #E78508;
    box-shadow: 0 0 0 3px rgba(231, 133, 8, 0.1);
}

.password-requirements {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.password-requirements h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1rem;
}

.password-requirements ul {
    margin: 0;
    padding-left: 20px;
    color: #6c757d;
}

.password-requirements li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-actions {
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #E78508 0%, #ff9500 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 133, 8, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-input:invalid {
    border-color: #dc3545;
}

.form-input:valid {
    border-color: #28a745;
}

.password-match-message {
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.password-match-message.success {
    color: #28a745;
}

.password-match-message.error {
    color: #dc3545;
}

/* User Directory Styles */
.user-directory-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E78508;
}

.page-title {
    font-size: 2.5rem;
    color: #E78508;
    margin: 0;
}

.page-subtitle {
    color: #666;
    margin: 5px 0 0 0;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2rem;
}

.stat-content h3 {
    margin: 0;
    font-size: 2rem;
    color: #E78508;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #666;
}

.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.filter-input, .filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    align-items: end;
}

.btn-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.users-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background: #E78508;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.user-name .name-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-name strong {
    font-size: 1.1rem;
    color: #333;
}

.user-name small {
    color: #666;
    font-size: 0.9rem;
}

.badge-warning {
    background: #ffc107;
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin { background: #dc3545; color: white; }
.role-agent { background: #28a745; color: white; }
.role-observateur { background: #6c757d; color: white; }
.role-none { background: #f8f9fa; color: #6c757d; }

.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active { background: #d4edda; color: #155724; }
.status-badge.inactive { background: #f8d7da; color: #721c24; }

.actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-view { background: #17a2b8; color: white; }
.btn-edit { background: #ffc107; color: #000; }
.btn-reset { background: #6f42c1; color: white; }
.btn-toggle { background: #28a745; color: white; }
.btn-delete { background: #dc3545; color: white; }

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.no-data {
    text-align: center;
    padding: 40px;
}

.no-data-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
}

.pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #E78508;
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
    padding: 0 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #E78508;
    box-shadow: 0 0 0 3px rgba(231, 133, 8, 0.1);
}

.form-help {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.form-info {
    padding: 0 20px;
    margin-bottom: 20px;
}

.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.info-box h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
    color: #333;
}

.info-box li {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: #E78508;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.profile-content {
    padding: 20px;
    text-align: center;
}

.profile-avatar {
    margin-bottom: 20px;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #E78508;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto;
}

.profile-info h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.profile-email, .profile-phone {
    margin: 5px 0;
    color: #666;
}

.profile-badges {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
}

.profile-meta p {
    margin: 5px 0;
}

.warning {
    color: #ffc107;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .users-table {
        font-size: 12px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .change-password-container {
        padding: 10px;
        min-height: 100vh;
    }
    
    .password-card {
        margin: 0;
        border-radius: 0;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .password-form {
        padding: 20px;
    }
}

/* === GLOBAL STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
}

/* === NAVBAR === */
.navbar {
    background: #FFFFFF;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.logo-small {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(231, 133, 8, 0.3);
    transition: all 0.3s ease;
}

.logo-small:hover {
    transform: rotate(360deg);
}

.navbar-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.navbar-menu {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    font-size: 14px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #E78508;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    background: #fff3e6;
    color: #E78508;
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    background: #E78508;
    color: #FFFFFF;
}

.nav-link.active::after {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.user-profile:hover {
    background: #fff3e6;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(231, 133, 8, 0.3);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    color: #666;
}

.dropdown-arrow.rotate {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    overflow: hidden;
}

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

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    color: white;
}

.dropdown-user-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dropdown-user-info {
    flex: 1;
    overflow: hidden;
}

.dropdown-user-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-email {
    font-size: 12px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #E78508;
}

.dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.dropdown-item:hover svg {
    opacity: 1;
}

.dropdown-item-danger {
    color: #dc3545;
}

.dropdown-item-danger:hover {
    background: #fff5f5;
    color: #dc3545;
}

.dropdown-item-danger svg {
    color: #dc3545;
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === CARDS === */
.card {
    background: #FFFFFF;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

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

.stat-card {
    background: #FFFFFF;
    padding: 20px 16px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #E78508;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(231, 133, 8, 0.2);
}

.stat-card .stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-card .stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    word-break: break-word;
    line-height: 1.2;
}

.stat-card .stat-content p,
.stat-card .stat-label {
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    max-width: 100%;
}

/* === BUTTONS === */
.btn-primary {
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    color: #FFFFFF;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 133, 8, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 133, 8, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #FFFFFF;
    color: #E78508;
    border: 2px solid #E78508;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #fff3e6;
    transform: translateY(-2px);
}

/* === INPUTS === */
input, select, textarea {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #E78508;
    box-shadow: 0 0 0 3px rgba(231, 133, 8, 0.1);
}

/* === MOBILE MENU === */
.mobile-menu-toggle {
    display: none; /* Caché par défaut (desktop) */
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(231, 133, 8, 0.3);
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(231, 133, 8, 0.4);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Hamburger icon (3 lignes) */
.mobile-menu-toggle::before,
.mobile-menu-toggle::after,
.mobile-menu-toggle span {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle::before {
    top: 12px;
}

.mobile-menu-toggle span {
    top: 50%;
    transform: translate(-50%, -50%);
}

.mobile-menu-toggle::after {
    bottom: 12px;
}

/* Animation quand le menu est ouvert (X) */
.mobile-menu-toggle.active::before {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-toggle.active span {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

.mobile-menu-toggle.active::after {
    bottom: 50%;
    transform: translate(-50%, 50%) rotate(-45deg);
}

/* Menu mobile déroulant */
.navbar-menu.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 25px 20px;
    gap: 5px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 20px 20px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* Overlay derrière le menu */
.navbar-menu.mobile-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    animation: fadeIn 0.3s ease;
}

/* Liens du menu mobile */
.navbar-menu.mobile-open .nav-link {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    text-align: left;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.navbar-menu.mobile-open .nav-link:hover {
    background: #fff3e6;
    border-left-color: #E78508;
    transform: translateX(5px);
}

.navbar-menu.mobile-open .nav-link.active {
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    color: white;
    border-left-color: #d17607;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === RESPONSIVE - BOOTSTRAP BREAKPOINTS === */

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    /* Hamburger caché sur desktop xl */
    .mobile-menu-toggle {
        display: none !important;
    }

    .navbar-menu {
        display: flex !important;
    }
}

/* Large devices (desktops, 992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 1140px;
    }

    /* Hamburger caché sur desktop lg */
    .mobile-menu-toggle {
        display: none !important;
    }

    .navbar-menu {
        display: flex !important;
        gap: 3px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    }
}

/* Medium devices (tablets, 768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 960px;
        padding: 0 20px;
    }

    .navbar {
        padding: 15px 20px;
        position: relative;
    }

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

    .navbar-menu {
        display: none;
    }

    .navbar-brand {
        flex: 1;
    }

    .user-profile {
        margin-left: auto;
        margin-right: 10px;
    }

    .user-name {
        display: none;
    }

    .dropdown-arrow {
        display: none;
    }

    .user-dropdown-menu {
        right: -10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .content-grid {
        grid-template-columns: 1fr !important;
    }

    .page-title {
        font-size: 28px !important;
    }

    table {
        font-size: 14px;
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
        margin: 20px auto;
    }

    .navbar {
        padding: 12px 15px;
        position: relative;
    }

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

    .navbar-menu {
        display: none;
    }

    .page-header {
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 24px !important;
    }

    .stats-grid, .content-grid, .demo-grid, .features-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .logo-small {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .navbar-title {
        font-size: 16px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .stat-value {
        font-size: 32px !important;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 8px !important;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        max-width: 540px;
        padding: 0 10px;
        margin: 15px auto;
    }

    .navbar {
        padding: 10px;
        position: relative;
    }

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

    .navbar-menu {
        display: none;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 28px !important;
    }

    .card {
        padding: 20px;
        border-radius: 12px;
    }

    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        display: block;
        margin-bottom: 10px;
    }

    .navbar-title {
        font-size: 14px;
    }

    .logo-small {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .page-title {
        font-size: 20px !important;
    }

    .stats-grid, .content-grid, .demo-grid, .features-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .navbar-brand {
        gap: 8px;
    }

    .user-profile {
        padding: 6px;
    }

    .user-name {
        display: none;
    }

    .dropdown-arrow {
        display: none;
    }

    .user-dropdown-menu {
        right: -10px;
        min-width: 260px;
    }

    table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th, td {
        padding: 6px !important;
    }

    .hero h1 {
        font-size: 28px !important;
    }

    .hero p {
        font-size: 14px !important;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .cta-buttons a {
        width: 100%;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* === ANIMATIONS === */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* === PHONE LOGIN STYLES === */
.phone-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 2.5rem;
    color: #E78508;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.login-subtitle {
    color: #666;
    margin: 0;
    font-size: 1.1rem;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #E78508;
    box-shadow: 0 0 0 3px rgba(231, 133, 8, 0.1);
}

.form-input.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.form-help {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #E78508;
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, #E78508 0%, #ff9d3d 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 133, 8, 0.3);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.security-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #E78508;
}

.security-info h4 {
    margin: 0 0 15px 0;
    color: #E78508;
    font-size: 1.1rem;
}

.security-info ul {
    margin: 0;
    padding-left: 20px;
    color: #333;
}

.security-info li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Responsive Phone Login */
@media (max-width: 768px) {
    .phone-login-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .form-input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* === STATISTICS AND REPORTS FILTERS === */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: block;
}

.filter-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #E78508;
    box-shadow: 0 0 0 3px rgba(231, 133, 8, 0.1);
}

.filter-select:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.filter-select option {
    padding: 10px;
    background: white;
    color: #333;
}

/* Responsive filters */
@media (max-width: 1200px) {
    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .filters-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .filter-select {
        padding: 10px 12px;
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

@media (max-width: 480px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Dashboard header styles */
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.dashboard-title {
    font-size: 2.5rem;
    color: #E78508;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Responsive dashboard header */
@media (max-width: 768px) {
    .dashboard-title {
        font-size: 2rem;
    }
    
    .dashboard-subtitle {
        font-size: 1rem;
    }
}

/* === UTILITY CLASSES === */
.smooth-transition {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
}
