/* ---------------------------------------------------------------- PCS demo theme
   Identité PCS : dégradé corail -> orange, texte anthracite, accent vert,
   boutons pilule, coins très arrondis. Thème clair uniquement.
   -------------------------------------------------------------------------- */

:root {
  --pcs-red: #ee4e60;
  --pcs-red-dark: #de3d51;
  --pcs-orange: #f26f3e;
  --pcs-gradient: linear-gradient(105deg, #ef4e5e 0%, #f4713c 100%);
  --navy: #2e2b41;
  --navy-soft: #6b687d;
  --green: #35cd8c;
  --green-dark: #1fa96e;
  --amber: #f5a623;
  --page: #f7f8fa;
  --line: #e8e9ee;
  --shadow-sm: 0 2px 10px rgba(46, 43, 65, .06);
  --shadow-md: 0 10px 30px rgba(46, 43, 65, .10);
  --radius: 22px;
  --font: "Poppins", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--navy);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color-scheme: light;
}

.hidden { display: none !important; }

/* ------------------------------------------------------------------ wordmark */

.wordmark {
  font-weight: 800;
  font-size: 30px;
  letter-spacing: .16em;
  color: var(--pcs-red);
  background: var(--pcs-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wordmark.on-gradient {
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
}

/* ------------------------------------------------------------------- boutons */

.btn-primary,
.btn-ghost {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease,
              opacity .18s ease;
}

.btn-primary {
  border: 0;
  padding: 15px 38px;
  color: #fff;
  background: var(--pcs-red);
  box-shadow: 0 8px 22px rgba(238, 78, 96, .32);
}
.btn-primary:hover:not(:disabled) { background: var(--pcs-red-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  padding: 9px 22px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1.5px solid rgba(255, 255, 255, .75);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .28); }
.btn-ghost.dark {
  color: var(--navy);
  background: #fff;
  border-color: var(--line);
  padding: 14px 30px;
}
.btn-ghost.dark:hover { background: #fff; border-color: var(--pcs-red); color: var(--pcs-red); }

.link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--pcs-red);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* --------------------------------------------------------------------- login */

.login-body { background: var(--pcs-gradient); }

.login-split { display: flex; min-height: 100vh; }

.login-left {
  position: relative;
  z-index: 2;
  flex: 0 0 54%;
  background: #fff;
  padding: 46px 8% 46px 7%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-left::after {                     /* bord droit arrondi, comme le site PCS */
  content: "";
  position: absolute;
  top: 0;
  right: -84px;
  width: 170px;
  height: 100%;
  background: #fff;
  border-radius: 0 100% 100% 0 / 0 50% 50% 0;
}

.login-title {
  margin: 26px 0 10px;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.5px;
}
.login-title em {
  font-style: normal;
  background: var(--pcs-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-sub { max-width: 30rem; color: #6b687d; margin: 0 0 30px; }

.login-form { max-width: 24rem; }
.login-form label { display: block; margin-bottom: 16px; }
.login-form label span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a879b;
  margin-bottom: 6px;
}
.login-form input {
  width: 100%;
  padding: 14px 18px;
  font: inherit;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-form input:focus {
  border-color: var(--pcs-red);
  box-shadow: 0 0 0 4px rgba(238, 78, 96, .12);
}
.login-form .btn-primary { width: 100%; margin-top: 8px; }

.alert-inline {
  margin: 0 0 12px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #b3253c;
  background: #fdeaee;
  border: 1px solid #f7c9d2;
}

.login-right {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.blob-cards { position: relative; width: 320px; height: 380px; }
.fake-card {
  position: absolute;
  width: 260px;
  height: 164px;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(90, 20, 30, .28);
  transform: rotate(-16deg);
}
.fake-card.c1 { top: 20px;  left: 18px; background: linear-gradient(150deg, #3a3a44, #16161c); }
.fake-card.c2 { top: 96px;  left: 6px;  background: linear-gradient(150deg, #f0f0f2, #c9cbd2); }
.fake-card.c3 { top: 172px; left: -6px; background: linear-gradient(150deg, #e3c98f, #b9954f); }

/* -------------------------------------------------------------------- topbar */

.topbar { position: relative; background: var(--pcs-gradient); padding: 22px 0 0; }
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.topbar-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wave { display: block; width: 100%; height: 70px; margin-bottom: -1px; }

/* ------------------------------------------------------------------ contenu */

.wrap { max-width: 1120px; margin: 0 auto; padding: 8px 24px 60px; }

.page-title {
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 800;
  letter-spacing: -.4px;
  margin: 6px 0 8px;
}
.page-sub { color: #6b687d; max-width: 52rem; margin: 0 0 28px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

/* ------------------------------------------------------------------ dropzone */

.dropzone {
  background: #fff;
  border: 2.5px dashed #f0b9bf;
  border-radius: var(--radius);
  padding: 46px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--pcs-red); background: #fffafb; }
.dropzone.dragover {
  border-color: var(--pcs-red);
  background: #fff2f4;
  transform: scale(1.006);
}
.dropzone.has-file { border-style: solid; border-color: var(--green); background: #f4fdf8; }
.dz-icon { color: var(--pcs-red); line-height: 0; margin-bottom: 10px; }
.dz-title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.dz-hint { color: #8a879b; font-size: 14px; margin: 0; }
.dz-meta { margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--green-dark); }

.actions { display: flex; gap: 14px; align-items: center; margin: 22px 0 26px; flex-wrap: wrap; }

/* -------------------------------------------------------------------- loader */

.loader { display: flex; gap: 22px; align-items: center; padding: 26px 28px; }
.spinner {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid #f7dfe3;
  border-top-color: var(--pcs-red);
  border-right-color: var(--pcs-orange);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-title { font-weight: 700; margin: 0 0 8px; }
.elapsed { color: #8a879b; font-weight: 600; margin-left: 8px; font-size: 14px; }
.steps { list-style: none; margin: 0; padding: 0; font-size: 14px; color: #9b98aa; }
.steps li { padding-left: 26px; position: relative; line-height: 1.9; }
.steps li::before {
  content: "○";
  position: absolute;
  left: 4px;
  color: #cfccdb;
}
.steps li.active { color: var(--navy); font-weight: 600; }
.steps li.active::before { content: "◍"; color: var(--pcs-red); }
.steps li.done { color: var(--green-dark); }
.steps li.done::before { content: "✓"; color: var(--green); font-weight: 700; }

/* ------------------------------------------------------------------- verdict */

.verdict {
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 18px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  box-shadow: var(--shadow-md);
  border: 1.5px solid transparent;
}
.verdict .badge {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}
.verdict h2 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.verdict p { margin: 0; font-size: 15px; }

.verdict.alert { background: #fff3f5; border-color: #f6ccd4; }
.verdict.alert .badge { background: var(--pcs-red); }
.verdict.alert h2 { color: #c22745; }
.verdict.alert p { color: #92374a; }

.verdict.ok { background: #f1fbf6; border-color: #c5eddb; }
.verdict.ok .badge { background: var(--green); }
.verdict.ok h2 { color: var(--green-dark); }
.verdict.ok p { color: #3d7a60; }

.verdict.unknown { background: #fffaf0; border-color: #f5e2bd; }
.verdict.unknown .badge { background: var(--amber); }
.verdict.unknown h2 { color: #9a6a09; }
.verdict.unknown p { color: #866017; }

/* --------------------------------------------------------------------- stats */

.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}
.stat b { display: block; font-size: 17px; font-weight: 800; }
.stat span { color: #8a879b; }

/* ----------------------------------------------------------------- accordéon */

.accordion { padding: 0; overflow: hidden; }
.accordion summary {
  cursor: pointer;
  padding: 18px 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2.5px solid var(--pcs-red);
  border-bottom: 2.5px solid var(--pcs-red);
  transform: rotate(-45deg);
  transition: transform .18s ease;
}
.accordion[open] summary::before { transform: rotate(45deg); }
.accordion summary:hover { background: #fffafb; }
.sum-meta { margin-left: auto; font-size: 13px; font-weight: 600; color: #8a879b; }

.frames-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  padding: 4px 24px 24px;
}
.frame { text-align: center; }
.frame img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  display: block;
  background: #f2f2f5;
}
.frame figcaption { font-size: 12px; color: #8a879b; margin-top: 5px; font-weight: 600; }

/* ------------------------------------------------------- vote majoritaire */

.verdict-vote { margin-top: 8px !important; font-size: 14px; opacity: .9; }

.consensus { padding: 18px 24px; }
.consensus-head {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a879b;
  margin-bottom: 12px;
}
.warn { color: #b07407; }
.consensus-head .warn, .sub-label .warn { text-transform: none; letter-spacing: 0; }
.consensus-foot { margin-top: 12px; font-size: 14px; color: #6b687d; }
.vote-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .03em;
  border: 1.5px solid transparent;
}
.vote-chip i {
  font-style: normal;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
}
.vote-chip.yes { background: #fff3f5; border-color: #f6ccd4; color: #c22745; }
.vote-chip.yes i { background: var(--pcs-red); }
.vote-chip.no { background: #f1fbf6; border-color: #c5eddb; color: var(--green-dark); }
.vote-chip.no i { background: var(--green); }
.vote-chip.none, .vote-chip.err { background: #fffaf0; border-color: #f5e2bd; color: #9a6a09; }
.vote-chip.none i, .vote-chip.err i { background: var(--amber); }

.calls { padding: 0 16px 16px; }
.call {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  background: #fcfcfd;
  overflow: hidden;
}
.call[open] { background: #fff; }
.call > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.call > summary::-webkit-details-marker { display: none; }
.call > summary:hover { background: #fffafb; }
.call-title { font-weight: 700; font-size: 14px; }
.tag-retained {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--pcs-red);
  background: #fff3f5;
  border: 1px solid #f6ccd4;
  padding: 3px 10px;
  border-radius: 999px;
}
.call .mono { padding: 4px 18px 18px; max-height: 340px; }

.sub-label {
  padding: 0 26px 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8a879b;
}
.call .sub-label { padding: 0 18px 6px; }

.mono {
  margin: 0;
  padding: 4px 26px 26px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: #43405a;
  max-height: 460px;
  overflow: auto;
}

/* ------------------------------------------------------------------- divers */

.error {
  padding: 20px 24px;
  color: #b3253c;
  background: #fdeaee;
  border-color: #f7c9d2;
  font-weight: 600;
}

.video-preview { padding: 20px 24px; }
.video-preview h3 { margin: 0 0 12px; font-size: 15px; color: #8a879b; font-weight: 700; }
.video-preview video { max-width: 320px; width: 100%; border-radius: 14px; display: block; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(46, 43, 65, .82);
  display: grid;
  place-items: center;
  padding: 30px;
  z-index: 50;
  cursor: zoom-out;
}
.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.footer {
  text-align: center;
  color: #9b98aa;
  font-size: 13px;
  padding: 0 24px 40px;
}

@media (max-width: 860px) {
  .login-split { flex-direction: column; }
  .login-left { flex: none; padding: 40px 26px; }
  .login-left::after { display: none; }
  .login-right { min-height: 220px; }
  .topbar-nav { gap: 8px; }
}
