/*! Calculi-TN — public/orientation/report.css
 *  Copyright (c) Calculi-TN. All rights reserved.
 *
 *  "Signaler une erreur" — the correction channel at the foot of the programme
 *  and branche pages. Rendered by views/partials/orientationReport.ejs.
 *
 *  DESIGN INTENT: a hairline strip, not a card.
 *
 *  Every other block on these pages is a panel with a border and a shadow,
 *  because every other block is content. This one is plumbing — a way to tell
 *  us a number is wrong — and drawing it like content would give a maintenance
 *  affordance the same visual weight as the cut-off score the visitor came for.
 *  It reads as a footer rule until it is opened, and only then becomes a
 *  surface.
 *
 *  Uses the guide's own tokens from orientation.css (--og-*), so it inherits
 *  every future palette change for free. It deliberately introduces NO new
 *  accent: cyan is chrome here, amber is a cut-off, green/red are a verdict and
 *  --og-human belongs to témoignages. A report is none of those, so it stays in
 *  neutral greys and borrows --og-accent only for focus rings.
 */

.og-report {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 0 16px;
}

.og-report-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 13px 4px;
  background: none;
  
  border: 0;
  border-top: 1px solid var(--og-line);
  color: var(--og-text-faint);
  font-size: 0.85rem;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
  transition: color 0.18s ease;
}

.og-report-trigger:hover {
  color: var(--og-text-soft);
}

.og-report-trigger:focus-visible {
  outline: 2px solid var(--og-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.og-report-chev {
  margin-inline-start: auto;
  font-size: 0.75rem;
  transition: transform 0.22s ease;
}

.og-report-trigger[aria-expanded="true"] {
  color: var(--og-text);
}

.og-report-trigger[aria-expanded="true"] .og-report-chev {
  transform: rotate(180deg);
}

.og-report-panel {
  background: var(--og-glass);
  border: 1px solid var(--og-line);
  border-radius: var(--og-radius);
  padding: 20px 18px;
  margin-bottom: 8px;
}

.og-report-panel[hidden] {
  display: none;
}

.og-report-intro {
  color: var(--og-text-soft);
  font-size: 0.86rem;
  line-height: 1.62;
  margin: 0 0 18px;
}

.og-report-intro strong {
  color: var(--og-text);
  font-weight: 600;
}

.og-report-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.og-report-fields {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  min-width: 0; 
}

.og-report-fields legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--og-text-soft);
  margin-bottom: 10px;
  padding: 0;
  float: none;
  width: auto;
}

.og-report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.og-report-chip {
  margin: 0;
  cursor: pointer;
}

.og-report-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.og-report-chip span {
  display: inline-block;
  padding: 7px 13px;
  background: var(--og-glass-sunk);
  border: 1px solid var(--og-line);
  border-radius: 999px;
  color: var(--og-text-soft);
  font-size: 0.8rem;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease;
}

.og-report-chip:hover span {
  border-color: var(--og-line-hi);
  color: var(--og-text);
}

.og-report-chip input:checked + span {
  background: var(--og-glass-hi);
  border-color: var(--og-accent);
  color: var(--og-text);
}

.og-report-chip input:focus-visible + span {
  outline: 2px solid var(--og-accent);
  outline-offset: 2px;
}

.og-report-row {
  margin-bottom: 16px;
}

.og-report-row label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--og-text-soft);
  margin-bottom: 7px;
}

.og-report-req,
.og-report-opt {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}

.og-report-req {
  color: var(--og-warn);
  background: rgba(255, 207, 122, 0.12);
}

.og-report-opt {
  color: var(--og-text-faint);
  background: var(--og-glass-sunk);
}

.og-report textarea,
.og-report input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--og-glass-sunk);
  border: 1px solid var(--og-line);
  border-radius: 10px;
  color: var(--og-text);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.55;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.og-report textarea {
  resize: vertical;
  min-height: 92px;
}

.og-report textarea::placeholder,
.og-report input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.og-report textarea:focus,
.og-report input[type="email"]:focus {
  outline: none;
  border-color: var(--og-accent);
  background: var(--og-glass);
  box-shadow: 0 0 0 3px rgba(79, 195, 232, 0.16);
}

.og-report input:-webkit-autofill,
.og-report input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--og-text);
  -webkit-box-shadow: 0 0 0 1000px #0d3346 inset;
  caret-color: #fff;
}

.og-report-row small {
  display: block;
  margin-top: 6px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--og-text-faint);
}

.og-report .is-invalid {
  border-color: var(--og-no);
}

.og-report-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.og-report-send,
.og-report-cancel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.og-report-send {
  background: var(--og-accent);
  border: 1px solid var(--og-accent);
  color: var(--og-accent-ink);
}

.og-report-send:hover:not(:disabled) {
  background: #6fd0f0;
  border-color: #6fd0f0;
}

.og-report-send:disabled {
  opacity: 0.55;
  cursor: progress;
}

.og-report-cancel {
  background: none;
  border: 1px solid var(--og-line);
  color: var(--og-text-soft);
}

.og-report-cancel:hover {
  border-color: var(--og-line-hi);
  color: var(--og-text);
}

.og-report-send:focus-visible,
.og-report-cancel:focus-visible {
  outline: 2px solid var(--og-accent);
  outline-offset: 2px;
}

.og-report-feedback {
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.og-report-feedback[hidden] {
  display: none;
}

.og-report-feedback.is-ok {
  background: rgba(110, 231, 165, 0.12);
  border: 1px solid rgba(110, 231, 165, 0.36);
  color: var(--og-ok);
}

.og-report-feedback.is-error {
  background: rgba(255, 156, 156, 0.12);
  border: 1px solid rgba(255, 156, 156, 0.36);
  color: var(--og-no);
}

.og-report-done {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 0;
}

.og-report-done i {
  flex: none;
  font-size: 1.35rem;
  color: var(--og-ok);
  line-height: 1.3;
}

.og-report-done h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--og-text);
  margin: 0 0 5px;
}

.og-report-done p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--og-text-soft);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .og-report-trigger,
  .og-report-chev,
  .og-report-chip span,
  .og-report-send,
  .og-report-cancel,
  .og-report textarea,
  .og-report input[type="email"] {
    transition: none;
  }
}
