/* Overlay */
.accessibility-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 9999;
}

/* Modale */
.accessibility-modal {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 20px;
  max-width: 500px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0);
  z-index: 10000;
}

.accessibility-modal h4 {
  color: #124484;
  font-size: 20px;
  margin-top: 0;
}

.accessibility-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.accessibility-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  cursor: pointer;
}

.accessibility-switch input {
  display: none;
}

.accessibility-slider {
  position: relative;
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 34px;
  transition: 0.4s;
}

.accessibility-slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

.accessibility-switch input:checked + .accessibility-slider {
  background: rgba(0, 172, 232, 1);
}

.accessibility-switch input:checked + .accessibility-slider::before {
  transform: translateX(20px);
}

/* Styles d'accessibilité */
body.high-contrast {
  filter: invert(100%) hue-rotate(180deg);
}

body.high-contrast #tarteaucitronAlertSmall #tarteaucitronManager,
body.high-contrast #tarteaucitronAlertSmall #tarteaucitronCookiesNumber {
  background-color: black;
}

body.extra-spacing * {
  line-height: 2.5 !important;
}

body.extra-spacing .mission-container .mission-bloc .qx-element-blurb__body {
  height: auto !important;
}

body.extra-spacing .home-actualites .a-la-une,
body.extra-spacing .home-actualites .offres-emploi {
    height: 900px !important;
}

body.extra-spacing .accessibility-button {
    line-height: 0 !important;
}

body.extra-spacing #tarteaucitronManager,
body.extra-spacing #tarteaucitronCookiesNumber {
    line-height: 1 !important;
}

body.extra-large-text #menu-etablissement li a,
body.extra-large-text * {
  font-size: 1.2rem !important;
}

body.extra-large-text h1 span,
body.extra-large-text h3 span,
body.extra-large-text .home-actualites h3,
body.extra-large-text h4 span,
body.extra-large-text h5 span,
body.extra-large-text h6 span,
body.extra-large-text .qx-h1 span,
body.extra-large-text .qx-h3 span,
body.extra-large-text .qx-heading-large span {
  font-size: 2.5rem !important;
  line-height: 2.5rem !important;
}

body.extra-large-text .n2-ss-slider h1,
body.extra-large-text h2 span,
body.extra-large-text .qx-h2 span {
  font-size: 3.5rem !important;
  line-height: 3.5rem !important;
}

body.extra-large-text .mission-container .mission-bloc .qx-element-blurb__body {
  height: auto !important;
}

body.extra-large-text .home-actualites .a-la-une,
body.extra-large-text .home-actualites .offres-emploi {
    height: 900px;
}

/* Pastille flottante */
.accessibility-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  color: #fff;
  background-color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.3s;
  z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
  .accessibility-modal {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    max-width: 90%;
    width: 90%;
  }

  .accessibility-modal h4 {
    font-size: 1.2em;
  }

  .accessibility-close {
    top: 10px;
    right: 10px;
  }

  body.extra-large-text h2 span,
  body.extra-large-text .qx-h2 span {
    font-size: inherit !important;
    line-height: inherit !important;
  }
}