/* ══════════════════════════════════════════════════════
   TÂCHES — Barre de tri : textures bois (Bois Légendaire)
   Dropdowns utilisateur, projet, période
   ══════════════════════════════════════════════════════ */

/* ── Boutons déclencheurs ── */
[data-theme="wood-legendary"] #view-tasks .custom-select-btn,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-btn {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-blend-mode: normal !important;
  color: #2A1200 !important;
  border: 1px solid rgba(180,130,70,0.45) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,245,220,0.4) !important;
  font-weight: 700 !important;
}
[data-theme="wood-legendary"] #view-tasks .custom-select-btn:hover,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-btn:hover,
[data-theme="wood-legendary"] #view-tasks .custom-user-select.open .custom-select-btn,
[data-theme="wood-legendary"] #view-tasks .project-dropdown.open .project-dropdown-btn {
  background-color: rgba(255,245,220,0.38) !important;
  background-image: var(--wood-light) !important;
  border-color: rgba(212,164,76,0.65) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,245,220,0.5), 0 0 10px rgba(212,164,76,0.15) !important;
}

/* ── Texte + flèche dans les boutons ── */
[data-theme="wood-legendary"] #view-tasks .custom-select-btn .select-text,
[data-theme="wood-legendary"] #view-tasks .custom-select-btn .select-arrow,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-btn .select-text,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-btn .pf-name,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-btn .pf-arrow {
  color: #2A1200 !important;
}

/* ── Menus déroulants ── */
[data-theme="wood-legendary"] #view-tasks .custom-select-options,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-list {
  background-color: rgba(160,100,40,0.2) !important;
  background-image: var(--wood-medium) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-blend-mode: normal !important;
  border: 1px solid rgba(180,130,70,0.5) !important;
  box-shadow:
    0 10px 32px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,245,220,0.12),
    0 0 0 1px rgba(212,164,76,0.12) !important;
}

/* ── Options des menus ── */
[data-theme="wood-legendary"] #view-tasks .custom-select-option,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-item {
  color: #1A0A00 !important;
  font-weight: 600 !important;
}
[data-theme="wood-legendary"] #view-tasks .custom-select-option:hover,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-item:hover {
  background: rgba(212,164,76,0.18) !important;
  color: #1A0A00 !important;
}
[data-theme="wood-legendary"] #view-tasks .custom-select-option.selected,
[data-theme="wood-legendary"] #view-tasks .project-dropdown-item.active {
  background: rgba(212,164,76,0.28) !important;
  color: #1A0A00 !important;
  font-weight: 700 !important;
}

/* ── Dropdown période (dpf) : override avec wood-light ── */
[data-theme="wood-legendary"] #view-tasks .dpf-trigger {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-blend-mode: normal !important;
  color: #2A1200 !important;
  border: 1px solid rgba(180,130,70,0.45) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,245,220,0.4) !important;
  font-weight: 700 !important;
}
[data-theme="wood-legendary"] #view-tasks .dpf-trigger:hover,
[data-theme="wood-legendary"] #view-tasks .dpf-wrap.open .dpf-trigger {
  background-color: rgba(255,245,220,0.38) !important;
  background-image: var(--wood-light) !important;
  border-color: rgba(212,164,76,0.65) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,245,220,0.5) !important;
}
[data-theme="wood-legendary"] #view-tasks .dpf-trigger span,
[data-theme="wood-legendary"] #view-tasks .dpf-trigger svg {
  color: #2A1200 !important;
  stroke: #2A1200 !important;
}

[data-theme="wood-legendary"] #view-tasks .dpf-menu {
  background-color: rgba(160,100,40,0.2) !important;
  background-image: var(--wood-medium) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-blend-mode: normal !important;
  border: 1px solid rgba(180,130,70,0.5) !important;
  box-shadow: 0 10px 32px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,245,220,0.12) !important;
}
[data-theme="wood-legendary"] #view-tasks .dpf-opt {
  color: #1A0A00 !important;
  font-weight: 600 !important;
}
[data-theme="wood-legendary"] #view-tasks .dpf-opt:hover {
  background: rgba(212,164,76,0.18) !important;
  color: #1A0A00 !important;
}
[data-theme="wood-legendary"] #view-tasks .dpf-opt.selected {
  background: rgba(212,164,76,0.28) !important;
  color: #1A0A00 !important;
  font-weight: 700 !important;
}

/* ══════════════════════════════════════════════════════
   TÂCHES — Dropdown utilisateur : options en cadres bois clair
   ══════════════════════════════════════════════════════ */

/* Masquer les emojis */
[data-theme=wood-legendary] #view-tasks .option-emoji {
  display: none !important;
}

/* Chaque option = cadre bois clair */
[data-theme=wood-legendary] #view-tasks .custom-select-option {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-blend-mode: normal !important;
  color: #1A0A00 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(180,130,70,0.3) !important;
  border-radius: 8px !important;
  margin: 3px 4px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,245,220,0.35) !important;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s !important;
}
[data-theme=wood-legendary] #view-tasks .custom-select-option:hover {
  background-color: rgba(255,245,220,0.4) !important;
  border-color: rgba(212,164,76,0.6) !important;
  transform: translateX(2px) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,245,220,0.45), 0 0 8px rgba(212,164,76,0.12) !important;
}
[data-theme=wood-legendary] #view-tasks .custom-select-option.active,
[data-theme=wood-legendary] #view-tasks .custom-select-option.selected {
  background-color: rgba(255,245,220,0.45) !important;
  border-color: rgba(212,164,76,0.75) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,245,220,0.5), 0 0 10px rgba(212,164,76,0.2) !important;
}

/* ══════════════════════════════════════════════════════
   TÂCHES — Options utilisateur : ombre omnidirectionnelle
   ══════════════════════════════════════════════════════ */
[data-theme=wood-legendary] #view-tasks .custom-select-option {
  box-shadow:
    0 2px 6px rgba(0,0,0,0.45),
    0 -2px 6px rgba(0,0,0,0.25),
    2px 0 6px rgba(0,0,0,0.30),
    -2px 0 6px rgba(0,0,0,0.30),
    0 0 0 1px rgba(212,164,76,0.18),
    inset 0 1px 0 rgba(255,245,220,0.35) !important;
}
[data-theme=wood-legendary] #view-tasks .custom-select-option:hover {
  box-shadow:
    0 4px 10px rgba(0,0,0,0.50),
    0 -2px 8px rgba(0,0,0,0.28),
    3px 0 8px rgba(0,0,0,0.32),
    -3px 0 8px rgba(0,0,0,0.32),
    0 0 0 1px rgba(212,164,76,0.45),
    0 0 14px rgba(212,164,76,0.14),
    inset 0 1px 0 rgba(255,245,220,0.45) !important;
}

/* ══════════════════════════════════════════════════════
   TÂCHES — Dropdown projets : options bois clair + ombre omni
   ══════════════════════════════════════════════════════ */

/* Masquer les emojis icônes */
[data-theme=wood-legendary] #view-tasks .pf-option-icon {
  display: none !important;
}
/* Masquer le checkmark (remplacé par la bordure active) */
[data-theme=wood-legendary] #view-tasks .pf-option-check {
  display: none !important;
}

/* Chaque option = cadre bois clair */
[data-theme=wood-legendary] #view-tasks .pf-option {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-blend-mode: normal !important;
  color: #1A0A00 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(180,130,70,0.3) !important;
  border-radius: 8px !important;
  margin: 3px 4px !important;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.45),
    0 -2px 6px rgba(0,0,0,0.25),
    2px 0 6px rgba(0,0,0,0.30),
    -2px 0 6px rgba(0,0,0,0.30),
    0 0 0 1px rgba(212,164,76,0.18),
    inset 0 1px 0 rgba(255,245,220,0.35) !important;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s !important;
}
[data-theme=wood-legendary] #view-tasks .pf-option:hover {
  background-color: rgba(255,245,220,0.40) !important;
  border-color: rgba(212,164,76,0.60) !important;
  transform: translateX(2px) !important;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.50),
    0 -2px 8px rgba(0,0,0,0.28),
    3px 0 8px rgba(0,0,0,0.32),
    -3px 0 8px rgba(0,0,0,0.32),
    0 0 0 1px rgba(212,164,76,0.45),
    0 0 14px rgba(212,164,76,0.14),
    inset 0 1px 0 rgba(255,245,220,0.45) !important;
}
[data-theme=wood-legendary] #view-tasks .pf-option.active {
  background-color: rgba(255,245,220,0.45) !important;
  border-color: rgba(212,164,76,0.75) !important;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.45),
    0 -2px 6px rgba(0,0,0,0.25),
    2px 0 6px rgba(0,0,0,0.30),
    -2px 0 6px rgba(0,0,0,0.30),
    0 0 0 1px rgba(212,164,76,0.55),
    0 0 10px rgba(212,164,76,0.20),
    inset 0 1px 0 rgba(255,245,220,0.5) !important;
}

/* Texte du nom + compteur */
[data-theme=wood-legendary] #view-tasks .pf-option-name {
  color: #1A0A00 !important;
}
[data-theme=wood-legendary] #view-tasks .pf-option-count {
  background: rgba(180,130,70,0.25) !important;
  color: #1A0A00 !important;
}
[data-theme=wood-legendary] #view-tasks .pf-option.active .pf-option-count {
  background: rgba(212,164,76,0.55) !important;
  color: #1A0A00 !important;
}

/* Séparateur */
[data-theme=wood-legendary] #view-tasks .pf-option-separator {
  background: rgba(180,130,70,0.3) !important;
}

/* ══════════════════════════════════════════════════════
   TÂCHES — Dropdown période (Terminé) : texte crème clair
   ══════════════════════════════════════════════════════ */
[data-theme=wood-legendary] #view-tasks .dpf-opt {
  color: #FFF5DC !important;
  font-weight: 600 !important;
}
[data-theme=wood-legendary] #view-tasks .dpf-opt:hover {
  color: #FFFAEE !important;
}
[data-theme=wood-legendary] #view-tasks .dpf-opt.selected {
  color: #FFF8E1 !important;
  font-weight: 700 !important;
}

/* === Boutons survol tâche : Planifier + Timer === */
[data-theme=wood-legendary] #view-tasks .task-bridge-cal,
[data-theme=wood-legendary] #view-tasks .task-bridge-timer {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-blend-mode: normal !important;
  color: #1A0A00 !important;
  border: 1px solid rgba(180,130,70,0.45) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,245,220,0.4) !important;
  font-weight: 700 !important;
}
[data-theme=wood-legendary] #view-tasks .task-bridge-cal:hover,
[data-theme=wood-legendary] #view-tasks .task-bridge-timer:hover {
  background-color: rgba(255,245,220,0.38) !important;
  background-image: var(--wood-light) !important;
  border-color: rgba(212,164,76,0.65) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,245,220,0.5) !important;
}

/* === Bouton note-toggle (ovale déroulant des notes) === */
[data-theme=wood-legendary] #view-tasks .note-toggle {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  color: #1A0A00 !important;
  border: 1px solid rgba(180,130,70,0.45) !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,245,220,0.4) !important;
  font-weight: 600 !important;
}
[data-theme=wood-legendary] #view-tasks .note-toggle:hover,
[data-theme=wood-legendary] #view-tasks .note-toggle.expanded {
  background-color: rgba(255,245,220,0.38) !important;
  background-image: var(--wood-light) !important;
  border-color: rgba(212,164,76,0.65) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,245,220,0.5) !important;
}

/* === Bouton Déléguer === */
[data-theme=wood-legendary] #view-tasks .task-bridge-delegate {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  color: #1A0A00 !important;
  border: 1px solid rgba(180,130,70,0.45) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,245,220,0.4) !important;
  font-weight: 700 !important;
}
[data-theme=wood-legendary] #view-tasks .task-bridge-delegate:hover {
  background-color: rgba(255,245,220,0.38) !important;
  background-image: var(--wood-light) !important;
  border-color: rgba(212,164,76,0.65) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,245,220,0.5) !important;
}

/* === Alignement des 3 boutons sur la même ligne === */
[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 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 28px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}


/* === Boutons action tâche : Start (jaune) + Complete (vert) === */
[data-theme=wood-legendary] #view-tasks .task-action-btn.start,
[data-theme=wood-legendary] #view-tasks .task-action-btn.complete {
  background-color: rgba(255,245,220,0.22) !important;
  background-image: var(--wood-light) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  color: #1A0A00 !important;
  border: 1px solid rgba(180,130,70,0.45) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,245,220,0.4) !important;
  font-weight: 700 !important;
}
[data-theme=wood-legendary] #view-tasks .task-action-btn.start:hover,
[data-theme=wood-legendary] #view-tasks .task-action-btn.complete:hover {
  background-color: rgba(255,245,220,0.38) !important;
  background-image: var(--wood-light) !important;
  border-color: rgba(212,164,76,0.65) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,245,220,0.5) !important;
}

/* === Ovales de priorité sur les cartes tâches === */
[data-theme=wood-legendary] #view-tasks .task-priority {
  background: rgba(40,18,4,0.28) !important;
  color: rgba(255,245,220,0.80) !important;
  border: 1px solid rgba(212,164,76,0.28) !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(4px) !important;
}
[data-theme=wood-legendary] #view-tasks .task-priority.urgent {
  background: rgba(180,30,20,0.28) !important;
  color: rgba(255,208,204,0.85) !important;
  border-color: rgba(255,100,80,0.30) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35) !important;
}

/* === Modale édition tâche — champs de saisie plus sombres === */
[data-theme=wood-legendary] #edit-task-modal .modal-input,
[data-theme=wood-legendary] #edit-task-modal .modal-textarea,
[data-theme=wood-legendary] #edit-task-modal .modal-select {
  background: rgba(20,8,2,0.72) !important;
  border-color: rgba(212,164,76,0.28) !important;
  color: #FFF5DC !important;
}
[data-theme=wood-legendary] #edit-task-modal .modal-input:focus,
[data-theme=wood-legendary] #edit-task-modal .modal-textarea:focus,
[data-theme=wood-legendary] #edit-task-modal .modal-select:focus {
  background: rgba(10,4,1,0.85) !important;
  border-color: rgba(212,164,76,0.65) !important;
  box-shadow: 0 0 0 3px rgba(212,164,76,0.15) !important;
}
[data-theme=wood-legendary] #edit-task-modal .modal-input::placeholder,
[data-theme=wood-legendary] #edit-task-modal .modal-textarea::placeholder {
  color: rgba(255,245,220,0.35) !important;
}
[data-theme=wood-legendary] #edit-task-modal .modal-select option {
  background: #1a0a02 !important;
  color: #FFF5DC !important;
}

/* === Modale édition tâche — labels en crème clair === */
[data-theme=wood-legendary] #edit-task-modal .modal-body-scroll > label,
[data-theme=wood-legendary] #edit-task-modal .modal-select-group label {
  color: rgba(255,245,220,0.88) !important;
}

/* === Bouton RAPPORT — ombre bois noble légendaire === */
[data-theme="wood-legendary"] .dr-open-btn {
    box-shadow:
        0 6px 18px rgba(101, 55, 10, 0.55),
        0 2px 6px rgba(0, 0, 0, 0.40),
        0 0 14px rgba(212, 175, 55, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
[data-theme="wood-legendary"] .dr-open-btn:hover {
    box-shadow:
        0 8px 24px rgba(101, 55, 10, 0.70),
        0 3px 10px rgba(0, 0, 0, 0.45),
        0 0 22px rgba(212, 175, 55, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}
