/* BeScope Mockups Styles - Animations au scroll avec Intersection Observer */

.mockup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Désactiver toutes les animations par défaut */
.mockup-wrapper {
    text-align: center;
}

/* Cacher le texte des mockups 2 et 3 par défaut */
.mockup-wrapper:nth-child(2):not(.animate) .mockup-step-number,
.mockup-wrapper:nth-child(2):not(.animate) .mockup-title,
.mockup-wrapper:nth-child(2):not(.animate) .mockup-subtitle,
.mockup-wrapper:nth-child(3):not(.animate) .mockup-step-number,
.mockup-wrapper:nth-child(3):not(.animate) .mockup-title,
.mockup-wrapper:nth-child(3):not(.animate) .mockup-subtitle {
    opacity: 0;
}

/* Faire apparaître le texte quand l'animation commence */
.mockup-wrapper.animate .mockup-step-number,
.mockup-wrapper.animate .mockup-title,
.mockup-wrapper.animate .mockup-subtitle {
    opacity: 1;
}

/* Cacher les interfaces des mockups 2 et 3 par défaut */
.mockup-wrapper:nth-child(2):not(.animate) .popup-container,
.mockup-wrapper:nth-child(3):not(.animate) .success-container {
    opacity: 0;
    visibility: hidden;
}

/* Faire réapparaître les interfaces quand les animations commencent */
.mockup-wrapper.animate .popup-container,
.mockup-wrapper.animate .success-container {
    opacity: 1;
    visibility: visible;
}

.mockup-wrapper:not(.animate) * {
    animation: none !important;
}


/* Réactiver les animations continues quand la section est visible */
.mockup-wrapper.animate .mockup-step-number {
    animation: numberPulse 3s ease-in-out infinite;
}

.mockup-wrapper.animate .dashboard::before {
    animation: scanLine 8s linear infinite;
}

.mockup-wrapper.animate .counter-dot {
    animation: dotPulse 1.5s ease-in-out infinite;
}


.mockup-wrapper.animate .popup-header::after {
    animation: headerShine 3s infinite;
}

.mockup-wrapper.animate .info-icon {
    animation: mockupIconRotate 10s ease-in-out infinite;
}

.mockup-wrapper.animate .success-icon {
    animation: successIconPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
        successGlow 2s ease-in-out 1s infinite;
}

.mockup-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--green-primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
}

@keyframes numberPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}


.mockup-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.mockup-subtitle {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 30px;
}

/* ===== MOCKUP 1: DASHBOARD ANIMATIONS ===== */
.dashboard {
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Animated scanning line */
.dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--green-primary),
            transparent);
}

@keyframes scanLine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.mockup-grid .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 8px;
}

.date {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
    opacity: 0;
}

.mockup-wrapper.animate .date {
    animation: mockupFadeInLeft 0.5s ease-out forwards;
}

@keyframes mockupFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    opacity: 0;
}

.mockup-wrapper.animate .counter {
    animation: slideInBounce 0.6s ease-out 0.3s both;
}

@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }

    70% {
        transform: translateX(-2px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.counter-dot {
    width: 8px;
    height: 8px;
    background: var(--green-primary);
    border-radius: 50%;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

.counter-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--green-primary);
}

/* Opportunity cards with staggered animations */
.opportunity-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.mockup-wrapper.animate .opportunity-card {
    animation: cardSlideIn 0.6s ease-out forwards;
}

.mockup-wrapper.animate .opportunity-card:nth-child(1) {
    animation-delay: 0.5s;
}

.mockup-wrapper.animate .opportunity-card:nth-child(2) {
    animation-delay: 0.7s;
}

.mockup-wrapper.animate .opportunity-card:nth-child(3) {
    animation-delay: 0.9s;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Progress bar animation for cards */
.opportunity-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green-primary);
}

.mockup-wrapper.animate .opportunity-card::after {
    animation: progressFill 3s ease-out forwards;
}

.mockup-wrapper.animate .opportunity-card:nth-child(1)::after {
    animation-delay: 1s;
    animation-duration: 2s;
}

.mockup-wrapper.animate .opportunity-card:nth-child(2)::after {
    animation-delay: 1.2s;
    animation-duration: 2.5s;
}

.mockup-wrapper.animate .opportunity-card:nth-child(3)::after {
    animation-delay: 1.4s;
    animation-duration: 3s;
}

@keyframes progressFill {
    to {
        width: 100%;
    }
}

.opportunity-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mockup-grid .opportunity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.mockup-grid .opportunity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.opportunity-badges {
    display: flex;
    gap: 6px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    height: 20px;
    box-sizing: border-box;
}

.badge-new {
    background: var(--green-primary);
    color: white;
}

.badge-urgent {
    background: var(--red-color);
    color: white;
}

.badge-today {
    background: var(--yellow-color);
    color: white;
}

.mockup-wrapper.animate .badge {
    animation: badgePop 0.4s ease-out forwards;
}

.mockup-wrapper.animate .badge-new {
    animation-delay: 1.2s;
}

.mockup-wrapper.animate .badge-urgent {
    animation-delay: 1.4s;
    animation: badgePop 0.4s ease-out forwards, urgentGlow 2s ease-in-out infinite 1.4s;
}

.mockup-wrapper.animate .badge-today {
    animation-delay: 1.3s;
}

@keyframes badgePop {
    from {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes urgentGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
}

.opportunity-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--gray-600);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
}

.mockup-wrapper.animate .detail-item {
    animation: mockupFadeInUp 0.4s ease-out forwards;
}

.mockup-wrapper.animate .opportunity-card:nth-child(1) .detail-item:nth-of-type(1) {
    animation-delay: 0.8s;
}

.mockup-wrapper.animate .opportunity-card:nth-child(1) .detail-item:nth-of-type(2) {
    animation-delay: 0.9s;
}

.mockup-wrapper.animate .opportunity-card:nth-child(1) .detail-item:nth-of-type(3) {
    animation-delay: 1s;
}

@keyframes mockupFadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* ===== MOCKUP 2: POPUP ANIMATIONS ===== */
.popup-container {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 410px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}



.popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 340px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: scale(0.7) translateY(20px);
}

.mockup-wrapper.animate .popup {
    animation: popupAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-header {
    background: var(--green-primary);
    color: white;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
}

/* Animated header shine effect */
.popup-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 70%);
}

@keyframes headerShine {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }

    100% {
        transform: translateX(100%) translateY(100%);
    }
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.popup-subtitle {
    font-size: 12px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.popup-body {
    padding: 20px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    opacity: 0;
}

.mockup-wrapper.animate .info-row {
    animation: infoRowSlide 0.5s ease-out forwards;
}

.mockup-wrapper.animate .info-row:nth-of-type(1) {
    animation-delay: 0.2s;
}

.mockup-wrapper.animate .info-row:nth-of-type(2) {
    animation-delay: 0.3s;
}

.mockup-wrapper.animate .info-row:nth-of-type(3) {
    animation-delay: 0.4s;
}

.mockup-wrapper.animate .info-row:nth-of-type(4) {
    animation-delay: 0.5s;
}

@keyframes infoRowSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-icon {
    width: 32px;
    height: 32px;
    background: var(--gray-50);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@keyframes mockupIconRotate {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(5deg);
    }

    75% {
        transform: rotate(-5deg);
    }
}

.info-icon svg {
    width: 16px;
    height: 16px;
    color: var(--gray-600);
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 11px;
    color: var(--gray-600);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

/* Checkmark animation for eligible */
.info-row:nth-of-type(3) .info-value::after {
    content: ' ✓';
    color: var(--green-primary);
    animation: checkAppear 0.4s ease-out 0.8s both;
}

@keyframes checkAppear {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.popup-actions {
    padding: 16px 20px;
    background: #fafafa;
    display: flex;
    gap: 10px;
}

.mockup-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
}

.mockup-btn-secondary {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--border-color);
}

.mockup-btn-primary {
    background: var(--green-primary);
    color: white;
}

.mockup-wrapper.animate .mockup-btn {
    animation: buttonFadeIn 0.4s ease-out forwards;
}

.mockup-wrapper.animate .mockup-btn-secondary {
    animation-delay: 0.6s;
}

.mockup-wrapper.animate .mockup-btn-primary {
    animation-delay: 0.7s;
}

@keyframes buttonFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mockup-btn:hover {
    transform: translateY(-2px);
}

/* ===== MOCKUP 3: SUCCESS STATE ANIMATIONS ===== */
.success-container {
    background: #fafafa;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    min-height: 410px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Celebration background animation */
.success-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle,
            rgba(16, 185, 129, 0.1) 0%,
            rgba(16, 185, 129, 0.05) 30%,
            transparent 70%);
    transform: translate(-50%, -50%);
}

.mockup-wrapper.animate .success-container::before {
    animation: celebrationPulse 2s ease-out forwards;
}

@keyframes celebrationPulse {
    to {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

.success-container .success-icon {
    width: 80px;
    height: 80px;
    background: var(--green-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    opacity: 0;
    transform: scale(0) rotate(-180deg);
}

@keyframes successIconPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    40% {
        transform: scale(1.3) rotate(20deg);
    }

    60% {
        transform: scale(0.9) rotate(-10deg);
    }

    80% {
        transform: scale(1.05) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes successGlow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(16, 185, 129, 0.5);
    }
}

.success-container .success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.success-container .success-icon svg path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
}

.mockup-wrapper.animate .success-icon svg path {
    animation: checkDraw 0.8s ease-out 0.4s forwards;
}

@keyframes checkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Prevent double checkmark by overriding style.css */
.success-container .success-icon::after {
    display: none !important;
}

/* Improved confetti animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    opacity: 0;
}

.confetti:nth-child(2) {
    background: var(--green-primary);
    top: 10px;
    left: 20px;
}

.confetti:nth-child(3) {
    background: #60a5fa;
    width: 8px;
    height: 8px;
    top: 5px;
    right: 25px;
}

.confetti:nth-child(4) {
    background: #fbbf24;
    width: 6px;
    height: 6px;
    top: 15px;
    left: 50%;
}

.confetti:nth-child(5) {
    background: #f87171;
    top: 0;
    right: 30px;
}

.mockup-wrapper.animate .confetti:nth-child(2) {
    animation: confettiFall1 2s ease-out 0.5s forwards;
}

.mockup-wrapper.animate .confetti:nth-child(3) {
    animation: confettiFall2 2s ease-out 0.6s forwards;
}

.mockup-wrapper.animate .confetti:nth-child(4) {
    animation: confettiFall3 2s ease-out 0.7s forwards;
}

.mockup-wrapper.animate .confetti:nth-child(5) {
    animation: confettiFall4 2s ease-out 0.8s forwards;
}

@keyframes confettiFall1 {
    0% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 0;
    }

    10% {
        transform: translateY(-20px) rotate(120deg) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(150px) rotate(720deg) scale(0.3);
        opacity: 0;
    }
}

@keyframes confettiFall2 {
    0% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 0;
    }

    10% {
        transform: translateY(-30px) rotate(-90deg) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateY(140px) rotate(-540deg) scale(0.2);
        opacity: 0;
    }
}

@keyframes confettiFall3 {
    0% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 0;
    }

    10% {
        transform: translateY(-25px) rotate(180deg) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(160px) rotate(900deg) scale(0.4);
        opacity: 0;
    }
}

@keyframes confettiFall4 {
    0% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 0;
    }

    10% {
        transform: translateY(-15px) rotate(-180deg) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(130px) rotate(-820deg) scale(0.3);
        opacity: 0;
    }
}

.success-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    opacity: 0;
}

.mockup-wrapper.animate .success-title {
    animation: titleSlideIn 0.5s ease-out 0.4s forwards;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message-card {
    background: var(--green-primary);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px auto 24px;
    max-width: 320px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.mockup-wrapper.animate .success-message-card {
    animation: messageCardExpand 0.6s ease-out 0.6s forwards;
}

@keyframes messageCardExpand {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animated shine effect for success message card */
.success-message-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 70%);
}

.mockup-wrapper.animate .success-message-card::after {
    animation: headerShine 3s infinite;
}

.success-message-text {
    font-size: 14px;
    color: white;
    line-height: 1.6;
    font-weight: 500;
    text-align: center;
    margin: 0;
    position: relative;
    z-index: 1;
}

.success-details {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    opacity: 0;
}

.mockup-wrapper.animate .success-details {
    animation: detailsSlideUp 0.5s ease-out 0.8s forwards;
}

@keyframes detailsSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    opacity: 0;
}

.mockup-wrapper.animate .success-detail-row {
    animation: rowFadeIn 0.3s ease-out forwards;
}

.mockup-wrapper.animate .success-detail-row:nth-of-type(1) {
    animation-delay: 1s;
}

.mockup-wrapper.animate .success-detail-row:nth-of-type(2) {
    animation-delay: 1.1s;
}

.mockup-wrapper.animate .success-detail-row:nth-of-type(3) {
    animation-delay: 1.2s;
}

.mockup-wrapper.animate .success-detail-row:nth-of-type(4) {
    animation-delay: 1.3s;
}

@keyframes rowFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.success-detail-row:not(:last-child) {
    border-bottom: 1px solid var(--gray-50);
}

.success-label {
    font-size: 13px;
    color: var(--gray-600);
}

.success-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
}

/* Responsive */
@media (max-width: 1400px) {
    .mockup-grid {
        padding: 0 20px;
    }
}

@media (max-width: 1200px) {
    .mockup-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 1024px) {
    .mockup-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .mockup-grid .dashboard-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .opportunity-details {
        flex-wrap: wrap;
        gap: 10px;
    }
}