/**
 * =======================================================================
 * YONIS SHOP - CORRECTIFS RESPONSIVE DESIGN, ACCESSIBILITÉ & FLUX D'ACHAT
 * Phase 2 - Déploiement Validé : A-01, A-02, A-03, B-01, B-02, B-03,
 *                              D-01, D-02, D-03, E-01, E-02, E-03,
 *                              F-01, F-02, F-03
 * Date : 19 Octobre 2026
 * Thème : yonis2015
 * =======================================================================
 */

/* =======================================================================
 * [B-01] TUNNEL DE COMMANDE : BOUTON SUPPRIMER & ZONES TACTILES (320px-360px)
 * ======================================================================= */
@media (max-width: 480px) {
    #cart_summary .btn-cart-delete-2026,
    #cart_summary .cart_quantity_delete {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation !important;
        font-size: 18px !important;
    }
    #cart_summary .cart_quantity_button a {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation !important;
        font-size: 16px !important;
    }
}

/* =======================================================================
 * [B-02] TUNNEL DE COMMANDE : BLOC DEVIS MOBILE PLEINE LARGEUR
 * ======================================================================= */
@media (max-width: 767px) {
    #opartdevis,
    .opartdevis,
    #cart_voucher .btn-devis,
    a[href*="opartdevis"],
    a[href*="devis"].btn-devis {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 15px auto !important;
        padding: 13px 18px !important;
        background: #f7fbfe !important;
        border: 1.5px dashed #00a3e8 !important;
        border-radius: 8px !important;
        color: #0077b6 !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        text-align: center !important;
        text-decoration: none !important;
        line-height: 1.4 !important;
        transition: background 0.2s ease, border-color 0.2s ease !important;
        cursor: pointer !important;
    }
    #opartdevis:hover,
    a[href*="opartdevis"]:hover {
        background: #e8f4fd !important;
        border-color: #0077b6 !important;
        color: #005691 !important;
    }
}

/* =======================================================================
 * [A-01] FICHE PRODUIT : DÉBORDEMENT HORIZONTAL 21px SUR TABLETTE (1024px)
 * ======================================================================= */
@media (min-width: 992px) and (max-width: 1080px) {
    #primary_block,
    .primary_block {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: hidden !important;
    }
    .pb-left-column.col-md-7 {
        width: 55% !important;
        max-width: 55% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
        float: left !important;
    }
    .pb-right-column.col-md-5 {
        width: 45% !important;
        max-width: 45% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
        float: right !important;
    }
}

/* =======================================================================
 * [A-03] FICHE PRODUIT : FLÈCHES DE VIGNETTES MINIATURES MOBILES
 * ======================================================================= */
@media (max-width: 767px) {
    #views_block #view_scroll_left,
    #views_block #view_scroll_right {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
    }
}

/* =======================================================================
 * [D-01] PAGES CMS : TABLEAUX D'INFORMATIONS ET LIVRAISONS RESPONSIVE
 * ======================================================================= */
@media (max-width: 767px) {
    .rte table,
    .page-cms table,
    #cms table,
    .block-cms table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-collapse: collapse !important;
        margin-top: 15px !important;
        margin-bottom: 20px !important;
    }
    .rte table th,
    .rte table td,
    .page-cms table th,
    .page-cms table td {
        white-space: nowrap !important;
        padding: 8px 12px !important;
    }
}

/* =======================================================================
 * [D-02] BLOG : TABLEAUX ET MÉDIAS DES ARTICLES DU BLOG
 * ======================================================================= */
@media (max-width: 767px) {
    .prestablog_content table,
    #prestablog_article table,
    .comment_content table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 15px auto !important;
    }
    .prestablog_content table th,
    .prestablog_content table td {
        white-space: nowrap !important;
        padding: 8px 10px !important;
    }
    .prestablog_content img,
    .prestablog_content iframe,
    .prestablog_content video {
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}

/* =======================================================================
 * [D-03] PLAN DU SITE : ARBORESCENCE SUR MOBILE
 * ======================================================================= */
@media (max-width: 767px) {
    #sitemap .sitemap_block {
        margin-bottom: 20px !important;
    }
    #sitemap ul.tree {
        padding-left: 15px !important;
    }
    #sitemap ul.tree li {
        padding: 6px 0 !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
    #sitemap ul.tree li a {
        display: inline-block !important;
        padding: 6px 0 !important;
        font-size: 15px !important;
    }
}

/* =======================================================================
 * [F-01] TRANSVERSE : CIBLES TACTILES INTERACTIVES >= 44px
 * ======================================================================= */
@media (max-width: 767px) {
    .footer-container a,
    #footer a {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 4px 0 !important;
    }
    .pagination a,
    .pagination span {
        min-width: 44px !important;
        min-height: 44px !important;
        line-height: 42px !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .social-sharing button,
    .social-sharing a {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* =======================================================================
 * [F-02] TRANSVERSE : TYPOGRAPHIE MOBILE REHAUSSÉE À 15-16px
 * ======================================================================= */
@media (max-width: 767px) {
    p,
    .rte p,
    .product-desc,
    .editorial_block p {
        font-size: 15px !important;
        line-height: 1.55 !important;
    }
    .breadcrumb {
        font-size: 13px !important;
    }
}

/* =======================================================================
 * [F-03] MENU MOBILE : INTITULÉS LONGS & MARGE DROITE TACTILE
 * ======================================================================= */
@media (max-width: 767px) {
    .mm_menus_li .mm_menu_item_link {
        padding-right: 50px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }
    .mm_menus_li .arrow[class*="icon-angle"],
    .mm_menus_li .arrow {
        width: 46px !important;
        height: 44px !important;
        line-height: 44px !important;
        text-align: center !important;
        right: 0 !important;
    }
}

/* =======================================================================
 * [E-01] PAGE 404 : FORMULAIRE DE RECHERCHE ERGONOMIQUE
 * ======================================================================= */
@media (max-width: 767px) {
    #pagenotfound #searchbox {
        width: 100% !important;
        max-width: 360px !important;
        margin: 15px auto !important;
        display: flex !important;
    }
    #pagenotfound .search_query {
        height: 44px !important;
        font-size: 16px !important;
        flex: 1 !important;
    }
    #pagenotfound button[name="submit_search"],
    #pagenotfound .button-search {
        min-width: 44px !important;
        min-height: 44px !important;
    }
}

/* =======================================================================
 * [BUG-20261019-DCA1] STEPPER DU TUNNEL DE COMMANDE TOUTES ÉTAPES (1 à 5)
 * Cibles : Étape 1 (Panier), Étape 2 (Identification), Étape 3 (Adresses),
 *          Étape 4 (Livraison), Étape 5 (Paiement) sur mobile (< 768px)
 * ======================================================================= */
@media (max-width: 768px) {
  /* Conteneur principal */
  .order-stepper-container-2026,
  div.order-stepper-container-2026,
  body#order .order-stepper-container-2026,
  body#order-opc .order-stepper-container-2026,
  body#authentication .order-stepper-container-2026,
  body#order-confirmation .order-stepper-container-2026,
  body.order-stepper-page .order-stepper-container-2026 {
    padding: 6px 8px !important;
    margin-bottom: 16px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Liste ul */
  div.order-stepper-container-2026 ul.step,
  body#order #order_step,
  body#order-opc #order_step,
  body#authentication #order_step,
  body#order-confirmation #order_step,
  ul#order_step {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    list-style: none !important;
  }

  /* Éléments li */
  div.order-stepper-container-2026 ul.step li,
  body#order #order_step li,
  body#order-opc #order_step li,
  body#authentication #order_step li,
  body#order-confirmation #order_step li,
  #order_step li {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
    background: transparent !important;
  }

  /* 1. ÉTAPES NON-ACTIVES : MASQUER STRICTEMENT LE LIBELLÉ TEXTUEL */
  #order_step li:not(.step_current) .step-label,
  #order_step li:not(.step_current) .step-text,
  body#order #order_step li:not(.step_current) .step-label,
  body#order-opc #order_step li:not(.step_current) .step-label,
  body#authentication #order_step li:not(.step_current) .step-label,
  body#order-confirmation #order_step li:not(.step_current) .step-label,
  div.order-stepper-container-2026 ul.step li:not(.step_current) .step-label,
  #order_step li.step_done .step-label,
  #order_step li.step_done_last .step-label,
  body#authentication #order_step li.step_done .step-label,
  body#authentication #order_step li.step_done_last .step-label,
  body#order #order_step li.step_done .step-label,
  body#order #order_step li.step_done_last .step-label,
  #order_step li.step_todo .step-label,
  body#authentication #order_step li.step_todo .step-label,
  body#order #order_step li.step_todo .step-label {
    display: none !important;
  }

  /* 2. ÉTAPES COMPLÉTÉES (step_done) : CERCLE VERT COMPACT 28x28px AVEC CHECKMARK */
  body#order #order_step li.step_done .step-pill,
  body#order #order_step li.step_done_last .step-pill,
  body#order-opc #order_step li.step_done .step-pill,
  body#authentication #order_step li.step_done .step-pill,
  body#authentication #order_step li.step_done_last .step-pill,
  body#order-confirmation #order_step li.step_done .step-pill,
  div.order-stepper-container-2026 ul.step li.step_done .step-pill,
  div.order-stepper-container-2026 ul.step li.step_done_last .step-pill,
  #order_step li.step_done .step-pill,
  #order_step li.step_done_last .step-pill {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ecfdf5 !important;
    border: 1.5px solid #10b981 !important;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.2) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    text-decoration: none !important;
  }

  body#order #order_step li.step_done .step-badge,
  body#order #order_step li.step_done_last .step-badge,
  body#authentication #order_step li.step_done .step-badge,
  body#authentication #order_step li.step_done_last .step-badge,
  div.order-stepper-container-2026 ul.step li.step_done .step-badge,
  div.order-stepper-container-2026 ul.step li.step_done_last .step-badge,
  #order_step li.step_done .step-badge,
  #order_step li.step_done_last .step-badge {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #10b981 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 3. ÉTAPES À VENIR (step_todo) : CERCLE GRIS COMPACT 28x28px AVEC NUMÉRO */
  body#order #order_step li.step_todo .step-pill,
  body#order-opc #order_step li.step_todo .step-pill,
  body#authentication #order_step li.step_todo .step-pill,
  body#order-confirmation #order_step li.step_todo .step-pill,
  div.order-stepper-container-2026 ul.step li.step_todo .step-pill,
  #order_step li.step_todo .step-pill {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  body#order #order_step li.step_todo .step-badge,
  body#authentication #order_step li.step_todo .step-badge,
  div.order-stepper-container-2026 ul.step li.step_todo .step-badge,
  #order_step li.step_todo .step-badge {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 4. ÉTAPE ACTIVE COURANTE (step_current) : CAPSULE BLEUE AJUSTÉE AVEC TITRE COMPLET */
  body#order #order_step li.step_current,
  body#order-opc #order_step li.step_current,
  body#authentication #order_step li.step_current,
  body#order-confirmation #order_step li.step_current,
  div.order-stepper-container-2026 ul.step li.step_current,
  #order_step li.step_current {
    z-index: 30 !important;
    position: relative !important;
    flex: 0 1 auto !important;
    max-width: calc(100% - 130px) !important;
  }

  body#order #order_step li.step_current .step-pill,
  body#order-opc #order_step li.step_current .step-pill,
  body#authentication #order_step li.step_current .step-pill,
  body#order-confirmation #order_step li.step_current .step-pill,
  div.order-stepper-container-2026 ul.step li.step_current .step-pill,
  #order_step li.step_current .step-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 10px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 9999px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35) !important;
    box-sizing: border-box !important;
    z-index: 30 !important;
    margin: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  body#order #order_step li.step_current .step-badge,
  body#authentication #order_step li.step_current .step-badge,
  div.order-stepper-container-2026 ul.step li.step_current .step-badge,
  #order_step li.step_current .step-badge {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #2563eb !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  body#order #order_step li.step_current .step-label,
  body#authentication #order_step li.step_current .step-label,
  div.order-stepper-container-2026 ul.step li.step_current .step-label,
  #order_step li.step_current .step-label {
    display: inline-flex !important;
    font-size: 11.5px !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 5. FLÈCHES SÉPARATRICES ENTRE ÉTAPES */
  div.order-stepper-container-2026 .step-arrow,
  body #order_step li .step-arrow,
  #order_step li .step-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #cbd5e1 !important;
    font-size: 10px !important;
    padding: 0 1px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }
}
