/* Signalements citoyens (signalements.html) : règles, formulaire, vérification humaine maison, liste publiée. */
/* Header: the site's quote, as on the home page. The rules: a plain numbered list, two columns, no cards. */
.sg-quote { margin-top: 1.2rem; max-width: 720px; }
.sg-quote blockquote { font-size: 1.02rem; }
.sg-jump { margin: .9rem 0 0; padding: 0; }
.sg-hero { padding-bottom: 0; }
.sg-loupe, .sg-field { scroll-margin-top: 96px; }
.sg-rules { list-style: none; margin: 0; padding: 0; counter-reset: sg-rule; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.6rem; }
.sg-rules li { counter-increment: sg-rule; position: relative; padding: 1.1rem 0 1.1rem 3.2rem; border-top: 1px solid var(--c-line); }
.sg-rules li::before { content: counter(sg-rule, decimal-leading-zero); position: absolute; left: 0; top: 1rem; font: 800 1.55rem/1 var(--font-display);
  background: linear-gradient(135deg, var(--c-teal-600), var(--c-blue-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sg-rules h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.sg-rules p { font-size: .93rem; line-height: 1.6; }
.sg-rules a { color: var(--c-teal-600); text-decoration: underline; }
@media (max-width: 820px) { .sg-rules { grid-template-columns: minmax(0, 1fr); } .sg-rules li { padding-left: 2.8rem; } }

.sg-loupe { display: grid; gap: .6rem; margin-bottom: 1.4rem; padding: 1.1rem 1.2rem; border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--c-teal-600) 35%, var(--c-line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-teal-600) 8%, var(--c-bg)), var(--c-bg)); }
.sg-loupe label { display: grid; gap: .2rem; }
.sg-loupe label span { color: var(--c-muted); font-size: .85rem; }
.sg-loupe__row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.sg-loupe__state { font-size: .88rem; color: var(--c-muted); }
.sg-loupe__state.is-error { color: #e11d48; }

.sg-form textarea, .sg-form input, .sg-loupe textarea { width: 100%; min-width: 0; padding: .7rem .85rem; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-bg); color: var(--c-ink); font: inherit; font-size: .95rem; line-height: 1.5; resize: vertical; }
.sg-form textarea:focus, .sg-form input:focus, .sg-loupe textarea:focus { outline: 2px solid color-mix(in srgb, var(--c-teal-600) 55%, transparent); border-color: transparent; }
.sg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.1rem; }
.sg-field { display: grid; gap: .3rem; position: relative; }
.sg-field > span { font-weight: 600; color: var(--c-ink); font-size: .9rem; }
.sg-field em { font-style: normal; font-weight: 400; color: var(--c-muted); font-size: .82rem; margin-left: .3rem; }
.sg-field--wide { grid-column: 1 / -1; }
.sg-field.is-filled textarea, .sg-field.is-filled input { animation: sg-fill 1.2s var(--ease); }
@keyframes sg-fill { from { background: color-mix(in srgb, var(--c-teal-600) 18%, var(--c-bg)); } }
.sg-count { justify-self: end; color: var(--c-muted); font-size: .78rem; }
.sg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sg-human { margin: 1.4rem 0 1rem; }
.sg-human__head { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; margin-bottom: .5rem; }
.sg-human__head span { color: var(--c-muted); font-size: .88rem; }
.sg-human__head span.is-ok { color: #059669; font-weight: 600; }
.sg-human__pad { position: relative; border: 2px dashed var(--c-line); border-radius: var(--r-md); background: var(--c-bg); touch-action: none; cursor: crosshair; overflow: hidden; }
.sg-human__pad.is-ok { border-style: solid; border-color: #059669; }
.sg-human__pad canvas { display: block; width: 100%; height: 160px; }
.sg-human__ring { position: absolute; right: 12px; top: 12px; width: 56px; height: 56px; display: grid; place-items: center; pointer-events: none; }
.sg-human__ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.sg-human__ring span { font: 700 .75rem var(--font-display); color: var(--c-ink); }
.sg-ring__bg { fill: none; stroke: var(--c-line); stroke-width: 3; }
.sg-ring__fg { fill: none; stroke: url(#frlNavGrad); stroke: var(--c-teal-600); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 97.4; transition: stroke-dashoffset .2s var(--ease); }
.sg-human__pad.is-ok .sg-ring__fg { stroke: #059669; }

.sg-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; line-height: 1.5; margin: .8rem 0; cursor: pointer; }
.sg-check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--c-teal-600); }
.sg-submit { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.sg-submit .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.sg-result { font-size: .92rem; }
.sg-result.is-ok { color: #059669; font-weight: 600; }
.sg-result.is-error { color: #e11d48; }

.sg-list { display: grid; gap: 1rem; }
.sg-item { padding: 1.1rem 1.2rem; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-bg); }
.sg-item header { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; color: var(--c-muted); font-size: .8rem; margin-bottom: .3rem; }
.sg-item h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.sg-item p { white-space: pre-line; font-size: .93rem; line-height: 1.55; }
.sg-item ul { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .86rem; }
.sg-item a { color: var(--c-teal-600); word-break: break-all; }
.sg-tag { padding: .1rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--c-amber) 18%, transparent); color: var(--c-ink); font-weight: 600; }
.sg-tag--read { background: color-mix(in srgb, #059669 16%, transparent); color: #047857; }
.sg-item footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--c-line); color: var(--c-muted); font-size: .8rem; }
.sg-abuse { border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-muted); border-radius: 999px; padding: .2rem .7rem; font-size: .78rem; cursor: pointer; }
.sg-abuse:hover:not([disabled]) { color: #e11d48; border-color: #e11d48; }
.sg-item:target { outline: 2px solid var(--c-teal-600); outline-offset: 2px; }
.sg-check--soft { color: var(--c-body); }
.sg-list-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.sg-reply { margin-top: .7rem; padding: .7rem .9rem; border-left: 3px solid var(--c-teal-600); background: var(--c-surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

@media (max-width: 720px) {
  .sg-grid { grid-template-columns: minmax(0, 1fr); }
  .sg-human__pad canvas { height: 190px; }
}

/* The Loupe at work: its logo, the step it is on, the tools it used; the form locked (but the e-mail) while it writes. */
.sg-loupe { grid-template-columns: minmax(0, 1fr); }
#sgDraft { white-space: normal; text-align: center; max-width: 100%; }
.sg-loupe__head label { min-width: 0; }
.sg-loupe__head { display: flex; gap: .8rem; align-items: center; }
.sg-logo { width: 42px; height: 42px; flex: none; overflow: visible; }
.sg-logo .l-bubble, .sg-logo .l-lens circle, .sg-logo .l-lens path { stroke: url(#sgLoupeGrad); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; fill: none; }
.sg-logo .l-lens path { stroke-width: 3.4; }
.sg-logo .l-spark { fill: #e11d48; }
.sg-logo .l-lens, .sg-logo .l-spark { transform-box: fill-box; transform-origin: center; }
.sg-loupe.is-working .sg-logo .l-lens { animation: sg-scan 1.6s ease-in-out infinite; }
.sg-loupe.is-working .sg-logo .l-spark { animation: sg-throb 1.1s ease-in-out infinite; }
.sg-loupe.is-writing .sg-logo .l-spark { animation: sg-spin 1.2s linear infinite; }
@keyframes sg-scan { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(2.2px, -1.6px); } 50% { transform: translate(.4px, 2.2px); } 75% { transform: translate(-2.2px, -.6px); } }
@keyframes sg-throb { 0%, 100% { transform: scale(.7); opacity: .65; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes sg-spin { to { transform: rotate(360deg); } }
.sg-examples { display: flex; flex-wrap: wrap; gap: .45rem; }
.sg-examples button { border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-body); border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .82rem; font-style: italic; cursor: pointer; text-align: left; transition: border-color .2s, color .2s; }
.sg-examples button:hover:not([disabled]) { border-color: var(--c-teal-600); color: var(--c-ink); }
.sg-loupe.is-working { border-color: var(--c-teal-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-teal-600) 14%, transparent); }
.sg-loupe.is-working textarea, .sg-loupe.is-working .sg-examples button, .sg-loupe.is-working #sgDraft { opacity: .55; pointer-events: none; }
.sg-live { display: grid; gap: .5rem; padding-top: .7rem; border-top: 1px dashed color-mix(in srgb, var(--c-teal-600) 40%, var(--c-line)); }
.sg-live[hidden] { display: none; }
.sg-live__now { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--c-ink); font-weight: 600; min-width: 0; }
.sg-live__now > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sg-live__stop { border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-muted); border-radius: 999px; padding: .15rem .7rem; font-size: .78rem; cursor: pointer; }
.sg-live__stop:hover { color: #e11d48; border-color: #e11d48; }
.sg-dots { display: inline-flex; gap: 4px; flex: none; }
.sg-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-teal-600); animation: sg-bounce 1.1s ease-in-out infinite; }
.sg-dots i:nth-child(2) { animation-delay: .15s; background: var(--c-blue-600); }
.sg-dots i:nth-child(3) { animation-delay: .3s; background: #e11d48; }
@keyframes sg-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }
.sg-live.is-done .sg-dots, .sg-live.is-done .sg-live__stop { display: none; }
.sg-live__steps { list-style: none; margin: 0; padding: 0 0 0 .2rem; display: grid; gap: .3rem; border-left: 2px solid var(--c-line); font-size: .82rem; color: var(--c-muted); }
.sg-live__steps li { position: relative; padding-left: 1.3rem; animation: sg-step-in .35s var(--ease) both; overflow-wrap: anywhere; }
.sg-live__steps li::before { content: ""; position: absolute; left: .25rem; top: .3em; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--c-teal-600); border-right-color: transparent; animation: sg-spin .8s linear infinite; }
.sg-live__steps li.is-done::before { animation: none; border-color: #059669; background: #059669; }
.sg-live__steps li.is-fail::before { animation: none; border-color: #e11d48; }
.sg-live__steps li.is-fill { color: var(--c-ink); font-weight: 600; }
.sg-live__steps small { margin-left: .4rem; color: var(--c-muted); font-weight: 400; }
@keyframes sg-step-in { from { opacity: 0; transform: translateX(-6px); } }
.sg-form.is-locked .sg-field:not(.sg-field--free) { opacity: .72; }
.sg-form.is-locked .sg-field:not(.sg-field--free) input, .sg-form.is-locked .sg-field:not(.sg-field--free) textarea {
  cursor: progress; background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--c-teal-600) 10%, transparent) 50%, transparent 70%);
  background-size: 220% 100%; animation: sg-shimmer 1.6s linear infinite; }
.sg-form.is-locked .sg-field.is-typing { opacity: 1; }
.sg-form.is-locked .sg-field.is-typing input, .sg-form.is-locked .sg-field.is-typing textarea { animation: none; background-image: none; outline: 2px solid var(--c-teal-600); outline-offset: 1px; }
.sg-field.is-typing > span::after { content: "La Loupe écrit…"; margin-left: .5rem; color: var(--c-teal-600); font-weight: 600; font-size: .78rem; }
@keyframes sg-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .sg-form.is-locked input, .sg-form.is-locked textarea, .sg-dots i, .sg-logo * { animation: none !important; } }
/* Wide screens, while the Loupe's panel is open on the right: the form steps aside so both stay in view. */
@media (min-width: 1000px) {
  #signaler .container { transition: padding-right .45s var(--ease); }
  body.sg-side #signaler .container { padding-right: max(var(--gutter), calc(480px - max(0px, (100vw - var(--maxw)) / 2))); }
}
@media (max-width: 620px) { .sg-logo { width: 34px; height: 34px; } .sg-loupe__head { align-items: flex-start; } }
