/* ═══════════════════════════════════════════════════════════════
   compte-page-states.css — gabarit commun : chargement + erreur
   Pour : les 14 sections de Mon compte. Vient APRÈS compte-page.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── chargement : la carte garde sa forme, jamais un blanc ──────
   Le squelette reprend exactement les hauteurs de .cpt-row et
   .cpt-toggle : quand les vraies données arrivent, rien ne saute. */
.cpt-card.is-loading .cpt-card-title{color:transparent;background:var(--s3);border-radius:4px;display:inline-block;animation:cptPulse 1.4s ease-in-out infinite}
.cpt-skel-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}
.cpt-skel-row:last-child{border-bottom:0;padding-bottom:0}
.cpt-skel-row:first-child{padding-top:0}
.cpt-skel-tx{flex:1;display:flex;flex-direction:column;gap:6px}
.cpt-skel-bar{height:11px;border-radius:3px;background:var(--s3);animation:cptPulse 1.4s ease-in-out infinite}
.cpt-skel-bar.t{width:38%}
.cpt-skel-bar.d{width:64%;height:9px;opacity:.7}
.cpt-skel-ctrl{width:36px;height:20px;border-radius:10px;background:var(--s3);flex:none;animation:cptPulse 1.4s ease-in-out infinite}
@keyframes cptPulse{0%,100%{opacity:.55}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.cpt-skel-bar,.cpt-skel-ctrl,.cpt-card.is-loading .cpt-card-title{animation:none;opacity:.7}}

/* ── erreur d'écriture : le réglage revient, ET LE DIT ───────────
   Un toggle qui se remet en place sans un mot se lit comme un bug.
   .cpt-row.err colore la ligne 2,4 s, le temps de la lire, puis
   s'efface — la ligne ne doit pas rester rouge indéfiniment. */
.cpt-row.err{background:color-mix(in srgb, var(--chaud) 6%, transparent);margin:0 -14px;padding-left:14px;padding-right:14px;border-radius:6px;transition:background 1.6s ease}
.cpt-row-errmsg{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;color:var(--chaud);margin-top:5px}
.cpt-row-errmsg svg{width:12px;height:12px;flex:none}

/* Version bandeau, pour une carte entière qui refuse d'écrire
   (droits insuffisants, section indisponible) — pas pour une ligne. */
.cpt-card-err{display:flex;align-items:flex-start;gap:10px;padding:11px 13px;border-radius:6px;background:color-mix(in srgb, var(--chaud) 7%, transparent);border:1px solid color-mix(in srgb, var(--chaud) 22%, transparent);margin-bottom:14px;font-size:12px;color:var(--text)}
.cpt-card-err svg{width:15px;height:15px;flex:none;color:var(--chaud);margin-top:1px}
.cpt-card-err b{display:block;font-weight:600;margin-bottom:2px}
.cpt-card-err button{font-family:inherit;font-size:11.5px;font-weight:600;color:var(--text-dim);background:0;border:0;text-decoration:underline;cursor:pointer;padding:0;margin-left:auto;flex:none}
.cpt-card-err button:hover{color:var(--text)}

/* ── section vide de contenu (Intégrations) ──────────────────────
   Une section qui ne montre rien doit dire pourquoi, pas laisser
   un blanc qui ressemble à un chargement qui ne finit jamais. */
.cpt-card-empty{padding:34px 20px;text-align:center}
.cpt-card-empty svg{width:24px;height:24px;color:var(--muted);margin-bottom:10px}
.cpt-card-empty-t{font-size:12.5px;font-weight:600;color:var(--text)}
.cpt-card-empty-s{font-size:11.5px;color:var(--muted);margin-top:5px;line-height:1.55;max-width:340px;margin-inline:auto}
