/* =========================================================
   RESSOURCERIE
   Filtres, cartes, vues, recherche et ressources à la Une
   ========================================================= */

/* =========================================================
   GLOBAL
   ========================================================= */

.ccrm-ressourcerie {
  width: 100% !important;
}

/* =========================================================
   BOUTON FILTRES
   ========================================================= */

.ccrm-ressourcerie .ccrm-toggle-filtres {
  width: 100% !important;
  text-align: left !important;
  background: #eef5f7 !important;
  color: #285473 !important;
  border: none !important;
  border-radius: 18px 18px 0 0 !important;
  padding: 16px 20px !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  transition:
    background 0.45s ease,
    color 0.45s ease,
    border-radius 0.45s ease !important;
}

.ccrm-ressourcerie .ccrm-toggle-filtres:hover {
  background: #e8f1f4 !important;
}

.ccrm-ressourcerie .ccrm-toggle-filtres::before {
  content: "−" !important;
  display: inline-block !important;
  margin-right: 10px !important;
  font-weight: 900 !important;
}

.ccrm-ressourcerie .ccrm-toggle-filtres[aria-expanded="false"] {
  border-radius: 18px !important;
}

.ccrm-ressourcerie .ccrm-toggle-filtres[aria-expanded="false"]::before {
  content: "+" !important;
}

/* Quand le JS détecte le survol */
.ccrm-ressourcerie.ccrm-survol-filtres .ccrm-toggle-filtres[aria-expanded="false"] {
  border-radius: 18px 18px 0 0 !important;
}

.ccrm-ressourcerie.ccrm-survol-filtres .ccrm-toggle-filtres[aria-expanded="false"]::before {
  content: "−" !important;
}

/* =========================================================
   PANNEAU DE FILTRES
   ========================================================= */

.ccrm-ressourcerie .ccrm-filtres {
  display: block !important;
  background: #eef5f7 !important;
  border-radius: 0 0 18px 18px !important;
  padding: 0 20px 22px 20px !important;
  margin-bottom: 28px !important;
  overflow: hidden !important;
  max-height: 1400px !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  transition:
    max-height 2.4s cubic-bezier(0.19, 1, 0.22, 1),
    opacity 1.4s ease,
    transform 1.8s cubic-bezier(0.19, 1, 0.22, 1),
    padding 1.8s cubic-bezier(0.19, 1, 0.22, 1) !important;
}

.ccrm-ressourcerie .ccrm-filtres.is-closed {
  max-height: 0 !important;
  opacity: 0 !important;
  transform: translateY(-8px) !important;
  pointer-events: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 28px !important;
}

/* Ouverture au survol via classe JS */
.ccrm-ressourcerie.ccrm-survol-filtres .ccrm-filtres.is-closed {
  max-height: 900px !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  padding-top: 0 !important;
  padding-bottom: 22px !important;
  margin-bottom: 28px !important;
}

/* =========================================================
   GROUPES DE FILTRES
   ========================================================= */

.ccrm-ressourcerie .ccrm-groupes {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 28px !important;
}

.ccrm-ressourcerie .ccrm-groupe {
  text-align: center !important;
}

.ccrm-ressourcerie .ccrm-titre-groupe {
  margin: 0 0 16px 0 !important;
  color: #285473 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.ccrm-ressourcerie .ccrm-options {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
}


/* =========================================================
   RESSOURCERIE — RESSOURCES RÉSERVÉES PAR DISPOSITIF
   ========================================================= */

.ccrm-dispositifs-reserves {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin: -4px 0 16px 0;
}

.ccrm-dispositif-reserve {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    width: fit-content;

    padding: 6px 10px;

    background: #f4f9fc;

    border: 1px solid rgba(40, 84, 115, 0.18);
    border-radius: 999px;

    color: #285473;

    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.ccrm-dispositif-reserve i {
    color: #e95b45;
    font-size: 11px;
}

.ccrm-dispositif-reserve span {
    color: inherit;
}


/* Vue liste */

.ccrm-vue-liste-active .ccrm-dispositifs-reserves {
    margin-bottom: 10px;
}


/* Mobile */

@media (max-width: 767px) {

    .ccrm-dispositifs-reserves {
        gap: 6px;
        margin-bottom: 12px;
    }

    .ccrm-dispositif-reserve {
        font-size: 11px;
        padding: 5px 9px;
    }

}


/* =========================================================
   BOUTONS DE FILTRE ET ACTIONS
   ========================================================= */

.ccrm-ressourcerie .ccrm-filtre,
.ccrm-ressourcerie .ccrm-reset,
.ccrm-ressourcerie .ccrm-charger-plus {
  appearance: none !important;
  border-radius: 999px !important;
  border: 1px solid rgba(40,84,115,0.18) !important;
  background: #ffffff !important;
  color: #285473 !important;
  padding: 7px 15px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12) !important;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease !important;
}

.ccrm-ressourcerie .ccrm-filtre:hover {
  background: #285473 !important;
  color: #ffffff !important;
  border-color: #285473 !important;
  transform: translateY(-1px) !important;
}

.ccrm-ressourcerie .ccrm-filtre.is-active {
  background: #9cc540 !important;
  color: #ffffff !important;
  border-color: #7ca12f !important;
  box-shadow:
    inset 0 7px 12px rgba(0,0,0,0.35),
    0 3px 8px rgba(0,0,0,0.12) !important;
}

.ccrm-ressourcerie .ccrm-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 14px !important;
  margin-top: 22px !important;
}

.ccrm-ressourcerie .ccrm-reset {
  background: #285473 !important;
  color: #ffffff !important;
  border-color: #285473 !important;
}

.ccrm-ressourcerie .ccrm-reset:hover,
.ccrm-ressourcerie .ccrm-charger-plus:hover {
  background: #e95b45 !important;
  color: #ffffff !important;
  border-color: #e95b45 !important;
}

.ccrm-ressourcerie .ccrm-statut {
  color: #6f6f6f !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* =========================================================
   GRILLE MAÇONNERIE
   Fonctionne avec le JS du widget HTML
   ========================================================= */

.ccrm-ressourcerie .ccrm-grille {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
  grid-auto-rows: 8px !important;
  align-items: start !important;
  overflow: visible !important;
}

/* =========================================================
   CARTES
   ========================================================= */

.ccrm-ressourcerie .ccrm-carte {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18) !important;
  transform: translateY(0) scale(1) !important;
  transform-origin: center center !important;
  will-change: transform, box-shadow !important;
  transition:
    transform 1.25s cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 1.25s cubic-bezier(0.19, 1, 0.22, 1) !important;
}

.ccrm-ressourcerie .ccrm-carte:hover {
  z-index: 5 !important;
  transform: translateY(-10px) scale(1.028) !important;
  box-shadow: 0 18px 38px rgba(0,0,0,0.24) !important;
}

/* =========================================================
   IMAGE
   ========================================================= */

.ccrm-ressourcerie .ccrm-image {
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  line-height: 0 !important;
  position: relative !important;
  z-index: 2 !important;
  box-shadow: 0 8px 14px rgba(0,0,0,0.18) !important;
}

.ccrm-ressourcerie .ccrm-image img {
  display: block !important;
  width: 100% !important;
  height: 250px !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* =========================================================
   CONTENU DES CARTES
   ========================================================= */

.ccrm-ressourcerie .ccrm-contenu {
  display: block !important;
  padding: 26px 22px 22px 22px !important;
}

.ccrm-ressourcerie .ccrm-titre {
  margin: 0 0 16px 0 !important;
  color: #e95b45 !important;
  font-size: 22px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

.ccrm-ressourcerie .ccrm-titre a {
  color: inherit !important;
  text-decoration: none !important;
}

.ccrm-ressourcerie .ccrm-description {
  margin: 0 0 24px 0 !important;
  color: #6f6f6f !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
}

/* =========================================================
   TAXONOMIES / PASTILLES
   ========================================================= */

.ccrm-ressourcerie .ccrm-termes {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin-top: 20px !important;
}

.ccrm-ressourcerie .ccrm-ligne-termes {
  position: relative !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding-left: 28px !important;
}

/* Pictos orange */
.ccrm-ressourcerie .ccrm-ligne-termes::before {
  position: absolute !important;
  left: 0 !important;
  top: 2px !important;
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  color: #e95b45 !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.ccrm-ressourcerie .ccrm-ligne-termes:nth-child(1)::before {
  content: "\f02b" !important;
}

.ccrm-ressourcerie .ccrm-ligne-termes:nth-child(2)::before {
  content: "\f15c" !important;
}

.ccrm-ressourcerie .ccrm-ligne-termes:nth-child(3)::before {
  content: "\f0c0" !important;
}

.ccrm-ressourcerie .ccrm-ligne-termes:nth-child(4)::before {
  content: "\f007" !important;
}

.ccrm-ressourcerie .ccrm-label-termes {
  color: #285473 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.ccrm-ressourcerie .ccrm-terme {
  display: inline-flex !important;
  align-items: center !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: #eef4f7 !important;
  color: #285473 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

/* =========================================================
   BOUTON DES CARTES
   ========================================================= */

.ccrm-ressourcerie .ccrm-bouton {
  display: flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 24px auto 0 auto !important;
  background: #e95b45 !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  padding: 10px 26px !important;
  min-height: 0 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.14) !important;
  transition:
    transform 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease !important;
}

.ccrm-ressourcerie .ccrm-bouton:hover {
  background: #d94f3c !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18) !important;
}

/* =========================================================
   CHARGER PLUS
   ========================================================= */

.ccrm-ressourcerie .ccrm-charger-plus-wrap {
  margin-top: 28px !important;
  text-align: center !important;
}

.ccrm-ressourcerie .ccrm-charger-plus {
  background: #285473 !important;
  color: #ffffff !important;
  border-color: #285473 !important;
  padding: 11px 24px !important;
}

/* =========================================================
   AUCUN RÉSULTAT
   ========================================================= */

.ccrm-ressourcerie .ccrm-aucune {
  grid-column: 1 / -1 !important;
  background: #eef5f7 !important;
  color: #285473 !important;
  border-radius: 18px !important;
  padding: 24px !important;
  font-weight: 800 !important;
  text-align: center !important;
}

/* =========================================================
   ÉTAT CHARGEMENT
   ========================================================= */

.ccrm-ressourcerie.is-loading {
  opacity: 0.65 !important;
  pointer-events: none !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {
  .ccrm-ressourcerie .ccrm-groupes {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ccrm-ressourcerie .ccrm-grille {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }

  .ccrm-ressourcerie .ccrm-image img {
    height: 220px !important;
  }
}

@media (max-width: 767px) {
  .ccrm-ressourcerie .ccrm-groupes,
  .ccrm-ressourcerie .ccrm-grille {
    grid-template-columns: 1fr !important;
  }

  .ccrm-ressourcerie .ccrm-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  .ccrm-ressourcerie .ccrm-toggle-filtres {
    font-size: 22px !important;
  }

  .ccrm-ressourcerie .ccrm-contenu {
    padding: 22px 18px 20px 18px !important;
  }

  .ccrm-ressourcerie .ccrm-image img {
    height: 210px !important;
  }

  .ccrm-ressourcerie .ccrm-titre {
    font-size: 20px !important;
  }

  .ccrm-ressourcerie .ccrm-description {
    font-size: 15px !important;
  }
}

/* =========================================================
   Cartes ressources - disponibilité en prêt
   ========================================================= */

.ccrm-pret {
	background: #f4f9fb;
	border-left: 4px solid #9cc540;
	border-radius: 12px;
	padding: 12px 14px;
	margin: 16px 0 18px 0;
	color: #285473;
	font-size: 14px;
	line-height: 1.4;
}

.ccrm-pret-titre {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 800;
	margin-bottom: 8px;
	color: #285473;
}

.ccrm-pret-titre i {
	color: #9cc540;
	font-size: 16px;
}

.ccrm-pret-ligne {
	margin-top: 4px;
}

.ccrm-pret-ligne strong {
	font-weight: 800;
}

/* =========================================================
   Ressourcerie - barre filtres + recherche
   ========================================================= */

.ccrm-barre-filtres {
	display: flex;
	align-items: center;
	gap: 18px;
	background: #eef5f7;
	border-radius: 18px;
	padding: 0 18px 0 0;
	margin-bottom: 28px;
}

.ccrm-barre-filtres .ccrm-toggle-filtres {
	flex: 1 1 auto;
	margin: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.ccrm-recherche-wrap {
	flex: 0 0 340px;
}

.ccrm-recherche {
	width: 100%;
	height: 42px;
	border: 1px solid rgba(40, 84, 115, 0.18);
	border-radius: 6px;
	padding: 0 18px;
	font-size: 15px;
	font-weight: 600;
	color: #285473;
	background: #ffffff;
	outline: none;

	box-shadow:
		inset 0 2px 5px rgba(0, 0, 0, 0.10),
		inset 0 -1px 0 rgba(255, 255, 255, 0.65);

	transition:
		border-color 0.25s ease,
		box-shadow 0.25s ease,
		background 0.25s ease;
}

.ccrm-recherche::placeholder {
	color: rgba(40, 84, 115, 0.55);
}

.ccrm-recherche:focus {
	border-color: rgba(156, 197, 64, 0.75);
	background: #ffffff;

	box-shadow:
		inset 0 2px 6px rgba(0, 0, 0, 0.12),
		0 0 0 3px rgba(156, 197, 64, 0.18);
}

@media (max-width: 768px) {
	.ccrm-barre-filtres {
		flex-direction: column;
		align-items: stretch;
		padding: 0;
		gap: 10px;
		background: transparent;
	}

	.ccrm-barre-filtres .ccrm-toggle-filtres {
		background: #eef5f7 !important;
	}

	.ccrm-recherche-wrap {
		flex: 1 1 auto;
		width: 100%;
	}

	.ccrm-recherche {
		height: 44px;
	}
}

/* =========================================================
   Ressourcerie - recherche : champ creusé
   ========================================================= */

.ccrm-recherche,
.ccmod-recherche {
	border: 1px solid rgba(40, 84, 115, 0.14) !important;
	border-radius: 6px !important;
	background: #ffffff !important;
	color: #285473 !important;

	box-shadow:
		inset 0 2px 5px rgba(0, 0, 0, 0.14),
		inset 0 -1px 0 rgba(255, 255, 255, 0.7) !important;

	outline: none !important;
}

.ccrm-recherche:focus,
.ccmod-recherche:focus {
	border-color: rgba(156, 197, 64, 0.65) !important;

	box-shadow:
		inset 0 2px 7px rgba(0, 0, 0, 0.16),
		0 0 0 3px rgba(156, 197, 64, 0.18) !important;
}

.ccrm-recherche::placeholder,
.ccmod-recherche::placeholder {
	color: rgba(40, 84, 115, 0.45) !important;
}

/* =========================================================
   RESSOURCERIE - TRI + MODES D'AFFICHAGE
   ========================================================= */


/* ---------------------------------------------------------
   Conteneur global : tri + modes d'affichage
   --------------------------------------------------------- */

.ccrm-outils-affichage {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
}


/* ---------------------------------------------------------
   Groupes de boutons
   --------------------------------------------------------- */

.ccrm-tris,
.ccrm-vues {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;

	overflow: hidden;

	border: 1px solid rgba(40, 84, 115, 0.18);
	border-radius: 8px;

	background: #ffffff;

	box-shadow:
		0 2px 5px rgba(0, 0, 0, 0.10);
}


/* ---------------------------------------------------------
   Boutons communs
   --------------------------------------------------------- */

.ccrm-tri-bouton,
.ccrm-vue-bouton {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;

	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;

	padding: 0 !important;
	margin: 0 !important;

	border: none !important;
	border-radius: 0 !important;

	background: #ffffff !important;
	color: #285473 !important;

	box-shadow: none !important;

	cursor: pointer;

	transition:
		background 0.22s ease,
		color 0.22s ease,
		transform 0.18s ease;
}


/* ---------------------------------------------------------
   Séparateurs internes
   --------------------------------------------------------- */

.ccrm-tri-bouton + .ccrm-tri-bouton,
.ccrm-vue-bouton + .ccrm-vue-bouton {
	border-left:
		1px solid rgba(40, 84, 115, 0.18) !important;
}


/* ---------------------------------------------------------
   Survol
   --------------------------------------------------------- */

.ccrm-tri-bouton:hover,
.ccrm-vue-bouton:hover {
	background: #eef5f7 !important;
	color: #285473 !important;
}


/* ---------------------------------------------------------
   État actif
   --------------------------------------------------------- */

.ccrm-tri-bouton.is-active,
.ccrm-vue-bouton.is-active {
	background: #285473 !important;
	color: #ffffff !important;
}


/* ---------------------------------------------------------
   Icônes
   --------------------------------------------------------- */

.ccrm-tri-bouton > i,
.ccrm-vue-bouton i {
	font-size: 16px;
	line-height: 1;
}


/* Icône composée du tri par date */

.ccrm-tri-icone-date {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	gap: 4px;

	line-height: 1;
}


.ccrm-tri-icone-date .fa-calendar-alt {
	font-size: 15px;
}


.ccrm-tri-icone-date .ccrm-tri-fleche {
	font-size: 11px;

	transition:
		transform 0.18s ease;
}

/* ---------------------------------------------------------
   Petit retour visuel au clic
   --------------------------------------------------------- */

.ccrm-tri-bouton:active,
.ccrm-vue-bouton:active {
	transform: scale(0.94);
}


/* ---------------------------------------------------------
   Focus clavier
   --------------------------------------------------------- */

.ccrm-tri-bouton:focus-visible,
.ccrm-vue-bouton:focus-visible {
	position: relative;
	z-index: 2;

	outline:
		3px solid rgba(156, 197, 64, 0.45) !important;

	outline-offset: -3px;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 767px) {

	.ccrm-outils-affichage {
		gap: 8px;
	}

	.ccrm-tri-bouton,
	.ccrm-vue-bouton {
		width: 40px !important;
		height: 40px !important;
		min-width: 40px !important;
	}

}


/* =========================================================
   Ressourcerie - vue Liste
   ========================================================= */

.ccrm-ressourcerie.ccrm-vue-liste-active .ccrm-grille {
	display: flex !important;
	flex-direction: column !important;
	grid-template-columns: none !important;
	grid-auto-rows: auto !important;
	gap: 18px !important;
	align-items: stretch !important;
}

.ccrm-ressourcerie.ccrm-vue-liste-active .ccrm-carte {
	display: grid !important;
	grid-template-columns: 220px minmax(0, 1fr) !important;
	grid-template-rows: auto !important;
	flex-direction: initial !important;
	min-height: 210px !important;
	width: 100% !important;
	overflow: hidden !important;
}

.ccrm-vue-liste-active .ccrm-image {
	width: 220px !important;
	height: 160px !important;
	min-height: 0 !important;
	align-self: start !important;
	border-radius: 14px 0 0 14px !important;
	box-shadow: -6px 6px 18px -6px rgba(0, 0, 0, 0.18) !important;
}

.ccrm-vue-liste-active .ccrm-image img {
	width: 100% !important;
	height: 160px !important;
	min-height: 0 !important;
	object-fit: cover !important;
}

.ccrm-vue-liste-active .ccrm-contenu {
	padding: 20px 24px;
	gap: 10px;
}

.ccrm-vue-liste-active .ccrm-titre {
	font-size: 20px;
}

.ccrm-vue-liste-active .ccrm-description {
	line-height: 1.45;
}

.ccrm-vue-liste-active .ccrm-termes {
	gap: 7px;
}

.ccrm-vue-liste-active .ccrm-ligne-termes {
	gap: 5px;
}

.ccrm-vue-liste-active .ccrm-terme {
	padding: 4px 8px;
	font-size: 11px;
}

.ccrm-vue-liste-active .ccrm-bouton {
	position: absolute !important;
	right: 24px !important;
	top: 18px !important;
	transform: none !important;
	margin: 0 !important;
}

/* La carte globale ne dessine plus le grand rectangle blanc */
.ccrm-ressourcerie.ccrm-vue-liste-active .ccrm-carte {
	background: transparent !important;
	box-shadow: none !important;
	overflow: visible !important;
	align-items: start !important;
}

/* Le panneau blanc appartient maintenant au contenu */
.ccrm-vue-liste-active .ccrm-contenu {
	background: #ffffff !important;
	border-radius: 0 14px 14px 14px !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18) !important;
	min-height: 100% !important;
}

/* Le visuel reste accroché en haut */
.ccrm-vue-liste-active .ccrm-image {
	align-self: start !important;
}

/* =========================================================
   Ressourcerie - vue Liste mobile
   ========================================================= */

@media (max-width: 767px) {

	.ccrm-vues {
		align-self: flex-start;
	}

	.ccrm-vue-liste-active .ccrm-carte {
		display: block !important;
	}

	.ccrm-vue-liste-active .ccrm-image {
		display: none !important;
	}

	.ccrm-vue-liste-active .ccrm-contenu {
		padding: 18px !important;
		gap: 10px !important;
	}

	.ccrm-vue-liste-active .ccrm-titre {
		font-size: 19px;
	}

	.ccrm-vue-liste-active .ccrm-description {
		font-size: 14px;
		line-height: 1.4;
	}

	.ccrm-vue-liste-active .ccrm-termes {
		gap: 7px;
	}

	.ccrm-vue-liste-active .ccrm-bouton {
		align-self: flex-end;
	}
}


/* =========================================================
   RESSOURCERIE - VUE LISTE SOMMAIRE
   ========================================================= */


/* ---------------------------------------------------------
   GRILLE
   Une seule ressource par ligne
   --------------------------------------------------------- */

.ccrm-ressourcerie.ccrm-vue-sommaire-active .ccrm-grille {
	display: flex !important;
	flex-direction: column !important;
	grid-template-columns: none !important;
	grid-auto-rows: auto !important;
	gap: 12px !important;
	align-items: stretch !important;
}


/* ---------------------------------------------------------
   MINI-FICHE
   Toutes les fiches ont exactement la même hauteur
   --------------------------------------------------------- */

.ccrm-ressourcerie.ccrm-vue-sommaire-active .ccrm-carte {
	display: grid !important;
	grid-template-columns: 120px minmax(0, 1fr) !important;
	grid-template-rows: 120px !important;

	width: 100% !important;
	height: 120px !important;
	min-height: 120px !important;
	max-height: 120px !important;

	background: #ffffff !important;

	border-radius: 14px !important;
	overflow: hidden !important;

	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18) !important;
}


/* ---------------------------------------------------------
   PETIT VISUEL
   --------------------------------------------------------- */

.ccrm-vue-sommaire-active .ccrm-image {
	display: block !important;

	width: 120px !important;
	height: 120px !important;
	min-height: 120px !important;

	border-radius: 14px 0 0 14px !important;
	overflow: hidden !important;

	box-shadow: none !important;
}

.ccrm-vue-sommaire-active .ccrm-image img {
	display: block !important;

	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;

	object-fit: cover !important;
}


/* ---------------------------------------------------------
   CONTENU
   --------------------------------------------------------- */

.ccrm-vue-sommaire-active .ccrm-contenu {
	position: relative !important;

	display: block !important;

	height: 120px !important;
	min-height: 0 !important;

	/*
	 * Réserve une zone à droite pour :
	 * - le bouton "Voir la ressource"
	 * - les pastilles de dispositifs juste dessous
	 */
	padding: 14px 390px 34px 20px !important;

	background: transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;

	overflow: hidden !important;
}


/* ---------------------------------------------------------
   TITRE
   Une seule ligne
   --------------------------------------------------------- */

.ccrm-vue-sommaire-active .ccrm-titre {
	margin: 0 0 7px 0 !important;
	padding: 0 !important;

	font-size: 18px !important;
	line-height: 1.2 !important;

	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}


/* ---------------------------------------------------------
   DESCRIPTION COURTE
   Maximum 2 lignes
   --------------------------------------------------------- */

.ccrm-vue-sommaire-active .ccrm-description {
	margin: 0 !important;

	font-size: 14px !important;
	line-height: 1.4 !important;

	display: -webkit-box !important;
	-webkit-box-orient: vertical !important;
	-webkit-line-clamp: 2 !important;

	overflow: hidden !important;
}


/* ---------------------------------------------------------
   INFORMATIONS DÉTAILLÉES
   Invisibles dans cette vue
   --------------------------------------------------------- */

.ccrm-vue-sommaire-active .ccrm-termes,
.ccrm-vue-sommaire-active .ccrm-pret {
	display: none !important;
}


/* ---------------------------------------------------------
   ACCÈS RÉSERVÉ
   Sous le bouton, aligné à droite
   --------------------------------------------------------- */

.ccrm-vue-sommaire-active .ccrm-dispositifs-reserves {
	position: absolute;

	top: 62px;
	right: 16px;

	display: flex !important;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-end;

	gap: 6px;

	width: auto;
	max-width: 360px;

	margin: 0 !important;

	z-index: 2;
}

.ccrm-vue-sommaire-active .ccrm-dispositif-reserve {
	display: inline-flex;
	align-items: center;
	gap: 6px;

	width: fit-content;

	margin: 0 !important;
	padding: 5px 9px;

	background: #f4f9fc;

	border: 1px solid rgba(40, 84, 115, 0.18);
	border-radius: 999px;

	color: #285473;

	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;

	white-space: nowrap;
}

.ccrm-vue-sommaire-active .ccrm-dispositif-reserve i {
	color: #e95b45;
	font-size: 10px;
}


/* ---------------------------------------------------------
   DISPONIBILITÉ COMPACTE
   --------------------------------------------------------- */

/* Cachée par défaut dans toutes les autres vues */
.ccrm-sommaire-disponibilite {
	display: none;
}

/* Affichée uniquement dans la vue sommaire */
.ccrm-vue-sommaire-active .ccrm-sommaire-disponibilite {
	display: flex !important;
	align-items: center;
	gap: 7px;

	position: absolute;
	left: 20px;
	bottom: 12px;

	margin: 0;

	color: #285473;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.ccrm-vue-sommaire-active .ccrm-sommaire-disponibilite i {
	font-size: 14px;
}


/* Disponible : vert */

.ccrm-vue-sommaire-active
.ccrm-sommaire-disponibilite-disponible {
	color: #76a82b;
}


/* En prêt / utilisée par la structure : orange */

.ccrm-vue-sommaire-active
.ccrm-sommaire-disponibilite-pret,
.ccrm-vue-sommaire-active
.ccrm-sommaire-disponibilite-utilisation_structure {
	color: #e69a22;
}


/* Indisponible : rouge */

.ccrm-vue-sommaire-active
.ccrm-sommaire-disponibilite-indisponible {
	color: #d64545;
}


/* ---------------------------------------------------------
   BOUTON VOIR LA RESSOURCE
   En haut à droite
   --------------------------------------------------------- */

.ccrm-vue-sommaire-active .ccrm-bouton {
	position: absolute !important;

	top: 14px !important;
	right: 16px !important;

	margin: 0 !important;
	transform: none !important;

	white-space: nowrap !important;
}


/* =========================================================
   RESSOURCERIE - À LA UNE
   ========================================================= */

.ccrm-a-la-une {
    --ccrm-active-rgb: 40, 90, 125;

    position: relative;
    margin: 0 0 32px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.ccrm-a-la-une-entete {
    margin-bottom: 18px;
}

/* Titre + picto dynamiques */
.ccrm-a-la-une-titre {
    position: relative;

    display: flex;
    align-items: center;
    gap: 10px;

    width: fit-content;

    margin: 0;

    font-size: 1.5rem;
    line-height: 1.2;

    color: rgb(var(--ccrm-active-rgb)) !important;

    overflow: hidden;

    transition: color 0.45s ease;
}

.ccrm-a-la-une-titre i,
.ccrm-a-la-une-titre span {
    color: rgb(var(--ccrm-active-rgb)) !important;
    transition: color 0.45s ease;
}

/* Reflet sur le titre juste avant le changement de slide */
.ccrm-a-la-une-titre::after {
    content: "";

    position: absolute;
    top: -25%;
    bottom: -25%;
    left: -45%;

    width: 35%;

    background:
        linear-gradient(
            110deg,
            transparent 0%,
            rgba(255, 255, 255, 0.10) 20%,
            rgba(255, 255, 255, 0.85) 50%,
            rgba(255, 255, 255, 0.10) 80%,
            transparent 100%
        );

    transform: skewX(-20deg);

    opacity: 0;

    pointer-events: none;
}

.ccrm-a-la-une-titre.is-shining::after {
    animation: ccrm-reflet-a-la-une 0.65s ease forwards;
}

@keyframes ccrm-reflet-a-la-une {

    0% {
        left: -45%;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        left: 115%;
        opacity: 0;
    }
}


/* =========================================================
   VIEWPORT / TRACK
   ========================================================= */

.ccrm-a-la-une-viewport {
    overflow: hidden;
    border-radius: 18px;
}

.ccrm-a-la-une-track {
    display: flex;

    transition:
        transform 1.25s cubic-bezier(0.22, 1, 0.36, 1);

    will-change: transform;
}


/* =========================================================
   CARTE
   ========================================================= */

.ccrm-a-la-une-item {
    --ccrm-dominante-rgb: 243, 243, 243;

    position: relative;

    display: grid;
    grid-template-columns: minmax(260px, 38%) 1fr;
    gap: 26px;
    align-items: center;

    min-width: 100%;

    padding: 20px;

    border-radius: 18px;
    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(var(--ccrm-dominante-rgb), 0.22) 0%,
            rgba(var(--ccrm-dominante-rgb), 0.11) 50%,
            rgba(255, 255, 255, 0.92) 100%
        );

    border: none;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.08);
}

.ccrm-a-la-une-item::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 18% 20%,
            rgba(var(--ccrm-dominante-rgb), 0.14),
            transparent 55%
        );

    pointer-events: none;
}


/* =========================================================
   IMAGE + CONTENU
   ========================================================= */

.ccrm-a-la-une-image,
.ccrm-a-la-une-contenu {
    position: relative;
    z-index: 1;
}

.ccrm-a-la-une-image {
    display: block;

    overflow: hidden;

    border-radius: 14px;

    aspect-ratio: 16 / 9;

    background: #f3f3f3;

    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.10);
}

.ccrm-a-la-une-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.ccrm-a-la-une-contenu {
    min-width: 0;
}


/* =========================================================
   ACCROCHE
   ========================================================= */

.ccrm-a-la-une-accroche {
    display: inline-block;

    margin-bottom: 10px;

    padding: 6px 10px;

    border-radius: 999px;

    font-size: 0.82rem;
    font-weight: 700;

    background: rgba(var(--ccrm-dominante-rgb), 0.92);

    color: #fff;
}


/* =========================================================
   TITRE RESSOURCE
   ========================================================= */

.ccrm-a-la-une-nom {
    margin: 0 0 10px;

    font-size: 1.65rem;
    line-height: 1.2;
}

.ccrm-a-la-une-nom a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.ccrm-a-la-une-description {
    margin: 0 0 18px;

    line-height: 1.55;
}


/* =========================================================
   BOUTON
   ========================================================= */

.ccrm-a-la-une-bouton,
.ccrm-a-la-une-bouton:visited,
.ccrm-a-la-une-bouton:hover,
.ccrm-a-la-une-bouton:focus {
    display: flex;

    width: fit-content;

    align-items: center;
    justify-content: center;

    margin-left: auto;
    margin-right: auto;

    padding: 10px 16px;

    border-radius: 10px;

    text-decoration: none;

    font-weight: 700;

    background: rgb(var(--ccrm-dominante-rgb));

    color: #fff !important;

    box-shadow:
        0 4px 12px rgba(var(--ccrm-dominante-rgb), 0.18);

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.45s ease;
}

.ccrm-a-la-une-bouton:hover {
    transform: translateY(-1px);

    opacity: 0.92;

    box-shadow:
        0 6px 16px rgba(var(--ccrm-dominante-rgb), 0.24);
}


/* =========================================================
   NAVIGATION DU CARROUSSEL
   ========================================================= */

.ccrm-a-la-une-navigation {
    display: flex;

    align-items: center;
    justify-content: center;

    margin-top: 14px;
}


/* Flèches latérales */
.ccrm-a-la-une-prev,
.ccrm-a-la-une-next {
    position: absolute;

    top: 58%;

    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 54px;

    padding: 0;

    border: 0;
    border-radius: 16px;

    background: #285a7d;

    color: #fff;

    cursor: pointer;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.15);

    transform: translateY(-50%);

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.45s ease;
}

.ccrm-a-la-une-prev {
    left: -58px;
}

.ccrm-a-la-une-next {
    right: -58px;
}

.ccrm-a-la-une-prev:hover,
.ccrm-a-la-une-next:hover {
    transform: translateY(-50%) scale(1.06);

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.20);
}

.ccrm-a-la-une-prev i,
.ccrm-a-la-une-next i {
    color: #fff;

    font-size: 1.15rem;
}


/* =========================================================
   POINTS
   ========================================================= */

.ccrm-a-la-une-points {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;
}

.ccrm-a-la-une-point {
    width: 9px;
    height: 9px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #9ca8b1;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.ccrm-a-la-une-point.is-active {
    background: rgb(var(--ccrm-active-rgb));

    transform: scale(1.3);
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 1100px) {

    .ccrm-a-la-une-prev {
        left: 10px;
    }

    .ccrm-a-la-une-next {
        right: 10px;
    }

    .ccrm-a-la-une-prev,
    .ccrm-a-la-une-next {
        width: 40px;
        height: 50px;

        background: rgba(40, 90, 125, 0.92);
    }
}


@media (max-width: 900px) {

    .ccrm-a-la-une-item {
        grid-template-columns: 42% 1fr;

        gap: 20px;

        padding: 16px;
    }

    .ccrm-a-la-une-nom {
        font-size: 1.4rem;
    }
}


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

@media (max-width: 650px) {

    .ccrm-a-la-une {
        margin-bottom: 24px;
    }

    .ccrm-a-la-une-item {
        grid-template-columns: 1fr;

        gap: 16px;

        padding: 14px;
    }

    .ccrm-a-la-une-image {
        width: 100%;
    }

    .ccrm-a-la-une-nom {
        font-size: 1.25rem;
    }

    .ccrm-a-la-une-bouton,
    .ccrm-a-la-une-bouton:visited,
    .ccrm-a-la-une-bouton:hover,
    .ccrm-a-la-une-bouton:focus {
        width: 100%;

        margin-left: 0;
        margin-right: 0;
    }

    .ccrm-a-la-une-prev,
    .ccrm-a-la-une-next {
        top: 42%;

        width: 36px;
        height: 44px;
    }

    .ccrm-a-la-une-prev {
        left: 8px;
    }

    .ccrm-a-la-une-next {
        right: 8px;
    }
}

