:root {
  --ircad-blue-h: 197;
  --ircad-blue-s: 100%;
  --ircad-blue-l: 33%;
  --ircad-blue: hsl(
    var(--ircad-blue-h),
    var(--ircad-blue-s),
    var(--ircad-blue-l)
  );
}

body {
  background-color: #f0f0f0;
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 1rem;
}
.body-wrapper {
  position: relative;
  overflow: hidden;
}

input,
textarea {
  padding: 5px;
  border: 1px solid #5e5e5e;
  border-radius: 3px;
}

select {
  width: 7rem;
}

input:disabled,
textarea:disabled {
  opacity: 0.25;
}

div.form-group > label:has(+ input, + textarea, + div):not(.form-column label),
div.form-radio-group > label,
.form-column > label {
  font-weight: 600;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  width: 5rem;
}

input[type="time"] {
  border: 0;
  box-shadow: inset 2px 2px 4px #00000054;
  border-radius: 5px;
  width: 4rem;
  text-align: center;
}

.required::after,
.required-left::before {
  color: red;
}

.required-left::before {
  content: "* ";
}

.required::after {
  content: " *";
}

.header-bar {
  --padding-horizontal: 1.5rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: calc(100% - 2 * var(--padding-horizontal));
  padding: 0.5rem var(--padding-horizontal);
  top: 0;
  position: sticky;
  background-color: #1d1d1d;
  z-index: 10;
  height: 4rem;
  align-items: center;
}

.header-buttons {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.ircad-logo {
  width: 8rem;
}

.header-btn:hover {
  filter: brightness(0.9);
}

.lang-switcher img {
  --size: 1.5rem;
  width: var(--size);
  height: var(--size);
  padding: calc(0.1 * var(--size)) calc(0.25 * var(--size));
  border-radius: calc(0.25 * var(--size));
  border: 2px solid transparent;
  cursor: pointer;
  transition: border 0.1s ease-in-out, background-color 0.1s ease-in-out,
    transform 0.1s ease-in-out;
}

.lang-switcher img:hover {
  border: 2px solid #bab5ff;
  transform: scale(1.05);
}

.lang-switcher img.selected {
  border: 2px solid white;
}

.page-container {
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  height: calc(100vh - 5rem);
  --sidebar-width: 19rem;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  background-color: #1d1d1d;
  --gap: 2rem;
  gap: var(--gap);
  justify-content: flex-start;
  position: sticky;
  left: 0;
  top: 0;
  align-items: center;
  flex-shrink: 0;
  width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  transition: transform 0.2s ease-in-out;
}

.timeline-item-container {
  --first-child-top: 3.5rem;
  display: flex;
  position: relative;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  flex-shrink: 0;
  width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  justify-content: flex-start;
}

.timeline-close-button {
  display: none;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 13rem;
  z-index: 4;
  border-bottom: 3px solid transparent;
  transition: transform 0.1s ease-in-out, border-bottom 0.1s ease-in-out,
    opacity 0.1s ease-in-out;
}

.timeline-item::before,
.timeline-item::after {
  position: absolute;
  content: "";
  background-color: white;
  --left: -1.5rem;
  flex-shrink: 0;
}

.timeline-item::before {
  --size: 10px;
  width: 13px;
  height: 13px;
  left: var(--left);
  border-radius: 100%;
  z-index: 5;
}

.timeline-item:not(:first-child)::after {
  --size: 10px;
  width: 2px;
  height: calc(100% + var(--gap) + 3px - 12px);
  left: calc(6px + var(--left) - 1px);
  top: calc((var(--gap) + 4px + 11px) * -1);
  z-index: 0;
}
/* 
.timeline-item:last-child::after {
  --size: 10px;
  width: 2rem;
  height: 2rem;
  background-color: #1d1d1d;
  left: -2rem;
  top: 1rem;
}

.timeline-item-container::after {
  content: "";
  position: absolute;
  width: 2px;
  height: calc(100% - var(--first-child-top) - 1rem);
  background-color: #ffffff;
  left: 20px;
  top: calc(var(--first-child-top));
  z-index: 3;
} */

.timeline-item:first-child {
  margin-top: var(--first-child-top);
}

.timeline-item-text {
  font-size: 1rem;
  font-weight: 520;
  width: 100%;
  color: #a3a3a3;
  text-align: left;
  padding: 0.5rem;
  transition: color 0.1s ease-in-out;
}

#saveNotification {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  z-index: 100;
  position: absolute;
  top: 2rem;
  right: 2rem;
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3), inset 5px 0 #65c543;
  height: 4rem;
  background-color: white;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.5s ease-in-out;
  transform: translateX(200%);
}

#saveNotification .saveNotification-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: flex-start;
}

#saveNotification .saveNotification-text .hide {
  display: flex;
  flex-direction: row;
  font-size: 0.8rem;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

#saveNotification .saveNotification-text input {
  margin: 0;
}

#saveNotification.active {
  transform: translateX(0);
}

/* progressbar */
#saveNotification .progress-bar {
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--ircad-blue);
  bottom: 0;
}

#saveNotification img {
  width: 2rem;
  height: 2rem;
}

h1,
h2,
.timeline-item-text {
  font-family: "Roboto", sans-serif;
}

.timeline-item:not(.timeline-item.limit ~ .timeline-item):not(.active):hover {
  --ircad-blue-l: 20%;
  border-bottom: 3px solid
    hsl(
      var(--ircad-blue-h),
      var(--ircad-blue-s),
      calc(var(--ircad-blue-l) * 0.8)
    );
}

.timeline-item.active {
  border-bottom: 3px solid var(--ircad-blue);
}

.timeline-item.active .timeline-item-text {
  color: #ffffff;
}

.timeline-item.limit ~ .timeline-item {
  opacity: 0.25;
}

.form {
  width: 100%;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  transition: max-height 0.2s ease-in-out, min-height 0.2s ease-in-out,
    transform 0.3s ease-in-out;
}

.form,
.page-container,
.form-section,
.sub-section,
.sub-section > * {
  display: flex;
}

.form-section {
  width: 100%;
  height: 100%;
  padding: 50px;
  box-sizing: border-box;
}

.title-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.title-container .open-sidebar {
  display: none;
}

.form-section,
.sub-section,
.sub-section > * {
  flex-direction: column;
  justify-content: flex-start;
  --section-gap: 1.75rem;
  gap: var(--section-gap);
  flex-shrink: 0;
  overflow: auto;
}

.sub-section {
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.sub-section > * {
  --width: 21rem;
  min-width: var(--width);
  max-width: var(--width);
}

.group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
}

.form-group {
  width: 100%;
}

textarea {
  resize: none;
  overflow-y: auto;
  height: 60px;
  margin: 0;
  min-height: 30px;
}

input[type="radio"] ~ textarea,
.aux-textarea-group textarea {
  height: 30px;
}

input[type="radio"] + label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-line {
  display: flex;
  flex-direction: row;
  gap: 10rem;
}

.form-line > * {
  flex: 1;
}

.form-line-item {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.5rem;
}

.form-line-item input {
  margin: 0;
}

.btn {
  --border-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  text-align: center;
  border-radius: 5px;
  font-size: 1rem;
  user-select: none;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: #cecece;
  transition: filter 0.1s ease-in-out;
}

.btn.disabled {
  cursor: not-allowed;
  display: flex;
  opacity: 0.5;
}

.btn:not(.disabled):hover {
  filter: brightness(0.9);
}

.back-btn {
  background-color: transparent;
  --border-color: var(--ircad-blue);
}

.back-arrow {
  background-color: var(--ircad-blue);
  -webkit-mask: url(../images/arrow-left.svg) no-repeat center;
  mask: url(../images/arrow-left.svg) no-repeat center;
  width: 1.5rem;
  height: 1.5rem;
}

.cancel-btn,
.ircad-btn,
.submit-btn,
.send-btn {
  --border-color: var(--ircad-blue);
  background-color: var(--ircad-blue);
  width: 10rem;
  color: white;
}

.admin-btn.btn {
  border: 1px solid white;
  background-color: #ffffff36;
  --size: 1rem;
  width: var(--size);
  height: var(--size);
}

.admin-btn img {
  width: var(--size);
  height: var(--size);
}

.cancel-btn {
  background-color: #ffff;
  border: 1px solid #a5a5a5;
  color: #a5a5a5;
}

.buttons-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.form-buttons {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
}

.form-column-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-column-line {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-group-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.form-group-row label {
  flex-shrink: 0;
}

.disabled {
  display: none;
}

.hidden {
  visibility: hidden;
}

.form-radio {
  display: flex;
  gap: 10px;
}

.form-radio.other-input,
.form-group-row.other-input {
  flex-direction: column;
}

.form-radio.other-input-content,
.form-group-row.other-input-content {
  flex-direction: row;
}

.other-input:not(.other-input-content) textarea {
  width: calc(100% - 12px);
}

.other-input:not(.other-input-content) {
  width: 100%;
  align-items: flex-start;
}

.form-radio-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-radio-row {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
}

.form-radio-row > div {
  width: 3rem;
  height: 2rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  justify-content: center;
  display: flex;
  padding: 0.5rem;
  transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out,
    opacity 0.1s ease-in-out;
}

.form-radio-row > div.checked {
  background-color: var(--ircad-blue);
  color: white;
  border: 1px solid var(--ircad-blue);
}

.form-radio-row:not(.disabled) > div:not(.checked):hover {
  background-color: var(--ircad-blue);
  opacity: 0.5;
  color: white;
  border: 1px solid var(--ircad-blue);
}

.form-radio-row.disabled > div {
  opacity: 0.25;
}

.form-radio-row input {
  display: none;
}

[data-tip] {
  position: relative;
}
[data-tip]:before {
  content: "";
  display: block;
  content: "";
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #1a1a1a;
  position: absolute;
  top: 30px;
  left: 5px;
  z-index: 8;
  font-size: 0;
  line-height: 0;
  width: 0;
  height: 0;
}
[data-tip]:after {
  display: block;
  content: attr(data-tip);
  position: absolute;
  top: 35px;
  left: 0px;
  padding: 5px 8px;
  background: #1a1a1a;
  color: #fff;
  z-index: 9;
  font-size: 0.75em;
  height: 18px;
  line-height: 18px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  white-space: nowrap;
  word-wrap: normal;
}

/* DROP ZONE */
.drop-zone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  height: 7rem;
  border: 2px dashed #ccc;
  border-radius: 5px;
  background-color: #f0f0f0;
  transition: border 0.1s ease-in-out, background-color 0.1s ease-in-out;
}

.drop-zone.drag-over {
  border: 2px dashed #000;
}

.drop-zone:hover {
  border: 2px dashed #505050;
  background-color: #dadada;
}

/* FILE LIST */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}

.file-list-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  box-sizing: border-box;
  border-radius: 5px;
  background-color: #f0f0f0;
  transition: background-color 0.1s ease-in-out;
  height: 2.5rem;
  width: 50%;
  overflow: hidden;
}

.file-list-item span {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.delete-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  flex-shrink: 0;
  width: 2.5rem;
  -webkit-mask: url(../images/trash.svg) no-repeat center;
  mask: url(../images/trash.svg) no-repeat center;
  background-color: red;
  margin-right: -0.5rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease-in-out, background-color 0.1s ease-in-out;
}

.delete-button:hover {
  background-color: #d10000;
}

.preview-button {
  --size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--size);
  flex-shrink: 0;
  width: var(--size);
  cursor: pointer;
  -webkit-mask: url(../images/preview.svg) no-repeat center;
  mask: url(../images/preview.svg) no-repeat center;
  background-color: #000;
  border: 2px solid transparent;
  transition: transform 0.2s ease-in-out, background-color 0.1s ease-in-out;
  margin: calc((2.5rem - var(--size)) / 2);
}

.preview-button:hover {
  background-color: #505050;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
}

@media screen and (max-width: 600px) {
  .form-section {
    padding: 20px;
    --section-gap: 1.5rem;
  }

  .title-container .open-sidebar {
    display: block;
  }

  .timeline-container {
    position: absolute;
    gap: 1.5rem;
    top: 2rem;
    left: 1rem;
    border-radius: 5px;
    padding-bottom: 0.5rem;
    z-index: 100;
    transform: translateX(calc(-100% - 1rem));
  }

  .timeline-item-container {
    gap: 0.5rem;
  }

  .timeline-close-button {
    display: block;
    --size: 1.5rem;
    width: var(--size);
    height: var(--size);
    position: absolute;
    top: calc(var(--size) / 2);
    left: calc(var(--size) / 2);
    z-index: 101;
  }

  .timeline-container.sidebar__show {
    transform: translateX(0);
  }

  .timeline-item::before,
  .timeline-item::after {
    display: none;
  }

  .ircad-logo {
    width: 7rem;
  }

  .header-bar {
    --padding-horizontal: 2rem;
  }
  /* }

@media screen and (max-width: 750px) { */
  .page-container {
    position: relative;
    --sidebar-width: 15rem;
  }

  .timeline-item::before,
  .timeline-item::after {
    display: none;
  }
  /* }

@media screen and (max-width: 950px) { */
  .btn {
    height: 2rem;
  }

  .cancel-btn,
  .ircad-btn,
  .submit-btn,
  .send-btn {
    width: 7rem;
  }

  .form-column-line {
    /* flex-direction: column;
    gap: 0.5rem; */
    flex-wrap: wrap;
  }

  .cancel-btn {
    font-size: 0.85rem;
  }

  .form-radio-row {
    justify-content: space-between;
    gap: 0;
  }

  .form-radio-row > div {
    width: 2rem;
  }

  .form-line {
    flex-direction: column;
    gap: var(--section-gap);
  }

  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    height: 2.5rem;
  }

  .file-list-item {
    width: 100%;
  }

  /* Modifications du CSS présent dans components/choixDesSalles */

  .form-column-content[data-fieldname="salles"] {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .form-column-content[data-fieldname="salles"] .form-column-line {
    width: calc(50% - (4 * var(--border-size)) - 4px);
  }
}
