body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: url("bg-pattern.png");
  background-size: rgb(17, 48, 17);
  background: #000000;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.7);
  color: white;
  position: sticky;
  top: 0;
}
.header .info {
  display: flex;
  flex-direction: column;
}
.header .info h1 {
  margin: 0;
  font-size: 18px;
}
.header .info span {
  font-size: 13px;
  color: #ccc;
}
.header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* CONTENU */
.content {
  padding: 10px;
}
.post {
  background: rgba(255, 255, 255, 0.592);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 15px;
  max-width: 90%;
}
.post img, .post video {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
}
.post p {
  margin: 0 0 8px;
  font-size: 14px;
}
.post .meta {
  display: flex;
  justify-content: flex-end;
  font-size: 12px;
  color: #555;
  align-items: center;
  gap: 5px;
}
.post .meta .eye {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: url('https://cdn-icons-png.flaticon.com/512/159/159604.png') no-repeat center;
  background-size: contain;
}

/* CONTENU */
.content {
  padding: 10px;
}
.post {
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 18px;
  max-width: 92%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.post img, .post video {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.post p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
}
.post .meta {
  display: flex;
  justify-content: flex-end;
  font-size: 12px;
  color: #555;
  align-items: center;
  gap: 5px;
}
.post .meta .eye {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: url('https://cdn-icons-png.flaticon.com/512/159/159604.png') no-repeat center;
  background-size: contain;
}

/* GALERIE (plusieurs photos) */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.gallery img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}
.modal-content {
  max-width: 70%;
  max-height: 70%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}
.close {
  position: absolute;
  top: 200px; /* ou 30px si tu veux encore un peu d’espace */
  right: 20px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  z-index: 2000;
}


.close:hover {
  color: #ddd;
}
/* FOOTER NAV FLOTTANT */
.footer-nav {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  height: 65px;
  background: rgba(255, 255, 255, 0.2); /* transparence */
  backdrop-filter: blur(12px); /* effet verre flou */
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.footer-nav a {
  text-decoration: none;
  color: #000000;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}

.footer-nav a i {
  font-size: 20px;
  margin-bottom: 4px;
}

/* état actif */
.footer-nav a.active {
  color: #00aaff;
  font-weight: bold;
}

.footer-nav a:hover {
  color: #00aaff;
}
/* GLOBAL MOBILE-FIRST */
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #000000; /* couleur style Telegram chat */
  overflow-x: hidden;
  height: 100%;
}

/* Empêche le scroll qui "ferme la webapp" */
body {
  overscroll-behavior-y: contain; 
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.7);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* POSTS */
.content {
  padding: 12px;
  padding-bottom: 100px; /* espace pour le footer */
  max-width: 600px;
  margin: auto;
}

.post {
  background: #ffffff4e;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.774);
  word-wrap: break-word;
}

.post img, .post video {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 10px;
}
#feed { display:block; }
#feed-status { text-align:center; }


/* Texte */
.post p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: #ffffff;
}

/* Meta (heure + vues) */
.post .meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  font-size: 12px;
  color: #ffffff;
  align-items: center;
}
.post .meta .eye {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: url('https://cdn-icons-png.flaticon.com/512/159/159604.png') no-repeat center;
  background-size: contain;
}

/* FOOTER flottant style mini-app */
.footer-nav {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  height: 65px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.footer-nav a {
  text-decoration: none;
  color: #fff;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}

.footer-nav a i {
  font-size: 22px;
  margin-bottom: 4px;
}

/* bouton actif */
.footer-nav a.active {
  color: #00aaff;
  font-weight: 600;
}
/* ESPACE MINI-APP TELEGRAM */
.safe-area {
  height: 35px; /* Ajuste selon ton besoin, entre 30px et 50px */
}
/* HEADER FIXE AVEC SAFE-AREA */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 20px) + 110px) 16px 12px; 
  /* ↑ ajoute un espace en haut, au moins 20px + padding normal */
  background: rgba(0,0,0,0.7);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}
/* MODAL PROFIL CANAL */
.profile-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #f5f5f5;
  z-index: 2000;
  overflow-y: auto;
}

/* HEADER profil */
.profile-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 20px) + 100px) 16px 12px; 
  /* ↑ ajoute un espace en haut, au moins 20px + padding normal */
  background: white;
  border-bottom: 1px solid #ddd;
  z-index: 10;
}
.profile-header .back-btn {
  font-size: 20px;
  cursor: pointer;
  margin-right: 10px;
}
.profile-header .profile-title {
  font-size: 16px;
  font-weight: bold;
}

/* Contenu */
.profile-content {
  padding: 20px;
  text-align: center;
}
.profile-info .profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}
.profile-info h2 {
  margin: 0;
  font-size: 20px;
}
.profile-info .subscribers {
  font-size: 14px;
  color: #777;
}
.profile-info .rating {
  margin-top: 5px;
  font-size: 14px;
  color: #444;
}

/* Boutons actions */
.profile-actions {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}
.profile-actions button {
  flex: 1;
  margin: 0 5px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #eee;
  cursor: pointer;
  font-size: 14px;
}
.profile-actions button:hover {
  background: #ddd;
}

/* Cards (Commande, Description, etc.) */
.card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.card.clickable {
  cursor: pointer;
  text-align: center;
  font-weight: bold;
}

/* Galerie */
.card .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.card .gallery img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}
.date-separator {
  text-align: center;
  margin: 20px 0; /* espace avant la première publication */
  position: relative;
}

.date-separator span {
  background: #fff;
  color: #444;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
/* Empêche la sélection/copier du texte */
body {
  -webkit-user-select: none; /* Safari / Chrome */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* Internet Explorer/Edge */
  user-select: none;         /* Standard */
}
html, body {
  touch-action: manipulation; /* empêche zoom double-tap sur mobile */
}
/* ---------- PAGE MESSAGES (style Telegram) ---------- */
.chat-page {
  background: #e9eef3; /* fond léger pour différencier du feed */
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 20px) + 110px) 16px 12px; 
  background: #1f1f1f;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}

.chat-header .info h1 {
  font-size: 16px;
}
.chat-header .info span {
  font-size: 12px;
  color: #bbb;
}
.chat-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* zone de conversation */
.chat-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 14px 12px 110px; /* bas réservé à l’input + footer */
  height: calc(100vh - 60px); /* plein écran sous le header */
  overflow-y: auto;
  box-sizing: border-box;
}

/* bulles de messages */
.bubble {
  max-width: 78%;
  margin: 8px 10px;
  padding: 10px 12px 18px;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  word-wrap: break-word;
}
.bubble .text { font-size: 14px; line-height: 1.45; }
.bubble .time {
  position: absolute;
  right: 10px;
  bottom: 4px;
  font-size: 11px;
  color: #6e6e6e;
}

/* côté "autre" (gauche) */
.bubble.other {
  background: #ffffff;
  color: #222;
  margin-right: auto;
  border-top-left-radius: 6px;
}

/* côté "moi" (droite) */
.bubble.me {
  background: #d2f1ff;
  color: #0f2a36;
  margin-left: auto;
  border-top-right-radius: 6px;
}

/* barre d’écriture */
.chat-input {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 78px; /* au-dessus du footer compact */
  width: 92%;
  max-width: 720px;
  display: flex;
  gap: 8px;
  background: transparent;
  z-index: 1200;
}
.chat-input input {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: none;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* bouton envoyer masqué par défaut */
.chat-input button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  background: #00aaff;
  color: #fff;
  display: none;           /* masqué tant que pas de texte */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,170,255,0.35);
}
.chat-input button.visible { display: inline-flex; }

/* footer compact sur la page messages */
.footer-nav--small {
  height: 56px;
  bottom: 12px;
  width: 88%;
  max-width: 720px;
  border-radius: 16px;
}
.footer-nav--small a i { font-size: 18px; }
.footer-nav--small a span { font-size: 11px; }
/* Séparateur de date dans le chat */
.date-separator {
  text-align: center;
  margin: 16px 0;
  position: relative;
}
.date-separator span {
  background: #dfe8f2;
  color: #444;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
/* ----- FOOTER WHATSAPP aligné avec marges ----- */
.footer-whatsapp{
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  left: 0;
  right: 0;
  margin-bottom: 20px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 12px; /* <<< ajoute 12px de marge à gauche et droite */
}

.footer-whatsapp a{
  pointer-events: auto;
  width: 100%;
  max-width: 600px;       /* aligné avec .content */
  padding: 14px 18px;
  border-radius: 28px;
  background: #25d365db;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  transition: transform .08s ease, background .2s ease;
}

.footer-whatsapp a:active { transform: scale(.98); }
.footer-whatsapp i { font-size: 20px; }

/* espace sous le feed pour que le bouton ne cache rien */
.content { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
/* ============ PROFILE MODAL – PRO ============ */
:root{
  --pm-bg:#f6f7f9;
  --pm-card:#ffffff;
  --pm-txt:#111827;
  --pm-sub:#6b7280;
  --pm-line:#e5e7eb;
  --pm-brand:#111827;
  --pm-primary:#2563eb;       /* bleu pro */
  --pm-primary-ghost:#eff6ff;
  --pm-cta:#111827;
  --pm-cta-ink:#0f172a;
  --pm-shadow:0 8px 32px rgba(0,0,0,.12);
  --pm-radius:16px;
}

.pmodal{
  display:none;
  position:fixed; inset:0;
  z-index:2000;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--pm-txt);
}
.pmodal.is-open{ display:block; }

.pmodal__backdrop{
  position:absolute; inset:0;
  background:rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
}

.pmodal__sheet{
  position:absolute; inset:0 0 0 0;
  background:rgb(0 0 0 / 79%) !important;
;
  overflow:auto;
  box-shadow: var(--pm-shadow);
}

/* Header sticky */
.pmodal__header{
  position:sticky; top:0;
  display:flex; align-items:center; gap:12px;
  padding: calc(env(safe-area-inset-top, 12px) + 10px) 16px 12px;
  margin-top: 120px;
  background:#fff; border-bottom:1px solid var(--pm-line);
  z-index:1;
}
.pmodal__title{ font-size:14px; font-weight:600; color:var(--pm-sub); margin:0; }
.pmodal__close{
  width:36px; height:36px; display:inline-grid; place-items:center;
  border:none; background:#fff; border-radius:10px; cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}
.pmodal__close i{ font-size:16px; color:#111; }

/* Masthead */
.pmast{
  display:flex; align-items:center; gap:14px;
  max-width:720px; margin:60px auto 10px; padding:0 16px;
}
.pmast__avatar{
  width:68px; height:68px; border-radius:16px; object-fit:cover;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.pmast__name{ margin:0; font-size:20px; font-weight:800; color:var(--pm-brand); letter-spacing:.2px; }
.pmast__sub{ margin-top:6px; display:flex; flex-wrap:wrap; gap:8px; }
.pmast__chip{
  display:inline-flex; gap:6px; align-items:center;
  font-size:12px; color:var(--pm-sub);
  background:#fff; border:1px solid var(--pm-line);
  padding:6px 10px; border-radius:999px;
}
.pmast__chip i{ font-size:13px; color:#334155; }

/* Actions */
.pactions{
  max-width:720px; margin:24px auto 0; padding:0 16px 4px;
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px;
}
.pbtn{
  height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; gap:8px;
  font-weight:600; font-size:14px; text-decoration:none; cursor:pointer; border:1px solid transparent;
  transition:transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.pbtn i{ font-size:16px; }
.pbtn--ghost{ background:var(--pm-primary-ghost); color:#1e3a8a; border-color:#dbeafe; }
.pbtn--ghost:hover{ background:#e0ecff; box-shadow:0 6px 16px rgba(37,99,235,.15); transform:translateY(-1px); }

.pbtn--primary{ background:var(--pm-primary); color:#fff; }
.pbtn--primary:hover{ filter:brightness(.95); transform:translateY(-1px); }

/* CTA commande */
.pcta{
  max-width:720px; margin:12px auto 8px; padding:14px 14px;
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px;
  background:#fff; border:1px solid var(--pm-line); border-radius:14px; text-decoration:none; color:inherit;
  box-shadow:0 4px 10px rgba(0,0,0,.05);
}
.pcta__icon{
  width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
  background:#111; color:#fff;
}
.pcta__icon i{ font-size:18px; }
.pcta__title{ font-weight:700; }
.pcta__hint{ font-size:12px; color:var(--pm-sub); margin-top:2px; }
.pcta__chev{ color:#9ca3af; }

/* Cards */
.pcard{
  max-width:720px; margin:60px auto; padding:16px;
  background:var(--pm-card); border:1px solid var(--pm-line);
  border-radius:14px; box-shadow:0 4px 10px rgba(0,0,0,.05);
}
.pcard__head{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.pcard__head i{ color:#ffffff; }
.pcard h4{ margin:0; font-size:15px; letter-spacing:.2px; }
.pcard__text{ margin:0; color:#1f2937; line-height:1.55; }

/* Metrics */
.pmetrics{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.pmetric{
  display:flex; align-items:center; gap:8px; padding:10px 12px;
  background:#f9fafb; border:1px solid var(--pm-line); border-radius:10px; color:#334155; font-size:13px;
}
.pmetric i{ font-size:15px; }

/* Gallery */
.pgallery{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
}
.pgallery img{
  width:100%; height:98px; object-fit:cover; border-radius:10px;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}

/* Footer de la modale */
.pmodal__foot{
  max-width:720px; margin:18px auto 24px; padding:0 16px;
  display:flex; justify-content:center;
}

/* Petits écrans */
@media (max-width:360px){
  .pgallery img{ height:90px; }
  .pmetrics{ grid-template-columns:1fr; }
  .pactions{ grid-template-columns:1fr 1fr; }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark){
  :root{
    --pm-bg:#0b0f14; --pm-card:#0f141a; --pm-txt:#e5e7eb; --pm-sub:#9aa4b2; --pm-line:#1f2937;
    --pm-brand:#fff; --pm-primary:#3b82f6; --pm-primary-ghost:#0b1a34; --pm-cta:#e5e7eb;
  }
  .pmodal__header{ background:#0000001a; border-color:#1f2937; }
  .pmast__chip{ background:#0f141a; border-color:#1f2937; color:#ffffff; }
  .pbtn--ghost{ background:#0c1b36; border-color:#143160; color:#b6c7f5; }
  .pcta{ background:#0f141a; }
  .pmetric{ background:#0f141a; }
}
/* 1) Empêcher tout débordement de la feuille */
.pmodal__sheet{ overflow-x: hidden; }

/* 2) Tout compter en border-box pour arrêter les +2px fantômes */
.pmodal, .pmodal * { box-sizing: border-box; }

/* 3) Les cartes et CTA prennent 100% sans dépasser avec leur padding/border */
.pcard, .pcta { width: 100%; }

/* 4) Grille galerie sans rognage (minmax(0,1fr) évite les dépassements) */
.pgallery{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pgallery img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* 5) Marges internes confortables sur les côtés de toute la modale */
.pmodal__sheet{ padding-left: 14px; padding-right: 14px; }

/* 6) Contrainte centrale cohérente pour tous les blocs */
.pmodal__header, .pmast, .pactions, .pcard, .pmodal__foot{
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
/* ===== Modale de note ===== */
.prate{ padding-top:18px; }
.prate .pcard__head i{ color:#f59e0b; } /* amber pro */
.prate__stars{
  display:flex; gap:10px; margin:6px 0 4px;
}
.prate__star{
  width:44px; height:44px; border-radius:12px;
  display:grid; place-items:center; cursor:pointer;
  background:#0c1b36; border:1px solid #143160; color:#9ab7ff;
  transition:transform .06s ease, background .2s ease, color .2s ease, border-color .2s;
}
.prate__star i{ font-size:20px; }
.prate__star:hover{ transform:translateY(-1px); }
.prate__star.is-active{
  background:#1f2937; border-color:#f59e0b; color:#f59e0b;
}
.prate__hint{ font-size:12px; color:var(--pm-sub); margin-bottom:10px; }

.prate__label{ display:block; font-weight:600; margin:12px 0 6px; }
.prate__textarea{
  width:100%; resize:vertical; min-height:120px;
  background:var(--pm-card); color:var(--pm-txt);
  border:1px solid var(--pm-line); border-radius:12px;
  padding:12px 12px; outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.prate__textarea:focus{
  border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.15);
}

.prate__error{ color:#ef4444; font-size:12px; min-height:16px; margin-top:6px; }
.prate__actions{ display:flex; justify-content:flex-end; margin-top:12px; }

#rate-submit[disabled]{ opacity:.6; cursor:not-allowed; }

/* mode sombre (hérite de ta palette) */
@media (prefers-color-scheme: dark){
  .prate__textarea{ background:#21212173; border-color:#1f2937; color:#ffffff; }
}
/* ===== Modale liste d'avis ===== */
.previews { display:flex; flex-direction:column; gap:18px; }

.review { display:flex; gap:12px; }
.review__avatar{
  width:44px; height:44px; border-radius:50%;
  object-fit:cover; box-shadow:0 2px 6px rgba(0,0,0,.1);
}
.review__body{ flex:1; }
.review__head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.review__name{ font-weight:600; font-size:14px; color:#111; }
.review__date{ font-size:12px; color:#6b7280; }
.review__stars i{ color:#f59e0b; margin-right:2px; font-size:14px; }
.review__text{ margin:6px 0 0; font-size:14px; line-height:1.45; color:#1f2937; }

@media (prefers-color-scheme: dark){
  .review__name{ color:#f3f4f6; }
  .review__text{ color:#d1d5db; }
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: url("omerta-bg2.png") repeat center center fixed;
  background-size: cover;
  color: #fff;
}
/* --- Forcer dark pour les modales / feuilles type Telegram --- */
:root{
  --pm-backdrop: rgba(0,0,0,.45);
  --pm-sheet-bg: rgba(30,30,32,.96);
  --pm-sheet-text: #fff;
  --pm-card-bg: rgba(255,255,255,.06);
}

/* S’assure que les contrôles (inputs, textarea) basculent en dark */
html { color-scheme: dark; }

.pmodal__backdrop{
  background: var(--pm-backdrop) !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.pmodal__sheet{
  background: rgb(0 0 0 / 79%) !important;
;
  color: var(--pm-sheet-text) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 16px;
}

/* Petites cartes dans la feuille (aperçu message, listes) */
.pcard{
  background: #00000038 !important;
  color: inherit !important;
}
.pcard__text,
#report-mini-preview{
  background: var(--pm-card-bg);
  color: inherit;
}

/* Boutons “ghost” pour rester lisibles en dark forcé */
.pbtn.pbtn--ghost{
  background: var(--pm-card-bg);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.gallery img, .gallery video {
  width: 100%;
  border-radius: 12px;
  display: block;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 10px 14px;
  background: rgba(20,20,20,.9);
  color: #fff;
  font-size: 14px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 9999;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#posts {
  padding-bottom: 80px; /* ou 100px si tu veux plus */
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.content { padding-bottom: 100px; } /* ajuste 80–140px selon ton footer */
/* Modale photo au-dessus de tout */
.modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;               /* > .pmodal (2000) */
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.modal-content{
  max-width: 70%;
  max-height: 70%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.close{
  position: absolute;
 
  right: 20px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  z-index: 6000;               /* au-dessus de l’image */
}
/* ===== Loader plein écran ===== */
#loader{
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  background: rgba(0,0,0,.85);
  z-index: 9999;                 /* au-dessus des modales */
  color: #fff;
  transition: opacity .25s ease;
}
#loader.is-hidden{ opacity: 0; pointer-events: none; }

#loader .spinner{
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: #25D366;     /* clin d’œil WhatsApp/Telegram */
  animation: spin .8s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

#loader p{ margin: 0; font-weight: 600; opacity: .9; }
/* Force le scroll à se placer en bas à l’ouverture */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Flux normal + scroll */
.content{
  display: block;         /* pas de flex reverse */
  overflow-y: auto;
}

#bottom-spacer{
  width: 100%;
}
/* ===== Animations d’ouverture/fermeture des modales de signalement ===== */
.pmodal { will-change: opacity, transform; }
.pmodal__sheet { will-change: transform, opacity; }

/* OUVERTURE */
.pmodal.is-open .pmodal__backdrop {
  animation: r-backdrop-in .28s ease-out both;
}
.pmodal.is-open .pmodal__sheet {
  animation: r-sheet-in .42s cubic-bezier(.22, .9, .22, 1.04) both;
}

/* FERMETURE (on passe par .is-closing en JS) */
.pmodal.is-closing .pmodal__backdrop {
  animation: r-backdrop-out .22s ease-in both;
}
.pmodal.is-closing .pmodal__sheet {
  animation: r-sheet-out .28s cubic-bezier(.25, .46, .45, .94) both;
}

/* Stagger des raisons à l’étape 1 */
#report-modal[data-step="reasons"].is-open .r-reason {
  opacity: 0;
  animation: r-rise .36s ease-out both;
}
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(1){ animation-delay: .02s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(2){ animation-delay: .05s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(3){ animation-delay: .08s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(4){ animation-delay: .11s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(5){ animation-delay: .14s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(6){ animation-delay: .17s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(7){ animation-delay: .20s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(8){ animation-delay: .23s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(9){ animation-delay: .26s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(10){ animation-delay: .29s; }
#report-modal[data-step="reasons"].is-open .r-reason:nth-child(11){ animation-delay: .32s; }

/* Micro effet sur la carte de formulaire (étape 2) */
#report-modal[data-step="form"].is-open #report-form .pcard {
  animation: r-pop .28s ease-out both;
}

/* Keyframes */
@keyframes r-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes r-backdrop-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes r-sheet-in {
  0%   { transform: translateY(22px) scale(.98); opacity: 0; }
  60%  { transform: translateY(0)    scale(1.01); opacity: 1; }
  100% { transform: translateY(0)    scale(1); }
}
@keyframes r-sheet-out {
  from { transform: translateY(0)    scale(1);   opacity: 1; }
  to   { transform: translateY(12px) scale(.98); opacity: 0; }
}
@keyframes r-rise {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
@keyframes r-pop {
  from { transform: scale(.98); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Respecte l’accessibilité */
@media (prefers-reduced-motion: reduce) {
  .pmodal.is-open .pmodal__backdrop,
  .pmodal.is-open .pmodal__sheet,
  .pmodal.is-closing .pmodal__backdrop,
  .pmodal.is-closing .pmodal__sheet,
  #report-modal[data-step="reasons"].is-open .r-reason,
  #report-modal[data-step="form"].is-open #report-form .pcard {
    animation: none !important;
  }
}
#report-reasons { transition: opacity .18s ease; }
#report-modal[data-step="form"] #report-reasons { opacity: 0; }
/* Badge vérifié à côté du nom */
.header .info { position: relative; } /* pour positionner la bulle */
.brand { display: flex; align-items: center; gap: 6px; }

.tg-badge{
  width: 18px; height: 18px;
  padding: 0; margin: 0;
  border: 0; outline: none;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.tg-badge img{ width: 100%; height: 100%; display: block; }

/* Bulle “certifié” */
.tg-bubble{
  position: absolute;
  top: 0; left: calc(100% + 8px); /* après le nom */
  transform: translateY(-6px);
  background: rgba(0,0,0,.88);
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  pointer-events: none;
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
  z-index: 1200;
}
.tg-bubble::after{
  content: "";
  position: absolute;
  left: -6px; top: 12px;
  border: 6px solid transparent;
  border-right-color: rgba(0,0,0,.88);
}
.tg-bubble.is-visible{
  opacity: 1; transform: translateY(0);
}
/* Positionnement propre du badge et de la bulle dans la modale */
.pmast__brand { position: relative; }
.pmast__name { display: flex; align-items: center; gap: 6px; }

/* Bulle près du titre dans la modale */
.pmast__brand .tg-bubble{
  top: 2px;                 /* un poil plus bas que le top */
  left: calc(100% + 8px);   /* à droite du nom */
  transform: translateY(0);
}


/* Forcer le header dark dans les modales, même sans prefers-color-scheme */
.pmodal .pmodal__header{
  background: rgba(255,255,255,0.06) !important; /* ou transparent */
  border-bottom: 1px solid rgba(255,255,255,0.12) !important;
}

.pmodal .pmodal__title{
  color: #fff !important;
}

/* Bouton retour (chevron) en dark */
.pmodal .pmodal__close{
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #fff !important;
}
.pmodal .pmodal__close i{ color:#fff !important; }
/* Contour doux des cartes/bulles dans la mini-modale */
.pmodal .pcard,
.pmodal .report-mini-preview,
.pmodal .bubble {
  background: var(--pm-card-bg);
  border: 1px solid rgba(255,255,255,0.12) !important;                      /* on supprime le bord franc */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); /* contour plus discret */
}

/* Si tu veux encore plus léger, descends à .04 voire .03 */
.pmodal .pcard,
.pmodal .report-mini-preview,
.pmodal .bubble {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

/* Harmoniser le header aussi (optionnel) */
.pmodal .pmodal__header {
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}
/* Textarea dark, partout (mobile compris) */
.pmodal .prate__textarea,
.prate__textarea {
  background: rgba(255,255,255,0.06) !important;   /* fond sombre */
  color: #fff !important;                          /* texte */
  border: none !important;                          /* pas de bord “dur” */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);/* contour doux */
  border-radius: 14px;                              /* comme sur ta capture */
  caret-color: #fff;                                /* curseur blanc */
  -webkit-appearance: none;                         /* iOS */
  appearance: none;
  background-clip: padding-box;                     /* évite halos iOS */
}

/* Placeholder en gris doux */
.pmodal .prate__textarea::placeholder,
.prate__textarea::placeholder {
  color: rgba(255,255,255,.45) !important;
}

/* Focus: léger glow bleu + contour un poil plus visible */
.pmodal .prate__textarea:focus,
.prate__textarea:focus {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(59,130,246,.15),                 /* halo externe (option) */
    inset 0 0 0 1px rgba(255,255,255,.08);          /* contour interne */
}

/* (Option) scrollbar très discrète dans le textarea */
.pmodal .prate__textarea::-webkit-scrollbar { width: 6px; }
.pmodal .prate__textarea::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 999px;
}
/* Couleurs des avis en dark, y compris si le nom ou le texte contiennent des <a> */
.previews .review__name,
.previews .review__text{
  color:#fff !important;
}
.previews a{
  color:inherit !important;
  text-decoration:none;
}

/* (Option) couleur de la date en gris doux */
.previews .review__date{
  color:rgba(255,255,255,.55) !important;
}

/* Si tu utilises des liens cliquables sur tout l'avis */
.previews .review a,
.previews .review__body a{
  color:inherit !important;
  text-decoration:none;
}
/* Nom du canal — toujours blanc, mobile compris */
.pmast__name{
  color:#fff !important;
  display:flex;
  align-items:center;
  gap:.5rem;                 /* espace avec le badge */
  margin:0;                  /* évite les décalages iOS */
}
.pmast__name a{
  color:inherit !important;  /* si le nom est un lien */
  text-decoration:none;
}

/* Bouton badge vérifié dans le <h3> */
.pmast__name .tg-badge{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.25rem .6rem;
  border-radius:9999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  color:#fff;                /* texte si tu ajoutes un label plus tard */
}
.pmast__name .tg-badge img{
  width:18px;
  height:18px;
  display:block;
}

/* (optionnel) si tu utilises une variable de marque */
:root{
  --pm-brand: #fff;          /* certains éléments héritent de cette var */
}
/* État loading pour les boutons .pbtn */
.pbtn.is-loading{ position:relative; pointer-events:none; opacity:.9; }
.pbtn.is-loading i,
.pbtn.is-loading span{ visibility:hidden; }
.pbtn.is-loading::after{
  content:"";
  position:absolute; inset:0;
  margin:auto; width:18px; height:18px;
  border:2px solid #fff; border-top-color: transparent;
  border-radius:50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Loader générique pour .pbtn */
.pbtn.is-loading{ position:relative; pointer-events:none; opacity:.9; }
.pbtn.is-loading i, .pbtn.is-loading span{ visibility:hidden; }
.pbtn.is-loading::after{
  content:"";
  position:absolute; inset:0; margin:auto;
  width:18px; height:18px;
  border:2px solid #fff; border-top-color:transparent;
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }
.pbtn { 
  touch-action: manipulation;     /* supprime la latence / double-tap */
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;                /* >=16px empêche le “tap to zoom” sur iOS */
}
/* Empêche le rebond qui remonte jusqu'à Telegram dans les fenêtres */
.pmodal,
.pmodal__sheet,
.modal,
.content,
.chat-content {
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch; /* confort iOS */
}

/* Optionnel : neutraliser partout au plus haut niveau */
html, body { overscroll-behavior: none; }
.rev-nav { margin-top: 8px; }
.rev-nav__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.rev-nav__info{
  font-size:12px;
  opacity:.8;
}
#rev-prev[disabled], #rev-next[disabled]{ opacity:.5; pointer-events:none; }
.post video { background:#000; }
/* ----- FOOTER TELEGRAM ----- */
.footer-telegram {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  left: 0;
  right: 0;
  margin-bottom: 45px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 12px;
}

.footer-telegram a {
  pointer-events: auto;
  width: 100%;
  max-width: 600px;
  padding: 14px 18px;
  border-radius: 28px;
  background: #0088cc; /* Bleu Telegram */
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  transition: transform .08s ease, background .2s ease;
}

.footer-telegram a:active { transform: scale(.98); }
.footer-telegram i { font-size: 20px; }
