/**
 * 🎯 FEEDBACK-SURVEY.CSS - Styles du composant feedback
 * 
 * 📝 Description : Les styles du questionnaire de feedback ! Modal, étapes, boutons, animations.
 *                  Design moderne et engageant pour encourager les testeurs à donner leur avis.
 * 
 * 🔗 Appelé par : feedback-survey.html (composant intégré dans contract-analysis.html)
 * 
 * 📤 Output : Styles CSS pour le modal de feedback
 */

/* Feedback Survey Modal Styles */

.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.feedback-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.feedback-container {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.feedback-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 32px;
    text-align: center;
    position: relative;
}

.feedback-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.feedback-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.feedback-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feedback-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feedback-header p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Progress Bar */
.feedback-progress {
    padding: 24px 32px 0;
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.progress-step {
    color: #6366f1;
}

/* Content */
.feedback-content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

.feedback-step {
    display: none;
    animation: stepFadeIn 0.3s ease;
}

.feedback-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.step-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.form-label.required::after {
    content: " *";
    color: #ef4444;
}

/* Radio & Checkbox Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.options-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.option-card {
    position: relative;
    cursor: pointer;
}

.option-card input {
    position: absolute;
    opacity: 0;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.2s;
    cursor: pointer;
}

.option-card input:checked + .option-label {
    background: #eef2ff;
    border-color: #6366f1;
    color: #6366f1;
}

.option-card input:checked + .option-label::before {
    content: "✓";
    margin-right: 8px;
    font-weight: 700;
}

.option-label:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

/* Checkbox specific */
.option-card.checkbox input:checked + .option-label {
    background: #dcfce7;
    border-color: #10b981;
    color: #059669;
}

/* Rating Scale */
.rating-scale {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.rating-option {
    flex: 1;
    position: relative;
}

.rating-option input {
    position: absolute;
    opacity: 0;
}

.rating-label {
    display: block;
    text-align: center;
    padding: 12px 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-option input:checked + .rating-label {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: white;
    transform: scale(1.1);
}

.rating-label:hover {
    border-color: #cbd5e1;
    transform: scale(1.05);
}

/* Text Input */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: #1e293b;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: #fafbff;
}

.form-textarea::placeholder {
    color: #94a3b8;
}

/* Select Input */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: #1e293b;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #6366f1;
}

/* Navigation Footer */
.feedback-footer {
    padding: 24px 32px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
}

.btn-feedback {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-feedback:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-later {
    background: transparent;
    color: #64748b;
    border: none;
    font-size: 13px;
    text-decoration: underline;
    padding: 8px;
}

.btn-later:hover {
    color: #1e293b;
}

/* Success Screen */
.success-content {
    text-align: center;
    padding: 48px 32px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.success-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.success-content p {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
}

/* Call-to-Action Button (Bouton fixe en bas) */
.feedback-cta-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(99, 102, 241, 0.4);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: pulse 2s ease-in-out infinite;
}

.feedback-cta-button.visible {
    transform: translateY(0);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 -4px 20px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 -8px 30px rgba(99, 102, 241, 0.6);
    }
}

.feedback-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.feedback-cta-icon {
    font-size: 40px;
    animation: bounce 1s ease-in-out infinite;
}

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

.feedback-cta-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feedback-cta-text strong {
    font-size: 18px;
    font-weight: 700;
}

.feedback-cta-text span {
    font-size: 14px;
    opacity: 0.9;
}

.feedback-cta-action {
    padding: 14px 32px;
    background: white;
    color: #6366f1;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-cta-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feedback-cta-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-cta-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .feedback-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .feedback-header {
        padding: 24px;
    }

    .feedback-content {
        padding: 24px;
    }

    .feedback-footer {
        padding: 16px 24px;
    }

    .options-grid.columns-2 {
        grid-template-columns: 1fr;
    }

    .rating-scale {
        flex-wrap: wrap;
    }

    .rating-option {
        min-width: calc(20% - 8px);
    }

    /* CTA Button mobile */
    .feedback-cta-button {
        padding: 16px;
    }

    .feedback-cta-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .feedback-cta-icon {
        font-size: 32px;
    }

    .feedback-cta-text strong {
        font-size: 16px;
    }

    .feedback-cta-text span {
        font-size: 13px;
    }

    .feedback-cta-action {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }

    .feedback-cta-close {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}

