/* =========================================================
   Variables / reset
========================================================= */
:root{
  --bg:#f4f1ff;
  --card:#ffffff;
  --cream:#fff7e8;
  --ring:#eee9ff;
  --ring-2:#e9e5ff;
  --text:#0f172a;
  --muted:#6b7280;
  --violet:#5b31ff;
  --violet-600:#4a25e4;
  --chip:#f0eaff;
  --shadow-strong:0 24px 60px rgba(23,16,54,.18);
  --shadow-med:0 16px 40px rgba(23,16,54,.14);
  --shadow-soft:0 10px 26px rgba(23,16,54,.10);
  --header-h:88px;

  /* largeur de la colonne de droite = largeur du moteur du header */
  /* ajuste cette valeur si besoin pour matcher pixel-perfect */
  --aside-w: 560px;
  --grid-gap: 40px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.45;
}

/* =========================================================
   HERO
========================================================= */
.corpsPays{padding:0 18px 48px}
.heroCountry{position:relative}
.heroCover{
  width:100%;
  height:380px;
  border-radius:28px;
  background-size:cover;
  background-position:center;
  filter:saturate(1.05);
}

/* =========================================================
   Grille principale (gauche / droite)
========================================================= */
.pageGrid{
  max-width: 1480px;              /* un poil plus large pour accueillir l'aside */
  margin: -260px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-w); /* gauche flexible / droite fixe */
  gap: var(--grid-gap);
  align-items: start;
  justify-content: space-between;  /* pousse chaque colonne aux bords */
}

.leftCol{
  display:flex;
  flex-direction:column;
  gap:22px; /* espace carte pays / feed */
}

/* Colonne droite sticky, sans scrollbar et sans fond global */
.heroAside{
  position: sticky;
  top: calc(var(--header-h) + 10px);
  width: var(--aside-w);
  max-width: 100%;
  align-self: start;
  background: transparent;
}
.heroAside > *{ margin-top:22px }
.heroAside > *:first-child{ margin-top:0 }

/* OSM un peu plus haut pour une carte large */
#mapid{
  width:100%;
  height:280px;
  border-radius:16px;
}

/* =========================================================
   Carte crème du pays
========================================================= */
.heroCard{
  background:var(--cream);
  border:1px solid #f1e9d6;
  border-radius:28px;
  padding:26px;
  box-shadow:var(--shadow-strong);
  position:relative;
}
.heroTitleLine{display:flex;align-items:center;gap:12px}
.heroTitleLine h2{
  font-size:64px;
  letter-spacing:-.5px;
  line-height:1;
  margin:0 0 10px 0;
}
.heroBio{margin:6px 0 12px;color:#475569;max-width:70ch}
.chips{display:flex;gap:10px;flex-wrap:wrap}
.chip{
  background:var(--chip);
  color:#3f2ea7;
  font-weight:700;
  font-size:13px;
  padding:8px 12px;
  border-radius:999px;
}

/* bouton abonnement */
.abonnementForm{position:absolute;top:18px;right:18px}
.abonnementForm .btn{
  background:var(--violet);
  color:#fff;
  border:0;
  border-radius:999px;
  padding:12px 18px;
  font-weight:800;
  box-shadow:0 16px 28px rgba(91,49,255,.25);
  cursor:pointer;
}
.abonnementForm .btn:hover{background:var(--violet-600)}

/* =========================================================
   Cartes / boutons génériques
========================================================= */
.card-soft{
  background:var(--card);
  border:1px solid var(--ring);
  border-radius:24px;
  padding:16px;
  box-shadow:var(--shadow-med);
}
.publishTitle{font-size:18px;margin:0 0 10px}
.form-control{
  width:100%;
  padding:12px 14px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  outline:none;
}
.form-control:focus{
  border-color:#d6d2ff;
  box-shadow:0 0 0 3px #eeeaff;
}
.btn{
  padding:10px 14px;
  border-radius:12px;
  border:0;
  font-weight:700;
  cursor:pointer;
}
.btn-block{width:100%}
.btn-primary{background:var(--violet);color:#fff}
.btn-primary:hover{background:var(--violet-600)}
.btn-secondary{background:#eef2ff;color:#4338ca;border:1px solid var(--ring)}

/* Membres abonnés */
.subsGrid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}
.subItem{text-align:center}
.avatar{
  width:44px;height:44px;border-radius:50%;
  overflow:hidden;display:inline-block;border:3px solid #fff;
  box-shadow:0 0 0 3px var(--ring);
}
.avatar img{width:100%;height:100%;object-fit:cover}
.subName{font-size:12px;color:#6b7280}
.subsFooter{display:flex;justify-content:space-between;align-items:center;margin-top:10px}

/* =========================================================
   Feed (publications)
========================================================= */
.recentTitle{font-size:28px;font-weight:800;margin:6px 0 12px 6px}
.feedStack{display:flex;flex-direction:column;gap:24px}

.postCard{
  background:var(--card);
  border:1px solid var(--ring);
  border-radius:16px;
  box-shadow:var(--shadow-soft);
  padding:12px;
  display:grid;
  grid-template-columns:96px 1fr;
  gap:12px;
  align-items:center;
}
.postImageLink{display:block;grid-column:1}
.postImage{
  width:96px;height:96px;object-fit:cover;
  border-radius:12px;
  display:block;
  box-shadow:0 6px 18px rgba(23,16,54,.12);
}
.postBody{grid-column:2;min-width:0}
.postTitle{margin:2px 0 6px;font-size:18px;font-weight:800}
.postTitle a{color:var(--text);text-decoration:none}
.postTitle a:hover{text-decoration:underline}
.postMeta{
  display:flex;align-items:center;gap:8px;
  font-size:14px;color:#667085;margin-bottom:8px
}
.postMeta .author{color:#6366f1;font-weight:700}
.postExcerpt{color:#4b5563;margin:0 0 8px;line-height:1.45}
.postActions .btn-purple{
  display:inline-block;
  padding:9px 14px;
  border-radius:999px;
  background:linear-gradient(180deg,#6b4dff 0%, var(--violet) 100%);
  color:#fff;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 8px 16px rgba(91,49,255,.28);
}
.commentForm{
  grid-column:1 / -1;
  margin-top:10px;
  border-top:1px solid var(--ring-2);
  padding-top:10px;
  display:flex;flex-direction:column;gap:8px;
}
.commentInput{
  width:100%;
  border:1px solid var(--ring-2);
  background:#f8f7ff;
  border-radius:12px;
  padding:10px 12px;
  outline:none;resize:vertical;
}
.commentActions{display:flex;justify-content:flex-end}

/* =========================================================
   Responsive
========================================================= */
@media (max-width:1280px){
  /* quand l’écran rétrécit, on réduit doucement la colonne de droite */
  :root{ --aside-w: 520px; }
  .pageGrid{margin-top:-120px}
  .heroTitleLine h2{font-size:54px}
}
@media (max-width:1120px){
  :root{ --aside-w: 480px; }
}
@media (max-width:1024px){
  .pageGrid{
    grid-template-columns:1fr;
    gap:20px;
    margin-top:-60px;
  }
  .heroAside{position:static;width:auto}
}
@media (max-width:720px){
  .heroTitleLine h2{font-size:42px}
  .postCard{grid-template-columns:80px 1fr}
  .postImage{width:80px;height:80px}
}
@media (max-width:520px){
  .corpsPays{padding:0 14px 40px}
  .heroCover{height:260px}
  .heroTitleLine h2{font-size:36px}
  .abonnementForm{position:static;margin-top:10px}
}
