/* ==========================================================================
   Église Connect — Design system
   Palette inspirée des vitraux et de la lumière de sanctuaire
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Fraunces:wght@500;600;700&family=Work+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
  /* Couleurs — Cohésion avec le logo FaceCel (Bleu et Vert) */
  --ivoire:        #FAF6EE;
  --ivoire-doux:   #F1EADC;
  --indigo:        #0052CC;  /* Bleu FaceCel */
  --indigo-clair:  #0066FF;  /* Bleu clair */
  --or:            #00B050;  /* Vert FaceCel */
  --or-clair:      #33D67F;  /* Vert clair */
  --vin:           #0052CC;  /* Bleu pour cohérence */
  --sauge:         #00A64D;  /* Vert foncé */
  --texte:         #1A1A2E;
  --texte-doux:    #555555;
  --ligne:         #D9D9E3;
  --blanc:         #FFFFFF;

  /* Typographie */
  --police-titre: "Fraunces", Georgia, serif;
  --police-logo: "Poppins", sans-serif;
  --police-texte: "Work Sans", -apple-system, sans-serif;
  --police-util:  "IBM Plex Mono", monospace;

  /* Hauteurs fixes de l'entête */
  --header-height: 46px;
  --marquee-height: 0px;
  --fixed-top-offset: 46px;

  /* Rythme */
  --rayon: 14px;
  --ombre: 0 8px 24px rgba(43, 42, 76, 0.08);
  --ombre-forte: 0 16px 40px rgba(43, 42, 76, 0.16);
}

@font-face {
  font-family: "Fraunces";
  src: local("Fraunces");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--ivoire);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3 {
  font-family: var(--police-titre);
  color: var(--indigo);
  margin: 0 0 0.4em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Focus visible pour l'accessibilité clavier */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--or);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Motif vitrail — élément signature, utilisé en accent (pas partout)
   ========================================================================== */

.vitrail {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg,
    var(--vin) 0%, var(--or) 20%, var(--sauge) 40%,
    var(--indigo-clair) 60%, var(--or) 80%, var(--vin) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
}

.vitrail-svg { display: block; margin: 0 auto; }

/* ==========================================================================
   Barre de navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: var(--header-height);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ligne);
  box-shadow: 0 4px 18px rgba(43,42,76,0.06);
}

.nav-inner {
  width: min(100%, 960px);
  height: 100%;
  margin: 0 auto;
  padding: 8px clamp(12px, 2.6vw, 18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-logo {
  font-family: var(--police-logo);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--indigo);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-text {
  display: inline-flex;
  gap: 0;
}

.nav-logo-face {
  color: var(--or);
}

.nav-logo-cel {
  color: var(--indigo);
}

.nav-logo .point {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--or);
}

.nav-logo-img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--texte-doux);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a:hover { color: var(--vin); }

.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--indigo);
  color: var(--ivoire);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-titre);
  font-size: 0.95rem;
  border: 2px solid var(--or-clair);
}

.profil-actions {
  position: relative;
  margin-left: auto;
}

.bouton-kebab {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ligne);
  background: var(--blanc);
  color: var(--indigo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: var(--ombre);
}

.menu-kebab {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 12px;
  box-shadow: var(--ombre-forte);
  padding: 6px 0;
  z-index: 20;
  display: none;
}

.menu-kebab.ouvert { display: block; }

.zone-modification-profil {
  position: relative;
  margin-top: 12px;
  width: min(92vw, 620px);
  max-height: min(78vh, 760px);
  overflow-y: auto;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 16px;
  box-shadow: var(--ombre-forte);
  padding: 18px 18px 22px;
  z-index: 25;
  display: none;
}
.zone-modification-profil.ouverte { display: block; }

.bloc-modification-profil {
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bloc-modification-profil form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bloc-modification-profil .btn-principal {
  margin-top: 6px;
  align-self: flex-start;
}

.menu-kebab button {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 14px;
  text-align: left;
  color: var(--texte);
  font-size: 0.95rem;
}

.menu-kebab button:hover { background: var(--ivoire-doux); }

/* ==========================================================================
   Layout général
   ========================================================================== */

.page {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: calc(var(--fixed-top-offset) + 10px) clamp(14px, 3vw, 24px) 96px;
}

#listePublications {
  padding-top: 12px;
}

.centre {
  width: min(100%, 440px);
  margin: 48px auto 72px;
  padding: 0 clamp(14px, 3vw, 24px);
}

/* ==========================================================================
   Boutons & champs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-principal {
  background: var(--indigo);
  color: var(--ivoire);
}
.btn-principal:hover { box-shadow: var(--ombre-forte); transform: translateY(-1px); }

.btn-or {
  background: var(--or);
  color: var(--indigo);
}
.btn-or:hover { box-shadow: var(--ombre-forte); transform: translateY(-1px); }

.btn-fantome {
  background: transparent;
  color: var(--indigo);
  border: 1.5px solid var(--ligne);
}
.btn-fantome:hover { border-color: var(--indigo); }
.btn-fantome.active {
  background: rgba(79, 70, 229, 0.1);
  border-color: #4f46e5;
  color: #3730a3;
}

.live-preview-container {
  margin-top: 16px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 59, 48, 0.16);
  background: rgba(30, 30, 30, 0.98);
}
.live-preview-container video {
  width: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
  background: #000;
}
.live-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.75);
}
.live-preview-label {
  color: #ffb3b3;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-texte {
  background: none;
  border: none;
  color: var(--texte-doux);
  font-size: 0.88rem;
  padding: 4px;
}
.btn-texte:hover { color: var(--vin); }

.champ {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--ligne);
  background: var(--blanc);
  font-family: var(--police-texte);
  font-size: 0.95rem;
  color: var(--texte);
  margin-bottom: 14px;
}
.champ:focus { border-color: var(--or); outline: none; }

textarea.champ { resize: vertical; min-height: 90px; }

.post-live-zone {
  display: none;
  margin-top: 18px;
  border: 1px solid var(--ligne);
  border-radius: 18px;
  overflow: hidden;
  background: #111;
}

.post-live-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.14);
  color: #fff;
  font-size: 0.95rem;
}

.post-live-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.post-live-title span:last-child {
  letter-spacing: 0.02em;
}

.post-live-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-live-status .live-viewer-info {
  color: #f7f7f7;
  font-weight: 600;
}

  .post-live-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .post-live-hosts {
    display: block;
    width: 100%;
    min-height: 260px;
    background: linear-gradient(rgba(18, 20, 38, 0.55), rgba(18, 20, 38, 0.65)), url('/assets/logo.png') center/cover no-repeat;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 14px;
    color: #f7f7f7;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  }

  .audio-panel-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(68px, 1fr));
    gap: 12px;
    width: 100%;
  }

  .audio-panel-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  }

  .audio-panel-slot {
    border: 1px solid rgba(212, 175, 55, 0.7);
  }

  .audio-panel-slot.host {
    grid-column: 1 / span 1;
    grid-row: 1 / span 1;
    width: min(100%, 92px);
    min-height: 92px;
    justify-self: start;
    border: 2px solid rgba(212, 175, 55, 0.9);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.32), 0 10px 24px rgba(0,0,0,0.18);
  }

  .audio-panel-slot.empty {
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.18);
  }

  .audio-panel-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: rgba(0,0,0,0.2);
  }

  .audio-panel-avatar.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255,255,255,0.08);
  }

  .audio-panel-role {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 196, 0, 0.82);
    color: #201b1b;
    font-size: 0.57rem;
    font-weight: 800;
    letter-spacing: 0.03em;
  }

  .audio-panel-slot-actions {
    position: absolute;
    right: 6px;
    top: 6px;
    display: flex;
    gap: 4px;
  }

  .audio-panel-mic,
  .audio-panel-remove,
  .audio-panel-up,
  .audio-panel-down {
    border: 1px solid rgba(212, 175, 55, 0.7);
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    border-radius: 999px;
    min-width: 26px;
    height: 26px;
    cursor: pointer;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .audio-panel-mic.muet {
    background: rgba(255, 88, 88, 0.2);
    border-color: rgba(255, 88, 88, 0.35);
  }

  .audio-panel-remove,
  .audio-panel-up,
  .audio-panel-down {
    width: 26px;
    min-width: 26px;
    padding: 0;
  }

  .audio-panel-plus {
    font-size: 2rem;
    line-height: 1;
    color: rgba(255,255,255,0.8);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  }

  .post-live-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .post-live-host-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.88rem;
  }

  .post-live-host-badge img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
  }

  .post-live-hosts-placeholder {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
  }

  .bouton-joindre-panel {
    padding: 6px 10px;
    font-size: 0.88rem;
    min-width: 0;
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
  }

  .bouton-joindre-panel:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
  }

  .post-live-host-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 0 16px 16px;
    background: rgba(0, 0, 0, 0.08);
  }

  .post-live-host-video {
    width: 100%;
    min-height: 90px;
    max-height: 140px;
    background: #000;
    border-radius: 14px;
    object-fit: cover;
  }

  /* Profile actions strip (horizontal, compact) */
  /* Barre d'actions / filtres du profil supprimée définitivement. */

.auto-join-banner .btn {
  padding: 8px 14px;
}

@media (max-width: 720px) {
  .post-live-header {
    padding: 12px;
  }

  .post-live-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .post-live-video {
    max-height: 260px;
  }

  .post-live-zone {
    border-radius: 16px;
  }

  .auto-join-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .auto-join-banner .btn {
    width: 100%;
  }
}

.etiquette {
  font-size: 0.82rem;
  color: var(--texte-doux);
  margin-bottom: 6px;
  display: block;
  font-weight: 600;
}

/* ==========================================================================
   Carte d'authentification
   ========================================================================== */

.carte-auth {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 36px 32px;
  box-shadow: var(--ombre);
  border: 1px solid var(--ligne);
}

.carte-auth h1 {
  font-size: 1.6rem;
  text-align: center;
}

.sous-titre {
  text-align: center;
  color: var(--texte-doux);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.lien-bas {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--texte-doux);
}
.lien-bas a { color: var(--vin); font-weight: 600; }

.erreur {
  background: #FBEAEA;
  color: var(--vin);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  margin-bottom: 14px;
  display: none;
}
.erreur.visible { display: block; }

/* ==========================================================================
   Composer une publication
   ========================================================================== */

.composer {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 18px 20px;
  box-shadow: var(--ombre);
  border: 1px solid var(--ligne);
  margin-bottom: 28px;
}

.composer-profil {
  margin-top: 16px;
  margin-bottom: 24px;
}

.composer-profil .composer-entete {
  align-items: center;
}

.composer-profil textarea {
  min-height: 84px;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.composer-media-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-choix-media {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--ombre-forte);
  z-index: 2000;
  min-width: 180px;
}

.menu-choix-media-option {
  border: none;
  background: var(--ivoire-doux);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  color: var(--indigo);
}

.aperçu-media-publication {
  min-height: 56px;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 10px;
}

.aperçu-media-publication img,
.aperçu-media-publication video {
  max-width: 100%;
  max-height: 220px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--ligne);
}

.btn-supprimer-media {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: rgba(0,0,0,0.65);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.aperçu-media-publication > * {
  position: relative;
}

.composer-profil .composer-pied {
  justify-content: space-between;
  align-items: center;
}

.composer-profil .erreur.visible {
  margin-top: 10px;
  margin-bottom: 0;
}

.composer-entete {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.composer textarea {
  border: none;
  background: var(--ivoire-doux);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  font-family: var(--police-texte);
  font-size: 0.95rem;
  min-height: 60px;
  resize: vertical;
}
.composer textarea:focus { outline: 2px solid var(--or); }

.composer-pied {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ==========================================================================
   Publications
   ========================================================================== */

.post {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 20px;
  box-shadow: var(--ombre);
  border: 1px solid var(--ligne);
  margin-bottom: 20px;
}

.post-entete {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--indigo);
  color: var(--ivoire);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-titre);
  flex-shrink: 0;
  border: 2px solid var(--or-clair);
}

.post-auteur { font-weight: 700; color: var(--indigo); font-size: 0.95rem; }
.post-date { font-size: 0.78rem; color: var(--texte-doux); font-family: var(--police-util); }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.post-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
}
.post-badge-live {
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.post-texte {
  font-size: 0.98rem;
  white-space: pre-wrap;
  margin-bottom: 14px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}
.post-texte-contenu,
.texte-longue {
  display: inline;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1 1 auto;
  min-width: 0;
}
.bouton-texte-kebab {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: none;
  background: rgba(124, 58, 237, 0.06);
  color: var(--vin);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 4px 7px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.bouton-texte-kebab:hover {
  opacity: 0.9;
  background: rgba(124, 58, 237, 0.1);
}
.bouton-texte-kebab .label-kebab {
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.post-actions {
  display: flex;
  gap: 18px;
  border-top: 1px solid var(--ligne);
  padding-top: 10px;
}

.action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--texte-doux);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 8px;
}
.action:hover { background: var(--ivoire-doux); color: var(--vin); }
.action.actif { color: var(--vin); }

/* Commentaires */
.commentaires { margin-top: 12px; }
.commentaire {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: flex-start;
}
.commentaire-bulle {
  background: var(--ivoire-doux);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.88rem;
  flex: 1;
  line-height: 1.5;
  min-width: 0;
}
.commentaire-texte {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 2px;
}
.commentaire-auteur { font-weight: 700; color: var(--indigo); margin-right: 6px; }

.form-commentaire {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.form-commentaire input {
  flex: 1;
  border: 1.5px solid var(--ligne);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
}
.form-commentaire input:focus { outline: none; border-color: var(--or); }

/* ==========================================================================
   État vide / chargement
   ========================================================================== */

.etat-vide {
  text-align: center;
  padding: 60px 20px;
  color: var(--texte-doux);
}
.etat-vide .vitrail-svg { margin-bottom: 20px; opacity: 0.8; }

/* ==========================================================================
   Profil
   ========================================================================== */

.profil-entete {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 28px;
  box-shadow: var(--ombre);
  border: 1px solid var(--ligne);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.avatar-grand {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--indigo);
  color: var(--ivoire);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-titre);
  font-size: 2.4rem;
  border: 3px solid var(--or-clair);
  flex-shrink: 0;
}

.profil-infos-details {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.profil-infos-details .post-date,
.profil-infos-details .compteurs-abonnes {
  font-size: 0.85rem;
  color: var(--texte-doux);
  margin: 0;
}

.profil-infos-details .badges-profil {
  margin: 0;
  gap: 6px;
}

.profil-entete > div:nth-child(2) > h2 {
  margin: 0 0 12px 0;
}

.profil-bio { color: var(--texte-doux); font-size: 0.92rem; margin-top: 4px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 560px) {
  .nav-links span.texte-lien { display: none; }

  .profil-entete {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    margin-bottom: 18px;
    text-align: left;
  }

  .profil-entete > div:nth-child(2) {
    flex: 1;
    min-width: 0;
  }

  .profil-entete > div:nth-child(2) > h2 {
    font-size: 1.12rem;
    line-height: 1.2;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
  }

  .avatar-grand {
    width: 66px;
    height: 66px;
    font-size: 1.55rem;
    border-width: 2px;
    flex-shrink: 0;
  }

  .profil-infos-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 6px;
  }

  .profil-infos-details .post-date,
  .profil-infos-details .compteurs-abonnes,
  .profil-infos-details .badges-profil,
  .profil-bio {
    font-size: 0.74rem;
  }

  .profil-infos-details .badges-profil {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
  }

  .badge {
    padding: 3px 8px;
    font-size: 0.68rem;
  }

  .profil-bio {
    margin-top: 0;
    line-height: 1.42;
    font-size: 0.74rem;
  }

  .profil-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    margin-left: 0;
  }

  .bouton-kebab {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .carte-auth { padding: 28px 22px; }
}

/* ==========================================================================
   Avatars photo réelle (profil, fil, commentaires) + bannière de couverture
   ========================================================================== */

.avatar-photo {
  padding: 0;
  background: none;
  border: 2px solid var(--or-clair);
}
.avatar-photo img,
.avatar-grand.avatar-photo img,
.nav-avatar.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}


.avatar-mini {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--indigo);
  color: var(--ivoire);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-titre);
  font-size: 0.75rem;
  flex-shrink: 0;
  border: 2px solid var(--or-clair);
  padding: 0;
}
.avatar-mini.avatar-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.couverture {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  height: 200px;
  border-radius: var(--rayon);
  background: linear-gradient(120deg, var(--indigo), var(--indigo-clair));
  background-size: cover;
  background-position: center;
  margin-top: 20px;
}

.profil-entete-remontee {
  margin-top: -46px;
  position: relative;
  z-index: 2;
}

.badges-profil {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.badge {
  display: inline-block;
  background: var(--ivoire-doux);
  color: var(--indigo);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.bloc-photo {
  background: var(--ivoire-doux);
  border-radius: 12px;
  padding: 16px;
  margin: 6px 0 18px;
}

/* ==========================================================================
   Bandeau défilant arc-en-ciel
   ========================================================================== */

.bandeau-defilant {
  width: 100%;
  max-width: 100%;
  height: var(--marquee-height);
  overflow: hidden;
  background: var(--indigo);
  padding: 7px 12px;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 110;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 3px solid var(--or);
  backdrop-filter: blur(2px);
  margin: 0;
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(28, 27, 47, 0.08);
}

@media (max-width: 720px) {
  :root {
    --header-height: 52px;
    --marquee-height: 0px;
    --fixed-top-offset: 52px;
  }

  .bandeau-defilant {
    position: static !important;
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
  }

  .page {
    padding-top: calc(var(--fixed-top-offset) + 32px);
  }

  #listePublications {
    padding-top: 20px;
  }

  .page-inbox {
    padding-top: calc(var(--fixed-top-offset) + 32px);
  }
}

.bandeau-piste {
  display: inline-flex;
  white-space: nowrap;
  animation: defiler 120s linear infinite;
  padding-left: 100%;
}

.bandeau-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 42px;
}

.bandeau-texte {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg,
    #E63946, #F4A100, #F4D03F, #52B788, #4A90D9, #7B5EA7, #C9508B, #E63946);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: arc-en-ciel 14s linear infinite;
}

.bandeau-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
  flex-shrink: 0;
}

@keyframes defiler {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

@keyframes arc-en-ciel {
  from { background-position: 0% 0; }
  to   { background-position: 300% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bandeau-piste { animation: none; padding-left: 0; }
}

/* ==========================================================================
   Section héros de l'accueil
   ========================================================================== */

.hero-accueil {
  text-align: center;
  padding: 48px 20px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.hero-accueil h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.hero-accueil p {
  color: var(--texte-doux);
  font-size: 1.02rem;
}

/* ==========================================================================
   Grille des 6 volets
   ========================================================================== */

.grille-volets {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 800px) {
  .grille-volets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .grille-volets { grid-template-columns: 1fr; }
}

.volet {
  background: var(--blanc);
  border: 1.5px solid var(--ligne);
  border-radius: var(--rayon);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--ombre);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.volet:hover, .volet:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--ombre-forte);
}

.volet-vignette {
  height: 130px;
  background: var(--ivoire-doux);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--or);
}

.volet-vignette img {
  width: 100%; height: 100%; object-fit: cover;
}

.volet-icone { font-size: 2.2rem; }

.volet-corps { padding: 16px 18px 20px; }

.volet-numero {
  font-family: var(--police-util);
  font-size: 0.72rem;
  color: var(--or);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.volet-titre {
  font-family: var(--police-titre);
  font-size: 1.08rem;
  color: var(--indigo);
  margin: 4px 0 0;
  font-weight: 600;
}

/* ==========================================================================
   Modale plein écran (contenu détaillé d'un volet)
   ========================================================================== */

.modale-fond {
  position: fixed;
  inset: 0;
  background: rgba(38, 36, 63, 0.72);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: 40px 16px;
  overflow-y: auto;
}

.modale-fond.ouverte { display: flex; }

.modale-carte {
  background: var(--ivoire);
  border-radius: 18px;
  max-width: 680px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: var(--ombre-forte);
  margin: auto;
}

.modale-fermer {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ivoire-doux);
  border: none;
  font-size: 1.2rem;
  color: var(--indigo);
  display: flex; align-items: center; justify-content: center;
}
.modale-fermer:hover { background: var(--vin); color: var(--ivoire); }

.modale-carte h2 { font-size: 1.5rem; padding-right: 40px; }

.modale-texte {
  font-size: 0.98rem;
  line-height: 1.7;
  white-space: pre-line;
  color: var(--texte);
}

.modale-texte.centre-vertical { text-align: center; color: var(--texte-doux); padding: 30px 0; }

.modale-image-unique {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
}

.grille-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.grille-galerie img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px;
}

/* ==========================================================================
   Carrousel (photo du fondateur)
   ========================================================================== */

.carrousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ivoire-doux);
  aspect-ratio: 4 / 3;
}

.carrousel-image {
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.carrousel-image.active { display: block; }

.carrousel-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(43,42,76,0.55);
  color: var(--ivoire);
  border: none;
  font-size: 1.1rem;
}
.carrousel-nav.precedent { left: 10px; }
.carrousel-nav.suivant { right: 10px; }

.carrousel-points {
  display: flex; gap: 6px; justify-content: center; margin-top: 12px;
}
.carrousel-point {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ligne); border: none; padding: 0;
}
.carrousel-point.actif { background: var(--or); }

/* ==========================================================================
   Section dons (Orange Money / Wave)
   ========================================================================== */

.section-dons {
  background: var(--indigo);
  padding: 48px 20px 56px;
  text-align: center;
  margin-top: 20px;
}

.section-dons h2 { color: var(--ivoire); font-size: 1.5rem; }
.section-dons p {
  color: #C9C7DE;
  max-width: 480px;
  margin: 8px auto 28px;
  font-size: 0.95rem;
}

.logos-paiement {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}

.bouton-paiement {
  background: var(--ivoire);
  border: none;
  border-radius: 16px;
  padding: 18px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  transition: transform 0.15s ease;
}
.bouton-paiement:hover { transform: translateY(-3px); }

.logo-orange {
  width: 46px; height: 46px; border-radius: 50%;
  background: #FF7900;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-titre); font-weight: 700; font-size: 1.1rem;
}
.logo-wave {
  width: 46px; height: 46px; border-radius: 50%;
  background: #1DC8F2;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-titre); font-weight: 700; font-size: 1.1rem;
}

.bouton-paiement span.nom-paiement {
  font-weight: 700;
  color: var(--indigo);
  font-size: 0.92rem;
}

.canevas-paiement {
  background: var(--blanc);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
}
.canevas-paiement .numero {
  font-family: var(--police-util);
  font-size: 1.4rem;
  color: var(--indigo);
  background: var(--ivoire-doux);
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Page admin
   ========================================================================== */

.bloc-admin {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 24px;
  box-shadow: var(--ombre);
  border: 1px solid var(--ligne);
  margin-bottom: 22px;
}
.bloc-admin h3 {
  font-size: 1.05rem;
  border-bottom: 1px solid var(--ligne);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.aide-champ {
  font-size: 0.8rem;
  color: var(--texte-doux);
  margin: -10px 0 12px;
}

/* ==========================================================================
   BOUTIQUE
   ========================================================================== */

.entete-boutique {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.onglets-boutique {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ligne);
}

.onglet-boutique {
  background: none;
  border: none;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--texte-doux);
  border-bottom: 2px solid transparent;
}
.onglet-boutique.actif { color: var(--vin); border-bottom-color: var(--vin); }

.grille-produits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.carte-produit {
  background: var(--blanc);
  border-radius: var(--rayon);
  overflow: hidden;
  border: 1px solid var(--ligne);
  box-shadow: var(--ombre);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.carte-produit:hover { transform: translateY(-2px); }

.carte-produit-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--ivoire-doux);
  cursor: zoom-in;
}
.carte-produit-image img { width: 100%; height: 100%; object-fit: cover; }

.etiquette-rabais {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--vin);
  color: var(--ivoire);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.carte-produit-corps { padding: 12px 14px 16px; }
.carte-produit-titre { font-size: 0.98rem; margin: 4px 0; }
.carte-produit-prix { font-weight: 700; color: var(--indigo); font-family: var(--police-util); }
.prix-barre { text-decoration: line-through; color: var(--texte-doux); font-weight: 400; margin-right: 6px; font-size: 0.85em; }
.carte-produit-stock { font-size: 0.8rem; color: var(--texte-doux); margin-top: 4px; }

.badge-statut {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.badge-statut.attente { background: #FDF3DC; color: #92720F; }
.badge-statut.valide { background: #EAF3EC; color: #5B7B62; }
.badge-statut.rejete { background: #FBEAEA; color: var(--vin); }

/* Agrandissement photo profil / couverture */
.overlay-photo-profil {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 35, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 260;
  padding: 24px;
}
.overlay-photo-profil.ouverte { display: flex; }
.carte-photo-profil-agrandie {
  position: relative;
  max-width: min(92vw, 860px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.carte-photo-profil-agrandie img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.titre-photo-agrandie {
  color: var(--ivoire);
  margin: 0 0 12px;
  font-size: 1rem;
}
.btn-fermer-photo {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--indigo);
  font-size: 1.1rem;
  cursor: pointer;
}
.btn-photo-profil {
  margin-top: 14px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Image plein écran */
.modale-image-fond {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20, 18, 35, 0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modale-image-fond.ouverte { display: flex; }
.modale-image-fond img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}
.modale-image-fond .modale-fermer {
  position: fixed;
  top: 20px; right: 20px;
  background: var(--blanc);
}

/* Modération admin */
.bloc-moderation { border: 2px solid var(--or); }

.carte-moderation {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ligne);
}
.carte-moderation:last-child { border-bottom: none; }

.carte-moderation-photo {
  width: 90px; height: 90px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  cursor: zoom-in;
}

.carte-moderation-corps { flex: 1; min-width: 0; }

.actions-moderation { display: flex; gap: 10px; margin-top: 10px; }

.panneau-rejet {
  background: var(--ivoire-doux);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}

/* ==========================================================================
   MESSAGERIE (INBOX)
   ========================================================================== */

.page-messagerie { max-width: 920px; padding-top: 20px; padding-bottom: 20px; height: calc(100vh - 90px); }

.messagerie {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  height: 100%;
  background: var(--blanc);
  border-radius: var(--rayon);
  border: 1px solid var(--ligne);
  box-shadow: var(--ombre);
  overflow: hidden;
}

.liste-conversations {
  border-right: 1px solid var(--ligne);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.entete-liste-conversations {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--ligne);
}

.item-conversation {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--ligne);
  padding: 12px 16px;
  text-align: left;
  position: relative;
}
.item-conversation:hover, .item-conversation.actif { background: var(--ivoire-doux); }

.item-conversation-corps { min-width: 0; flex: 1; }
.item-conversation-nom { font-weight: 700; font-size: 0.9rem; color: var(--indigo); }
.item-conversation-apercu {
  font-size: 0.8rem; color: var(--texte-doux);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.badge-non-lu {
  background: var(--vin);
  color: var(--ivoire);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.fenetre-messages { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.fenetre-messages-vide { height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }

.entete-conversation {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ligne);
}

.zone-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ligne-bulle { display: flex; }
.ligne-bulle.moi { justify-content: flex-end; }
.ligne-bulle.autre { justify-content: flex-start; }

.bulle-message {
  max-width: 70%;
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  margin: 3px 0;
  word-break: break-word;
}
.bulle-message.moi { background: var(--indigo); color: var(--ivoire); border-bottom-right-radius: 4px; }
.bulle-message.autre { background: var(--ivoire-doux); color: var(--texte); border-bottom-left-radius: 4px; }

.entree-message {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--ligne);
}
.entree-message input {
  flex: 1;
  border: 1.5px solid var(--ligne);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.9rem;
}
.entree-message input:focus { outline: none; border-color: var(--or); }

@media (max-width: 720px) {
  .messagerie { grid-template-columns: 1fr; }
  .liste-conversations { border-right: none; }
  .fenetre-messages { display: none; }
  .messagerie.conversation-ouverte .liste-conversations { display: none; }
  .messagerie.conversation-ouverte .fenetre-messages { display: flex; }
  .page-messagerie { height: calc(100vh - 70px); padding: 0; }
  .messagerie { border-radius: 0; height: 100%; }
}

/* ==========================================================================
   CHAMPS PHOTO (téléversement direct)
   ========================================================================== */

.champ-photo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.apercu-photo {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: var(--ivoire-doux);
  border: 1.5px dashed var(--ligne);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.apercu-photo img { width: 100%; height: 100%; object-fit: cover; }

.champ-fichier-zone { flex: 1; min-width: 180px; }

input[type="file"].champ-fichier {
  width: 100%;
  font-size: 0.85rem;
  color: var(--texte-doux);
  padding: 8px 0;
}
input[type="file"].champ-fichier::file-selector-button {
  background: var(--indigo);
  color: var(--ivoire);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.82rem;
  margin-right: 10px;
  cursor: pointer;
}

.statut-televersement {
  font-size: 0.78rem;
  color: var(--sauge);
  margin: 4px 0 0;
}
.statut-televersement.erreur-televersement { color: var(--vin); }

.apercu-liste-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}
.miniature-photo {
  width: 64px; height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ligne);
}
.miniature-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   INBOX — barre de membres, sous-onglets, stories, notifications
   ========================================================================== */


/* Barre horizontale des membres avec statut en ligne */
.barre-membres {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 4px 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--ligne);
}

.membre-bulle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  flex-shrink: 0;
  width: 64px;
  position: relative;
}

.membre-bulle .avatar { position: relative; }

.point-statut {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid var(--ivoire);
  z-index: 2;
}
.point-statut.en-ligne { background: #4CAF6D; }
.point-statut.hors-ligne { background: #B7B2C9; }

.membre-bulle-nom {
  font-size: 0.72rem;
  color: var(--texte-doux);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

/* Sous-onglets */
.sous-onglets-inbox {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ligne);
  overflow-x: auto;
}

.sous-onglet {
  background: none;
  border: none;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--texte-doux);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sous-onglet.actif { color: var(--vin); border-bottom-color: var(--vin); }

.panneau-inbox { padding-bottom: 30px; }

.entete-panneau {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

/* Stories */
.grille-stories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.carte-story {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: var(--indigo);
  border: 2px solid var(--or);
}
.carte-story-groupe {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(255, 197, 92, 0.8);
  background: rgba(26, 28, 54, 0.8);
  box-shadow: 0 10px 20px rgba(28, 17, 62, 0.18);
}
.carte-story-stack {
  position: absolute;
  inset: 8px 8px 42px 8px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 16, 35, 0.8);
}
.carte-story-stack-item {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  transform-origin: center;
}
.carte-story-stack-item:nth-child(1) { transform: translate(0, 0) scale(1); }
.carte-story-stack-item:nth-child(2) { transform: translate(8px, 10px) scale(0.96); filter: saturate(0.9); }
.carte-story-stack-item:nth-child(3) { transform: translate(14px, 18px) scale(0.92); filter: saturate(0.8); }
.carte-story-stack-item img, .carte-story-stack-item video, .carte-story img, .carte-story video {
  width: 100%; height: 100%; object-fit: cover;
}
.carte-story-texte {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  text-align: center;
  font-family: var(--police-titre);
  font-size: 0.95rem;
  color: var(--ivoire);
  background: linear-gradient(135deg, var(--indigo), var(--vin));
}
.badge-story-groupe {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  background: rgba(17, 24, 39, 0.8);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.carte-story-auteur {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.story-plein-ecran-texte {
  max-width: 500px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  font-family: var(--police-titre);
  font-size: 1.4rem;
  color: var(--ivoire);
  background: linear-gradient(135deg, var(--indigo), var(--vin));
  border-radius: 14px;
}

/* Notifications */
.item-notification {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--ligne);
}
.item-notification .item-conversation-corps { flex: 1; }

.bloc-notifications {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--ligne);
  border-radius: 16px;
  background: var(--blanc);
  box-shadow: 0 8px 24px rgba(43, 42, 76, 0.06);
}
.bloc-notifications-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.titre-section-notif {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--indigo);
}
.texte-section-notif {
  margin: 0;
  font-size: 0.9rem;
  color: var(--texte-doux);
}
.badge-notif-total {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(214, 27, 78, 0.12);
  color: var(--vin);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--ligne);
}
.notification-card:first-child {
  border-top: 0;
  padding-top: 0;
}
.notification-card.non-lu {
  background: rgba(214, 27, 78, 0.04);
  border-radius: 12px;
  padding: 10px 12px;
}
.notification-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(43, 42, 76, 0.08);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.notification-card-corps {
  flex: 1;
}
.notification-card-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.notification-card-entete strong {
  font-size: 0.95rem;
  color: var(--indigo);
}
.notification-card-entete span {
  font-size: 0.75rem;
  color: var(--texte-doux);
}
.notification-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--texte-doux);
  line-height: 1.4;
}

.grille-amis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 14px;
}
.carte-ami {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.carte-ami p { margin: 0; font-size: 0.8rem; font-weight: 600; color: var(--indigo); }

@media (max-width: 900px) {
  .page {
    padding: 24px 16px 92px;
  }
  .centre {
    margin: 36px auto 60px;
  }
}

@media (max-width: 720px) {
  .page-inbox {
    padding: calc(var(--fixed-top-offset) + 18px) 12px 12px;
  }
  .nav-inner {
    padding: 12px 14px;
  }
  .nav-logo {
    font-size: 1.8rem;
  }
  .nav-links {
    gap: 10px;
    font-size: 0.84rem;
  }
  .page {
    padding: 18px 14px 96px;
  }
  .centre {
    padding: 0 14px;
    margin: 24px auto 48px;
  }
  .champ {
    font-size: 0.92rem;
    padding: 12px 14px;
  }
  .btn {
    padding: 11px 16px;
    font-size: 0.9rem;
  }
  .bloc-notifications {
    padding: 14px;
  }
  .notification-card-entete {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 1.4rem;
    gap: 8px;
  }
  .nav-logo-img {
    width: 34px;
    height: 34px;
  }
  .page {
    padding: 14px 12px 100px;
  }
  .centre {
    padding: 0 12px;
  }
  .notification-card {
    gap: 10px;
  }
  .notification-card-icon {
    width: 36px;
    height: 36px;
  }
}
/* =========================================================
   PARAMÈTRES NOTIFICATIONS
========================================================= */

.notification-setting {
    margin: 20px 0;
    padding: 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
}

.notification-setting-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 15px;
}

.notification-setting-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1f1f1;
    font-size: 22px;
}

.notification-setting-info strong {
    display: block;
    font-size: 16px;
}

.notification-setting-info p {
    margin: 4px 0 0;
    color: #777;
    font-size: 13px;
}

.btn-notifications {
    width: 100%;
    padding: 12px 18px;

    border: none;
    border-radius: 10px;

    background: #1877f2;
    color: white;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.btn-notifications:hover {
    opacity: 0.9;
}

.btn-notifications.active {
    background: #2e7d32;
}

.notification-status {
    margin: 10px 0 0;
    font-size: 13px;
    text-align: center;
}

/* ==========================================================================
   NAVIGATION MOBILE — barre fixe en bas avec icônes
   ========================================================================== */

.nav-mobile {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--blanc);
  border-top: 1px solid var(--ligne);
  box-shadow: 0 -4px 16px rgba(43,42,76,0.08);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: stretch;
}

.nav-mobile-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  color: var(--texte-doux);
  border-radius: 10px;
  position: relative;
}
.nav-mobile-item.actif { color: var(--vin); }
.nav-mobile-item.actif .nav-mobile-icone { transform: translateY(-1px); }

.nav-mobile-icone { font-size: 1.35rem; line-height: 1; }
.nav-mobile-label { font-size: 0.66rem; font-weight: 600; }

.onglet-notif-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 0.35rem;
  font-size: 1rem;
  line-height: 1;
}

.nav-onglets-desktop a[href="/notifications"] {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-mobile-point {
  position: absolute;
  top: 2px; right: 18%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--vin);
}

@media (max-width: 720px) {
  .nav-onglets-desktop { display: none !important; }
  body { padding-bottom: 64px; }
  .page-inbox.page-messagerie,
  .page-messagerie { padding-bottom: 0; }
}

@media (min-width: 721px) {
  body { padding-bottom: 72px; }
}

/* ==========================================================================
   FIL — mentions, médias, liens dans les publications
   ========================================================================== */

.liste-mentions {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  box-shadow: var(--ombre-forte);
  margin-top: 4px;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
}

.item-mention {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--texte);
}
.item-mention:hover { background: var(--ivoire-doux); }

.apercu-media-composer {
  margin: 4px 0 12px;
  position: relative;
}
.apercu-media-composer img, .apercu-media-composer video {
  max-height: 220px;
  border-radius: 10px;
  display: block;
}

.post-media {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 10px;
  margin: 4px 0 12px;
  background: var(--ivoire-doux);
}

.lien-post { color: var(--vin); text-decoration: underline; word-break: break-all; }
.mention { color: var(--indigo); font-weight: 700; }

.bouton-signaler { margin-left: auto; }

.entete-repost {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sauge);
  margin-bottom: 8px;
}

a.mention { text-decoration: none; }
a.mention:hover { text-decoration: underline; }

.photo-auth-banniere {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--rayon);
}

/* ==========================================================================
   MENU KEBAB (⋮) réutilisable — publications, messages
   ========================================================================== */

.zone-kebab { position: relative; margin-left: auto; }

.bouton-kebab {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--texte-doux);
  padding: 4px 8px;
  border-radius: 8px;
}
.bouton-kebab:hover { background: var(--ivoire-doux); color: var(--indigo); }

.menu-kebab-liste {
  display: none;
  position: absolute;
  top: 100%; right: 0;
  margin-top: 4px;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  box-shadow: var(--ombre-forte);
  min-width: 180px;
  z-index: 30;
  overflow: hidden;
}
.menu-kebab-liste.ouvert { display: block; }

.menu-kebab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--texte);
}
.menu-kebab-item:hover { background: var(--ivoire-doux); }
.menu-kebab-item.danger { color: var(--vin); }
.menu-kebab-item + .menu-kebab-item { border-top: 1px solid var(--ligne); }

/* Bulle de message avec kebab au survol */
.ligne-bulle { position: relative; }
.ligne-bulle .zone-kebab-message {
    position: absolute;
    top: -4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.ligne-bulle:hover .zone-kebab-message,
.ligne-bulle .zone-kebab-message.ouvert-force {
    opacity: 1;
    pointer-events: auto;
}
.ligne-bulle.moi .zone-kebab-message { left: -30px; }
.ligne-bulle.autre .zone-kebab-message { right: -30px; }
.zone-kebab-message .bouton-kebab { font-size: 1rem; padding: 2px 6px; }

.champ-edition-inline {
  width: 100%;
  border: 1.5px solid var(--or);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.9rem;
  margin: 4px 0;
}

.compteurs-abonnes {
  font-size: 0.85rem;
  color: var(--texte-doux);
  margin: 6px 0;
}
.compteurs-abonnes strong { color: var(--indigo); }

/* ==========================================================================
   BADGE GLOBAL — pastille de notifications sur l'onglet Inbox
   ========================================================================== */

.badge-nav-inbox {
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF5A5F, #E04A4E);
  color: var(--ivoire);
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  margin-left: 6px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(224, 74, 78, 0.35);
  border: 2px solid var(--blanc);
  animation: pulse-bulle-inbox 1.4s ease-in-out infinite;
}

.badge-nav-inbox-mobile {
  position: absolute;
  top: 2px;
  right: 14%;
  margin-left: 0;
  border: 2px solid var(--blanc);
  transform: translate(30%, -20%);
}

.badge-nav-notif-mobile {
  position: absolute;
  top: 2px;
  right: 12%;
  display: none;
  align-items: center;
  justify-content: center;
  background: #EF4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  line-height: 1;
  border: 2px solid var(--blanc);
  transform: translate(30%, -20%);
}

@keyframes pulse-bulle-inbox {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.post-mis-en-evidence {
  outline: 3px solid var(--or);
  outline-offset: 2px;
  animation: pulsation-evidence 1s ease 2;
}
@keyframes pulsation-evidence {
  0%, 100% { background: var(--blanc); }
  50% { background: #FFF6DE; }
}

/* Réserve toujours l'espace réel de la navigation fixe, y compris sur mobile. */
.page,
.page-messagerie,
.page-inbox,
.page[style*="padding-top:0"] {
  padding-top: calc(var(--fixed-top-offset) + 16px) !important;
}

.hero-accueil {
  padding-top: calc(var(--fixed-top-offset) + 16px);
}

/* =========================================================
   CORRECTION MOBILE - MENUS DES CHEVRONS DU PROFIL
   ========================================================= */

@media (max-width: 720px) {
  .filtre-dropdown {
    position: fixed !important;
    display: block !important;
    width: auto !important;
    min-width: 220px !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 60vh !important;
    padding: 6px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #222222 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 12px !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: auto !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    z-index: 999999 !important;
  }

  .filtre-dropdown-item {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #222 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: left !important;
    white-space: normal !important;
    writing-mode: horizontal-tb !important;
  }

  .filtre-dropdown-item:hover {
    background: #f3f3f3 !important;
  }

  .filtre-dropdown-item:active {
    background: #e8e8e8 !important;
  }
}
