:root {
    --bg: #f2f4f7;
    --card-bg: #ffffff;
    --text: #1a1f36;
    --muted: #6b7280;
    --accent: #2f6fed;
    --star: #f5a623;
    --border: #e2e5ea;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.4;
}

main {
    display: flex;
    justify-content: center;
    padding: 16px;
}

.card {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card.center {
    text-align: center;
}

.ref {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 4px;
}

.prestation {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

h1 {
    font-size: 1.3rem;
    margin: 0 0 20px;
}

.field {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Note globale : étoiles */
.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}

.rating input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating label {
    font-size: 2.4rem;
    line-height: 1;
    color: var(--border);
    cursor: pointer;
    padding: 4px 2px;
}

.rating input:checked ~ label,
.rating label:hover,
.rating label:hover ~ label {
    color: var(--star);
}

/* Critères : notes 0-5 en pastilles */
.rating-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rating-scale input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-scale label {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.rating-scale input:checked + label {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

textarea {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.btn {
    width: 100%;
    min-height: 48px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
}

.btn:active {
    opacity: 0.85;
}

.error {
    background: #fdecea;
    color: #b3261e;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.icon-ok {
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    background: #e6f4ea;
    color: #1e7e34;
    font-size: 1.6rem;
    margin: 0 auto 16px;
}

@media (min-width: 600px) {
    main {
        padding: 40px 16px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1115;
        --card-bg: #1a1d24;
        --text: #f2f4f7;
        --muted: #9aa0aa;
        --border: #2b2f38;
    }
}
