.speedbrochures-formats {
    padding: 18px;
    background: #f8faf9;
    border: 1px solid #dce8df;
    border-radius: 12px;
    margin-bottom: 20px;
}

.speedbrochures-formats h3 {
    color: #16803c;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.speedbrochures-formats-choix {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.speedbrochures-formats-choix button {
    padding: 9px 14px;
    background: #fff;
    border: 1px solid #cbd5d1;
    border-radius: 7px;
    cursor: pointer;
}

.speedbrochures-formats-choix button.actif {
    background: #16803c;
    color: #fff;
    border-color: #16803c;
}

.speedbrochures-format-apercu {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    min-height: 155px;
}

#speedbrochures-format-visuel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 145px;
}

.speedbrochures-format-feuille {
    background: white;
    border: 2px solid #16803c;
    box-shadow: 3px 4px 8px rgba(0,0,0,.12);
    flex-shrink: 0;
}

#speedbrochures-format-dimensions {
    font-weight: 600;
    color: #334155;
}

@media (max-width: 480px) {
    .speedbrochures-format-apercu {
        gap: 12px;
    }
}

/* Speedcartes — harmonisation graphique avec Speedthese */
.speedbrochures-formats {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.speedbrochures-formats h3 {
    color: #00853f;
    font-weight: 700;
    text-align: left;
    font-size: 17px;
}

.speedbrochures-formats-choix button {
    background: #fff;
    color: #333;
    border: 2px solid #dedede;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 600;
    transition: background-color .15s, border-color .15s;
}

.speedbrochures-formats-choix button:hover {
    border-color: #16833a;
}

.speedbrochures-formats-choix button.actif {
    background: #16833a;
    color: #fff;
    border-color: #16833a;
}

.speedbrochures-impression {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5e5e5;
}

.speedbrochures-format-feuille {
    border-color: #16833a;
}

/* Sélecteur illustré Noir et blanc / Couleur */
.speedbrochures-couleur {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5e5e5;
}

.speedbrochures-couleur-choix {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.speedbrochures-couleur-choix button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #fff;
    color: #333;
    border: 2px solid #dedede;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.speedbrochures-couleur-choix button img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.speedbrochures-couleur-choix button:hover {
    border-color: #16833a;
}

.speedbrochures-couleur-choix button.actif {
    background: #16833a;
    color: #fff;
    border-color: #16833a;
}

/* Papiers réservés au noir et blanc */
.speedbrochures-grammage-choix button:disabled {
    opacity: .35;
    cursor: not-allowed;
    background: #f2f2f2;
    color: #777;
    border-color: #ddd;
}

/* Pelliculage illustré — présentation identique au Livre */
.speedbrochures-pelliculage-choix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.speedbrochures-pelliculage-choix button {
    min-width: 0;
    padding: 10px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
}

.speedbrochures-pelliculage-choix button img {
    display: block;
    width: 100%;
    max-height: 110px;
    object-fit: contain;
    margin: 8px auto;
}

.speedbrochures-pelliculage-choix button strong {
    display: block;
    font-size: 13px;
}

.speedbrochures-pelliculage-choix button.actif {
    border-color: #16833a;
    background: #edf7f0;
}

.speedbrochures-pelliculage[hidden] {
    display: none !important;
}

/* Pelliculage désactivé hors 350 g */
.speedbrochures-pelliculage-inactif .speedbrochures-pelliculage-choix {
    opacity: .4;
}
.speedbrochures-pelliculage-inactif .speedbrochures-pelliculage-choix button {
    cursor: not-allowed;
}
.speedbrochures-pelliculage h3 small {
    font-size: 12px;
    font-weight: 400;
    color: #777;
}

/* Description dynamique du papier */
#speedbrochures-infos-papiers {
    margin-top: 14px;
    padding: 16px 18px;
    background: #edf7f0;
    border: 1px solid #c9e8d1;
    border-left: 4px solid #16833a;
    border-radius: 8px;
}
.speedbrochures-info-papier[hidden] { display: none !important; }
.speedbrochures-info-papier strong {
    display: block;
    color: #00853f;
    margin-bottom: 6px;
}
.speedbrochures-info-papier p {
    margin: 0;
    line-height: 1.55;
}

/* Tableau des quantités Flyers — présentation du Livre */
#speedbrochures-tableau-quantites {
    margin-bottom: 24px;
}

#speedbrochures-tableau-quantites h3 {
    color: #11853b;
    font-size: 17px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 12px;
}

.speedbrochures-quantites-grille {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.speedbrochures-quantite-entete {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    font-weight: 700;
}

.speedbrochures-quantite-ligne {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    color: #333;
}

.speedbrochures-quantite-ligne:hover {
    border-color: #16833a;
}

.speedbrochures-quantite-ligne.actif {
    border: 2px solid #16833a;
    background: #edf7f0;
}

.speedbrochures-quantite-prix {
    color: #11853b;
    font-weight: 700;
}

.speedbrochures-quantite-personnalisee {
    margin-top: 15px;
    padding: 16px;
    background: #f7f9f8;
    border: 1px solid #d5e5da;
    border-radius: 10px;
}

.speedbrochures-quantite-personnalisee label {
    display: block;
    color: #11853b;
    font-weight: 700;
    margin-bottom: 10px;
}

#speedbrochures-quantite-saisie {
    width: 110px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#speedbrochures-prix-personnalise {
    color: #11853b;
    margin-left: 12px;
}

.speedbrochures-quantite-personnalisee small {
    display: block;
    margin-top: 10px;
}

/* Speedcartes — configurateur sur deux colonnes */
.speedbrochures-colonnes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.speedbrochures-options {
    min-width: 0;
}

.speedbrochures-colonne-prix {
    min-width: 0;
    position: sticky;
    top: 20px;
}

@media (max-width: 991px) {
    .speedbrochures-colonnes {
        grid-template-columns: 1fr;
    }

    .speedbrochures-colonne-prix {
        position: static;
    }
}

/* Produit 7 — masquer les éléments d'achat PrestaShop natifs */
body.product-id-9 .product-prices,
body.product-id-9 .product-add-to-cart,
body.product-id-9 .product-quantity,
body.product-id-9 .product-actions .add-to-cart,
body.product-id-9 .wishlist-button-add {
    display: none !important;
}

/* Flyers — structure identique au Livre */
.speedbrochures-colonnes {
    display: grid;
    grid-template-columns: minmax(420px, 2fr) minmax(320px, 1fr);
    gap: 30px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.speedbrochures-options,
.speedbrochures-colonne-prix {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 25px;
    box-sizing: border-box;
    min-width: 0;
}

.speedbrochures-colonne-prix {
    position: sticky;
    top: 20px;
    height: fit-content;
}

@media (max-width: 850px) {
    .speedbrochures-colonnes {
        grid-template-columns: minmax(0, 1fr);
    }

    .speedbrochures-colonne-prix {
        position: static;
    }
}

/* Produit 7 — remplacer la fiche standard par Speedcartes */
body.product-id-9 .js-product-container {
    display: none !important;
}

body.product-id-9 .speedbrochures-configurateur {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Flyers — zone de dépôt PDF */
.speedbrochures-pdf-section {
    margin-bottom: 24px;
}

.speedbrochures-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    padding: 24px;
    border: 2px dashed #16833a;
    border-radius: 12px;
    background: #f2faf4;
    color: #333;
    text-align: center;
    cursor: pointer;
}

.speedbrochures-dropzone:hover,
.speedbrochures-dropzone.survol {
    background: #e4f4e8;
    border-color: #00853f;
}

.speedbrochures-drop-icon {
    font-size: 42px;
    color: #00853f;
}

#speedbrochures-pdf-nom {
    color: #00853f;
    font-weight: 700;
    overflow-wrap: anywhere;
}

#speedbrochures-pdf-apercu {
    margin-top: 20px;
}

#speedbrochures-pdf-frame {
    width: 100%;
    height: 450px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#speedbrochures-pdf-apercu[hidden] {
    display: none !important;
}

/* Flyers — conserver le visualiseur des formats */
.speedbrochures-format-apercu {
    display: flex;
    align-items: center;
    min-height: 155px;
}

#speedbrochures-format-visuel {
    display: block;
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 145px;
    flex: 0 0 120px;
}

#speedbrochures-format-dimensions {
    flex: 1;
    min-width: 0;
}

/* Adaptation PDF : même style que les descriptions de papier */
#speedbrochures-adaptation:not([hidden]) {
  display: block;
  background: #edf8ee;
  border: 1px solid #b9dfbe;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  color: #245c30;
}

#speedbrochures-adaptation strong {
  display: block;
  font-weight: 700;
  margin-bottom: 9px;
}

#speedbrochures-adaptation p {
  margin: 0 0 12px;
  line-height: 1.5;
}

#speedbrochures-adaptation label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

#speedbrochures-adaptation input[type="checkbox"] {
  margin-top: 4px;
  accent-color: #27843c;
}

/* Formats non disponibles après analyse du PDF */
.speedbrochures-formats-choix button:disabled {
  background: #d5d5d5 !important;
  border: 2px solid #b7b7b7 !important;
  color: #858585 !important;
  opacity: 0.55 !important;
  filter: grayscale(100%) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.speedbrochures-formats-choix button:disabled * {
  color: #858585 !important;
}


/* Explication affichée après tentative de sélection */
#speedbrochures-info-formats-bloques:not([hidden]) {
  display: block;
  background: #f1f1f1;
  border: 1px solid #d5d5d5;
  border-radius: 10px;
  padding: 12px 15px;
  margin: 12px 0;
  color: #555;
  font-size: 13px;
  line-height: 1.5;
}

/* Format incompatible : aspect désactivé, clic explicatif autorisé */
.speedbrochures-formats-choix button.speedbrochures-format-bloque {
  background: #d5d5d5 !important;
  border: 2px solid #b7b7b7 !important;
  color: #858585 !important;
  opacity: 0.55 !important;
  filter: grayscale(100%) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}
.speedbrochures-formats-choix button.speedbrochures-format-bloque * {
  color: #858585 !important;
}

/* Messages de format : présentation identique */
#speedbrochures-adaptation:not([hidden]),
#speedbrochures-info-formats-bloques:not([hidden]) {
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 15px;
  margin: 12px 0;
}

/* Aperçu PDF.js — Flyers */
#speedbrochures-pdf-frame.speedbrochures-pages-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 15px;
  background: #f3f4f5;
  border-radius: 10px;
}

.speedbrochures-page-pdf {
  position: relative;
  max-width: 100%;
  height: auto;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.speedbrochures-page-pdf canvas {
  display: block;
  max-width: 100%;
}

.speedbrochures-zone-jaune {
  position: absolute;
  border: 2px dashed #e6b800;
  background: rgba(255, 215, 0, .10);
  pointer-events: none;
  box-sizing: border-box;
}

#speedbrochures-zone-acceptation:not([hidden]) {
  display: block;
  margin-top: 15px;
  padding: 12px 15px;
  background: #edf8ee;
  border: 1px solid #b9dfbe;
  border-radius: 10px;
  font-size: 13px;
}

#speedbrochures-zone-acceptation label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

#speedbrochures-zone-acceptee {
  margin-top: 3px;
  accent-color: #27843c;
}


/* Correction aperçu PDF.js : hauteur automatique */
#speedbrochures-pdf-frame.speedbrochures-pages-pdf {
  height: auto !important;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.speedbrochures-page-pdf {
  flex-shrink: 0;
}

/* Zone de tranquillité : zone extérieure jaune hachurée */
.speedbrochures-page-pdf {
  overflow: hidden !important;
}

.speedbrochures-zone-jaune {
  background: transparent !important;
  border: 2px dashed #e6b800 !important;
  box-shadow: 0 0 0 100px rgba(255, 215, 0, .18) !important;
  clip-path: none !important;
}

.speedbrochures-zone-jaune::before {
  content: "";
  position: absolute;
  inset: -100px;
  padding: 100px;
  box-sizing: border-box;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    rgba(90, 90, 90, .28) 0px,
    rgba(90, 90, 90, .28) 2px,
    transparent 2px,
    transparent 8px
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.speedbrochures-zone-jaune[hidden] {
  display: none !important;
}

/* SPEEDIMPTARIF — Zone PDF harmonisée avec Speedthese */
.speedbrochures-dropzone.speedbrochures-dropzone-pdf {
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:8px;
    width:100%;
    min-height:180px;
    padding:20px;
    border:2px dashed #b8b8b8;
    border-radius:12px;
    background:#fafafa;
    cursor:pointer;
    transition:all .25s ease;
    box-sizing:border-box;
    text-align:center;
}

.speedbrochures-dropzone.speedbrochures-dropzone-pdf:hover {
    border-color:#00853f;
    background:#f2fff6;
    transform:scale(1.01);
}

.speedbrochures-dropzone-pdf .speedbrochures-drop-icon-svg svg {
    fill:none;
    stroke:#00853f;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.speedbrochures-dropzone-pdf .speedbrochures-drop-title {
    font-size:24px;
    font-weight:bold;
    margin-bottom:2px;
}

.speedbrochures-dropzone-pdf .speedbrochures-drop-subtitle {
    font-size:16px;
    color:#666;
}

.speedbrochures-dropzone-pdf .speedbrochures-drop-link {
    color:#00853f;
    font-weight:bold;
    text-decoration:underline;
}

.speedbrochures-dropzone-pdf:hover .speedbrochures-drop-link {
    color:#00652e;
}

.speedbrochures-dropzone-pdf .speedbrochures-drop-filename {
    margin-top:10px;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:15px;
    font-weight:bold;
    color:#00853f;
}


/* SPEEDIMPTARIF — Bouton ajouter au panier */
.speedbrochures-panier {
    margin-top: 24px;
    text-align: center;
}

.speedbrochures-btn-panier {
    display: block;
    width: 100%;
    padding: 17px 24px;
    background: #00853f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}

.speedbrochures-btn-panier:hover:not(:disabled) {
    background: #006b32;
}

.speedbrochures-btn-panier:disabled {
    background: #a9b5ae;
    cursor: not-allowed;
    opacity: .7;
}

#speedbrochures-panier-message {
    margin-top: 10px;
    font-size: 14px;
}


/* Speedcartes — Choix du dépôt de fichier */
.speedbrochures-depot-choix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-bottom: 15px;
}

.speedbrochures-depot-choix > .speedbrochures-dropzone,
.speedbrochures-depot-choix > .speedbrochures-pdf-ulterieur {
  width: 100%;
  min-height: 160px;
  height: 100%;
  box-sizing: border-box;
}

.speedbrochures-pdf-ulterieur {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 20px;
  border: 2px dashed #b8ddc3;
  border-radius: 10px;
  background: #f8fcf9;
  cursor: pointer;
}

.speedbrochures-pdf-ulterieur:hover,
.speedbrochures-pdf-ulterieur:has(input:checked) {
  background: #edf7f0;
  border-color: #32854c;
}

.speedbrochures-pdf-ulterieur input {
  width: 20px;
  height: 20px;
  accent-color: #32854c;
}

.speedbrochures-ulterieur-titre {
  font-weight: 700;
  color: #245c38;
}

.speedbrochures-ulterieur-description {
  font-size: 12px;
  color: #555;
}

@media (max-width: 650px) {
  .speedbrochures-depot-choix {
    grid-template-columns: 1fr;
  }
}

/* Speedcartes : deux blocs de dépôt côte à côte */
.speedbrochures-pdf-section .speedbrochures-depot-choix {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: stretch !important;
    width: 100% !important;
}

.speedbrochures-pdf-section .speedbrochures-depot-choix > .speedbrochures-dropzone,
.speedbrochures-pdf-section .speedbrochures-depot-choix > .speedbrochures-pdf-ulterieur {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 175px !important;
    height: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.speedbrochures-pdf-ulterieur .speedbrochures-ulterieur-titre {
    font-size: 17px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}

.speedbrochures-pdf-ulterieur .speedbrochures-ulterieur-description {
    font-size: 13px !important;
    line-height: 1.5 !important;
}

@media (max-width: 650px) {
    .speedbrochures-pdf-section .speedbrochures-depot-choix {
        grid-template-columns: 1fr !important;
    }
}


/* Speedcartes — visualiseur de formats A3 à A6 */
.speedbrochures-format-apercu {
    min-height: 190px;
    align-items: center;
}

#speedbrochures-format-visuel {
    width: 145px;
    min-width: 145px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 145px;
}

#speedbrochures-format-visuel .speedbrochures-format-feuille {
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
}
.speedbrochures-quantite-personnalisee label { text-align: left !important; justify-self: start !important; margin-left: 0 !important; }


/* Validation de la zone de tranquillité */
#speedbrochures-zone-acceptation:not([hidden]) {
  padding: 16px 18px;
  background: #f0f9f2;
  border: 1px solid #b8dec2;
  border-left: 4px solid #298747;
  border-radius: 10px;
}
#speedbrochures-zone-acceptation label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  margin: 0;
  text-align: left;
  cursor: pointer;
}
#speedbrochures-zone-acceptee {
  width: 21px;
  height: 21px;
  min-width: 21px;
  margin: 0;
  accent-color: #298747;
  cursor: pointer;
}
#speedbrochures-zone-acceptation .speedbrochures-zone-texte {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
#speedbrochures-zone-acceptation .speedbrochures-zone-texte strong {
  color: #23733b;
  font-size: 15px;
  font-weight: 700;
}
#speedbrochures-zone-acceptation .speedbrochures-zone-texte small {
  color: #485b4d;
  font-size: 13px;
  line-height: 1.5;
}



/* Centrage des dimensions sous le visualisateur — Produit 7 */
.speedbrochures-formats-droite .speedbrochures-format-apercu {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.speedbrochures-formats-droite #speedbrochures-format-dimensions {
    display: block;
    width: 100%;
    text-align: center !important;
    margin: 8px auto 0;
}

/* Ajustement horizontal des dimensions — Produit 7 */
#speedbrochures-format-dimensions {
    position: relative !important;
    left: -20px !important;
}


/* Trois choix de dépôt : PDF, première image, ou envoi ultérieur. */
.speedbrochures-pdf-section .speedbrochures-depot-choix.speedbrochures-depot-trois {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
.speedbrochures-depot-trois .speedbrochures-upload-card {
  padding: 20px 14px;
  gap: 10px;
  border: 2px dashed #c9d7ce;
  border-radius: 12px;
  background: #fafcfb;
  color: #245c38;
  justify-content: flex-start;
  transition: border-color .15s, background .15s;
}
.speedbrochures-depot-trois .speedbrochures-upload-card:hover,
.speedbrochures-depot-trois .speedbrochures-upload-card.survol,
.speedbrochures-depot-trois .speedbrochures-upload-card.speedbrochures-depot-selectionne {
  border-color: #00853f;
  background: #f0f9f3;
  transform: none;
}
.speedbrochures-upload-card:focus-visible,
.speedbrochures-dropzone-verso:focus-visible { outline: 3px solid #75b68c; outline-offset: 3px; }
.speedbrochures-upload-type {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: #e5f1e9;
  color: #087443;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
}
.speedbrochures-depot-trois .speedbrochures-drop-title,
.speedbrochures-depot-trois .speedbrochures-ulterieur-titre {
  font-size: 17px !important;
  line-height: 1.35 !important;
  font-weight: 700;
  color: #245c38;
}
.speedbrochures-depot-trois .speedbrochures-drop-subtitle,
.speedbrochures-depot-trois .speedbrochures-upload-help,
.speedbrochures-depot-trois .speedbrochures-ulterieur-description {
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #5e6b63;
}
.speedbrochures-drop-link { color: #087443; text-decoration: underline; }
.speedbrochures-depot-trois .speedbrochures-drop-filename,
.speedbrochures-dropzone-verso .speedbrochures-drop-filename {
  max-width: 100%; overflow-wrap: anywhere; white-space: normal;
  font-size: 12px; font-weight: 600; color: #087443; margin-top: 2px;
}
.speedbrochures-depot-trois .speedbrochures-pdf-ulterieur input { margin: auto 0 0; flex-shrink: 0; }
.speedbrochures-upload-limits { margin: 8px 0 16px; color: #738078; font-size: 12px; line-height: 1.5; }
.speedbrochures-images-verso[hidden] { display: none !important; }
.speedbrochures-images-verso { margin: 18px 0; }
.speedbrochures-dropzone-verso { min-height: 120px; padding: 18px; gap: 8px; border-color: #b8ddc3; background: #f8fcf9; }
.speedbrochures-dropzone-verso .speedbrochures-drop-title { font-size: 18px; font-weight: 700; }
.speedbrochures-dropzone-verso .speedbrochures-drop-subtitle { font-size: 13px; }
#speedbrochures-retirer-verso { margin-top: 10px; }
@media (max-width: 650px) {
  .speedbrochures-pdf-section .speedbrochures-depot-choix.speedbrochures-depot-trois { grid-template-columns: 1fr !important; }
  .speedbrochures-pdf-section .speedbrochures-depot-trois > .speedbrochures-upload-card { min-height: 155px !important; }
}

/* Page autonome de préparation des cartes de visite. */
.speedbrochures-intro { max-width: 960px; color: #555; line-height: 1.65; margin-bottom: 28px; }
.speedbrochures-summary { line-height: 1.6; }
.speedbrochures-summary dl { margin: 20px 0; }
.speedbrochures-summary dt { color: #6a756e; font-size: 12px; margin-top: 12px; }
.speedbrochures-summary dd { color: #245c38; margin: 2px 0 0; font-weight: 600; }
.speedbrochures-pending { background: #f1f6f3; border: 1px solid #dce8df; padding: 16px; border-radius: 8px; color: #466151; font-size: 14px; line-height: 1.6; }
.speedbrochures-pending strong { display: block; color: #087443; }
.speedbrochures-quantity { display: block; max-width: 150px; padding: 10px; border: 1px solid #cbd5d1; border-radius: 7px; margin-top: 8px; }
.speedbrochures-format-section { display: grid; grid-template-columns: 1fr 160px; align-items: center; gap: 20px; margin: 25px 0; }
.speedbrochures-format-apercu { flex-direction: column; justify-content: center; gap: 8px; margin: 0; }
.speedbrochures-color-only { display: inline-block; border: 2px solid #087443; color: #087443; background: #f0f9f3; padding: 10px 18px; border-radius: 8px; font-weight: 600; }
.speedbrochures-preview-note { color: #728078; font-size: 12px; line-height: 1.5; margin: 0 0 15px; }
@media (max-width: 550px) { .speedbrochures-format-section { grid-template-columns: 1fr; } }

/* La page générique PrestaShop est étroite : élargissement limité au produit 8. */
body.product-id-9 #content.page-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.speedbrochures-configurateur { width: 100%; }
.speedbrochures-formats { padding: 0; border: 0; background: transparent; }
.speedbrochures-colonnes { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; }
.speedbrochures-couleur,
.speedbrochures-faces,
.speedbrochures-grammage,
.speedbrochures-pelliculage { margin-top: 26px; }
.speedbrochures-faces-choix,
.speedbrochures-grammage-choix,
.speedbrochures-pelliculage-faces-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.speedbrochures-faces-choix button,
.speedbrochures-grammage-choix button,
.speedbrochures-pelliculage-faces-choix button {
  padding: 10px 15px; border: 2px solid #dedede; border-radius: 8px;
  background: #fff; color: #33443a; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.speedbrochures-faces-choix button.actif,
.speedbrochures-grammage-choix button.actif,
.speedbrochures-pelliculage-faces-choix button.actif { background: #087443; border-color: #087443; color: #fff; }
.speedbrochures-faces-choix button:disabled:not(.actif),
.speedbrochures-pelliculage-faces-choix button:disabled { opacity: .4; cursor: not-allowed; }
#speedbrochures-papier-description { font-size: 14px; }
@media (max-width: 850px) {
  .speedbrochures-colonnes { grid-template-columns: minmax(0, 1fr); }
  .speedbrochures-colonne-prix { position: static; }
}

/* Conseils de format, coins et illustration de l’impression couleur. */
.speedbrochures-format-conseil { margin: 14px 0 0; color: #5b6c61; font-size: 14px; line-height: 1.6; }
.speedbrochures-coins { margin-top: 26px; }
.speedbrochures-coins-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.speedbrochures-coins-choix button {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 15px;
  border: 2px solid #dedede; border-radius: 8px; background: #fff;
  color: #33443a; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.speedbrochures-coins-choix button.actif { background: #087443; border-color: #087443; color: #fff; }
.speedbrochures-coin-icone { display: inline-block; width: 23px; height: 18px; border: 2px solid currentColor; }
.speedbrochures-coin-arrondi { border-radius: 6px; }
.speedbrochures-color-only {
  display: inline-flex; flex-direction: column; align-items: center; gap: 9px;
  min-width: 140px; padding: 14px 22px; cursor: default;
}
.speedbrochures-color-only img { display: block; width: 112px; height: 62px; object-fit: contain; }
.speedbrochures-grammage-choix button[hidden] { display: none !important; }

/* Conseil de dimension présenté comme l’aide au choix du papier. */
.speedbrochures-format-conseil {
  margin-top: 14px; padding: 16px 18px; background: #edf7f0;
  border: 1px solid #c9e8d1; border-left: 4px solid #16833a;
  border-radius: 8px; color: #33443a; line-height: 1.55;
}
.speedbrochures-quantite-ligne[hidden],
.speedbrochures-quantite-personnalisee[hidden] { display: none !important; }

.speedbrochures-options section {border-bottom:1px solid #e5e5e5;padding:18px 0;}
.speedbrochures-options section:first-child {padding-top:0;}
.sb-choices {display:flex;gap:10px;flex-wrap:wrap;}
.sb-choices button {border:2px solid #dedede;border-radius:8px;background:white;padding:12px 16px;cursor:pointer;font-weight:600;display:flex;align-items:center;gap:10px;}
.sb-choices button.actif {background:#16833a;color:white;border-color:#16833a;}
.sb-choices img {width:35px;height:30px;object-fit:contain;}
.sb-help {background:#f3f8f5;border:1px solid #d5e5d9;border-radius:8px;padding:14px 16px;margin:14px 0;font-size:14px;line-height:1.6;}
.speedbrochures-options select {display:block;width:100%;max-width:420px;border:1px solid #ccc;border-radius:7px;padding:12px;background:white;margin-top:8px;}
.sb-upload-choices {display:grid;gap:12px;}.sb-drop {position:relative;display:flex;flex-direction:column;text-align:center;gap:10px;background:#f5faf7;border:2px dashed #16833a;border-radius:10px;padding:30px 16px;cursor:pointer;}.sb-drop input {position:absolute;width:1px;height:1px;opacity:0;}.sb-drop.dragover {background:#d8efdf;}.sb-later {padding:18px;border:1px solid #ddd;border-radius:8px;cursor:pointer;}.sb-later input,.sb-ack input {margin-right:8px;}.sb-format-preview {display:flex;align-items:center;gap:22px;padding:12px 0;}#sb-sheet {background:white;border:2px solid #16833a;box-shadow:3px 4px 8px #ddd;}#sb-upload-status,#sb-cart-status {font-size:14px;margin-top:12px;}.sb-spread {display:flex;justify-content:center;gap:3px;padding:18px;background:#e9edeb;border-radius:8px;align-items:flex-start;}.sb-leaf {width:50%;max-width:300px;position:relative;text-align:center;}.sb-leaf canvas {max-width:100%;height:auto;background:white;box-shadow:0 3px 9px #0002;}.sb-leaf span {display:block;font-size:12px;}.sb-nav {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:15px;}.sb-nav button,#sb-close {background:white;border:1px solid #ccc;border-radius:6px;padding:8px 12px;cursor:pointer;}#sb-dialog {width:95vw;max-width:1200px;border:0;border-radius:12px;padding:20px;max-height:95vh;overflow:auto;}#sb-dialog::backdrop {background:#0009;}#sb-dialog .sb-leaf {max-width:490px;}#sb-dialog .sb-spread {margin-top:15px;}[hidden] {display:none!important;}
@media(max-width:600px){.sb-spread {padding:8px;}.sb-choices button{padding:10px;}#sb-dialog{padding:10px;}}

#sb-quantity {width:110px;padding:9px;border:1px solid #ccc;border-radius:6px;margin-right:12px;}
#sb-custom-price {color:#00853f;white-space:nowrap;}
.sb-later {display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:8px;}

/* Dépôt en deux cartes, repris du configurateur flyer. */
.sb-upload-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch;margin-bottom:12px;}
.sb-upload-choices > .sb-drop,.sb-upload-choices > .sb-later {display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:0;width:100%;min-height:245px;height:100%;margin:0;padding:20px 14px;gap:10px;box-sizing:border-box;border:2px dashed #c9d7ce;border-radius:12px;background:#fafcfb;color:#245c38;text-align:center;cursor:pointer;transition:border-color .15s,background .15s;}
.sb-upload-choices > label:hover,.sb-upload-choices > .sb-drop.dragover,.sb-upload-choices > .sb-later:has(input:checked) {border-color:#00853f;background:#f0f9f3;}
.sb-upload-type {display:inline-block;padding:4px 9px;border-radius:5px;background:#e5f1e9;color:#087443;font-size:11px;font-weight:700;letter-spacing:.6px;}
.sb-upload-choices strong {font-size:17px;line-height:1.35;font-weight:700;color:#245c38;}
.sb-upload-choices .sb-drop > span:not(.sb-upload-type):not(.sb-drop-icon),.sb-upload-choices small,.sb-later-description {font-size:12px;line-height:1.5;color:#5e6b63;}
.sb-drop-link {color:#087443;text-decoration:underline;}
.sb-drop-icon svg {fill:none;stroke:#00853f;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.sb-upload-choices .sb-later input {width:20px;height:20px;margin:auto 0 0;flex-shrink:0;accent-color:#32854c;}
.sb-upload-limits {margin:8px 0 16px;color:#738078;font-size:12px;line-height:1.5;}
@media(max-width:650px){.sb-upload-choices {grid-template-columns:1fr;}.sb-upload-choices > .sb-drop,.sb-upload-choices > .sb-later {min-height:190px;}}

.sb-upload-choices .sb-later input {margin:6px 0 0;}

/* Formats fermé et ouvert : le pointillé représente le pli central. */
.sb-format-previews {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0 4px;}
.sb-format-previews .sb-format-preview {display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px;margin:0;padding:12px 4px;min-width:0;}
.sb-format-paper {height:105px;display:flex;align-items:center;justify-content:center;width:100%;}
#sb-sheet,#sb-sheet-open {position:relative;background:#fff;border:2px solid #16833a;box-shadow:3px 4px 8px #ddd;max-width:100%;box-sizing:border-box;}
#sb-sheet-open::after {content:"";position:absolute;left:50%;top:0;bottom:0;border-left:2px dashed #16833a;transform:translateX(-1px);}
.sb-format-preview figcaption {font-size:13px;line-height:1.5;color:#334155;text-align:center;}
@media(max-width:450px){.sb-format-previews {gap:8px;}.sb-format-preview figcaption {font-size:12px;}}

/* Boutons d’impression identiques à ceux du flyer. */
#sb-colors {display:flex;flex-wrap:wrap;gap:12px;}
#sb-colors button {display:flex;align-items:center;gap:10px;padding:10px 15px;background:#fff;color:#333;border:2px solid #dedede;border-radius:8px;font-weight:600;cursor:pointer;}
#sb-colors button img {width:42px;height:42px;object-fit:contain;}
#sb-colors button:hover {border-color:#16833a;}
#sb-colors button.actif {background:#16833a;color:#fff;border-color:#16833a;}

/* Choix et descriptifs des papiers : même présentation que les flyers. */
.sb-paper-choices {margin-top:12px;gap:8px;}
.sb-paper-choices button {padding:10px 15px;}
.sb-paper-description {margin:14px 0 0;padding:14px 18px;background:#edf7f0;border:1px solid #c2e4ce;border-left:4px solid #16833a;border-radius:8px;font-size:14px;line-height:1.6;}
.sb-paper-description strong {display:block;color:#00853f;font-size:16px;font-weight:700;margin-bottom:4px;}
.sb-paper-description p {margin:0;color:#7a7a7a;line-height:1.6;}
#sb-cover-wrap {margin-top:16px;}

/* Colonne de commande : mêmes encadrés et bouton que le flyer. */
.speedbrochures-colonne-prix .sb-delai {background:#edf7f0;border:1px solid #b8ddc3;border-radius:8px;padding:15px;margin:15px 0;color:#245c38;text-align:left;}
.sb-delai > strong {display:block;font-size:17px;line-height:1.25;}
.sb-delai p {margin:8px 0 0;font-size:12px;line-height:1.6;color:#888;}
#sb-add {display:block;width:100%;padding:17px 24px;background:#00853f;color:#fff;border:none;border-radius:8px;font-size:19px;font-weight:700;cursor:pointer;margin-top:24px;}
#sb-add:hover:not(:disabled) {background:#006b32;}
#sb-add:disabled {background:#a9b5ae;cursor:not-allowed;opacity:.7;}
#sb-cart-status {margin:10px 0 0;font-size:14px;text-align:center;}
.speedbrochures-livraison {margin:15px 0;padding:12px 15px;border:1px solid #d5e5d9;border-radius:8px;background:#f8fbf9;text-align:center;line-height:1.5;}
.speedbrochures-livraison .sb-retrait {color:#287a42;font-weight:700;}
.speedbrochures-livraison .sb-livraison-montant {margin-top:6px;}
.speedbrochures-livraison small {display:block;margin-top:6px;color:#666;font-size:12px;line-height:1.5;}

/* Message d’ajout des pages : contenu centré et action principale visible. */
#sb-page-warning {text-align:center;padding:24px 22px;margin-top:22px;}
#sb-page-warning-text {display:block;line-height:1.6;margin:0 auto;max-width:580px;}
#sb-page-warning .sb-choices {justify-content:center;margin:20px 0;}
#sb-page-warning #sb-pad {display:block;max-width:100%;padding:14px 22px;background:#00853f;border:2px solid #00853f;border-radius:8px;color:#fff;font-weight:700;text-align:center;justify-content:center;line-height:1.5;white-space:normal;}
#sb-page-warning #sb-pad:hover:not(:disabled) {background:#006b32;border-color:#006b32;}
#sb-page-warning #sb-pad:disabled {opacity:.65;cursor:wait;}
#sb-replacement-info {max-width:560px;margin:0 auto;line-height:1.7;color:#777;}
#sb-pad-status {margin:14px 0 0;line-height:1.5;}
#sb-pad-status:empty {display:none;}

#sb-page-warning .sb-warning-heading {display:flex;align-items:center;justify-content:center;gap:12px;}
#sb-page-warning .sb-warning-icon {flex:0 0 28px;}
#sb-page-warning .sb-warning-heading #sb-page-warning-text {margin:0;}

#sb-formats button:disabled {background:#f2f2f2;color:#969c98;border-color:#dedede;opacity:.5;cursor:not-allowed;}
.sb-product-description {margin:30px 0;padding:24px;background:white;border:1px solid #e5e5e5;border-radius:12px;line-height:1.7;}
.sb-product-description h2,.sb-product-description h3 {color:#00853f;font-size:20px;margin:22px 0 12px;}
.sb-product-description h2:first-child {margin-top:0;}
