/**
 * bootstrap-datepicker aux couleurs du thème sombre du jeu (css/lib_v2.css, [data-bs-theme="dark"]).
 *
 * Le calendrier porte la classe .dropdown-menu : son fond dépend de --bs-dropdown-bg / --bs-body-bg,
 * on le fixe ici pour qu'il ne soit jamais transparent (ex. register_embed.php, body transparent).
 * Préfixé par [data-bs-theme="dark"] pour l'emporter sur bootstrap-datepicker.min.css.
 * Chargé par GnooDiplo::htmlHeader() et include/register_embed.php, après bootstrap-datepicker.min.css.
 */

[data-bs-theme="dark"] .datepicker.dropdown-menu {
    background-color: #172640;
    color: #e8eef7;
    border: 1px solid #2b3f5e;
    border-radius: 0.5rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    padding: 6px;
    font-family: inherit;
}

/* petite flèche du calendrier (bordure + fond) */
[data-bs-theme="dark"] .datepicker-dropdown:before {
    border-bottom-color: #2b3f5e;
}
[data-bs-theme="dark"] .datepicker-dropdown:after {
    border-bottom-color: #172640;
}
[data-bs-theme="dark"] .datepicker-dropdown.datepicker-orient-top:before {
    border-top-color: #2b3f5e;
}
[data-bs-theme="dark"] .datepicker-dropdown.datepicker-orient-top:after {
    border-top-color: #172640;
}

/* en-tête (mois, flèches, jours de la semaine) et cases */
[data-bs-theme="dark"] .datepicker table tr td,
[data-bs-theme="dark"] .datepicker table tr th {
    color: #e8eef7;
    border-radius: 0.375rem;
}
[data-bs-theme="dark"] .datepicker table tr th.dow {
    color: #94a6bf;
    font-weight: 600;
}
[data-bs-theme="dark"] .datepicker table tr td.day:hover,
[data-bs-theme="dark"] .datepicker table tr td.day.focused,
[data-bs-theme="dark"] .datepicker table tr td span:hover,
[data-bs-theme="dark"] .datepicker table tr td span.focused,
[data-bs-theme="dark"] .datepicker .datepicker-switch:hover,
[data-bs-theme="dark"] .datepicker .prev:hover,
[data-bs-theme="dark"] .datepicker .next:hover,
[data-bs-theme="dark"] .datepicker tfoot tr th:hover {
    background: #22344f;
    color: #ffffff;
}
[data-bs-theme="dark"] .datepicker table tr td.old,
[data-bs-theme="dark"] .datepicker table tr td.new,
[data-bs-theme="dark"] .datepicker table tr td span.old,
[data-bs-theme="dark"] .datepicker table tr td span.new {
    color: #6b7d96;
}
[data-bs-theme="dark"] .datepicker table tr td.disabled,
[data-bs-theme="dark"] .datepicker table tr td.disabled:hover,
[data-bs-theme="dark"] .datepicker table tr td span.disabled,
[data-bs-theme="dark"] .datepicker table tr td span.disabled:hover,
[data-bs-theme="dark"] .datepicker .prev.disabled,
[data-bs-theme="dark"] .datepicker .next.disabled {
    background: none;
    color: #4a5a73;
}

/* aujourd'hui, plage, sélection */
[data-bs-theme="dark"] .datepicker table tr td.today,
[data-bs-theme="dark"] .datepicker table tr td.today:hover,
[data-bs-theme="dark"] .datepicker table tr td.today.disabled,
[data-bs-theme="dark"] .datepicker table tr td.today.disabled:hover {
    background: #2b2614;
    border-color: #6b5420;
    color: #f3d48b;
}
[data-bs-theme="dark"] .datepicker table tr td.range,
[data-bs-theme="dark"] .datepicker table tr td.range:hover,
[data-bs-theme="dark"] .datepicker table tr td.selected,
[data-bs-theme="dark"] .datepicker table tr td.selected:hover {
    background: #22344f;
    border-color: #2b3f5e;
    color: #ffffff;
    text-shadow: none;
}
[data-bs-theme="dark"] .datepicker table tr td.active,
[data-bs-theme="dark"] .datepicker table tr td.active:hover,
[data-bs-theme="dark"] .datepicker table tr td.active.disabled,
[data-bs-theme="dark"] .datepicker table tr td.active.disabled:hover,
[data-bs-theme="dark"] .datepicker table tr td span.active,
[data-bs-theme="dark"] .datepicker table tr td span.active:hover,
[data-bs-theme="dark"] .datepicker table tr td span.active.disabled,
[data-bs-theme="dark"] .datepicker table tr td span.active.disabled:hover {
    background: #e3b54d;
    border-color: #e3b54d;
    color: #1c2333;
    text-shadow: none;
}
