/* ============================================================
   FinSparring — feuille de style (le "design" du site)
   Palette : bleu nuit "finance" + accent or doux + fond creme.
   ============================================================ */

:root {
  --ink:      #0e1b2e;   /* bleu nuit, texte principal */
  --ink-soft: #44546b;   /* texte secondaire */
  --navy:     #102a43;   /* bandeaux fonces */
  --gold:     #b8893b;   /* accent or */
  --gold-dk:  #9a6f28;
  --cream:    #f6f4ef;   /* fond de page */
  --white:    #ffffff;
  --line:     #e7e2d8;   /* bordures discretes */
  --shadow:   0 10px 30px rgba(16, 42, 67, 0.08);
  --radius:   16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

.container { width: min(1080px, 92vw); margin: 0 auto; }
.section { padding: 56px 0; }
.narrow { max-width: 680px; }

a { color: inherit; text-decoration: none; }

/* --- En-tete --------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--navy); color: var(--white);
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 16px;
}
.brand-name { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; }
.brand-by { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: var(--gold-dk); letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--ink-soft); font-weight: 500; }
.nav-link:hover { color: var(--ink); }

/* --- Boutons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s ease;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: #0a1f33; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-dk); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-gold { background: var(--gold); color: #1c1304; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-dk); color: #fff; transform: translateY(-1px); }

/* --- Messages flash -------------------------------------------------- */
.flash {
  margin: 18px 0; padding: 14px 18px; border-radius: 12px;
  background: #eef6ee; border: 1px solid #cfe6cf; color: #2f5d3a;
}

/* --- Hero ------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(184,137,59,.18), transparent 60%),
    linear-gradient(160deg, #0e1b2e 0%, #102a43 60%, #16344f 100%);
  color: #eaf1f8; padding: 84px 0 76px;
}
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12px;
  color: var(--gold); font-weight: 600; margin-bottom: 18px;
}
.hero-title {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(30px, 5vw, 52px); line-height: 1.08; color: #fff;
}
.hero-sub { margin: 22px 0 32px; max-width: 620px; font-size: 18px; color: #c4d2e1; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn-primary:hover { background: #f0ece2; color: var(--navy); transform: translateY(-1px); }
.hero .btn-ghost { color: #eaf1f8; border-color: rgba(255,255,255,.25); }
.hero .btn-ghost:hover { border-color: var(--gold); color: #fff; }

/* --- Filtres --------------------------------------------------------- */
.filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: var(--white); padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 22px;
}
.filter-search { flex: 1 1 260px; }
.filters input, .filters select {
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fbfaf7; color: var(--ink);
}
.filters input:focus, .filters select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.filter-reset { color: var(--ink-soft); font-size: 14px; }
.filter-reset:hover { color: var(--gold-dk); }
.results-count { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }

/* --- Grille de cartes ------------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(16,42,67,.14); }
.card-top { display: flex; gap: 14px; align-items: center; }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #1d4669);
  color: #fff; font-weight: 600; font-size: 18px;
}
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.card-name { font-size: 18px; font-family: 'Fraunces', serif; font-weight: 600; }
.card-school { color: var(--ink-soft); font-size: 14px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: #f0ece2; color: var(--ink-soft); border: 1px solid var(--line);
}
.badge-cible { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge-recherche { background: #f6efe1; color: var(--gold-dk); border-color: #e7d8bd; }
.badge-tech { background: #eef3f8; color: var(--navy); border-color: #d8e2ec; }
.card-obj { font-size: 14px; color: var(--ink); }
.card-bio { font-size: 14px; color: var(--ink-soft); }
.card-cta { margin-top: auto; color: var(--gold-dk); font-weight: 600; font-size: 14px; }

.empty { text-align: center; padding: 60px 0; color: var(--ink-soft); display: grid; gap: 16px; justify-items: center; }

/* --- Page profil ----------------------------------------------------- */
.back-link { color: var(--ink-soft); font-weight: 500; display: inline-block; margin-bottom: 22px; }
.back-link:hover { color: var(--gold-dk); }
.profil-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow);
}
.profil-head { display: flex; gap: 22px; align-items: center; margin-bottom: 28px; }
.profil-name { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; }
.profil-meta { color: var(--ink-soft); margin: 4px 0 12px; }
.profil-block { margin-bottom: 24px; }
.profil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.block-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gold-dk); margin-bottom: 8px; font-weight: 600;
}
.contact-box {
  margin-top: 12px; padding: 24px; border-radius: 12px;
  background: var(--cream); border: 1px solid var(--line);
}
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Formulaire ------------------------------------------------------ */
.form-title { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 600; margin-bottom: 8px; }
.form-intro { color: var(--ink-soft); margin-bottom: 28px; }
.form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px;
}
.form-row { display: flex; flex-direction: column; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 7px; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--gold); border-color: var(--gold);
}
.form-section-title { font-family: 'Fraunces', serif; font-size: 20px; margin-top: 10px; }
.form-hint { color: var(--ink-soft); font-size: 14px; margin-top: -8px; }
.form button { align-self: flex-start; margin-top: 6px; }

/* --- Encart "tuteurs en poste" (CTA Calendly) ------------------------ */
.cta-pro {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background:
    radial-gradient(600px 240px at 90% 0%, rgba(184,137,59,.18), transparent 60%),
    linear-gradient(135deg, #0e1b2e, #16344f);
  color: #eaf1f8; padding: 34px 38px; border-radius: var(--radius);
  margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid rgba(184,137,59,.30);
}
.cta-pro-text { max-width: 660px; }
.cta-pro-eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 11px;
  color: var(--gold); font-weight: 600; margin-bottom: 10px;
}
.cta-pro-title { font-family: 'Fraunces', serif; font-size: 24px; color: #fff; margin-bottom: 10px; }
.cta-pro p { color: #c4d2e1; }
.cta-pro strong { color: #fff; }

/* --- Pied de page ---------------------------------------------------- */
.site-footer {
  background: var(--navy); color: #b9c7d6; padding: 28px 0; margin-top: 40px;
  font-size: 14px; text-align: center;
}

.btn-danger { background: transparent; color: #b3261e; border-color: #e6c4c1; }
.btn-danger:hover { background: #b3261e; color: #fff; border-color: #b3261e; }

/* --- "Comment ca marche" (accueil public) ---------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.step-num {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--navy); color: #fff; font-family: 'Fraunces', serif; font-weight: 600;
  margin-bottom: 14px;
}
.step h3 { font-family: 'Fraunces', serif; font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* --- Entete de l'annuaire ------------------------------------------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-title { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; }
.page-sub { color: var(--ink-soft); margin-top: 4px; }

/* --- Boutons "modifier / supprimer" sur sa fiche -------------------- */
.owner-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.owner-actions form { margin: 0; }

/* --- Lien bas des formulaires auth --------------------------------- */
.auth-switch { text-align: center; margin-top: 18px; color: var(--ink-soft); }
.auth-switch a { color: var(--gold-dk); font-weight: 600; }

/* --- Responsive (mobile) -------------------------------------------- */
@media (max-width: 640px) {
  .form-row-2, .profil-grid { grid-template-columns: 1fr; }
  .profil-head { flex-direction: column; text-align: center; align-items: center; }
  .steps { grid-template-columns: 1fr; }
}
