/* Catalogue progressif : sans JavaScript, la grille et ses fiches restent lisibles.
   Aucun fond animé, filtre flou, WebGL ou animation en boucle. */
.cuvees-intro { text-align: center; padding: 12px 16px 30px; }
.catalogue-eyebrow { font: 600 0.7rem/1.5 system-ui, sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--color-vine); }
.cuvees-intro h1 { margin: 12px auto; max-width: 1000px; font-size: clamp(1.85rem, 3.2vw, 3rem); font-weight: 400; line-height: 1.15; color: var(--color-wine-dark); text-wrap: balance; }
.cuvees-intro > p:last-child { color: var(--color-muted); font-style: italic; margin-bottom: 0; }
.catalogue-copy { padding: 20px; overflow-wrap: anywhere; }
.cuvee-card .catalogue-copy h2, .cuvee-card .catalogue-copy p { margin-left: 0; margin-right: 0; }
.catalogue-copy h3 { font: 600 0.7rem/1.5 system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-vine); }
.catalogue-vintage { font: 500 0.75rem/1.6 system-ui, sans-serif; letter-spacing: 0.07em; color: var(--color-wine); }
.catalogue-appellation { color: var(--color-muted); font-size: 0.86rem; }
.catalogue-links { text-align: center; margin: 22px 0 32px; }
.catalogue-links a { color: var(--color-wine); text-underline-offset: 6px; }
.catalogue-links a span { margin-left: 8px; }
.cuvee-catalogue [hidden] { display: none !important; }

.cuvee-catalogue.is-ready {
    --stage-height: 518px;
    --photo-width: 294px;
    --step: clamp(225px, 27vw, 365px);
    --copy-height: 200px;
    --drag-x: 0px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #dfd1bb;
    border-radius: 24px;
    /* Fond photographique du domaine sous un voile ivoire directionnel. En haut,
       seules les bouteilles et l'arche occupent l'espace : le voile y est leger
       pour que la photo se voie nettement. En bas repose la description de la
       cuvee : le voile s'y opaque jusqu'a preserver le contraste du texte.
       Degrade vertical, statique, sans animation. */
    background-image:
        linear-gradient(180deg,
            rgba(255,253,248,.5) 0%,
            rgba(255,253,248,.85) 58%,
            rgba(238,226,208,.93) 100%),
        url('../img/cuvees/fond-catalogue-1672.jpg');
    background-size: cover;
    background-position: center;
    background-color: #eee2d0;
    box-shadow: 0 18px 48px #3f102009;
}
/* Une arche et un socle statiques, dans l'esprit des caves de tuffeau. */
.cuvee-catalogue.is-ready::before {
    content: ""; pointer-events: none; position: absolute;
    top: 46px; left: 50%; width: 470px; height: 482px;
    transform: translateX(-50%); border: 1px solid #c49a4a40;
    border-radius: 240px 240px 0 0;
    background: linear-gradient(180deg, #ffffff40, #d3bb910c);
}
.cuvee-catalogue.is-ready::after {
    content: ""; pointer-events: none; position: absolute; z-index: -1;
    top: calc(var(--stage-height) - 55px); left: 8%; width: 84%; height: 45px;
    border: 1px solid #c49a4a30; border-radius: 50%;
    background: radial-gradient(ellipse, #b9986330, #f7f0e300 67%);
}
.catalogue-topline { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 24px 30px 0; }
.catalogue-counter { display: flex; gap: 10px; align-items: center; color: var(--color-muted); font: 0.75rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
[data-catalogue-current] { color: var(--color-wine); font-weight: 650; }
.catalogue-counter-rule { display: block; height: 1px; width: 32px; background: #b6a083; }
.is-ready .catalogue-track { position: relative; display: block; height: calc(var(--stage-height) + var(--copy-height) + 12px); perspective: 1400px; }
.is-ready .cuvee-card { display: contents; }
.is-ready .cuvee-image-button {
    position: absolute; left: 50%; top: 26px; width: var(--photo-width);
    border-radius: 150px 150px 16px 16px;
    overflow: hidden;
    /* Bouteilles detourees : aucune plaque, aucune bordure, aucune ombre de
       cadre - elles flottent sur le fond photographique du carrousel. La
       grande arche doree du fond reste le motif architectural ; l'infobulle
       « Cliquer pour agrandir » porte son propre fond sombre. */
    border: 0; background: transparent; box-shadow: none;
    transform: translateX(-50%) translateX(calc(var(--slot) * var(--step) + var(--drag-x))) translateZ(var(--depth)) rotateY(var(--angle)) scale(var(--scale));
    opacity: var(--alpha); z-index: var(--layer);
    transition: transform 760ms cubic-bezier(.22,.72,.18,1), opacity 600ms ease;
    backface-visibility: hidden;
    touch-action: pan-y pinch-zoom;
    cursor: pointer;
}
.is-ready .cuvee-image-frame { display: block; padding: 0; min-height: 0; aspect-ratio: 2 / 3; background: transparent; transform: none; transition: none; }
.is-ready .cuvee-image-frame picture { display: block; height: 100%; }
.is-ready .cuvee-image { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.is-ready .cuvee-image-hint { left: 50%; right: auto; bottom: 16px; width: max-content; max-width: 95%; transform: translate(-50%, 4px); font: 0.7rem/1.5 system-ui, sans-serif; }
.is-ready .cuvee-card.is-active .cuvee-image-button:hover .cuvee-image-hint,
.is-ready .cuvee-card.is-active .cuvee-image-button:focus-visible .cuvee-image-hint { transform: translate(-50%, 0); opacity: 1; }
.is-ready .cuvee-card:not(.is-active) .cuvee-image-hint { display: none; }
.is-ready .cuvee-card.is-distant .cuvee-image-button { pointer-events: none; visibility: hidden; }
.is-ready.is-dragging .cuvee-image-button,
.is-ready .cuvee-image-button.is-repositioning { transition: none; }
.is-ready .cuvee-image-button.is-repositioning { opacity: 0; }
.is-ready .catalogue-copy {
    position: absolute; top: var(--stage-height); left: 5%; width: 90%;
    display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 32px;
    align-items: start; padding: 26px 0 18px; border-top: 1px solid #cdb99580;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(8px);
    transition: opacity 320ms ease, transform 460ms ease;
}
.is-ready .is-active .catalogue-copy { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.is-ready .catalogue-copy h2 { margin: 8px 0 10px; font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.2rem); line-height: 1.13; color: var(--color-wine-dark); text-wrap: balance; }
.is-ready .catalogue-copy p { margin-top: 0; line-height: 1.65; }
.is-ready .catalogue-copy h3 { margin: 0 0 12px; }
.is-ready .catalogue-vintage { margin-bottom: 0; }
.is-ready .catalogue-tasting, .is-ready .catalogue-pairings { padding-top: 4px; }
.catalogue-navigation { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 12px 24px 0; }
.is-ready .catalogue-prev, .is-ready .catalogue-next { position: absolute; top: calc(var(--stage-height) / 2 + 10px); z-index: 10; }
.is-ready .catalogue-prev { left: 28px; }
.is-ready .catalogue-next { right: 28px; }
.catalogue-arrow { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border: 1px solid #b79d76; border-radius: 50%; background: #fffaf2; color: var(--color-wine); cursor: pointer; transition: background 180ms ease, color 180ms ease; }
.catalogue-arrow svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.catalogue-arrow:hover { color: #fffaf2; background: var(--color-wine); }
.catalogue-dots { display: flex; flex-wrap: wrap; justify-content: center; max-width: 75%; }
.catalogue-dot { display: grid; place-items: center; width: 36px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.catalogue-dot span { width: 6px; height: 6px; border-radius: 100px; background: #9a896f; transition: width 300ms ease, background 300ms ease; }
.catalogue-dot[aria-current="true"] span { width: 24px; background: var(--color-wine); }
.catalogue-instruction { margin: 16px 20px 24px; text-align: center; font: 0.7rem/1.6 system-ui, sans-serif; color: #73624c; }
.catalogue-instruction span { padding: 0 8px; }
.cuvee-catalogue button:focus-visible, .cuvee-catalogue:focus-visible { outline: 3px solid var(--color-wine); outline-offset: 4px; }
.cuvee-catalogue.is-still *, .cuvee-catalogue.is-still *::before { transition: none !important; }

@media (max-width: 900px) {
    .cuvee-catalogue.is-ready { --photo-width: 270px; --stage-height: 480px; --step: 248px; }
    .is-ready .catalogue-copy { grid-template-columns: 1fr 1fr; gap: 16px 28px; }
    .is-ready .catalogue-identity { grid-column: 1 / -1; text-align: center; }
    .is-ready .catalogue-identity h2 { margin-bottom: 8px; }
    .is-ready .catalogue-appellation { margin-bottom: 6px; }
    .cuvee-catalogue.is-ready::before { width: 380px; height: 440px; }
}
@media (max-width: 600px) {
    .cuvees-intro { padding: 0 10px 24px; }
    .cuvees-intro h1 { font-size: 1.85rem; }
    .cuvees-intro > p:last-child { font-size: 0.95rem; }
    .cuvee-catalogue.is-ready { --photo-width: 218px; --stage-height: 385px; --step: 190px; border-radius: 18px; }
    .catalogue-topline { padding: 18px 18px 0; }
    .catalogue-topline .catalogue-eyebrow { font-size: 0.6rem; }
    .catalogue-counter-rule { width: 20px; }
    .is-ready .cuvee-image-button { top: 24px; }
    .cuvee-catalogue.is-ready::before { top: 46px; width: 284px; height: 366px; }
    .is-ready .catalogue-copy { gap: 18px; padding-top: 22px; left: 7%; width: 86%; grid-template-columns: 1fr; }
    .is-ready .catalogue-identity { grid-column: auto; }
    .is-ready .catalogue-identity h2 { font-size: 1.85rem; }
    .is-ready .catalogue-tasting, .is-ready .catalogue-pairings { padding: 0; text-align: center; }
    .is-ready .catalogue-copy h3 { margin-bottom: 5px; font-size: 0.65rem; }
    .is-ready .catalogue-copy p { margin-bottom: 0; font-size: 0.93rem; }
    .is-ready .catalogue-copy .catalogue-vintage { font-size: 0.68rem; }
    .is-ready .catalogue-copy .catalogue-appellation { font-size: 0.78rem; margin-bottom: 4px; }
    .catalogue-instruction { max-width: 250px; margin: 12px auto 20px; }
    .catalogue-instruction span { display: none; }
    .catalogue-navigation { gap: 10px; }
    .catalogue-dot { width: 30px; }
    .catalogue-arrow { width: 44px; height: 44px; }
    .is-ready .catalogue-prev { left: 8px; }
    .is-ready .catalogue-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .cuvee-catalogue *, .cuvee-catalogue *::before { transition: none !important; }
}
