/*
 * 06-annales-profil-paiements.css
 * Annales, page profil, tableau de bord et options de paiement.
 */

/* annales */
.anngrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.anncard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.18s,
    transform 0.18s,
    border-color 0.18s;
}
.anncard:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--c) 30%, #fff);
}
.anncover {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 16px 18px;
  min-height: 78px;
  color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #1f1a35));
}
.anncover span {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.95;
}
.anncover b {
  font-family: var(--f-display);
  font-size: 30px;
  line-height: 1;
}
.annbody {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.annbody h3 {
  font-size: 17px;
  margin: 0;
  overflow-wrap: anywhere;
}
.annbody p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.anncard .subj {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 22%, #fff);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.annfoot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.annmeta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.annmeta svg {
  width: 15px;
  height: 15px;
}
.annprice {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}
.buybox {
  gap: 12px;
}
.exgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.excard {
  border-radius: 14px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #1f1a35));
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.excard b {
  font-size: 16px;
}
.excard span {
  opacity: 0.9;
  font-size: 13px;
}
@media (max-width: 640px) {
  .exgrid {
    grid-template-columns: 1fr;
  }
}

/* page profil */
.pfcard {
  background: linear-gradient(135deg, #fff, var(--accent-soft) 160%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(18px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow);
}
.pf-id {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.pf-id .av.xl {
  width: 88px;
  height: 88px;
  font-size: 34px;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 5px var(--line);
}
.pf-txt {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pf-txt h1 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 0;
}
.pf-sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
.pf-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--teal);
}
.pf-ok svg {
  width: 13px;
  height: 13px;
}
.pf-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}
.pf-price b {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.pf-price small {
  color: var(--ink-soft);
  font-size: 14px;
}
.pf-price span {
  font-size: 12.5px;
  color: var(--ink-soft);
}
.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pf-grid .k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.pf-grid .subj {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 22%, #fff);
}
.pf-bio {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
  overflow-wrap: anywhere;
  max-width: none;
}
.pfclasses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.pfcl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--c);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--ink);
  transition:
    box-shadow 0.18s,
    transform 0.18s;
}
.pfcl:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.pfcl .subj {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, #fff);
}
.pfcl b {
  font-size: 16px;
}
.pfcl small {
  color: var(--ink-soft);
}
details.more {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
}
details.more summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--accent);
}
details.more[open] summary {
  margin-bottom: 10px;
}
@media (max-width: 640px) {
  .pf-price {
    align-items: flex-start;
    text-align: left;
  }
}

/* tableau de bord v3 */
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.kpi {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi .kico {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal);
}
.kpi .kico svg {
  width: 22px;
  height: 22px;
}
.kpi.accent .kico {
  background: var(--accent-soft);
  color: var(--accent);
}
.kpi.warn {
  border-color: #f3c0cf;
  background: #fff7f9;
}
.kpi.warn .kico {
  background: var(--accent);
  color: #fff;
}
.kpi .k {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.kpi .v {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  margin: 2px 0;
}
.kpi .v small {
  font-size: 15px;
  color: var(--ink-soft);
}
.kpi .faint {
  font-size: 13px;
}
.dsec {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.dsec-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.dsec-h h2 {
  font-size: 21px;
  margin: 0;
}
.cols2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cols2 .k {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.slist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.srow {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  text-align: left;
  color: var(--ink);
  width: 100%;
}
button.srow {
  cursor: pointer;
}
button.srow:hover {
  box-shadow: var(--shadow);
}
.srow.done {
  background: var(--sunk);
}
.srow.done > svg {
  width: 18px;
  height: 18px;
  color: var(--ok);
  flex: none;
}
.dchip {
  flex: none;
  width: 48px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.dchip b {
  font-family: var(--f-display);
  font-size: 20px;
}
.dchip small {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.srow.done .dchip {
  background: #fff;
  color: var(--ink-soft);
}
.sm {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sm b {
  font-size: 14.5px;
}
.sm small {
  font-size: 13px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 900px) {
  .kpis {
    grid-template-columns: 1fr;
  }
  .cols2 {
    grid-template-columns: 1fr;
  }
}

.savebar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(31, 26, 53, 0.14);
  justify-content: flex-end;
}
.savehint {
  margin-right: auto;
  font-size: 13px;
  color: var(--ink-soft);
}

/* options de paiement */
.payopts2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.payopt {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
}
.po-h {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
}
.po-h small {
  grid-column: 2;
  color: var(--ink-faint);
  font-size: 12px;
}
.po-ico {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
}
.po-ico.pp {
  background: #0070ba;
}
.po-ico.wv {
  background: #1dc3ff;
}
.po-ico.bk {
  background: #191c1f;
}
.po-rib {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin: 0;
  font-size: 13.5px;
}
.po-rib dt {
  color: var(--ink-faint);
}
.po-rib dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.po-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
.btn.sm {
  padding: 2px 8px;
  font-size: 12px;
}
.declare {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  align-items: center;
}
.paycard .pact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.latepay {
  border-color: #f3c0cf;
  background: #fff9fb;
}
.latepay .k {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}

.pwmeter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.pwmeter i {
  display: block;
  height: 5px;
  border-radius: 9px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.pwmeter i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 9px;
  transition:
    width 0.2s,
    background 0.2s;
}
.pwmeter[data-s="0"] i::after,
.pwmeter[data-s="1"] i::after {
  width: 25%;
  background: var(--bad);
}
.pwmeter[data-s="2"] i::after {
  width: 55%;
  background: #e0a100;
}
.pwmeter[data-s="3"] i::after {
  width: 80%;
  background: var(--ok);
}
.pwmeter[data-s="4"] i::after {
  width: 100%;
  background: var(--ok);
}
.pwmeter small {
  font-size: 12px;
  color: var(--ink-soft);
}

.panel.danger {
  border-color: #f3c0cf;
  background: #fffafb;
}
.dangerbtn {
  color: var(--bad) !important;
  border-color: #f3c0cf !important;
}
