/* =========================================================
   WP Connexion Inscription — wci-style.css
   ========================================================= */

:root {
  --wci-primary:    #e8c84a;
  --wci-dark:       #313132;
  --wci-success:    #16a34a;
  --wci-error:      #dc2626;
  --wci-gray-50:    #f9fafb;
  --wci-gray-100:   #f3f4f6;
  --wci-gray-200:   #e5e7eb;
  --wci-gray-300:   #d1d5db;
  --wci-gray-400:   #9ca3af;
  --wci-gray-600:   #4b5563;
  --wci-gray-800:   #1f2937;
  --wci-radius:     10px;
  --wci-shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --wci-shadow-md:  0 4px 12px rgba(0,0,0,.1);
}

/* ── Reset & wrapper ─────────────────────────────────── */
.wci-wrap *, .wci-wrap *::before, .wci-wrap *::after { box-sizing: border-box; }
.wci-wrap {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--wci-gray-800);
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ── Alertes ─────────────────────────────────────────── */
.wci-alert {
  padding: .75rem 1rem;
  border-radius: var(--wci-radius);
  font-size: .875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.wci-alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.wci-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.wci-alert-info    { background: #fefce8; color: #713f12; border: 1px solid #fde047; }
.wci-alert-loading { background: var(--wci-gray-100); color: var(--wci-gray-600); border: 1px solid var(--wci-gray-200); }

/* ── Boutons ─────────────────────────────────────────── */
.wci-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.25rem; border-radius: var(--wci-radius);
  border: none; cursor: pointer; font-size: .9rem; font-weight: 600;
  transition: background .15s, color .15s, transform .1s;
  text-decoration: none; white-space: nowrap;
}
.wci-btn:active { transform: translateY(1px); }
.wci-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.wci-btn-primary { background: var(--wci-primary); color: var(--wci-dark); }
.wci-btn-primary:hover:not(:disabled) { background: var(--wci-dark); color: #fff; }
.wci-btn-full { width: 100%; }

/* ── Formulaires ─────────────────────────────────────── */
.wci-form-card {
  background: #fff;
  border: 1px solid var(--wci-gray-200);
  border-radius: var(--wci-radius);
  padding: 24px 28px;
  box-shadow: var(--wci-shadow);
}

.wci-form-group {
  display: flex; flex-direction: column; gap: .375rem;
  margin-bottom: 1.1rem;
}
.wci-form-group:last-child { margin-bottom: 0; }

.wci-form-group label {
  font-size: .875rem; font-weight: 600;
  color: var(--wci-gray-800);
  display: flex; flex-direction: column; gap: .2rem;
}
.wci-form-group input {
  padding: .6rem .875rem;
  border: 1px solid var(--wci-gray-200);
  border-radius: 8px;
  font-size: .9rem; color: var(--wci-gray-800);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.wci-form-group input:focus {
  outline: none;
  border-color: var(--wci-primary);
  box-shadow: 0 0 0 3px rgba(232,200,74,.2);
}

.wci-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .wci-form-row { grid-template-columns: 1fr; } }

.wci-hint     { font-size: .72rem; color: var(--wci-gray-400); font-weight: 400; }
.wci-required { color: var(--wci-error); font-weight: 700; }

/* Mot de passe */
.wci-pwd-wrap { position: relative; display: flex; }
.wci-pwd-wrap input { flex: 1; padding-right: 2.5rem; }
.wci-toggle-pwd {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--wci-gray-400); padding: .25rem; transition: color .15s;
}
.wci-toggle-pwd:hover { color: var(--wci-gray-800); }

/* ── Étapes ──────────────────────────────────────────── */
.wci-step { display: none; }
.wci-step-active { display: block; animation: wci-fadein .22s ease; }

@keyframes wci-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.wci-step-header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 8px;
}
.wci-step-header h2 {
  font-size: 1.55rem; font-weight: 700;
  color: var(--wci-gray-800); margin: 0 0 8px;
}
.wci-step-header p {
  color: var(--wci-gray-600); margin: 0; font-size: .9rem;
}

.wci-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--wci-gray-400); font-size: .85rem;
  padding: 0; margin-bottom: 18px;
  transition: color .15s;
}
.wci-back-btn:hover { color: var(--wci-gray-800); }

/* ── Grille types de profil ──────────────────────────── */
.wci-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 400px) { .wci-type-grid { grid-template-columns: 1fr; } }

.wci-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 16px;
  border: 2px solid var(--wci-gray-200);
  border-radius: var(--wci-radius);
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--wci-shadow);
}
.wci-type-btn:hover {
  border-color: var(--wci-primary);
  box-shadow: var(--wci-shadow-md);
  transform: translateY(-2px);
}
.wci-type-icon  { font-size: 2.2rem; }
.wci-type-btn strong {
  font-size: .98rem; color: var(--wci-gray-800);
  font-weight: 700;
}
.wci-type-btn span {
  font-size: .78rem; color: var(--wci-gray-400);
  text-align: center;
}

/* ── Onglets connexion / inscription ─────────────────── */
.wci-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--wci-gray-200);
  border-radius: var(--wci-radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--wci-shadow);
}

.wci-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: var(--wci-gray-50);
  color: var(--wci-gray-600);
  font-size: .9rem; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.wci-tab + .wci-tab { border-left: 1px solid var(--wci-gray-200); }
.wci-tab:hover { background: #fff; color: var(--wci-gray-800); }
.wci-tab-active {
  background: #fff;
  color: var(--wci-dark);
  font-weight: 700;
}
.wci-tab-active::after {
  content: '';
  position: absolute; bottom: 0; left: 10%; width: 80%; height: 2px;
  background: var(--wci-primary);
  border-radius: 2px 2px 0 0;
}

/* ── Panneaux ────────────────────────────────────────── */
.wci-panel { display: none; }
.wci-panel-active { display: block; animation: wci-fadein .18s ease; }

/* ── Déjà connecté ───────────────────────────────────── */
.wci-already-logged {
  background: var(--wci-gray-50);
  border: 1px solid var(--wci-gray-200);
  border-radius: var(--wci-radius);
  padding: 16px 20px;
  font-size: .9rem; color: var(--wci-gray-600);
  text-align: center;
}
.wci-already-logged a { color: var(--wci-dark); font-weight: 700; text-decoration: none; }
.wci-already-logged a:hover { text-decoration: underline; }

/* ── Spinner ─────────────────────────────────────────── */
@keyframes wci-spin { to { transform: rotate(360deg); } }
.wci-spin { animation: wci-spin .8s linear infinite; }
