/* ========================================
   ALGOMATION DZ - Admin Panel Styles
   Design inspiré de algomation-dz.com
   ======================================== */

:root {
    /* Couleurs principales Algomation */
    --primary-color: #2D5A7B;
    --primary-light: #4A88B8;
    --primary-dark: #1B3D54;
    --secondary-color: #FF6B35;
    --secondary-light: #FF8A5B;
    --accent-color: #00C49A;
    --accent-light: #00E6B5;
    
    /* Couleurs de fond */
    --dark-color: #1B2838;
    --darker-color: #0F1923;
    --light-color: #F8FAFC;
    --white: #FFFFFF;
    
    /* Couleurs de texte */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    /* Bordures */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    
    /* États */
    --success-color: #00C49A;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    
    /* LinkedIn */
    --linkedin-color: #0077B5;
    --linkedin-hover: #005885;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2D5A7B 0%, #4A88B8 100%);
    --gradient-secondary: linear-gradient(135deg, #FF6B35 0%, #FFB800 100%);
    --gradient-success: linear-gradient(135deg, #00C49A 0%, #00E6B5 100%);
    --gradient-dark: linear-gradient(135deg, #1B2838 0%, #2D5A7B 100%);
    --gradient-linkedin: linear-gradient(135deg, #0077B5 0%, #00A0DC 100%);
    
    /* Ombres */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(45, 90, 123, 0.08);
    --shadow-md: 0 4px 16px rgba(45, 90, 123, 0.12);
    --shadow-lg: 0 8px 32px rgba(45, 90, 123, 0.16);
    --shadow-xl: 0 16px 48px rgba(45, 90, 123, 0.2);
    --shadow-glow: 0 0 40px rgba(45, 90, 123, 0.3);
    --shadow-orange: 0 8px 32px rgba(255, 107, 53, 0.3);
    --shadow-green: 0 8px 32px rgba(0, 196, 154, 0.3);
    
    /* Rayons de bordure */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-color);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   PARTICULES ANIMÉES
   ======================================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(80px);
    animation: float 20s infinite;
}

.particle:nth-child(1) {
    background: rgba(45, 90, 123, 0.15);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    background: rgba(255, 107, 53, 0.12);
    top: 60%;
    right: -10%;
    animation-delay: -5s;
}

.particle:nth-child(3) {
    background: rgba(0, 196, 154, 0.1);
    bottom: -10%;
    left: 30%;
    animation-delay: -10s;
}

.particle:nth-child(4) {
    background: rgba(45, 90, 123, 0.1);
    top: 30%;
    left: 50%;
    width: 300px;
    height: 300px;
    animation-delay: -15s;
}

.particle:nth-child(5) {
    background: rgba(255, 107, 53, 0.08);
    bottom: 20%;
    right: 20%;
    width: 250px;
    height: 250px;
    animation-delay: -8s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(30px, 50px) scale(1.05); }
}

/* ========================================
   PAGES
   ======================================== */
.page {
    display: none;
    position: relative;
    z-index: 1;
}

.page.active {
    display: block;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 196, 154, 0.1) 0%, transparent 40%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 50px 45px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 460px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-secondary);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-img {
    height: 100px;
    width: auto;
    border-radius: var(--radius-lg);
    margin: 0 auto 20px;
    box-shadow: var(--shadow-lg);
    object-fit: contain;
    transition: var(--transition-normal);
}

.logo-img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-lg);
    transform: rotate(-5deg);
    transition: var(--transition-normal);
}

.logo-icon:hover {
    transform: rotate(0deg) scale(1.05);
}

.logo-icon i {
    font-size: 36px;
    color: white;
}

.logo h1 {
    font-size: 2em;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.logo-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.85em;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    height: 50px;
    width: auto;
    border-radius: var(--radius-sm);
    object-fit: contain;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.brand-icon i {
    color: white;
    font-size: 22px;
}

.brand-text h2 {
    font-size: 1.4em;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link i {
    font-size: 1.1em;
}

.nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    padding: 30px;
    padding-top: 100px; /* Espace pour la navbar fixe */
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card.stat-primary::before { background: var(--gradient-primary); }
.stat-card.stat-orange::before { background: var(--gradient-secondary); }
.stat-card.stat-green::before { background: var(--gradient-success); }

.stat-card.stat-primary:hover { box-shadow: var(--shadow-glow); }
.stat-card.stat-orange:hover { box-shadow: var(--shadow-orange); }
.stat-card.stat-green:hover { box-shadow: var(--shadow-green); }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-primary .stat-icon { background: var(--gradient-primary); }
.stat-orange .stat-icon { background: var(--gradient-secondary); }
.stat-green .stat-icon { background: var(--gradient-success); }

.stat-info h3 {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Sections */
.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.section-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.section-icon.linkedin { background: var(--gradient-linkedin); }
.section-icon.green { background: var(--gradient-success); }
.section-icon.orange { background: var(--gradient-secondary); }

.section-icon i {
    font-size: 28px;
    color: white;
}

.section-header h2 {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1em;
    margin-top: 4px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.2em;
}

.card-header span {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--text-primary);
}

/* ========================================
   FORMS
   ======================================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    font-family: inherit;
    transition: var(--transition-normal);
    background: var(--white);
    color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--primary-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(45, 90, 123, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.form-group small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85em;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 400px;
    height: 400px;
}

.btn-full {
    width: 100%;
}

.btn-icon i {
    font-size: 1.1em;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-green);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 196, 154, 0.4);
}

.btn-warning {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-orange);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
}

.btn-linkedin {
    background: var(--gradient-linkedin);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 119, 181, 0.3);
}

.btn-linkedin:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 119, 181, 0.4);
}

.btn-logout {
    width: 48px;
    height: 48px;
    padding: 0;
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
    border-radius: var(--radius-md);
}

.btn-logout:hover {
    transform: scale(1.1);
}

/* ========================================
   MESSAGES
   ======================================== */
.message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: none;
    font-weight: 600;
    font-size: 0.95em;
    animation: slideIn 0.3s ease;
}

.message.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.message.success {
    background: linear-gradient(135deg, rgba(0, 196, 154, 0.1) 0%, rgba(0, 230, 181, 0.15) 100%);
    color: #059669;
    border-left: 4px solid var(--success-color);
}

.message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.15) 100%);
    color: #DC2626;
    border-left: 4px solid var(--error-color);
}

.message.info {
    background: linear-gradient(135deg, rgba(45, 90, 123, 0.1) 0%, rgba(74, 136, 184, 0.15) 100%);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.message.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.15) 100%);
    color: #D97706;
    border-left: 4px solid var(--warning-color);
}

/* ========================================
   RDV LIST
   ======================================== */
.rdv-list {
    margin-top: 24px;
    display: grid;
    gap: 16px;
}

.rdv-item {
    background: var(--light-color);
    border-radius: var(--radius-md);
    padding: 24px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition-normal);
    position: relative;
}

.rdv-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    background: white;
}

.rdv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.rdv-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
}

.rdv-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-secondary);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85em;
    font-weight: 600;
}

.rdv-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.rdv-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rdv-actions .btn {
    padding: 10px 20px;
    font-size: 0.9em;
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 40, 56, 0.8);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: modalFade 0.3s ease;
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 520px;
    width: 100%;
    position: relative;
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}

@keyframes modalSlide {
    from { 
        opacity: 0;
        transform: translateY(-30px) scale(0.95); 
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1); 
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--light-color);
    cursor: pointer;
    font-size: 24px;
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.close:hover {
    background: var(--error-color);
    color: white;
}

/* Slack Modal */
.modal-slack {
    text-align: center;
    padding: 50px 40px;
}

.slack-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.slack-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4A154B 0%, #611f69 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    animation: pulse 2s infinite;
}

.slack-icon i {
    font-size: 40px;
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 3px solid #4A154B;
    border-radius: var(--radius-lg);
    animation: ring 2s infinite;
}

.pulse-ring.delay {
    animation-delay: 0.5s;
}

@keyframes ring {
    0% {
        width: 80px;
        height: 80px;
        opacity: 1;
    }
    100% {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

.modal-slack h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-slack p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.waiting-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.waiting-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite both;
}

.waiting-dots span:nth-child(2) { animation-delay: 0.16s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark-color);
    padding: 25px 30px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9em;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links span {
    color: var(--text-muted);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links i {
    color: var(--secondary-color);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .navbar {
        padding: 12px 20px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link {
        padding: 12px 16px;
    }
    
    .main-content {
        padding: 20px;
        padding-top: 90px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-content {
        padding: 15px;
        padding-top: 140px; /* Plus d'espace pour navbar haute sur mobile */
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.5em;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    .rdv-header {
        flex-direction: column;
    }
    
    .rdv-actions {
        width: 100%;
    }
    
    .rdv-actions .btn {
        flex: 1;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 25px;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .logo-icon i {
        font-size: 28px;
    }
    
    .logo h1 {
        font-size: 1.6em;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95em;
    }
}

/* ========================================
   RÉSULTATS SCRAPING
   ======================================== */
.scraping-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-light);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h4 {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-header h4 i {
    color: var(--primary-color);
}

.results-header h4 span {
    background: var(--gradient-primary);
    color: white;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.85em;
}

.results-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Barre de filtres */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    padding: 15px 20px;
    background: var(--light-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
}

/* Toggle Switch */
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.filter-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.filter-toggle input:checked + .toggle-slider {
    background: var(--gradient-primary);
}

.filter-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.filter-label {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label i {
    color: var(--primary-color);
}

.filter-toggle input:checked ~ .filter-label {
    color: var(--text-primary);
}

.filter-stats {
    margin-left: auto;
    font-size: 0.9em;
    color: var(--text-muted);
    background: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.filter-stats span {
    font-weight: 700;
    color: var(--primary-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85em;
}

.entreprises-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.entreprise-card {
    background: var(--light-color);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.entreprise-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.entreprise-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.entreprise-header h5 {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.entreprise-header h5 i {
    color: var(--secondary-color);
}

.entreprise-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

.entreprise-details p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.entreprise-details p:last-child {
    margin-bottom: 0;
}

.entreprise-details p i {
    color: var(--primary-color);
    width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.entreprise-details a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}

.entreprise-details a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Scrollbar custom */
.entreprises-list::-webkit-scrollbar {
    width: 8px;
}

.entreprises-list::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

.entreprises-list::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

.entreprises-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .entreprises-list {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   SESSIONS GRATUITES
   ======================================== */
.section-icon.purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
}

.sessions-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95em;
    transition: var(--transition-normal);
}

.search-box input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 123, 0.1);
}

/* Filtre select box */
.filter-select-box {
    position: relative;
    min-width: 180px;
}

.filter-select-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.filter-select-box select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95em;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232D5A7B'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    transition: var(--transition-normal);
}

.filter-select-box select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 123, 0.1);
}

.filter-select-box select:hover {
    border-color: var(--primary-color);
}

/* Tableau des sessions */
.sessions-table-container {
    overflow-x: auto;
    margin-top: 15px;
}

.sessions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.sessions-table thead {
    background: var(--gradient-primary);
    color: white;
}

.sessions-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.5px;
}

.sessions-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.sessions-table tbody tr:hover {
    background: var(--light-color);
}

.sessions-table td {
    padding: 14px 12px;
    vertical-align: middle;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #DC2626;
}

.badge-orange {
    background: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #2563EB;
}

.badge-green {
    background: rgba(0, 196, 154, 0.15);
    color: #059669;
}

.badge-gray {
    background: rgba(107, 114, 128, 0.15);
    color: #4B5563;
}

.score-badge {
    display: inline-block;
    background: var(--gradient-secondary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85em;
}

/* Select statut */
.statut-select {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    background: white;
}

.statut-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.statut-select.badge-green {
    border-color: #059669;
    color: #059669;
}

.statut-select.badge-orange {
    border-color: #D97706;
    color: #D97706;
}

.statut-select.badge-red {
    border-color: #DC2626;
    color: #DC2626;
}

.statut-select.badge-blue {
    border-color: #2563EB;
    color: #2563EB;
}

/* Boutons actions */
.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #2563EB;
    transform: translateY(-2px);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1em;
}

/* Modal large */
.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.session-detail-content {
    padding: 10px 0;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-section h4 {
    font-size: 1em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4 i {
    width: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    background: var(--light-color);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
}

.detail-item label {
    display: block;
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-item span {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-text {
    background: var(--light-color);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.detail-text label {
    display: block;
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-text p {
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
}

/* Responsive sessions */
@media (max-width: 768px) {
    .sessions-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .filter-select-box {
        min-width: auto;
    }
    
    .sessions-table {
        font-size: 0.8em;
    }
    
    .sessions-table th,
    .sessions-table td {
        padding: 10px 8px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-large {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}

/* ==========================================
   CAMPAGNE EMAIL
   ========================================== */

.section-icon.email {
    background: linear-gradient(135deg, #EA4335 0%, #c5221f 100%);
}

.campaign-step {
    margin-bottom: 20px;
}

.campaign-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95em;
    background: white;
    cursor: pointer;
    transition: var(--transition-normal);
}

.form-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 123, 0.1);
}

/* Stats campagne */
.campaign-stats {
    display: flex;
    gap: 25px;
    padding: 15px 20px;
    background: var(--light-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.campaign-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    color: var(--text-secondary);
}

.campaign-stats .stat-item i {
    color: var(--primary-color);
}

.campaign-stats .stat-item strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Liste des entreprises campagne */
.campaign-entreprises-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.campaign-entreprise-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.campaign-entreprise-item:last-child {
    border-bottom: none;
}

.campaign-entreprise-item:hover {
    background: var(--light-color);
}

.campaign-entreprise-item.no-email {
    opacity: 0.6;
    background: #fafafa;
}

/* Checkbox custom */
.campaign-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.campaign-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.campaign-checkbox .checkmark {
    height: 22px;
    width: 22px;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.campaign-checkbox:hover .checkmark {
    border-color: var(--primary-color);
}

.campaign-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.campaign-checkbox input:disabled ~ .checkmark {
    background-color: #e0e0e0;
    border-color: #ccc;
    cursor: not-allowed;
}

.campaign-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.campaign-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Info entreprise */
.entreprise-info {
    flex: 1;
}

.entreprise-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.entreprise-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.85em;
    color: var(--text-muted);
}

.entreprise-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.entreprise-meta i {
    font-size: 0.9em;
}

/* Email status */
.entreprise-email {
    font-size: 0.9em;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.entreprise-email.has-email {
    background: rgba(0, 196, 154, 0.1);
    color: var(--success-color);
}

.entreprise-email.no-email {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.entreprise-email i {
    margin-right: 5px;
}

/* Header actions */
.card-header .header-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

/* Summary campagne */
.campaign-summary {
    background: linear-gradient(135deg, rgba(45, 90, 123, 0.1) 0%, rgba(0, 196, 154, 0.1) 100%);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    text-align: center;
}

.campaign-summary p {
    font-size: 1.1em;
    color: var(--text-primary);
    margin: 0;
}

.campaign-summary strong {
    color: var(--primary-color);
    font-size: 1.3em;
}

/* Bouton email */
.btn-email {
    background: linear-gradient(135deg, #EA4335 0%, #c5221f 100%);
    color: white;
    border: none;
}

.btn-email:hover {
    background: linear-gradient(135deg, #c5221f 0%, #a31b18 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 67, 53, 0.3);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1em;
    width: 100%;
    justify-content: center;
}

/* Responsive campagne */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-row .form-group {
        width: 100%;
    }
    
    .campaign-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .campaign-entreprise-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .entreprise-email {
        align-self: flex-start;
    }
    
    .card-header .header-actions {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .card-header {
        flex-wrap: wrap;
    }
}

/* ==========================================
   GESTION RDV - NOUVEAU DESIGN
   ========================================== */

.rdv-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Tableau RDV */
.rdv-table-container {
    overflow-x: auto;
    margin-top: 15px;
}

.rdv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.rdv-table thead {
    background: linear-gradient(135deg, var(--success-color) 0%, #00a67d 100%);
    color: white;
}

.rdv-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.5px;
}

.rdv-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.rdv-table tbody tr:hover {
    background: var(--light-color);
}

.rdv-table .client-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(45, 90, 123, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.rdv-table .entreprise-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* Badges statut RDV */
.rdv-statut {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.rdv-statut.en-attente {
    background: rgba(255, 193, 7, 0.15);
    color: #d39e00;
}

.rdv-statut.traiter {
    background: rgba(0, 196, 154, 0.15);
    color: var(--success-color);
}

.rdv-statut.annule {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
}

/* Type session badge */
.rdv-type {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.rdv-type.presentiel {
    background: rgba(45, 90, 123, 0.1);
    color: var(--primary-color);
}

.rdv-type.visio {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.rdv-type.telephone {
    background: rgba(255, 107, 53, 0.1);
    color: var(--orange-color);
}

/* Badges état RDV */
.rdv-etat {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    display: inline-block;
}

.rdv-etat.etat-attente {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.rdv-etat.etat-realise {
    background: rgba(0, 196, 154, 0.15);
    color: var(--success-color);
}

.rdv-etat.etat-non-realise {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
}

/* Filtre par dates RDV */
.rdv-date-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.date-range-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range-group label {
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.date-range-group label i {
    color: var(--primary-color);
}

.date-range-group input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 0.9em;
}

.btn-sm {
    padding: 8px 16px !important;
    font-size: 0.85em !important;
}

/* Boutons actions RDV */
.rdv-table .btn-view {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.rdv-table .btn-view:hover {
    background: #1e4a6b;
    transform: scale(1.05);
}

/* Detail grid RDV */
.rdv-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Form input style */
.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95em;
    transition: var(--transition-normal);
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 123, 0.1);
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Form textarea */
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: var(--transition-normal);
}

.form-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 123, 0.1);
}

.form-group.full-width {
    width: 100%;
}

/* Discutable badge */
.discutable-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.discutable-badge.oui {
    background: rgba(0, 196, 154, 0.15);
    color: var(--success-color);
}

.discutable-badge.non {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
}

/* Responsive RDV */
@media (max-width: 768px) {
    .rdv-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rdv-table {
        font-size: 0.8em;
    }
    
    .rdv-table th,
    .rdv-table td {
        padding: 10px 8px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* ===========================================
   COMPTEUR EMAILS QUOTIDIEN
   =========================================== */

.email-limit-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.email-counter {
    font-size: 1em;
    color: var(--text-primary);
}

.email-counter i {
    color: #8B5CF6;
    margin-right: 8px;
}

.email-counter strong {
    color: #8B5CF6;
}

.email-counter.warning {
    background: rgba(255, 193, 7, 0.1);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
}

.email-counter.warning strong {
    color: #d39e00;
}

.email-counter.limit-reached {
    background: rgba(220, 53, 69, 0.1);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
}

.email-counter.limit-reached strong {
    color: var(--danger-color);
}

/* ===========================================
   BOUTON RECHERCHE WEB
   =========================================== */

.btn-web-research {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-web-research:hover {
    background: linear-gradient(135deg, #2980b9, #1f6391);
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.btn-web-research i {
    font-size: 1em;
}

.campaign-entreprise-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===========================================
   MODAL RECHERCHE WEB
   =========================================== */

.web-research-container {
    min-height: 300px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
}

.web-research-result {
    line-height: 1.7;
    font-size: 0.95em;
}

.web-research-result h1,
.web-research-result h2,
.web-research-result h3,
.web-research-result h4 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

.web-research-result p {
    margin-bottom: 15px;
}

.web-research-result ul,
.web-research-result ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.web-research-result a {
    color: #3498db;
    text-decoration: underline;
}

.web-research-result table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.web-research-result table th,
.web-research-result table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

.web-research-result table th {
    background: var(--bg-light);
}

.web-research-result img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.loader-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: var(--text-secondary);
}

.loader-center i {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.error-message {
    text-align: center;
    padding: 30px;
    color: var(--danger-color);
}

.error-message i {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

/* ===========================================
   COMPOSEUR D'EMAIL
   =========================================== */

.email-composer {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.email-composer .form-group {
    margin-bottom: 20px;
}

.email-composer label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.email-composer label i {
    color: var(--primary-color);
    margin-right: 8px;
}

.email-body-textarea {
    min-height: 200px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.email-help {
    margin-top: 8px;
    padding: 10px 15px;
    background: rgba(45, 90, 123, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

.email-help small {
    color: var(--text-secondary);
}

.email-help code {
    background: rgba(45, 90, 123, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--primary-color);
}

.email-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.email-send-info {
    padding: 15px 20px;
}

.email-send-info .info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: var(--radius-md);
    padding: 15px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.email-send-info .info-box i {
    color: #1976d2;
    font-size: 1.2em;
    margin-top: 2px;
}

.email-send-info .info-box p {
    margin: 0;
    color: #1565c0;
    font-size: 0.95em;
    line-height: 1.5;
}

.campaign-summary .summary-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.campaign-summary .summary-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-warning {
    color: #d39e00 !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

/* ===========================================
   PRÉVISUALISATION EMAIL
   =========================================== */

.email-preview-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.email-preview-header {
    background: var(--bg-light);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.preview-field {
    display: flex;
    margin-bottom: 10px;
}

.preview-field:last-child {
    margin-bottom: 0;
}

.preview-field label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
}

.preview-field span {
    color: var(--text-primary);
}

.email-preview-body {
    padding: 25px;
    line-height: 1.7;
    color: var(--text-primary);
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

/* ===========================================
   SECTION ENVOI EMAIL
   =========================================== */

.section-icon.purple {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.email-load-section {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.email-destinataires-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin: 0 20px 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.email-stats {
    display: flex;
    gap: 20px;
}

.email-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.email-stats strong {
    color: var(--primary-color);
}

.email-destinataires-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.email-destinataire-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.email-destinataire-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(45, 90, 123, 0.1);
}

.email-destinataire-item.no-email {
    opacity: 0.6;
    background: var(--bg-light);
}

.email-checkbox {
    position: relative;
    cursor: pointer;
}

.email-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.email-checkbox .checkmark {
    display: block;
    width: 22px;
    height: 22px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.email-checkbox input:checked ~ .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.email-checkbox input:checked ~ .checkmark:after {
    content: '✓';
    display: block;
    color: white;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
}

.email-checkbox input:disabled ~ .checkmark {
    background: var(--bg-light);
    border-color: var(--border-color);
    cursor: not-allowed;
}

.destinataire-info {
    flex: 1;
}

.destinataire-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.destinataire-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.destinataire-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.destinataire-email {
    font-size: 0.9em;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
}

.destinataire-email.has-email {
    background: rgba(0, 196, 154, 0.1);
    color: var(--success-color);
}

.destinataire-email.no-email {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}