/* Vitrine publique de campagne — design bde (Big Shoulders Display + wine/sky).
   Signature : la jauge de collecte, qui se remplit a l'arrivee sur la page.
   Layout empile : hero (+ 2 raccourcis) -> le projet en colonne centree ->
   les produits en pleine largeur. */

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

.bcf-hero {
    background: linear-gradient(160deg, #fff 0%, var(--bde-paper) 58%, color-mix(in srgb, var(--bde-primary) 8%, var(--bde-paper)) 100%);
    border-bottom: 1px solid var(--bde-line);
    padding: clamp(28px, 4vw, 52px) 0;
}
.bcf-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}
.bcf-hero-media {
    border-radius: calc(var(--bde-radius) + 6px);
    overflow: hidden; background: #fff; border: 1px solid var(--bde-line);
    aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
}
.bcf-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.bcf-hero-empty svg { width: 76px; height: 76px; color: var(--bde-primary); opacity: .45; }

.bcf-title {
    font-family: var(--bde-font-display); font-weight: 800; text-transform: uppercase;
    letter-spacing: -.5px; font-size: clamp(34px, 4.4vw, 60px); line-height: .98;
    color: var(--bde-ink); margin: 8px 0 0;
}
.bcf-tagline { margin: 14px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: var(--bde-body); max-width: 44ch; }

.bcf-gauge {
    margin-top: 24px; background: #fff; border: 1px solid var(--bde-line);
    border-radius: calc(var(--bde-radius) + 4px); padding: 22px 24px;
    box-shadow: 0 18px 46px -34px color-mix(in srgb, var(--bde-primary) 60%, transparent);
}
.bcf-gauge-bar { height: 16px; border-radius: 999px; background: color-mix(in srgb, var(--bde-line) 60%, #fff); overflow: hidden; }
/* La jauge se remplit de 0 a sa valeur au chargement (fill-mode backwards :
   elle reste a 0 pendant le delai, pas de saut). */
.bcf-gauge-bar > span {
    display: block; height: 100%; border-radius: 999px; min-width: 8px;
    background: linear-gradient(90deg in oklch, var(--bde-primary), var(--bde-secondary));
    width: var(--bcf-fill, 0%);
    animation: bcf-fill 1.15s cubic-bezier(.22, 1, .36, 1) .12s both;
}
@keyframes bcf-fill { from { width: 0; } }
.bcf-gauge-stats { display: flex; flex-wrap: wrap; gap: 16px clamp(18px, 2.4vw, 30px); margin-top: 18px; }
.bcf-stat { display: flex; flex-direction: column; line-height: 1.1; }
.bcf-stat b { font-family: var(--bde-font-display); font-weight: 900; font-size: clamp(20px, 1.9vw, 26px); color: var(--bde-ink); font-variant-numeric: tabular-nums; }
.bcf-stat span { font-size: 12.5px; color: var(--bde-muted); font-weight: 600; margin-top: 2px; }
.bcf-stat--lead b { color: var(--bde-primary); }
/* --- Les deux raccourcis du hero : une destination par section --- */
.bcf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.bcf-action {
    flex: 1 1 190px;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 15px 20px; border-radius: 999px; border: 1.5px solid transparent;
    font-family: var(--bde-font-display); font-weight: 800; font-size: 16px;
    text-transform: uppercase; letter-spacing: .4px; line-height: 1;
    transition: box-shadow .18s, filter .18s, color .18s, border-color .18s;
}
.bcf-action svg { width: 19px; height: 19px; }
.bcf-action:focus-visible { outline: 2px solid var(--bde-secondary); outline-offset: 3px; }
.bcf-action--primary { background: var(--bde-primary); color: #fff; }
.bcf-action--primary:hover {
    color: #fff; filter: brightness(1.09);
    box-shadow: 0 18px 34px -14px color-mix(in srgb, var(--bde-primary) 62%, transparent);
}
.bcf-action--ghost { background: #fff; color: var(--bde-ink); border-color: var(--bde-line-strong); }
.bcf-action--ghost:hover { color: var(--bde-primary); border-color: var(--bde-primary); }

/* --- Le projet : colonne centree a largeur de lecture --- */
.bcf-desc { padding: clamp(46px, 6vw, 86px) 0 clamp(16px, 2vw, 28px); scroll-margin-top: 90px; }
.bcf-desc .bde-wrap { max-width: 820px; }
.bcf-desc-eyebrow { text-align: center; margin-bottom: clamp(20px, 3vw, 32px); }

.bcf-prose { font-family: var(--bde-font-body); font-size: 16.5px; line-height: 1.72; color: var(--bde-body); }
.bcf-prose > *:first-child { margin-top: 0; }
.bcf-prose h2 { font-family: var(--bde-font-display); text-transform: uppercase; letter-spacing: -.3px; font-weight: 800; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.02; color: var(--bde-ink); margin: 34px 0 12px; }
.bcf-prose h3 { font-family: var(--bde-font-display); text-transform: uppercase; letter-spacing: -.2px; font-weight: 700; font-size: clamp(18px, 1.9vw, 22px); color: var(--bde-primary); margin: 26px 0 8px; }
.bcf-prose p { margin: 0 0 16px; }
.bcf-prose strong { color: var(--bde-ink); font-weight: 700; }
.bcf-prose ul, .bcf-prose ol { margin: 0 0 16px; padding-left: 26px; }
.bcf-prose ul { list-style: disc; }
.bcf-prose ol { list-style: decimal; }
.bcf-prose li { margin: 6px 0; }
.bcf-prose li::marker { color: var(--bde-primary); font-weight: 700; }
.bcf-prose blockquote { margin: 0 0 16px; padding: 6px 0 6px 18px; border-left: 3px solid var(--bde-primary); color: var(--bde-muted); font-style: italic; }
.bcf-prose a { color: var(--bde-secondary-ink); text-decoration: underline; }
.bcf-prose img { max-width: 100%; height: auto; border-radius: var(--bde-radius); margin: 12px 0; }
.bcf-prose hr { border: 0; border-top: 1px solid var(--bde-line); margin: 24px 0; }

/* --- Les produits : pleine largeur, sous la description --- */
.bcf-products {
    margin-top: clamp(36px, 5vw, 64px);
    padding: clamp(40px, 5vw, 72px) 0 clamp(56px, 7vw, 96px);
    scroll-margin-top: 90px;
    border-top: 1px solid var(--bde-line);
    background: color-mix(in srgb, var(--bde-primary) 3.5%, var(--bde-paper));
}
.bcf-products-title {
    font-family: var(--bde-font-display); text-transform: uppercase; letter-spacing: -.3px;
    font-weight: 800; font-size: clamp(26px, 3vw, 38px); line-height: 1.02;
    color: var(--bde-ink); text-align: center; margin: 0 0 clamp(26px, 3.4vw, 40px);
}
/* auto-fit + colonne plafonnee : les cartes restent a taille humaine et le rang
   se centre sous le titre, meme quand la campagne n'a qu'un ou deux produits. */
.bcf-products-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
    justify-content: center; gap: clamp(18px, 2.2vw, 26px);
}

.bcf-product { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--bde-line); border-radius: var(--bde-radius); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.bcf-product:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -24px color-mix(in srgb, var(--bde-primary) 55%, transparent); }
/* Le visuel est un declencheur de la modale d'achat, pas un lien : reset de bouton. */
.bcf-product-media {
    aspect-ratio: 1; width: 100%; background: var(--bde-paper);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
}
.bcf-product-media:focus-visible { outline: 2px solid var(--bde-secondary); outline-offset: -2px; }
.bcf-product-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.bcf-product-ph { font-size: 12px; color: var(--bde-muted); text-align: center; padding: 8px; }
.bcf-product-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.bcf-product-title { font-family: var(--bde-font-body); font-size: 14.5px; font-weight: 700; line-height: 1.2; color: var(--bde-ink); margin: 0; }
.bcf-product-title button {
    font: inherit; color: inherit; text-align: left;
    background: none; border: 0; padding: 0; cursor: pointer; transition: color .15s;
}
.bcf-product-title button:hover { color: var(--bde-primary); }
.bcf-product-title button:focus-visible { outline: 2px solid var(--bde-secondary); outline-offset: 3px; border-radius: 3px; }
.bcf-product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.bcf-swatches { display: inline-flex; align-items: center; gap: 4px; }
.bcf-sw { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--bde-line); }
.bcf-sw-more { font-size: 11px; color: var(--bde-muted); font-weight: 600; }
.bcf-product-price { font-family: var(--bde-font-display); font-weight: 900; font-size: 16px; color: var(--bde-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bcf-product-price del { color: var(--bde-muted); font-weight: 600; font-size: 12px; margin-right: 4px; }

/* Bouton « Acheter » sur la carte produit. */
.bcf-buy {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    margin: 2px 13px 14px; padding: 10px 14px; border: 0; border-radius: 999px;
    background: var(--bde-primary); color: #fff; font-family: var(--bde-font-display);
    font-weight: 800; text-transform: uppercase; letter-spacing: .3px; font-size: 13px;
    cursor: pointer; transition: filter .15s;
}
.bcf-buy:hover { filter: brightness(1.09); }
.bcf-buy svg { width: 16px; height: 16px; }

/* Modal d'achat (iframe configurateur). */
.bcf-modal {
    width: min(940px, 94vw); max-width: 94vw; height: 88vh; max-height: 88vh;
    /* margin:auto centre le dialog modal (inset:0) ; un reset global met margin:0. */
    margin: auto;
    padding: 0; border: 0; border-radius: calc(var(--bde-radius) + 6px);
    overflow: hidden; background: #fff;
    box-shadow: 0 40px 90px -30px rgba(26, 20, 23, .55);
}
/* Le ::backdrop n'est pas un element : Motion ne peut pas l'animer. Il suit la
   boite en CSS, la fermeture etant signalee par .is-closing (posee par le
   controleur avant l'animation de sortie). */
.bcf-modal::backdrop { background: rgba(26, 20, 23, .55); animation: bcf-backdrop-in .3s ease both; }
.bcf-modal.is-closing::backdrop { animation: bcf-backdrop-out .2s ease both; }
@keyframes bcf-backdrop-in { from { opacity: 0; } }
@keyframes bcf-backdrop-out { to { opacity: 0; } }
.bcf-modal-frame { width: 100%; height: 100%; border: 0; display: block; }
.bcf-modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: var(--bde-ink);
    transition: background .15s;
}
.bcf-modal-close:hover { background: var(--bde-paper); }
.bcf-modal-close svg { width: 20px; height: 20px; }

/* --- Reveal au scroll. L'etat cache depend de .bcf-js (posee dans le <head>) :
   sans JS, rien n'est masque. --- */
.bcf-js [data-reveal] { opacity: 0; transform: translateY(22px); }
.bcf-js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
    .bcf-js [data-reveal] {
        transition: opacity .55s cubic-bezier(.22, 1, .36, 1), transform .55s cubic-bezier(.22, 1, .36, 1);
        transition-delay: var(--d, 0ms);
    }
}
@media (prefers-reduced-motion: reduce) {
    .bcf-js [data-reveal] { opacity: 1; transform: none; }
    .bcf-gauge-bar > span { animation: none; }
    .bcf-product:hover { transform: none; }
    .bcf-modal::backdrop, .bcf-modal.is-closing::backdrop { animation: none; }
}

@media (max-width: 900px) {
    .bcf-hero-grid { grid-template-columns: 1fr; }
    .bcf-hero-media { aspect-ratio: 16 / 10; }
    .bcf-modal { width: 100vw; max-width: 100vw; height: 92vh; max-height: 92vh; border-radius: 0; }
}
