/* ========================================
   TASK HOVER — Premium v8
   Rangée unique compacte · Hauteur fixe · Zéro vacillement
   ======================================== */

.bubble,
.task-bubble {
    position: relative !important;
    overflow: hidden !important;
    transform: none !important;
    transition: box-shadow 0.22s ease, border-color 0.22s ease !important;
    animation: popIn 0.2s ease-out !important;
    /* Espace réservé : 1 seule rangée de 22px + 14px padding */
    padding-bottom: 36px !important;
}

.bubble:hover,
.task-bubble:hover,
[data-theme]:not([data-theme='academie']) .bubble:hover,
[data-theme]:not([data-theme='academie']) .task-bubble:hover,
[data-theme='executive'] .bubble:hover,
[data-theme='corporate'] .bubble:hover,
[data-theme='minimal'] .bubble:hover {
    transform: none !important;
    filter: none !important;
    transition: box-shadow 0.22s ease !important;
    box-shadow: 0 0 0 1.5px rgba(255,255,255,0.10), 0 6px 20px rgba(0,0,0,0.28) !important;
}

[data-theme=wood-legendary] .bubble:hover,
[data-theme=wood-legendary] .task-bubble:hover {
    box-shadow: 0 0 0 1.5px rgba(201,168,76,0.35), 0 6px 20px rgba(0,0,0,0.35) !important;
}

/* Séparateur au hover */
.bubble:hover::before,
.task-bubble:hover::before {
    content: '' !important;
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 36px !important;
    height: 1px !important;
    background: rgba(255,255,255,0.07) !important;
    pointer-events: none !important;
}

/* ── Zone actions : rangée unique, opacity seule ── */
.bubble-actions,
.task-actions {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 36px !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    opacity: 0 !important;
    z-index: 4 !important;
    pointer-events: none !important;
    transition: opacity 0.18s ease !important;
    animation: none !important;
}

/* Fusionner les sous-rangées dans le flex parent */
.task-row-main,
.task-row-bridges {
    display: contents !important;
}

.bubble:hover .bubble-actions,
.bubble:hover .task-actions,
.task-bubble:hover .bubble-actions,
.task-bubble:hover .task-actions {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ── Boutons : ultra-slim ghost ── */
.task-action-btn,
.task-bridge-cal,
.task-bridge-timer,
.task-bridge-delegate {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 22px !important;
    padding: 0 8px !important;
    font-size: 0.6rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
    border-radius: 3px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    color: rgba(255,255,255,0.45) !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease !important;
    box-shadow: none !important;
    background-image: none !important;
    text-transform: none !important;
}

.task-action-btn:hover,
.task-bridge-cal:hover,
.task-bridge-timer:hover,
.task-bridge-delegate:hover {
    background: rgba(255,255,255,0.10) !important;
    border-color: rgba(255,255,255,0.18) !important;
    color: rgba(255,255,255,0.75) !important;
    filter: none !important;
    transform: none !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* ── Bouton Terminé : rectangle vert + tick ── */
.task-action-btn.complete {
    background: rgba(34,197,94,0.12) !important;
    border-color: rgba(34,197,94,0.28) !important;
    color: #4ade80 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 0 10px !important;
    background-image: none !important;
}

.task-action-btn.complete:hover {
    background: rgba(34,197,94,0.22) !important;
    border-color: rgba(34,197,94,0.50) !important;
    color: #6ee7a0 !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* ── Thème wood : override des styles bois sur les boutons ── */
[data-theme=wood-legendary] #view-tasks .task-action-btn,
[data-theme=wood-legendary] #view-tasks .task-bridge-cal,
[data-theme=wood-legendary] #view-tasks .task-bridge-timer,
[data-theme=wood-legendary] #view-tasks .task-bridge-delegate {
    background-color: rgba(255,255,255,0.06) !important;
    background-image: none !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    color: rgba(255,245,220,0.50) !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}

[data-theme=wood-legendary] #view-tasks .task-action-btn:hover,
[data-theme=wood-legendary] #view-tasks .task-bridge-cal:hover,
[data-theme=wood-legendary] #view-tasks .task-bridge-timer:hover,
[data-theme=wood-legendary] #view-tasks .task-bridge-delegate:hover {
    background-color: rgba(255,245,220,0.12) !important;
    background-image: none !important;
    border-color: rgba(212,164,76,0.35) !important;
    color: rgba(255,245,220,0.80) !important;
    box-shadow: none !important;
}

[data-theme=wood-legendary] #view-tasks .task-action-btn.complete {
    background-color: rgba(34,197,94,0.12) !important;
    background-image: none !important;
    border-color: rgba(34,197,94,0.28) !important;
    color: #4ade80 !important;
}

[data-theme=wood-legendary] #view-tasks .task-action-btn.complete:hover {
    background-color: rgba(34,197,94,0.22) !important;
    background-image: none !important;
    border-color: rgba(34,197,94,0.50) !important;
    color: #6ee7a0 !important;
    box-shadow: none !important;
}

/* Coin suppression */
.task-delete-corner {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: var(--danger, #ef4444) !important;
    clip-path: polygon(100% 0, 100% 100%, 0 100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 5 !important;
    cursor: pointer !important;
    transition: opacity 0.18s ease, width 0.12s ease, height 0.12s ease !important;
}
.bubble:hover .task-delete-corner,
.task-bubble:hover .task-delete-corner {
    opacity: 1 !important;
    pointer-events: auto !important;
}
.task-delete-corner:hover {
    width: 32px !important;
    height: 32px !important;
}

/* Vue bulles : masquer */
.bubbles-view .task-actions { display: none !important; }
