/* coupon-yellow.css — coupon de l'ACCUEIL uniquement (index.html), version « affiche jaune GW ».
   Fond rayé jaune, ruban rose, gros chiffre bleu cerclé de blanc, bulle, pilule blanche, confettis.
   Aucune donnée touchée : tout le texte vient toujours de promo_campaigns (voir loadDynamicCoupon dans js/main.js).
   La page promo.html garde l'ancien style (.cp dans promo.css), rien n'est modifié là-bas. */

.yc { --yb: #1668d0; --yp: #f4727f; --yy: #ffe000;
    container-type: inline-size; position: relative; overflow: hidden; isolation: isolate; background: var(--yy);
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif; color: var(--yb); }

/* ---------- Fond : rayures qui défilent doucement ---------- */
.yc-bg { position: absolute; inset: -40% -10%; z-index: 0; pointer-events: none;
    background: repeating-linear-gradient(125deg, #ffe000 0 5cqw, #ffe94d 5cqw 10cqw);
    animation: ycStripes 5s linear infinite; }
@keyframes ycStripes { to { translate: 8.19cqw 5.74cqw; } }

/* ---------- Confettis (image d'origine) + petites pièces qui tombent ---------- */
.yc-conf { position: absolute; top: 3%; bottom: 3%; width: 22cqw; z-index: 1; pointer-events: none;
    background: url('../images/yc-confetti.png') no-repeat center / contain; animation: ycFloat 4.2s ease-in-out infinite alternate; }
.yc-conf.l { left: .5cqw; }
.yc-conf.r { right: .5cqw; scale: -1 1; animation-delay: -2.1s; }
@keyframes ycFloat { from { translate: 0 -1cqw; rotate: -2.5deg; } to { translate: 0 1.2cqw; rotate: 2.5deg; } }

.yc-bits { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.yc-bits i { position: absolute; top: 0; opacity: 0; animation: ycFall 10s linear infinite; }
@keyframes ycFall { 0% { translate: 0 -6cqw; rotate: 0deg; opacity: 0; } 8% { opacity: .95; } 88% { opacity: .95; } 100% { translate: 3cqw 58cqw; rotate: 420deg; opacity: 0; } }
.yc-bits i:nth-child(1){left:4%;animation-delay:0s;animation-duration:9s}
.yc-bits i:nth-child(1){background:#ffb62e}
.yc-bits i:nth-child(1){width:2.2cqw;height:2.2cqw;border-radius: 50% !important}
.yc-bits i:nth-child(2){left:12%;animation-delay:-3s;animation-duration:11s}
.yc-bits i:nth-child(2){background:#f4727f}
.yc-bits i:nth-child(2){width:1.9cqw;height:1.9cqw;border-radius: .4cqw !important}
.yc-bits i:nth-child(3){left:21%;animation-delay:-6s;animation-duration:10s}
.yc-bits i:nth-child(3){background:#00a9b8}
.yc-bits i:nth-child(3){width:1cqw;height:1cqw;border-radius: 50% !important}
.yc-bits i:nth-child(4){left:29%;animation-delay:-1.5s;animation-duration:12s}
.yc-bits i:nth-child(4){background:#9c93d1}
.yc-bits i:nth-child(4){width:1.6cqw;height:2.4cqw;clip-path:polygon(50% 0,100% 100%,50% 70%,0 100%)}
.yc-bits i:nth-child(5){left:38%;animation-delay:-8s;animation-duration:9.5s}
.yc-bits i:nth-child(5){background:#ffb62e}
.yc-bits i:nth-child(5){width:2.2cqw;height:2.2cqw;border-radius: 50% !important}
.yc-bits i:nth-child(6){left:47%;animation-delay:-4.5s;animation-duration:11s}
.yc-bits i:nth-child(6){background:#f4727f}
.yc-bits i:nth-child(6){width:1.9cqw;height:1.9cqw;border-radius: .4cqw !important}
.yc-bits i:nth-child(7){left:56%;animation-delay:-2s;animation-duration:10.5s}
.yc-bits i:nth-child(7){background:#9c93d1}
.yc-bits i:nth-child(7){width:1.6cqw;height:2.4cqw;clip-path:polygon(50% 0,100% 100%,50% 70%,0 100%)}
.yc-bits i:nth-child(8){left:64%;animation-delay:-7s;animation-duration:9s}
.yc-bits i:nth-child(8){background:#00a9b8}
.yc-bits i:nth-child(8){width:1cqw;height:1cqw;border-radius: 50% !important}
.yc-bits i:nth-child(9){left:72%;animation-delay:-5s;animation-duration:12s}
.yc-bits i:nth-child(9){background:#ffb62e}
.yc-bits i:nth-child(9){width:2.2cqw;height:2.2cqw;border-radius: 50% !important}
.yc-bits i:nth-child(10){left:80%;animation-delay:-9s;animation-duration:10s}
.yc-bits i:nth-child(10){background:#f4727f}
.yc-bits i:nth-child(10){width:1.9cqw;height:1.9cqw;border-radius: .4cqw !important}
.yc-bits i:nth-child(11){left:88%;animation-delay:-3.5s;animation-duration:11.5s}
.yc-bits i:nth-child(11){background:#9c93d1}
.yc-bits i:nth-child(11){width:1.6cqw;height:2.4cqw;clip-path:polygon(50% 0,100% 100%,50% 70%,0 100%)}
.yc-bits i:nth-child(12){left:95%;animation-delay:-6.5s;animation-duration:9.5s}
.yc-bits i:nth-child(12){background:#ffb62e}
.yc-bits i:nth-child(12){width:2.2cqw;height:2.2cqw;border-radius: 50% !important}

/* Éclat de confettis quand le chiffre arrive */
.yc-burst { position: absolute; left: 50%; top: 50%; z-index: 3; width: 0; height: 0; pointer-events: none; }
.yc-burst i { position: absolute; left: -.8cqw; top: -.8cqw; width: 1.6cqw; height: 1.6cqw; background: var(--c); border-radius: 30% !important; opacity: 0;
    animation: ycBurst 1.2s cubic-bezier(.1,.8,.25,1) calc(.95s + var(--d)) both; }
@keyframes ycBurst { 0% { opacity: 1; translate: 0 0; rotate: 0deg; scale: .4; } 70% { opacity: 1; } 100% { opacity: 0; translate: var(--x) var(--y); rotate: calc(var(--r) + 360deg); scale: 1; } }
.yc-burst i:nth-child(1){--x:32.3cqw;--y:3.5cqw;--c:#f4727f;--d:0.00s;--r:0deg}
.yc-burst i:nth-child(2){--x:36.1cqw;--y:13.0cqw;--c:#ffb62e;--d:0.04s;--r:47deg}
.yc-burst i:nth-child(3){--x:29.8cqw;--y:24.0cqw;--c:#9c93d1;--d:0.08s;--r:94deg}
.yc-burst i:nth-child(4){--x:6.3cqw;--y:17.3cqw;--c:#00a9b8;--d:0.12s;--r:141deg}
.yc-burst i:nth-child(5){--x:-8.6cqw;--y:22.7cqw;--c:#1668d0;--d:0.00s;--r:188deg}
.yc-burst i:nth-child(6){--x:-30.2cqw;--y:23.9cqw;--c:#7cb518;--d:0.04s;--r:235deg}
.yc-burst i:nth-child(7){--x:-27.5cqw;--y:9.7cqw;--c:#c2185b;--d:0.08s;--r:282deg}
.yc-burst i:nth-child(8){--x:-42.7cqw;--y:4.4cqw;--c:#fff;--d:0.12s;--r:329deg}
.yc-burst i:nth-child(9){--x:-52.9cqw;--y:-5.7cqw;--c:#f4727f;--d:0.00s;--r:16deg}
.yc-burst i:nth-child(10){--x:-27.4cqw;--y:-9.8cqw;--c:#ffb62e;--d:0.04s;--r:63deg}
.yc-burst i:nth-child(11){--x:-24.0cqw;--y:-19.3cqw;--c:#9c93d1;--d:0.08s;--r:110deg}
.yc-burst i:nth-child(12){--x:-10.3cqw;--y:-28.3cqw;--c:#00a9b8;--d:0.12s;--r:157deg}
.yc-burst i:nth-child(13){--x:6.6cqw;--y:-17.2cqw;--c:#1668d0;--d:0.00s;--r:204deg}
.yc-burst i:nth-child(14){--x:24.3cqw;--y:-19.2cqw;--c:#7cb518;--d:0.04s;--r:251deg}
.yc-burst i:nth-child(15){--x:45.0cqw;--y:-15.9cqw;--c:#c2185b;--d:0.08s;--r:298deg}
.yc-burst i:nth-child(16){--x:32.4cqw;--y:-3.4cqw;--c:#fff;--d:0.12s;--r:345deg}

/* ---------- Mise en page ---------- */
.yc-in { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "rib rib rib" "bub num cta" "hd hd hd" "pill pill pill";
    align-items: center; row-gap: .5cqw; padding: 2.2cqw 3cqw 2.4cqw; }

/* Ruban rose */
.yc-rib { grid-area: rib; justify-self: center; position: relative; padding: 1.3cqw 6.5cqw; background: var(--yp); color: #fff; font-size: 3.7cqw; font-weight: 900; line-height: 1.25; letter-spacing: .02em; white-space: nowrap;
    clip-path: polygon(0 0, 100% 0, calc(100% - 2.2cqw) 50%, 100% 100%, 0 100%, 2.2cqw 50%); transform-origin: 50% 0;
    animation: ycDrop .9s cubic-bezier(.2,.9,.3,1.2) .1s both, ycSway 5s ease-in-out 1.2s infinite alternate; }
.yc-rib::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); translate: -130% 0; animation: ycRibShine 4.6s ease-in-out 1.8s infinite; }
@keyframes ycDrop { 0% { opacity: 0; transform: perspective(60cqw) rotateX(-85deg) translateY(-30%); } 60% { opacity: 1; transform: perspective(60cqw) rotateX(14deg); } 100% { opacity: 1; transform: none; } }
@keyframes ycSway { from { rotate: -.7deg; } to { rotate: .7deg; } }
@keyframes ycRibShine { 0% { translate: -130% 0; } 35%, 100% { translate: 130% 0; } }

/* Bulle : code coupon */
.yc-bub { grid-area: bub; justify-self: end; align-self: start; margin: 2.4cqw 1.2cqw 0 0; position: relative; display: flex; flex-direction: column; align-items: center; padding: 1.5cqw 2.4cqw 1.7cqw; background: #fff; border-radius: 3.6cqw !important; color: var(--yb); line-height: 1.15; text-align: center; white-space: nowrap;
    animation: ycPopB .8s cubic-bezier(.3,1.7,.5,1) .65s both, ycWig 3.6s ease-in-out 1.8s infinite; }
.yc-bub::after { content: ''; position: absolute; right: 22%; bottom: -.9cqw; width: 2cqw; height: 2cqw; background: #fff; border-radius: 0 0 .6cqw 0 !important; transform: rotate(45deg); }
.yc-bub small { font-size: 1.55cqw; font-weight: 900; letter-spacing: .12em; }
.yc-bub b { margin-top: .5cqw; padding: .1cqw 1.1cqw; border: .22cqw dashed var(--yb); border-radius: .8cqw !important; font-size: 3.2cqw; font-weight: 900; letter-spacing: .06em; }
@keyframes ycPopB { from { opacity: 0; transform: scale(.2) rotate(-18deg); } to { opacity: 1; transform: none; } }
@keyframes ycWig { 0%, 100% { rotate: -2deg; translate: 0 0; } 50% { rotate: 2deg; translate: 0 -.7cqw; } }

/* Gros chiffre */
.yc-nums { grid-area: num; display: flex; align-items: baseline; justify-content: center; line-height: 1; font-weight: 900; color: var(--yb); filter: drop-shadow(0 .7cqw 0 rgba(10,50,140,.22)); position: relative; }
.yc-num, .yc-pct, .yc-off { -webkit-text-stroke: 1.6cqw #fff; paint-order: stroke fill; stroke-linejoin: round; }
.yc-num { font-size: 23cqw; letter-spacing: -.045em; font-variant-numeric: tabular-nums; padding-right: .6cqw; transform-origin: 50% 100%; animation: ycRise .95s cubic-bezier(.2,1.1,.3,1.15) .3s both, ycBeat 2.8s ease-in-out 2.2s infinite; }
.yc-pct { font-size: 9.6cqw; margin-left: .3cqw; animation: ycPop .6s cubic-bezier(.3,1.7,.5,1) .85s both; }
.yc-off { font-size: 8.4cqw; margin-left: .2cqw; animation: ycPop .6s cubic-bezier(.3,1.7,.5,1) 1s both; }
.yc-nums::after { content: ''; position: absolute; inset: -6% -4%; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.75) 50%, transparent 60%); mix-blend-mode: soft-light; translate: -120% 0; animation: ycNumShine 5s ease-in-out 2.4s infinite; pointer-events: none; }
@keyframes ycRise { from { opacity: 0; transform: translateY(40%) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes ycPop { from { opacity: 0; transform: scale(.2) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes ycBeat { 0%, 62%, 100% { scale: 1; } 70% { scale: 1.045; } 78% { scale: .995; } 86% { scale: 1.02; } }
@keyframes ycNumShine { 0% { translate: -120% 0; } 30%, 100% { translate: 120% 0; } }

/* Bouton rond : 相談はこちら */
.yc-cta { grid-area: cta; justify-self: start; align-self: center; margin-left: 1.6cqw; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3cqw; width: 13.5cqw; height: 13.5cqw; border-radius: 50% !important; background: var(--yb); color: #fff; text-decoration: none; text-align: center; font-size: 2.15cqw; font-weight: 900; line-height: 1.25; border: .75cqw solid #fff; box-shadow: 0 .9cqw 0 rgba(10,50,140,.28);
    animation: ycPopC .8s cubic-bezier(.3,1.7,.5,1) 1.3s both, ycBob 2.2s ease-in-out 2.2s infinite; transition: background .2s; }
.yc-cta b { font-size: 2.6cqw; font-weight: 300; line-height: 1; animation: ycNudge 1.3s ease-in-out infinite; }
.yc-cta::before { content: ''; position: absolute; inset: -.75cqw; border-radius: 50% !important; border: .35cqw solid #fff; animation: ycRing 2s ease-out 2s infinite; }
.yc-cta::after { content: ''; position: absolute; inset: -2cqw; border-radius: 50% !important; border: .3cqw dashed rgba(22,104,208,.65); animation: ycSpin 14s linear infinite; pointer-events: none; }
.yc-cta:hover, .yc-cta:focus-visible { background: #0e52ad; scale: 1.08; }
@keyframes ycPopC { from { opacity: 0; transform: scale(.1) rotate(-90deg); } to { opacity: 1; transform: none; } }
@keyframes ycBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1cqw; } }
@keyframes ycNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(.6cqw); } }
@keyframes ycRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes ycSpin { to { rotate: 360deg; } }

/* Titre */
.yc-hd { grid-area: hd; margin: 0; text-align: center; font-size: 4.2cqw; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; color: var(--yb); -webkit-text-stroke: .9cqw #fff; paint-order: stroke fill; stroke-linejoin: round;
    animation: ycWipe 1s cubic-bezier(.6,0,.2,1) 1.05s both; }
.yc-hd em { display: inline-block; font-style: normal; margin-left: .3cqw; font-size: 1.2em; transform-origin: 50% 100%; animation: ycBounce 2.8s ease-in-out 2.6s infinite; }
@keyframes ycWipe { from { clip-path: inset(-20% 100% -20% 0); opacity: .2; } to { clip-path: inset(-30% -5% -30% -5%); opacity: 1; } }
@keyframes ycBounce { 0%, 55%, 100% { transform: translateY(0) rotate(0); } 66% { transform: translateY(-22%) rotate(-10deg) scale(1.12); } 78% { transform: translateY(0) rotate(5deg); } 88% { transform: translateY(-6%); } }

/* Pilule blanche : période + compte à rebours */
.yc-pill { grid-area: pill; justify-self: center; margin-top: 1cqw; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6cqw 2cqw; padding: .9cqw 3cqw; background: #fff; border-radius: 999px !important; color: var(--yb); font-size: 1.75cqw; font-weight: 900; box-shadow: 0 .6cqw 0 rgba(10,50,140,.18);
    animation: ycUp .8s cubic-bezier(.2,.8,.2,1) 1.25s both; }
.yc-period { margin: 0; letter-spacing: .02em; }
.yc-timer { display: inline-flex; align-items: center; gap: .6cqw; }
.yc-period + .yc-timer { padding-left: 2cqw; border-left: .25cqw solid #cfe0f7; }
.yc-timer > em { font-style: normal; margin-right: .3cqw; }
.yc-t { display: inline-flex; align-items: baseline; gap: .2cqw; padding: .35cqw .9cqw; background: var(--yb); color: #fff; border-radius: 1cqw !important; }
.yc-t b { font-size: 2.5cqw; line-height: 1.15; font-variant-numeric: tabular-nums; }
.yc-t i { font-style: normal; font-size: 1.1cqw; font-weight: 700; }
.yc-t.tick b { animation: ycTick .45s ease-out; }
@keyframes ycUp { from { opacity: 0; transform: translateY(160%) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes ycTick { 0% { transform: translateY(-35%) scale(1.25); color: var(--yy); } 100% { transform: none; color: #fff; } }

/* Lecture des animations seulement quand le coupon est visible (classe ajoutée par main.js) */
.yc:not(.yc-in) *, .yc:not(.yc-in) *::before, .yc:not(.yc-in) *::after { animation-play-state: paused !important; }

/* Lueur diagonale sur tout le coupon */
.yc::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.4) 50%, transparent 58%); translate: -130% 0; animation: ycSheen 7s ease-in-out 3s infinite; }
@keyframes ycSheen { 0% { translate: -130% 0; } 25%, 100% { translate: 130% 0; } }

/* ---------- Mobile / étroit ---------- */
@container (max-width: 700px) {
    .yc-in { grid-template-columns: auto 1fr; grid-template-areas: "rib rib" "bub num" "hd hd" "cta cta" "pill pill"; justify-items: center; row-gap: 2cqw; padding: 5cqw 4cqw 6cqw; }
    .yc-rib { font-size: 5cqw; padding: 2cqw 9cqw; clip-path: polygon(0 0, 100% 0, calc(100% - 3cqw) 50%, 100% 100%, 0 100%, 3cqw 50%); }
    .yc-bub { justify-self: end; margin: 0 2cqw 0 0; padding: 2.4cqw 3.4cqw 2.6cqw; border-radius: 5cqw !important; align-self: center; }
    .yc-bub small { font-size: 2.6cqw; } .yc-bub b { font-size: 5.4cqw; border-width: .45cqw; border-radius: 1.4cqw !important; }
    .yc-bub::after { width: 3.4cqw; height: 3.4cqw; bottom: -1.5cqw; }
    .yc-nums { justify-self: start; }
    .yc-num { font-size: 23cqw; } .yc-pct { font-size: 12cqw; } .yc-off { font-size: 10cqw; }
    .yc-num, .yc-pct, .yc-off { -webkit-text-stroke-width: 2.6cqw; }
    .yc-hd { font-size: 7.2cqw; -webkit-text-stroke-width: 1.6cqw; }
    .yc-cta { justify-self: center; margin: 1cqw 0 0; width: min(78cqw, 100%); height: auto; flex-direction: row; gap: 3cqw; padding: 3cqw 5cqw; border-radius: 999px !important; font-size: 5.2cqw; border-width: 1cqw; box-shadow: 0 1.4cqw 0 rgba(10,50,140,.28); }
    .yc-cta span br { display: none; }
    .yc-cta b { font-size: 6.4cqw; }
    .yc-cta::before { inset: -1cqw; border-radius: 999px !important; border-width: .5cqw; }
    .yc-cta::after { display: none; }
    .yc-pill { margin-top: 2cqw; padding: 3cqw 4cqw; border-radius: 5cqw !important; flex-direction: column; gap: 2cqw; font-size: 3.4cqw; width: 100%; box-shadow: 0 1cqw 0 rgba(10,50,140,.18); }
    .yc-period + .yc-timer { padding: 2cqw 0 0; border-left: 0; border-top: .4cqw solid #cfe0f7; width: 100%; justify-content: center; }
    .yc-timer { gap: 1.2cqw; }
    .yc-t { padding: .8cqw 1.8cqw; border-radius: 1.6cqw !important; gap: .4cqw; } .yc-t b { font-size: 5.6cqw; } .yc-t i { font-size: 2.4cqw; }
    .yc-conf { width: 24cqw; opacity: .85; }
}

@media (prefers-reduced-motion: reduce) {
    .yc *, .yc *::before, .yc *::after, .yc::after { animation: none !important; }
    .yc-bits, .yc-burst, .yc::after, .yc-nums::after { display: none; }
}

/* ---------- Icône de partage (discrète) : en haut à droite du coupon ---------- */
.yc-share { position: absolute; top: 10px; right: 10px; z-index: 6; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50% !important;
    background: rgba(255,255,255,.55); color: var(--yb); cursor: pointer; opacity: .6; transition: opacity .2s, background .2s, scale .15s; }
.yc-share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.yc-share:hover, .yc-share:focus-visible, .yc-share[aria-expanded="true"] { opacity: 1; background: #fff; scale: 1.08; }
.yc-share-menu { position: absolute; top: 48px; right: 10px; z-index: 7; display: flex; flex-direction: column; min-width: 156px; padding: 5px; background: #fff; border-radius: 10px !important; }
.yc-share-menu[hidden] { display: none; }
.yc-share-menu a, .yc-share-menu button { display: block; padding: 9px 12px; border: 0; border-radius: 6px !important; background: transparent; color: var(--yb); font: inherit; font-size: 13px; font-weight: 900; text-align: left; text-decoration: none; cursor: pointer; }
.yc-share-menu a:hover, .yc-share-menu button:hover { background: #eef4fd; }
