/* =========================
   LISTES EN COLONNES
   ========================= */

@media (min-width: 992px) {
  .cc-4 {
    column-count: 4;
    column-gap: 1.5rem;
  }

  .cc-4 li {
    display: inline-block;
    width: 100%;
  }

  }


/* =========================
   FORMULAIRES FORMIDABLE
   ========================= */

.formulaire_formidable .saisie_fichiers {
  margin-bottom: 0.75rem;
}

.formulaire_formidable .saisie_fichiers .editer-label,
.formulaire_formidable .saisie_fichiers legend {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1f2937;
}

.formulaire_formidable .saisie_fichiers .choix {
  margin-top: 0.5rem;
}

.formulaire_formidable .saisie_fichiers input[type="file"] {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
}

.formulaire_formidable .saisie_fichiers input[type="file"]:focus {
  outline: none;
  border-color: #004899;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}


/* =========================
   NAV PILLS / ONGLETS
   ========================= */

.nav-pills .nav-link {
  margin-bottom: 0.5rem;
  padding: 1rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
  background: #e7f1ff;
  transform: translateX(5px);
}

.nav-pills .nav-link.active {
  color: #fff !important;
  background: #004899!important;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.nav-pills .nav-link i {
  font-size: 1.2rem;
}


/* =========================
   MENU / NAVIGATION
   ========================= */

/* Autorise le retour à la ligne sur les liens longs */
.navbar .nav-link,
.navbar .dropdown-menu a,
.offcanvas .nav-link,
.offcanvas .dropdown-item {
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Largeur par défaut des sous-menus desktop */
.navbar .dropdown-menu {
  min-width: 18rem;
  max-width: 100%;
}


/* =========================
   MENU MOBILE
   ========================= */

@media (max-width: 991.98px) {
  .navbar .dropdown-menu,
  .offcanvas .dropdown-menu {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    max-height: 70vh;
    overflow-y: auto;
  }

  .navbar .nav-link,
  .navbar .dropdown-menu a,
  .offcanvas .nav-link,
  .offcanvas .dropdown-item {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.95rem;
  }
}


/* Limiter la taille des images flottantes */
.spip_documents_left, .spip_documents_right {
    max-width: 40%; /* L'image ne prendra jamais plus de 40% de la largeur du texte */
    margin: 1rem;   /* Ajoute un peu d'espace autour */
}

/* Pour les écrans mobiles, on passe en pleine largeur */
@media (max-width: 767px) {
    .spip_documents_left, .spip_documents_right {
        max-width: 100%;
        float: none;
        display: block;
        margin: 1rem auto;
    }
}

.texte-article img.spip_right,
.texte-article .spip_documents_right {
  float: right;
  max-width: 300px;
  width: 40%;
  margin: 0 0 1rem 1.5rem;
}

.texte-article img.spip_left,
.texte-article .spip_documents_left {
  float: left;
  max-width: 300px;
  width: 40%;
  margin: 0 1.5rem 1rem 0;
}

.texte-article::after {
  content: "";
  display: block;
  clear: both;
}

@media (max-width: 767px) {
  .texte-article img.spip_right,
  .texte-article .spip_documents_right,
  .texte-article img.spip_left,
  .texte-article .spip_documents_left {
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }
}

