/* ══════════════════════════════════════════════════════
   PANIER COLLECTION PAIN — CSS COMPLET (v2, journée colorée)
   Direction "forêt en plein jour" : ciel clair et chaleureux, esprit
   enfantin et coloré comme les tissus de la collection — pas de nuit
   sombre ni de réalisme photo (voir échange client). Une branche
   moussue porte la pain comme pièce maîtresse (visuels
   temporaires, en attente des illustrations "cartoon" du client).
══════════════════════════════════════════════════════ */

:root {
    /* Configurateur (sections claires) — palette "sous-bois cossu" :
       lin chaud + encre brune profonde + laiton vieilli en accent
       rare, plutôt que le duo crème/terracotta trop vu. */
    --pn-bg:        #F1EADB;
    --pn-bg-2:      #E6DAC1;
    --pn-card:      #FBF8F1;
    --pn-ink:       #1F2433;
    --pn-ink-soft:  rgba(36,28,20,.66);
    --pn-primary:   #8B5A2B;
    --pn-primary-h: #6E4620;
    --pn-secondary: #0B1E3D;
    --pn-accent:    #C6A15B;
    --pn-accent-d:  #A9843F;
    --pn-border:    rgba(11,30,61,.16);
    --pn-border-h:  rgba(139,90,43,.45);
    --pn-tint:      rgba(198,161,91,.14);

    /* Hero (fond clair) — clairière dorée en fin de matinée : lin,
       miel et laiton plutôt qu'un jaune franc ou une nuit sombre. */
    --pn-sky:         #F3E7C6;
    --pn-sky-2:       #EAD8A9;
    --pn-slate:       #E2CC98;
    --pn-night:       #0B1E3D;
    --pn-cream:       #FBF3DF;
    --pn-accent-line: rgba(139,90,43,.35);
}

.pain-page {
    font-family: 'Inter', sans-serif;
    color: var(--pn-ink);
    background: var(--pn-bg);
    -webkit-font-smoothing: antialiased;
}
body.has-header.pain-page { padding-top: 0; }

/* ────────────────────────────────────────
   HERO — clairière au clair de lune, la pain en vol
   traverse la scène au-dessus du panier posé sur l'étal.
   Lune, étoiles, chêne et pommes de pin = vrais visuels
   fournis par le client (pas de forme CSS/SVG maison).
──────────────────────────────────────── */
.hero-pain {
    position: relative; width: 100%; min-height: 74vh;
    display: flex; align-items: center; overflow: hidden;
    background:
        radial-gradient(1100px 750px at 22% 15%, rgba(255,251,240,.55), transparent 55%),
        radial-gradient(900px 650px at 85% 70%, rgba(11,30,61,.08), transparent 60%),
        radial-gradient(700px 900px at -4% 55%, rgba(11,30,61,.07), transparent 62%),
        linear-gradient(160deg, #FBF6EA 0%, #F5EBD3 40%, #EFDDB8 75%, #E8D0A0 100%);
}

.hero-pain::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .55;
    background-image: radial-gradient(rgba(139,90,43,.10) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
}


.hero-pain__glow {
    position: absolute; border-radius: 50%; pointer-events: none; z-index: 1;
    filter: blur(70px); animation: pn-glowPulse 9s ease-in-out infinite;
}
.hero-pain__glow--1 {
    width: 480px; height: 480px; left: 8%; top: -6%;
    background: radial-gradient(circle, rgba(246,234,200,.6), transparent 70%);
    animation-delay: 0s;
}
.hero-pain__glow--2 {
    width: 520px; height: 400px; right: -6%; bottom: 0%;
    background: radial-gradient(circle, rgba(198,161,91,.22), transparent 70%);
    animation-delay: -4s;
}
@keyframes pn-glowPulse { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: .9; transform: scale(1.05); } }

.hero-pain__grain {
    position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .25; mix-blend-mode: overlay;
    background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 3px 3px;
}

/* Chêne + pommes de pin en coins, feuilles éparses : cadrent la
   scène comme sur la référence, sans jamais empiéter sur le texte
   (colonne de contenu limitée à 620px, cf. .hero-pain__content). */


/* ────────────────────────────────────────
   PAIN EN VOL — pièce maîtresse du hero, ancrée à droite,
   toujours entièrement dans le cadre (right jamais négatif : la
   v1 coupait le visuel sur grand écran, cf. retour client).
──────────────────────────────────────── */

.hero-pain__inner {
    position: relative; z-index: 4; width: 100%; max-width: 1360px; margin: 0 auto;
    padding: 108px 60px 90px; display: flex; align-items: flex-end; gap: 72px;
}
.hero-pain__content { flex: 1; max-width: 620px; position: relative; z-index: 4; }

.hero-pain__badge {
    display: inline-flex; align-items: center; gap: 10px; background: rgba(251,247,237,.55);
    border: 1px solid rgba(36,28,20,.22); color: var(--pn-primary-h); padding: 7px 20px;
    border-radius: 30px; font-family: 'Playfair Display', serif; font-style: italic; font-weight: 600;
    font-size: .92rem; letter-spacing: .01em; margin-bottom: 22px;
    animation: pn-slideUp .8s ease-out .1s both; backdrop-filter: blur(3px);
}

.hero-pain__ornament {
    display: flex; align-items: center; gap: 10px; margin: 0 0 20px;
    animation: pn-slideUp .8s ease-out .18s both;
}
.hero-pain__ornament span { width: 34px; height: 1px; background: var(--pn-accent-d); }
.hero-pain__ornament i { font-style: normal; color: var(--pn-accent-d); font-size: .7rem; }

.hero-pain__title {
    font-family: 'Playfair Display', serif; font-weight: 600; font-size: clamp(2.3rem, 4.2vw, 3.4rem);
    line-height: 1.12; letter-spacing: -.005em; color: var(--pn-secondary);
    animation: pn-slideUp .8s ease-out .25s both; text-shadow: 0 2px 20px rgba(255,255,255,.5);
    margin: 0 0 22px;
}
.hero-pain__sub {
    font-size: 1.01rem; color: rgba(36,28,20,.72); margin: 0 0 36px; line-height: 1.8;
    max-width: 42ch; animation: pn-slideUp .8s ease-out .35s both;
}
@keyframes pn-slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.hero-pain__ctas { display: flex; gap: 16px; flex-wrap: wrap; animation: pn-slideUp .8s ease-out .45s both; }

.btn-pain-main {
    background: var(--pn-primary); color: #fff; text-decoration: none; padding: 14px 32px;
    border-radius: 2px; font-weight: 600; font-size: .94rem; letter-spacing: .02em;
    transition: all .3s; display: inline-block; box-shadow: 0 10px 26px -8px rgba(139,90,43,.45);
}
.btn-pain-main:hover { background: var(--pn-primary-h); transform: translateY(-2px); color: #fff; box-shadow: 0 14px 32px -8px rgba(139,90,43,.55); }
.btn-pain-ghost {
    background: rgba(255,255,255,.35); color: var(--pn-night); border: 1px solid rgba(36,28,20,.3);
    text-decoration: none; padding: 13px 30px; border-radius: 2px; font-weight: 500;
    font-size: .94rem; letter-spacing: .02em; transition: all .3s; display: inline-block; backdrop-filter: blur(3px);
}
.hero-pain__ctas .btn-pain-ghost:hover { border-color: var(--pn-primary); color: var(--pn-primary-h); transform: translateY(-2px); }

.hero-pain__scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 6; }
.hero-pain__scroll span { display: block; width: 6px; height: 6px; border-radius: 50%; background: rgba(36,28,20,.35); animation: pn-scrollDot 1.5s ease-in-out infinite; }
.hero-pain__scroll span:nth-child(2) { animation-delay: .2s; }
.hero-pain__scroll span:nth-child(3) { animation-delay: .4s; }
@keyframes pn-scrollDot { 0%,100% { opacity: .3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }

/* ────────────────────────────────────────
   PHOTO PRODUIT — posée "sur l'étal", en second plan par rapport
   à la pain qui plane au-dessus (z-index sous l'oiseau),
   avec une ombre au sol pour l'ancrer dans la scène.
──────────────────────────────────────── */
.hero-pain__visual {
    flex: 0 0 400px; position: relative; z-index: 2; animation: pn-slideUp .8s ease-out .5s both;
}
.hero-pain__img-wrap { position: relative; border-radius: 4px; overflow: visible; }
.hero-pain__img-wrap > img {
    width: 100%; height: 420px; object-fit: cover; display: block; border-radius: 4px;
    border: 1px solid var(--pn-accent-line); box-shadow: 0 30px 60px rgba(36,28,20,.35);
}
.hero-pain__img-shadow {
    width: 82%; height: 26px; margin: 6px auto 0; border-radius: 50%;
    background: radial-gradient(ellipse, rgba(36,28,20,.28), transparent 72%);
}
.hero-pain__img-seal {
    position: absolute; bottom: -16px; left: -16px; width: 78px; height: 78px; border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from -90deg, #0055a4 0deg 120deg, #ffffff 120deg 240deg, #c41e3a 240deg 360deg);
    box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.hero-pain__img-seal-ring {
    width: 100%; height: 100%; border-radius: 50%;
    background: var(--pn-night); color: var(--pn-cream); display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    box-shadow: inset 0 0 0 1px rgba(243,238,221,.15);
}
.hero-pain__img-seal span { font-family: 'Playfair Display', serif; font-weight: 600; font-size: .76rem; letter-spacing: .04em; line-height: 1.3; }
.hero-pain__img-seal small { font-size: .52rem; letter-spacing: .07em; color: var(--pn-accent); text-transform: uppercase; margin-top: 2px; }

@media (max-width: 960px) {
    .hero-pain__visual { flex-basis: 320px; }
}
@media (max-width: 768px) {
    .hero-pain { flex-direction: column; align-items: stretch; min-height: auto; }
    .hero-pain__inner { padding: 20px 20px 60px; flex-direction: column; align-items: flex-start; gap: 34px; }
    .hero-pain__content { max-width: 100%; }
    .hero-pain__title { font-size: clamp(2.1rem, 7vw, 2.7rem); }
    .hero-pain__sub { font-size: .92rem; margin: 0 0 22px; }
    .hero-pain__ctas { flex-direction: column; gap: 10px; width: 100%; }
    .hero-pain .btn-pain-main, .hero-pain .btn-pain-ghost { display: block; width: 100%; text-align: center; }
    .hero-pain__scroll { display: none; }
    .hero-pain__visual { align-self: center; }
}

/* ────────────────────────────────────────
   RUBAN
──────────────────────────────────────── */
.ruban-pain { background: var(--pn-night); overflow: hidden; padding: 15px 0; border-top: 1px solid var(--pn-accent-line); border-bottom: 1px solid var(--pn-accent-line); }
.ruban-pain__track { display: flex; width: max-content; animation: pn-ruban-defile 26s linear infinite; will-change: transform; }
.ruban-pain__set { display: flex; align-items: center; flex-shrink: 0; }
.ruban-pain__set span {
    display: inline-flex; align-items: center; margin-right: 40px;
    font-family: 'Playfair Display', serif; font-style: italic; font-weight: 500; font-size: 1rem;
    color: rgba(255,248,232,.75); letter-spacing: .02em; white-space: nowrap;
}
@keyframes pn-ruban-defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ruban-pain__track { animation: none; } }

/* ────────────────────────────────────────
   SECTION "COMMENT ÇA MARCHE"
──────────────────────────────────────── */
.section-how-pain { padding: 80px 24px; background: var(--pn-bg); position: relative; }
.section-tag-pain {
    display: flex; align-items: center; gap: 8px; font-family: 'Playfair Display', serif; font-style: italic;
    font-weight: 600; font-size: 1.05rem; color: var(--pn-primary); margin-bottom: 10px;
}
.section-tag-pain::before { content: ""; display: inline-block; width: 22px; height: 1px; background: var(--pn-accent-d); }
.section-title-pain {
    font-family: 'Playfair Display', serif; font-weight: 700; font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    color: var(--pn-ink); margin: 0 0 40px;
}
.how-grid-pain { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.how-card-pain {
    position: relative; background: var(--pn-card); border: 1px solid var(--pn-border); border-radius: 8px;
    padding: 30px 22px 26px; opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease, box-shadow .35s, border-color .3s;
    overflow: hidden;
}
.how-card-pain.revealed { opacity: 1; transform: translateY(0); }
.how-card-pain::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--pn-primary), var(--pn-accent)); transform: scaleX(0);
    transform-origin: left; transition: transform .4s ease;
}
.how-card-pain:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(36,28,20,.14); border-color: var(--pn-border-h); }
.how-card-pain:hover::before { transform: scaleX(1); }
.how-card-pain__num { position: absolute; top: 18px; right: 20px; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.7rem; color: rgba(11,30,61,.08); }
.how-card-pain__icon { display: inline-flex; font-size: 1.5rem; margin-bottom: 14px; }
.how-card-pain h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin: 0 0 8px; color: var(--pn-ink); }
.how-card-pain p { font-size: .92rem; line-height: 1.55; color: var(--pn-ink-soft); margin: 0; }

/* ────────────────────────────────────────
   CONFIGURATEUR
──────────────────────────────────────── */
.pain-page .section-perso { background: var(--pn-bg); }
.pain-page .section-title-pain { text-align: left; }
.pain-page .perso-left-visual { position: sticky; top: 130px; }
.pain-img-box {
    position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--pn-border);
    box-shadow: 0 16px 40px rgba(36,28,20,.14);
}
.pain-img-box::after {
    content: ''; position: absolute; inset: 12px; border: 1px solid rgba(243,238,221,.55);
    border-radius: 4px; pointer-events: none; z-index: 2; mix-blend-mode: overlay;
}
.pain-img-box::before {
    content: ''; position: absolute; top: 20px; left: 20px; width: 30px; height: 30px;
    border-top: 2.5px solid var(--pn-accent); border-left: 2.5px solid var(--pn-accent); z-index: 3; pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

.pain-page .selector-label { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.15rem; color: var(--pn-ink); }
.pain-page .selector-opt-label { font-weight: 400; font-size: .8em; color: var(--pn-ink-soft); }
.pain-page .required { color: var(--pn-primary); }

.pain-page .fabric-card {
    background: var(--pn-card); border: 2px solid transparent; border-radius: 8px;
    padding: 12px; text-align: center; cursor: pointer; transition: all .3s; position: relative;
}
.pain-page .fabric-card:hover { border-color: var(--pn-border-h); transform: translateY(-2px); }
.pain-page .fabric-card.selected { border-color: var(--pn-primary); background: var(--pn-tint); }
.pain-page .fabric-img { background: var(--pn-bg-2); }
.pain-page .fabric-name { color: var(--pn-ink); }
.pain-page .fabric-price { color: var(--pn-primary); }
.pain-page .fabric-material { color: rgba(36,28,20,.72); }
.pain-page .fabric-card .fabric-check { background: var(--pn-primary); color: #fff; }

.pain-page .size-option, .pain-page .color-option {
    background: var(--pn-card); border: 2px solid var(--pn-border); border-radius: 8px; transition: all .3s;
}
.pain-page .size-option:hover, .pain-page .color-option:hover { border-color: var(--pn-border-h); }
.pain-page .size-option.selected, .pain-page .color-option.selected { border-color: var(--pn-primary); background: var(--pn-tint); }
.pain-page .size-option span, .pain-page .color-option span { color: var(--pn-ink); }

.pain-shipping-info {
    display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; padding: 16px 18px;
    background: var(--pn-card); border: 1px solid var(--pn-border); border-radius: 8px;
}
.pain-shipping-item { font-size: .84rem; color: var(--pn-ink-soft); line-height: 1.6; }
.pain-shipping-item strong { color: var(--pn-ink); }

.pain-page .cart-section {
    background: var(--pn-card) !important; border: 1px solid var(--pn-border) !important; border-radius: 8px !important;
    box-shadow: 0 14px 36px rgba(36,28,20,.12) !important;
}
.pain-page .price-value { color: var(--pn-primary) !important; font-family: 'Playfair Display', serif !important; }
.pain-page .price-currency { color: var(--pn-accent-d) !important; }
.pain-page .qty-selector { background: var(--pn-bg-2) !important; }
.pain-page .qty-btn { color: var(--pn-primary) !important; }
.pain-page #qte { color: var(--pn-ink) !important; }
.pain-page .btn-cart { background: var(--pn-primary) !important; border-radius: 4px !important; box-shadow: 0 8px 20px -6px rgba(139,90,43,.5) !important; }
.pain-page .btn-cart:hover { background: var(--pn-primary-h) !important; }

.pain-page .back-section { text-align: center; padding: 44px 32px; background: var(--pn-bg); border-top: 1px solid var(--pn-border); }
.pain-page .btn-back {
    display: inline-block; padding: 11px 28px; background: transparent; color: var(--pn-ink-soft);
    border: 1px solid var(--pn-border); border-radius: 2px; font-size: 13px; text-decoration: none;
    transition: color .2s, border-color .2s;
}
.pain-page .btn-back:hover { color: var(--pn-primary); border-color: var(--pn-border-h); text-decoration: none; }

/* ────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────── */
@media (max-width: 1100px) {
    .pain-page .perso-flex-container { flex-direction: column; gap: 40px; }
    .pain-page .perso-left-visual { position: sticky; top: 80px; z-index: 10; width: 100%; max-width: 100%; padding-bottom: 15px; }
    .pain-page .perso-right-selectors { width: 100%; }
    .pain-page .section-perso { padding: 60px 20px; }
    .pain-page .image-thumbnails { display: none; }
}
@media (max-width: 768px) {
    .pain-page .size-options { flex-direction: column; }
    .pain-page .size-option { flex: none; width: 100%; }
    .how-grid-pain { gap: 16px; }
}
@media (max-width: 480px) {
    .pain-page .cart-section { flex-direction: column !important; padding: 24px 20px !important; gap: 20px !important; }
    .pain-page .section-perso { padding: 48px 16px; }
    .section-title-pain { font-size: clamp(18px, 5vw, 26px); margin-bottom: 28px; }
    .how-card-pain { width: 100%; max-width: 100%; padding: 26px 18px 20px; }
    .section-how-pain { padding: 48px 16px; }
    .pain-page .back-section { padding: 32px 20px; }
}

/* Enseigne de boulangerie, fixée au bord droit du hero ; balancement très léger. */
.hero-pain__enseigne {
    position: absolute; top: 0; right: 0; z-index: 50; width: min(250px, 17vw); height: auto;
    pointer-events: none; transform-origin: 96% 5%;
    filter: drop-shadow(0 12px 14px rgba(36,28,20,.2));
}
@media (min-width: 769px) { .hero-pain__enseigne { animation: pn-balancier 8s ease-in-out infinite; } }
@keyframes pn-balancier { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-1.6deg); } 70% { transform: rotate(1.6deg); } }
@media (prefers-reduced-motion: reduce) { .hero-pain__enseigne { animation: none; } }
@media (max-width: 960px) { .hero-pain__enseigne { width: 26vw; } }
@media (max-width: 768px) { .hero-pain__enseigne { width: 112px; } }
