/* body
----------------------------------*/
body {
	background-image: url("../img/background.jpg");
	background-repeat: repeat;
}


/* header
----------------------------------*/
header.container {
	margin-top: 0;

}
.banner-wrapper {
	background: transparent url("../img/banner.jpg") no-repeat ;
	background-size:100% auto;
	padding-top:0;
}

/* pour que le lien <a> prennent toute la surface de son conteneur parent */
.header-main a#toHome::after {
  content: "";
  position: absolute;
  inset: 0; /* équivaut à top/right/bottom/left: 0 */
}


/* contenu
----------------------------------*/
.content-main {
	padding-left:0;
	padding-right:0;
}
.content-main > h1 {
	color: white;
}
.content-sidebar {
    margin-top: 1rem;
    padding:0;
}
.content-sidebar .bloc {
  margin-left: 15px !important;
  /*margin-right: 15px !important;*/
}
.portfolio-item {
  float: none;
  display: inline-block;
}
.docjoint {
  display: flex;
  align-items: center;
  gap: 12px;
}
.docjoint p {
  margin: 4px 0 0;
}


/* contact
---------------------------------*/
.page_contact input, .page_contact textarea {
  width: 100%;
}


/* champ de recherche : form.search-form
----------------------------------*/
/* Le conteneur ne doit pas rogner le champ quand il dépasse */
.header-sidebar {
  overflow: visible !important;
}

/* Le formulaire ne réserve que la place de la loupe (40 px), collée à droite */
.header-sidebar .search-form {
  position: relative !important;
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  margin: 0 0 0 auto !important;
  right: -28px;
  bottom: 2px;
}

/* Le cadre arrondi est sorti du flux : ancré au bord droit, il s'agrandit
   vers la gauche, quelle que soit la largeur du conteneur */
.header-sidebar .search-form fieldset {
  position: absolute !important;
  top: 0;
  right: 0;
  z-index: 10;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;   /* loupe et champ centrés verticalement */
  width: max-content !important;
  height: 40px;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  border: 1px solid gray !important;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

/* Le champ : replié par défaut (largeur 0) */
.header-sidebar .search-form input.search {
  position: static !important;
  flex: 0 0 auto;
  align-self: center !important;
  width: 0 !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  background: transparent !important;
  font-size: 1rem;
  opacity: 0;
  transition: width 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}

/* Le champ déplié */
.header-sidebar .search-form.ouvert input.search {
  width: 300px !important;
  padding: 0 0 0 14px !important;
  opacity: 1;
}

/* La loupe */
.header-sidebar .search-form input.search-submit {
  position: static !important;
  flex: 0 0 38px;
  align-self: center !important;
  float: none !important;
  width: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 9px !important;
  box-sizing: border-box;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  object-fit: contain;
  cursor: pointer;
}




/* footer
----------------------------------*/
.footer-title {
	/*color: white;*/
}
.footer.container div, .footer.container a{
	color: white;
}
.footer-sep {
	border-color: white;
}

/* répartition des logos des partenaires*/
/* ===== PIED DE PAGE ===== */

/* 1. Conteneur : séparation nette avec le contenu */
.footer {
  position: relative;
  clear: both;
  margin-top: 48px;
  padding: 36px 24px 20px;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.25);

  /* Filet haut en dégradé */
  border-top: 4px solid #c8101a;
  border-image: linear-gradient(to right, rgba(200,16,26,0) 0%, rgba(200,16,26,1) 100%) 1;
}

/* 2. Première ligne : logos en haut, puis trait + lien sur la même ligne */
.footer-row-1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* 3. Logos */
.footer-logos {
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 28px;
  margin-bottom: 28px;
}

.footer-item a, .footer-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 8px 14px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-item a:hover, .footer-item span:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.footer-item img {
  display: block;
  max-height: 100%;
  width: auto;
}

/* 4. Séparateur : prend tout l'espace à gauche du lien, en dégradé */
.footer-sep {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  height: 2px !important;
  min-height: 2px !important;
  padding: 0 !important;
  margin: 0 16px 0 0 !important;
  border: 0 !important;                 /* supprime l'ancien trait du thème */
  box-shadow: none !important;
  background: none !important;          /* réinitialise l'ancien fond */
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.85) 100%
  ) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
}

/* 5. « Plan du site » : à droite, sur la même ligne que le trait */
.footer-link {
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
}

.footer-link ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link li {
  line-height: 1;
}

.footer-link a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.footer-link a:hover {
  color: #fff;
  text-decoration: underline;
}


/* ===== BOUTON RETOUR EN HAUT ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(to bottom, #e0161b, #a80c10);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;

  /* caché par défaut */
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, box-shadow 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

.back-to-top:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}


/* Formulaire Formidable
----------------------------------*/
.formulaire_formidable legend {
  width: auto;
}
.formulaire_formidable .date, .formulaire_spip label {
  margin-top: 0;
  display:inline;
}
.formulaire_formidable .boutons .submit {
    background: #1e5aa8;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.7em 1.8em;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.formulaire_formidable .boutons .submit:hover,
.formulaire_formidable .boutons .submit:focus {
    background: #143f78;
}

/* Centrer le bouton */
.formulaire_formidable .boutons {
    text-align: center;
}



/* Général
----------------------------------*/
.border-2 { border-width: 2px !important; }
.border-3 { border-width: 3px !important; }
.border-4 { border-width: 4px !important; }
.border-5 { border-width: 5px !important; }


/* layout
----------------------------------*/
@media (max-width: 576px) {
	.header-main {
		height:24.8vw;
	}
  .footer-logos {
    padding: 0 2px;
  }
}

@media (min-width: 576px) {
	.header-main {
		height:138px;
	}
}

@media (min-width: 768px) {
	.header-main {
		height:184px;
	}
  .content-sidebar {
    padding:0 15px;
    margin-top: 0;
  }
}

@media (min-width: 992px) {
	.header-main {
		height:239px;
	}
}

@media (min-width: 1200px) {
	.header-main {
		height:292px;
	}
}