/*
Theme Name: Modave Child
Theme URI: https://modave.presslayouts.com/landing
Author: PressLayouts Team
Description: This is a child theme for Modave
Version: 1.0
Author URI: https://www.presslayouts.com/
Template: modave
Text Domain: modave-child
*/

/* ============================================================
   CHECKOUT MOBILE - Harmonistyle
   CheckoutWC gere nativement : order:-1 panier, contenu replie, mobile header.
   Ce CSS corrige uniquement les problemes visuels par-dessus.
   ============================================================ */

/* ── 1. CORRECTIF HAUTEUR FOND BEIGE (< 992px) ── */
/* Sur mobile, #cfw-cart-summary ne doit pas s'etirer a la hauteur du formulaire */
@media (max-width: 991.98px) {

  /* CRITIQUE : empeche le fond beige de s'etirer sur toute la hauteur du formulaire */
  form#checkout #cfw-cart-summary {
    align-self: flex-start !important;
    height: auto !important;
    min-height: unset !important;
  }

  /* Retirer padding/margin superflu sur les conteneurs */
  #cfw {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* S'assurer que form est bien en flex-wrap pour que order fonctionne */
  form#checkout {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Panier et formulaire : pleine largeur */
  form#checkout #cfw-cart-summary,
  form#checkout #order_review {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    box-sizing: border-box !important;
  }

  form#checkout #order_review {
    padding: 0 16px !important;
  }

}

/* ── 2. CHAMPS ET BOUTONS (< 768px) ── */
@media (max-width: 768px) {

  /* font-size 16px : empeche le zoom automatique iOS */
  form#checkout input[type="text"],
  form#checkout input[type="email"],
  form#checkout input[type="tel"],
  form#checkout input[type="number"],
  form#checkout input[type="password"],
  form#checkout select,
  form#checkout textarea {
    font-size: 16px !important;
    min-height: 48px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  /* Boutons : grande surface de tap */
  .cfw-primary-btn,
  #cfw-next-btn,
  button#place_order {
    min-height: 54px !important;
    font-size: 16px !important;
    padding: 14px 20px !important;
    box-sizing: border-box !important;
  }

  /* Prenom/Nom : chacun sur sa propre ligne */
  .cfw-input-wrap-row {
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
  }

  form#checkout .col-lg-6,
  form#checkout .col-md-6 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
  }

}

/* ── 3. TRES PETITS ECRANS (< 400px) ── */
@media (max-width: 400px) {

  form#checkout #order_review {
    padding: 0 12px !important;
  }

}