/*
Theme Name: Formation Covering V2
Description: Thème WordPress de Formation Covering avec les guides et le calendrier FC Booking.
Version: 1.0.25
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: formation-covering-v2
*/

/* Avoid a visible fallback font swap in the page banners. */
@font-face {
  font-family: "FC Hero Barlow";
  src: url("site/assets/fonts/barlow-condensed-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: block;
}

@font-face {
  font-family: "FC Hero Manrope";
  src: url("site/assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: block;
}

:is(.hero-banner, .fppf-hero, .ed-hero, .ent-hero, .story-banner) {
  --display: "FC Hero Barlow", Barlow, "Arial Narrow", sans-serif;
  --body: "FC Hero Manrope", Manrope, Arial, sans-serif;
  font-family: var(--body);
}

.site-header {
  background: #fff;
}

/* Match the photo captions on the company training page. */
:is(
  .fppf-media,
  .dt-centre-photo,
  .dt-inclus-photo,
  .dt-techniques-photos > figure,
  .perfectionnement-course-page .ed-media
):has(> figcaption),
#programme.vitres-programme .vitres-programme-photo {
  border-radius: 12px;
  overflow: hidden;
}

:is(
  .fppf-media,
  .dt-centre-photo,
  .dt-inclus-photo,
  .dt-techniques-photos > figure,
  .perfectionnement-course-page .ed-media
):has(> figcaption) > :is(img, .ed-annotation-frame) {
  border-radius: 0;
}

:is(
  .fppf-media,
  .dt-centre-photo,
  .dt-inclus-photo,
  .dt-techniques-photos > figure,
  .perfectionnement-course-page .ed-media
) > figcaption,
#programme.vitres-programme .vitres-programme-photo > figcaption {
  max-width: none;
  margin: 0;
  padding: 8px 11px;
  border: 0;
  border-inline-start: 3px solid #00796b;
  border-radius: 0 0 12px 12px;
  background-color: #eaf1ec;
  color: #33493e;
  font: 400 12px/1.6 var(--body);
  text-align: start;
}

.fcv2-native-content {
  padding-block: 42px 72px;
  overflow-wrap: anywhere;
}

.fcv2-native-content h1 {
  margin-bottom: 22px;
  font: 700 clamp(32px, 5vw, 58px)/1.02 var(--display);
}

.fcv2-native-content .woocommerce {
  width: 100%;
}

#calendrier {
  scroll-margin-top: 85px;
}

/* Use the same single-column calendar intro as the PPF course. */
.covering-course-page #calendrier .ppf-booking-intro-centered {
  display: block;
  max-width: 940px;
  margin: 0 auto 36px;
}

html.ppf-html.fcv2-course {
  --fcv2-admin-offset: 0px;
  --fcv2-header-height: 85px;
  --fcv2-course-nav-height: 63px;
  --fcv2-header-bottom: calc(var(--fcv2-admin-offset) + var(--fcv2-header-height));
  scroll-padding-top: calc(var(--fcv2-header-bottom) + var(--fcv2-course-nav-height));
}

.fcv2-course .site-header {
  top: var(--fcv2-admin-offset);
}

.fcv2-course .fppf-nav {
  top: var(--fcv2-header-bottom);
}

.fcv2-course #calendrier {
  scroll-margin-top: 0;
}

@media (max-width: 1000px) {
  html.ppf-html.fcv2-course { --fcv2-header-height: 83px; }
}

@media (max-width: 800px) {
  html.ppf-html.fcv2-course { --fcv2-course-nav-height: 0px; }
}

@media (max-width: 600px) {
  html.ppf-html.fcv2-course { --fcv2-header-height: 75px; }
  .covering-course-page #calendrier .ppf-booking-intro-centered { margin-bottom: 28px; }
}

/* The preserved Elementor page stylesheet sets all h3 elements to 22px. */
.covering-course-page .footer-main nav h3 {
  font-size: 10px !important;
  line-height: 1.6 !important;
}

/* CookieYes keeps its consent controls; the theme supplies their presentation. */
body.wp-theme-formation-covering-v2 .cky-consent-container,
body.wp-theme-formation-covering-v2 .cky-modal,
body.wp-theme-formation-covering-v2 .cky-btn-revisit-wrapper {
  font-family: var(--body, Manrope, Arial, sans-serif);
}

body.wp-theme-formation-covering-v2 .cky-consent-container.cky-box-bottom-left {
  width: 460px;
  max-width: calc(100vw - 48px);
  left: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-consent-bar {
  max-height: calc(100dvh - 48px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid #d8dfd9 !important;
  border-top: 3px solid #00796b !important;
  border-radius: 14px;
  background: #fff !important;
  box-shadow: 0 12px 40px rgb(16 26 22 / 18%);
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-title {
  margin: 0 0 8px;
  color: #14201c !important;
  font: 700 16px/1.4 var(--body, Manrope, Arial, sans-serif);
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-notice-des,
body.wp-theme-formation-covering-v2 .cky-consent-container .cky-notice-des p {
  margin: 0;
  padding: 0;
  color: #52645a !important;
  font: 400 13px/1.55 var(--body, Manrope, Arial, sans-serif);
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-notice-btn-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-btn,
body.wp-theme-formation-covering-v2 .cky-modal .cky-btn {
  order: 0;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #00796b !important;
  border-radius: 6px;
  color: #fff !important;
  background: #00796b !important;
  font: 700 13px/1.4 var(--body, Manrope, Arial, sans-serif);
  box-shadow: none;
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-btn:hover,
body.wp-theme-formation-covering-v2 .cky-modal .cky-btn:hover {
  background: #005d52 !important;
  border-color: #005d52 !important;
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-btn-customize {
  grid-column: 1 / -1;
  min-height: 32px;
  padding: 5px 8px;
  border-color: transparent !important;
  color: #005d52 !important;
  background: transparent !important;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-btn-customize:hover {
  border-color: transparent !important;
  background: #eaf1ec !important;
}

body.wp-theme-formation-covering-v2 .cky-consent-container .cky-btn:focus-visible,
body.wp-theme-formation-covering-v2 .cky-modal :is(button, input, a):focus-visible,
body.wp-theme-formation-covering-v2 .cky-btn-revisit:focus-visible {
  outline: 3px solid #86cbb9;
  outline-offset: 3px;
}

body.wp-theme-formation-covering-v2 .cky-modal {
  width: min(720px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  border-radius: 14px;
  background: transparent !important;
  box-shadow: none;
}

body.wp-theme-formation-covering-v2 .cky-modal,
body.wp-theme-formation-covering-v2 .cky-modal.cky-modal-open {
  transition: none;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-preference-center {
  width: 100%;
  max-height: min(84dvh, 760px);
  overflow: hidden;
  border: 1px solid #d8dfd9 !important;
  border-radius: 14px;
  background: #fff !important;
  box-shadow: 0 16px 48px rgb(16 26 22 / 24%);
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-preference-header {
  flex-shrink: 0;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #d8dfd9;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-preference-title {
  color: #14201c !important;
  font: 700 18px/1.4 var(--body, Manrope, Arial, sans-serif);
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-preference-body-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.wp-theme-formation-covering-v2 .cky-modal :is(.cky-preference-content-wrapper, .cky-accordion-header-des),
body.wp-theme-formation-covering-v2 .cky-modal :is(.cky-preference-content-wrapper, .cky-accordion-header-des) p {
  color: #52645a !important;
  font: 400 13px/1.6 var(--body, Manrope, Arial, sans-serif);
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-accordion-btn {
  color: #14201c !important;
  font: 700 14px/1.5 var(--body, Manrope, Arial, sans-serif);
}

body.wp-theme-formation-covering-v2 .cky-modal :is(.cky-always-active, .cky-show-desc-btn) {
  color: #00796b !important;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-switch input:checked + .cky-switch-slider {
  background: #00796b !important;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-footer-wrapper {
  position: relative;
  flex-shrink: 0;
  padding: 14px 20px;
  border-top: 1px solid #d8dfd9;
  background: #fff;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-prefrence-btn-wrapper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-footer-shadow {
  right: 0;
  left: 0;
  width: 100%;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-btn-preferences {
  color: #005d52 !important;
  border-color: #bdd9cd !important;
  background: #eaf1ec !important;
}

body.wp-theme-formation-covering-v2 .cky-modal .cky-btn-preferences:hover {
  border-color: #9ac8b7 !important;
  background: #d4e8df !important;
}

body.wp-theme-formation-covering-v2 .cky-btn-revisit-wrapper {
  border: 1px solid #005d52;
  background: #00796b !important;
  box-shadow: 0 4px 14px rgb(16 26 22 / 16%);
}

@media (max-width: 600px) {
  .covering-course-page .footer-main nav h3 { font-size: 9px !important; }

  body.wp-theme-formation-covering-v2 .cky-consent-container.cky-box-bottom-left {
    right: 10px;
    left: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
  }

  body.wp-theme-formation-covering-v2 .cky-consent-container .cky-consent-bar {
    max-height: calc(100dvh - 20px);
    padding: 14px;
    border-radius: 12px;
  }

  body.wp-theme-formation-covering-v2 .cky-modal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
  body.wp-theme-formation-covering-v2 .cky-modal .cky-preference-header { padding: 14px; }
  body.wp-theme-formation-covering-v2 .cky-modal .cky-preference-title { font-size: 16px; }
  body.wp-theme-formation-covering-v2 .cky-modal .cky-preference-body-wrapper { padding: 14px; }
  body.wp-theme-formation-covering-v2 .cky-modal .cky-footer-wrapper { padding: 12px 14px; }
  body.wp-theme-formation-covering-v2 .cky-modal .cky-prefrence-btn-wrapper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.wp-theme-formation-covering-v2 .cky-modal .cky-btn-preferences { grid-column: 1 / -1; }
}


/* Components scoped to pages revised in the November 2026 editorial audit. */
.audit-editorial .audit-panel {
  margin-block: 26px;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid #cfddd5;
  border-inline-start: 3px solid #00796b;
  border-radius: 0 12px 12px 0;
  background: #f0f5f2;
  color: #283c33;
}
.audit-editorial .audit-panel > :first-child { margin-top: 0; }
.audit-editorial .audit-panel > :last-child { margin-bottom: 0; }
.audit-editorial .audit-panel h3 { margin-block: 0 12px; color: #142c24; font-size: clamp(20px, 2.1vw, 26px); line-height: 1.3; }
.audit-editorial .audit-panel p + p { margin-top: 14px; }
.audit-editorial .audit-panel .eyebrow { margin-bottom: 10px; }
.audit-editorial .audit-table-wrap { margin-block: 20px; }
.audit-editorial .audit-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.65; }
.audit-editorial .audit-table caption { text-align: left; padding: 0 0 12px; color: #173b30; font-weight: 750; }
.audit-editorial .audit-table :is(th, td) { padding: 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #ccddd3; }
.audit-editorial .audit-table thead th { background: #e3eee8; color: #173b30; }
.audit-editorial .audit-table tbody th { color: #006c5e; }
.audit-editorial .audit-table-label { display: none; }
.audit-editorial .audit-steps { margin-block: 22px; padding-inline-start: 24px; }
.audit-editorial .audit-steps li + li { margin-top: 12px; }
.audit-editorial .story-section > p + p { margin-top: 19px; }
.audit-editorial .story-section > :is(ul, ol, dl) { margin-block: 18px; }
.audit-editorial .story-section > :is(ul, ol) > li + li { margin-top: 11px; }
.audit-editorial .story-body strong { font-weight: 800; }
.audit-editorial .story-heading > p:not(.eyebrow) { max-width: 70ch; }
@media (max-width: 600px) {
  .audit-editorial .audit-panel { padding: 18px 16px; }
  .audit-editorial .audit-table,
  .audit-editorial .audit-table :is(caption, tbody, tr, th, td) { display: block; min-width: 0; }
  .audit-editorial .audit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .audit-editorial .audit-table tr { margin-bottom: 14px; padding: 12px 14px; border: 1px solid #ccddd3; border-radius: 8px; background: #fff; }
  .audit-editorial .audit-table :is(th, td) { padding: 6px 0; border: 0; }
  .audit-editorial .audit-table-label { display: block; color: #52685b; font-size: 12px; font-weight: 800; }
  .audit-editorial .story-section > p + p { margin-top: 20px; }
  .audit-editorial .story-heading > p:not(.eyebrow) { text-align: left; line-height: 1.65; }
}


.audit-editorial .audit-trainer-profiles .ed-profile .ed-media {
  overflow: hidden; border-radius: 10px; background: #edf4ef;
}
.audit-editorial .audit-trainer-profiles .ed-profile .ed-media img {
  display: block; border-radius: 0;
}
.audit-editorial .audit-trainer-profiles .ed-profile .ed-media figcaption {
  display: block; margin: 0; padding: 9px 11px; color: #425f51; font-size: 12px; line-height: 1.5;
}
@media (max-width: 780px) {
  .audit-editorial .audit-trainer-profiles .ed-profile .ed-media {
    float: none; width: 100%; margin: 0 0 18px;
  }
  .audit-editorial .audit-trainer-profiles .ed-profile img {
    width: 100%; aspect-ratio: 8 / 5; object-fit: cover;
  }
}


/* Native checkout, account and booking utility screens use the V2 identity. */
.fcv2-native-surface { background: #f8faf7; color: #142c24; }
.fcv2-commerce-content { max-width: 1120px; padding-block: clamp(28px, 4vw, 56px); }
.fcv2-commerce-page .woocommerce { color: #283c33; }
.fcv2-commerce-page .woocommerce a { color: #00796b; }
.fcv2-commerce-page :is(h1,h2,h3) { color: #142c24; }
.fcv2-commerce-page .ed-hero h1 { color: #fff; }
.fcv2-commerce-page .woocommerce :is(.shop_table,.woocommerce-customer-details address) { border: 1px solid #d1ded6; border-radius: 10px; background: #fff; }
.fcv2-commerce-page .woocommerce .shop_table th { color: #173b30; background: #edf4ef; }
.fcv2-commerce-page .woocommerce .shop_table :is(th,td) { padding: 14px 16px; border-color: #d1ded6; }
.fcv2-commerce-page .woocommerce .product-name { overflow-wrap: anywhere; }
.fcv2-commerce-page .woocommerce #payment { border: 1px solid #d1ded6; border-radius: 12px; background: #fff; padding: 8px 16px; }
.fcv2-commerce-page .woocommerce #payment ul.payment_methods { border-color: #d1ded6; padding-inline: 0; }
.fcv2-commerce-page .woocommerce #payment div.payment_box { color: #283c33; background: #edf4ef; border-radius: 8px; }
.fcv2-commerce-page .woocommerce #payment div.payment_box::before { border-bottom-color: #edf4ef; }
.fcv2-commerce-page .woocommerce #payment div.form-row { padding-inline: 0; }
.fcv2-commerce-page .woocommerce :is(.button,button.button,input.button),
.fcv2-commerce-page .woocommerce #payment #place_order,
.fcv2-commerce-page .fcb-btn { border: 1px solid #00796b; border-radius: 6px; color: #fff; background: #00796b; padding: 14px 22px; font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1.4; text-transform: none; letter-spacing: normal; }
.fcv2-commerce-page .woocommerce :is(.button,button.button,input.button):hover,
.fcv2-commerce-page .woocommerce #payment #place_order:hover { color: #fff; background: #005e52; border-color: #005e52; }
.fcv2-commerce-page .woocommerce form .form-row :is(.input-text,select),
.fcv2-commerce-page .woocommerce select { min-height: 46px; padding: 10px 12px; border: 1px solid #9ebbad; border-radius: 6px; color: #142c24; background: #fff; font: inherit; }
.fcv2-commerce-page .woocommerce input:is([type="radio"],[type="checkbox"]) { width: auto; min-width: 0; height: auto; min-height: 0; accent-color: #00796b; }
.fcv2-commerce-page .woocommerce :is(.woocommerce-info,.woocommerce-message) { border-top-color: #00796b; background: #edf4ef; color: #173b30; }
.fcv2-commerce-page .woocommerce :is(.woocommerce-info,.woocommerce-message)::before { color: #00796b; }
.fcv2-commerce-page .woocommerce .woocommerce-error { border-top-color: #9b423b; background: #fff5f3; color: #792820; }
.fcv2-commerce-page .woocommerce form :is(input,select,button,a):focus-visible { outline: 2px solid #00796b; outline-offset: 3px; }
.fcv2-commerce-page .woocommerce .woocommerce-terms-and-conditions-wrapper { line-height: 1.6; }
@media (max-width: 600px) {
  .fcv2-commerce-content { width: calc(100% - 32px); }
  .fcv2-commerce-page .woocommerce .shop_table :is(th,td) { padding: 10px 8px; font-size: 14px; }
  .fcv2-commerce-page .woocommerce #payment { padding-inline: 12px; }
  .fcv2-commerce-page .woocommerce #payment #place_order { width: 100%; float: none; }
  .fcv2-commerce-page .woocommerce .col2-set :is(.col-1,.col-2) { width: 100%; float: none; }
}

/* Keep portrait editorial photos readable in imported articles as well as guides. */
.audit-editorial .story-body .story-photo-tall { max-width: 490px; margin-inline: auto; }

/* Keep native WooCommerce utility screens and their shell buttons in the site palette. */
.fcv2-native-surface a.button { color: #fff; background: #00796b; border-color: #00796b; }
.fcv2-native-surface a.button:hover { color: #fff; background: #005e52; border-color: #005e52; }
.fcv2-commerce-page a.button { font-family: inherit; font-size: 14px; font-weight: 800; text-transform: none; letter-spacing: normal; padding: 14px 22px; line-height: 1.4; border-radius: 6px; }

/* Compact product records orient visitors to sessions in the same palette. */
.fcv2-commerce-page div.product.fcv2-booking-product .price { color: #00796b; font-weight: 800; }
.fcv2-commerce-page div.product.fcv2-booking-product-no-image div.summary { float: none; width: 100%; }
.audit-product section > p + p { margin-top: 16px; }
.audit-product section > h2 { margin-block: 24px 12px; }

/* Limit line length when a booking product has no gallery. */
.fcv2-commerce-page div.product.fcv2-booking-product-no-image div.summary { max-width: 900px; margin-inline: auto; }
.fcv2-commerce-page div.product.fcv2-booking-product-no-image .woocommerce-tabs { max-width: 900px; margin-inline: auto; }

/* Preserve paragraph spacing in the approved article introductions. */
.story-guide .story-introduction {
  margin-block-end: 32px;
}
.story-guide .story-introduction > p + p {
  margin-block-start: 12px;
}

/* Article flow: use whitespace between sections instead of divider rules. */
.story-guide .story-section + .story-section {
  margin-top: 36px;
  padding-top: 0;
  border-top: 0;
}

/* Keep the approved training heading and paragraph together as a single card. */
.story-guide .story-body .story-section:last-child > hr:has(+ :is(h2, h3) + p > a[href*="/formation-"]) {
  display: none;
}

.story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"]) {
  margin: 36px 0 0;
  padding: 28px 30px 12px;
  border: 1px solid #c9ded3;
  border-bottom: 0;
  border-left: 4px solid #00796b;
  border-radius: 20px 20px 0 0;
  background: #eef6f1;
  color: #123d33;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.15;
}

.story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"])::before {
  display: block;
  margin-bottom: 10px;
  color: #00796b;
  font-family: var(--body), Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  content: "Passez à la pratique";
}

.story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"]) + p {
  margin: 0;
  padding: 0 30px 30px;
  border: 1px solid #c9ded3;
  border-top: 0;
  border-left: 4px solid #00796b;
  border-radius: 0 0 20px 20px;
  background: #eef6f1;
  color: #243e34;
  font-size: 16px;
  line-height: 1.8;
}

.story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"]) + p > a {
  color: #006b5c;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"]) + p > a:hover {
  color: #003e35;
}

.story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"]) + p > a:focus-visible {
  outline: 2px solid #00796b;
  outline-offset: 4px;
  border-radius: 2px;
}

@media (max-width: 600px) {
  .story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"]) {
    padding: 22px 20px 12px;
    font-size: 28px;
  }

  .story-guide .story-body .story-section:last-child > :is(h2, h3):has(+ p > a[href*="/formation-"]) + p {
    padding: 0 20px 24px;
    line-height: 1.75;
  }
}
