/* 06_responsive_mobile.css - Media queries, adaptations smartphones & tablettes */

  /* ==========================================================================
     MOBILE ONLY (MAX-WIDTH: 768px) : CENTRAGE CORPS DE PAGE, FOOTER & BADGE COOKIE
     ========================================================================== */
  @media (max-width: 768px) {

    /* 1. Bouton Cookie Flottant Mobile : 5px du bas et de la gauche, icône seule */
    #jdb-cookie-badge {
      bottom: 5px !important;
      left: 5px !important;
      padding: 0 !important;
      width: 38px !important;
      height: 38px !important;
      min-width: 38px !important;
      border-radius: 50% !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      box-shadow: 0 3px 12px rgba(45, 36, 33, 0.16) !important;
      background: #FFFFFF !important;
      border: 1px solid #EFE4DC !important;
      z-index: 999998 !important;
    }

    #jdb-cookie-badge span {
      display: none !important;
    }

    #jdb-cookie-badge svg {
      margin: 0 !important;
      width: 18px !important;
      height: 18px !important;
    }

    /* Cart & Page Title Banner on Mobile: pas de margin-top */
    .woocommerce-cart .wp-block-post-title,
    .woocommerce-cart h1.wp-block-post-title,
    .woocommerce-cart .wp-block-woocommerce-cart-title,
    .woocommerce-cart h1.entry-title,
    .woocommerce-cart h1.page-title,
    .woocommerce-cart h1:not(.wc-block-cart__empty-cart__title),
    .woocommerce-checkout .wp-block-post-title,
    .woocommerce-account .wp-block-post-title {
      margin-top: 0 !important;
    }

    /* 2. Centrage du corps de page (sections, titres, textes, paragraphes) */
    main,
    .entry-content,
    .wp-block-post-content,
    #accueil,
    #boutique,
    #histoire,
    #contact,
    .jdb-contact-section,
    .jdb-contact-inner,
    .jdb-testimonials-grid {
      text-align: center !important;
    }

    main h1,
    main h2,
    main h3,
    main h4,
    main h5,
    main h6,
    main p,
    main .wp-block-paragraph,
    main .wp-block-heading,
    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6,
    .entry-content p,
    .entry-content .wp-block-paragraph,
    .entry-content .wp-block-heading,
    .wp-block-post-content h1,
    .wp-block-post-content h2,
    .wp-block-post-content h3,
    .wp-block-post-content p,
    .wp-block-post-content .wp-block-paragraph,
    #accueil h1,
    #accueil h2,
    #accueil p,
    #histoire h2,
    #histoire p,
    #contact h2,
    #contact p,
    .jdb-testimonials-grid h2,
    .jdb-testimonials-grid p {
      text-align: center !important;
    }

    /* Badges & Tags dans le corps de page */
    #accueil p:first-of-type,
    #histoire p:first-of-type,
    #contact p:first-of-type,
    .has-text-color[style*="uppercase"] {
      justify-content: center !important;
      text-align: center !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }

    /* Boutons dans le corps de page */
    .wp-block-buttons,
    main .wp-block-buttons,
    .entry-content .wp-block-buttons,
    #accueil .wp-block-buttons {
      justify-content: center !important;
      text-align: center !important;
      margin-left: auto !important;
      margin-right: auto !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      gap: 12px !important;
    }

    .wp-block-button,
    .wp-block-button__link {
      margin-left: auto !important;
      margin-right: auto !important;
      text-align: center !important;
      width: 100% !important;
      max-width: 300px !important;
    }

    /* Images et figures */
    .wp-block-image,
    .wp-block-image img,
    main figure,
    #accueil figure,
    #histoire img {
      margin-left: auto !important;
      margin-right: auto !important;
      text-align: center !important;
    }

    /* Cartes de la boutique */
    .jdb-product-card {
      text-align: center !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
    }

    .jdb-card-badge {
      justify-content: center !important;
      text-align: center !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }

    .jdb-card-title,
    .jdb-card-desc,
    .jdb-card-price {
      text-align: center !important;
    }

    .jdb-card-btn {
      margin-left: auto !important;
      margin-right: auto !important;
      align-self: center !important;
    }

    /* Témoignages */
    .jdb-testimonial-card {
      text-align: center !important;
      align-items: center !important;
    }

    .jdb-testimonial-card>div:first-child {
      justify-content: center !important;
    }

    .jdb-testimonial-card p {
      text-align: center !important;
    }

    /* Section Contact & Atelier : Formulaire occupant 95% de la largeur d'écran sur mobile */
    #contact,
    .jdb-contact-section {
      padding-left: 0 !important;
      padding-right: 0 !important;
      padding-top: 40px !important;
      padding-bottom: 50px !important;
      width: 100% !important;
      max-width: 100% !important;
    }

    .jdb-contact-inner {
      width: 100% !important;
      max-width: 100% !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
      margin: 0 auto !important;
    }

    #contact .wp-block-columns,
    #contact .wp-block-columns.alignwide {
      padding-left: 0 !important;
      padding-right: 0 !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
      gap: 30px !important;
    }

    #contact .wp-block-column {
      text-align: center !important;
      width: 100% !important;
      max-width: 100% !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    #contact .wp-block-column:first-child {
      padding-left: 16px !important;
      padding-right: 16px !important;
      box-sizing: border-box !important;
    }

    #contact .wp-block-column:last-child {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      width: 100% !important;
      max-width: 100% !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    .jdb-contact-card-box {
      width: 95% !important;
      max-width: 95% !important;
      margin-left: auto !important;
      margin-right: auto !important;
      padding: 24px 16px !important;
      border-radius: 18px !important;
      box-sizing: border-box !important;
      box-shadow: 0 4px 20px rgba(45, 36, 33, 0.08) !important;
    }

    #contact .wp-block-column>div[style*="display:flex"] {
      flex-direction: column !important;
      align-items: center !important;
      text-align: center !important;
      justify-content: center !important;
    }

    #contact .wp-block-column>div[style*="display:flex"]>div {
      text-align: center !important;
    }

    #jdb-contact-form {
      text-align: center !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    #jdb-contact-form label {
      text-align: center !important;
    }

    #jdb-contact-btn {
      margin-left: auto !important;
      margin-right: auto !important;
      width: 100% !important;
      max-width: 100% !important;
      justify-content: center !important;
    }

    /* 3. Centrage du Footer */
    footer,
    .wp-block-group.alignfull.has-background[style*="#2D2421"],
    footer .wp-block-columns,
    footer .wp-block-column,
    .wp-block-group.alignfull.has-background[style*="#2D2421"] .wp-block-columns,
    .wp-block-group.alignfull.has-background[style*="#2D2421"] .wp-block-column {
      text-align: center !important;
    }

    footer .wp-block-group.are-vertically-aligned-center,
    .wp-block-group.alignfull.has-background[style*="#2D2421"] .are-vertically-aligned-center {
      justify-content: center !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }

    footer .wp-block-column,
    .wp-block-group.alignfull.has-background[style*="#2D2421"] .wp-block-column {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
      text-align: center !important;
    }

    footer .wp-block-column p,
    .wp-block-group.alignfull.has-background[style*="#2D2421"] .wp-block-column p,
    footer .wp-block-column h4,
    .wp-block-group.alignfull.has-background[style*="#2D2421"] .wp-block-column h4 {
      text-align: center !important;
    }

    footer .wp-block-column div[style*="display:flex"],
    .wp-block-group.alignfull.has-background[style*="#2D2421"] .wp-block-column div[style*="display:flex"] {
      justify-content: center !important;
      text-align: center !important;
      align-items: center !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }

    footer p[style*="color:#E89C82"],
    .wp-block-group.alignfull.has-background[style*="#2D2421"] p[style*="color:#E89C82"] {
      justify-content: center !important;
      text-align: center !important;
    }
  }