/* Thème sombre du site. Actif quand <html data-theme="sombre"> : posé par le petit script de
   page/_head.php selon le réglage de l'appareil, ou selon le choix du visiteur (bouton ☾ / ☀ du menu,
   mémorisé sur son appareil). Sans JavaScript, le site reste en clair.
   Les photos et les plans (fonds blancs) restent tels quels. */
html[data-theme="sombre"] { color-scheme: dark; }
html[data-theme="sombre"],
html[data-theme="sombre"] body { background: #14191e; }
html[data-theme="sombre"] body,
html[data-theme="sombre"] button,
html[data-theme="sombre"] input,
html[data-theme="sombre"] textarea,
html[data-theme="sombre"] select { color: #c3cdd4; }
html[data-theme="sombre"] body,
html[data-theme="sombre"] a { color: #dbe3e8; }
html[data-theme="sombre"] h1,
html[data-theme="sombre"] h2,
html[data-theme="sombre"] h3,
html[data-theme="sombre"] h4,
html[data-theme="sombre"] .h1,
html[data-theme="sombre"] .h2,
html[data-theme="sombre"] strong { color: #e8eef2; }
html[data-theme="sombre"] p { color: #c3cdd4; }

/* menu */
html[data-theme="sombre"] header nav { background: #1d252c; border-color: #3a4752; }
html[data-theme="sombre"] header nav > a { color: #dbe3e8; }
html[data-theme="sombre"] header nav > a.selected { color: #fff; font-weight: 600; }
html[data-theme="sombre"] .picto_menu span,
html[data-theme="sombre"] .menuOpen .picto_menu .img1,
html[data-theme="sombre"] .menuOpen .picto_menu .img2,
html[data-theme="sombre"] .menuOpen .picto_menu .img3 { background-color: #dbe3e8; }

/* plans de la résidence : images à fond blanc, on garde le texte foncé posé dessus */
html[data-theme="sombre"] .plan a,
html[data-theme="sombre"] .plan a strong { color: #303030; }
html[data-theme="sombre"] .plan a:hover { color: #6b7a86; }
html[data-theme="sombre"] .plan .leg { color: #e8eef2; }

/* pictogrammes (dessin noir sur fond transparent) : inversés pour rester lisibles */
html[data-theme="sombre"] .lsticons .icons:before,
html[data-theme="sombre"] .zoneHead .icons:before,
html[data-theme="sombre"] .zoneEquipement .icons:before { filter: invert(1) brightness(0.9); }
/* sur les photos des appartements : inchangés */
html[data-theme="sombre"] .lstappartements .appt .icons:before { filter: none; }
/* en-tête d'un appartement : fond sombre */
html[data-theme="sombre"] .zoneHead .appt.bl .icons { color: #e8eef2; }
html[data-theme="sombre"] .zoneHead .appt.bl .icons:before { filter: invert(1) brightness(0.9); }

/* formulaires (Bootstrap 3) */
html[data-theme="sombre"] .form-control { background-color: #1b2329; border-color: #3a4752; color: #e8eef2; box-shadow: none; }
html[data-theme="sombre"] .form-control:focus { border-color: #6f97b3; box-shadow: 0 0 0 2px rgba(111,151,179,.35); }
html[data-theme="sombre"] .form-control::placeholder { color: #7f8e99; }
html[data-theme="sombre"] .form-control[disabled],
html[data-theme="sombre"] .form-control[readonly] { background-color: #222b32; }
html[data-theme="sombre"] label { color: #c3cdd4; }
html[data-theme="sombre"] .btn-default { background: #222b32; border-color: #3a4752; color: #e8eef2; text-shadow: none; }
html[data-theme="sombre"] .btn-primary { background-image: none; background-color: #3f6f93; border-color: #3f6f93; text-shadow: none; }
html[data-theme="sombre"] .btn-primary:hover,
html[data-theme="sombre"] .btn-primary:focus { background-color: #4b80a8; border-color: #4b80a8; }
html[data-theme="sombre"] .alert-success { background-image: none; background-color: #163322; border-color: #285c3c; color: #9be3b5; }
html[data-theme="sombre"] .alert-danger { background-image: none; background-color: #3a1a17; border-color: #6b2a24; color: #fca5a5; }
html[data-theme="sombre"] .text-success { color: #6fd39a; }
html[data-theme="sombre"] .text-danger { color: #f19a92; }

/* bloc de réservation d'un appartement */
html[data-theme="sombre"] #zform .zhi { background: #1b2329; border-color: #3a4752; }
html[data-theme="sombre"] #zform h3 { border-color: #3a4752; color: #e8eef2; }
html[data-theme="sombre"] .zoneReservation .pager li > a,
html[data-theme="sombre"] .pager li > a,
html[data-theme="sombre"] .pager li > span { background-color: #1d252c; border-color: #3a4752; color: #dbe3e8; }
html[data-theme="sombre"] .pager li > a:hover,
html[data-theme="sombre"] .pager li > a:focus { background-color: #28323a; }
html[data-theme="sombre"] .pager .disabled > a,
html[data-theme="sombre"] .pager .disabled > span { background-color: #1d252c; color: #6b7a86; }

/* chargement */
html[data-theme="sombre"] .sk-folding-cube .sk-cube:before { background-color: #c3cdd4; }

/* choix des dates */
html[data-theme="sombre"] .daterangepicker,
html[data-theme="sombre"] .daterangepicker .calendar-table { background-color: #1d252c; border-color: #1d252c; color: #dbe3e8; }
html[data-theme="sombre"] .daterangepicker:after { border-bottom-color: #1d252c; }
html[data-theme="sombre"] .daterangepicker:before { border-bottom-color: #3a4752; }
html[data-theme="sombre"] .daterangepicker td.off,
html[data-theme="sombre"] .daterangepicker td.off.in-range,
html[data-theme="sombre"] .daterangepicker td.off.start-date,
html[data-theme="sombre"] .daterangepicker td.off.end-date { background-color: #1d252c; color: #5d6a74; }
html[data-theme="sombre"] .daterangepicker td.available:hover,
html[data-theme="sombre"] .daterangepicker th.available:hover { background-color: #2c3741; }
html[data-theme="sombre"] .daterangepicker td.in-range { background-color: #24394a; color: #e8eef2; }
html[data-theme="sombre"] .daterangepicker td.active,
html[data-theme="sombre"] .daterangepicker td.active:hover { background-color: #3f6f93; }
html[data-theme="sombre"] .daterangepicker td.disabled { color: #5d6a74; }
html[data-theme="sombre"] .daterangepicker .input-mini { background: #1b2329; border-color: #3a4752; color: #e8eef2; }
html[data-theme="sombre"] .daterangepicker select { background: #1b2329; color: #e8eef2; }
html[data-theme="sombre"] .ranges li { background-color: #222b32; border-color: #222b32; color: #8fc1e3; }

/* calendriers de disponibilité de l'outil de gestion, version sombre.
     Sélecteurs renforcés ([class], body) pour passer devant les couleurs de style-cal.css. */
html[data-theme="sombre"] body table.planning_tb[class] { background-color: #1d252c; border-color: #3a4752; color: #c3cdd4; border-radius: 6px; }
html[data-theme="sombre"] body table.planning_tb[class] thead tr { background-color: #252f37; color: #c3cdd4; }
html[data-theme="sombre"] body table.planning_tb[class] thead tr.mois,
html[data-theme="sombre"] body table.planning_tb[class] thead tr.mois td { color: #e8eef2; }
html[data-theme="sombre"] body table.planning_tb[class] thead tr.jsemaine td { border-color: #3a4752; }
html[data-theme="sombre"] body table.planning_tb[class] tbody tr:hover { background-color: transparent; }
html[data-theme="sombre"] body table.planning_tb[class] td.planning-6,
html[data-theme="sombre"] body table.planning_tb[class] td.planning-7 { background: #222b33; }
html[data-theme="sombre"] body table.planning_tb[class] .planning-out .a { color: #56636d; }
html[data-theme="sombre"] body table.planning_tb[class] .planning-om .a { color: #46525b; }
html[data-theme="sombre"] body table.planning_tb[class] .planning-td .a { color: #fff; outline-color: #8fc1e3; }

/* jours occupés : une seule teinte, quelle que soit l'étape interne de la réservation */
html[data-theme="sombre"] body table.planning_tb[class] td.planning-dispo-0[class] { background-color: #5a3d3f; }
html[data-theme="sombre"] body table.planning_tb[class] td.planning-dispo-3[class]::after { border-color: #5a3d3f transparent; }
html[data-theme="sombre"] body table.planning_tb[class] td.planning-dispo-2[class]::after { border-color: transparent #5a3d3f; }
html[data-theme="sombre"] body table.planning_tb[class] td.planning-dispo-4[class]::before { border-color: #5a3d3f #4a3234; }
html[data-theme="sombre"] body table.planning_tb[class] td.planning-dispo-4[class]::after { border-color: transparent #5a3d3f; }
html[data-theme="sombre"] body table.planning_tb[class] .planning-dispo-0 .a,
html[data-theme="sombre"] body table.planning_tb[class] .planning-dispo-2 .a,
html[data-theme="sombre"] body table.planning_tb[class] .planning-dispo-3 .a,
html[data-theme="sombre"] body table.planning_tb[class] .planning-dispo-4 .a { color: #e7c9cb; }

/* bouton clair / sombre dans le menu */
header nav .theme { margin-left: auto; align-self: center; background: none; border: 0; padding: 0 6px; font-size: 20px; line-height: 1; color: #303030; cursor: pointer; opacity: .75; }
header nav .theme:hover { opacity: 1; }
header nav .theme .soleil { display: none; }
html[data-theme="sombre"] header nav .theme { color: #dbe3e8; }
html[data-theme="sombre"] header nav .theme .soleil { display: inline; }
html[data-theme="sombre"] header nav .theme .lune { display: none; }
@media (max-width:600px) {
  header nav .theme { position: absolute; top: 18px; right: 62px; margin: 0; }
  header nav > a.selected { max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
