/* =========================================================
   TripCooking — PROFILE CSS (tc-profile)
   - Ne redéfinit pas :root / header / footer
   - Cover en haut + stats + actions
   - 3 colonnes dessous
   - Cards / nav / composer / feed "recipe post"
   ========================================================= */

/* ---------- Scope global profil ---------- */
.tc-profile{
  max-width: 1560px;          /* adapte si tu as déjà --maxw */
  margin: 0 auto;
  padding: 18px 22px 34px;
}

/* ---------- COVER / HERO ---------- */
.tc-cover{
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(118,96,214,.18);
  background: rgba(255,255,255,.72);
  box-shadow: 0 22px 60px rgba(28,12,66,.12);
  margin-bottom: 18px;
}

.tc-cover__bg{
  height: 260px;
  position: relative;
}
.tc-cover__bg img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.03);
}

.tc-cover__overlay{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 360px at 18% 12%, rgba(161,123,255,.30), transparent 60%),
    radial-gradient(900px 420px at 88% 20%, rgba(109,77,255,.18), transparent 55%),
    linear-gradient(180deg, rgba(18,10,40,.00), rgba(18,10,40,.12));
  pointer-events: none;
}

.tc-cover__content{
  position: relative;
  padding: 16px 16px 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.00), rgba(255,255,255,.80) 28%, rgba(255,255,255,.92));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tc-cover__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: -46px; /* remonte l'identité sur la cover */
}

/* identité */
.tc-cover__identity{
  display: flex;
  gap: 14px;
  align-items: flex-end;
  min-width: 0;
}

.tc-avatar{
  width: 92px;
  height: 92px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(118,96,214,.22);
  box-shadow: 0 14px 30px rgba(28,12,66,.12);
  background: rgba(255,255,255,.86);
}
.tc-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* bloc meta */
.tc-id{
  min-width: 0;
  padding-bottom: 6px;
}

.tc-id__name{
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.4px;
  font-weight: 980;
  color: rgba(30,22,51,.96);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tc-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 12px;
  border: 1px solid rgba(118,96,214,.18);
  background: rgba(255,255,255,.82);
}
.tc-badge--verified{
  color: rgba(55,32,125,.98);
  background: rgba(109,77,255,.12);
  border-color: rgba(109,77,255,.22);
}
.tc-badge--soft{
  color: rgba(55,32,125,.98);
  background: rgba(109,77,255,.10);
  border-color: rgba(109,77,255,.18);
}

/* sous-ligne */
.tc-id__meta{
  margin-top: 6px;
  color: rgba(30,22,51,.62);
  font-weight: 850;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tc-handle{
  color: rgba(55,32,125,.92);
  font-weight: 950;
}
.tc-dot{ opacity: .45; }

.tc-bio{
  margin: 10px 0 0;
  color: rgba(30,22,51,.70);
  font-weight: 780;
  max-width: 62ch;
}

/* tags */
.tc-tags{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tc-tag{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(118,96,214,.16);
  background: rgba(255,255,255,.82);
  font-weight: 950;
  color: rgba(30,22,51,.78);
}

/* actions */
.tc-cover__actions{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 46px; /* aligne visuellement avec le nom */
}

.tc-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(118,96,214,.16);
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 22px rgba(28,12,66,.06);
  font-weight: 950;
  color: rgba(30,22,51,.86);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms cubic-bezier(.2,.8,.2,1);
}
.tc-btn:hover{ transform: translateY(-1px); box-shadow: 0 14px 30px rgba(28,12,66,.10); }

.tc-btn--primary{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(109,77,255,.98), rgba(161,123,255,.98));
  box-shadow: 0 16px 30px rgba(109,77,255,.22);
}
.tc-btn--ghost{
  background: rgba(255,255,255,.70);
}

/* stats */
.tc-cover__stats{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tc-stat{
  border-radius: 22px;
  border: 1px solid rgba(118,96,214,.14);
  background: rgba(255,255,255,.84);
  box-shadow: 0 10px 22px rgba(28,12,66,.06);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.tc-stat__num{
  font-size: 18px;
  font-weight: 980;
  color: rgba(30,22,51,.96);
}
.tc-stat__label{
  font-weight: 850;
  color: rgba(30,22,51,.62);
}

/* ---------- GRID 3 COLONNES ---------- */
.tc-profileGrid{
  display: grid;
  grid-template-columns: 340px minmax(320px, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

/* colonnes */
.tc-left, .tc-right{
  display: grid;
  gap: 16px;
}
.tc-center{
  display: grid;
  gap: 16px;
  min-width: 0;
}

/* ---------- Cards génériques ---------- */
.tc-card{
  border: 1px solid rgba(118,96,214,.18);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(28,12,66,.12);
  padding: 16px;
}

.tc-card__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.tc-card__title{
  margin: 0;
  font-size: 16px;
  font-weight: 980;
  letter-spacing: .2px;
  color: rgba(30,22,51,.92);
}
.tc-card__sub{
  margin-top: 4px;
  color: rgba(30,22,51,.62);
  font-weight: 750;
  font-size: 13px;
  max-width: 65ch;
}
.tc-card__link{
  font-weight: 950;
  color: rgba(109,77,255,.95);
  white-space: nowrap;
}

/* ---------- Navigation gauche ---------- */
.tc-nav{
  display: grid;
  gap: 10px;
  padding-top: 6px;
}
.tc-nav__item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  color: rgba(30,22,51,.82);
  font-weight: 900;
  transition: background 220ms cubic-bezier(.2,.8,.2,1), transform 220ms cubic-bezier(.2,.8,.2,1);
}
.tc-nav__item:hover{
  background: rgba(255,255,255,.70);
  border-color: rgba(118,96,214,.12);
  transform: translateY(-1px);
}
.tc-nav__item.is-active{
  background: rgba(109,77,255,.12);
  border-color: rgba(109,77,255,.22);
  color: rgba(55,32,125,.98);
  font-weight: 980;
}

/* ---------- Mini list (recettes gauche) ---------- */
.tc-miniList{
  display: grid;
  gap: 10px;
}
.tc-miniRow{
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(118,96,214,.14);
  background: rgba(255,255,255,.84);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms cubic-bezier(.2,.8,.2,1);
}
.tc-miniRow:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(28,12,66,.10);
}
.tc-flag{
  width: 46px;
  height: 46px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(118,96,214,.16);
  background: rgba(109,77,255,.08);
}
.tc-miniRow__txt{ min-width: 0; }
.tc-miniRow__name{
  font-weight: 950;
  color: rgba(30,22,51,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-miniRow__sub{
  font-size: 12px;
  font-weight: 850;
  color: rgba(30,22,51,.60);
}
.tc-miniRow__cta{
  font-weight: 950;
  color: rgba(109,77,255,.95);
}

/* ---------- Composer ---------- */
.tc-composer .tc-card__head{
  margin-bottom: 10px;
}
.tc-composer__mode{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tc-pillBtn{
  border: 1px solid rgba(118,96,214,.16);
  background: rgba(255,255,255,.86);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 950;
  color: rgba(30,22,51,.76);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.tc-pillBtn:hover{ transform: translateY(-1px); }
.tc-pillBtn.is-active{
  background: rgba(109,77,255,.14);
  border-color: rgba(109,77,255,.22);
  color: rgba(55,32,125,.98);
}

/* ---------- Recipe Post (feed) ---------- */
.tc-recipePost{
  border: 1px solid rgba(118,96,214,.18);
  background: rgba(255,255,255,.86);
  border-radius: 28px;
  box-shadow: 0 14px 30px rgba(28,12,66,.10);
  overflow: hidden;
}

.tc-recipePost__top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
}

.tc-recipePost__who{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tc-recipePost__miniAvatar{
  width: 38px;
  height: 38px;
  border-radius: 16px;
  border: 1px solid rgba(118,96,214,.16);
  object-fit: cover;
  background: rgba(109,77,255,.08);
}
.tc-recipePost__name{
  font-weight: 950;
  color: rgba(30,22,51,.92);
  line-height: 1.1;
}
.tc-recipePost__meta{
  font-size: 12px;
  font-weight: 850;
  color: rgba(30,22,51,.62);
}

.tc-ghostDots{
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(118,96,214,.16);
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 20px rgba(28,12,66,.06);
  font-size: 20px;
  line-height: 1;
  color: rgba(55,32,125,.98);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.tc-ghostDots:hover{ transform: translateY(-1px); }

.tc-recipePost__title{
  padding: 0 14px 10px;
  font-weight: 980;
  font-size: 16px;
  color: rgba(30,22,51,.94);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tc-recipePost__desc{
  padding: 0 14px 12px;
  margin: 0;
  color: rgba(30,22,51,.72);
  font-weight: 780;
  line-height: 1.45;
}

.tc-recipePost__media{
  display: block;
  position: relative;
  border-top: 1px solid rgba(118,96,214,.12);
  border-bottom: 1px solid rgba(118,96,214,.12);
  background: rgba(109,77,255,.06);
}
.tc-recipePost__media img{
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.tc-recipePost__chips{
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 12px;
}
.tc-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 950;
  font-size: 12px;
  color: rgba(30,22,51,.88);
}

.tc-recipePost__footer{
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.tc-action{
  border: 1px solid rgba(118,96,214,.16);
  background: rgba(255,255,255,.86);
  padding: 10px 12px;
  border-radius: 18px;
  font-weight: 950;
  color: rgba(30,22,51,.80);
  box-shadow: 0 10px 20px rgba(28,12,66,.06);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms cubic-bezier(.2,.8,.2,1);
}
.tc-action:hover{ transform: translateY(-1px); box-shadow: 0 14px 30px rgba(28,12,66,.10); }

.tc-action--primary{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(109,77,255,.98), rgba(161,123,255,.98));
  box-shadow: 0 16px 30px rgba(109,77,255,.20);
}

/* ---------- utilitaires ---------- */
.muted{
  color: rgba(30,22,51,.62);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px){
  .tc-profileGrid{
    grid-template-columns: 320px minmax(320px, 1fr);
  }
  .tc-right{ display: none; }
}

@media (max-width: 900px){
  .tc-profile{
    padding: 14px 16px 28px;
  }
  .tc-cover__top{
    flex-direction: column;
    align-items: stretch;
    margin-top: -52px;
  }
  .tc-cover__actions{
    padding-top: 0;
    justify-content: flex-start;
  }
  .tc-profileGrid{
    grid-template-columns: 1fr;
  }
  .tc-left{ order: 2; }
  .tc-center{ order: 1; }
  .tc-cover__bg{ height: 220px; }
  .tc-recipePost__media img{ height: 280px; }
}

@media (max-width: 560px){
  .tc-id__name{ font-size: 22px; }
  .tc-avatar{ width: 80px; height: 80px; border-radius: 24px; }
  .tc-cover__stats{ grid-template-columns: 1fr; }
  .tc-recipePost__media img{ height: 240px; }
  .tc-recipePost__footer{
    justify-content: flex-start;
  }
}