/* =========================================
   TripCooking · profil.css (scopé à .corpsProfil)
   ========================================= */

/* ---- Page profil : variables + style de base ---- */
.corpsProfil{
  /* Variables LOCALES (ne touchent pas l’index) */
  --bg: #F1EFFF;            /* fond violet très clair */
  --card: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --accent: #7C3AED;        /* violet */
  --shadow-1: 0 14px 38px rgba(124,58,237,.10);
  --shadow-2: 0 4px 10px rgba(15,23,42,.06);
  --radius-lg: 18px;
  --radius-xl: 20px;
  --gap: 22px;

  padding: 18px 20px 28px;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

/* ---- Layout 3 colonnes ---- */
.corpsProfil .layout{
  display: grid;
  grid-template-columns: 310px 1fr 340px;  /* gauche / centre / droite */
  grid-template-areas: "left center right";
  gap: var(--gap);
  align-items: start;
}
.corpsProfil .left-col{   grid-area: left;   display:flex; flex-direction:column; gap:var(--gap); }
.corpsProfil .stack{      grid-area: center; display:flex; flex-direction:column; gap:var(--gap); }
.corpsProfil .right-col{  grid-area: right;  display:flex; flex-direction:column; gap:var(--gap); }
.corpsProfil .right-stack{ gap: var(--gap); }
.corpsProfil .spacer{ height: 32px; }

/* ---- Cartes / panneaux ---- */
.corpsProfil .card,
.corpsProfil .panel,
.corpsProfil .category-card,
.corpsProfil .post-card,
.corpsProfil .filter-bar{
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1), var(--shadow-2);
}
.corpsProfil .panel{ padding: 18px; }
.corpsProfil .panel h3{ margin: 0 0 8px; font-size: 22px; }
.corpsProfil .content{ color: var(--muted); }

/* ---- Barre info au-dessus du flux ---- */
.corpsProfil .filter-bar{
  padding: 14px 18px;
  display:flex; align-items:center;
}
.corpsProfil .filter-group label{ font-weight:700; display:block; margin-bottom:4px; }
.corpsProfil .muted{ color: var(--muted); }

/* ---- Colonne gauche : carte profil + onglets ---- */
.corpsProfil .user-card{ padding:18px; }
.corpsProfil .user-row{ display:flex; align-items:center; gap:14px; }
.corpsProfil .avatar{ width:56px; height:56px; border-radius:50%; overflow:hidden; background:#eee; flex:0 0 auto; }
.corpsProfil .avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.corpsProfil .user-name{ font-weight:700; font-size: 18px; }

.corpsProfil .user-tabs{ display:flex; gap:10px; margin-top:12px; }
.corpsProfil .tab{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 14px; border-radius:999px; text-decoration:none;
  background:#eee; color:#111; font-weight:700;
}
.corpsProfil .tab.is-active{ background: var(--accent); color: #fff; }

/* ---- Bloc “Recettes” (liste) ---- */
.corpsProfil .left-section{ padding:18px; }
.corpsProfil .section-title{ margin:0 0 12px; font-size:22px; }
.corpsProfil .recipes-list{
  list-style:none; margin:0; padding:0;
  display:flex; flex-direction:column; gap:12px;
}
.corpsProfil .recipes-list .empty{ color:var(--muted); }
.corpsProfil .recipe-link{
  display:grid; grid-template-columns: 40px 1fr; gap:10px;
  align-items:center; text-decoration:none; color:inherit;
  border-radius:14px; padding:6px;
}
.corpsProfil .recipe-link:hover{ background:#f6f6f7; }
.corpsProfil .thumb{ width:40px; height:40px; border-radius:10px; overflow:hidden; background:#eee; }
.corpsProfil .thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.corpsProfil .title{ font-weight:700; line-height:1.2; }

/* (si besoin : cartes mosaïque dans la colonne de gauche) */
.corpsProfil .nav-cards .category-card{ overflow:hidden; }
.corpsProfil .category-card .mosaic{
  display:grid; gap:6px; padding:6px;
  grid-template-columns: repeat(2,1fr);
  grid-template-rows: repeat(2,86px);
}
.corpsProfil .category-card .tile{ background:#f3f4f6; border-radius:14px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.corpsProfil .category-card img{ width:100%; height:100%; object-fit:cover; display:block; }
.corpsProfil .category-footer{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px 14px; }
.corpsProfil .category-title{ font-weight:800; font-size:15px; line-height:1.2; }
.corpsProfil .category-card .link{ color:var(--accent); text-decoration:none; font-weight:700; }

/* ---- Centre : carte “Thèmes suivis” + flux ---- */
.corpsProfil .followed-themes{ padding:18px 22px; }
.corpsProfil .followed-themes .card-title{
  margin:0 0 6px; font-weight:900; letter-spacing:-.01em;
  font-size: clamp(20px, 2.2vw, 26px);
}
.corpsProfil .chips{
  list-style:none; margin:8px 0 0; padding:0;
  display:flex; flex-wrap:wrap; gap:10px;
}
.corpsProfil .chips li a{
  display:inline-flex; align-items:center;
  padding:8px 12px; border-radius:999px;
  background:#f3f4f6; border:1px solid rgba(15,23,42,.06);
  text-decoration:none; color:#111; font-weight:700;
}
.corpsProfil .chips li a:hover{ background:#ede9fe; border-color:rgba(124,58,237,.35); color:var(--accent); }

/* ---- Post ---- */
.corpsProfil .post-card{ overflow:hidden; }
.corpsProfil .post-head{ padding: 14px 16px 0; }
.corpsProfil .post-meta{ display:flex; flex-direction:column; gap:2px; }
.corpsProfil .post-author{ font-weight:800; }
.corpsProfil .post-date{ color: var(--muted); font-size: 13px; }

.corpsProfil .post-title{
  display:block; padding:8px 16px 0;
  color:inherit; text-decoration:none;
  font-weight:900; font-size: clamp(22px, 2.4vw, 28px);
  line-height:1.15;
}
.corpsProfil .post-title:hover{ color: var(--accent); }
.corpsProfil .post-excerpt{ padding:6px 16px 0; color:#374151; line-height:1.6; }

/* Couverture : hauteur maîtrisée */
.corpsProfil .post-cover{
  margin-top:10px; overflow:hidden; display:block;
  border-bottom-left-radius:var(--radius-xl);
  border-bottom-right-radius:var(--radius-xl);
}
.corpsProfil .post-cover img{
  display:block; width:100%;
  height:300px;             /* desktop — modifie ici si besoin */
  object-fit:cover;
}

/* ---- Droite : abonnements ---- */
.corpsProfil .subs-card{ padding:18px; }
.corpsProfil .subs-card .card-title{ margin:0 0 6px; font-weight:900; font-size:22px; }
.corpsProfil .subs-list{
  list-style:none; margin:10px 0 0; padding:0;
  display:flex; flex-direction:column; gap:8px;
}
.corpsProfil .subs-list a{ text-decoration:none; color:#111; font-weight:700; }
.corpsProfil .subs-list a:hover{ color: var(--accent); }

.corpsProfil .subs .sub-item{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 0; border-bottom:1px solid rgba(15,23,42,.06);
}
.corpsProfil .btn-outline{
  background:#fff; border:1px solid rgba(15,23,42,.1);
  padding:8px 12px; border-radius:12px; text-decoration:none; color:#111; font-weight:600;
}
.corpsProfil .btn-outline:hover{ border-color: rgba(124,58,237,.35); color: var(--accent); }

/* ---- Focus / accessibilité ---- */
.corpsProfil a:focus-visible,
.corpsProfil button:focus-visible,
.corpsProfil .btn-outline:focus-visible,
.corpsProfil .tab:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(124,58,237,.25);
  border-radius: 12px;
}

/* ---- Responsive ---- */
@media (max-width: 1400px){
  .corpsProfil .layout{ grid-template-columns: 290px 1fr 320px; }
  .corpsProfil .category-card .mosaic{ grid-template-rows: repeat(2,82px); }
}
@media (max-width: 1100px){
  .corpsProfil .layout{
    grid-template-columns: 290px 1fr;
    grid-template-areas:
      "left center"
      "right center";
  }
}
@media (max-width: 820px){
  .corpsProfil .layout{
    grid-template-columns: 1fr;
    grid-template-areas:
      "center"
      "left"
      "right";
  }
  .corpsProfil .followed-themes{ padding:14px 16px; }
  .corpsProfil .category-card .mosaic{ grid-template-rows: repeat(2,76px); }
  .corpsProfil .post-cover img{ height:220px; }  /* mobile */
}
@media (max-width: 360px){
  .corpsProfil .category-card .mosaic{ grid-template-rows: repeat(2,68px); }
}
