/* 
 * CSS Principal - dormeur.co Quiz 
 * Design Premium, Minimaliste, et Rassurant
 */

.dwbq-quiz-wrapper {
    max-width: 700px;
    margin: 40px auto;
    font-family: "Inter", "Roboto", "Helvetica Neue", sans-serif;
    color: #333;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Progress bar */
.dwbq-progress-bar-container {
    height: 6px;
    background: #f1f3f5;
    width: 100%;
}

.dwbq-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4A90E2 0%, #003366 100%);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.dwbq-quiz-content {
    padding: 40px;
}

/* Questions */
.dwbq-stacked-quiz {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.dwbq-q-num {
    color: #4A90E2;
    margin-right: 8px;
}

.dwbq-question-block {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.active-question {
    opacity: 1;
    transform: translateY(0);
}

.inactive-question {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.answered-question {
    opacity: 0.6;
    transform: translateY(0);
    pointer-events: auto; /* Allow changing answer */
}

.answered-question:hover {
    opacity: 1;
}

.dwbq-error-highlight {
    background-color: #fef2f2;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 0 0 2px #ef4444;
    transition: all 0.3s ease;
}

.dwbq-question-title {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.3;
}

.dwbq-help-text {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Answers Wrappers */
.dwbq-answers-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dwbq-choice-label {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f9fafb;
}

.dwbq-choice-label:hover {
    border-color: #d1d5db;
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dwbq-choice-label.selected {
    border-color: #4A90E2;
    background-color: #eff6ff;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.dwbq-choice-label input[type="radio"],
.dwbq-choice-label input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: #4A90E2;
}

.dwbq-choice-text {
    font-size: 16px;
    font-weight: 500;
}

/* Number inputs */
.dwbq-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dwbq-input-number {
    width: 120px;
    padding: 12px 16px;
    font-size: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.dwbq-input-number:focus {
    border-color: #4A90E2;
}

.dwbq-suffix {
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
}

.dwbq-btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.dwbq-btn-large {
    padding: 16px 36px;
    font-size: 18px;
    width: 100%;
}

/* Buttons */
.dwbq-btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.dwbq-btn-primary {
    background: #003366;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 51, 102, 0.2);
}

.dwbq-btn-primary:hover {
    background: #002244;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 51, 102, 0.3);
}

.dwbq-btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.dwbq-btn-secondary:hover {
    background: #e5e7eb;
    color: #111827;
}

.dwbq-btn-outline {
    background: transparent;
    border: 2px solid #003366;
    color: #003366;
}

.dwbq-btn-outline:hover {
    background: #f8fafc;
}

/* Results */
.dwbq-result-wrapper {
    animation: dwbqFadeIn 0.6s ease;
}

.dwbq-result-title {
    font-size: 28px;
    text-align: center;
    color: #003366;
    margin-bottom: 30px;
}

.dwbq-result-block {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.dwbq-highlight-weight {
    font-size: 24px;
    font-weight: 700;
    color: #4A90E2;
}

.dwbq-product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
}

.dwbq-product-card h3 {
    margin-top: 0;
    color: #111827;
    font-size: 22px;
}

.dwbq-product-card.main-recommendation {
    border-top: 4px solid #4A90E2;
}

.dwbq-custom-text {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 25px;
    font-style: italic;
}

.dwbq-options-block {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #cbd5e1;
}

.dwbq-options-block h4 {
    color: #64748b;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dwbq-options-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dwbq-options-list li a {
    color: #4A90E2;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    background: #eff6ff;
    border-radius: 20px;
    transition: background 0.2s;
}

.dwbq-options-list li a:hover {
    background: #dbeafe;
}

.dwbq-error-msg {
    color: #dc2626;
    background: #fef2f2;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    margin-bottom: 20px;
}

/* Spinner pour le calcul */
.dwbq-spinner {
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #003366;
    border-radius: 50%;
    animation: dwbqSpin 1s linear infinite;
}

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

@media (max-width: 600px) {
    .dwbq-quiz-content { padding: 25px 20px; }
    .dwbq-nav-buttons { flex-direction: column-reverse; gap: 10px; }
    .dwbq-btn { width: 100%; }
}
