/* ═══════════════════════════════════════
   Local Reviews — Front CSS v1.6.0
   ═══════════════════════════════════════ */

.lr-wrap {
    --lr-primary: var(--wp--preset--color--primary, #1b2e5a);
    --lr-star: #f59e0b;
    --lr-star-empty: rgba(255,255,255,.45);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #fff;
    margin: 2.5rem auto 1.5rem;
    max-width: 900px;
    padding: 2rem;
    background: var(--lr-primary);
    border-radius: 8px;
}

/* ─── Header ─── */

.lr-header { margin-bottom: 1.5rem; }

.lr-title {
    font-size: clamp(1.4rem, 2.45vw, 1.75rem);
    font-weight: 700;
    margin: 0 0 .5rem;
    color: #fff;
}

.lr-summary {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.lr-avg-score {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.lr-avg-stars { display: inline-flex; gap: 1px; }

.lr-count {
    color: rgba(255,255,255,.8);
    font-size: 1rem;
}

.lr-no-reviews {
    color: rgba(255,255,255,.8);
    margin: 0;
    font-size: 1rem;
}

/* ─── Stars ─── */

.lr-star { font-size: 1.1rem; line-height: 1; }
.lr-star-filled { color: var(--lr-star); }
.lr-star-empty { color: var(--lr-star-empty); }

/* ─── Review list ─── */

.lr-list {
    display: flex;
    flex-direction: column;
}

.lr-review-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,.2);
}

.lr-review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lr-review-item.lr-review-new {
    animation: lr-fade-in .3s ease-out;
}

@keyframes lr-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.lr-review-top {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .3rem;
}

.lr-review-author {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.lr-review-stars {
    display: inline-flex;
    gap: 1px;
}

.lr-review-stars .lr-star { font-size: .95rem; }

.lr-review-date {
    color: rgba(255,255,255,.6);
    font-size: .85rem;
    margin-left: auto;
}

.lr-review-title {
    margin: 0 0 .2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.lr-review-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255,255,255,.9);
}

/* ─── Formulaire ─── */

.lr-form-section {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.2);
    margin-top: 1.25rem;
}

.lr-field { margin-bottom: .9rem; }

.lr-field label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,.8);
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.lr-field label small {
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}

.lr-field input[type="text"],
.lr-field textarea {
    width: 100%;
    padding: .6rem .75rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1.5px solid rgba(255,255,255,.2);
    border-radius: 5px;
    background: rgba(255,255,255,.08);
    color: #fff;
    transition: border-color .2s, background .2s;
    box-sizing: border-box;
}

.lr-field input::placeholder,
.lr-field textarea::placeholder {
    color: rgba(255,255,255,.45);
}

.lr-field input:focus,
.lr-field textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.12);
}

.lr-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Star input */

.lr-star-input {
    display: inline-flex;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.lr-star-btn {
    font-size: 1.8rem;
    color: var(--lr-star-empty);
    transition: color .12s, transform .12s;
    line-height: 1;
}

.lr-star-btn:hover,
.lr-star-btn.lr-active {
    color: var(--lr-star);
}

.lr-star-btn:hover {
    transform: scale(1.1);
}

/* Submit */

.lr-submit {
    display: inline-block;
    padding: .6rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--lr-primary);
    background: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity .2s;
}

.lr-submit:hover { opacity: .85; }
.lr-submit:disabled { opacity: .5; cursor: wait; }

.lr-msg {
    margin-top: .5rem;
    font-size: .9rem;
    min-height: 1.2em;
}
.lr-msg.lr-success { color: #86efac; }
.lr-msg.lr-error { color: #fca5a5; }

/* ─── CGU checkbox ─── */

.lr-cgu-field {
    margin-bottom: .6rem;
}

.lr-cgu-label {
    display: flex !important;
    align-items: flex-start;
    gap: .5rem;
    font-size: .85rem !important;
    font-weight: 400 !important;
    color: rgba(255,255,255,.75) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
    line-height: 1.4;
}

.lr-cgu-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: #fff;
    cursor: pointer;
}

.lr-cgu-label a {
    color: rgba(255,255,255,.95);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lr-cgu-label a:hover {
    color: #fff;
}

.lr-cgu-text {
    display: none;
    margin-top: .5rem;
    padding: .75rem 1rem;
    background: rgba(255,255,255,.06);
    border-radius: 5px;
    border-left: 2px solid rgba(255,255,255,.25);
}

.lr-cgu-text.lr-open {
    display: block;
    animation: lr-fade-in .25s ease-out;
}

.lr-cgu-text p {
    font-size: .85rem;
    line-height: 1.55;
    color: rgba(255,255,255,.7);
    margin: 0 0 .5rem;
}

.lr-cgu-text p:last-child {
    margin-bottom: 0;
}

/* ─── Responsive ─── */

@media (max-width: 600px) {
    .lr-wrap {
        margin: 2rem -.5rem 1rem;
        padding: 1.25rem;
    }
    .lr-title { font-size: 1.2rem; }
    .lr-avg-score { font-size: 1.4rem; }
    .lr-review-date { margin-left: 0; width: 100%; }
}
