/* ============================================================
   TAXONOMY: categorie_formation — CSS SCOPÉ
   ============================================================ */

/* ============================================================
   1) CONTAINER GLOBAL
   ============================================================ */

.tax-categorie-formation .container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

/* ============================================================
   2) BOUTONS LOCAUX (SANS ARRONDI)
   ============================================================ */

.tax-categorie-formation .btn-primary {
  background: #d6a743;
  color: white;
}
.tax-categorie-formation .btn-primary:hover {
  color: #264154;
  background: #d6a743;
}

.tax-categorie-formation .btn-ghost {
  background: #264154;
  color: white;
}
.tax-categorie-formation .btn-ghost:hover {
  color: #d6a743;
  background: #264154;
}

/* ============================================================
   3) HERO
   ============================================================ */

.tax-categorie-formation .tax-hero {
  position: relative;
  min-height: 38vh;
  display: grid;
  align-items: end;
  padding: 2.4rem 0;
  color: #fff;
  background: #1f2a33;
  overflow: clip;
}
.tax-categorie-formation .tax-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: saturate(0.95) contrast(1.05);
}
.tax-categorie-formation .tax-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.36));
}
.tax-categorie-formation .tax-hero .container {
  position: relative;
  z-index: 2;
}

/* Fil d’ariane */
.tax-categorie-formation .breadcrumbs {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}
.tax-categorie-formation .breadcrumbs a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.tax-categorie-formation .breadcrumbs a:hover {
  border-bottom-color: #ffffff66;
}

/* Titre + Accroche */
.tax-categorie-formation .tax-title {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin: 0.2rem 0 0.35rem;
}
.tax-categorie-formation .tax-accroche {
  margin: 0.2rem 0 0;
  color: #ffffffd6;
  font-size: 1.25rem;
  max-width: 880px;
}

/* ============================================================
   4) BLOCS CONTENU (DESCRIPTION + SECTIONS)
   ============================================================ */

.tax-categorie-formation .tax-block {
  padding: 1.2rem 0;
}
.tax-categorie-formation .tax-block--description {
  padding-top: 1.4rem;
}

.tax-categorie-formation .tax-desc {
  max-width: 880px;
  color: #2d3a43;
  opacity: 0.98;
}
.tax-categorie-formation .tax-desc p {
  margin: 0.55rem 0;
}

/* Sections (dont "Public ciblé") */
.tax-categorie-formation .tax-section,
.tax-categorie-formation .tax-section--public-cible {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #e9e6e2;
  max-width: 880px;
}
.tax-categorie-formation .tax-section__title {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  color: #264154;
  letter-spacing: 0.01em;
}
.tax-categorie-formation .tax-section__body {
  color: #2d3a43;
  line-height: 1.6;
}
.tax-categorie-formation .tax-section__body p {
  margin: 0.45rem 0;
}
.tax-categorie-formation .tax-section__body ul {
  margin: 0.4rem 0 0.6rem 1.2rem;
  list-style: disc;
}
.tax-categorie-formation .tax-section__body ol {
  margin: 0.4rem 0 0.6rem 1.2rem;
}

/* ============================================================
   5) LISTING FORMATIONS & CARDS (DESKTOP)
   ============================================================ */

.tax-categorie-formation .tax-listing {
  padding: 2rem 0;
}

/* Grille par défaut (desktop/tablette) */
.tax-categorie-formation .cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 980px) {
  .tax-categorie-formation .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .tax-categorie-formation .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Carte */
.tax-categorie-formation .card {
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
  overflow: clip;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}
.tax-categorie-formation .card:hover {
  transform: translateY(-3px);
}

/* Média des cartes */
.tax-categorie-formation .card__media {
  display: block;
  aspect-ratio: 16/10;
  background: #e9ecef;
  overflow: hidden;
}
.tax-categorie-formation .js-hover-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tax-categorie-formation .card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tax-categorie-formation .card__placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #dfe6eb, #f3f6f8);
}

/* Corps de carte */
.tax-categorie-formation .card__body {
  padding: 1rem;
}
.tax-categorie-formation .card__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: #264154;
}
.tax-categorie-formation .card__title a {
  color: inherit;
  text-decoration: none;
}

/* Meta de la carte : niveau + bouton */
.tax-categorie-formation .card__meta {
  display: flex;
  flex-direction: column; /* empile le niveau et le bouton */
  align-items: flex-start; /* aligne à gauche */
  gap: 0.35rem; /* petit espace entre les deux */
  font-size: 0.95rem;
  color: #2d3a43;
  margin: 0.2rem 0 0;
}
.tax-categorie-formation .card__meta .meta {
  display: inline-block;
}
.tax-categorie-formation .card__meta .meta strong {
  font-weight: 700;
}

.tax-categorie-formation .card__link {
  align-self: flex-start;
  margin-top: 0;
  display: inline-block;
  background: #f1ece5;
  color: #264154;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}
.tax-categorie-formation .card__link:hover {
  opacity: 0.9;
}

/* ============================================================
   5ter) EFFET VISUEL CARDS (overlay seulement, pas de drift)
   ============================================================ */

/* Conteneur média : position relative */
.tax-categorie-formation .card__media {
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  background: #e9ecef;
  overflow: hidden;
  isolation: isolate;
}

/* Dégradé sombre overlay par-dessus vidéo/image */
.tax-categorie-formation .card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.35) 65%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Vidéo et image : z-index sous l'overlay */
.tax-categorie-formation .js-hover-video,
.tax-categorie-formation .card__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

/* Hover desktop : zoom léger sur vidéo/image */
@media (hover: hover) and (pointer: fine) {
  .tax-categorie-formation .card:hover .js-hover-video,
  .tax-categorie-formation .card:hover .card__img {
    transform: scale(1.05);
    filter: brightness(0.95);
  }

  .tax-categorie-formation .card:hover .card__media::after {
    opacity: 0.8;
  }
}

/* Motion réduite : pas de transition */
@media (prefers-reduced-motion: reduce) {
  .tax-categorie-formation .js-hover-video,
  .tax-categorie-formation .card__img,
  .tax-categorie-formation .card__media::after {
    transition: none;
  }
}

/* ============================================================
   5ter) CARDS EN SCROLL HORIZONTAL (MOBILE)
   ============================================================ */

/* Mobile ≤ 768px : passage en carrousel horizontal */
@media (max-width: 768px) {
  .tax-categorie-formation .cards-grid {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.4rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .tax-categorie-formation .cards-grid::after {
    content: "";
    flex: 0 0 0.5rem; /* petit espace en fin de scroll */
  }

  .tax-categorie-formation .card {
    flex: 0 0 78%;
    max-width: 78%;
    scroll-snap-align: start;
  }
}

/* Mobile étroit ≤ 480px : cartes un peu plus larges + typo réduite */
@media (max-width: 480px) {
  .tax-categorie-formation .card {
    flex: 0 0 85%;
    max-width: 85%;
  }

  .tax-categorie-formation .card__body {
    padding: 0.9rem 0.9rem 0.85rem;
  }

  .tax-categorie-formation .card__title {
    font-size: 1.05rem;
  }

  .tax-categorie-formation .card__meta {
    font-size: 0.9rem;
  }

  .tax-categorie-formation .card__link {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
  }
}

/* ============================================================
   6) EFFET DE REVEAL
   ============================================================ */

.tax-categorie-formation [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.tax-categorie-formation [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   7) PAGINATION & DIVERS
   ============================================================ */

.tax-categorie-formation .pagination {
  margin: 1.2rem 0;
  display: flex;
  justify-content: center;
}
.tax-categorie-formation .pagination .page-numbers {
  display: inline-block;
  margin: 0 0.25rem;
  padding: 0.45rem 0.7rem;
  background: #fff;
  border: 1px solid #e8e6e2;
  text-decoration: none;
  color: #1f2a33;
}
.tax-categorie-formation .pagination .page-numbers.current {
  background: #264154;
  border-color: #264154;
  color: #fff;
}
.tax-categorie-formation .no-results {
  background: #fff;
  border: 1px solid #e8e6e2;
  padding: 1rem;
}
.tax-categorie-formation .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   8) MODALE FORMATIONS
   ============================================================ */

.tax-categorie-formation .aa-modal[hidden] {
  display: none;
}
.tax-categorie-formation .aa-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}
.tax-categorie-formation .aa-modal[aria-hidden="true"] {
  display: none;
}

.tax-categorie-formation .aa-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: saturate(110%) blur(1.5px);
}

/* dialog : conteneur positionné pour l'absolu */
.tax-categorie-formation .aa-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: min(840px, 92vw);
  max-height: min(86vh, 100%);
  width: 100%;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
  overflow: auto;
  padding: 1.1rem 1.15rem;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 800px) {
  .tax-categorie-formation .aa-modal__dialog {
    padding: 1.35rem 1.5rem;
  }
}

.tax-categorie-formation .aa-modal__content {
  display: grid;
  gap: 1rem;
}

/* Bouton fermer */
.tax-categorie-formation .aa-modal__close {
  position: absolute;
  top: 0.35rem;
  right: 0.55rem;
  z-index: 5;
  padding: 6px 10px;
  line-height: 1;
  font-size: 1.7rem;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #1f2a33;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
}

.tax-categorie-formation .aa-modal__close:hover,
.tax-categorie-formation .aa-modal__close:focus {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
  transform: translateY(-1px);
}
.tax-categorie-formation .aa-modal__close:focus-visible {
  box-shadow: 0 0 0 3px rgba(38, 65, 84, 0.12);
}

.tax-categorie-formation .fiche-form input.is-invalid {
  border-color: #d9534f;
}

/* Si cloné dans le contenu */
.tax-categorie-formation .aa-modal__content .aa-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  z-index: 5;
}

/* Évite que le contenu masque la croix */
.tax-categorie-formation .aa-modal__content > * {
  position: relative;
  z-index: 1;
}

/* Titres / corps */
.tax-categorie-formation .modal-hd .modal-title {
  margin: 0;
  color: #264154;
  font-size: 1.35rem;
}
.tax-categorie-formation .modal-hd .modal-subtitle {
  margin: 0.1rem 0 0;
  color: #6b7a86;
}

.tax-categorie-formation .modal-body {
  color: #2d3a43;
  line-height: 1.6;
}
.tax-categorie-formation .modal-body p {
  margin: 0.5rem 0;
}
.tax-categorie-formation .modal-body ul {
  margin: 0.4rem 0 0.6rem 1.1rem;
  list-style: disc;
}

.tax-categorie-formation .mod-section {
  padding: 0.6rem 0;
  border-top: 1px solid #eee;
}
.tax-categorie-formation .mod-section:first-child {
  border-top: 0;
  padding-top: 0;
}
.tax-categorie-formation .mod-section h4 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #264154;
  letter-spacing: 0.01em;
}
.tax-categorie-formation .mod-section .rte :where(p, ul, ol) {
  margin: 0.45rem 0;
}

.tax-categorie-formation .modal-ft {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

/* ============================================================
   MODALE FORMULAIRE
   ============================================================ */

.tax-categorie-formation .modal-ft form.wpcf7-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.6rem;
}

.tax-categorie-formation .modal-ft .wpcf7-form-control-wrap {
  flex: 1 1 220px;
}

.tax-categorie-formation .modal-ft input[type="email"] {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid #ccc;
}

.tax-categorie-formation .modal-ft input[type="submit"] {
  padding: 0.55rem 1rem;
  background: #d6a743;
  color: #fff;
  border: none;
  cursor: pointer;
}

.tax-categorie-formation .modal-ft input[type="submit"]:hover {
  color: #264154;
}

.tax-categorie-formation .wpcf7-form input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ============================================================
   9) SECTION FINALE : FINANCEMENT & ACCOMPAGNEMENT
   ============================================================ */

.container.tax-financement {
  padding: 2rem 0 2.6rem;
}
.tax-financement__box {
  background: linear-gradient(180deg, #ffffff, #faf8f5);
  border: 1px solid #ece7e0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
  padding: 1.2rem 1.2rem;
}
@media (min-width: 860px) {
  .tax-financement__box {
    padding: 1.6rem 1.8rem;
  }
}
.tax-financement__title {
  margin: 0.1rem 0 0.6rem;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  color: #264154;
}
.tax-financement__text {
  color: #2d3a43;
  max-width: 900px;
  line-height: 1.65;
}
.tax-financement__text p {
  margin: 0.45rem 0;
}
.tax-financement__cta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

/* ============================================================
   10) RESPONSIVE GLOBAL (TYPO + MARGES)
   ============================================================ */

@media (max-width: 1024px) {
  .tax-categorie-formation .tax-hero {
    padding: 2rem 0 2.2rem;
  }

  .tax-categorie-formation .tax-accroche {
    font-size: 1.12rem;
  }

  .tax-categorie-formation .tax-desc,
  .tax-categorie-formation .tax-section,
  .tax-categorie-formation .tax-section--public-cible {
    max-width: 100%;
  }

  .tax-categorie-formation .container {
    width: min(1000px, 96vw);
  }
}

@media (max-width: 768px) {
  .tax-categorie-formation .tax-hero {
    min-height: auto;
    padding: 1.8rem 0 2rem;
  }

  .tax-categorie-formation .tax-title {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
  }

  .tax-categorie-formation .tax-accroche {
    font-size: 1.02rem;
    max-width: 600px;
  }

  .tax-categorie-formation .tax-block {
    padding: 1rem 0 0.8rem;
  }

  .tax-categorie-formation .tax-desc p {
    margin: 0.5rem 0;
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .tax-categorie-formation .tax-section__body {
    font-size: 0.97rem;
  }

  .tax-categorie-formation .tax-section,
  .tax-categorie-formation .tax-section--public-cible {
    margin-top: 0.9rem;
    padding-top: 0.75rem;
  }

  .tax-categorie-formation .tax-listing {
    padding: 1.6rem 0;
  }

  .tax-financement__box {
    padding: 1.1rem 1.1rem;
  }

  .tax-financement__text {
    font-size: 0.97rem;
  }
}

@media (max-width: 480px) {
  .tax-categorie-formation .container {
    width: 100%;
    padding-inline: 0.9rem;
  }

  .tax-categorie-formation .tax-hero {
    padding: 1.6rem 0 1.9rem;
  }

  .tax-categorie-formation .tax-accroche {
    font-size: 1rem;
  }

  .tax-categorie-formation .tax-desc p,
  .tax-categorie-formation .tax-section__body {
    font-size: 0.94rem;
  }

  .tax-financement__box {
    padding: 1rem 1.05rem;
  }

  .tax-financement__cta {
    gap: 0.5rem;
  }
}