/* --- TITLE & SUBTITLE --- */
.title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
}
.subtitle {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* --- DASHBOARD CARD --- */
.dashboard-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}
.dashboard-card:hover {
    transform: translateY(-0.188rem);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

/* --- HEADER & FOOTER --- */
.dashboard-card-header {
    font-weight: 600;
    font-size: 1rem;
    color: #222;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f1f1;
    background: #fafafa;
    border-radius: 1rem 1rem 0 0;
}
.dashboard-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}
.dashboard-card-footer {
    padding: 0.75rem 1.25rem;
    background: #fafafa;
    border-top: 1px solid #f1f1f1;
    text-align: right;
    border-radius: 0 0 1rem 1rem;
}
.dashboard-card-footer a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #16a34a;
    transition: color 0.2s;
}
.dashboard-card-footer a:hover {
    color: #15803d;
}

.todo-card {
    height: 400px;
    display: flex;
    flex-direction: column;
}
.todo-card .dashboard-card-body {
    overflow-y: auto;
}

/* --- TODO LIST --- */
.list-group-item {
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    border-left: none;
    border-right: none;
    border-top: none;
}
.list-group-item:last-child {
    border-bottom: none;
}
.list-group-item:hover {
    background-color: #f9fafb;
}
.list-group-item form label span {
    font-size: 0.9rem;
}

/* --- CARDS STATS --- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    height: 100%;
}
.stat-card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
    transform: translateY(-0.125rem);
}
.stat-icon-box {
    border-radius: 0.625rem;
    background: #edf0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0.75rem;
    color: #374151;
    flex-shrink: 0;
}
.stat-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
}
.stat-value {
    margin: 0.2rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
}

/* --- CARD TABLE --- */
.table-card {
    border-radius: 0.875rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.05);
    padding: 0;
}
.table-card-body {
    padding: 1.25rem;
}
.table-card-footer {
    padding: 0.75rem 1.25rem 0;
    border-top: 1px solid #f1f1f1;
    background: #fafafa;
    border-radius: 0 0 1rem 1rem;
}

/* --- TABLE --- */
.table-base {
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table-base thead {
    background: #f9fafb;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.table-base th {
    text-align: left;
    font-weight: 600;
    padding: 0.6rem;
    background: #FFF;
    color: #475569;
    border-bottom: 1.5px solid #e5e7eb;
}
.table-base td {
    padding: 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.table-base tr:hover {
    background-color: #f9fafb;
}

/* --- ADD BOUTON --- */
.add-btn {
    background-color: #16a34a;
    color: #fff !important;
    border-radius: 0.625rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.add-btn:hover {
    background-color: #15803d;
    border-color: #15803d;
}

/* --- PAGINATION --- */
.pagination .page-link {
    color: #16a34a;
}
.pagination .page-item.active .page-link {
    background-color: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.pagination .page-link:hover {
    background-color: #dcfce7;
    color: #16a34a;
}
.pagination .page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(22, 163, 74, 0.4);
    border-color: #16a34a;
    outline: none;
}

/* --- DROPDOWN MENU --- */
.action-menu {
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    padding: 0;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-size: 0.9rem;
}
.action-menu li {
    border-bottom: 1px solid #f0f0f0;
}
.action-menu li:last-child {
    border-bottom: none;
}
.action-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.action-item i {
    color: #6b7280;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}
.action-item:hover,
.action-item:focus {
    background: #f0fdf4;
    color: #16a34a;
}
.action-item:hover i,
.action-item:focus i {
    color: #16a34a;
}

/* --- ROLE BADGE --- */
.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.badge-role i {
    font-size: 0.9rem;
}
.badge-admin {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff;
}
.badge-admin i {
    color: #ffd700;
}
.badge-user {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

/* ---  BADGE STATUS --- */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.badge-status.badge-in-progress {
    background-color: #598eec;
    color: white;
}

.badge-status.badge-ended {
    background-color: #35b16d;
    color: white;
}

/* --- FORM CARD --- */
.form-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.04);
}

/* --- INPUTS --- */
.form-input {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background-color: #fafafa;
}
.form-input:focus,
.form-select:focus {
    border-color: #16a34a;
    outline: none;
    box-shadow: none;
}

/* --- LABELS --- */
.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #374151;
    letter-spacing: 0.5px;
}

/* --- CANCEL BUTTON */
.outline-btn,
.cancel-btn {
    border-radius: 0.625rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 2px solid rgba(22, 163, 74, 0.6);
    color: #16a34a;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}
.outline-btn:hover,
.cancel-btn:hover {
    border-color: #15803d;
    color: #15803d;
}
.form-label.required::after {
    content: " *";
    color: #dc2626;
    font-weight: bold;
}

/* --- BACK BUTTON --- */
.back-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #f1f5f9;
    color: #16a34a;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.back-button:hover {
    background: #16a34a;
    color: #FFF;
}

/* --- REFERENT SECTION --- */
.referent-section {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.btn-add-referent {
    background: none;
    text-decoration: underline;
    border: none;
    color: #16a34a;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.btn-add-referent:hover {
    text-decoration: underline;
    color: #15803d;
}

/* --- PLACEHOLDER --- */
.placeholder {
    width: 100%;
    background-color: #F7F7F7;
    border-radius: 0.75rem;
    padding: 2rem 1rem;
    margin-top: 1rem;
}

.placeholder .placeholder-icon-circle {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #E2E2E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.placeholder .placeholder-icon-circle i {
    color: #6B7280;
    font-size: 1rem;
}

.placeholder .placeholder-text {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.placeholder .placeholder-link {
    display: inline-flex;
    align-items: center;
    color: #16A34A;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.placeholder .placeholder-link i {
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

.placeholder .placeholder-link:hover {
    text-decoration: underline;
    color: #15803d;
}

/* --- REMOVE REFERENT BUTTON --- */
.btn-remove-referent {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 0.625rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s ease;
    line-height: 1;
}

.btn-remove-referent:hover {
    background: #fecaca;
    color: #b91c1c;
}

@media (min-width: 768px) {
    .btn-remove-referent {
        width: 2.83rem;
        height: 2.83rem;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .btn-remove-referent:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(220, 38, 38, 0.15);
    }

    .btn-remove-referent i {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .btn-remove-referent {
        padding: 0.7rem 1rem;
    }
}

/* --- TODO REMOVE BUTTON --- */
.btn-remove-todo {
    background: transparent;
    color: #dc2626;
    border: none;
    padding: 0.3rem 0.4rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-remove-todo i {
    font-size: 0.95rem;
    opacity: 0.8;
}
.btn-remove-todo:hover {
    background: #fee2e2;
    color: #b91c1c;
    opacity: 1;
}
.btn-remove-todo:active {
    transform: scale(0.95);
}

/* --- BADGES (status) --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100vmax;
    text-transform: capitalize;
    line-height: 1;
}
.status-badge::before {
    content: "";
    flex: 0 0 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: currentColor;
}

/* --- STATUTS --- */
.status-to_prospect { 
    background: #f1f5f9;
    color: #334155;
}
.status-contacted { 
    background: #dbeafe; 
    color: #2563eb;
}
.status-interested { 
    background: #e0e7ff;
    color: #3730a3;
}
.status-not_interested { 
    background: #fee2e2; 
    color: #dc2626;
}
.status-signed { 
    background: #dcfce7; 
    color: #16a34a;
}

.status-default { 
    background: #f3f4f6; 
    color: #374151; 
}

/* --- COMMENTS SECTION --- */
.comments-section {
    background-color: #f3f4f6;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-top: 1.25rem;
    border: 1px solid #e5e7eb;
}
.comments-section-empty {
    background: none;
    border: none;
    padding: 0;
    margin-top: 0;
}
.comments-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.comment-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease-in-out;
}
.comment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}
.comment-body {
    flex: 1;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.comment-author {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}
.comment-date {
    font-size: 0.8rem;
    color: #94a3b8;
}
.comment-text {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .comment-card {
        flex-direction: column;
        align-items: stretch;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
