/* =======================================================
 *   PAGE CONTRIBUTEUR (DETAIL)
 *   - Compatible layout internal.php (site-main > .container)
 *   - Fond plein écran + dark/light partout
 *   ======================================================= */

:root{
  --font-sans: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --accent: #ff6233;
  --radius: 18px;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;

  --text: #111827;
  --muted: #6b7280;

  --border: rgba(15, 23, 42, 0.12);

  --shadow-1: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-3: 0 18px 45px rgba(15, 23, 42, 0.16);
}

:root[data-theme="dark"]{
  --bg: #0f131b;
  --surface: #0b0e14;
  --surface-2: #0f131b;

  --text: #e8edf5;
  --muted: #9aa4b2;

  --border: #1c2230;

  --shadow-1: 0 6px 16px rgba(0,0,0,.35);
  --shadow-3: 0 18px 42px rgba(0,0,0,.45);
}

/* FULL WIDTH BACKGROUND (layout imposé) */
html, body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light dark;
}
.site-main{ background: var(--bg); }
.internal-header-wrapper,
.internal-footer-wrapper{ background: var(--bg); }

/* Zone de page (à l'intérieur du container du layout) */
.contrib-detail-page{
  background: transparent;
  padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(2.5rem, 5vw, 4rem);
  min-height: 60vh;
}

/* Header profil */
.profile-header{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}

.profile-photo img{
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  background: var(--surface);
}

/* Typo */
.profile-name{
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  font-weight: 900;
  margin: 0 0 .55rem;
  letter-spacing: -0.01em;
}

.profile-meta{
  margin: .1rem 0 1rem;
  color: var(--muted);
  font-weight: 700;
}
.profile-meta .sep{
  margin: 0 .45rem;
  color: color-mix(in srgb, var(--muted) 45%, transparent);
}

/* Quote */
.profile-quote{
  margin: 0 0 1.1rem;
  padding: .35rem 0 .35rem 1rem;
  border-left: 4px solid var(--accent);
  font-style: italic;
  color: var(--text);
}

/* Tags */
.profile-tags{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1rem;
}
.profile-tags .tag{
  display: inline-flex;
  align-items: center;
  padding: .38rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
  font-weight: 800;
}
.profile-tags .tag-muted{ opacity: .85; }

/* Boutons */
.btn{
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--border);

  display: inline-flex;
  align-items: center;
  gap: .55rem;

  padding: .58rem .95rem;
  border-radius: 999px;
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);

  font-weight: 800;
  font-size: .95rem;
  line-height: 1;
  text-decoration: none;

  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .06s ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
  text-decoration: none;
}
.btn:active{
  transform: translateY(0);
}
.btn-outline{
  --btn-bg: transparent;
  --btn-fg: var(--muted);
  --btn-bd: var(--border);
}
.btn-outline:hover{
  --btn-bg: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
  --btn-fg: var(--text);
  --btn-bd: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.ih-cta{
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  --btn-bd: color-mix(in srgb, var(--accent) 60%, var(--border));
}
.ih-cta:hover{
  --btn-bg: color-mix(in srgb, var(--accent) 12%, transparent);
  --btn-bd: color-mix(in srgb, var(--accent) 75%, var(--border));
}
.profile-actions{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

/* Bio */
.prose{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-1);
  line-height: 1.75;
  font-size: 1.02rem;
}
.prose h2, .prose h3, .prose h4{
  margin: 1.05rem 0 .45rem;
  line-height: 1.25;
}
.prose p{ margin: .9rem 0; }
.prose ul{ padding-left: 1.2rem; margin: .6rem 0; }
.prose li{ margin: .25rem 0; }
.prose a{ color: inherit; text-decoration: underline; text-underline-offset: .15em; }

/* Responsive */
@media (max-width: 860px){
  .profile-header{ grid-template-columns: 1fr; }
  .profile-photo img{
    max-width: 100%;
    aspect-ratio: 16 / 12;
    border-radius: 18px;
  }
}
