/* GMB Evaluator — Styles */
#gmb-evaluator-wrap {
    max-width: 720px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.gmb-eval-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    padding: 24px 28px;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
}
.gmb-eval-header .gmb-eval-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gmb-eval-header .gmb-eval-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}
.gmb-eval-header h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff !important;
}
.gmb-eval-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
    color: #fff !important;
}

/* Form container */
#gmb-eval-form {
    background: #fff;
    border: 1px solid #e8eaed;
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Fields */
.gmb-eval-field {
    margin-bottom: 22px;
}
.gmb-eval-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3c4043;
    margin-bottom: 8px;
}
.gmb-eval-field .field-icon {
    margin-right: 6px;
}
.gmb-eval-field input[type="text"],
.gmb-eval-field textarea,
.gmb-eval-field select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #202124;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}
.gmb-eval-field input[type="text"]:focus,
.gmb-eval-field textarea:focus,
.gmb-eval-field select:focus {
    border-color: #1a73e8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.gmb-eval-field textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}
.char-counter {
    text-align: right;
    font-size: 0.78rem;
    color: #80868b;
    margin-top: 5px;
}
.char-counter span {
    font-weight: 600;
}

/* Dropzone */
.gmb-dropzone {
    position: relative;
    border: 2px dashed #dadce0;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
    cursor: pointer;
}
.gmb-dropzone:hover,
.gmb-dropzone.drag-over {
    border-color: #1a73e8;
    background: #f0f6ff;
}
.gmb-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.dropzone-content {
    text-align: center;
    padding: 30px 20px;
    pointer-events: none;
}
.dropzone-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.dropzone-content p {
    margin: 0 0 4px;
    font-size: 0.9rem;
    color: #5f6368;
}
.dropzone-content span {
    color: #1a73e8;
    font-weight: 600;
    text-decoration: underline;
}
.dropzone-content small {
    color: #9aa0a6;
    font-size: 0.8rem;
}
.dropzone-preview {
    position: relative;
    width: 100%;
}
.dropzone-preview img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}
.remove-img {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.gmb-eval-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
}
.gmb-eval-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.35);
}
.gmb-eval-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.gmb-eval-btn--secondary {
    background: #f1f3f4;
    color: #3c4043;
    margin-top: 16px;
}
.gmb-eval-btn--secondary:hover:not(:disabled) {
    background: #e8eaed;
    box-shadow: none;
}

/* Loader dots */
.btn-loader {
    display: flex;
    gap: 4px;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: dotBounce 1.2s infinite ease-in-out;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Result container */
#gmb-eval-result {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: fadeSlideUp 0.4s ease-out;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.result-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #202124;
}

/* Badge */
.result-badge {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-insuffisant {
    background: #fce8e6;
    color: #c5221f;
    border: 1.5px solid #f28b82;
}
.badge-satisfaisant {
    background: #fef7e0;
    color: #b06000;
    border: 1.5px solid #fbbc04;
}
.badge-bon {
    background: #e6f4ea;
    color: #137333;
    border: 1.5px solid #34a853;
}
.badge-tres-bon {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1.5px solid #1a73e8;
}

/* Score meter */
.score-meter-wrap {
    margin-bottom: 24px;
}
.score-meter {
    height: 12px;
    background: #f1f3f4;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}
.score-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0%;
}
.score-fill.insuffisant { background: linear-gradient(90deg, #ea4335, #f28b82); }
.score-fill.satisfaisant { background: linear-gradient(90deg, #fbbc04, #fde68a); }
.score-fill.bon { background: linear-gradient(90deg, #34a853, #86efac); }
.score-fill.tres-bon { background: linear-gradient(90deg, #1a73e8, #60a5fa); }

.score-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #80868b;
    font-weight: 500;
}

/* Summary */
.result-summary {
    background: #f8f9fa;
    border-left: 4px solid #1a73e8;
    padding: 14px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #3c4043;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Improvements */
.improvements-wrap h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #202124;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.improvements-wrap h4::before {
    content: "💡";
}

.improvement-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    margin-bottom: 10px;
    animation: fadeSlideUp 0.4s ease-out both;
}
.improvement-item:nth-child(2) { animation-delay: 0.1s; }
.improvement-item:nth-child(3) { animation-delay: 0.2s; }

.improvement-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.improvement-body {
    flex: 1;
}
.improvement-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #202124;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.impact-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.impact-faible  { background: #f1f3f4; color: #5f6368; }
.impact-moyen   { background: #fef7e0; color: #b06000; }
.impact-fort    { background: #e6f4ea; color: #137333; }

.improvement-desc {
    font-size: 0.875rem;
    color: #5f6368;
    line-height: 1.55;
}

/* Error */
.eval-error {
    background: #fce8e6;
    border: 1px solid #f28b82;
    color: #c5221f;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-top: 12px;
    line-height: 1.5;
}
.eval-error .rl-icon {
    margin-right: 4px;
}
.eval-error .rl-timer {
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    background: rgba(0,0,0,0.06);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .gmb-eval-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    #gmb-eval-form,
    #gmb-eval-result {
        padding: 18px;
    }
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .score-labels { font-size: 0.65rem; }
}
