html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app > main {
    flex: 1 0 auto;
}

/* --- 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;
}

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

/* --- TODO LIST --- */
.todo-checkbox {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0 !important;
}
.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 .separate-tr {
    border-top: 2px solid #959494 !important;
}
.table-base tr:hover {
    background-color: #f9fafb;
}
.scrollbox {
    max-height: 130px;
    overflow-y: hidden;
    padding-right: 6px;
    position: relative;
    transition: max-height 0.3s ease;
}
.see-all-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}
.see-all-wrapper::before,
.see-all-wrapper::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #ddd;
}
.see-all-btn {
    background-color: #f2f2f2;
    border: none;
    padding: 2px 8px;
    margin: 0 12px;
    font-size: 16px;
    color: #1a73e8;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 6px;
}
.arrow {
    width: 10px;
    height: 10px;
    border-left: 2px solid #1a73e8;
    border-bottom: 2px solid #1a73e8;
    transform: rotate(-45deg);
    display: inline-block;
    margin-bottom: 2px;
    margin-left: 4px;
}
.form-check-label, .form-check-input {
    cursor: pointer;
}
.medical-preview mark.medical-highlight {
    background-color: rgba(220, 53, 69, 0.15);
    border-bottom: 1px solid #dc3545;
    padding: 0 1px;
}

/* --- 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);
}

/* --- TODO EDIT BUTTON --- */
.btn-edit-todo {
    background: transparent;
    color: grey !important;
    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-edit-todo i {
    font-size: 0.95rem;
    opacity: 0.8;
}
.btn-edit-todo:hover {
    background: #e3e1e1;
    color: grey !important;
    opacity: 1;
}
.btn-edit-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;
    }
}

/* --- THANK YOU CARD --- */
.thank-you-card {
    padding: 3rem 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    animation: fadeIn 0.6s ease-out;
    background: #fff;
}
.check-icon-cercle {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 4px 12px rgba(22,163,74,0.3);
    transition: transform 0.3s ease;
}
.check-icon-cercle:hover {
    transform: scale(1.1);
}
.check-icon {
    font-size: 1.5rem;
    color: #fff;
}
.thank-you-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.edit-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #EEF4FF;
    color: #1F6FEB;
    transition: 0.2s;
}

.edit-icon-btn:hover {
    background: #1F6FEB;
    color: white;
    text-decoration: none;
}

a[href^="mailto:"] {
    color: #4b76fa;
}

.mission-unread-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #dc3545;
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.mission-unread-badge:hover {
    background: #c82333;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.comment-card.unread {
    position: relative;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 60%);
    border: 1px solid #bbf7d0;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
    transform: translateY(-1px);
    transition: all 0.25s ease-in-out;
}

.comment-card.unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    border-radius: 4px;
    background: linear-gradient(180deg, #16a34a, #22c55e);
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.5);
}

.comment-card.unread:hover {
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.18);
}

.comment-card.unread .comment-header::after {
    content: "Nouveau";
    font-size: 0.7rem;
    font-weight: 600;
    background: #16a34a;
    color: white;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    box-shadow: 0 2px 6px rgba(22,163,74,0.3);
}

.comment-card.unread .comment-date {
    display: none;
}

.badge-removed-user {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: #dc2626;
    background: #fef2f2;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    border: 1px solid #fecaca;
    white-space: nowrap;
}

.badge-removed-user.for-admin {
    color: black;
    background: #e1e1e1;
    border: grey;
}

@media (max-width: 768px) {
    .badge-removed-user {
        font-size: 0.65rem;
        padding: 0.18rem 0.5rem;
        margin-left: 0.35rem;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .badge-removed-user {
        margin-left: 0;
        font-size: 0.65rem;
    }
}
