/* ============================================================
   AFCH – Notifications + UI essentials (stable / anti-régression)
   Fichier : /assets/css/afch-notifications.css
   Objectif :
   - Conserver notifications premium
   - Ajouter un style FIABLE pour le message de bienvenue (#afch-login-welcome)
   - Rester minimal, sans dupliquer le CSS dashboard
   ============================================================ */

/* ============================================================
   AFCH_Notifications — Composant .afch-notice (AFCH_Notifications::notice())
   Palette cohérente : 🟢 success | 🟠 warning | 🔴 danger | 🔵 info
============================================================ */
.afch-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}
.afch-notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.afch-notice-content { flex: 1; }
.afch-notice-title { font-weight: 800; margin-bottom: 2px; }
.afch-notice-text  { opacity: .9; }
.afch-notice-compact { padding: 9px 12px; font-size: 13px; }

/* 🟢 Succès */
.afch-notice-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}
.afch-notice-success .afch-notice-icon { color: #16a34a; }

/* 🟠 Avertissement */
.afch-notice-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #7a4d00;
}
.afch-notice-warning .afch-notice-icon { color: #d97706; }

/* 🔴 Danger */
.afch-notice-danger {
  border-color: #fca5a5;
  background: #fff5f5;
  color: #7a1f1f;
}
.afch-notice-danger .afch-notice-icon { color: #dc2626; }

/* 🔵 Info */
.afch-notice-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}
.afch-notice-info .afch-notice-icon { color: #2563eb; }

/* Bannières (afch-banner-*) — cohérence globale */
.afch-banner { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:10px; border:1px solid #e5e7eb; margin:0 0 12px; font-size:14px; line-height:1.4; }
.afch-banner i { margin-right: 4px; }
.afch-banner-success { background:#f0fdf4; border-color:#86efac; color:#15803d; }  /* 🟢 */
.afch-banner-warning { background:#fffbeb; border-color:#fde68a; color:#7a4d00; }  /* 🟠 */
.afch-banner-danger  { background:#fff5f5; border-color:#fca5a5; color:#7a1f1f; }  /* 🔴 */
.afch-banner-info    { background:#eff6ff; border-color:#bfdbfe; color:#1e40af; }  /* 🔵 */

/* Messages inline (afch-msg + afch-error/warning/success/info) */
.afch-msg     { margin:0 0 14px; border-radius:14px; padding:13px 16px; font-size:14px; line-height:1.5; }
.afch-error   { border:1px solid #fca5a5; background:#fff5f5; color:#7a1f1f; }  /* 🔴 */
.afch-warning { border:1px solid #fde68a; background:#fffbeb; color:#7a4d00; }  /* 🟠 */
.afch-success { border:1px solid #86efac; background:#f0fdf4; color:#15803d; }  /* 🟢 */
.afch-info    { border:1px solid #bfdbfe; background:#eff6ff; color:#1e40af; }  /* 🔵 */

/* -----------------------------
   Variables (stables)
----------------------------- */
:root{
  --afch-green-bg:#fbfffb;
  --afch-green-br:#cfe9d3;
  --afch-green-tx:#14532d;

  --afch-orange-bg:#fff8e8;
  --afch-orange-br:#f0d5a5;
  --afch-orange-tx:#7a4d00;

  --afch-red-bg:#fff5f5;
  --afch-red-br:#f3b4b4;
  --afch-red-tx:#7a1f1f;

  --afch-blue-bg:#eef5ff;
  --afch-blue-br:#cfe1ff;
  --afch-blue-tx:#1f4a8a;

  --afch-radius:12px;
  --afch-shadow:0 3px 10px rgba(0,0,0,.06);
}

/* ============================================================
   NOTIFICATIONS (essentiel)
   - Ne pas toucher aux classes existantes
============================================================ */

/* CONTENEUR LISTE */
.afch-notif-list{
  margin-top:20px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* CARTE GLOBALE */
.afch-notif-card{
  display:flex;
  padding:14px 18px;
  background:#fff;
  border-radius:10px;
  box-shadow:var(--afch-shadow);
  border-left:4px solid #ccc;
  transition:.25s;
}
.afch-notif-card:hover{
  transform:translateY(-2px);
  box-shadow:0 5px 16px rgba(0,0,0,.10);
}

/* NON LU */
.afch-notif-unseen{
  background:#f5fbff;
  border-left-color:#0074d9;
}

/* TYPES */
.afch-notif-type-outbid  { border-left-color:#e53935 !important; }
.afch-notif-type-winner  { border-left-color:#2e7d32 !important; }
.afch-notif-type-bid     { border-left-color:#1e88e5 !important; }
.afch-notif-type-ended   { border-left-color:#6d4c41 !important; }
.afch-notif-type-payment { border-left-color:#8e24aa !important; }
.afch-notif-type-info    { border-left-color:#0288d1 !important; }

/* COLONNE ICÔNE */
.afch-notif-col-icon{
  width:55px;
  display:flex;
  justify-content:center;
}
.afch-notif-icon-circle{
  width:42px;height:42px;
  border-radius:50%;
  background:#e8e8e8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
}
.afch-notif-type-outbid  .afch-notif-icon-circle{ background:#ffebee; color:#c62828; }
.afch-notif-type-winner  .afch-notif-icon-circle{ background:#e8f5e9; color:#2e7d32; }
.afch-notif-type-bid     .afch-notif-icon-circle{ background:#e3f2fd; color:#1565c0; }
.afch-notif-type-ended   .afch-notif-icon-circle{ background:#efebe9; color:#4e342e; }
.afch-notif-type-payment .afch-notif-icon-circle{ background:#f3e5f5; color:#8e24aa; }
.afch-notif-type-info    .afch-notif-icon-circle{ background:#e1f5fe; color:#0288d1; }

/* COLONNE CENTRALE */
.afch-notif-col-main{ flex:1; padding-left:10px; }
.afch-notif-row-top{ display:flex; justify-content:space-between; align-items:center; }
.afch-notif-title{ font-weight:800; font-size:15px; color:#222; }
.afch-notif-date{ font-size:12px; color:#777; }
.afch-notif-type-label{ font-size:12px; font-weight:700; margin:3px 0 6px; opacity:.85; }
.afch-notif-message{ font-size:14px; line-height:1.45; color:#444; white-space:pre-wrap; }

/* COLONNE ACTIONS */
.afch-notif-col-actions{
  width:90px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Bouton Lu (conserver signature) */
.afch-btn-small{
  background:#0a7a46;
  padding:6px 10px;
  border-radius:10px; /* harmonisé */
  font-size:12px;
  font-weight:900;
  color:#fff;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(0,0,0,.06);
}
.afch-btn-small:hover{ background:#0c9456; }

/* État déjà lu */
.afch-notif-status-read{
  font-size:12px;
  color:#2e7d32;
  display:flex;
  align-items:center;
  gap:5px;
}

/* TOOLBAR + PAGINATION */
.afch-notif-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:10px 0 20px;
}
.afch-notif-counter{ font-size:14px; }

.afch-notif-pagination{
  display:flex;
  gap:6px;
  margin:20px 0;
  justify-content:center;
}
.afch-page-link{
  padding:6px 12px;
  border:1px solid #ccc;
  border-radius:8px;
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  background:#fff;
  color:#444;
}
.afch-page-link:hover{ background:#f5f5f5; }
.afch-page-current{
  background:#0a7a46 !important;
  color:#fff !important;
  border-color:#0a7a46 !important;
}

/* Responsive notifs */
@media (max-width:650px){
  .afch-notif-card{ flex-direction:column; gap:10px; }
  .afch-notif-col-actions{ width:100%; justify-content:flex-start; }
}

/* ============================================================
   MESSAGE BIENVENUE POST-CONNEXION
   - Doit fonctionner même hors .afch-dashboard-wrapper
   - On force avec !important (scope strict via l'ID)
============================================================ */

/* Conteneur */
#afch-login-welcome{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  padding:14px 16px !important;
  margin:14px 0 18px !important;

  border-radius:14px !important;
  border:1px solid var(--afch-green-br) !important;

  background:linear-gradient(135deg,#e7f9ed 0%,#fbfffb 100%) !important;
  color:var(--afch-green-tx) !important;

  box-shadow:0 6px 18px rgba(20,83,45,.12) !important;
}

/* Texte interne */
#afch-login-welcome .afch-banner-text{
  font-weight:900 !important;
  font-size:14px !important;
  line-height:1.4 !important;
}

/* Icône */
#afch-login-welcome i{
  color:#2e7d32 !important;
  margin-right:6px !important;
  font-size:18px !important;
  vertical-align:middle !important;
}

/* Mobile */
@media (max-width:650px){
  #afch-login-welcome{
    padding:12px 14px !important;
  }
  #afch-login-welcome .afch-banner-text{
    font-size:13px !important;
  }
}