/* chocopackfrancobienvenue — bandeau et encart de bienvenue
   Les règles sont préfixées par #wrapper pour passer devant les styles
   génériques du thème (couleur et marges des paragraphes, couleur des liens). */
.cpfb {
  --cpfb-bg: #9cbf9b;
  --cpfb-text: #fff;
  --cpfb-accent: #fff;
  --cpfb-size: 17.6px;
  --cpfb-title-size: 24px;
  --cpfb-title-font: inherit;
  --cpfb-maxw: none;
  --cpfb-mt: 0px;
  --cpfb-mb: 15px;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--cpfb-maxw);
  margin: var(--cpfb-mt) auto var(--cpfb-mb);
  background: var(--cpfb-bg);
  color: var(--cpfb-text);
  line-height: 1.5;
}
.cpfb[hidden] { display: none !important; }
.cpfb *,
.cpfb *::before,
.cpfb *::after { box-sizing: border-box; }

/* Même position que l'ancien bloc Everblock dans la colonne flex des catégories
   (titre = 0, bandeau = 1, description = 2, produits = 3) */
#main > #cpfb-cat { order: 1; }

#wrapper .cpfb p,
.cpfb p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
#wrapper .cpfb a,
.cpfb a { color: inherit; }

/* Code en étiquette (variable {code}) */
#wrapper .cpfb .cpfb-code,
.cpfb .cpfb-code {
  display: inline-block;
  padding: 0 9px;
  border: 1px solid var(--cpfb-accent);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.6;
  cursor: pointer;
  white-space: nowrap;
}

/* Ticket du code : cliquer dessus copie le code */
.cpfb__ticket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 7px 20px;
  border: 1px dashed var(--cpfb-accent);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.cpfb__ticket:hover,
.cpfb__ticket:focus-visible {
  border-style: solid;
  outline: none;
}
.cpfb__ticket-code {
  font-family: var(--cpfb-title-font);
  font-size: 1.1em;
  letter-spacing: .1em;
}
.cpfb-copy.is-copied { opacity: .8; }

/* ---------- Style « bandeau » : identique à l'ancien bandeau Everblock ---------- */
.cpfb--bandeau {
  padding: 15px;
  border-radius: 5px;
  font-size: var(--cpfb-size);
}
.cpfb--bandeau .cpfb__inner,
.cpfb--bandeau .cpfb__content,
.cpfb--bandeau .cpfb__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
}
.cpfb--bandeau.cpfb--align-left .cpfb__inner,
.cpfb--bandeau.cpfb--align-left .cpfb__content { justify-content: flex-start; text-align: left; }
.cpfb--bandeau.cpfb--align-right .cpfb__inner,
.cpfb--bandeau.cpfb--align-right .cpfb__content { justify-content: flex-end; text-align: right; }
.cpfb--bandeau.cpfb--align-center { text-align: center; }
#wrapper .cpfb--bandeau .cpfb__sur { font-size: .75em; letter-spacing: .15em; text-transform: uppercase; }
#wrapper .cpfb--bandeau .cpfb__title { font-family: var(--cpfb-title-font); font-weight: 700; }
#wrapper .cpfb--bandeau .cpfb__text a,
#wrapper .cpfb--bandeau .cpfb__btn { text-decoration: underline; }
#wrapper .cpfb--bandeau .cpfb__btn { font-weight: 600; }
.cpfb--bandeau .cpfb__ticket { padding: 1px 10px; }

/* ---------- Style « encart » : carte sobre, une ligne ---------- */
.cpfb--encart {
  padding: 22px 28px;
  border: 1px solid #ececec;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
  font-size: var(--cpfb-size);
}
.cpfb--encart .cpfb__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.cpfb--encart .cpfb__content { min-width: 0; }
.cpfb--encart .cpfb__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
#wrapper .cpfb--encart .cpfb__sur {
  margin-bottom: 4px;
  color: var(--cpfb-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
#wrapper .cpfb--encart .cpfb__title {
  font-family: var(--cpfb-title-font);
  font-size: var(--cpfb-title-size);
  font-weight: 400;
  line-height: 1.25;
}
#wrapper .cpfb--encart .cpfb__text {
  margin-top: 4px;
  color: #5c5c5c;
  font-size: .95em;
}
#wrapper .cpfb--encart .cpfb__btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 6px;
  background: var(--cpfb-accent);
  color: #fff;
  font-size: .9em;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s;
}
#wrapper .cpfb--encart .cpfb__btn:hover { opacity: .85; }
/* Encart sans cadre : posé directement sur la page */
.cpfb--encart.cpfb--noframe {
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* Encart centré : textes empilés au centre, code et bouton côte à côte dessous */
.cpfb--encart.cpfb--align-center .cpfb__inner { flex-direction: column; gap: 14px; text-align: center; }
.cpfb--encart.cpfb--align-right .cpfb__inner { flex-direction: row-reverse; text-align: right; }

/* ---------- Appareils ---------- */
@media (max-width: 767px) {
  .cpfb--only-desktop { display: none !important; }
  .cpfb--encart {
    width: calc(100% - 32px);
    padding: 18px 18px;
  }
  .cpfb--encart.cpfb--noframe { padding: 10px 0; }
  .cpfb--encart .cpfb__inner { flex-direction: column; text-align: center; }
  .cpfb--encart .cpfb__actions { flex-direction: column; }
  #wrapper .cpfb--encart .cpfb__title { font-size: calc(var(--cpfb-title-size) * .85); }
  .cpfb--bandeau { padding: 12px; }
  .cpfb--bandeau .cpfb__ticket { white-space: normal; }
}
@media (min-width: 768px) {
  .cpfb--only-mobile { display: none !important; }
}
