/* ==========================================
   GEIREC CRM — Charte Graphique GEIREC
   Palette : Corail #C9695E / Beige #F3E8DE / Brun #2D2A27
   ========================================== */

/* --- Base & Layout --- */
body {
    background: linear-gradient(135deg, #F9F3ED 0%, #F3E8DE 50%, #F9F3ED 100%);
}

/* --- Sidebar --- */
.sidebar-container {
    background: linear-gradient(180deg, #2D2A27 0%, #1F1D1B 100%);
}

.sidebar-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(201,105,94,0.15) 0%, transparent 50%, rgba(201,105,94,0.08) 100%);
}

/* Logo glow effect */
.logo-mark {
    position: relative;
}
.logo-mark::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(201,105,94,0.3), rgba(178,85,73,0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.logo-mark:hover::after {
    opacity: 1;
}

/* Nav items */
.nav-item {
    position: relative;
    overflow: hidden;
}
.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #E08275, #C9695E);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s ease;
}
.nav-item.bg-geirec\/15::before {
    height: 60%;
}

/* User avatar pulse */
.user-avatar {
    position: relative;
}
.user-avatar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #2D2A27;
}

/* --- Cards & Containers --- */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(235, 218, 204, 0.8);
}

/* --- Timeline --- */
.timeline-line {
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #EBDACC, #D9C4AF 50%, #EBDACC);
}

.timeline-entry {
    animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- KPI Cards --- */
.kpi-card {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: backwards;
    position: relative;
    overflow: hidden;
}
.kpi-card:nth-child(1) { animation-delay: 0ms; }
.kpi-card:nth-child(2) { animation-delay: 60ms; }
.kpi-card:nth-child(3) { animation-delay: 120ms; }
.kpi-card:nth-child(4) { animation-delay: 180ms; }
.kpi-card:nth-child(5) { animation-delay: 240ms; }

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kpi-color, #C9695E), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.kpi-card:hover::before {
    opacity: 1;
}

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

/* --- Kanban --- */
.kanban-card {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.12);
}

/* --- Welcome banner --- */
.welcome-banner {
    animation: bannerSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes bannerSlide {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Actions --- */
.action-item {
    transition: all 0.15s ease;
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
}
.action-item:hover {
    background-color: #FDFBF9;
}

.action-overdue {
    border-left: 3px solid #C9695E;
    padding-left: 12px;
    margin-left: -3px;
    background: linear-gradient(90deg, rgba(201,105,94,0.04), transparent 30%);
}

/* --- Badge pulse --- */
.badge-important {
    animation: pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* --- Tables --- */
table tbody tr {
    transition: background-color 0.15s ease;
}
table tbody tr:hover {
    background-color: rgba(201, 105, 94, 0.04);
}

/* --- SVG circle (taux de transformation) --- */
circle {
    transition: stroke-dasharray 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Transitions globales --- */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.2s ease;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #D9C4AF;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C5A98F;
}

/* Sidebar scrollbar */
.sidebar-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
}

/* --- Mentions --- */
.mention {
    color: #C9695E;
    font-weight: 600;
    background: linear-gradient(135deg, #FDF5F3, #FBE8E4);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.92em;
}

/* --- Line clamp --- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Focus ring universal --- */
*:focus-visible {
    outline: 2px solid rgba(201, 105, 94, 0.4);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Stat number counter feel --- */
.stat-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}

/* --- Gradient text utility --- */
.text-gradient {
    background: linear-gradient(135deg, #C9695E, #B15549);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Smooth hover lift for cards --- */
.hover-lift {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.08);
}

/* --- Page container animation --- */
main > * {
    animation: pageIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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