/* 3. RENDU DE L'AFFICHE (V2.4 - Ajustements Fonts et Layout) */

/* ... (Structure inchangée) ... */
.A5, .A4 { width: 148mm; height: 210mm; }
#affiche.landscape { width: 210mm; height: 148mm; }
#affiche {
  width: 148mm; height: 210mm; background: white;
  position: relative; overflow: hidden; display: flex;
  flex-direction: column; align-items: center;
  transform-origin: center center; font-size: 10pt;
  transition: transform 0.1s linear;
  
  --font-primary: 'Poppins', sans-serif; --font-primary-weight: 700;
  --font-secondary: 'Open Sans', sans-serif; --font-secondary-weight: 400;
  --color-primary: #1B5E20; --color-text: #333333; --color-promo: #D75000;
}

@media screen { body:not(.exporting) #affiche { box-shadow: 0 0 0 5mm white, 0 0 0 5.2mm rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.3); } }
.exporting #affiche { box-shadow: none !important; }
@media print {
    #affiche { box-shadow: none !important; }
    #loginModal, .config-panel, .input-panel, #pdfBtnGroup, .modal-overlay, #settingsPanel, .app-header { display: none !important; }
    body, .container, .main-content, .preview-wrapper, .printContainer, .preview-area-refined { background: none !important; margin: 0 !important; padding: 0 !important; border: none !important; height: auto !important; overflow: visible !important; }
    #affiche, #affiche * { visibility: visible !important; print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
    #affiche { position: relative !important; top: 0 !important; left: 0 !important; margin: 0 !important; padding: 0 !important; transform: none !important; page-break-after: always; }
    @page { margin: 0; }
}

/* ÉLÉMENTS COMMUNS */
.latin-name { font-family: var(--font-secondary); font-weight: 600; padding: 0.3em 0.6em; text-align: center; width: 100%; font-size: 1.7em; height: 1.9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.common-name { font-family: var(--font-primary); font-weight: var(--font-primary-weight); font-size: 2.8em; text-align: center; line-height: 1.1; min-height: 1.5em; word-break: break-word; display: flex; padding: 0 0.5em; flex-direction: column; justify-content: center; align-items: center; flex-shrink: 0; }
.affiche:not(.non-vegetal) .common-name { height: 3em; }
.image-wrapper { width: 100%; height: 70mm; position: relative; overflow: hidden; flex-grow: 1; display: block; }
.plant-img { width: 100%; height: 100%; object-fit: cover; display: block; background-size: cover; background-position: center; background-repeat: no-repeat; }
.style-logo { position: absolute; top: 1.5em; width: 7em; border-radius: 5px; z-index: 10; transition: transform 0.2s; transform-origin: top right; }
.style-logo-filigrane { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60%; max-width: 20em; z-index: 1; opacity: 0.2; border-radius: 5px; }
.non-vegetal-header { width: 100%; padding: 1em; text-align: center; position: relative; flex-shrink: 0; }
.affiche.landscape .non-vegetal-header { padding: 0.5em; }
.style-logo-nv { height: 6em; width: auto; filter: brightness(0) invert(1); }
.affiche.landscape .style-logo-nv { height: 4em; }
.vegetal-content, .non-vegetal-content { flex-grow: 1; width: 100%; display: flex; justify-content: space-between; align-items: center; align-content: center; padding: 1em; flex-direction: column; }
.non-vegetal-content { padding: 2em; }
.affiche.landscape .non-vegetal-content { padding: 0.5em;}

/* OPTIONS VISUELLES GLOBALES (Quick Wins) */
.affiche.grayscale-icons .icon-item-img, 
.affiche.grayscale-icons .info-icon { filter: grayscale(100%); opacity: 0.7; }

.affiche.hide-latin .latin-name { display: none !important; }

/* Correction Centimes Alignés */
.affiche.cents-aligned .plant-price .prix-harmonise-cents,
.affiche.cents-aligned .promo-price-new .prix-harmonise-cents,
.affiche.cents-aligned .tarif-item-price .prix-harmonise-cents {
    font-size: 1em !important; 
    vertical-align: baseline !important;
    margin-left: 0 !important;
}

/* CONSEIL */
.type-conseil #infoGrid { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 0.5em; grid-gap: 0.3em; flex-shrink: 0; width: 100%; }
.type-conseil .info-item { display: flex; padding: 0.2em; gap: 0.05em; flex-direction: column; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.type-conseil .info-icon { width: 2.2em; height: 2.2em; }
.info-details { display: flex; flex: 1; justify-content: flex-start; flex-direction: row; text-align: center; align-items: center; }
.info-header { margin-bottom: 0em; align-content: center; text-align: left; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.info-header hr { height: 4px; border: none; border-radius: 2px; margin: 2px 0 0 0.5em; width: 80%; }
.info-header span { font-family: var(--font-primary); font-weight: 600; font-size: 0.9em; margin-left: 0.5em; text-transform: uppercase; }
.type-conseil .info-text { font-family: var(--font-secondary); font-weight: 400; font-size: 0.85em; line-height: 1.2; flex-grow: 1; padding: 0.2em 0.5em; text-align: left; }

/* GRID ICONES */
.poster-grid-icones { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8em; padding: 1em; width: 100%; flex-grow: 1; align-content: center; }
.icon-item { display: flex; flex-direction: column; align-items: center; text-align: center; width: 10%; min-width: 3.5em; }
.icon-item-img { width: 100%; max-width: 5em; height: auto; aspect-ratio: 1/1; object-fit: contain; margin-bottom: 0.5em; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1)); }
.icon-item-text { font-family: var(--font-secondary); font-size: 0.6em; line-height: 1.2; color: var(--color-text); margin: 0; word-break: break-word; }
.resume-text { font-family: var(--font-secondary); font-style: italic; text-align: center; padding: 1em; font-size: 1.1em; color: var(--color-text); }

/* PRIX */
.price-section { flex-grow: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 1em; }

/* MODIFICATION : Taille par défaut "Taille" à 1.8em */
.plant-size { font-family: var(--font-primary); font-weight: 600; font-size: 1.8em; text-align: center; border-bottom: 2px solid #eee; padding-bottom: 0.5em; margin-bottom: 0.5em; width: 90%; }

.plant-price { font-family: var(--font-primary); font-weight: 800; text-align: center; line-height: 1; font-size: 7em; margin-top: 0.1em; }
.non-vegetal-price-large { font-size: 11em; }
.price-per-unit, .product-info-condensed, .product-info-complementaire { font-family: var(--font-secondary); text-align: center; color: var(--color-text); }
.price-per-unit { font-weight: 700; font-size: 2.2em; margin-top: 0.5em;}
.product-info-condensed { font-weight: 600; font-size: 1.6em; }

/* MODIFICATION : Taille par défaut "Infos Compl" à 1.8em */
.product-info-complementaire { font-size: 1.8em; }

.prix-harmonise-int { font-size: 1em; }
.prix-harmonise-cents { font-size: 0.6em; vertical-align: top; margin-left: 2px; }

/* PROMO */
.wrapper-promo-section { padding: 1em; width: 100%; display: flex; min-height: 25em; flex-grow: 1;}
.promo-section { position: relative; flex-grow: 1; width: 100%; display: flex; flex-direction: column; justify-content:space-between; align-items:center; align-content: space-between; padding: 1em 1em 1em 1em; text-align: center; }
.promo-title { font-family: var(--font-primary); font-weight: 900; font-size: 2.5em; text-transform: uppercase; padding: 0.1em 0.5em; border-radius: 5px; position: relative; margin: 0; }
.promo-price-main { font-family: var(--font-primary); font-weight: 900; font-size: 6em; line-height: 1; margin: 0.1em 0; }
.promo-price-new { font-family: var(--font-primary); font-weight: 900; font-size: 6em; line-height: 1; }
.promo-price-old { font-family: var(--font-secondary); font-size: 3em; font-weight: 300; text-decoration: line-through !important; opacity: 0.8; }
.promo-remise-percent { font-family: var(--font-primary); font-weight: 900; font-size: 7em; line-height: 1; margin-top: 0.2em; }
.promo-remise-details { display: flex; align-items: center; gap: 1em; justify-content: center; flex-wrap: wrap; }
.promo-offert-main { font-family: var(--font-primary); font-weight: 800; font-size: 4em; line-height: 1.1; }
.promo-offert-main span { font-size: 1.2em; }
.promo-size, .promo-disclaimer, .promo-price-sub, .promo-lot-details { font-family: var(--font-secondary); color: var(--color-text); }
.promo-size { font-weight: 700; font-size: 1.8em; margin-top: 0.5em; }
.promo-lot-details { font-weight: 600; font-size: 3em; margin-top: 0; color: var(--color-text); }
.promo-price-sub { font-size: 1em; opacity: 0.9; margin-top: 0em; }

/* TEXTE */
.simpletexte { font-family: var(--font-primary); font-weight: 800; font-size: 4em; text-align: center; line-height: 1.2; margin: auto;}
.advanced-text-content { width: 100%; height: 100%; font-family: var(--font-secondary); font-size: 1.5em; text-align: left; overflow: hidden; }
.advanced-text-content h1, .advanced-text-content h2 { font-family: var(--font-primary); }
.horaires-container, .horaires-exceptionnel { font-family: var(--font-primary); width: 100%; text-align: center; margin:auto;}
.horaires-titre { font-size: 3.5em; font-weight: 900; border-bottom: 0.1em solid; display: inline-block; }
.horaires-ligne { font-size: 2.2em; display: flex; flex-direction: column; margin-bottom: 0.5em; line-height: 2em;}
.horaires-heures { font-weight: 800; }
.horaires-ex-titre { font-size: 3em; font-weight: 600; }
.horaires-ex-jour { font-size: 5em; font-weight: 900; margin: 0.2em 0; }
.horaires-ex-sub { font-size: 2em; font-family: var(--font-secondary); }

/* Définition des tailles de base (remplace les valeurs fixes précédentes) */
.plant-size { --base-size: 2.5em; }
.plant-price { --base-size: 7em; }
.common-name { --base-size: 2.8em; } /* 3.5em ou 4em selon contexte, ici défaut */
.product-info-condensed { --base-size: 1.6em; }
.product-info-complementaire { --base-size: 1.8em; }
.price-per-unit { --base-size: 2.2em; }
.promo-size { --base-size: 1.8em; }
.simpletexte { --base-size: 4em; }
.horaires-titre { --base-size: 3.5em; }
.horaires-jours { --base-size: 1.5em; margin: 0.3em auto;} /* Base du conteneur ligne */
.horaires-heures { --base-size: 2.2em; } /* Relatif au parent ligne */
.product-info-condensed { 
    font-weight: 600; 
    font-size: 1.6em; 
    margin: 0.5em auto; 
}
/* Styles spécifiques pour Non-Vegetal Prix */
.non-vegetal-price-large { --base-size: 11em; }

/* Application de la taille dynamique */
.plant-size, 
.plant-price, 
.common-name, 
.product-info-condensed, 
.product-info-complementaire, 
.price-per-unit,
.promo-size,
.simpletexte,
.horaires-titre,
.horaires-jours,
.horaires-heures {
    /* La taille finale est la taille de base + le delta (défaut 0pt) */
    /* Note: --font-size-delta est injecté en inline style */
    font-size: calc(var(--base-size) + var(--font-size-delta, 0pt)) !important;
}