/* Norliss Reviews v2.0 — Front-end CSS */

:root {
    --nr-accent: #F726B0;
    --nr-accent-light: #F726B018;
    --nr-accent-mid: #F726B040;
    --nr-radius: 14px;
    --nr-radius-sm: 8px;
    --nr-shadow: 0 2px 16px rgba(0,0,0,.07);
    --nr-shadow-lg: 0 8px 40px rgba(0,0,0,.18);
    --nr-g50: #fafafa;
    --nr-g100: #f3f3f3;
    --nr-g200: #e8e8e8;
    --nr-g500: #888;
    --nr-g800: #222;
    --nr-text: #1a1a1a;
    --nr-muted: #777;
    --nr-white: #fff;
}

.nr-section {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--nr-text);
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

/* Header */
.nr-section-header { text-align: center; margin-bottom: 2.5rem; }
.nr-section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .4rem;
}
.nr-section-sub { font-size: 1rem; color: var(--nr-muted); margin: 0; }

/* Résumé */
.nr-summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    background: var(--nr-g50);
    border: 1px solid var(--nr-g200);
    border-radius: var(--nr-radius);
    padding: 1.75rem 2rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 640px) {
    .nr-summary { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; padding: 1.25rem; }
    .nr-bar-row { justify-content: center; }
    .nr-summary-cta { display: flex; justify-content: center; }
}
.nr-big-score { font-size: 56px; font-weight: 800; line-height: 1; color: var(--nr-accent); letter-spacing: -.03em; }
.nr-big-stars { display: flex; gap: 3px; margin: 6px 0 5px; }
@media (max-width: 640px) { .nr-big-stars { justify-content: center; } }
.nr-review-count { font-size: 13px; color: var(--nr-muted); }

.nr-summary-bars { display: flex; flex-direction: column; gap: 7px; }
.nr-bar-row { display: flex; align-items: center; gap: 7px; }
.nr-bar-lbl { font-size: 12px; font-weight: 600; width: 8px; text-align: right; }
.nr-bar-star { flex-shrink: 0; }
.nr-bar-track { flex: 1; height: 7px; background: var(--nr-g200); border-radius: 99px; overflow: hidden; min-width: 100px; }
.nr-bar-fill { height: 100%; background: var(--nr-accent); border-radius: 99px; transition: width .6s ease; }
.nr-bar-num { font-size: 12px; color: var(--nr-muted); min-width: 20px; }

.nr-open-form-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--nr-accent); color: #fff;
    border: none; border-radius: 50px;
    padding: 13px 22px; font-size: 14px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    box-shadow: 0 4px 20px var(--nr-accent-mid);
    transition: transform .15s, box-shadow .15s;
}
.nr-open-form-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--nr-accent-mid); }

/* Formulaire */
.nr-form-wrap {
    background: var(--nr-white);
    border: 1px solid var(--nr-g200);
    border-radius: var(--nr-radius);
    box-shadow: var(--nr-shadow);
    padding: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    animation: nr-slide-down .25s ease;
}
@keyframes nr-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nr-form-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: var(--nr-muted);
    padding: 4px; border-radius: 50%;
    transition: background .15s;
}
.nr-form-close:hover { background: var(--nr-g100); }
.nr-form-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 1.5rem; }

.nr-field { margin-bottom: 1.1rem; }
.nr-field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--nr-text); }
.nr-req { color: var(--nr-accent); }
.nr-opt { color: #999; font-weight: 400; font-size: .8em; }

.nr-field input[type="text"],
.nr-field input[type="tel"],
.nr-field textarea {
    width: 100%; border: 1.5px solid var(--nr-g200);
    border-radius: var(--nr-radius-sm);
    padding: 10px 13px; font-size: 14px; font-family: inherit;
    color: var(--nr-text); background: var(--nr-white);
    outline: none; transition: border-color .15s;
    box-sizing: border-box;
}
.nr-field input:focus, .nr-field textarea:focus {
    border-color: var(--nr-accent);
    box-shadow: 0 0 0 3px var(--nr-accent-light);
}
.nr-field textarea { resize: vertical; min-height: 100px; }

.nr-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .nr-fields-row { grid-template-columns: 1fr; } }

/* Étoiles interactives — gauche(1) → droite(5) */
.nr-star-row { display: flex; gap: 4px; }
.nr-star-btn {
    background: none; border: none; padding: 2px;
    cursor: pointer; line-height: 1;
    transition: transform .12s;
}
.nr-star-btn svg {
    display: block; width: 32px; height: 32px;
    fill: var(--nr-g200);
    transition: fill .12s;
}
.nr-star-btn.nr-star-on svg { fill: var(--nr-accent); }
.nr-star-btn:hover { transform: scale(1.12); }

/* Téléphone */
.nr-phone-hint { display: block; font-size: .75rem; margin-top: 3px; min-height: 1em; }
.nr-hint-ok  { color: #22c55e; }
.nr-hint-err { color: #ef4444; }

/* Zone upload */
.nr-upload-zone {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    border: 2px dashed var(--nr-g200); border-radius: var(--nr-radius-sm);
    padding: 1.5rem 1rem; text-align: center;
    color: var(--nr-muted); font-size: 13px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.nr-upload-zone:hover, .nr-zone-over {
    border-color: var(--nr-accent);
    background: var(--nr-accent-light);
}
.nr-upload-zone small { font-size: 11px; opacity: .7; }
.nr-zone-full { opacity: .5; pointer-events: none; }

.nr-photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.nr-prev-item {
    position: relative; width: 72px; height: 72px;
    border-radius: var(--nr-radius-sm); overflow: hidden;
    border: 1px solid var(--nr-g200);
}
.nr-prev-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nr-prev-del {
    position: absolute; top: 3px; right: 3px;
    background: rgba(0,0,0,.55); color: #fff;
    border: none; border-radius: 50%;
    width: 18px; height: 18px; font-size: 11px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.nr-form-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem;
}
.nr-privacy { font-size: 12px; color: var(--nr-muted); margin: 0; }

.nr-submit-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--nr-accent); color: #fff;
    border: none; border-radius: 50px;
    padding: 13px 28px; font-size: 15px; font-weight: 700;
    cursor: pointer; box-shadow: 0 4px 20px var(--nr-accent-mid);
    transition: transform .15s, box-shadow .15s;
    white-space: nowrap;
}
.nr-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--nr-accent-mid); }
.nr-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.nr-message {
    margin-top: 1rem; padding: 12px 16px;
    border-radius: var(--nr-radius-sm); font-size: 14px; font-weight: 500;
}
.nr-message.nr-ok  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.nr-message.nr-err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* Grille */
.nr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.nr-card {
    background: var(--nr-white); border: 1px solid var(--nr-g200);
    border-radius: var(--nr-radius); padding: 18px;
    display: flex; flex-direction: column; gap: 10px;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.nr-card:hover { box-shadow: var(--nr-shadow); transform: translateY(-2px); border-color: var(--nr-accent-mid); }
.nr-card-header { display: flex; align-items: center; gap: 10px; }

.nr-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--nr-accent-light); color: var(--nr-accent);
    font-size: 15px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border: 1.5px solid var(--nr-accent-mid);
}
.nr-card-meta { display: flex; flex-direction: column; gap: 2px; }
.nr-author { font-size: 14px; font-weight: 600; }
.nr-verified { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #2563eb; }
.nr-stars { display: flex; gap: 2px; }
.nr-stars-wrap { display: flex; }

.nr-text { font-size: 14px; color: #444; line-height: 1.65; margin: 0; flex: 1; }

.nr-photos { display: flex; gap: 7px; flex-wrap: wrap; }
.nr-photo-thumb {
    width: 72px; height: 72px; border-radius: 9px; overflow: hidden;
    border: 1px solid var(--nr-g200); cursor: pointer;
    padding: 0; background: none;
    transition: transform .15s, box-shadow .15s; flex-shrink: 0;
}
.nr-photo-thumb:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.nr-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nr-date { font-size: 12px; color: var(--nr-muted); }

/* Load more */
.nr-load-more-wrap { text-align: center; margin-top: 2rem; }
.nr-load-more-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--nr-white); color: var(--nr-text);
    border: 1.5px solid var(--nr-g200); border-radius: 50px;
    padding: 11px 24px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.nr-load-more-btn:hover {
    border-color: var(--nr-accent); color: var(--nr-accent);
    box-shadow: 0 2px 12px var(--nr-accent-light);
    transform: translateY(-1px);
}

/* Lightbox */
.nr-lightbox-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.85); z-index: 99998;
    backdrop-filter: blur(4px);
}
.nr-lightbox {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.nr-lightbox:not([hidden]) { pointer-events: all; }
.nr-lightbox-img-wrap { max-width: 90vw; max-height: 85vh; display: flex; align-items: center; justify-content: center; }
.nr-lightbox-img-wrap img {
    max-width: 90vw; max-height: 85vh;
    border-radius: var(--nr-radius);
    box-shadow: var(--nr-shadow-lg);
    object-fit: contain;
    animation: nr-pop .2s ease;
}
@keyframes nr-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

.nr-lightbox-close {
    position: fixed; top: 20px; right: 20px;
    background: rgba(255,255,255,.15); color: #fff;
    border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
    width: 40px; height: 40px; font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.nr-lightbox-close:hover { background: rgba(255,255,255,.3); }

.nr-lightbox-prev, .nr-lightbox-next {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.15); color: #fff;
    border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
    width: 48px; height: 48px; font-size: 28px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.nr-lightbox-prev { left: 16px; }
.nr-lightbox-next { right: 16px; }
.nr-lightbox-prev:hover, .nr-lightbox-next:hover { background: rgba(255,255,255,.3); }
.nr-lightbox-prev:disabled, .nr-lightbox-next:disabled { opacity: .3; cursor: default; }

.nr-card-appear { animation: nr-fade .3s ease forwards; opacity: 0; }
@keyframes nr-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nr-slide-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
