/* ==========================================================================
   Fair – Page « Formations juridiques »
   Seul fichier ajouté au thème. Reprend uniquement les codes existants :
   Calibre, bleu #1D4D66 / #123546, pilules des filtres FacetWP,
   boutons .btn-contour, panneau latéral .info_sidebar, cartes .service_box_layout.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Bandeau (bleu foncé du bandeau « services » de l'accueil)
   -------------------------------------------------------------------------- */
.f-band { padding: 50px 0 45px; background-color: #123546; color: #fff; }
.f-band .section_title { margin: 0; }
.f-band__label { margin-bottom: 20px; color: #fff; }
.f-band__label .line { background-color: rgba(255, 255, 255, 0.5); }
.f-band .big_title.f-band__title { margin-bottom: 20px; color: #fff; font-size: 80px; font-weight: 500; line-height: 0.84; }
.f-band__lead { margin-bottom: 20px; color: #DEDEDE; font-size: 30px; font-weight: 400; line-height: 1.02; }
.f-band__toggle { align-self: flex-start; padding: 0; border: 0; background: transparent; color: #fff; font-size: 20px; }
.f-band__toggle span:before { background-color: #fff; }
.f-band__toggle:hover { color: #fff; }
.f-band__toggle i { color: #fff; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.f-band__toggle:not(.collapsed) i { transform: rotate(180deg); }
.f-band__text { max-width: 640px; padding-top: 25px; font-size: 17px; line-height: 1.5; color: #DEDEDE; }
.f-band__text p { margin: 0; }

/* Colonne texte : calée en bas, alignée sur le pied des deux cartes */
.f-band__row { --bs-gutter-y: 30px; }
.f-band__intro { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 1200px) {
  .f-band__intro { padding-bottom: 8px; } /* même marge visuelle au-dessus et au-dessous du texte */
}

/* Prochaine session : carte au style des cartes formation */
.service_box_layout.f-next { display: flex; flex-direction: column; height: 100%; min-height: 0; margin: 0; padding: 28px 30px 26px; color: #fff; }
.service_box_layout.f-next:hover { transform: translateY(-6px); }
.f-next__label { font-size: 15px; letter-spacing: 4px; text-transform: uppercase; color: #cacaca; }
.f-next__label .fa { margin-right: 8px; }
.f-next__date { margin-top: 18px; font-size: 30px; line-height: 1; color: #DEDEDE; }
.f-next__date::first-letter { text-transform: uppercase; }
.f-next__title { margin: 12px 0 20px; padding-bottom: 20px; font-size: 19px; line-height: 1.25; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.f-next .btn_text { margin-top: auto; color: #fff; font-size: 20px; }
.f-next .btn_text svg path { fill: #9E9E9E; }

/* Carte Qualiopi : fond blanc pour accueillir le logo d'origine (JPG fond blanc) */
.f-quali { display: flex; flex-direction: column; height: 100%; background-color: #fff; }
.f-qualiopi { display: block; width: 100%; height: auto; padding: 18px 18px 0; }
.f-quali__links { display: flex; flex-direction: column; gap: 12px; padding: 8px 25px 22px; }
.f-quali .btn_text { color: #404040; font-size: 18px; }
.f-quali .btn_text span:before { background-color: #123546; }
.f-quali .btn_text:hover { color: #000; }
.f-quali .btn_text svg path { fill: #404040; }
.btn.f-btn-catalogue {
  margin: auto 25px 25px; padding: 20px 20px 15px;
  color: #fff; background-color: #123546; font-size: 15px;
}
.btn.f-btn-catalogue:before { background-color: #1D4D66; }
.btn.f-btn-catalogue:hover { color: #fff; }
.btn.f-btn-catalogue i { color: inherit; font-size: 15px; }

@media (min-width: 1200px) {
  .f-band .big_title.f-band__title { font-size: 80px; }
}
@media (max-width: 1199px) {
  .f-band .big_title.f-band__title { font-size: 64px; }
}

@media (max-width: 991px) {
  .f-band { padding: 35px 0 30px; }
  .f-band__row { --bs-gutter-y: 22px; }
  .f-band__label { margin-bottom: 15px; font-size: 16px; }
  .f-band .big_title.f-band__title { margin-bottom: 12px; font-size: 44px; }
  .f-band__lead { margin-bottom: 15px; font-size: 20px; }
  .f-band__toggle { font-size: 17px; }
  .f-band__text { font-size: 16px; }
}

/* Mobile : logo à gauche, liens à droite, catalogue en dessous */
@media (max-width: 767px) {
  .f-quali { display: grid; grid-template-columns: 44% 1fr; align-items: center; }
  .f-qualiopi { padding: 10px 0 0 10px; }
  .f-quali__links { gap: 10px; padding: 12px 15px 0 12px; }
  .f-quali .btn_text { font-size: 15px; line-height: 1.15; }
  .f-quali .btn_text svg { display: none; }
  .btn.f-btn-catalogue { grid-column: 1 / -1; margin: 12px 15px 15px; padding: 16px 15px 12px; }
}

/* --------------------------------------------------------------------------
   2. Barre de recherche + filtres (collante sous le header)
   -------------------------------------------------------------------------- */
/* Le thème met .body_wrap en overflow:hidden, ce qui bloque le « sticky ».
   clip coupe pareil sans bloquer (navigateurs anciens : ignoré, barre non collante). */
.page-template-formations .body_wrap { overflow: clip; }

.f-toolbar {
  position: sticky; z-index: 90; top: var(--f-header-h, 0px);
  padding: 15px 0 5px; background-color: #fff;
  transition: box-shadow 0.5s;
}
.f-toolbar.is-stuck { box-shadow: 0 8px 15px #0000000f; }

.f-toolbar__row { display: flex; gap: 10px; align-items: stretch; }
.f-search { flex: 1; margin-bottom: 0; }
.f-search input { padding-right: 60px; font-size: 18px; }
.f-search input::-webkit-search-cancel-button { display: none; }
.f-search .form_icon { cursor: pointer; font-size: 20px; }
.f-search .form_icon i { color: #000; }

.f-list-head { padding-top: 50px; }
@media (max-width: 767px) {
  .f-list-head { padding-top: 25px; }
  .f-zone .f-list-head h2 { margin-bottom: 0; font-size: 22px; }
}

/* Pilules : style exact des filtres FacetWP actuels */
.f-pills { display: flex; flex-wrap: wrap; gap: 0; padding: 6px 0; }
.f-check { position: absolute; opacity: 0; pointer-events: none; }
.f-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px; padding: 11px 25px 5px; cursor: pointer;
  background: #fff; color: #404040; border: 1px solid #d1d9e6; border-radius: 30px;
  font-size: 17px; line-height: 1.2; white-space: nowrap;
  transition: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.f-pill:hover, .f-check:checked + .f-pill { background: #1D4D66; border-color: #1D4D66; color: #fff; }
.f-check:focus-visible + .f-pill { outline: 2px solid #1D4D66; outline-offset: 2px; }
.f-check:disabled + .f-pill { opacity: 0.35; cursor: default; }
.f-n { font-size: 14px; opacity: 0.7; }
.f-n:empty { display: none; }

.f-pill--dark { margin: 0; background: #000; border-color: #000; color: #fff; }
.f-pill--dark:hover { background: #2B2B2B; border-color: #2B2B2B; color: #fff; }
.f-pill--dark i { color: #fff; font-size: 18px; margin-top: -3px; }

.f-filter-btn__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 2px 6px 0; border-radius: 11px;
  background: #fff; color: #000; font-size: 13px;
}

@media (max-width: 767px) {
  .f-pill { padding: 9px 18px 6px; font-size: 16px; }
  .f-filter-btn { padding-inline: 16px; }
  .f-search input { height: 50px; padding: 16px 40px 12px 14px; font-size: 17px; }
  .f-search .form_icon { right: 14px; font-size: 18px; }
}

/* Résultats + filtres actifs */
.f-results { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 15px; padding-top: 10px; }
.f-results__count { margin: 0; font-size: 15px; letter-spacing: 2px; text-transform: uppercase; color: #6B6B6B; }
.f-active { display: flex; flex-wrap: wrap; gap: 6px; }
.f-active:empty { display: none; }
.f-active__chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 3px; cursor: pointer;
  border: 1px solid #1D4D66; border-radius: 30px; background: #fff; color: #1D4D66; font-size: 15px;
}
.f-active__chip i { color: #1D4D66; margin: -3px 0 0; }
.f-active__chip:hover { background: #1D4D66; color: #fff; }
.f-active__chip:hover i { color: #fff; }

/* --------------------------------------------------------------------------
   3. Panneau de filtres = panneau latéral « … » du site (.info_sidebar)
   -------------------------------------------------------------------------- */
.f-drawer {
  position: fixed; z-index: 9999; top: 0; right: -420px;
  display: flex; flex-direction: column;
  width: 400px; height: 100vh; height: 100dvh;
  background-color: #123546; color: #fff;
  visibility: hidden;
  transition: right 0.6s cubic-bezier(1, 0, 0, 1), visibility 0s 0.6s;
}
.f-drawer.active { right: 0; visibility: visible; transition: right 0.6s cubic-bezier(1, 0, 0, 1); }
.f-drawer .close_btn { top: 20px; right: 30px; color: #fff; font-size: 30px; line-height: 1; position: absolute; border: 0; background: none; padding: 0; }
.f-drawer .close_btn i { transition: 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.f-drawer .close_btn:hover i { transform: rotate(360deg); }
.f-drawer .title_text { font-size: 36px; font-weight: 400; color: #fff; line-height: 1em; margin-bottom: 40px; }

.f-drawer__body { flex: 1; overflow-y: auto; padding: 100px 50px 30px; }
.f-group { margin-bottom: 35px; }
.f-group legend {
  float: none; margin-bottom: 10px; font-size: 15px; font-weight: 400; color: #cacaca;
  text-transform: uppercase; letter-spacing: 4px;
}
.f-drawer .f-pills { margin: 0 -4px; padding: 0; }
.f-drawer .f-pill { background: transparent; border-color: rgba(255, 255, 255, 0.3); color: #fff; white-space: normal; }
.f-drawer .f-pill:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.f-drawer .f-check:checked + .f-pill { background: #fff; border-color: #fff; color: #123546; }
.f-drawer .f-check:focus-visible + .f-pill { outline-color: #fff; }

.f-drawer__foot { display: flex; align-items: center; gap: 20px; padding: 20px 60px 30px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.f-drawer__reset { padding: 0; border: 0; background: none; color: #fff; font-size: 18px; text-decoration: underline; text-underline-offset: 4px; }
.btn.btn-contour.f-drawer__go { flex: 1; width: auto; color: #fff; background-color: #000; border-color: #000; padding: 20px 20px 15px; }
.btn.btn-contour.f-drawer__go:before { background-color: #2B2B2B; }
.btn.btn-contour.f-drawer__go:hover { color: #fff; background-color: #000; border-color: #2B2B2B; }

.f-drawer__overlay {
  position: fixed; inset: 0; z-index: 999; display: none;
  background: rgba(0, 0, 0, 0.8); animation: 0.5s ease-in-out 0s normal none 1 running fadeIn;
}
.f-drawer__overlay.active { display: block; }

@media (max-width: 575px) {
  .f-drawer { width: 92vw; right: -100vw; }
  .f-drawer .close_btn { right: 20px; }
  .f-drawer__body { padding: 70px 24px 20px; }
  .f-drawer .title_text { margin-bottom: 30px; }
  .f-drawer__foot { padding: 15px 24px 20px; }
}

/* --------------------------------------------------------------------------
   4. Cartes formation (module-formation actuel, 2 par ligne sur mobile)
   -------------------------------------------------------------------------- */
.card-formation-new { margin-bottom: 0; }
.card-formation-new .f-more-dates { margin: 0; font-size: 14px; color: #d2d2d2; }
.card-formation-new .f-more-dates:empty { display: none; }
.card-formation-new .btn_text { pointer-events: auto; }
.card-formation-new .service_box_layout { position: relative; min-height: 558px; padding: 50px 60px 35px 60px; }
.card-formation-new .item_title_wrap { margin-bottom: 25px; }
.card-formation-new .item_title { font-size: 30px; }
.card-formation-new .item_title a::after { content: ""; position: absolute; inset: 0; }
.card-formation-new .item_title a:focus-visible { outline: none; }
.card-formation-new .service_box_layout:focus-within { outline: 2px solid #1D4D66; outline-offset: 4px; }

/* Blocs d'infos : libellé en capitales espacées (comme « Prochaine session » du bandeau) */
.card-formation-new .f-info { margin-bottom: 20px; }
.card-formation-new .f-info__label {
  margin: 0 0 10px; font-size: 13px; line-height: 1.2; letter-spacing: 3px;
  text-transform: uppercase; color: #cacaca;
}
.card-formation-new .f-info__label .fa { margin-right: 6px; color: #cacaca; }

/* Sessions : une ligne par date, date à gauche, lieu à droite */
.card-formation-new .f-sessions { margin: 0; }
.card-formation-new .f-sessions li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 17px; line-height: 1.2; color: #fff;
}
.card-formation-new .f-sessions li:first-child { padding-top: 0; }
.card-formation-new .f-session.is-first time { font-weight: 500; }
.card-formation-new .f-session__lieu { flex-shrink: 0; font-size: 15px; color: #cacaca; text-align: right; }
.card-formation-new .f-session.is-extra { display: none; }
.card-formation-new .f-more-dates { margin: 8px 0 0; font-size: 14px; color: #cacaca; }

/* Durée */
.card-formation-new .f-info__value { margin: 0; font-size: 18px; line-height: 1.2; color: #fff; }
.card-formation-new .f-info__detail { display: block; margin-top: 4px; font-size: 14px; color: #cacaca; }

.card-formation-new .f-inter { margin: 0 0 20px; font-size: 14px; line-height: 1.3; color: #cacaca; }

@media (max-width: 767px) {
  .card-formation-new .service_box_layout { min-height: 0; padding: 20px 14px 16px; margin-bottom: 0; }
  .card-formation-new .service_box_layout:hover { transform: none; }
  .card-formation-new .item_title_wrap { margin-bottom: 14px; padding-bottom: 12px; }
  .card-formation-new .item_title { font-size: 19px; line-height: 1.1; overflow-wrap: break-word; }
  .card-formation-new .f-info { margin-bottom: 14px; }
  .card-formation-new .f-info__label { margin-bottom: 6px; font-size: 10px; letter-spacing: 2px; }
  .card-formation-new .f-info__label .fa { display: none; }
  .card-formation-new .f-session:not(.is-first) { display: none; }
  .card-formation-new .f-sessions li { display: block; padding: 0; border: 0; font-size: 15px; }
  .card-formation-new .f-session__lieu { display: block; margin-top: 2px; font-size: 14px; text-align: left; }
  .card-formation-new .f-more-dates { margin-top: 4px; font-size: 13px; }
  .card-formation-new .f-info__value { font-size: 15px; }
  .card-formation-new .f-info__detail, .card-formation-new .f-inter { display: none; }
  .card-formation-new .btn_text { margin-top: 4px; font-size: 16px; }
}

/* Aucun résultat */
.f-empty { padding: 60px 20px; text-align: center; }
.f-empty p { font-size: 26px; color: #000; }
.f-empty .btn-contour { width: auto; }

/* --------------------------------------------------------------------------
   5. Rappel « Catalogue 2027 » (mobile)
   -------------------------------------------------------------------------- */
.btn.f-float {
  position: fixed; z-index: 98; right: 15px; bottom: 15px;
  padding: 18px 22px 13px; background-color: #1D4D66; color: #fff; font-size: 15px;
  transform: translateY(150%); transition: transform 0.4s;
}
.btn.f-float:before { background-color: #000; }
.btn.f-float i { color: #fff; font-size: 15px; }
.btn.f-float:hover { color: #fff; }
.btn.f-float.is-visible { transform: none; }
.btn.f-float { box-shadow: 0 0 0 1px #fff, 0 8px 15px rgba(0, 0, 0, 0.25); }

/* --------------------------------------------------------------------------
   6. Modale catalogue
   -------------------------------------------------------------------------- */
.f-form .form_item input { color: #000; }
.f-form .form_item input::placeholder { color: #6B6B6B; }
.f-form__small { font-size: 14px; margin-bottom: 10px; }
.f-form__check { display: flex; gap: 10px; align-items: flex-start; }
.f-form__check input { margin-top: 4px; flex-shrink: 0; }
.f-form.was-validated input:invalid { border-bottom-color: red; }
.f-form.was-validated .f-form__check input:invalid + label { color: #b3261e; }

@media (max-width: 575px) {
  .f-modal-dialog { margin: 0; min-height: 100%; }
  .f-modal-dialog .modal-content { min-height: 100vh; border: 0; border-radius: 0; }
  .f-modal-dialog .modal-body, .f-modal-dialog .modal-header { padding: 1.25rem; }
  .f-modal-dialog .title_text { margin-bottom: 15px; font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .f-drawer, .f-drawer.active, .f-pill, .btn.f-float, .f-toolbar { transition: none; }
}
