/* ==========================================================================
   Newsletter « La Fournée de Biquet » — bloc, bandeau boutique, popup
   Style du packaging : aplats terracotta et crème, mascotte, biscuit festonné.
   Tant que newsletter.js n'a pas d'adresse Brevo, rien ne s'affiche.
   ========================================================================== */

html:not(.cbn-ok) .cbn,
html:not(.cbn-ok) .cbn-bandeau { display: none !important; }

.cbn, .cbn-bandeau, .cbn-pop {
  --n-clay: var(--clay, #DD8A5B);
  --n-deep: var(--clay-deep, #A85A33);
  --n-choco: var(--choco, #3A2317);
  --n-cream: var(--cream, #FDF9EE);
  --n-ombre: 0 18px 40px rgba(58, 35, 23, .16);
  color: var(--n-choco);
  box-sizing: border-box;
}
.cbn *, .cbn-bandeau *, .cbn-pop * { box-sizing: border-box; }

.cbn-surtitre {
  margin: 0 0 8px;
  font-size: .78rem; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--n-deep);
}
.cbn-mascotte { display: block; height: auto; pointer-events: none; }

.cbn-feston { position: relative; display: grid; place-items: center; }
.cbn-feston svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cbn-feston svg use { fill: var(--n-clay); }
.cbn-feston > span { position: relative; font-weight: 900; line-height: 1; text-align: center; color: var(--n-choco); }

.cbn-form { display: grid; gap: 10px; }
.cbn-form input[type="text"], .cbn-form input[type="email"] {
  width: 100%; padding: 14px 18px;
  border: 2px solid #EFE2CF; border-radius: 999px;
  background: #fff; font: inherit; color: var(--n-choco);
}
.cbn-form input:focus { outline: none; border-color: var(--n-clay); box-shadow: 0 0 0 4px rgba(221, 138, 91, .25); }
.cbn-consent {
  display: grid; grid-template-columns: 18px 1fr; gap: 8px;
  font-size: .78rem; line-height: 1.45; padding: 0 6px;
}
.cbn-consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--n-deep); }
.cbn-bouton {
  display: inline-block; text-align: center; text-decoration: none;
  background: var(--n-deep); color: #fff;
  border: 0; border-radius: 999px; padding: 15px 26px;
  font: inherit; font-weight: 800; letter-spacing: .02em; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.cbn-bouton:hover { background: #8F4A27; transform: translateY(-1px); }
.cbn-bouton:disabled { opacity: .6; cursor: wait; transform: none; }
.cbn-mentions { margin: 0; padding: 0 6px; font-size: .7rem; line-height: 1.45; opacity: .75; }
.cbn-mentions a, .cbn-consent a { color: var(--n-deep); }
.cbn-piege { position: absolute !important; left: -9999px !important; }
.cbn-merci { display: none; text-align: center; padding: 8px 4px; }
.cbn-merci strong { display: block; font-size: 1.3rem; margin-bottom: 6px; }
.cbn-merci p { margin: 0; line-height: 1.5; }
.est-inscrit .cbn-form { display: none; }
.est-inscrit .cbn-merci { display: block; }

/* ---------- 1. Bloc d'inscription ---------- */
.cbn { background: var(--n-clay); padding: 150px 16px 64px; }
.cbn__carte {
  position: relative; max-width: 980px; margin: 0 auto;
  background: var(--n-cream); border-radius: 32px; box-shadow: var(--n-ombre);
  padding: 64px clamp(20px, 5vw, 56px) 44px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: start;
}
.cbn__carte > .cbn-mascotte { position: absolute; left: 50%; top: 0; width: 220px; transform: translate(-50%, -78%); }
.cbn h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.1; color: var(--n-choco); }
.cbn__intro { margin: 0 0 22px; line-height: 1.55; }

.cbn-une { display: grid; grid-template-columns: repeat(4, minmax(0, 76px)); gap: 12px; margin: 0 0 14px; }
.cbn-une button {
  background: none; border: 0; padding: 0; cursor: pointer;
  display: grid; justify-items: center; gap: 6px;
  font: inherit; font-size: .78rem; font-weight: 700; color: var(--n-choco);
}
.cbn-une .cbn-feston { width: 70px; height: 70px; transition: transform .2s ease; }
.cbn-une .cbn-feston > span { font-size: 1rem; }
.cbn-une button[aria-selected="true"] .cbn-feston { transform: rotate(-8deg) scale(1.08); }
.cbn-une button[aria-selected="true"] .cbn-feston svg use { fill: var(--n-deep); }
.cbn-une button[aria-selected="true"] .cbn-feston > span { color: #fff; }
.cbn-une button:hover .cbn-feston { transform: rotate(-8deg); }
.cbn-bulle { background: #fff; border-radius: 20px; padding: 14px 18px; margin: 0; line-height: 1.5; font-size: .95rem; min-height: 76px; }
.cbn-bulle strong { color: var(--n-deep); }

.cbn__fleche { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--n-deep); font-weight: 800; font-size: .95rem; }
.cbn__fleche svg { width: 64px; height: 40px; flex: none; }

/* ---------- 2. Bandeau boutique ---------- */
.cbn-bandeau {
  position: relative; max-width: 960px; width: calc(100% - 32px); margin: 56px auto 28px;
  background: var(--n-clay); border-radius: 24px; padding: 22px 24px 22px 150px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; color: var(--n-choco);
}
.cbn-bandeau .cbn-mascotte { position: absolute; left: 18px; bottom: 10px; width: 116px; }
.cbn-bandeau p { flex: 1 1 260px; margin: 0; line-height: 1.45; }
.cbn-bandeau strong { display: block; font-size: 1.1rem; }
.cbn-bandeau .cbn-bouton { background: var(--n-cream); color: var(--n-deep); }
.cbn-bandeau .cbn-bouton:hover { background: #fff; }

/* ---------- 3. Popup ---------- */
.cbn-pop {
  position: fixed; z-index: 9999; right: 24px; bottom: 24px;
  width: min(380px, calc(100vw - 32px));
  background: var(--n-cream); border-radius: 28px;
  box-shadow: 0 24px 60px rgba(58, 35, 23, .28);
  padding: 58px 22px 18px;
  transform: translateY(calc(100% + 140px)); visibility: hidden;
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.15), visibility 0s .5s;
}
.cbn-pop.est-ouvert { transform: none; visibility: visible; transition: transform .5s cubic-bezier(.2, .9, .3, 1.15); }
.cbn-pop > .cbn-mascotte { position: absolute; left: 22px; top: 0; width: 132px; transform: translateY(-74%); }
.cbn-pop__badge { position: absolute; right: 16px; top: -34px; width: 92px; height: 92px; transform: rotate(10deg); }
.cbn-pop__badge svg use { fill: var(--n-deep); }
.cbn-pop__badge > span { color: #fff; font-size: 1.15rem; }
.cbn-pop__badge small { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .08em; margin-top: 3px; }
.cbn-pop__fermer {
  position: absolute; top: 12px; right: 118px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: #F3E6D5; color: var(--n-choco);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.cbn-pop h2 { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.15; color: var(--n-choco); }
.cbn-pop__texte { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; }
.cbn-pop__lien {
  display: inline-block; margin: 12px 0 0;
  color: var(--n-deep); font-weight: 800; font-size: .85rem; text-decoration: none;
  border-bottom: 2px solid rgba(168, 90, 51, .35);
}
.cbn-pop__lien:hover { border-bottom-color: var(--n-deep); }
.cbn-pop__pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cbn-pop__non {
  margin: 12px 0 0; background: none; border: 0;
  color: var(--n-choco); opacity: .65; text-decoration: underline;
  font: inherit; font-size: .8rem; cursor: pointer;
}

@media (max-width: 820px) {
  .cbn { padding-top: 130px; }
  .cbn__carte { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; }
  .cbn__carte > .cbn-mascotte { width: 180px; }
}
@media (max-width: 420px) {
  .cbn-une { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .cbn-une .cbn-feston { width: 60px; height: 60px; }
  .cbn-une .cbn-feston > span { font-size: .9rem; }
  .cbn-une button { font-size: .72rem; }
}
@media (max-width: 560px) {
  .cbn-bandeau { padding: 76px 20px 20px; margin-top: 70px; }
  .cbn-bandeau .cbn-mascotte { left: 50%; bottom: auto; top: 0; transform: translate(-50%, -48%); }
  .cbn-pop { right: 0; left: 0; bottom: 0; width: 100%; border-radius: 28px 28px 0 0; max-height: 88vh; }
}
@media (prefers-reduced-motion: reduce) {
  .cbn-pop, .cbn-pop.est-ouvert, .cbn-une .cbn-feston { transition: none; }
}
