/* ============================================================
   POLITUBE — Avis de la communauté (fiche + page classement)
   ============================================================ */
.cm-fiche, .cm-page { font-family: "Space Grotesk", system-ui, sans-serif; color: var(--cm-text); }

/* ---- Bloc fiche (dans entity.html) ---- */
.cm-fiche {
  margin: 2.4rem 0; padding: 1.7rem 1.8rem 1.9rem; border-radius: 18px;
  background: linear-gradient(180deg, rgba(55,196,214,.045), transparent 40%), var(--cm-panel);
  border: 1px solid var(--cm-line);
}
.cm-head { display: flex; align-items: baseline; gap: .8rem; }
.cm-head h2 { font-family: "Playfair Display", Georgia, serif; font-size: 1.5rem; margin: 0; }
.cm-count { font-size: .8rem; color: var(--cm-faint); font-weight: 600; }
.cm-disclaimer { color: var(--cm-muted); font-size: .82rem; margin: .45rem 0 1.3rem; max-width: 60ch; line-height: 1.5; }

.cm-grid { display: grid; grid-template-columns: 210px 1fr; gap: 1.8rem; align-items: start; }
.cm-summary { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-top: .3rem; }

/* jauge circulaire */
.cm-gauge { --v: 0%; --col: var(--cm-cyan); position: relative; width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(var(--col) var(--v), rgba(255,255,255,.06) 0); display: grid; place-items: center; }
.cm-gauge::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--cm-panel-2); }
.cm-gauge-num { position: relative; font-size: 2.5rem; font-weight: 700; line-height: 1; }
.cm-gauge-num small { font-size: .9rem; color: var(--cm-muted); font-weight: 500; }
.cm-reco { text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--cm-cyan); }
.cm-reco span { display: block; font-size: .68rem; color: var(--cm-muted); font-weight: 500; margin-top: .2rem; line-height: 1.3; }

.cm-axis { margin-bottom: .85rem; }
.cm-axis-head { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: .35rem; }
.cm-axis-head span { color: var(--cm-muted); }
.cm-axis-head b { font-variant-numeric: tabular-nums; }
.cm-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.cm-bar span { display: block; height: 100%; border-radius: 6px; transition: width .6s cubic-bezier(.2,.7,.2,1); }

.cm-hist-wrap { margin-top: 1.3rem; }
.cm-hist-title { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cm-faint); }
.cm-hist { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin-top: .5rem; }
.cm-hist-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.cm-hist-col i { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--cm-cyan), rgba(55,196,214,.35)); transition: height .5s; }
.cm-hist-col em { font-size: .58rem; color: var(--cm-faint); font-style: normal; }
.cm-empty { color: var(--cm-muted); font-size: .9rem; padding: 1rem 0; }

/* ---- Formulaire de vote ---- */
.cm-vote { margin-top: 1.7rem; padding-top: 1.4rem; border-top: 1px solid var(--cm-line); }
.cm-vote-locked p { color: var(--cm-muted); font-size: .88rem; margin: 0 0 .9rem; }
.cm-vote-unavailable { border: 1px dashed rgba(255,255,255,.18); border-radius: 12px; padding: 1rem 1.1rem; background: rgba(255,255,255,.025); }
.cm-auth-status { display: inline-flex; padding: .32rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--cm-faint); background: rgba(255,255,255,.06); }
.cm-google { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.15rem; border-radius: 11px;
  background: #fff; color: #1f2937; font-weight: 600; font-size: .86rem; border: none; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.cm-google:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.cm-vote-head { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; font-weight: 600; margin-bottom: 1rem; }
.cm-vote-head em { color: var(--cm-muted); font-style: normal; font-weight: 400; }
.cm-mine-tag { font-size: .72rem; color: var(--cm-cyan); background: rgba(55,196,214,.12); padding: .2rem .6rem; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(55,196,214,.3); }
.cm-slider { display: block; margin-bottom: 1rem; }
.cm-slider-label { display: flex; justify-content: space-between; font-size: .84rem; color: var(--cm-muted); margin-bottom: .4rem; }
.cm-slider-label b { color: var(--cm-cyan); font-variant-numeric: tabular-nums; }
.cm-slider input[type="range"] { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; border-radius: 6px;
  background: linear-gradient(90deg, var(--cm-cyan), rgba(55,196,214,.25)); cursor: pointer; }
.cm-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); border: 2px solid var(--cm-cyan); }
.cm-slider input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--cm-cyan); }
.cm-submit { margin-top: .4rem; padding: .75rem 1.4rem; border-radius: 11px; border: none; cursor: pointer;
  background: var(--cm-cyan); color: #04252b; font-weight: 700; font-size: .88rem; transition: filter .15s; }
.cm-submit:hover { filter: brightness(1.08); }
.cm-submit:disabled { opacity: .6; cursor: default; }
.cm-vote-msg { display: inline-block; margin-left: .8rem; font-size: .82rem; color: var(--cm-muted); }
.cm-vote-msg.ok { color: #35d07f; } .cm-vote-msg.err { color: #e8495f; }
.cm-all { display: inline-block; margin-top: 1.4rem; color: var(--cm-cyan); font-size: .86rem; font-weight: 600; }
.cm-skeleton, .cm-offline { color: var(--cm-muted); padding: 1.5rem 0; font-size: .9rem; }

/* ---- Commentaires de profil ---- */
.cm-comments { margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid var(--cm-line); }
.cm-comments-title { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1rem; }
.cm-comments-title h3 { margin: 0; font: 600 1.14rem/1.2 "Space Grotesk", sans-serif; }
.cm-comments-title span { color: var(--cm-faint); font-size: .76rem; }
.cm-comment-form { padding: 1rem; margin-bottom: 1rem; border-radius: 13px; background: rgba(255,255,255,.025); border: 1px solid var(--cm-line); }
.cm-comment-form label { display: block; margin-bottom: .55rem; color: var(--cm-muted); font-size: .8rem; font-weight: 600; }
.cm-comment-form textarea { width: 100%; resize: vertical; min-height: 78px; padding: .75rem .85rem; border-radius: 10px; border: 1px solid var(--cm-line); background: var(--cm-panel-2); color: var(--cm-text); font: inherit; line-height: 1.5; }
.cm-comment-form textarea:focus-visible { outline: 2px solid var(--cm-cyan); outline-offset: 2px; }
.cm-comment-form > div { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; margin-top: .65rem; }
.cm-comment-form [data-cm-comment-msg] { color: var(--cm-muted); font-size: .76rem; }
.cm-comment-form button, .cm-comment-login { border: 0; border-radius: 9px; padding: .58rem .9rem; background: var(--cm-cyan); color: #04252b; font-weight: 700; cursor: pointer; }
.cm-comment-form button:disabled { opacity: .55; cursor: default; }
.cm-comments-list { display: grid; gap: .65rem; }
.cm-comment { padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--cm-line); background: rgba(255,255,255,.018); }
.cm-comment-head { display: flex; align-items: center; gap: .65rem; }
.cm-comment-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #05242a; background: var(--cm-cyan); font-size: .76rem; font-weight: 800; }
.cm-comment-head > span:nth-child(2) { display: grid; gap: .08rem; }
.cm-comment-head b { font-size: .8rem; }
.cm-comment-head time { color: var(--cm-faint); font-size: .68rem; }
.cm-comment p { margin: .65rem 0 0 2.65rem; color: var(--cm-muted); font-size: .86rem; line-height: 1.55; overflow-wrap: anywhere; }
.cm-comment-delete { margin-left: auto; border: 0; background: transparent; color: var(--cm-faint); cursor: pointer; font-size: .72rem; }
.cm-comment-delete:hover { color: #ff7185; }
.cm-comments-empty, .cm-comments-locked { color: var(--cm-faint); font-size: .82rem; }
.cm-comments-policy { margin: .8rem 0 0; color: var(--cm-faint); font-size: .7rem; }
.cm-comments-policy a { color: var(--cm-muted); }

@media (max-width: 680px) { .cm-grid { grid-template-columns: 1fr; } .cm-summary { flex-direction: row; justify-content: flex-start; } }

/* ---- Page classement (community.html) ---- */
.cm-page { max-width: 1080px; margin: 0 auto; padding: 2.4rem 1.6rem 4rem; }
.cm-page-head { margin-bottom: 2rem; }
.cm-page-head .kicker { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--cm-cyan); font-weight: 700; }
.cm-page-head h1 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.9rem,4vw,2.8rem); margin: .4rem 0 .5rem; }
.cm-page-head p { color: var(--cm-muted); max-width: 64ch; line-height: 1.6; }
.cm-board { display: grid; gap: .7rem; }
.cm-row { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 1rem; align-items: center;
  padding: .9rem 1.2rem; border-radius: 14px; background: var(--cm-panel); border: 1px solid var(--cm-line); transition: border-color .15s, transform .15s; }
.cm-row:hover { border-color: rgba(55,196,214,.4); transform: translateX(2px); }
.cm-rank { font-family: "Playfair Display", serif; font-size: 1.3rem; color: var(--cm-faint); text-align: center; }
.cm-row.top .cm-rank { color: var(--cm-cyan); }
.cm-row-id { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.cm-row-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--cm-panel-2); flex: none; }
.cm-row-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-row-name small { display: block; color: var(--cm-faint); font-weight: 400; font-size: .76rem; }
.cm-row-count { color: var(--cm-muted); font-size: .82rem; }
.cm-row-score { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-board-empty { text-align: center; color: var(--cm-muted); padding: 3rem 1rem; }
.cm-you { margin-bottom: 1.6rem; padding: .8rem 1.2rem; border-radius: 12px; background: rgba(55,196,214,.08);
  border: 1px solid rgba(55,196,214,.25); display: flex; align-items: center; gap: .8rem; font-size: .88rem; }
.cm-you .cm-logout { margin-left: auto; color: var(--cm-muted); font-size: .8rem; cursor: pointer; background: none; border: none; }
.cm-you .cm-logout:hover { color: var(--cm-text); }
.cm-account-actions { margin-left: auto; display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.cm-account-actions .cm-logout { margin-left: 0; padding: .35rem .5rem; }
.cm-account-actions .cm-danger { color: #ff7185; }

@media (max-width: 760px) {
  .cm-you { align-items: flex-start; flex-direction: column; }
  .cm-account-actions { margin-left: 0; justify-content: flex-start; }
  .cm-comment p { margin-left: 0; }
}
