.table td,
.table th {
    vertical-align: middle;
}

.badge {
    font-weight: 500;
}

body {
    font-size: 0.95rem;
}

.card {
    border-radius: 0.75rem;
}

/* ============================================
   EFFET WAHOU - Animations et transitions
   ============================================ */

/* Badges cliquables avec curseur et effet hover */
.time-toggle {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 50px;
    display: inline-block;
}

.transition-all {
    transition: all 0.25s ease-in-out !important;
}

.hover-lift {
    transition: all 0.2s ease-out !important;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.time-toggle:hover:not([data-disabled]) {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.time-toggle:active:not([data-disabled]) {
    transform: scale(0.95);
}

/* Animation de remplissage en cascade */
@keyframes fillPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.fill-animate {
    animation: fillPulse 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Row flash effect quand remplie */
@keyframes rowFlash {
    0% {
        background-color: rgba(25, 135, 84, 0.3);
    }

    100% {
        background-color: transparent;
    }
}

.row-filled {
    animation: rowFlash 0.6s ease-out;
}

/* Barre de progression moderne */
.progress-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-bottom: 8px;
}

.progress-stats .hours {
    font-size: 1.8rem;
    font-weight: 700;
}

.progress-stats .label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #11998e, #38ef7d);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(56, 239, 125, 0.5);
}

/* Bouton remplir le mois avec icône animée */
.btn-fill-month {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-fill-month:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-fill-month:active {
    transform: translateY(0);
}

.btn-fill-month i {
    transition: transform 0.3s ease;
}

.btn-fill-month:hover i {
    transform: rotate(180deg);
}

/* Toast notification */
.toast-success {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.4);
    font-weight: 600;
    z-index: 9999;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-success.show {
    transform: translateX(0);
}

/* Confetti container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

/* Amélioration des selects */
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Amélioration visuelle des lignes */
tbody tr:hover:not(.table-secondary) {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Badge compteur animé */
.total-hours-badge {
    font-size: 1.1rem;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.total-hours-badge.complete {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    animation: pulse 0.5s ease;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}


/* UTILITIES */
.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.group-hover-trigger:hover .group-hover-opacity-100 {
    opacity: 1 !important;
}

.transition-opacity {
    transition: opacity 0.2s ease-in-out;
}

.object-fit-cover {
    object-fit: cover;
}

.cursor-pointer {
    cursor: pointer;
}

/* ============================================
   GLOBAL DARK MODE SUPPORT
   ============================================ */

[data-bs-theme="dark"] body {
    background-color: #121212 !important;
}

/* Card overrides */
[data-bs-theme="dark"] .card-header.bg-white,
[data-bs-theme="dark"] .card-header.bg-body {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--bs-body-color) !important;
}

/* Tables */
[data-bs-theme="dark"] .table:not(.table-dark) {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .thead-light {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: rgba(255, 255, 255, 0.1);
}

/* Buttons and Links */
[data-bs-theme="dark"] .btn-white {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .btn-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--bs-body-color) !important;
    border: none !important;
}

[data-bs-theme="dark"] .btn-white:hover,
[data-bs-theme="dark"] .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Text color fixes */
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: transparent !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}