.icon-square {
  width: 45px;
  height: 45px;
  font-size: 1.25rem;
  display: grid;
  align-items: center;
  justify-content: center;
}

.icon-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: .25rem;
}

.icon-item svg {
  margin-top: .25rem;
  justify-self: center;
}

.btn-secondary:hover,
.btn-secondary:active {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.btn-accent {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* !important ajouté pour contrecarrer Bootstrap */
.btn-accent:hover,
.btn-accent:active {
  color: var(--white) !important;
  background-color: var(--accentDark) !important;
  border-color: var(--accentDark) !important;
}

#orders-index {
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.order-scanner[hidden] {
  display: none;
}

.order-scanner {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: grid;
  place-items: center;
  padding: .75rem;
}

.order-scanner-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(12 22 32 / 75%);
}

.order-scanner-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(96vw, 52rem);
  height: min(92dvh, 48rem);
  max-height: 100%;
  padding: 1rem;
  border-radius: .5rem;
  background: var(--white);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 25%);
}

.order-scanner-view {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: .35rem;
  background: #101820;
}

.order-scanner-view > * {
  width: 100%;
  height: 100%;
}

@media (max-width: 575.98px) {
  .order-scanner {
    padding: .5rem;
  }

  .order-scanner-dialog {
    width: 100%;
    height: calc(100dvh - 1rem);
    padding: .75rem;
    border-radius: .375rem;
  }
}

@media (min-width: 576px) {
  #orders-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  #orders-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.order-card {
  background-color: var(--white);
}

.order-card .body,
.order-card .date,
.order-card .badges-wrapper {
  font-size: .875rem;
}

#order-detail-offcanvas {
  width: 100%;
  max-width: 50rem;
}

#order-detail-offcanvas .offcanvas-title {
  color: var(--accent);
  font-weight: 500;
  font-size: 1.25rem;
}

.notification-card {
  min-width: 0;
}

.notification-file-input .form-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: .5rem;
  border: 1px dashed var(--grayLight);
  border-radius: 50%;
  background: var(--offWhite);
  color: var(--textLight);
  cursor: pointer;
  font-size: 1.125rem;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.notification-file-input .form-label:hover,
.notification-file-input .form-label:focus-within {
  border-color: var(--accent);
  background: var(--secondaryExtraLight);
  color: var(--accentDark);
}

.notification-file-input input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notification-file-input:has(input[type="file"]:focus-visible) .form-label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.notification-meta > * {
  min-width: 0;
}

@media (max-width: 575.98px) {
  .notifications-panel {
    padding: 1rem !important;
  }

  .notification-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    row-gap: .5rem;
  }

  .notification-meta > :last-child {
    grid-column: 1 / -1;
  }
}

.notification-image-preview {
  width: 72px;
  height: 72px;
}

.notification-image-open {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.notification-image-open img {
  width: 100%;
  height: 100%;
}

.notification-list-image img {
  border-radius: .375rem;
}

.notification-image-dialog {
  position: fixed;
  width: min(90vw, 900px);
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.notification-image-dialog::backdrop {
  background: rgb(0 0 0 / 75%);
}

.notification-image-dialog img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  margin: 0 auto;
  object-fit: contain;
  touch-action: pan-y;
}

.notification-image-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: .75rem;
}

.notification-image-navigation button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--white);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.notification-image-navigation button:hover,
.notification-image-navigation button:focus-visible {
  background: var(--white);
  color: var(--black);
}

.notification-image-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 15px;
  line-height: 17px;
  cursor: pointer;
}

.notification-image-remove:hover,
.notification-image-remove:focus-visible {
  background: var(--red);
}

.step-detail {
  display: grid;
  column-gap: .5rem;
  row-gap: .5rem;
  grid-template-areas: 
    "icon title action"
    "col1 col1 action"
    "col2 col2 action"
  ;
  grid-template-columns: 1.25rem 1fr auto;
}

.step-detail .icon {
  grid-area: icon;
}

.step-detail .title {
  grid-area: title;
}

.step-detail .col1 {
  grid-area: col1;
}

.step-detail .col2 {
  grid-area: col2;
}

.step-detail .col3 {
  grid-column: 1 / -2; /* S'étend de la première à l'avant dernière colonne */
}

.step-detail .action {
  grid-area: action;
}

.step-detail .form {
  grid-column: 1 / -1; /* S'étend de la première à la dernière colonne */
}

.step-detail table td {
  padding: 0;
}

@media (min-width: 768px) {
  .step-detail {
    grid-template-areas: 
      "icon title title action"
      "col1 col1 col2 action"
    ;
    grid-template-columns: 1.25rem 1fr 1fr auto;
  }
}

#add-order button:not(.input-group button) {
  flex-grow: 1;
}

#add-order .input-group {
  width: unset;
  flex-grow: 1;
}

#add-order .input-group input {
  width: 9.375rem;
  flex-grow: 1;
}

#add-step-btns .input-group {
  width: unset;
}

#add-step-btns .input-group input {
  width: 9.375rem;
}

/* --- PROFILE --- */

#profile .avatar {
  width: 3rem;
  height: 3rem;
}

#profile .user-name {
  font-size: .875rem;
}

.pay-scale-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  #profile .user-name {
    font-size: 1rem;
  }

  .pay-scale-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1400px) {
  .pay-scale-detail-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

#months-in-service {
  min-width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  line-height: 1.5rem;
  padding: .75rem 0;
  text-align: center;
  border-color: var(--accent) !important;
  border-width: 2px !important;
}

#pay-scale .label {
  font-size: 0.875rem;
}
