/*
 * Front office — adaptation responsive.
 * Surcharge les largeurs fixes et positionnements qui provoquent
 * un débordement, sans modifier le rendu desktop au-delà du nécessaire.
 * Les !important ne servent qu'à passer devant des règles existantes
 * déjà marquées !important ou des styles inline.
 */

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
iframe,
embed,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
.card-title,
.card-text,
.footer-info p {
  overflow-wrap: break-word;
}

/* Tableaux : défilement horizontal local, le document ne s'élargit pas. */
@media (max-width: 991.98px) {
  div:has(> table),
  .dataTables_wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* -------------------------------------------------------------------------- */
/* Header / navigation                                                        */
/* -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .navbar-expand-lg .navbar-toggler {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .navbar-expand-lg .navbar-collapse:not(.show) {
    display: none !important;
  }

  .navbar-expand-lg .navbar-collapse.show {
    display: block !important;
  }

  #section-actualites {
    margin-top: 12px !important;
  }

  nav.navbar.navbar-expand-lg.fixed-top {
    padding: 8px 12px !important;
    align-items: center;
  }

  a.navbar-brand img,
  nav.navbar.navbar-expand-lg.fixed-top.clearHeader a.navbar-brand img {
    width: 108px !important;
    max-width: 42vw;
    height: auto;
  }

  .navbar-toggler {
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 8px;
    margin-left: auto;
  }

  .navbar-toggler-icon {
    width: 26px;
    height: 26px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23EE6F35' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
  }

  div#navbarSupportedContent {
    height: auto !important;
    max-height: calc(100dvh - 76px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 8px 4px 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  }

  #change_color,
  #navbarSupportedContent .navbar-nav {
    width: 100%;
    align-items: stretch !important;
  }

  #change_color .nav-item {
    width: 100%;
    border-bottom: 1px solid #f2f2f2;
  }

  #change_color .nav-link,
  ul.navbar-nav.ml-auto.menu-middle a {
    display: block;
    padding: 14px 10px !important;
    font-size: 15px !important;
  }

  ul.navbar-nav.ml-auto.btn-connx {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 14px 0 6px !important;
  }

  ul.navbar-nav.ml-auto.btn-connx > li,
  li.nav-item.text-center,
  li.nav-item.text-center.dropdown,
  div#dropdown-Dae {
    margin: 0 !important;
  }

  ul.navbar-nav.ml-auto.btn-connx a {
    margin: 0 !important;
  }

  .navbar-nav .dropdown-menu {
    position: static !important;
    left: auto !important;
    right: auto !important;
    float: none;
    width: 100%;
    min-width: 0 !important;
    transform: none !important;
  }

  #dropdown-Dae {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 8px !important;
  }
}

@media (max-width: 575.98px) {
  ul.navbar-nav.btn-connx > li:not(:has(.cart-ring)):not(:has(.notification-ring)):not(.dropdown) {
    flex: 1 1 100%;
  }

  ul.navbar-nav.btn-connx > li:not(:has(.cart-ring)):not(:has(.notification-ring)):not(.dropdown) > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }
}

/* -------------------------------------------------------------------------- */
/* Accueil — sections                                                         */
/* -------------------------------------------------------------------------- */
.section-team .owl-carousel {
  position: relative !important;
  width: 100%;
}

.footer {
  margin-top: 0 !important;
}

@media (max-width: 1258px) {
  #section-services > .container {
    max-width: 100% !important;
    width: 100%;
  }

  #row-service-home {
    width: 100% !important;
  }

  .col-md-6.services-text {
    width: 100% !important;
    max-width: 100%;
  }

  .section-services p.card-text {
    padding-bottom: 0.75rem !important;
    height: auto !important;
  }
}

@media (max-width: 991.98px) {
  .slider-section,
  .section-about,
  .section-services,
  .section-formation,
  .section-article,
  .section-doc,
  .section-rappel,
  .section-avis,
  .section-team,
  .section-gallery,
  .section-galerie-album,
  .section-FAQ,
  .edit-profile-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  #section-services {
    padding: 28px 16px !important;
  }

  .slider-section {
    margin-top: 12px;
    padding-top: 8px;
  }

  /* Les contrôles du slider étaient sortis de l'écran (right: -79%). */
  .slider-section .align-self-end,
  #section-actualites .align-self-end {
    position: static !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100%;
    margin-top: 8px;
  }

  .btn-caroussel {
    position: relative !important;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0 !important;
    height: auto;
  }

  #section-actualites .carousel-control-prev,
  #section-actualites .carousel-control-next,
  .slider-section .carousel-control-prev,
  .slider-section .carousel-control-next {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .about-imgs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }

  .about-img-1,
  .about-img-2,
  .about-img-3 {
    max-width: 100%;
  }

  .about-imgs img {
    width: auto;
    max-width: min(100%, 240px);
    height: auto;
  }

  .section-formation .big-col > .card,
  .section-article .big-col > .card,
  #first-session > .card {
    height: auto !important;
    min-height: 280px;
    max-height: none !important;
  }

  .article-box .card .row > .col-md-6,
  .section-formation .card .row > .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100% !important;
  }

  .article-box .card-img-top,
  .section-formation .card-img-top,
  .doc-box .card > div[style*="background-image"] {
    height: 200px !important;
    max-height: 220px !important;
  }

  .article-box a.btn.btn-primary,
  .section-formation a.btn.btn-primary,
  .doc-box a.btn.btn-primary {
    position: static !important;
    display: inline-block;
    margin-top: 8px;
    width: auto !important;
  }

  .section-formation .text-right,
  .section-article .text-right,
  .section-doc .text-right {
    text-align: left !important;
    margin-top: 8px;
  }

  #card_ressource {
    width: 100% !important;
    max-width: 100%;
  }

  .section-team {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  .section-team .col-md-8,
  .section-team .col-md-10 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .section-team .owl-nav {
    position: static !important;
    width: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 12px !important;
  }

  .section-team .owl-nav button,
  .owl-carousel .owl-nav button {
    width: 44px !important;
    height: 44px !important;
  }

  .section-team .owl-item,
  .owl-stage .item {
    top: 0 !important;
    height: 260px !important;
    max-height: 260px !important;
  }

  .container,
  .container-fluid,
  .col-md-12 {
    max-width: 100% !important;
    width: 100% !important;
  }

  #section-actualites {
    margin-top: 12px !important;
  }

  .container.testimonials,
  .testimonials .row,
  .testimonials .col-md-12,
  .testimonials-container,
  .testimonials .content,
  .selectedCard {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-items: stretch !important;
  }

  .container.testimonials {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .testimonials-container,
  .testimonials .content,
  .testimonials .col-md-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .selectedCard {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #outer,
  #bloc_tm,
  #bloc-logo-next,
  .iframe,
  .video,
  #outer iframe,
  #outer video {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #outer iframe,
  #outer video,
  .iframe {
    aspect-ratio: 16 / 9;
  }

  .carousel-item-slider,
  #myDIV,
  #discription {
    height: auto !important;
  }

  .section-services a.card-link {
    position: static !important;
    float: right;
  }

  .section-services a.card-link i,
  .section-services .card-body i.fa-angle-right {
    margin-top: 12px !important;
  }

  main.section-services {
    position: relative !important;
    bottom: auto !important;
    padding: 28px 16px !important;
    background-size: cover !important;
  }

  .dc-questionsection,
  .dc-postquestion,
  .dc-askquery {
    width: 100% !important;
    float: none;
    padding: 16px;
    position: relative;
  }

  .dc-questionsection figure {
    position: static;
    right: auto;
  }

  button.btn-slider-text-forum,
  button.btn-slider-text-for,
  button.btn-slider-text-sub,
  .btn-slider-text-service {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .section-gallery .box {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    grid-auto-rows: 220px;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  #card_ressource {
    width: 50% !important;
    max-width: 50%;
  }

  #group-formation > .row > .col-md-6,
  .article-box .small-col > .row > .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    width: 50% !important;
  }
}

@media (max-width: 767.98px) {
  #card-service-home {
    width: 100% !important;
    max-width: 100%;
    flex: 0 0 100%;
  }

  .section-services .card {
    height: auto !important;
  }

  .section-services a.card-link i {
    margin-top: 16px;
  }

  #group-formation > .row > .col-md-6,
  .article-box .small-col > .row > .col-md-6,
  .small-col .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100% !important;
  }

  .about-imgs {
    flex-direction: column;
    align-items: center;
  }

  .about-img-2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .container.testimonials,
  .testimonials-container,
  .testimonials .content,
  .selectedCard {
    max-width: 100% !important;
    width: 100% !important;
    margin-right: 0 !important;
  }

  #outer {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    right: auto !important;
    left: auto !important;
    margin: 0 !important;
  }

  #outer iframe,
  #outer video,
  .testimonials iframe,
  .testimonials video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  #bloc_tm,
  #bloc-logo-next {
    position: static !important;
    width: 100% !important;
    margin: 12px 0 0 !important;
  }

  #myDIV {
    height: auto !important;
    margin: 0 !important;
  }

  .author img {
    position: static !important;
    top: auto !important;
    width: 64px !important;
    height: 64px !important;
  }

  .section-rappel {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  .btn-inscription a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: auto !important;
    max-width: 100%;
  }

  #myBtn {
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
  }
}

/* -------------------------------------------------------------------------- */
/* Formulaires                                                                */
/* -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="file"]),
  select,
  textarea,
  .form-control,
  .form-select,
  .feedback-input {
    max-width: 100%;
    width: 100%;
    font-size: 16px;
  }

  .input-group {
    margin-left: 0 !important;
    max-width: 100%;
    flex-wrap: wrap;
  }

  #contact-footer .row {
    flex-direction: column;
    margin-left: 0;
    margin-right: 0;
  }

  #contact-footer .row > .col,
  #contact-footer .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .footer {
    padding: 32px 16px 20px !important;
    text-align: left;
  }

  #footer > .row {
    align-items: flex-start !important;
  }

  #lien-footer,
  #rsx-footer,
  #contact-footer {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100% !important;
  }

  #rsx-footer,
  #contact-footer {
    margin-top: 8px;
  }

  #footer .navbar-brand,
  #footer .row.align-items-center img {
    width: 88px !important;
    max-width: 40vw;
    height: auto;
    position: static !important;
    left: auto !important;
    margin: 0 0 16px !important;
  }

  .footer-info {
    align-items: flex-start;
    padding-left: 0;
    padding-right: 0;
  }

  .links-footer a {
    display: inline-block;
    padding: 8px 0;
    font-size: 15px;
  }

  .footer [type="submit"] {
    min-height: 48px;
    font-size: 16px;
  }
}

/* -------------------------------------------------------------------------- */
/* Modales                                                                    */
/* -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .modal-dialog {
    max-width: calc(100vw - 1rem) !important;
    width: calc(100vw - 1rem);
    margin: 0.5rem auto;
  }

  .modal-content {
    max-height: calc(100dvh - 1rem);
  }

  .modal-body {
    overflow-y: auto;
    max-height: calc(100dvh - 8rem);
  }

  .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-footer .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
}
