/* ============================================================
   JORESSO — components.css
   BuddyPress skin, Cloud page, MM form, Admin, Misc
   ============================================================ */

/* ---- MOBILE NAV ---- */
@media (max-width: 768px) {
  #nav-toggle { display: flex !important; }
  .main-nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(13,27,62,.98);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: .2rem;
    z-index: 999;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .main-nav.open { display: flex; }
  .main-nav li { list-style: none; }
  .main-nav a { padding: .7rem .5rem; font-size: .95rem; display: block; }
}

/* ============================================================
   BUDDYPRESS — SKIN JORESSO
   ============================================================ */
#buddypress .activity-list .activity-item,
#buddypress .groups-list .group-item,
#buddypress .members-list .member-item {
  background: var(--j-white);
  border: 1px solid var(--j-grey-200);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  padding: 1.2rem 1.4rem;
  transition: var(--transition);
}
#buddypress .activity-list .activity-item:hover,
#buddypress .groups-list .group-item:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--j-sapphire);
}
#buddypress .activity-header a,
#buddypress .groups-list .group-item h3 a,
#buddypress .members-list .member-item h3 a {
  color: var(--j-sapphire);
  font-weight: 600;
}
#buddypress .activity-header a:hover { color: var(--j-navy); }
#buddypress .generic-button a,
#buddypress .comment-reply-link,
#buddypress div.activity-meta a {
  background: linear-gradient(135deg, var(--j-sapphire), var(--j-sky));
  color: var(--j-white) !important;
  border: none !important;
  border-radius: var(--radius-full) !important;
  padding: .4rem 1rem !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}
#buddypress .generic-button a:hover { opacity: .88; }
#buddypress #item-header { background: var(--j-light); border-radius: var(--radius-xl); padding: 2rem; margin-bottom: 1.5rem; }
#buddypress #item-header #item-meta { color: var(--j-grey-500); font-size: .85rem; }
#buddypress #profile-edit-form input[type=text],
#buddypress #profile-edit-form input[type=email],
#buddypress #profile-edit-form textarea,
#buddypress #profile-edit-form select {
  border: 1.5px solid var(--j-grey-200);
  border-radius: var(--radius-md);
  padding: .65rem 1rem;
  font-family: var(--font-body);
  width: 100%;
  transition: var(--transition);
}
#buddypress #profile-edit-form input:focus,
#buddypress #profile-edit-form textarea:focus {
  border-color: var(--j-sapphire);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26,75,222,.12);
}
#buddypress .bp-navitem a {
  border-radius: var(--radius-md) !important;
  font-size: .85rem !important;
  font-weight: 500 !important;
  color: var(--j-grey-500) !important;
  transition: var(--transition) !important;
}
#buddypress .bp-navitem.current a,
#buddypress .bp-navitem a:hover {
  background: rgba(26,75,222,.08) !important;
  color: var(--j-sapphire) !important;
}
#buddypress #whats-new-form textarea {
  border: 1.5px solid var(--j-grey-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  font-family: var(--font-body);
  width: 100%;
  resize: vertical;
}
#buddypress #whats-new-form textarea:focus {
  border-color: var(--j-sapphire);
  outline: none;
}
#buddypress #whats-new-submit input[type=submit] {
  background: linear-gradient(135deg, var(--j-sapphire), var(--j-sky));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: .6rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
#buddypress #whats-new-submit input[type=submit]:hover { opacity: .88; transform: translateY(-1px); }
/* Notifications BP */
#buddypress .bp-notifications-feedback { border-radius: var(--radius-md); }
/* Groups cover */
#buddypress #cover-image-container {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
}

/* ============================================================
   PAGE MON CLOUD
   ============================================================ */
.cloud-page-hero {
  background: linear-gradient(135deg, var(--j-navy), #0A2472);
  padding: 100px 0 60px;
  color: #fff;
  text-align: center;
}
.cloud-page-hero h1 { color: #fff; margin-bottom: .5rem; }
.cloud-page-hero p { color: rgba(255,255,255,.65); font-size: 1rem; }

.cloud-page-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}
.cloud-page-stat strong { display: block; font-size: 2rem; font-weight: 800; color: var(--j-mint); }
.cloud-page-stat span { font-size: .78rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }

.cloud-page-body { padding: 50px 0 80px; background: var(--j-grey-100); min-height: 60vh; }
.cloud-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.cloud-search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  background: var(--j-white);
  border: 1.5px solid var(--j-grey-200);
  border-radius: var(--radius-full);
  padding: .55rem 1.1rem;
  font-size: .88rem;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}
.cloud-search:focus { border-color: var(--j-sapphire); }

.cloud-view-toggle { display: flex; gap: .3rem; }
.view-toggle-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--j-grey-200);
  border-radius: var(--radius-md);
  background: var(--j-white);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.view-toggle-btn.active, .view-toggle-btn:hover {
  background: var(--j-sapphire);
  border-color: var(--j-sapphire);
  color: #fff;
}

.cloud-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.cloud-files-grid.list-view {
  grid-template-columns: 1fr;
}
.cloud-file-card {
  background: var(--j-white);
  border: 1px solid var(--j-grey-200);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.cloud-file-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--j-sapphire);
  transform: translateY(-3px);
}
.cloud-file-card .big-icon { font-size: 2.5rem; margin-bottom: .5rem; display: block; }
.cloud-file-card .file-name { font-size: .78rem; font-weight: 600; color: var(--j-navy); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cloud-file-card .file-meta { font-size: .68rem; color: var(--j-grey-500); margin-top: .2rem; }
.cloud-file-card .card-actions {
  position: absolute;
  top: 6px; right: 6px;
  display: flex; gap: 3px;
  opacity: 0;
  transition: var(--transition);
}
.cloud-file-card:hover .card-actions { opacity: 1; }
.card-action-btn {
  width: 24px; height: 24px;
  border: none; border-radius: 6px;
  background: rgba(13,27,62,.08);
  cursor: pointer;
  font-size: .72rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.card-action-btn:hover { background: var(--j-sapphire); color: #fff; }

/* Drop zone */
.cloud-dropzone {
  border: 2px dashed var(--j-grey-200);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--j-white);
  margin-bottom: 1.5rem;
}
.cloud-dropzone.drag-over {
  border-color: var(--j-sapphire);
  background: rgba(26,75,222,.04);
}
.cloud-dropzone .dz-icon { font-size: 3rem; margin-bottom: .75rem; opacity: .4; }
.cloud-dropzone p { color: var(--j-grey-500); font-size: .9rem; }
.cloud-dropzone strong { color: var(--j-sapphire); }

/* ============================================================
   PAGE PUBLICATIONS
   ============================================================ */
.pub-page-hero {
  background: linear-gradient(135deg, var(--j-navy), #0A2472);
  padding: 100px 0 50px;
  text-align: center;
}
.pub-page-hero h1 { color: #fff; margin-bottom: .5rem; }
.pub-page-hero p { color: rgba(255,255,255,.6); }

.pub-filters {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1.2rem 1.5rem;
  background: var(--j-white);
  border-bottom: 1px solid var(--j-grey-200);
  position: sticky;
  top: 64px;
  z-index: 100;
}
.filter-chip {
  padding: .35rem .9rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--j-grey-200);
  background: var(--j-white);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.filter-chip.active, .filter-chip:hover {
  background: var(--j-sapphire);
  border-color: var(--j-sapphire);
  color: #fff;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.pub-detail-card {
  background: var(--j-white);
  border: 1px solid var(--j-grey-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.pub-detail-card:hover { box-shadow: var(--shadow-card); border-color: var(--j-sapphire); transform: translateY(-3px); }
.pub-detail-card h3 { font-size: .95rem; margin-bottom: .4rem; line-height: 1.4; }
.pub-detail-card .authors { font-size: .78rem; color: var(--j-grey-500); margin-bottom: .6rem; }
.pub-detail-card .abstract { font-size: .8rem; color: var(--j-grey-500); line-height: 1.5; flex: 1; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pub-detail-card .card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.pub-doi { font-size: .7rem; color: var(--j-sapphire); font-family: var(--font-mono); }

/* ============================================================
   MODAL PAIEMENT ARTICLE
   ============================================================ */
.payment-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,62,.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}
.payment-modal-overlay.open { opacity: 1; pointer-events: auto; }
.payment-modal {
  background: var(--j-white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 440px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  transform: scale(.94) translateY(12px);
  transition: var(--transition);
}
.payment-modal-overlay.open .payment-modal { transform: scale(1) translateY(0); }
.payment-modal h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.payment-modal .article-ref { font-size: .8rem; color: var(--j-grey-500); margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--j-grey-200); }
.provider-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; margin-bottom: 1rem; }
.provider-option { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .75rem .5rem; border: 2px solid var(--j-grey-200); border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); font-size: .8rem; font-weight: 600; }
.provider-option:hover, .provider-option.selected { border-color: var(--j-sapphire); background: rgba(26,75,222,.05); color: var(--j-sapphire); }
.payment-modal input[type=tel] { width: 100%; border: 1.5px solid var(--j-grey-200); border-radius: var(--radius-md); padding: .7rem 1rem; font-family: var(--font-body); font-size: .9rem; margin-bottom: .75rem; outline: none; transition: var(--transition); }
.payment-modal input[type=tel]:focus { border-color: var(--j-sapphire); }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: var(--j-grey-100); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; }

/* ============================================================
   PAGE ABONNEMENT
   ============================================================ */
.subscription-page { padding: 80px 0; background: var(--j-light); min-height: 80vh; }
.current-plan-card {
  background: linear-gradient(135deg, var(--j-navy), #0A2472);
  border-radius: var(--radius-xl);
  padding: 2rem;
  color: #fff;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.current-plan-card h3 { color: #fff; font-size: 1rem; margin-bottom: .25rem; }
.current-plan-badge { background: var(--j-mint); color: var(--j-navy); font-size: .8rem; font-weight: 700; padding: .3rem .9rem; border-radius: var(--radius-full); }
.plan-expiry { font-size: .8rem; color: rgba(255,255,255,.55); }

/* ============================================================
   ADMIN SETTINGS PAGE
   ============================================================ */
.joresso-admin-wrap { max-width: 860px; margin: 20px auto; font-family: var(--font-body); }
.joresso-admin-header { background: linear-gradient(135deg, #0D1B3E, #0A2472); color: #fff; padding: 1.5rem 2rem; border-radius: 12px 12px 0 0; display: flex; align-items: center; gap: .75rem; }
.joresso-admin-header h1 { color: #fff; font-size: 1.4rem; margin: 0; }
.joresso-admin-tabs { display: flex; gap: 0; border-bottom: 2px solid #e2e8f0; margin-bottom: 1.5rem; }
.joresso-admin-tab { padding: .7rem 1.3rem; font-size: .88rem; font-weight: 600; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; color: #64748b; transition: all .2s; }
.joresso-admin-tab.active, .joresso-admin-tab:hover { color: #1A4BDE; border-bottom-color: #1A4BDE; }
.joresso-admin-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.joresso-admin-section h3 { font-size: 1rem; margin-bottom: 1.2rem; padding-bottom: .6rem; border-bottom: 1px solid #e2e8f0; color: #0D1B3E; }
.joresso-field-row { margin-bottom: 1rem; }
.joresso-field-row label { display: block; font-size: .82rem; font-weight: 600; color: #0D1B3E; margin-bottom: .3rem; }
.joresso-field-row .field-desc { font-size: .75rem; color: #64748b; margin-top: .2rem; }
.joresso-field-row input[type=text],
.joresso-field-row input[type=number],
.joresso-field-row input[type=tel],
.joresso-field-row textarea {
  width: 100%; padding: .6rem .9rem; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-family: inherit; font-size: .88rem; outline: none; transition: all .2s;
}
.joresso-field-row input:focus, .joresso-field-row textarea:focus { border-color: #1A4BDE; box-shadow: 0 0 0 3px rgba(26,75,222,.1); }
.joresso-save-btn { background: linear-gradient(135deg,#1A4BDE,#3B82F6); color: #fff; border: none; border-radius: 9999px; padding: .65rem 2rem; font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; }
.joresso-save-btn:hover { opacity: .88; transform: translateY(-1px); }

/* ============================================================
   NOTIFICATIONS TOAST
   ============================================================ */
#joresso-toasts {
  position: fixed; top: 80px; right: 24px; z-index: 9998;
  display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none;
}
.j-toast {
  background: var(--j-navy);
  color: #fff;
  padding: .75rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  pointer-events: auto;
  animation: fadeInUp .3s ease both;
  max-width: 320px;
  display: flex; align-items: center; gap: .5rem;
}
.j-toast.success { background: var(--j-mint); color: var(--j-white); }
.j-toast.error   { background: var(--j-coral); }
.j-toast.warning { background: var(--j-gold); color: var(--j-navy); }

/* ============================================================
   PROGRESS BAR UPLOAD
   ============================================================ */
.upload-progress {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--j-navy);
  padding: .6rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  z-index: 8000;
  transform: translateY(100%);
  transition: var(--transition);
}
.upload-progress.show { transform: translateY(0); }
.upload-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.upload-progress-fill { height: 100%; background: var(--j-mint); border-radius: 3px; transition: width .3s ease; }
.upload-progress-label { color: rgba(255,255,255,.8); font-size: .8rem; white-space: nowrap; }

/* ============================================================
   CARDS WP STANDARD
   ============================================================ */
.wp-block-image img, .wp-block-cover { border-radius: var(--radius-lg); }
.wp-block-button__link {
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
}
