/* ============================================================
   SYNEP CFE-CGC — Espaces privés (adhérent + administrateur)
   ============================================================ */

/* ===== PAGES D'AUTHENTIFICATION ===== */
.auth-wrap {
  padding: 48px 0 72px;
  background: var(--gray-50);
  min-height: 60vh;
}
.auth-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}
.auth-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.auth-header {
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 24px; margin-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}
.auth-icon {
  width: 52px; height: 52px;
  background: var(--blue-50); color: var(--blue-800);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px; color: var(--blue-900); margin: 0 0 4px;
}
.auth-header .sub {
  font-size: 14px; color: var(--gray-500); margin: 0;
}

.auth-form .form-row { margin-bottom: 16px; }
.auth-form label {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--gray-700);
  margin-bottom: 6px;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"],
.auth-form input[type="date"],
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit; font-size: 15px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: white;
  color: var(--gray-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(0, 85, 164, 0.12);
}
.auth-form .form-row.inline {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.checkbox-row {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px !important; color: var(--gray-700); font-weight: 500 !important;
  margin-bottom: 0 !important; cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--blue-800);
  cursor: pointer;
}
.forgot-link {
  font-size: 13px; color: var(--blue-700); font-weight: 500;
}
.forgot-link:hover { color: var(--blue-900); text-decoration: underline; }

.form-error {
  padding: 10px 14px;
  background: #fef2f2; color: #a61b1b;
  border: 1px solid #fecaca; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 16px;
}
.form-success {
  padding: 12px 16px;
  background: #f0fdf4; color: #15803d;
  border: 1px solid #bbf7d0; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start;
}

.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.auth-demo {
  margin-top: 28px; padding: 18px;
  background: var(--blue-50); border: 1px dashed var(--blue-700);
  border-radius: 10px;
}
.auth-demo .demo-label {
  display: inline-block;
  background: var(--blue-800); color: white;
  padding: 3px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  margin-bottom: 8px;
}
.auth-demo p {
  margin: 0 0 12px; font-size: 13.5px; color: var(--gray-700); line-height: 1.5;
}

.auth-aside {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.auth-aside h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px; color: var(--blue-900); margin: 0 0 10px;
}
.auth-aside p {
  color: var(--gray-700); margin: 0 0 14px; font-size: 14.5px; line-height: 1.55;
}
.auth-aside hr {
  border: none; border-top: 1px solid var(--gray-200); margin: 24px 0;
}
.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue-800); font-weight: 600; font-size: 14px;
}
.btn-link:hover { color: var(--blue-900); gap: 10px; transition: gap .15s ease; }

@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
}

/* ===== DASHBOARD ===== */
.dash-wrap {
  background: var(--gray-50);
  padding: 32px 0 64px;
  min-height: 70vh;
}
.dash-hello {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  flex-wrap: wrap;
  padding: 0 0 24px; margin-bottom: 28px;
  border-bottom: 1px solid var(--gray-200);
}
.dash-hello h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px; color: var(--blue-900); margin: 0 0 4px;
}
.dash-hello p { color: var(--gray-500); margin: 0; font-size: 14.5px; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.dash-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}
.dash-main { display: flex; flex-direction: column; gap: 24px; }
.dash-side { display: flex; flex-direction: column; gap: 20px; }

.dash-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.dash-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.dash-card-head h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px; color: var(--blue-900); margin: 0;
}
.dash-card-head .more-link {
  font-size: 13px; color: var(--blue-700); font-weight: 600;
}
.dash-card-head .more-link:hover { color: var(--blue-900); }

/* Cotisation status */
.cotisation-card {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.cotisation-card::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 90% 10%, rgba(255,255,255,.08), transparent 40%);
  pointer-events: none;
}
.cotisation-card h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px; margin: 0 0 14px; position: relative;
}
.cotisation-status {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,.2);
  color: #bbf7d0;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  margin-bottom: 14px; position: relative;
}
.cotisation-amount {
  font-size: 32px; font-weight: 800;
  font-family: 'Source Serif 4', Georgia, serif;
  margin: 0; position: relative; letter-spacing: -.5px;
}
.cotisation-amount span {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.7);
  margin-left: 6px;
}
.cotisation-detail {
  font-size: 13.5px; color: rgba(255,255,255,.85);
  margin: 6px 0 16px; position: relative;
}
.cotisation-actions { display: flex; gap: 10px; position: relative; }
.cotisation-actions .btn {
  background: rgba(255,255,255,.15); color: white; border: 1px solid rgba(255,255,255,.2);
}
.cotisation-actions .btn:hover { background: rgba(255,255,255,.25); color: white; }
.cotisation-actions .btn.primary {
  background: white; color: var(--blue-900); border-color: white;
}
.cotisation-actions .btn.primary:hover { background: var(--gray-100); }

/* Profile card */
.profile-card { text-align: center; padding: 28px 20px; }
.profile-avatar {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 24px;
  margin: 0 auto 14px; box-shadow: var(--shadow-md);
}
.profile-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px; color: var(--blue-900); margin: 0 0 4px; font-weight: 700;
}
.profile-email { font-size: 13px; color: var(--gray-500); margin: 0 0 4px; word-break: break-all; }
.profile-branche {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; margin-top: 8px;
  text-transform: uppercase; letter-spacing: .3px;
}
.profile-since { font-size: 12.5px; color: var(--gray-500); margin: 14px 0 0; font-style: italic; }
.profile-actions {
  display: flex; gap: 8px; margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--gray-100); justify-content: center; flex-wrap: wrap;
}
.profile-actions .btn { font-size: 12.5px; padding: 7px 12px; }

/* Document list dans dashboard */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.doc-list li:last-child { border-bottom: none; padding-bottom: 0; }
.doc-list li:first-child { padding-top: 0; }
.doc-list .doc-row {
  display: flex; gap: 12px; align-items: flex-start;
}
.doc-list .doc-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--blue-50); color: var(--blue-800);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.doc-list .doc-body { flex: 1; min-width: 0; }
.doc-list .doc-title {
  font-weight: 600; color: var(--gray-900); font-size: 14.5px;
  margin: 0 0 2px; line-height: 1.3;
  display: block;
}
.doc-list .doc-title:hover { color: var(--blue-800); }
.doc-list .doc-meta {
  font-size: 12.5px; color: var(--gray-500);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

/* Notifications */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li {
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px; color: var(--gray-700);
  display: flex; gap: 10px; align-items: flex-start;
}
.notif-list li:last-child { margin-bottom: 0; }
.notif-list li.unread { background: var(--blue-50); border-color: var(--blue-100); }
.notif-list .notif-icon {
  flex-shrink: 0; color: var(--blue-700);
  margin-top: 2px;
}
.notif-list .notif-body { flex: 1; }
.notif-list .notif-date {
  font-size: 12px; color: var(--gray-500); display: block; margin-top: 2px;
}

/* Quick actions sidebar */
.quick-actions { display: flex; flex-direction: column; gap: 6px; }
.quick-actions a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--gray-700); font-size: 14px; font-weight: 500;
  transition: background .15s ease;
}
.quick-actions a:hover { background: var(--gray-100); color: var(--blue-800); }
.quick-actions a .qa-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray-700);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.quick-actions a:hover .qa-icon { background: var(--blue-50); color: var(--blue-800); }

/* ===== Carte "Mes alertes" (opt-in notifications) ===== */
.alertes-body { padding: 4px 20px 20px; }
.alertes-intro { margin: 0 0 18px; color: var(--gray-600); font-size: 14px; line-height: 1.5; }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  cursor: pointer;
  gap: 16px;
}
.toggle-row:hover { border-color: var(--blue-300); }
.toggle-info { display: flex; flex-direction: column; gap: 2px; }
.toggle-info strong { font-size: 14px; color: var(--gray-900); font-weight: 600; }
.toggle-info small { font-size: 12px; color: var(--gray-500); }

.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--gray-300);
  border-radius: 24px;
  transition: background .18s ease;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--blue-700, #0a2540); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.alertes-branches { margin-top: 14px; padding: 14px 16px; border: 1px dashed var(--gray-300); border-radius: 10px; }
.alertes-branches-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 10px; }
.alertes-branches-label small { font-weight: 400; color: var(--gray-500); margin-left: 6px; }

.branches-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  background: #fff;
  transition: all .15s ease;
}
.chip-check:hover { border-color: var(--blue-500); color: var(--blue-800); }
.chip-check input { accent-color: var(--blue-700, #0a2540); }
.chip-check:has(input:checked) {
  background: var(--blue-50);
  border-color: var(--blue-500);
  color: var(--blue-800);
  font-weight: 500;
}

.alertes-actions { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.alertes-status { font-size: 13px; color: var(--gray-500); }
.alertes-status.ok { color: #15803d; font-weight: 500; }
.alertes-status.ko { color: #b91c1c; font-weight: 500; }

/* Admin-specific */
.admin-ribbon {
  background: linear-gradient(90deg, var(--red), #e11d48);
  color: white;
  padding: 10px 0;
  text-align: center;
  font-size: 13px; font-weight: 600; letter-spacing: .3px;
}
.admin-ribbon .container {
  display: flex; justify-content: center; align-items: center; gap: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label {
  font-size: 12.5px; color: var(--gray-500); font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px; font-weight: 700; color: var(--blue-900);
  line-height: 1; margin-bottom: 4px;
}
.stat-card .stat-change {
  font-size: 12.5px; color: var(--gray-500);
}
.stat-card .stat-change.positive { color: #15803d; }
.stat-card .stat-change.negative { color: #a61b1b; }

/* Admin table */
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.admin-table thead th {
  text-align: left; font-size: 12px; color: var(--gray-500);
  font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  padding: 10px 12px; border-bottom: 1px solid var(--gray-200);
}
.admin-table tbody td {
  padding: 12px; border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: var(--gray-50); }
.admin-table .actions-cell { text-align: right; white-space: nowrap; }
.admin-table .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--gray-200);
  border-radius: 6px; color: var(--gray-700);
  cursor: pointer; margin-left: 4px;
  transition: all .15s ease;
}
.admin-table .icon-btn:hover {
  border-color: var(--blue-700); color: var(--blue-800); background: var(--blue-50);
}
.admin-table .icon-btn.danger:hover {
  border-color: var(--red); color: var(--red); background: #fef2f2;
}

/* Publish form */
.publish-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.publish-form .full { grid-column: 1 / -1; }
.publish-form input[type="file"] {
  padding: 8px; background: var(--gray-50); cursor: pointer;
}
.publish-form textarea { min-height: 100px; resize: vertical; }

/* Tabs */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab {
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  color: var(--gray-500); border: none; background: transparent;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
  font-family: inherit;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--blue-800); }
.tab.active { color: var(--blue-900); border-bottom-color: var(--blue-800); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--gray-900); color: white;
  padding: 12px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px);
  pointer-events: none; z-index: 1000;
  transition: opacity .2s ease, transform .2s ease;
  display: flex; gap: 10px; align-items: center;
  max-width: 400px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #166534; }
.toast.error { background: #991b1b; }

@media (max-width: 900px) {
  .dash-layout { grid-template-columns: 1fr; }
  .publish-form { grid-template-columns: 1fr; }
}

/* =============================================================
   Badges sur les onglets (compteurs "à traiter")
   ============================================================= */
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  margin-left: 6px;
  background: var(--blue-700, #0055a4); color: #fff;
  border-radius: 10px;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.tab-badge[hidden] { display: none; }
.tab-badge-warn { background: #d97706; }     /* orange */
.tab-badge-danger { background: #b91c1c; }   /* rouge */

/* =============================================================
   Chips de statut / urgence (dans les tableaux admin)
   ============================================================= */
.status-chip, .urgence-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  white-space: nowrap;
}
.status-a_traiter       { background: #fef3c7; color: #92400e; }
.status-en_cours        { background: #dbeafe; color: #1e40af; }
.status-en_attente_info { background: #ede9fe; color: #6d28d9; }
.status-resolu          { background: #d1fae5; color: #065f46; }
.status-clos            { background: #e5e7eb; color: #374151; }

.urgence-basse    { background: #e5e7eb; color: #374151; }
.urgence-normale  { background: #dbeafe; color: #1e40af; }
.urgence-haute    { background: #fed7aa; color: #9a3412; }
.urgence-critique { background: #fecaca; color: #991b1b; font-weight: 700; }

.cotisation-a_jour     { background: #d1fae5; color: #065f46; }
.cotisation-en_retard  { background: #fee2e2; color: #991b1b; }
.cotisation-exemptee   { background: #e5e7eb; color: #374151; }
.cotisation-non_payee  { background: #fef3c7; color: #92400e; }
.cotisation-non_reglee { background: #fef3c7; color: #92400e; }

.bulletin-status-recu     { background: #fef3c7; color: #92400e; }
.bulletin-status-en_cours { background: #dbeafe; color: #1e40af; }
.bulletin-status-valide   { background: #d1fae5; color: #065f46; }
.bulletin-status-rejete   { background: #e5e7eb; color: #374151; text-decoration: line-through; }

/* =============================================================
   Modal administrateur (détail + édition d'un enregistrement)
   ============================================================= */
.admin-modal[hidden] { display: none !important; }
.admin-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.admin-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 20, 50, 0.55);
  backdrop-filter: blur(2px);
  animation: admin-modal-fade 0.2s ease-out;
}
.admin-modal-panel {
  position: relative;
  width: min(760px, 100%); max-height: 90vh;
  background: #fff; border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: admin-modal-pop 0.22s cubic-bezier(.2,.9,.3,1.2);
}
.admin-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
  flex: none;
}
.admin-modal-head h3 {
  margin: 0; font-size: 18px; font-weight: 700; color: var(--blue-900);
}
.admin-modal-close {
  background: transparent; border: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--gray-500);
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.admin-modal-close:hover { background: var(--gray-100); color: var(--blue-900); }
.admin-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.admin-modal-foot {
  display: flex; gap: 10px; align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50, #f9fafb);
  flex: none;
}

/* Méta-bloc haut du modal juridique */
.juridique-meta {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 8px 18px;
  font-size: 14px;
}
.juridique-meta dt {
  color: var(--gray-500); font-weight: 500;
  margin: 0;
}
.juridique-meta dd {
  margin: 0; color: var(--gray-900);
  word-break: break-word;
}
.juridique-description {
  padding: 14px 16px;
  background: var(--gray-50, #f9fafb);
  border-left: 3px solid var(--blue-700, #0055a4);
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap; line-height: 1.55; font-size: 14px;
  color: var(--gray-900);
}
.juridique-pieces {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.juridique-pieces a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 7px;
  color: var(--blue-800); font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.juridique-pieces a:hover { border-color: var(--blue-700); background: var(--blue-50); }

@keyframes admin-modal-fade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes admin-modal-pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 720px) {
  .juridique-meta { grid-template-columns: 1fr; gap: 4px 0; }
  .juridique-meta dt { margin-top: 6px; }
  .admin-modal-panel { max-height: 95vh; }
}

/* ---------------------------------------------------------------------------
   Affichage du mot de passe
   ---------------------------------------------------------------------------
   Sans ce bouton, une faute de frappe sur un mot de passe long est
   indétectable : on ne peut que tout effacer et recommencer. C'est la
   première cause d'abandon sur un formulaire de connexion.
--------------------------------------------------------------------------- */
.pwd-field { position: relative; }

.pwd-field input { padding-right: 46px; }

.pwd-field .pwd-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  transition: color .15s, background .15s;
}

.pwd-field .pwd-toggle:hover { color: var(--gray-900); background: var(--gray-100); }

.pwd-field .pwd-toggle:focus-visible {
  outline: 2px solid var(--blue-700);
  outline-offset: 1px;
  color: var(--gray-900);
}

.pwd-field .pwd-toggle svg { display: block; pointer-events: none; }
.pwd-field .pwd-toggle .icon-off { display: none; }
.pwd-field .pwd-toggle[aria-pressed="true"] .icon-on { display: none; }
.pwd-field .pwd-toggle[aria-pressed="true"] .icon-off { display: block; }
