/**
 * Testimonial Form - Beautiful All-in-One Design
 * Colors: Primary #8f95b3 | Secondary #15bc84
 */

/* ========== BACKGROUND ========== */
.spmci-testimonial-bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f6f9 0%, #e8eaf0 100%);
    z-index: -1;
}

.spmci-testimonial-bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/bg-pattern.png');
    background-repeat: repeat;
    background-size: 300px;
    opacity: 0.03;
}

/* ========== WRAPPER ========== */
.spmci-testimonial-form-wrapper {
    max-width: 540px;
    margin: 50px auto;
    padding: 0 20px;
}

/* ========== FORM CONTAINER (GLASSMORPHISM) ========== */
.spmci-form-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(143, 149, 179, 0.12);
    border-radius: 24px;
    padding: 50px 35px;
    box-shadow: 0 8px 32px rgba(143, 149, 179, 0.12),
                0 0 1px rgba(143, 149, 179, 0.2);
}

/* ========== HERO ANIMATION ========== */
.spmci-form-hero-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

#starRatingAnimation {
    width: 280px;
    height: 280px;
    max-width: 100%;
}

.spmci-animation-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
}

.spmci-animation-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(21, 188, 132, 0.15);
}

@media (max-width: 480px) {
    #starRatingAnimation {
        width: 220px;
        height: 220px;
    }

    .spmci-form-hero-animation {
        margin-bottom: 20px;
    }
}

/* Animation Modal */
.spmci-animation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.spmci-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    height: 600px;
}

.spmci-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.spmci-modal-close:hover {
    transform: scale(1.1);
    background: #15bc84;
    color: white;
}

#starRatingAnimationModal {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .spmci-modal-content {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .spmci-modal-close {
        top: -45px;
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
}

/* ========== FORM HEADER ========== */
.spmci-form-header {
    text-align: center;
    margin-bottom: 45px;
}

.spmci-form-header h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spmci-form-subtitle {
    color: #8f95b3;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* ========== REWARD BANNER ========== */
.spmci-form-reward-banner {
    background: linear-gradient(135deg, rgba(21, 188, 132, 0.1) 0%, rgba(60, 208, 161, 0.08) 100%);
    border: 2px solid rgba(21, 188, 132, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: slideDown 0.5s ease;
}

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

.spmci-reward-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.spmci-reward-banner-text {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
}

.spmci-reward-banner-text strong {
    color: #15bc84;
    font-weight: 700;
}

@media (max-width: 480px) {
    .spmci-form-reward-banner {
        padding: 14px 16px;
        gap: 12px;
    }

    .spmci-reward-banner-icon {
        font-size: 28px;
    }

    .spmci-reward-banner-text {
        font-size: 0.85rem;
    }
}

/* ========== PHOTO UPLOAD ZONE ========== */
.spmci-photo-zone {
    margin-bottom: 40px;
}

.spmci-photo-wrapper {
    display: flex;
    justify-content: center;
}

.spmci-photo-rectangle {
    position: relative;
    width: 280px;
    height: 180px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(143, 149, 179, 0.05) 0%, rgba(21, 188, 132, 0.05) 100%);
    border: 3px dashed rgba(143, 149, 179, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.spmci-photo-rectangle:hover {
    border-color: #15bc84;
    background: linear-gradient(135deg, rgba(143, 149, 179, 0.08) 0%, rgba(21, 188, 132, 0.08) 100%);
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(21, 188, 132, 0.15);
}

.spmci-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 20px;
}

.spmci-photo-text {
    color: #8f95b3;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.spmci-photo-hint {
    display: block;
    color: #8f95b3;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    margin-top: -4px;
}

.spmci-photo-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    animation: photoZoom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes photoZoom {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.spmci-photo-rectangle.has-photo {
    border-style: solid;
    border-color: #15bc84;
    box-shadow: 0 8px 30px rgba(21, 188, 132, 0.2);
}

/* ========== INPUT GROUP ========== */
.spmci-input-group {
    margin-bottom: 35px;
}

.spmci-input-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.spmci-input-group input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(143, 149, 179, 0.15);
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-weight: 500;
}

.spmci-input-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(143, 149, 179, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    resize: vertical;
    min-height: 100px;
}

.spmci-input-group input:focus,
.spmci-input-group textarea:focus {
    outline: none;
    border-color: #15bc84;
    background: #fff;
    box-shadow: 0 4px 20px rgba(21, 188, 132, 0.12);
    transform: translateY(-2px);
}

.spmci-input-hint {
    display: block;
    color: #8f95b3;
    font-size: 0.8rem;
    margin-top: 8px;
    text-align: center;
    font-weight: 400;
}

.spmci-char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: #8f95b3;
    margin-top: 8px;
    font-weight: 600;
}

/* ========== RATING ZONE ========== */
.spmci-rating-zone {
    margin-bottom: 40px;
}

.spmci-rating-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

.spmci-stars-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    direction: rtl; /* Pour l'effet de remplissage au survol */
}

.spmci-stars-container input[type="radio"] {
    display: none;
}

.spmci-star {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.spmci-star svg {
    display: block;
    width: 48px;
    height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spmci-star svg path {
    fill: rgba(143, 149, 179, 0.1);
    stroke: #8f95b3;
    transition: all 0.3s ease;
}

/* Hover effect - fill all stars up to hovered */
.spmci-star:hover svg path,
.spmci-star:hover ~ .spmci-star svg path {
    fill: #fbbf24;
    stroke: #f59e0b;
}

/* Selected state */
.spmci-stars-container input[type="radio"]:checked ~ label svg path {
    fill: #fbbf24;
    stroke: #f59e0b;
}

.spmci-star:hover svg,
.spmci-stars-container input[type="radio"]:checked ~ label svg {
    transform: scale(1.15);
}

/* Animation on click */
.spmci-star:active svg {
    transform: scale(0.95);
}

/* ========== SUBMIT BUTTON ========== */
.spmci-submit-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #15bc84 0%, #13a574 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(21, 188, 132, 0.25);
    position: relative;
    overflow: hidden;
}

.spmci-submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.spmci-submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.spmci-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(21, 188, 132, 0.35);
}

.spmci-submit-btn:active {
    transform: translateY(-1px);
}

.spmci-btn-icon {
    font-size: 1.3rem;
}

.spmci-btn-text {
    position: relative;
    z-index: 1;
}

/* ========== SUCCESS/ERROR STATES ========== */
.spmci-success-container,
.spmci-error-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(143, 149, 179, 0.15);
}

.spmci-success-icon,
.spmci-error-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    animation: popIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.spmci-success-container h2,
.spmci-error-container h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: #333;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.spmci-success-container p {
    color: #666;
    font-size: 1rem;
    margin: 0 0 10px 0;
}

.spmci-success-note {
    font-size: 0.85rem !important;
    color: #8f95b3 !important;
}

.spmci-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 30px auto 0;
}

.spmci-success-checkmark svg {
    width: 100%;
    height: 100%;
}

.checkmark-circle {
    stroke: #15bc84;
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: #15bc84;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.spmci-retry-btn {
    margin-top: 25px;
    padding: 16px 35px;
    background: #15bc84;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spmci-retry-btn:hover {
    background: #13a574;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(21, 188, 132, 0.25);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    .spmci-form-container {
        padding: 40px 25px;
    }

    .spmci-form-header h2 {
        font-size: 1.6rem;
    }

    .spmci-photo-rectangle {
        width: 240px;
        height: 160px;
    }

    .spmci-star svg {
        width: 40px;
        height: 40px;
    }

    .spmci-stars-container {
        gap: 4px;
    }
}

@media (min-width: 640px) {
    .spmci-testimonial-form-wrapper {
        margin: 60px auto;
    }

    .spmci-form-container {
        padding: 60px 50px;
    }

    .spmci-form-header h2 {
        font-size: 2.3rem;
    }

    .spmci-photo-rectangle {
        width: 320px;
        height: 200px;
    }

    .spmci-star svg {
        width: 52px;
        height: 52px;
    }

    .spmci-stars-container {
        gap: 10px;
    }
}

/* ========== CELEBRATION OVERLAY ========== */
.spmci-celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.spmci-celebration-animation {
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 800px;
}

@media (max-width: 768px) {
    .spmci-celebration-animation {
        max-width: 100%;
        max-height: 100%;
    }
}

/* ========== REWARD BOX ========== */
.spmci-reward-box {
    background: linear-gradient(135deg, rgba(21, 188, 132, 0.1) 0%, rgba(60, 208, 161, 0.05) 100%);
    border: 2px solid rgba(21, 188, 132, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.spmci-reward-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: bounce 1s ease infinite;
}

.spmci-reward-text {
    font-size: 16px;
    color: #15bc84;
    margin: 0 0 16px 0;
}

.spmci-wallet-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #15bc84, #3cd0a1);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(21, 188, 132, 0.25);
}

.spmci-wallet-link:hover {
    background: linear-gradient(135deg, #12a474, #35ba8f);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(21, 188, 132, 0.35);
    color: white;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
