/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Background */
.background {
    position: absolute;
    inset: 0;
    background-image: url('public/bg-speedpayfull.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: backgroundZoom 20s ease-in-out infinite alternate;
}

.background-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(0.5px);
    animation: overlayPulse 8s ease-in-out infinite alternate;
}

/* Content layout */
.content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    animation: contentSlideIn 1.2s ease-out;
}

.left-space {
    flex: 1.2;
}

.right-column {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    animation: rightColumnSlide 1.5s ease-out 0.3s both;
}

/* Form container */
.form-container {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    animation: logoFloat 1s ease-out 0.5s both;
}

.logo {
    height: 4rem;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
    animation: logoGlow 3s ease-in-out infinite alternate;
}

.logo:hover {
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.1);
}

/* Title */
.title-container {
    text-align: center;
    animation: titleSlideUp 1.2s ease-out 0.7s both;
}

.title {
    font-size: 1.125rem;
    font-weight: bold;
    color: #2563eb;
    line-height: 1.4;
    font-style: italic;
    text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
    animation: titlePulse 4s ease-in-out infinite;
}

/* Form wrapper */
.form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: formSlideUp 1.5s ease-out 0.9s both;
    position: relative;
    overflow: hidden;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Field groups */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: fieldSlideIn 0.8s ease-out both;
}

.field-group:nth-child(1) { animation-delay: 1.1s; }
.field-group:nth-child(2) { animation-delay: 1.3s; }
.field-group:nth-child(3) { animation-delay: 1.5s; }

.field-label {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

/* Input wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.input-wrapper:hover {
    transform: translateY(-2px);
}

.input-wrapper.focused {
    transform: translateY(-2px) scale(1.02);
}

.input-field {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.25rem;
    background: rgba(249, 250, 251, 0.9);
    border: 2px solid #bfdbfe;
    border-radius: 1rem;
    color: #1f2937;
    font-size: 0.875rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.input-field::placeholder {
    color: #6b7280;
    transition: opacity 0.3s ease;
}

.input-field:focus::placeholder {
    opacity: 0.7;
}

.readonly-field {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    cursor: not-allowed;
    font-weight: 500;
}

/* Input icons */
.input-icon {
    position: absolute;
    right: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: white;
    border-radius: 0.75rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: iconFloat 2s ease-in-out infinite alternate;
}

.input-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.bookmark-btn {
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bookmark-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: scale(1.1) rotate(-5deg);
}

/* Help link */
.help-link {
    color: #f97316;
    font-size: 0.75rem;
    font-weight: 500;
    border: 2px solid #fed7aa;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(254, 215, 170, 0.2) 100%);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.help-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.2), transparent);
    transition: left 0.5s ease;
}

.help-link:hover::before {
    left: 100%;
}

.help-link:hover {
    color: #ea580c;
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Help message */
.help-message {
    padding: 1rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #bfdbfe;
    border-radius: 1rem;
    font-size: 0.75rem;
    color: #1e40af;
    display: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.help-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #3b82f6);
    animation: progressBar 2s ease-in-out infinite;
}

.help-message.show {
    display: block;
    animation: helpSlideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subscription Information Display */
.subscription-info {
    margin-top: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(186, 230, 253, 0.5);
    transition: all 0.3s ease;
}

.subscription-info:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 35px -5px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(59, 130, 246, 0.5);
}

.info-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 1rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.info-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.info-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e0f2fe;
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-color: #bae6fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.info-item.total {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.info-item.total .info-label,
.info-item.total .info-value {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.info-item.total:hover {
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.info-label {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.info-value {
    font-weight: 700;
    color: #3b82f6;
    font-size: 0.875rem;
    text-align: right;
}

/* Style spécifique pour l'adresse */
.info-item.address {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item.address .info-value {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    color: #6b7280;
    text-align: left;
    max-width: 100%;
    word-wrap: break-word;
}

/* Spinner pour le chargement */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid #e0f2fe;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Submit button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: white;
    font-weight: bold;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    animation: buttonSlideUp 1s ease-out 1.7s both;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(59, 130, 246, 0.1);
}

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

/* Animations */
@keyframes backgroundZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

@keyframes overlayPulse {
    0% { opacity: 0.1; }
    100% { opacity: 0.2; }
}

@keyframes contentSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rightColumnSlide {
    0% {
        opacity: 0;
        transform: translateX(50px) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes logoFloat {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoGlow {
    0% { filter: brightness(1) drop-shadow(0 0 5px rgba(59, 130, 246, 0.3)); }
    100% { filter: brightness(1.1) drop-shadow(0 0 15px rgba(59, 130, 246, 0.5)); }
}

@keyframes titleSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes formSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fieldSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes iconFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-2px); }
}

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

@keyframes helpSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 200px;
    }
}

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

@keyframes buttonSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes subscriptionSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading animation for form submission */
.submit-btn.loading {
    animation: pulse 1.5s ease-in-out infinite;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */


@media (max-width: 700px) {

    .left-space {
        display: none!important;
    }

    .right-column {
        flex: 1.8;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem 1rem;
        animation: rightColumnSlide 1.5s ease-out 0.3s both;
    }

    .logo {
        height: 5rem;
    }
    
    .title {
        font-size: 0.9rem!important;
    }
    
    
    
    .field-label {
        font-size: 1rem;
    }
    
    .input-field {
        font-size: 1rem;
        padding: 1.25rem 4rem 1.25rem 1.5rem;
    }
    
    .submit-btn {
        font-size: 1.125rem;
        padding: 1.25rem 2rem;
    }
    
    .info-content {
        padding: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-value {
        text-align: left;
        font-size: 1rem;
    }
    
    .info-label {
        font-size: 0.813rem;
    }
    
    .info-item.address .info-value {
        font-size: 0.7rem;
    }
}

@media (max-width: 767px) {

    .right-column {
        flex: 1.8;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem 1rem;
        animation: rightColumnSlide 1.5s ease-out 0.3s both;
    }

    .logo {
        height: 5rem;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    
    
    .field-label {
        font-size: 1rem;
    }
    
    .input-field {
        font-size: 1rem;
        padding: 1.25rem 4rem 1.25rem 1.5rem;
    }
    
    .submit-btn {
        font-size: 1.125rem;
        padding: 1.25rem 2rem;
    }
}

@media (min-width: 768px) {

    .right-column {
        flex: 1.8;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem 1rem;
        animation: rightColumnSlide 1.5s ease-out 0.3s both;
    }

    .logo {
        height: 5rem;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    
    
    .field-label {
        font-size: 1rem;
    }
    
    .input-field {
        font-size: 1rem;
        padding: 1.25rem 4rem 1.25rem 1.5rem;
    }
    
    .submit-btn {
        font-size: 1.125rem;
        padding: 1.25rem 2rem;
    }
}

@media (min-width: 1024px) {
    .form-container {
        max-width: 32rem;
    }
    
    .logo {
        height: 6rem;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    .input-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Hover effects for mobile */
@media (hover: none) {
    .input-wrapper:hover {
        transform: none;
    }
    
    .submit-btn:hover {
        transform: none;
    }
    
    .help-link:hover {
        transform: none;
    }
}