/*
 * FLATCARGO - MOBILE BLOG TYPOGRAPHY V4.1
 * ---------------------------------------
 * Articles WordPress FR / EN
 * Responsive mobile : max-width 767px
 * WPCode : TEST UNIQUEMENT - INACTIF
 * Aucun changement desktop
 *
 * Objectifs :
 * - Titres plus compacts
 * - Paragraphes lisibles à 15px
 * - Encadrés mieux proportionnés
 * - Conserver les couleurs et polices
 * - Préserver les tableaux et boutons CTA
 * - Corriger les blocs statistiques FR / EN
 */

@media screen and (max-width: 767px) {

  /* ====================================
     1. TITRES PRINCIPAUX H1
     ==================================== */

  body.single-post .elementor-widget-theme-post-title h1,
  body.single-post .elementor-widget-theme-post-title .elementor-heading-title,
  body.single-post .elementor-widget-heading h1.elementor-heading-title,
  body.single-post .elementor-widget-html h1,
  body.single-post .elementor-widget-text-editor h1,
  body.single-post .elementor-widget-theme-post-content h1,
  body.single-post .entry-content h1,
  body.single-post .fc-h1 {
    font-size: clamp(25px, 6.5vw, 28px) !important;
    line-height: 1.22 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* ====================================
     2. TITRES H2
     ==================================== */

  body.single-post
  :is(
    .elementor-widget-theme-post-content,
    .elementor-widget-html,
    .elementor-widget-text-editor,
    .elementor-widget-heading,
    .entry-content,
    .fc-wrapper,
    .fc-epal-wrapper,
    .fc-fin-wrapper,
    .fc-half-pallet-agility-wrapper
  ) h2:not(.fc-h2-final),

  body.single-post
  :is(
    .fc-h2,
    .fc-section-title,
    .fc-spec-title,
    .fc-fin-title,
    .fc-ind-title,
    .fc-tech-title,
    .fc-invest-title,
    .fc-h2-half-agility
  ):not(.fc-h2-final) {
    font-size: clamp(20px, 5.3vw, 22px) !important;
    line-height: 1.28 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* ====================================
     3. TITRES H3
     ==================================== */

  body.single-post
  :is(
    .elementor-widget-theme-post-content,
    .elementor-widget-html,
    .elementor-widget-text-editor,
    .elementor-widget-heading,
    .entry-content,
    .fc-wrapper,
    .fc-epal-wrapper,
    .fc-fin-wrapper,
    .fc-half-pallet-agility-wrapper
  ) h3,

  body.single-post
  :is(
    .fc-h3,
    .fc-fin-h3,
    .fc-h3-half-agility
  ) {
    font-size: clamp(18px, 4.6vw, 19px) !important;
    line-height: 1.35 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* ====================================
     4. TITRES H4
     ==================================== */

  body.single-post
  :is(
    .elementor-widget-theme-post-content,
    .elementor-widget-html,
    .elementor-widget-text-editor,
    .elementor-widget-heading,
    .entry-content,
    .fc-wrapper,
    .fc-epal-wrapper,
    .fc-fin-wrapper,
    .fc-half-pallet-agility-wrapper
  ) h4 {
    font-size: clamp(16px, 4.3vw, 17px) !important;
    line-height: 1.4 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* ====================================
     5. PARAGRAPHES ET LISTES
     Exclure les tableaux et cartes CTA
     ==================================== */

  body.single-post
  :is(
    .elementor-widget-theme-post-content,
    .elementor-widget-html,
    .elementor-widget-text-editor,
    .entry-content,
    .fc-wrapper,
    .fc-epal-wrapper,
    .fc-fin-wrapper,
    .fc-half-pallet-agility-wrapper
  )
  :is(p, li):not(table *):not(.fc-card--cta *) {
    font-size: 15px !important;
    line-height: 1.5 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* ====================================
     6. ENCADRES DE CONTENU FLATCARGO
     Reduction des marges interieures
     Ne pas toucher aux cartes CTA
     ==================================== */

  body.single-post
  :is(
    .fc-card,
    .fc-intro-card,
    .fc-fin-card,
    .fc-agility-card,
    .fc-urban-delivery-box
  ):not(.fc-card--cta) {
    padding: 18px 16px !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* ====================================
     7. TITRES DANS LES ENCADRES
     Reduire la graisse et les espaces
     ==================================== */

  body.single-post
  :is(
    .fc-card,
    .fc-intro-card,
    .fc-fin-card,
    .fc-agility-card
  ):not(.fc-card--cta)
  :is(h2, .fc-h2):not(.fc-h2-final) {
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    margin-bottom: 14px !important;
    overflow-wrap: break-word;
  }

  body.single-post
  :is(
    .fc-card,
    .fc-intro-card,
    .fc-fin-card,
    .fc-agility-card
  ):not(.fc-card--cta)
  :is(h3, .fc-h3) {
    font-size: 18px !important;
    line-height: 1.35 !important;
    margin-top: 20px !important;
    margin-bottom: 12px !important;
    overflow-wrap: break-word;
  }

  /* ====================================
     8. ESPACEMENT DES PARAGRAPHES
     DANS LES ENCADRES
     ==================================== */

  body.single-post
  :is(
    .fc-card,
    .fc-intro-card,
    .fc-fin-card,
    .fc-agility-card
  ):not(.fc-card--cta)
  :is(p, .fc-text):not(table *) {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
    overflow-wrap: break-word;
  }

  /* ====================================
     9. CARTES D'OPTIONS
     Palette SNCF et autres articles
     ==================================== */

  body.single-post .fc-option {
    padding: 14px 16px !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.single-post .fc-option > b,
  body.single-post .fc-option > b a {
    font-size: 16px !important;
    line-height: 1.45 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* ====================================
     10. LIENS DANS LES TEXTES
     Prevenir les debordements
     ==================================== */

  body.single-post
  :is(
    .elementor-widget-theme-post-content,
    .elementor-widget-html,
    .elementor-widget-text-editor,
    .entry-content
  )
  :is(p, li):not(table *) a {
    overflow-wrap: anywhere;
  }

}

/* ==========================================
   11. CORRECTIF RESPONSIVE FR / EN

   FR : Devenir logisticien independant
   WordPress ID : 5389

   EN : Becoming an Independent
   Logistics Provider
   WordPress ID : 6144

   Objectif :
   Empiler les statistiques sur mobile.

   TEST UNIQUEMENT - WPCODE INACTIF
   ========================================== */

@media screen and (max-width: 767px) {

  /* ====================================
     11.1 GRILLE STATISTIQUES
     Une seule colonne sur mobile
     ==================================== */

  body.single-post:is(
    .postid-5389,
    .postid-6144
  ) .fc-dashboard-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* ====================================
     11.2 PREMIER BLOC STATISTIQUE

     FR : APPORT D'AFFAIRES GARANTI
     EN : BUSINESS INBOUND GUARANTEED
     ==================================== */

  body.single-post:is(
    .postid-5389,
    .postid-6144
  ) .fc-metric-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-right: 0 !important;
    padding-bottom: 20px !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    overflow-wrap: break-word;
  }

  /* ====================================
     11.3 DEUXIEME BLOC STATISTIQUE

     FR : TAUX DE REMPLISSAGE
     EN : WAREHOUSE OCCUPANCY RATE
     ==================================== */

  body.single-post:is(
    .postid-5389,
    .postid-6144
  ) .fc-data-viz {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    overflow-wrap: break-word;
  }

}

/*
 * FLATCARGO - RESPONSIVE HUB SYSTEM V4.2
 * FR : postid-5389
 * EN : postid-6144
 * Mobile uniquement
 * WPCode : conserver INACTIF
 */

@media screen and (max-width: 767px) {

  /* Conteneur sombre : hauteur adaptable */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 18px 14px !important;
    box-sizing: border-box !important;
  }

  /* Retirer les positions fixes internes */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline
  :is(.pl-header, .pl-cta, .pl-body, .pl-footer) {
    position: static !important;
  }

  /* En-tete lisible */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .pl-title {
    font-size: 12px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .pl-status {
    font-size: 10px !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere;
  }

  /* Bouton sous le titre */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .pl-cta {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    margin-top: 14px !important;
    padding: 10px 14px !important;
    font-size: 11px !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  /* Etapes et badge sur une colonne */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .pl-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
    width: 100% !important;
    margin-top: 22px !important;
  }

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline
  :is(.flow-container, .badge-container) {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Cartes des etapes */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .flow-node {
    padding: 11px 12px !important;
  }

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .node-tag {
    font-size: 10px !important;
  }

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .node-title {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .node-desc {
    font-size: 11px !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: break-word;
  }

  /* Badge 15 jours / 15 days */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .main-badge {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 14px !important;
    box-sizing: border-box !important;
  }

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .badge-big-text {
    font-size: 26px !important;
    line-height: 1.15 !important;
  }

  /* Bas du module */

  body.single-post:is(.postid-5389, .postid-6144)
  #flat-cargo-pipeline .pl-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 22px !important;
    font-size: 9px !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere;
  }

}

/*
 * FLATCARGO - FAQ STATISTICS MOBILE V4.3
 * EN : postid-6144
 * FR : postid-5389
 * Test WPCode uniquement - INACTIF
 */

@media screen and (max-width: 767px) {

  /* Grille du second encadre FAQ */

  body.single-post:is(.postid-6144, .postid-5389)
  .fc-dashboard-faq-container .fc-dashboard-metrics {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Montant : 2500 euros */

  body.single-post:is(.postid-6144, .postid-5389)
  .fc-dashboard-faq-container .fc-metric-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 16px !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-sizing: border-box !important;
  }

  /* Garantie de volume */

  body.single-post:is(.postid-6144, .postid-5389)
  .fc-dashboard-faq-container .fc-progress-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere;
  }

  /* Autoriser le retour a la ligne */

  body.single-post:is(.postid-6144, .postid-5389)
  .fc-dashboard-faq-container
  .fc-progress-box > div:first-child {
    flex-wrap: wrap !important;
  }

}