/* ── Générateur : les champs à gauche, la feuille à droite ── */
.gen { padding: 28px 0 56px; }
.gen__tete h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin-bottom: .25em; }
.gen__sous { color: var(--encre-2); margin-bottom: 1em; }
.types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: .6em; }
.types__btn {
  font: 500 .92rem/1.2 var(--sans); padding: .55em 1em; min-height: 40px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--filet-2); background: var(--feuille); color: var(--encre-2);
}
.types__btn:hover:not(:disabled) { border-color: var(--stylo); color: var(--encre); }
.types__btn.est-actif { background: var(--encre); border-color: var(--encre); color: #fff; }
.types__btn:disabled { opacity: .45; cursor: not-allowed; }
.types__accroche { color: var(--encre-3); font-size: .92rem; margin-bottom: 1.4em; }
.reprise-bandeau { background: var(--surligne); padding: .6em .9em; border-radius: 6px; font-size: .92rem; }

.gen__grille { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .gen__grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }

.champs { min-width: 0; }
.bloc { border: 1px solid var(--filet); background: var(--feuille); border-radius: var(--rayon); padding: 18px 18px 8px; margin: 0 0 16px; min-width: 0; }
.bloc legend { font: 600 1.08rem/1.2 var(--serif); padding: 0 6px; margin-left: -6px; display: flex; align-items: center; gap: 10px; }
.bloc__num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--encre); color: #fff; font: 600 .82rem/1 var(--sans);
}
.champ { margin-bottom: 14px; min-width: 0; }
.champ > label, .etiquette { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 5px; color: var(--encre); }
.req { color: var(--tampon); }
.ligne { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .ligne { grid-template-columns: 1fr 1fr; } }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--filet-2); border-radius: 6px;
  padding: .5em .85em; cursor: pointer; font-size: .95rem; background: var(--feuille);
}
.choix label:has(input:checked) { border-color: var(--stylo); background: var(--stylo-pale); }
.choix input, .case input { width: auto; min-height: 0; accent-color: var(--stylo); margin: 0; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin-bottom: 10px; cursor: pointer; }
.case input { margin-top: .25em; flex: none; width: 18px; height: 18px; }
.case--retrait { margin-left: 28px; }
.aide-inline { color: var(--encre-3); font-size: .86rem; }
.filet { border: 0; border-top: 1px dashed var(--filet-2); margin: 6px 0 16px; }
.champ--manquant input, .champ--manquant textarea { border-color: var(--tampon); box-shadow: 0 0 0 3px #F6DCD8; }
.champ--manquant > label::after { content: " — à remplir"; color: var(--tampon); font-weight: 400; }
.calcul { background: var(--papier); border-radius: 6px; padding: 10px 12px; font-size: .92rem; margin: 4px 0 14px; }
.calcul:empty { display: none; }

/* L'aperçu */
.apercu { position: sticky; top: 80px; min-width: 0; }
.apercu__barre { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.apercu__onglets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.apercu__onglet {
  flex: none; font: 500 .84rem/1.2 var(--sans); padding: .5em .8em; border-radius: 6px 6px 0 0; cursor: pointer;
  border: 1px solid var(--filet); border-bottom: 0; background: var(--papier-2); color: var(--encre-2);
}
.apercu__onglet.est-actif { background: var(--feuille); color: var(--encre); }
.apercu__fermer { display: none; }
.feuille--apercu { max-height: calc(100vh - 150px); overflow-y: auto; padding: 30px 30px 40px; }
.feuille__attente { color: var(--encre-3); font-family: var(--sans); text-align: center; padding: 60px 0; }
.apercu-coupe { margin-top: 1.6em; padding-top: 1em; border-top: 1px dashed var(--filet-2); }
.apercu-coupe__titre { font-family: var(--sans); font-size: .84rem !important; color: var(--encre-3); text-transform: uppercase; letter-spacing: .06em; }
.apercu-coupe__liste { padding-left: 1.1em; }
.apercu-coupe__liste li { filter: blur(.2px); color: var(--encre-2); }
.apercu__verrou {
  position: sticky; bottom: -40px; margin: 20px -30px -40px; padding: 18px 24px 22px; text-align: center;
  background: linear-gradient(rgba(255,255,255,0), #fff 30%); font-family: var(--sans);
}
.apercu__verrou p { font-size: .92rem !important; }
.voir-apercu { display: none; }

@media (max-width: 1099px) {
  .apercu { position: fixed; inset: 0; z-index: 60; background: var(--papier); padding: 12px; display: none; flex-direction: column; }
  .apercu.est-ouvert { display: flex; }
  .apercu__fermer { display: inline-flex; border: 1px solid var(--filet-2); background: var(--feuille); border-radius: 6px; padding: .45em .8em; font: 500 .9rem var(--sans); cursor: pointer; }
  .feuille--apercu { max-height: none; flex: 1; padding: 22px 18px 32px; }
  .apercu__verrou { margin: 20px -18px -32px; }
  .voir-apercu {
    display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 40; min-height: 48px; padding: .7em 1.2em;
    border: 0; border-radius: 99px; background: var(--encre); color: #fff; font: 600 .95rem var(--sans); cursor: pointer;
    box-shadow: 0 8px 24px -6px rgba(0,0,0,.35);
  }
}

/* Récupérer */
.recuperer { margin-top: 28px; background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 22px 18px; max-width: 760px; }
.recuperer h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.offres { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 6px 0 16px; }
@media (min-width: 620px) { .offres { grid-template-columns: 1fr 1fr; } }
.offre { position: relative; cursor: pointer; }
.offre input { position: absolute; opacity: 0; }
.offre__corps { display: flex; flex-direction: column; gap: 3px; height: 100%; border: 1.5px solid var(--filet-2); border-radius: var(--rayon); padding: 14px 16px; }
.offre input:checked + .offre__corps { border-color: var(--stylo); background: var(--stylo-pale); box-shadow: 0 0 0 1px var(--stylo); }
.offre input:focus-visible + .offre__corps { outline: 3px solid var(--stylo); outline-offset: 2px; }
.offre__nom { font-weight: 600; }
.offre__prix { font: 600 1.45rem/1.2 var(--serif); }
.offre__prix small { font: 400 .85rem var(--sans); color: var(--encre-3); }
.offre__detail { font-size: .86rem; color: var(--encre-2); }
.promo { margin: 4px 0 14px; font-size: .9rem; }
.promo summary { cursor: pointer; color: var(--encre-3); }
.promo input { margin-top: 8px; max-width: 260px; }
.consentement { font-size: .88rem; color: var(--encre-2); }
.erreur { background: #FBEFED; color: #7E2419; border: 1px solid #E5B8B1; border-radius: 6px; padding: .6em .8em; font-size: .92rem; }
.securite { font-size: .84rem; color: var(--encre-3); margin-top: 10px; }
.recuperer__ok { font: 600 1.15rem/1.3 var(--serif); color: var(--vert); }
.plus-tard { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--filet-2); }
.plus-tard__titre { font-weight: 600; font-size: .95rem; }
.plus-tard__ligne { display: flex; flex-wrap: wrap; gap: 8px; }
.plus-tard__ligne input[type=email] { flex: 1 1 220px; }
