/* =============================================================
   COWORCUT — Styles de la couche « compte » (V1)
   -------------------------------------------------------------
   TOUTES les règles sont préfixées .cwc-auth- et n'affectent que
   les éléments créés par assets/auth.js. Aucun sélecteur global,
   aucune surcharge des classes existantes du site.
   ============================================================= */

.cwc-auth-panel{
  background:#fff;
  border:1px solid rgba(14,15,32,.14);
  border-radius:22px;
  box-shadow:0 1px 2px rgba(20,20,55,.05),0 10px 24px -14px rgba(30,25,80,.16);
  padding:clamp(20px,3vw,30px);
  display:grid;
  gap:16px;
}
.cwc-auth-panel__lead{
  margin:0;
  color:#56566A;
  font-size:.98rem;
  line-height:1.6;
}
.cwc-auth-privacy{
  margin:0;
  color:#686675;
  font-size:.82rem;
  line-height:1.55;
}
.cwc-auth-panel__title{
  margin:0;
  font-family:'Sora',system-ui,sans-serif;
  font-weight:700;
  font-size:1.12rem;
  color:#0E0E17;
}
.cwc-auth-actions{display:flex;flex-wrap:wrap;gap:10px}
.cwc-auth-btn{
  appearance:none;
  border:0;
  cursor:pointer;
  font:inherit;
  font-weight:600;
  border-radius:12px;
  padding:14px 20px;
  min-height:48px;
  transition:transform .18s ease,opacity .18s ease;
}
.cwc-auth-btn--primary{
  background:linear-gradient(135deg,#8B5CF6 0%,#6D28D9 100%);
  color:#fff;
  box-shadow:0 18px 40px -16px rgba(124,92,255,.45);
}
.cwc-auth-btn--ghost{
  background:#fff;
  color:#6D28D9;
  border:1px solid rgba(124,92,255,.35);
}
.cwc-auth-btn:hover{transform:translateY(-1px)}
.cwc-auth-btn:disabled{cursor:wait;opacity:.6;transform:none}
.cwc-auth-link{
  appearance:none;background:none;border:0;padding:0;
  font:inherit;color:#6D28D9;font-weight:600;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;
  justify-self:start;
}
.cwc-auth-field{display:grid;gap:7px}
.cwc-auth-field label{
  font-weight:600;font-size:.9rem;color:#26263A;
}
.cwc-auth-field input,
.cwc-auth-field select{
  font:inherit;
  color:#0E0E17;
  background:#fff;
  border:1.5px solid rgba(14,15,32,.14);
  border-radius:12px;
  padding:13px 14px;
  min-height:48px;
  width:100%;
  box-sizing:border-box;
}
.cwc-auth-field input:focus,
.cwc-auth-field select:focus{
  outline:none;
  border-color:#7C5CFF;
  box-shadow:0 0 0 4px #EEE9FE;
}
.cwc-auth-field--optional label span{color:#8A8A9C;font-weight:500}
.cwc-auth-status{
  margin:0;
  font-size:.92rem;
  min-height:1.2em;
  color:#56566A;
}
.cwc-auth-status.is-error{color:#C81E4A;font-weight:600}
.cwc-auth-status.is-success{color:#15A24A;font-weight:600}
.cwc-auth-note{
  margin:0;
  font-size:.82rem;
  color:#8A8A9C;
}

/* Bloc de commandes du compte, affiché au-dessus du formulaire */
.cwc-auth-account{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 18px;
  margin:0 0 18px;
  padding:12px 16px;
  background:#F6F4FC;
  border:1px solid rgba(124,92,255,.22);
  border-radius:14px;
}
.cwc-auth-account__who{
  margin:0;
  font-size:.9rem;
  color:#56566A;
  overflow-wrap:anywhere;
}
.cwc-auth-account__who b{color:#6D28D9;font-weight:600}
.cwc-auth-account__actions{display:flex;flex-wrap:wrap;gap:16px}
.cwc-auth-account__actions .cwc-auth-link{font-size:.9rem}
/* Message d'erreur de déconnexion : pleine largeur sous la barre, et invisible
   tant qu'il est vide (réutilise .cwc-auth-status / .is-error). */
.cwc-auth-account .cwc-auth-status{flex-basis:100%}
.cwc-auth-account .cwc-auth-status:empty{display:none;min-height:0}

@media (max-width:640px){
  .cwc-auth-panel{padding:18px;border-radius:18px}
  .cwc-auth-actions{flex-direction:column}
  .cwc-auth-actions .cwc-auth-btn{width:100%}
  .cwc-auth-account{flex-direction:column;align-items:flex-start}
  .cwc-auth-account__actions{gap:14px}
}

@media (prefers-reduced-motion:reduce){
  .cwc-auth-btn{transition:none}
  .cwc-auth-btn:hover{transform:none}
}
