/* ===========================
   GOOGLE FONTS
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===========================
   VARIABLES & RESET
   =========================== */
:root {
    --primary-color: #DC2626;
    --primary-dark: #B91C1C;
    --primary-light: #EF4444;
    --secondary-color: #991B1B;
    --accent-color: #F87171;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #DC2626;
    --light-bg: #FEF2F2;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --border-color: #FEE2E2;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.1), 0 2px 4px -1px rgba(220, 38, 38, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(220, 38, 38, 0.1), 0 4px 6px -2px rgba(220, 38, 38, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(220, 38, 38, 0.1), 0 10px 10px -5px rgba(220, 38, 38, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(220, 38, 38, 0.25);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background: linear-gradient(to bottom right, #FEF2F2, #FFFFFF);
    line-height: 1.6;
    font-size: 15px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   PAGE DE CONNEXION
   =========================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f5f7fa;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 0;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    margin: 20px;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-bg-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.login-logo-large {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    border: 5px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.login-welcome {
    color: var(--white);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.login-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
}

.login-decorative-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.decorative-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    animation: pulse 4s ease-in-out infinite;
}

.decorative-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.decorative-circle:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 1s;
}

.decorative-circle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--white);
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo-small {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #f0f0f0;
}

.login-header h1 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.login-form .form-group label svg {
    color: var(--accent-color);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.login-locations {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.location-item svg {
    color: var(--accent-color);
}

.login-footer small {
    color: var(--text-muted);
    font-size: 12px;
    display: block;
}

/* Responsive login */
@media (max-width: 968px) {
    .login-page {
        align-items: flex-start;
        padding: 0;
    }
    
    .login-container {
        flex-direction: column;
        min-height: auto;
        max-width: 500px;
        margin: 0;
        border-radius: 0;
    }
    
    .login-left {
        padding: 40px;
        min-height: 250px;
    }
    
    .login-logo-large {
        width: 120px;
        height: 120px;
    }
    
    .login-welcome {
        font-size: 32px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .login-right {
        padding: 40px 30px;
        min-height: auto;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--gray-200);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
    transition: var(--transition);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

@media (max-width: 1406px) {
    .navbar-logo {
        width: 40px;
        height: 40px;
    }
    
    .navbar-brand h2 {
        font-size: 18px;
    }
}

.navbar-brand h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-100%);
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.navbar-mobile-user {
    display: none;
}

.navbar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.navbar-menu li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar-menu li a:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.navbar-menu li a:hover::before {
    width: 80%;
}

.navbar-menu li a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.navbar-menu li a.active::before {
    display: none;
}

.navbar-menu li a svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.navbar-menu li a:hover svg {
    transform: scale(1.1);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user span {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 15px;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.btn-logout:hover {
    background: var(--danger-color);
    color: var(--white);
    border-color: var(--danger-color);
}

/* ===========================
   CONTAINER & LAYOUT
   =========================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 36px;
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   ALERTES
   =========================== */
.alert {
    padding: 18px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
}

.alert svg {
    flex-shrink: 0;
}

.alert-success {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
    border-color: #6EE7B7;
    border-left: 4px solid #10B981;
}

.alert-error {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
    border-color: #FCA5A5;
    border-left: 4px solid #DC2626;
}

.alert-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    border-color: #FCD34D;
    border-left: 4px solid #F59E0B;
}

/* ===========================
   METRIQUES
   =========================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.metric-card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 24px;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.metric-card:hover::before {
    transform: scaleY(1);
    box-shadow: var(--shadow-lg);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-color), #5f27cd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.metric-info h3 {
    font-size: 32px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-info p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===========================
   SECTIONS D'ALERTES
   =========================== */
.alert-section {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.alert-header {
    margin-bottom: 20px;
}

.alert-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    color: var(--primary-color);
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert-item {
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.alert-item:hover {
    transform: translateX(5px);
}

.alert-fidelite {
    background: #d4edda;
    border-left: 4px solid var(--success-color);
}

.alert-anniversaire {
    background: #cce5ff;
    border-left: 4px solid var(--accent-color);
}

.alert-content h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.alert-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 5px;
}

/* ===========================
   FORMULAIRES
   =========================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 13px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: var(--transition);
    background: var(--white);
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    background: var(--white);
    transform: translateY(-1px);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
    opacity: 1;
    font-weight: 400;
}

.form-control:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    background: var(--gray-100);
    border-color: var(--gray-300);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===========================
   BOUTONS
   =========================== */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-600) 100%);
    color: var(--white);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%);
    color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3);
}

.btn-block {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 16px 32px;
    margin-top: 12px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-icon {
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    border-radius: 6px;
}

.btn-icon:hover {
    background: var(--light-bg);
    color: var(--accent-color);
}

.btn-icon.btn-danger:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

/* ===========================
   RECHERCHE & FILTRES
   =========================== */
.search-section, .filters-section {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.search-form, .filters-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.search-form .form-control, .filters-form .form-control {
    min-width: 200px;
}

/* ===========================
   TABLEAUX
   =========================== */
.table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.data-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--primary-light);
}

.data-table th:first-child {
    border-top-left-radius: var(--radius-md);
}

.data-table th:last-child {
    border-top-right-radius: var(--radius-md);
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.data-table tbody tr {
    transition: var(--transition);
    background: var(--white);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

.data-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-md);
}

.data-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-md);
}

.data-table td.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.data-table td.text-center {
    text-align: center;
    color: var(--text-muted);
}

/* ===========================
   BADGES
   =========================== */
.badge {
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.3px;
}

.badge-success {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.badge-primary {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

.badge-secondary {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    color: #374151;
    border: 1px solid #D1D5DB;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #D8E7F3;
    color: #2E5C7F;
}

.anniversary-countdown {
    font-size: 15px;
    margin-top: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #FFF4E6 0%, #FFE8D1 100%);
    border-radius: 8px;
    border-left: 3px solid #F4A261;
}

/* ===========================
   MODALES
   =========================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-large .modal-content {
    max-width: 900px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.modal-close {
    font-size: 32px;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.modal-close:hover {
    background: var(--light-bg);
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===========================
   SECTIONS DÉTAIL
   =========================== */
.client-detail, .vente-detail {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-section {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-section h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item strong {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.detail-item span {
    color: var(--text-dark);
    font-size: 15px;
}

.fidelite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.fidelite-card {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.fidelite-card h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.fidelite-montant {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.fidelite-card small {
    color: var(--text-muted);
    font-size: 12px;
}

/* ===========================
   ARTICLES VENTE
   =========================== */
.articles-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 18px;
    color: var(--primary-color);
}

.article-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1fr 1.5fr 100px;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
}

.total-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    text-align: right;
}

.total-section h3 {
    font-size: 24px;
    color: var(--primary-color);
}

/* ===========================
   ONGLETS
   =========================== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--light-bg);
}

.tab-btn.active {
    background: var(--accent-color);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===========================
   CARDS
   =========================== */
.card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.config-form {
    max-width: 600px;
}

/* ===========================
   SECTION
   =========================== */
.section {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.section h2 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ===========================
   CARTE BONS SIMPLIFIÉE
   =========================== */
.bons-summary {
    margin-bottom: 30px;
}

.bons-total-card {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.3);
    transition: var(--transition);
}

.bons-total-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(244, 67, 54, 0.4);
}

.bons-total-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.bons-total-icon svg {
    display: block;
}

.bons-total-info {
    text-align: center;
}

.bons-total-number {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.bons-total-label {
    font-size: 20px;
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

/* ===========================
   EMPTY STATE
   =========================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-state svg {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
}

/* ===========================
   UTILITAIRES
   =========================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-large {
    font-size: 20px;
    font-weight: 600;
}

.motif-content {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dark);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1200px) {
    .navbar {
        padding: 0 20px;
    }
    
    .navbar-menu {
        gap: 2px;
    }
    
    .navbar-menu li a {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 968px) {
    .navbar-menu li a {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .navbar-menu li a svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 1406px) {
    .container {
        padding: 20px;
    }
    
    .navbar {
        height: 70px;
        padding: 15px 25px;
        position: relative;
    }
    
    .navbar-brand h2 {
        font-size: 20px;
        font-weight: 700;
    }
    
    .burger-menu {
        display: flex;
        order: 2;
    }
    
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 999;
        order: 3;
        margin: 0;
        padding: 0;
        gap: 0;
    }
    
    .navbar-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .navbar-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-menu li:last-child {
        border-bottom: none;
    }
    
    .navbar-menu li a {
        width: 100%;
        padding: 15px 20px;
        border-radius: 0;
        justify-content: flex-start;
    }
    
    .navbar-menu li a:hover {
        background: var(--light-bg);
    }
    
    .navbar-user {
        display: none;
    }
    
    .navbar-mobile-user {
        display: block !important;
    }
    
    .navbar-mobile-user .btn-logout {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 15px;
        border-radius: var(--radius-md);
        transition: var(--transition);
    }
    
    .navbar-mobile-user .btn-logout:hover {
        background: rgba(220, 38, 38, 0.1);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .bons-total-card {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
    }
    
    .bons-total-icon {
        padding: 15px;
    }
    
    .bons-total-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .bons-total-number {
        font-size: 48px;
    }
    
    .bons-total-label {
        font-size: 16px;
    }
    
    .search-form, .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form .form-control, .filters-form .form-control {
        min-width: 100%;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .article-row {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* Mobile Small Phones */
@media (max-width: 480px) {
    .navbar {
        height: 60px;
        padding: 0 12px;
    }
    
    .navbar-logo {
        width: 35px;
        height: 35px;
    }
    
    .navbar-brand h2 {
        font-size: 16px;
    }
    
    .btn-logout {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .container {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .metric-card {
        padding: 20px;
        text-align: center;
    }
    
    .metric-card h3 {
        font-size: 14px;
    }
    
    .metric-card p {
        font-size: 28px;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .bons-total-card {
        padding: 25px 15px;
    }
    
    .bons-total-number {
        font-size: 42px;
    }
    
    .bons-total-label {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* ===========================
   SKELETON LOADERS
   =========================== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 140px;
    margin-bottom: 20px;
}

.skeleton-table-row {
    height: 50px;
    margin-bottom: 8px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* ===========================
   TOAST NOTIFICATIONS
   =========================== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 450px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.toast-success::before {
    background: var(--success-color);
}

.toast.toast-error::before {
    background: var(--danger-color);
}

.toast.toast-warning::before {
    background: var(--warning-color);
}

.toast.toast-info::before {
    background: #3B82F6;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-success .toast-icon {
    background: #D1FAE5;
    color: var(--success-color);
}

.toast-error .toast-icon {
    background: #FEE2E2;
    color: var(--danger-color);
}

.toast-warning .toast-icon {
    background: #FEF3C7;
    color: var(--warning-color);
}

.toast-info .toast-icon {
    background: #DBEAFE;
    color: #3B82F6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
}

.toast-close {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 4px;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--gray-200);
    animation: toastProgress 4s linear;
}

.toast-success .toast-progress {
    background: var(--success-color);
}

.toast-error .toast-progress {
    background: var(--danger-color);
}

.toast-warning .toast-progress {
    background: var(--warning-color);
}

.toast-info .toast-progress {
    background: #3B82F6;
}

@keyframes toastSlideIn {
    0% {
        transform: translateX(400px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1);
}

@keyframes toastSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ===========================
   PROGRESS BARS POUR SEUILS
   =========================== */
.progress-container {
    margin-top: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.progress-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar-wrapper {
    width: 100%;
    height: 10px;
    background: var(--gray-100);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar.complete {
    background: linear-gradient(90deg, var(--success-color), #34D399);
}

.progress-bar.near-complete {
    background: linear-gradient(90deg, var(--warning-color), #FBBF24);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray-500);
}

.progress-remaining {
    display: flex;
    align-items: center;
    gap: 4px;
}

.progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-badge.complete {
    background: #D1FAE5;
    color: var(--success-color);
}

.progress-badge.near {
    background: #FEF3C7;
    color: var(--warning-color);
}

.progress-badge.far {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Animation d'entrée pour les progress bars */
.progress-bar-wrapper {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-container {
        right: 15px;
        left: 15px;
        top: 80px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
    
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
