@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Couleurs extraites du logo */
    --tick-blue: #18a0fb;
    --it-teal: #00d2b4;
    --crm-navy: #152c4a;
    --bg-light: #f4f7f6;
    --card-bg: #ffffff;
    --border-radius: 12px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light) !important;
    color: var(--crm-navy);
}

/* Typographie & En-têtes */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--crm-navy);
}

.logo-header {
    height: 45px; /* Ajuste selon la taille souhaitée */
    width: auto;
}

/* Boutons avec dégradé inspiré du logo */
.btn-primary {
    background: linear-gradient(135deg, var(--tick-blue) 0%, var(--it-teal) 100%) !important;
    border: none !important;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 210, 180, 0.3);
}

.btn-dark {
    background-color: var(--crm-navy) !important;
    border-color: var(--crm-navy) !important;
    border-radius: 6px;
    font-weight: 500;
}

.btn-dark:hover {
    background-color: #0e1e33 !important;
}

/* Tableaux */
.table-responsive {
    border-radius: var(--border-radius);
    border: 1px solid rgba(21, 44, 74, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03) !important;
}

.table thead th {
    background-color: var(--card-bg) !important;
    color: var(--crm-navy);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(21, 44, 74, 0.1);
    padding: 1.2rem 1rem;
}

.table tbody td {
    padding: 1.2rem 1rem;
    vertical-align: middle;
    border-bottom-color: rgba(21, 44, 74, 0.05);
}

/* Sélecteur de statut stylisé */
.form-select-status {
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 2rem 0.4rem 1rem;
    border: 1px solid rgba(21, 44, 74, 0.2);
    background-color: var(--bg-light);
    color: var(--crm-navy);
    min-width: 145px; /* Empêche l'écrasement sur mobile */
}

/* =========================================
   MODERN LOGIN SCREEN (OPTICONTACT)
   ========================================= */
#loginScreen {
    min-height: 100vh;
    background-color: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* Background gradient blobs using CSS filters */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 1;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(24, 160, 251, 0.4), rgba(0, 210, 180, 0.2));
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(0, 210, 180, 0.3), rgba(21, 44, 74, 0.1));
    bottom: -50px;
    right: -50px;
    animation-delay: -10s;
}

/* 
 * Complex keyframe animation for organic background movement.
 * Combines translation and subtle rotation to mimic fluid motion.
 */
@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(50px, 30px) rotate(10deg); }
    100% { transform: translate(-20px, 50px) rotate(-5deg); }
}

.opticontact-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.header-logo {
    max-height: 35px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-divider {
    width: 1px;
    height: 24px;
    background-color: rgba(21, 44, 74, 0.2);
}

.header-tagline {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, var(--crm-navy), var(--tick-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(21, 44, 74, 0.1);
    color: var(--crm-navy);
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-glass:hover {
    background: var(--crm-navy);
    color: white;
    transform: translateY(-1px);
}

.login-card-modern {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(21, 44, 74, 0.08), 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.app-logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 90px;
}

.app-logo-wrapper img {
    max-height: 100%;
    object-fit: contain;
}

.custom-form-floating > .form-control {
    border-radius: 12px;
    border: 1px solid rgba(21, 44, 74, 0.15);
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.custom-form-floating > .form-control:focus {
    border-color: var(--tick-blue);
    box-shadow: 0 0 0 4px rgba(24, 160, 251, 0.1);
    background-color: #ffffff;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--tick-blue) 0%, var(--it-teal) 100%);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    padding: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 210, 180, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 210, 180, 0.4);
}

/* =========================================
   PAGINATION PREMIUM
   ========================================= */
#paginationContainer {
    /* Fusionne visuellement avec le bas du tableau */
    border-top: 1px solid rgba(21, 44, 74, 0.05) !important;
}

.pagination {
    --bs-pagination-border-width: 0;
    --bs-pagination-bg: transparent;
    --bs-pagination-hover-bg: #e8ecf1; /* Gris bleuté très doux */
    --bs-pagination-hover-color: var(--crm-navy);
    --bs-pagination-color: #6c757d;
}

.pagination .page-item .page-link {
    border-radius: 8px !important;
    margin: 0 3px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    transition: all 0.2s ease;
    display: d-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.pagination .page-item.active .page-link {
    background-color: var(--tick-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(21, 44, 74, 0.2);
    transform: translateY(-1px);
}

.pagination .page-item.disabled .page-link {
    background-color: transparent;
    opacity: 0.4;
}

/* Custom Checkboxes */
.form-check-input.lead-checkbox, 
#selectAll {
    width: 1.35rem; 
    height: 1.35rem;
    cursor: pointer;
    border: 2px solid #adb5bd;
    margin-top: 0.15rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-check-input.lead-checkbox:hover, 
#selectAll:hover {
    border-color: var(--it-teal);
}

.form-check-input.lead-checkbox:checked, 
#selectAll:checked {
    background-color: var(--it-teal);
    border-color: var(--it-teal);
}

.form-check-input.lead-checkbox:focus, 
#selectAll:focus {
    box-shadow: 0 0 0 0.2rem rgba(32, 201, 151, 0.25);
    border-color: var(--it-teal);
}

@media (min-width: 768px) {
    .border-end-md { border-right: 1px solid rgba(21, 44, 74, 0.1) !important; }
    .border-top-md-0 { border-top: none !important; }
}

@media (max-width: 767px) {
    .border-end-md { border-right: none !important; }
    .table td { font-size: 0.9rem; padding: 0.8rem 0.5rem; }
}

.score-badge-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    white-space: nowrap;
}

.score-high {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.score-medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.score-low {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}