/* MonEnseignant — Plateforme (annuaires façon Tenors) — s'appuie sur les tokens Aurora de style.css */

/* ============================ Layout global ============================ */
body.platform {
  background: var(--bg-aurora, linear-gradient(135deg, #f0fdfa 0%, #eef2ff 100%));
  min-height: 100vh;
}

/* ============================ Navbar unifiée ============================ */
/* La nav est injectée par platform.js en réutilisant les classes .navbar de style.css,
   afin d'être STRICTEMENT identique entre la page de garde et les autres pages.
   Ici on n'ajoute que : l'offset pour la navbar fixe, l'état actif, le menu mobile,
   et un bouton "Connexion / Mon espace" harmonisé. */
body.platform { padding-top: 72px; }
/* Cagnotte 💰 — pastille "argent" distincte (dégradé doré) dans la nav */
.navbar .btn.nav-cagnotte {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 45%, #34d399 120%);
  color: #1f2937; font-weight: 800; gap: 6px;
  box-shadow: 0 6px 18px -6px rgba(245, 158, 11, 0.55);
}
.navbar .btn.nav-cagnotte:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -6px rgba(245, 158, 11, 0.7); background-position: right center; }
.navbar .nav-links a.active { color: var(--accent-2); }
.navbar .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
@media (max-width: 992px) {
  .navbar .nav-links.active {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; padding: 18px 24px; gap: 14px;
    box-shadow: var(--shadow-md); border-bottom: 1px solid var(--gray-100);
  }
}

/* ============================ En-tête + barre de filtres ============================ */
.pf-head { max-width: 1360px; margin: 0 auto; padding: 28px 24px 0; }
.pf-head h1 { font-size: 1.55rem; margin-bottom: 18px; }
.pf-filters {
  display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap;
  background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.9);
  padding: 12px; border-radius: 16px; box-shadow: var(--shadow-sm);
}
.pf-field {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 12px;
  padding: 4px 6px 4px 4px; flex: 1; min-width: 200px;
}
.pf-field .pf-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-gradient); color: #fff;
  padding: 8px 12px; border-radius: 9px; font-weight: 700; font-size: 0.85rem; white-space: nowrap;
}
.pf-field select, .pf-field input {
  border: none; outline: none; background: transparent;
  font-size: 0.95rem; font-family: inherit; color: var(--text); width: 100%; padding: 8px 6px;
}
.pf-field.keywords { flex: 1.4; }
.pf-more {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-gradient); color: #fff;
  padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 0.9rem;
  cursor: pointer; border: none; white-space: nowrap;
}
.pf-more:hover { box-shadow: var(--shadow-glow); }
.pf-count { max-width: 1360px; margin: 0 auto; padding: 22px 24px 8px; font-weight: 800; color: var(--gray-900); font-size: 1.05rem; }

/* ============================ Grille de résultats (identité Aurora) ============================ */
.pf-grid {
  max-width: 1360px; margin: 0 auto; padding: 8px 24px 64px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}

/* Carte : signature = liseré dégradé en haut qui se déploie au survol + cœur flottant */
.pf-card {
  position: relative; background: #fff;
  border-radius: 20px; border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  padding: 22px 22px 20px;
  display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s;
}
.pf-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent-gradient);
  border-radius: 20px 20px 0 0;
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.pf-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pf-card:hover::before { transform: scaleX(1); }

.pf-card-head { display: flex; align-items: center; gap: 14px; }
.pf-ava {
  width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
  background: var(--accent-gradient); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 6px 18px -6px rgba(99,102,241,0.55);
}
.pf-id { min-width: 0; }
.pf-card-title { font-size: 1.12rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.02em; }

/* Localisation : pin coloré (turquoise→indigo), PAS le gris façon annuaire */
.pf-loc {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 3px;
  color: var(--accent-2); font-weight: 600; font-size: 0.85rem;
}
.pf-loc svg { color: var(--accent); }

/* Méta : chips inline (dispo / vérifié / modalité / date) */
.pf-metarow { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 2px; align-items: center; }
.pf-avail {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(20,184,166,0.1); color: #0f766e;
  padding: 5px 11px; border-radius: 8px; font-weight: 700; font-size: 0.8rem;
}
.pf-verified {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(99,102,241,0.09); color: var(--accent-2);
  padding: 5px 11px; border-radius: 8px; font-weight: 700; font-size: 0.8rem;
}
.pf-mode {
  border: 1.5px solid rgba(20,184,166,0.4); color: #0f766e;
  padding: 4px 11px; border-radius: 8px; font-weight: 600; font-size: 0.8rem;
}
.pf-date { color: var(--gray-400); font-size: 0.8rem; font-weight: 500; }
.pf-views {
  background: rgba(99,102,241,0.08); color: var(--accent-2);
  padding: 4px 10px; border-radius: 8px; font-size: 0.78rem; font-weight: 700;
}

/* Tags : chips CONTOUR uniformes (≠ pastilles multicolores) */
.pf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pf-tag {
  padding: 5px 13px; border-radius: 50px; font-size: 0.8rem; font-weight: 600;
  background: transparent; color: var(--accent-2);
  border: 1.5px solid rgba(99,102,241,0.25); transition: var(--transition);
}
.pf-tag:hover { background: rgba(99,102,241,0.07); border-color: rgba(99,102,241,0.45); }

/* Cœur favori flottant */
.pf-fav {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: 1px solid var(--gray-100);
  color: var(--gray-400); font-size: 1.05rem; cursor: pointer;
  display: grid; place-items: center; transition: var(--transition); box-shadow: var(--shadow-sm);
}
.pf-fav:hover { color: #ec4899; transform: scale(1.1); }
.pf-fav.active { color: #ec4899; background: #fdf2f8; border-color: #fbcfe8; }

/* Pied : bouton principal dégradé + bouton aperçu carré (≠ 3 boutons identiques) */
.pf-foot { display: flex; gap: 10px; margin-top: auto; padding-top: 18px; }
.pf-view {
  flex: 1; text-align: center; padding: 12px 14px; border-radius: 12px;
  background: var(--accent-gradient); color: #fff; font-weight: 700; font-size: 0.9rem;
  box-shadow: var(--shadow); transition: var(--transition);
}
.pf-view:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.pf-preview {
  width: 46px; flex-shrink: 0; border-radius: 12px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--gray-200); color: var(--accent-2);
  font-size: 1.05rem; transition: var(--transition);
}
.pf-preview:hover { border-color: var(--accent); background: rgba(20,184,166,0.06); }

/* Offres */
.pf-offer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* Établissements : bannière dégradée + logo pastille, texte en dessous (≠ Tenors) */
.pf-school { padding: 0; overflow: hidden; }
.pf-school::before { display: none; }
.pf-banner {
  height: 128px; background: var(--accent-gradient);
  position: relative; background-size: cover; background-position: center;
}
.pf-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(45,212,191,0.35), rgba(99,102,241,0.55)); }
.pf-school-logo {
  position: absolute; left: 20px; bottom: -22px; z-index: 1;
  width: 52px; height: 52px; border-radius: 14px; background: #fff; color: var(--accent-2);
  display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow-md);
}
.pf-school-body { padding: 34px 22px 4px; }
.pf-school .pf-foot { padding: 16px 22px 20px; }

/* Modules : épine dégradée à gauche */
.pf-module { padding-left: 26px; }
.pf-module::before { display: none; }
.pf-module-strip { position: absolute; left: 0; top: 16px; bottom: 16px; width: 5px; border-radius: 0 5px 5px 0; background: var(--accent-gradient); }

/* États */
.pf-loading, .pf-empty { grid-column: 1/-1; text-align: center; padding: 70px 20px; color: var(--text-muted); }
.pf-spinner { width: 40px; height: 40px; border: 3px solid var(--gray-200); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
.pf-empty-icon { font-size: 3rem; opacity: 0.5; margin-bottom: 12px; }
.pf-loadmore { max-width: 1360px; margin: 0 auto 60px; padding: 0 24px; text-align: center; }

/* ============================ Auth (connexion / inscription) ============================ */
.auth-wrap { max-width: 460px; margin: 60px auto; padding: 0 20px; }
.auth-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-100); padding: 40px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 26px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.auth-field input, .auth-field select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--gray-200); border-radius: 11px;
  font-size: 0.95rem; font-family: inherit; transition: var(--transition);
}
.auth-field input:focus, .auth-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(20,184,166,0.12); }
.role-picker { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.role-opt {
  border: 1.5px solid var(--gray-200); border-radius: 12px; padding: 14px 8px; text-align: center;
  cursor: pointer; transition: var(--transition); font-size: 0.85rem; font-weight: 600; color: var(--gray-600);
}
.role-opt .ic { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.role-opt:hover { border-color: var(--accent); }
.role-opt.active { border-color: transparent; background: var(--accent-gradient); color: #fff; box-shadow: var(--shadow-glow); }
.auth-status { margin-top: 14px; padding: 12px; border-radius: 10px; text-align: center; display: none; font-weight: 500; }
.auth-status.error { display: block; background: #fee2e2; color: #991b1b; }
.auth-status.success { display: block; background: #ccfbf1; color: #115e59; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--text-muted); font-size: 0.9rem; }
.auth-alt a { color: var(--accent-2); font-weight: 600; }

/* ============================ Bouton "Voir plus" ============================ */
.pf-loadmore { max-width: 1360px; margin: 0 auto 60px; padding: 0 24px; text-align: center; }
.pf-more-btn {
  padding: 13px 28px; border-radius: 12px; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 0.95rem; color: var(--accent-2);
  background: #fff; border: 1.5px solid rgba(99,102,241,0.3); transition: var(--transition);
}
.pf-more-btn:hover { background: rgba(99,102,241,0.06); border-color: var(--accent); transform: translateY(-2px); }

/* ============================ Modal Aperçu ============================ */
.mp-overlay {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(15,23,42,0.5); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
.mp-overlay.open { display: flex; }
.mp-card {
  background: #fff; border-radius: 22px; padding: 32px; max-width: 480px; width: 100%;
  position: relative; box-shadow: var(--shadow-xl); animation: modalIn 0.3s cubic-bezier(0.16,1,0.3,1);
}
.mp-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--gray-100); color: var(--gray-500); font-size: 1.3rem; cursor: pointer;
}
.mp-close:hover { background: var(--gray-200); }
.mp-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.mp-loc { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; }
.mp-card p { color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.mp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mp-tags span { padding: 5px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; color: var(--accent-2); border: 1.5px solid rgba(99,102,241,0.25); }
.mp-cta {
  display: inline-block; margin-top: 4px; padding: 12px 22px; border-radius: 12px;
  background: var(--accent-gradient); color: #fff; font-weight: 700; box-shadow: var(--shadow);
}
.mp-cta:hover { box-shadow: var(--shadow-glow); }

/* ============================ Page détail ============================ */
.detail-wrap { max-width: 860px; margin: 28px auto 80px; padding: 0 24px; }
.detail-back { display: inline-block; margin-bottom: 16px; color: var(--accent-2); font-weight: 600; }
.detail-card { background: #fff; border-radius: 22px; border: 1px solid var(--gray-100); box-shadow: var(--shadow-md); padding: 36px; position: relative; overflow: hidden; }
.detail-banner { height: 120px; margin: -36px -36px 20px; background: var(--accent-gradient); }
.detail-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.detail-ava { width: 68px; height: 68px; border-radius: 18px; background: var(--accent-gradient); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; box-shadow: var(--shadow-glow); flex-shrink: 0; }
.detail-head h1 { font-size: 1.7rem; }
.detail-sub { color: var(--accent-2); font-weight: 600; margin-top: 4px; }
.detail-bio { color: var(--text); line-height: 1.7; margin: 14px 0; }
.detail-h2 { font-size: 1.15rem; margin: 24px 0 12px; }
.detail-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.detail-list li { padding: 14px 16px; background: var(--bg-aurora); border-radius: 12px; }
.detail-muted { color: var(--gray-400); }

/* ============================ Responsive ============================ */
@media (max-width: 1100px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-field { min-width: 100%; }
  .role-picker { grid-template-columns: 1fr; }
}
