/* ============================ */
/* ========== GLOBAL ========== */
/* ============================ */

/* ---------- Generic ---------- */

@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap");

:root {
  --blue1: #245aa6;
  --blue2: #21b3e8;
  --yellow: #fbb911;
  --red: #ce2d3e;
  --gray1: #4c585e;
  --gray2: #f0f1f4;
}

body {
  color: var(--gray1);
  font-family: Barlow, sans-serif;
  background: url("https://widgets.atmosud.org/icairh/jauge/air-pattern.png")
    no-repeat right top;
  background-color: var(--gray2);
}

a {
  color: var(--blue1);
}

[up-source] {
  margin-bottom: 0.75rem;
}

/* ---------- Buttons ---------- */

.btn {
  border-radius: 25px;
  box-shadow: none;
  background-color: transparent !important;
}

.btn-primary,
.btn-outline-primary,
.btn-secondary[type="submit"] {
  color: white !important;
  background-color: var(--blue1) !important;
}

.btn-secondary,
.btn-outline-secondary {
  color: var(--blue1) !important;
  border: solid 1px var(--blue1) !important;
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
  color: var(--blue2) !important;
  border: solid 1px var(--blue2) !important;
}

.btn-danger {
  color: white;
  background-color: var(--red) !important;
}

.buttons-csv {
  color: white !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.btn-primary:hover,
.btn-outline-primary:hover {
  color: white !important;
  background-color: var(--blue2) !important;
}

.btn-secondary[type="submit"]:hover {
  color: var(--yellow) !important;
}

.buttons-csv::before {
  content: "\f6dd";
}

#unread .badge {
  color: black;
  font-weight: normal;
  border-radius: 0;
}

#unread .bg-blue {
  background-color: rgba(36, 90, 166, 0.1) !important;
}

#unread .bg-gray {
  background-color: rgba(251, 185, 17, 0.1) !important;
}

/* ---------- Forms ---------- */

form[action$="/login"] + .alert-primary {
  display: none;
}

form .my-8 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.form-group label {
  color: black;
  margin-top: 7px;
  margin-bottom: 3px;
}

.form-control:focus {
  border-color: var(--blue1);
  box-shadow: none;
}

input[type="text"] {
  border-radius: 5px;
}

textarea[name="custom_footer"] {
  min-height: 350px;
}

textarea[name="module_custom_html"] {
  min-height: 200px;
}

/* ---------- Headings ---------- */

h1.text-truncate {
  margin-bottom: 0.5rem;
}

h1.text-truncate a:hover {
  color: var(--yellow);
}

h1 > i.fa-angle-right {
  font-size: 0.92rem;
  margin-left: 5px;
  margin-right: 5px;
  position: relative;
  top: -2px;
}

h1 .badge {
  position: relative;
  top: -3px;
  padding: 3px;
}

up-modal-content h1 {
  background-color: transparent !important;
  border: 0 !important;
  left: -12px !important;
}

h2,
.fw-bold {
  color: var(--gray1);
  margin-bottom: 5px;
}

.setting h2 {
  margin-top: 0.75rem;
}

/* ---------- Modals ---------- */

up-modal[size="medium"] up-modal-box {
  width: 750px !important;
}

[up-main="modal"] :is(h1, label) {
  color: var(--gray1) !important;
}

[up-main="modal"] label {
  font-size: 1.1rem;
}

div:not([up-main="modal"], .tab_content) > h1 {
  display: inline-block;
  color: var(--blue1) !important;
  background-color: aliceblue;
  padding: 5px 10px;
  color: white;
  position: relative;
  left: -28px;
  font-size: 1.2rem;
  font-weight: 500;
  border-left: solid 4px var(--blue1);
}

/* ============================ */
/* ========== HEADER ========== */
/* ============================ */

/* ---------- Misc ---------- */

.up-can-clean {
  margin-bottom: 7px;
}

up-progress-bar {
  background-color: var(--yellow);
}

/* ---------- Navigation ---------- */

#navbar {
  padding-bottom: 4px;
}

nav.navbar {
  padding: 0;
  background-color: var(--blue1) !important;
}

nav.navbar .container-fluid {
  padding-left: 0;
  padding-right: 0;
  box-shadow: 0 0 7px silver;
  border-bottom: solid 1px white;
}

nav.navbar .me-auto {
  font-weight: 500;
  font-size: 1.1rem;
}

nav.navbar .navbar-brand {
  font-weight: bold;
  text-transform: uppercase;
}

nav.navbar .navbar-brand {
  background-color: white;
  color: var(--blue1);
  padding: 10px 20px;
}

nav.navbar .navbar-brand span {
  background-image: linear-gradient(90deg, var(--blue1) 36%, var(--blue2));
  background-clip: text;
  color: transparent;
  font-size: 1.2rem;
  text-transform: uppercase;
}

nav.navbar .navbar-brand span::after {
  content: "";
  border: solid 2px var(--yellow);
  width: 30px;
  display: block;
  margin-top: 5px;
}

nav.navbar input[type="search"] {
  border-radius: 0;
  border: 0;
  border-left: solid 4px var(--yellow);
}

nav.navbar .dropdown-menu {
  color: var(--gray1);
  background-color: white;
  border-radius: 5px;
  text-transform: initial;
}

nav.navbar .dropdown-menu a:active {
  color: var(--blue1);
  background-color: aliceblue;
}

nav.navbar .dropdown-item {
  border-bottom: dashed 1px #ddd;
}

nav.navbar .dropdown-item:last-of-type {
  border-bottom: 0;
}

.navbar-nav .dropdown-item::before,
a[href$="/discussions/create"]::before,
a[href$="/groups/create"]::before,
a[href$="/actions/create"]::before,
a[href$="/membership/create"]::before,
a[href$="/invite"]::before,
.buttons-csv::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 7px;
}

.dropdown-item[href$="/groups"]::before {
  content: "\f1b3";
}

.dropdown-item[href$="/discussions"]::before {
  content: "\f086";
}

.dropdown-item[href$="/agenda"]::before {
  content: "\f073";
}

.dropdown-item[href$="/map"]::before {
  content: "\f3c5";
}

.dropdown-item[href$="/users"]::before {
  content: "\f0c0";
}

.dropdown-item[href$="/files"]::before {
  content: "\f0c5";
  font-weight: 400;
}

.container-fluid > .dropdown > a.dropdown-toggle.nav-link {
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.2rem !important;
}

a[href$="/discussions/create"]::before {
  content: "\f075";
}

a[href$="/groups/create"]::before {
  content: "\f1b2";
}

a[href$="/actions/create"]::before {
  content: "\f271";
}

a[href$="/membership/create"]::before {
  content: "\f007";
}

a[href$="/invite"]::before {
  content: "\f0e0";
}

button.navbar-toggler {
  margin-right: 10px;
}

/* ========================== */
/* ========== MAIN ========== */
/* ========================== */

/* ---------- Misc ---------- */

p,
li {
  font-size: 1rem;
}

.content {
  font-size: 1rem;
}

.font-bold {
  font-weight: bold;
  color: var(--gray1);
}

.fas.fa-rss {
  margin-right: 5px;
}

.fa-lock {
  color: var(--gray1);
}

i[class^="fa fa-sort"] {
  margin-right: 7px;
}

.badge-secondary {
  color: var(--gray1);
  border: solid 1px var(--gray1);
  border-radius: 3px;
  background-color: white;
}

.empty {
  background-color: aliceblue;
}

.empty-title,
.empty-icon {
  font-weight: normal;
  color: var(--blue1);
}

.card-img-top[src="/images/group.svg"] {
  filter: grayscale(1);
}

/* ---------- Sub-navigation ---------- */

.nav-pills {
  background-color: rgba(240, 241, 244, 0.25);
}

.nav-link {
  font-size: 1rem;
}

.nav-link i {
  margin-right: 6px;
}

.nav-tabs {
  margin-top: 0.75rem !important;
}

:is(.nav-pills, .nav-tabs) .nav-link {
  color: var(--gray1);
  font-weight: 500;
  padding: 1rem;
}

:is(.nav-pills, .nav-tabs) .nav-link:hover {
  color: var(--blue1);
}

:is(.nav-pills, .nav-tabs) .nav-link.active {
  color: var(--blue1);
  background-color: inherit;
  border: 0;
  border-bottom: solid 2px var(--blue1);
  border-radius: 0;
}

.pagination .page-item:not(.active) .page-link {
  color: #4c585e;
}

/* ---------- Alerts/Messages ---------- */

.alert-info {
  border-radius: 0;
  border: 0;
  box-shadow: 0 0 1px silver;
}

.alert.text-bg-info {
  color: black !important;
  background-color: rgba(251, 185, 17, 0.5) !important;
  border-left: solid 1px;
  border-color: var(--yellow);
  width: 50%;
  text-align: center;
  position: absolute;
  top: 0.5rem;
  left: calc(50% - 25%);
  border-radius: 5px;
  padding: 0.3rem;
}

.sticky-messages + .container {
  margin-top: 3.5rem !important;
}

.help {
  background-color: aliceblue;
  border: solid 1px var(--gray2);
}

.help h4 {
  color: var(--blue1);
}

.small-help {
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

.js-loader {
    background-color: #fbb911;
    color: black;
}

/* ---------- Tags ---------- */

.tag {
  background-color: var(--gray2);
  border-radius: 2px;
}

.tag:hover {
  background-color: #ddd;
}

td .tag {
  background-color: white !important;
  border: solid 1px var(--gray2);
  color: #4c585e !important;
}

td.tag.text-bg-warning,
td.tag.text-bg-primary {
  border: 0 !important;
  background-color: white;
}

td .tag.text-bg-warning {
  color: var(--red) !important;
  border: solid 1px var(--red) !important;
}

td .tag.text-bg-primary {
  border: solid 1px var(--yellow) !important;
}

/* ---------- Cards ---------- */

.card {
  transition: transform 0.2s ease;
}

.card:hover {
  transform: scale(1.02);
}

.card-body i.text-xs,
h1 > i:last-child:not(.fa-angle-right) {
  color: var(--gray1);
  font-size: 0.75rem;
  position: relative;
  top: -2px;
}

/* Badges:
     - pink -> admin
     - azure -> membre
     - lime -> candidat */

.card-img-top + .bg-pink,
.card-img-top + .bg-azure,
.card-img-top + .bg-lime {
  font-weight: normal;
  border-radius: 3px;
  border: solid 1px white;
}

.card-img-top + .bg-pink {
  color: white;
  background-color: var(--red) !important;
}

.card-img-top + .bg-azure {
  color: black;
  background-color: var(--yellow) !important;
}

.card-img-top + .bg-lime {
  color: black;
  background-color: var(--gray2) !important;
}

/* ---------- Tables ---------- */

table thead th {
  font-size: 0.8rem !important;
  text-transform: lowercase !important;
  font-weight: 500 !important;
}

table thead th::first-letter {
  text-transform: uppercase;
}

table td {
  line-height: 2.4;
}

/* =========================== */
/* ========== PAGES ========== */
/* =========================== */

/* ---------- Presentation ---------- */

[up-source^="/presentation"] a#atmosud-banner {
  text-align: center;
  display: block;
  background: url("https://bilan.atmosud.org/user/images/g5_helium/femme_cheveux_vent.jpg")
    no-repeat 0 -350px;
  background-size: cover;
  padding: 9rem;
  box-shadow: 0 0 4px silver inset;
  position: relative;
}

[up-source^="/presentation"] a#atmosud-banner::after {
  content: "";
  background-color: white;
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  padding: 9rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

[up-source^="/presentation"] a#atmosud-banner:hover::after {
  opacity: 0.9;
}

[up-source^="/presentation"] a#atmosud-banner img {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

[up-source^="/presentation"] a#atmosud-link:hover {
  text-decoration: none;
  border-bottom: solid 2px var(--yellow);
}

/* ---------- Discussions ---------- */

.file-embed {
  border-radius: 5px;
  background-color: rgba(36, 90, 166, 0.05);
}

.file-embed:hover {
  background-color: rgba(36, 90, 166, 0.1);
}

/* ---------- Calendar ---------- */

#calendar.mt-5 {
  margin-top: 1rem !important;
}

#calendar button {
  border: 0;
  color: var(--gray1);
  background-color: var(--gray2);
}

#calendar button:hover {
  color: var(--gray2);
  background-color: var(--gray1);
}

.badge-secondary .fa-calendar {
  margin-right: 3px;
}

.fc-view-harness {
  height: 600px !important;
}

.fc-scrollgrid a {
  color: #4c585e;
}

.fc .fc-daygrid-day.fc-day-today {
  background-color: rgba(36, 90, 166, 0.1);
}

.fc .fc-daygrid-day.fc-day-today:focus {
  background-color: rgba(33, 179, 232, 0.1);
}

/* ---------- Files ---------- */

[up-source="/files"] .dropdown-item .h-2,
[up-target=".items"].dropdown-item .h-2 {
  margin-right: 5px;
  margin-top: 2px;
}

[up-target=".files"] .fw-bold {
  font-weight: normal !important;
  font-size: 1rem;
  position: relative;
  top: -5px;
  margin-bottom: 0;
}

img.avatar {
  box-shadow: none;
  background-color: transparent;
  filter: grayscale(1);
}

/* ---------- Map ---------- */

#mapid ~ .badge {
  font-size: 0.8rem;
  text-transform: uppercase;
  border-radius: 0;
}

#mapid .marker {
  width: 1.1rem;
  height: 1.1rem;
  border: solid 1px white;
}

.leaflet-popup-content a {
  color: var(--blue1) !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 6px !important;
}

span[style*="#8dc91e"] {
  background-color: var(--blue1) !important;
}

span[style*="#1e60c9"] {
  background-color: var(--blue2) !important;
}

span[style*="#871ec9"] {
  background-color: var(--yellow) !important;
}

/* ---------- User ---------- */

/* Participants */
.table > :not(caption) > * > * {
  padding: 0.5rem; 
}

.table a[href*="membership"] {
  position: relative;
  top: 10px;
}

[up-source^="/users/"] h1 em {
  font-weight: normal;
  font-style: normal;
  font-size: 1.1rem;
}

[up-source^="/users/"] img.rounded {
  height: 135px;
}

.user.mb-4.pb-4 {
  margin-bottom: 0.75rem !important;
  padding-bottom: 0.5rem !important;
}

/* ---------- Legal & GDPR ---------- */

.atmosud {
  border-bottom: solid 2px var(--yellow);
}

.atmosud span:first-of-type {
  color: var(--blue1);
}

.atmosud span:last-of-type {
  color: var(--blue2);
}

/* ---------- 404 ---------- */

#page-404 {
  text-align: center;
}

#page-404 p:first-of-type {
  font-size: 2rem;
}

/* ============================ */
/* ========== FOOTER ========== */
/* ============================ */

footer.my-8 {
  display: none;
}

#alt-footer {
  text-align: center;
  margin: 2rem;
  padding-bottom: 2rem;
  font-size: 0.9rem;
}

#alt-footer a {
  color: var(--gray1);
}

#alt-footer .atmosud {
  border-bottom-width: 0;
}

#alt-footer .atmosud:hover {
  border-bottom-width: 2px;
}

#alt-footer .atmosud a {
  text-decoration: none;
}

#social-networks {
  line-height: 3;
}

#social-networks a {
  text-decoration: none;
  margin-left: 3px;
  position: relative;
  top: -2px;
}

#social-networks a:hover {
  color: var(--yellow);
}

/* ================================ */
/* ========== RESPONSIVE ========== */
/* ================================ */

@media screen and (max-width: 1200px) {
  [up-source^="/presentation"] a#atmosud-banner {
    background: none;
    box-shadow: none;
    padding: 3rem;
  }

  [up-source^="/presentation"] a#atmosud-banner::after {
    display: none;
  }

  .nav .nav-item .nav-link {
    padding: 0.5rem;
  }
}

@media screen and (max-width: 962px) {
  #navbar.collapse {
    background-color: white;
  }

  #navbar.collapse .nav-link,
  #navbar.collapse .dropdown-item {
    color: var(--gray1);
  }
}

@media screen and (max-width: 768px) {
  h1.text-truncate {
    font-size: 1.15rem;
    left: -12px !important;
  }
}

@media screen and (max-width: 600px) {
  .sticky-messages + .container {
    max-width: 90%;
  }
}
