/* [60-family-select] Écran de sélection de Famille */
/* ==========================================================================
   6. ÉCRAN DE SÉLECTION DE FAMILLE (STYLE EXACT REVIEW_2.JPG)
   ========================================================================== */
.unified-auth-modal {
  width: 880px;
  max-width: 95vw;
  transition: all 0.3s ease;
}

.auth-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 12.5px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.auth-status-pill.status-neutral {
  background: linear-gradient(180deg, #1f1b15 0%, #100d0a 100%);
  border: 1px solid #42382a;
  color: #c4b4a0;
}

.auth-status-pill.status-existing {
  background: linear-gradient(180deg, #291f12 0%, #140f09 100%);
  border: 1.5px solid var(--gold-classic);
  color: var(--gold-highlight);
  box-shadow: 0 0 10px rgba(182, 140, 85, 0.25);
}

.auth-status-pill.status-new {
  background: linear-gradient(180deg, #14261f 0%, #0a1410 100%);
  border: 1.5px solid #58a387;
  color: #ace0cd;
  box-shadow: 0 0 10px rgba(88, 163, 135, 0.25);
}

.auth-row-inputs {
  display: flex;
  gap: 14px;
  margin-bottom: 6px;
}

.auth-row-inputs .flex-1 {
  flex: 1;
}

.auth-input-hint {
  font-size: 11px;
  color: #a8947f;
  margin-top: 4px;
  min-height: 16px;
  line-height: 1.3;
}

/* Les blocs de l'écran d'entrée se masquent par la classe « hidden » (erreur, bouton, choix de Famille) */
#login-modal .hidden { display: none; }

.auth-existing-actions {
  margin-top: 8px;
  margin-bottom: 4px;
}

.auth-new-section {
  margin-top: 10px;
  transition: all 0.3s ease;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.auth-form-group label,
.auth-field-label {
  color: #dfd2c1;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  background: #100d0a;
  border: 1px solid #423728;
  color: #fff;
  padding: 8px 12px;
  font-size: 13.5px;
  border-radius: 3px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.7);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(184, 142, 86, 0.4), inset 0 1px 3px rgba(0,0,0,0.8);
}

.auth-error-banner {
  background: linear-gradient(180deg, #1e3f34 0%, #10231d 100%);
  border: 1px solid #e97163;
  color: #f9d6d2;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.auth-actions-row {
  margin-top: 6px;
}

.btn-auth-primary {
  width: 100%;
  padding: 11px 0;
  background: linear-gradient(180deg, #399375 0%, #1c4f3e 100%);
  border: 1px solid #ec8579;
  color: #fff;
  font-family: 'Limelight', serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  transition: all 0.2s;
}

.btn-auth-primary:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(57, 147, 117, 0.4);
}

.btn-auth-primary:active {
  transform: translateY(1px);
}

.auth-quick-accounts-wrapper {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px dashed #362d21;
  border-radius: 4px;
  text-align: left;
}

.auth-quick-accounts-label {
  font-size: 11px;
  color: #9c8a77;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.auth-quick-accounts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auth-account-chip {
  background: linear-gradient(180deg, #27221c 0%, #15110d 100%);
  border: 1px solid #504230;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  color: #e8ded0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.auth-account-chip:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: #32291e;
  transform: scale(1.03);
}

.auth-switch-link-row {
  margin-top: 10px;
  font-size: 12px;
  color: #a8947f;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-switch-link {
  color: var(--gold-highlight);
  text-decoration: underline;
  font-weight: bold;
  cursor: pointer;
}

.auth-switch-link:hover {
  color: #fff;
  text-shadow: 0 0 6px var(--gold-primary);
}

.login-name-prompt-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.auth-input-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.login-subtitle-note {
  font-size: 11.5px;
  color: #bbb;
  margin-bottom: 12px;
}

.family-5columns-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.family-card-column {
  background: linear-gradient(180deg, #181a1d 0%, #090a0c 100%);
  border: 1.5px solid #423626;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

/* Famille au complet : grisée, inscription refusée par le serveur */
.family-card-column.full {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: not-allowed;
}
.family-card-column.full:hover {
  transform: none;
  box-shadow: none;
}

.family-card-column:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: 0 6px 15px rgba(184, 142, 86, 0.3);
}

.family-card-column.selected {
  border-color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(207, 138, 48, 0.5);
  background: linear-gradient(180deg, #1d342c 0%, #0b1411 100%);
}

.family-crest-shield {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.family-name-title {
  font-family: 'Limelight', serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-highlight);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.family-motto-text {
  font-size: 10.5px;
  color: #ccc;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 10px;
  flex: 1;
}

.family-bonus-tag {
  background: rgba(207, 138, 48, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-highlight);
  font-size: 10px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 2px;
  margin-bottom: 10px;
  text-align: center;
}

.btn-join-family {
  width: 100%;
  background: linear-gradient(180deg, #399375 0%, #205745 100%);
  border: 1px solid #ee958c;
  color: #fff;
  font-family: 'Limelight', serif;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 0;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 1px;
}

.btn-join-family:hover {
  filter: brightness(1.2);
}

/* Choix du portrait à l'inscription */
.avatar-selector-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 6px 0 10px; }
.avatar-choice { height: 74px; padding: 0; border: 2px solid #3c4146; border-radius: 3px; background: #151515; cursor: pointer; overflow: hidden; }
.avatar-choice { position: relative; }
/* même échelle pour tous les portraits (toutes les images font 520 px de haut, mais pas la même largeur) : hauteur fixe, centré, tête en haut */
.avatar-choice img { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); height: 250px; width: auto; max-width: none; display: block; }
.avatar-choice:hover { border-color: #a68d6c; }
.avatar-choice.selected { border-color: var(--gold-pale); box-shadow: 0 0 8px rgba(222, 196, 162, 0.7); }
@media (max-width: 640px) { .avatar-selector-grid { grid-template-columns: repeat(4, 1fr); } }
