html, body { height: 100%; margin: 0; }
textarea { height: 4rem; }
details { margin-left: 1.5em; }
details summary { margin-left: -1.5em; }

@media print {
 body .noprint { display:none }
}

a { text-decoration: none; }
a.tel { color: #555; border-bottom: 1px dotted gray; white-space: nowrap; }
html[data-bs-theme="dark"] a.tel { color: rgba(var(--bs-link-color-rgb), 1); }
a img.icon:hover { background-color: var(--bs-secondary-bg); }
a img.icon.blacksvg:hover { background-color: inherit; filter: invert(40%); }
html[data-bs-theme="dark"] .blacksvg { filter: invert(100%); }
header {
  display: flex;
  justify-content: space-between;
  background-color: antiquewhite;
}
.test_instance header {
  background: repeating-linear-gradient(
    45deg,
    #606dbc,
    #606dbc 10px,
    #465298 10px,
    #465298 20px
  );
}
#header_test_text {
  font-size: 180%;
  color: white;
  padding: 1em;
  font-style: italic;
}
@media (max-width: 576px) {
  #header_test_text { display: none; }
}
.hidden { display: none; }
.inline { display: inline; }
.help { font-size: small; font-style: italic; }
.cursor-pointer { cursor: pointer; }
.btn-icon { padding: 0 0.4rem; }
.btn-icon img { width: 1em; height: 1em; }
.underdotted { border-bottom: 1px dotted black; }
img.icon, input[type="image"].icon { width: 1.3em; height: 1.3em; }
img.icon3rem { width: 3rem; height: 3rem; }
img.small-icon { width: 0.8em; height: 0.8em; }
.manquant { color: red; font-weight: bold; cursor: default; }
.rouge { color: red; }
.vert { color: green; }
ol.breadcrumb { font-size: 90%; }
img.ficon { height: 1.5em; width: 1.5em; vertical-align: bottom; }
.errorlist { list-style: none; padding-left: 0 !important; }
.errorlist li {
  padding: .75rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: .25rem;
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}
.collapseImg.collapsed { transform: rotate(-90deg); }
.modal-header { cursor: move; }

#waitOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 995;
  display: flex;
  align-items: center;
  background-color: #ddd;
  opacity: 50%;
}
#waitOverlay .loader { width: 100%; }

label.required { font-weight: bold; }
label.d-inline + input { display: inline-block; }
/* appearance: auto (bootstrap override) suite à un bug d'affichage depuis Chrome 112 */
input[type="date"], input[type="time"], input[type="number"] { width: auto; appearance: auto; }
input.duration { max-width: 6em; }
input::placeholder { font-style: italic; }
.formfield-error { font-size: 80%; color: #dc3545; width: 100%; margin-bottom: 0; }

.striped > *:nth-child(odd) {
  color: var(--bs-emphasis-color);
  background-color: rgba(var(--bs-emphasis-color-rgb), 0.05);
}}

.edit-icons { margin-left: 1em; }
.delete-link, .delete-formset-link { padding: 0 0.2em; cursor: pointer; opacity: 0.5; }
.delete-link:hover, .delete-formset-link:hover { background-color: #fee; opacity: 1; }

.formset-deleted td, .formset-deleted input {
  background-color: var(--bs-secondary-bg);
  text-decoration: line-through;
  opacity: 0.6;
}

tr.hidden-btns .btn-icon {
  visibility: hidden;
}
tr.hidden-btns:hover .btn-icon {
  visibility: visible;
}

.block-header {
  padding-left: 0.5rem;
  background-color: var(--bs-secondary-bg);
}

#logo-cr {
  display: block;
  height: 106px;
  max-width: 75vw;
  padding: 20px;
}
#logo-app {
  height: 106px;
  padding: 10px;
  opacity: 0.8;
}
body.app #logo-cr { padding-top: 2px; padding-bottom: 2px; height: 70px; }
body.app #logo-app { display: none; }
body.app header figure { margin-left: auto; }
#user-bar {
  background-color: black;
  font-size: small;
  color: white;
  padding: 2px 0;
}
#user-bar a, #user-bar .btn{
  color: #ddd;
  text-decoration: none;
}
#user-bar a:hover, #user-bar .btn:hover {
  color: white;
}
#login { margin: 0 auto; max-width: 16rem; }

.page-home .top-container { margin-top: auto; margin-bottom: auto; }
.page-home .card-body { padding: 4rem 1rem; }
.page-home .card-body.card-smaller{ padding: 1.5rem 1rem; }
.page-home .card { background-color: #4d4d4d; }
.page-home .card:hover { background-color: #777 !important; }
.page-home button.active { font-weight: bold; }

.delai-passe { color: red; }

.datetimerangewidget input { display: inline-block; }
#annee_form #id_year,
#mois_form #id_year { width: 6em; }
#mois_form #id_month { width: 10em; }
#id_date_facture { display: inline-block; }
#id_rabais { max-width: 8em; display: inline-block; }
#id_langues_select { max-width: 15em; }

/* style pour marquer une section comme passée (ex: activité bénévole passée) */
.terminee {
  opacity: 0.7;
  font-style: italic;
  background-color: #efefef;
}

table.mission td.chez, table.mission td.adresse { white-space: nowrap; }

tr.Annulé td, div.Annulé {
  text-decoration-line: line-through;
  text-decoration-color: red;
  font-style: italic;
}

.ReferentForm.edition .persona_part {
  background-color: #eee;
}
#doublons { color: #820C0C; }
#doublons a { color: #820C0C; border-bottom: 1px dotted #820C0C; }
.client_list th, .client_list td {
  padding: .3rem;
}
td.tels { white-space: nowrap; }
select#id_type_pro { max-width: 15em; }

.ligne-alarme {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}
.ligne-alarme.ancienne {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffecb5;
}
.ligne-materiel {
    color: #157749;
    background-color: #e9f5f0;
    border-color: #badbcc;
}

.referent-fonction, .smallitalic {
  font-style: italic;
  font-size: small;
}
.selection_form #id_client {
  max-width: 13em;
}

#partenaire_wrapper { border: 1px solid #aaa; background-color: var(--bs-secondary-bg); padding: 0.5em; }
#partenaire_wrapper summary { margin-bottom: 5px; font-style: italic; }
#id_date_naissance { display: inline-block; }

#id_type_logement > div:first-child, #id_genre > div:first-child { display: none; }
#id_situation_choix > div { width: auto; margin-right: 4em; }
#id_situation_choix_2 { margin-top: 10px; }
#id_situation_autre { display: inline-block; width: auto; }

#id_body { height: 54vh; }

.form-header, .table-header { background-color: var(--bs-secondary-bg); padding: 5px; }

tr.filters td { background-color: var(--bs-secondary-bg); }
tr.filters td input { margin-top: 1px; }
.bound_filter .filter_label { font-weight: bold; color: red; }

tr.inactif td, li.inactif { background-color: #efefef; color: #666; font-style: italic; }

/* journal table */
th.quand, th.qui { width: 14rem; }

/* referents tel table */
/* automatic numbering of referent tel no priorite */
div.reset { counter-reset: priorite; }
div.priorite:before { content: counter(priorite) ". "; counter-increment: priorite; }
td.no_tel input { width: 10rem; }
div.priorite { cursor: move; }
div.priorite input { width: 3.5rem; }

tr.afaire td { background-color: #ffe1e1; /* light red */ }

/* client_professionnel.html */
.form-choix, .form-creer {
  padding: 0.4em;
  background-color: #efefef;
  border: 1px solid #ccc;
}
.form-creer { background-color: #fff1f1; }

.mission_rapport { border-top: 1px solid #e6b5b5; }
.mission_rapport > div { padding-left: 1em; font-style: italic; }

.inactif_msg { color: red; }

.dispo-ok, span.event-content.dispo { background-color: #cefdce; /* light green */ }
.dispo-cancelled, span.event-content.absence, span.event-content.dispo.cancelled {
    background-color: #ffb3d9a3; /* light red */
    z-index: -1;
}
span.event-content.absence { z-index: 2; }

td.num { text-align: right; }
.stats-models td { font-style: italic; }
.substats { background-color: var(--bs-secondary-bg); font-style: italic; }
.substats td:first-child { text-align: right; }

.signature_canvas {
  touch-action: none; user-select: none;
  border: 2px solid black;
  background-color: #fafafa;
  max-width: 95vw;
}
#signature_form {
  width: 600px;
  max-width: 95vw;
  margin: auto;
}

#date_select_form #id_year {
  width: auto;
  display: inline-block;
}

.benev_choice, .vehicule_choice { border-top: 1px solid gray; border-left: 1px solid gray; }
.benev_choice label { width: 100%; padding: 0.5em; cursor: pointer; }
.benev_choice hover { background-color: var(--bs-secondary-bg); }
.benev_choice input[type="radio"]:checked+label,
.vehicule_choice input[type="radio"]:checked+label {
  font-weight: bold;
  background-color: #0b5ed7;
  color: white;
}

/* App style for client card (transport, interv.) */
.app-card .card-header { color: white; background-color: black; }
.app-card .card-header a { color: white; border-bottom: 1px dotted white; }
.app-card .note { background-color: #ddd; }
@media print {
  .app-card .card-header { color: black; background-color: white; border: 1px solid black; }
  .app-card .card-header a, a.tel { color: black; }
  .app-card #tels { display: block; }
}
.app-rapport, .app-totaux { background-color: #ffede7; }
.app-rapport { margin-left: 0; margin-right: 0; }

.dispo-dispo { color: green; font-weight: bold; }
.dispo-absence { color: red; font-weight: bold; }
.list-group-item-action .nb_events { color: #792c99; }
.list-group-item-action div.has_dispo { font-weight: bold; }
.list-group-item-action div.no_dispo { color: gray; }

/* THEME SWITCH */
.theme-toggle {
    cursor: pointer;
    border: none;
    padding: 0;
    background: transparent;
    vertical-align: middle;
    margin-inline-start: 5px;
}

.theme-toggle svg {
    height: 1rem;
    width: 1rem;
    display: none;
}

/*
Fully hide screen reader text so we only show the one matching the current
theme.
*/
.theme-toggle .visually-hidden {
    display: none;
}

html[data-bs-theme="auto"] .theme-toggle .theme-label-when-auto {
    display: block;
}

html[data-bs-theme="dark"] .theme-toggle .theme-label-when-dark {
    display: block;
}

html[data-bs-theme="light"] .theme-toggle .theme-label-when-light {
    display: block;
}

/* ICONS */
.theme-toggle svg.theme-icon-when-auto,
.theme-toggle svg.theme-icon-when-dark,
.theme-toggle svg.theme-icon-when-light {
    fill: lightblue;
    color: black;
}

html[data-bs-theme="auto"] .theme-toggle svg.theme-icon-when-auto {
    display: block;
}

html[data-bs-theme="dark"] .theme-toggle svg.theme-icon-when-dark {
    display: block;
}

html[data-bs-theme="light"] .theme-toggle svg.theme-icon-when-light {
    display: block;
}
