/*
 * entete-mobile.css — Broderies de la Cigogne, site PrestaShop 1.6 (lot 2 du responsive, oct. 2026)
 *
 * « La barre » de la PS9 (volutes, blason, enseigne, panier, menu ou burger), les polices
 * Jost + Cormorant Garamond et le menu des catégories repliable « Catégorie : … » en haut
 * de page sur téléphone. Port de theme/broderie/assets/css/header.css et catalog.css (PS9).
 *
 * Chargé par header.tpl APRÈS mobile.css (lot 1/lot 3) : à spécificité égale, il gagne.
 * Règle d'or : tout est sous @media (max-width:1259px), sauf le masquage de la barre et du
 * bouton des catégories au-dessus. Le bureau (>= 1260 px) ne change pas d'un pixel.
 *
 * Retour arrière : retirer de header.tpl la ligne {include …entete-mobile.tpl} et les deux
 * lignes <link> (polices et ce fichier).
 */

/* Bureau : la barre et le bouton des catégories n'existent pas. */
#bro-entete, .bro-catselect { display: none; }

@media (max-width: 1259px) {

  /* ── 0. Polices : Jost partout, Cormorant Garamond pour les titres de page ───────── */
  body, #page, #columns p, #columns li, #columns a, #columns span, #columns label,
  #columns td, #columns th, #columns input, #columns select, #columns textarea,
  #columns .button, #columns .btn, .breadcrumb, .mf_foot, .mf_foot a {
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif;
  }
  /* Les icônes (police Font Awesome du thème) gardent leur police. */
  #columns [class^="icon-"], #columns [class*=" icon-"], #columns .icon, #columns .fa { font-family: 'FontAwesome'; }
  #columns h1, #columns .page-heading, #columns .cat-name, #columns .page-subheading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
    color: #5e3f3b;
  }
  #columns h1, #columns .page-heading { font-size: 28px; line-height: 1.15; }
  #columns h1 .heading-counter, #columns .page-heading .heading-counter { font-family: 'Jost', 'Segoe UI', Arial, sans-serif; letter-spacing: 0; }

  /* ── 1. L'en-tête du lot 1 (blason, enseigne, menu, panier empilés) est remplacé ── */
  #header #mf_designbroderie_logotexte,
  #header #mf_designbroderie_logotextestrasbourg,
  #header .mf_designbroderie_menumathieu,
  #header .col-sm-4 { display: none !important; }
  #header > div:not(.nav) > .container > .row:before { display: none !important; }
  .header-container { background-image: none !important; }
  /* Tablette : la colonne des catégories n'a plus à descendre sous l'en-tête-image (100 px) */
  #categories_block_left { margin-top: 24px; margin-left: 8px; }

  /* ── 2. La barre (port de header.css de la PS9, scopé sous #bro-entete) ─────────── */
  #bro-entete {
    display: block;
    background: transparent;
    color: #5e3f3b;
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif;
    position: relative;               /* ancre du panneau du burger (pleine largeur) */
    z-index: 30;
  }
  #bro-entete *, #bro-entete *:before, #bro-entete *:after { box-sizing: border-box; }
  #bro-entete img { max-width: none; }
  #bro-entete a { text-decoration: none; }

  #bro-entete .bro-header__bar {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 8px;
    position: relative;
    z-index: 5;
  }
  #bro-entete .deco-bar {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    height: 170px;
    margin-top: 70px;
  }
  #bro-entete .deco-bar__left {
    -webkit-box-flex: 0; -ms-flex: 0 1 auto; flex: 0 1 auto;
    display: block; height: 100%;
    object-fit: cover; object-position: top left;
    position: relative; z-index: 6;
  }
  #bro-entete .deco-bar__middle,
  #bro-entete .deco-bar__middle_left {
    display: block; width: 100%; height: 100%; min-width: 0;
    position: relative; z-index: 1;
  }
  #bro-entete .deco-bar__middle { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
  #bro-entete .deco-bar__middle_left { -webkit-box-flex: 0; -ms-flex: 0 1 20px; flex: 0 1 20px; }
  #bro-entete .deco-bar__middle > img,
  #bro-entete .deco-bar__middle_left > img { display: block; height: 100%; width: 100%; }
  #bro-entete .deco-bar__middle_left img.compensation_left { position: absolute; left: 100%; top: 0; width: 5px; }
  #bro-entete .deco-bar__middle img.compensation_right { position: absolute; right: 100%; top: 0; width: 5px; }

  #bro-entete .deco-bar__logo {
    -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
    display: block; height: 100%;
    position: relative; z-index: 5; top: -38px;
  }
  #bro-entete .deco-bar__logo img { display: block; height: 100%; width: auto; }

  #bro-entete .deco-bar__right {
    -webkit-box-flex: 0; -ms-flex: 0 1 auto; flex: 0 1 auto;
    display: block; height: 100%;
    object-fit: cover; object-position: top right;
  }

  #bro-entete .barre_menu_content {
    position: absolute; top: -45px; left: 0;
    width: 100%; height: 208px;
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-orient: vertical; -ms-flex-direction: column; flex-direction: column;
  }
  #bro-entete .barre_menu_content > div { width: 100%; }
  #bro-entete .barre_menu_content .top {
    -webkit-box-flex: 0; -ms-flex: 0 1 50%; flex: 0 1 50%;
    display: -webkit-box; display: -ms-flexbox; display: flex;
  }
  #bro-entete .site_name_section {
    -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-orient: vertical; -ms-flex-direction: column; flex-direction: column;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
    margin-top: -40px;
  }
  #bro-entete .site_title {
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif;
    font-weight: 500; font-size: 34px; letter-spacing: .10em; line-height: 1.05;
    color: #5e3f3b; white-space: nowrap;
  }
  #bro-entete .site_subtitle {
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif;
    font-weight: 400; font-size: 16px; letter-spacing: .28em; text-transform: uppercase;
    color: #5e3f3b; margin-top: 2px;
  }
  #bro-entete .card_section {
    -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto;
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;
  }

  /* Panier : picto + PANIER / compteur, alignés en bas (comme l'ancien site) */
  #bro-entete .bro-panier {
    display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
    -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end;
    color: #5e3f3b;
  }
  #bro-entete .bro-panier img { height: 54px; width: auto; display: block; margin-right: 9px; }
  #bro-entete .bro-panier .cart_text {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-orient: vertical; -ms-flex-direction: column; flex-direction: column;
    -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif; line-height: 1.2; padding-bottom: 4px;
  }
  #bro-entete .bro-panier .cart_text b { font-weight: 600; font-size: 15px; letter-spacing: .08em; }
  #bro-entete .bro-panier .bro-panier__nb { font-size: 13px; color: #625d52; }

  /* Menu (4 entrées) sous le trait */
  #bro-entete .barre_menu_content .bottom { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
  #bro-entete .menu-desktop {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    height: 100%;
    -ms-flex-pack: distribute; justify-content: space-around;
    list-style: none; padding: 24px; margin: 0;
  }
  #bro-entete .menu-desktop li {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  }
  #bro-entete .menu-desktop a,
  #bro-entete .mobile-nav a {
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif;
    font-weight: 400; font-size: 16px; letter-spacing: .14em; text-transform: uppercase;
    color: #5e3f3b; -webkit-transition: color .15s ease; transition: color .15s ease;
  }
  #bro-entete .menu-desktop li.active a,
  #bro-entete .mobile-nav li.active a { font-weight: 600; }
  #bro-entete .menu-desktop a:hover, #bro-entete .mobile-nav a:hover { color: #4a302d; }

  /* Barre du téléphone (panier + burger), cachée au-dessus de 884 px */
  #bro-entete .mobile-bar {
    display: none;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    -ms-flex-pack: distribute; justify-content: space-around;
    padding: 8px 8px 4px; height: 100%;
  }
  #bro-entete .mobile-bar > * {
    -webkit-box-flex: 1 !important; -ms-flex: 1 !important; flex: 1 !important;
    -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  }
  #bro-entete .burger {
    width: 48px; height: 48px;
    display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
    -webkit-box-orient: vertical; -ms-flex-direction: column; flex-direction: column;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
    background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
    -webkit-appearance: none; appearance: none; box-shadow: none;
  }
  #bro-entete .burger:focus { outline: 0; }
  #bro-entete .burger:focus-visible { outline: 2px solid rgba(94, 63, 59, .4); outline-offset: 2px; }
  #bro-entete .burger span {
    display: block; width: 28px; height: 2px; margin: 3px 0;
    background: #5e3f3b; border-radius: 2px;
    -webkit-transition: -webkit-transform .25s ease, opacity .2s ease;
    transition: transform .25s ease, opacity .2s ease;
  }
  #bro-entete .burger.is-open span:nth-child(1) { -webkit-transform: translateY(8px) rotate(45deg); transform: translateY(8px) rotate(45deg); }
  #bro-entete .burger.is-open span:nth-child(2) { opacity: 0; }
  #bro-entete .burger.is-open span:nth-child(3) { -webkit-transform: translateY(-8px) rotate(-45deg); transform: translateY(-8px) rotate(-45deg); }

  /* Panneau du burger : pleine largeur, sous la barre, au-dessus de la page */
  #bro-entete .mobile-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
    background: #e7e9e3;
    box-shadow: 0 12px 20px rgba(0, 0, 0, .14);
    padding: 4px 16px 10px;
    border-top: 1px solid rgba(85, 63, 59, .18);
  }
  #bro-entete .mobile-nav.is-open { display: block; }
  #bro-entete .mobile-nav ul { list-style: none; padding: 0; margin: 0; }
  #bro-entete .mobile-nav li + li { border-top: 1px solid rgba(85, 63, 59, .12); }
  #bro-entete .mobile-nav a { display: block; padding: 16px 8px; }

}

/* Paliers de la PS9 (valeurs mises au point sur le prototype, conservées).
   Hors du bloc 1259 px (pas de @media imbriqués : vieux navigateurs). */
@media (max-width: 968px) {
  #bro-entete .site_title { font-size: 30px; }
  #bro-entete .deco-bar { margin-top: 50px; }
  #bro-entete .site_name_section { margin-top: 0; }
  #bro-entete .bro-panier img { height: 48px; }
  #bro-entete .deco-bar__logo { height: 88%; }
}
@media (max-width: 884px) {
  #bro-entete .site_title { font-size: 27px; }
  #bro-entete .site_subtitle { font-size: 14px; }
  #bro-entete .deco-bar { margin-top: 10px; height: 150px; }
  #bro-entete .deco-bar__logo { height: 85%; top: -12px; }
  #bro-entete .site_name_section { margin-top: -11px; }
  #bro-entete .barre_menu_content { top: 0; height: 100%; }
  #bro-entete .barre_menu_content .top { -ms-flex: 0 1 38%; flex: 0 1 38%; }
  #bro-entete .card_section { display: none; }
  #bro-entete .menu-desktop { display: none; }
  #bro-entete .mobile-bar { display: -webkit-box; display: -ms-flexbox; display: flex; }
}
@media (max-width: 684px) {
  #bro-entete .site_title { white-space: normal; text-align: center; }
  #bro-entete .site_subtitle { display: none; }
  #bro-entete .deco-bar__middle_left { -ms-flex: 0 1 4px; flex: 0 1 4px; }
  #bro-entete .deco-bar { height: 120px; }
  #bro-entete .deco-bar__logo { height: 120%; top: 11px; }
  #bro-entete .bro-header__bar { margin-bottom: 18px; }
}
@media (max-width: 532px) {
  #bro-entete .site_title { font-size: 22px; }
}
@media (max-width: 438px) {
  #bro-entete .deco-bar { height: 100px; }
  #bro-entete .site_title { font-size: 20px; }
  #bro-entete .bro-panier .cart_text { display: none; }
  #bro-entete .deco-bar__logo { height: 80%; }
}
@media (max-width: 400px) {
  #bro-entete .deco-bar { height: 118px; }
  #bro-entete .site_title { font-size: 17px; letter-spacing: .06em; line-height: 1.12; }
  #bro-entete .barre_menu_content .top { -ms-flex: 0 1 46%; flex: 0 1 46%; }
  #bro-entete .deco-bar__middle_left { -ms-flex: 0 0 8px; flex: 0 0 8px; }
  #bro-entete .deco-bar__logo { height: 78%; }
}
@media (max-width: 340px) {
  #bro-entete .site_title { font-size: 15px; letter-spacing: .04em; }
  #bro-entete .deco-bar { height: 112px; }
  #bro-entete .deco-bar__logo { height: 74%; }
}

/* ── 3. Téléphone : l'arbre des catégories devient un menu déroulant en haut de page ── */
@media (max-width: 767px) {
  html body #columns > .row:not(#slider_row) > #left_column { -webkit-box-ordinal-group: 0; -ms-flex-order: -1; order: -1; margin-top: 0 !important; padding: 0 0 8px; }
  html body #left_column #categories_block_left { margin: 0; padding: 0; background: transparent; }

  .bro-catselect { display: block; margin: 0 0 4px; }
  .bro-catselect__label {
    display: block; margin: 0 0 6px;
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif; font-size: 15px; color: #5e3f3b;
  }
  .bro-catselect__btn {
    position: relative; display: block; width: 100%;
    min-height: 46px; padding: 10px 44px 10px 12px; margin: 0;
    background: #fff; border: 1px solid rgba(94, 63, 59, .35); border-radius: 4px;
    font-family: 'Jost', 'Segoe UI', Arial, sans-serif; font-size: 16px; text-align: left;
    color: #5e3f3b; cursor: pointer;
    -webkit-appearance: none; appearance: none;
  }
  .bro-catselect__btn:focus { outline: 0; }
  .bro-catselect__btn:focus-visible { outline: 2px solid rgba(94, 63, 59, .4); outline-offset: 1px; }
  .bro-catselect__btn:after {
    content: ""; position: absolute; right: 16px; top: 50%; margin-top: -3px;
    border-left: 7px solid transparent; border-right: 7px solid transparent;
    border-top: 8px solid #5e3f3b;
  }
  .bro-catselect__btn[aria-expanded="true"]:after { border-top: 0; border-bottom: 8px solid #5e3f3b; }

  /* Fermé : l'arbre est replié (le lot 1 le forçait ouvert). Ouvert : il se déplie dessous. */
  html body #left_column #categories_block_left.bro-catmenu .block_content { display: none !important; }
  html body #left_column #categories_block_left.bro-catmenu.is-open .block_content {
    display: block !important;
    background: #e7e9e3; border: 1px solid rgba(94, 63, 59, .18); border-top: 0;
    padding: 6px 12px 10px;
  }
  /* Lignes plus hautes (doigt) ; flèches de la police d'icônes recalées sur la ligne */
  html body #categories_block_left.bro-catmenu .tree li a { display: block; padding: 0 30px 0 19px; line-height: 38px; }
  html body #categories_block_left.bro-catmenu .tree li { padding-bottom: 2px; }
  #categories_block_left.bro-catmenu li span.grower:before,
  #categories_block_left.bro-catmenu li span.grower.OPEN:before,
  #categories_block_left.bro-catmenu li span.grower.CLOSE:before { line-height: 38px; height: 38px; min-width: 0; width: 19px; }
}
