/* Compatibility layer for the Bootstrap 3 markup retained during migration. */
.navbar-wrapper { position: relative; z-index: 20; }
.navbar {
  min-height: 50px;
  padding-top: 0;
  padding-bottom: 0;
}
.navbar-header { display: flex; align-items: center; }
.navbar .container { flex-wrap: wrap; }
.navbar-collapse { flex-basis: 100%; }
.navbar-nav > li > a { display: block; padding: .5rem; color: rgba(255,255,255,.75); }
.navbar-nav > li > a:hover, .navbar-nav > li > a:focus { color: #fff; background: transparent; }
.navbar-brand {
  height: 50px;
  padding: 15px;
  font-size: 18px;
  line-height: 20px;
}
.caret { display: inline-block; margin-left: .3em; vertical-align: .15em; border-top: .3em solid; border-right: .3em solid transparent; border-left: .3em solid transparent; }
.navbar .dropdown-toggle::after { display: none; }

/* Site section colors take precedence over Bootstrap 5's .bg-dark utility. */
.navbar.colorshadows { background-color: #600000 !important; }
.navbar.colorsundials { background-color: #756020 !important; }
.navbar.colorastrolabes { background-color: #006060 !important; }

/* Restore the dark button labels used by the previous site theme. */
.btn {
  --bs-btn-color: #212529;
  --bs-btn-hover-color: #212529;
  --bs-btn-active-color: #212529;
  --bs-btn-disabled-color: #212529;
  color: #212529;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.42857143;
}
.btn:hover,
.btn:focus,
.btn:active,
.btn.active {
  color: #212529;
}
.btn-lg {
  padding: 10px 16px;
  font-size: 18px;
  line-height: 1.3333333;
  border-radius: 6px;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}

/* Bootstrap 3 contextual colors used throughout the historical pages. */
.bg-warning { background-color: #fcf8e3 !important; }
.text-primary { color: #337ab7 !important; }
.btn-secondary {
  --bs-btn-bg: #fff; --bs-btn-border-color: #ccc;
  --bs-btn-hover-bg: #e6e6e6; --bs-btn-hover-border-color: #adadad;
  --bs-btn-active-bg: #e6e6e6; --bs-btn-active-border-color: #adadad;
}
.btn-primary {
  --bs-btn-bg: #337ab7; --bs-btn-border-color: #2e6da4;
  --bs-btn-hover-bg: #286090; --bs-btn-hover-border-color: #204d74;
  --bs-btn-active-bg: #286090; --bs-btn-active-border-color: #204d74;
}
.btn-success {
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff;
  --bs-btn-bg: #5cb85c; --bs-btn-border-color: #4cae4c;
  --bs-btn-hover-bg: #449d44; --bs-btn-hover-border-color: #398439;
  --bs-btn-active-bg: #449d44; --bs-btn-active-border-color: #398439;
  color: #fff;
}
.btn-success:hover, .btn-success:focus,
.btn-success:active, .btn-success.active { color: #fff; }
.btn-info {
  --bs-btn-bg: #5bc0de; --bs-btn-border-color: #46b8da;
  --bs-btn-hover-bg: #31b0d5; --bs-btn-hover-border-color: #269abc;
}
.btn-warning {
  --bs-btn-bg: #f0ad4e; --bs-btn-border-color: #eea236;
  --bs-btn-hover-bg: #ec971f; --bs-btn-hover-border-color: #d58512;
}
.btn-danger {
  --bs-btn-bg: #d9534f; --bs-btn-border-color: #d43f3a;
  --bs-btn-hover-bg: #c9302c; --bs-btn-hover-border-color: #ac2925;
}
.btn.vert {
  --bs-btn-bg: #b0e0a0; --bs-btn-border-color: #408050;
  --bs-btn-hover-bg: #f0c060; --bs-btn-hover-border-color: #404040;
  --bs-btn-active-bg: #f0c060; --bs-btn-active-border-color: #404040;
}
.btn.grisbleu {
  --bs-btn-bg: #e8f0f0; --bs-btn-border-color: #ccc;
  --bs-btn-hover-bg: #f0c060; --bs-btn-hover-border-color: #404040;
  --bs-btn-active-bg: #f0c060; --bs-btn-active-border-color: #404040;
}

/* Bootstrap 3 heading margins. */
h1, .h1,
h2, .h2,
h3, .h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

h4, .h4,
h5, .h5,
h6, .h6 {
  margin-top: 10px;
  margin-bottom: 10px;
}
small,
.small {
  font-size: 85%;
}
h1 small, h2 small, h3 small,
.h1 small, .h2 small, .h3 small,
h1 .small, h2 .small, h3 .small,
.h1 .small, .h2 .small, .h3 .small {
  font-size: 65%;
  font-weight: 400;
  line-height: 1;
  color: #777;
}
h4 small, h5 small, h6 small,
.h4 small, .h5 small, .h6 small,
h4 .small, h5 .small, h6 .small,
.h4 .small, .h5 .small, .h6 .small {
  font-size: 75%;
  font-weight: 400;
  line-height: 1;
  color: #777;
}

/* Bootstrap 3 typography retained for introductory paragraphs. */
.lead {
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.4;
}

/* Bootstrap 3 allowed columns directly inside .container.marketing because
   grid columns were floated. Preserve that layout for the historical markup. */
.container.marketing::after {
  display: table;
  clear: both;
  content: "";
}
.container.marketing {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
.container.marketing > [class*="col-"] {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

/* Keep dropdowns visually independent from the dark navbar. The selectors are
   intentionally more specific than the site's global a/a:hover rules. */
.navbar .dropdown-menu {
  padding: 5px 0;
  color: #333;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.navbar .dropdown-menu > li > a {
  display: block;
  padding: 3px 20px;
  clear: both;
  color: #333;
  background-color: transparent;
  font-weight: 400;
  line-height: 1.42857143;
  text-align: left;
  white-space: nowrap;
}
.navbar .dropdown-menu > li > a:hover,
.navbar .dropdown-menu > li > a:focus {
  color: #262626;
  background-color: #f5f5f5;
  text-decoration: none;
}

/* Bootstrap 3 component equivalents removed from Bootstrap 5. */
.well { min-height: 20px; padding: 19px; margin-bottom: 20px; background: #f5f5f5; border: 1px solid #e3e3e3; border-radius: .375rem; }
.panel { margin-bottom: 20px; background: #fff; border: 1px solid #ddd; border-radius: .375rem; }
.panel-heading { padding: 10px 15px; border-bottom: 1px solid #ddd; background: #f5f5f5; }
.panel-body { padding: 15px; }
.panel-footer { padding: 10px 15px; border-top: 1px solid #ddd; background: #f5f5f5; }
.label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: 700; color: #fff; border-radius: .25em; }
.label-default { background: #777; } .label-primary { background: #337ab7; } .label-success { background: #5cb85c; }
.label-info { background: #5bc0de; } .label-warning { background: #f0ad4e; } .label-danger { background: #d9534f; }

/* Minimal, dependency-free replacements for the removed Glyphicons. */
.glyphicon { display: inline-block; width: 1.1em; text-align: center; font-style: normal; }
.glyphicon-ok::before { content: "✓"; } .glyphicon-save::before, .glyphicon-download-alt::before { content: "↓"; }
.glyphicon-shopping-cart::before { content: "🛒"; } .glyphicon-picture::before { content: "▧"; }
.glyphicon-chevron-left::before { content: "‹"; font-size: 2rem; } .glyphicon-chevron-right::before { content: "›"; font-size: 2rem; }
.glyphicon-star::before { content: "★"; } .glyphicon-envelope::before { content: "✉"; } .glyphicon-link::before { content: "↗"; }
.glyphicon-warning-sign::before { content: "⚠"; }

/* Preserve Bootstrap 3 carousel control markup while using Bootstrap 5 JS. */
.carousel .item { display: none; } /* fallback for a page missed by token conversion */
.carousel .item.active { display: block; }
.carousel .carousel-inner,
.carousel .carousel-item {
  height: 500px;
  min-height: 500px;
}
.carousel .carousel-item > img:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 500px;
  max-width: none;
  object-fit: cover;
  object-position: center;
}
.left.carousel-control, .right.carousel-control { position: absolute; inset-block: 0; z-index: 1; display: flex; align-items: center; justify-content: center; width: 15%; color: #fff; text-decoration: none; }
.left.carousel-control { left: 0; } .right.carousel-control { right: 0; }

@media (min-width: 768px) {
  .lead { font-size: 21px; }
  .container.marketing { max-width: 750px; }
  .container.marketing > [class*="col-sm-"] { float: left; }
  .navbar .container { flex-wrap: nowrap; }
  .navbar-header { flex-shrink: 0; }
  .navbar-collapse { display: flex !important; flex: 1 1 auto; flex-basis: auto; align-items: center; min-width: 0; }
  .navbar-nav { flex-direction: row; align-items: center; }
  .navbar-nav > li > a {
    padding: 15px;
    line-height: 20px;
  }
  .navbar-collapse > .navbar-nav.ms-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
  .navbar-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    margin-top: 0;
  }
  .navbar-toggler { display: none; }
}

@media (min-width: 992px) {
  .container.marketing { max-width: 970px; }
  .container.marketing > [class*="col-md-"] { float: left; }
}

@media (min-width: 1200px) {
  .container.marketing { max-width: 1170px; }
  .container.marketing > [class*="col-lg-"] { float: left; }
}
