/* =============================================================================
   REFONTE APP — Mes demandes (my-requests.php) · LOCAL / additif / réversible
   Scopé html.apprefonte + body.page-my-requests + .ar-demandes, actif ≤768px.
   Thème SOMBRE (navy + bleu). N'affecte jamais le bureau ni la prod.
   ============================================================================= */

html.apprefonte body.page-my-requests{ background:#0A1524 !important; }
html.apprefonte body.page-my-requests::before{ display:none !important; }
html.apprefonte body.page-my-requests .pub-topbar{ display:none !important; }
html.apprefonte body.page-my-requests main.pub-content{ padding:0 !important; max-width:none !important; }
/* AUDIT MASQUE 15/08 : .pv-layout (messagerie legacy « cercles & moments privés ») EXEMPTÉE
   du masque — comme la frise du Carnet. Sinon cette fonction (demandes d'accès aux moments +
   cercles privés en lecture/écriture) disparaissait en mode app. Affichage seul, réversible. */
html.apprefonte:has(.ar-demandes) .pub-content > *:not(.ar-demandes):not(.pv-layout):not(.ann-banner-wrap):not(.flash){ display:none !important; }

/* ---------------------------------------------------------------------------- */
.ar-demandes{
  --surf:#0F2136; --line:rgba(90,140,210,.16);
  --ink:var(--ar-ink,#F6F0DF); --soft:#9BB1BF; --blue:#3B82F6; --blue2:#5AA0F2;
  --amber:#F2B44E; --purple:#B9A6FF; --green:#3FD07A; --red:#F26D5B;
  display:block; color:var(--ink);
  font-family:'Inter',system-ui,sans-serif;
  padding-bottom:calc(var(--ar-navh,64px) + var(--ar-safe-b,0px) + 84px);
}
.ar-demandes a{ text-decoration:none; color:inherit; }
.ar-demandes svg{ display:block; }

/* En-tête */
.ar-dm-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:26px 16px 6px; }
.ar-dm-title{ margin:0; font:800 32px/1.05 'Inter',sans-serif; letter-spacing:-.4px; color:#fff; }
.ar-dm-sub{ margin:7px 0 0; font:400 15px/1.4 'Inter',sans-serif; color:var(--soft); }
.ar-dm-bell{ position:relative; width:52px; height:52px; flex:0 0 auto; border-radius:50%; border:1px solid var(--line); display:grid; place-items:center; color:#cfe0ff; }
.ar-dm-bell svg{ width:23px; height:23px; }
.ar-dm-bell::after{ content:""; position:absolute; top:12px; right:13px; width:9px; height:9px; border-radius:50%; background:var(--blue); }

/* Onglets */
.ar-dm-tabs{ display:flex; gap:12px; padding:14px 16px 0; margin:0 0 16px; border-bottom:1px solid var(--line); overflow-x:auto; }
.ar-dm-tab{ display:inline-flex; align-items:center; gap:9px; padding:9px 16px 13px; margin-bottom:-1px; background:none; border:0; border-radius:12px 12px 0 0; border-bottom:2.5px solid transparent; cursor:pointer; white-space:nowrap; font:700 15.5px/1 'Inter',sans-serif; color:var(--soft); }
.ar-dm-tab.is-on{ color:#fff; border-bottom-color:var(--blue); background:rgba(59,130,246,.10); }
.ar-dm-badge{ min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:rgba(255,255,255,.08); color:var(--soft); font:700 12px/22px 'Inter',sans-serif; text-align:center; }
.ar-dm-tab.is-on .ar-dm-badge{ background:var(--blue); color:#fff; }

.ar-dm-pane[hidden]{ display:none; }

/* Carte demande */
.ar-dm-list{ display:flex; flex-direction:column; gap:16px; margin:0 16px; }
.ar-dm-card{ border-radius:20px; background:var(--surf); border:1px solid var(--line); overflow:hidden; }
.ar-dm-top{ display:flex; align-items:center; gap:15px; padding:16px; }
.ar-dm-cover{ width:76px; height:76px; flex:0 0 auto; border-radius:50%; overflow:hidden; background:#16283c; }
.ar-dm-cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.ar-dm-body{ flex:1; min-width:0; }
.ar-dm-kind{ font:600 13px/1.2 'Inter',sans-serif; color:var(--soft); margin-bottom:2px; }
.ar-dm-name{ font:700 19px/1.25 'Inter',sans-serif; color:#fff; margin-bottom:9px; overflow-wrap:anywhere; }
.ar-dm-chip{ display:inline-flex; align-items:center; gap:7px; padding:6px 13px; border-radius:999px; font:700 13px/1 'Inter',sans-serif; border:1px solid transparent; }
.ar-dm-chip svg{ width:14px; height:14px; }
.ar-dm-chip-pending{ color:var(--amber); background:rgba(242,180,78,.12); border-color:rgba(242,180,78,.4); }
.ar-dm-chip-invite{ color:var(--purple); background:rgba(167,139,250,.15); border-color:rgba(167,139,250,.42); }
.ar-dm-chip-accepted{ color:var(--green); background:rgba(63,208,122,.14); border-color:rgba(63,208,122,.42); }
.ar-dm-chip-refused{ color:var(--red); background:rgba(242,109,91,.14); border-color:rgba(242,109,91,.42); }
.ar-dm-chev{ flex:0 0 auto; color:var(--soft); font:400 26px/1 'Inter',sans-serif; padding:0 2px; }

/* Pied « Envoyée à X » */
.ar-dm-foot{ display:flex; align-items:center; gap:11px; padding:13px 16px; border-top:1px solid var(--line); font:400 14px/1.2 'Inter',sans-serif; color:var(--soft); }
.ar-dm-send{ width:34px; height:34px; flex:0 0 auto; border-radius:50%; background:rgba(59,130,246,.14); color:var(--blue2); display:grid; place-items:center; }
.ar-dm-send svg{ width:16px; height:16px; }
.ar-dm-foot b{ color:#e7eefb; font-weight:700; }
.ar-dm-time{ margin-left:auto; color:var(--soft); font-size:13px; }

/* Boutons Accepter / Refuser */
.ar-dm-actions{ display:flex; gap:12px; padding:0 16px 16px; }
/* !important : une règle bouton globale de l'app impose un background-image bleu — on la neutralise. */
.ar-demandes .ar-dm-btn{ flex:1; display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:14px; border-radius:14px; font:700 15px/1 'Inter',sans-serif; cursor:pointer; background-image:none !important; background-color:transparent !important; border:1px solid transparent !important; box-shadow:none !important; }
.ar-demandes .ar-dm-btn svg{ width:17px; height:17px; }
.ar-demandes .ar-dm-btn-accept{ border-color:rgba(59,130,246,.55) !important; color:#dbe8ff !important; background-color:rgba(59,130,246,.12) !important; }
.ar-demandes .ar-dm-btn-accept svg{ color:var(--blue2); }
.ar-demandes .ar-dm-btn-refuse{ border-color:rgba(242,109,91,.5) !important; color:var(--red) !important; }
.ar-demandes .ar-dm-btn-refuse svg{ color:var(--red); }

/* CTA créer */
.ar-dm-cta{ display:flex; align-items:center; gap:16px; margin:6px 16px 0; padding:18px; border-radius:20px; border:1.5px dashed rgba(59,130,246,.5); background:linear-gradient(120deg,rgba(59,130,246,.10),rgba(59,130,246,.03)); }
.ar-dm-cta-ic{ width:58px; height:58px; flex:0 0 auto; border-radius:50%; background:rgba(59,130,246,.16); color:var(--blue2); display:grid; place-items:center; position:relative; }
.ar-dm-cta-ic svg{ width:26px; height:26px; }
.ar-dm-cta-tx{ flex:1; min-width:0; }
.ar-dm-cta-tt{ font:700 18px/1.25 'Inter',sans-serif; color:#fff; }
.ar-dm-cta-ds{ margin-top:3px; font:400 13.5px/1.4 'Inter',sans-serif; color:var(--soft); }
.ar-dm-cta-ch{ flex:0 0 auto; color:var(--soft); font:400 26px/1 'Inter',sans-serif; }

.ar-dm-empty{ margin:0 16px; padding:44px 18px; text-align:center; color:var(--soft); font:500 14.5px/1.5 'Inter',sans-serif; background:var(--surf); border:1px solid var(--line); border-radius:20px; }

/* ===========================================================================
   RÉCUP FONCTION — messagerie legacy « Cercles & moments privés » (.pv-layout)
   Exemptée du masque (voir plus haut). Reskin léger charte sombre : cyan
   électrique #00e5ff → cyan charte #35D7D1. Structure/JS/forms legacy inchangés.
   =========================================================================== */
html.apprefonte body.page-my-requests .pv-layout{
  margin:24px 16px 0 !important;
  border:1px solid rgba(53,215,209,.16) !important;
  border-radius:20px !important;
  background:#0C1D30 !important;
  min-height:0 !important;
}
/* Intertitre de section (le pagehead legacy reste masqué par le masque global) */
html.apprefonte body.page-my-requests .pv-layout::before{
  content:"🕊️ Cercles & moments privés";
  display:block; grid-column:1 / -1;
  padding:16px 16px 12px;
  font:800 20px/1.2 'Inter',system-ui,sans-serif; letter-spacing:-.3px; color:#fff;
  border-bottom:1px solid rgba(53,215,209,.12);
}
html.apprefonte body.page-my-requests .pv-sidebar{ background:rgba(7,22,36,.55) !important; border-color:rgba(53,215,209,.14) !important; }
html.apprefonte body.page-my-requests .pv-main{ background:rgba(7,22,36,.35) !important; }
/* Accents cyan électrique → cyan charte */
html.apprefonte body.page-my-requests .pv-new-btn{ background:rgba(53,215,209,.08) !important; border-color:rgba(53,215,209,.30) !important; color:#35D7D1 !important; }
html.apprefonte body.page-my-requests .pv-new-btn:hover{ background:rgba(53,215,209,.16) !important; }
html.apprefonte body.page-my-requests .pv-conv-item.is-active{ background:rgba(53,215,209,.10) !important; border-left-color:#35D7D1 !important; }
html.apprefonte body.page-my-requests .pv-conv-item:hover{ background:rgba(53,215,209,.06) !important; }
html.apprefonte body.page-my-requests .pv-conv-avatar{ border-color:rgba(53,215,209,.35) !important; color:#35D7D1 !important; }
html.apprefonte body.page-my-requests .pv-section-label{ color:rgba(53,215,209,.65) !important; }
html.apprefonte body.page-my-requests .pv-pigeon-icon svg{ filter:drop-shadow(0 0 8px rgba(53,215,209,.45)) !important; }
html.apprefonte body.page-my-requests .pv-pigeon-icon svg *[stroke="#00e5ff"]{ stroke:#35D7D1 !important; }
html.apprefonte body.page-my-requests .pv-pigeon-icon svg *[fill="#00e5ff"]{ fill:#35D7D1 !important; }
html.apprefonte body.page-my-requests .pv-main-title{ color:#F6F0DF !important; }
html.apprefonte body.page-my-requests .pv-bubble-row:not(.mine) .pv-bubble{ background:rgba(18,48,71,.60) !important; border-color:rgba(53,215,209,.16) !important; }
html.apprefonte body.page-my-requests .pv-bubble-row.mine .pv-bubble{ background:rgba(53,215,209,.14) !important; border-color:rgba(53,215,209,.30) !important; color:#eafcfb !important; }
html.apprefonte body.page-my-requests .pv-bubble-system{ background:rgba(53,215,209,.07) !important; border-color:rgba(53,215,209,.18) !important; }
html.apprefonte body.page-my-requests .pv-req-card{ background:rgba(12,29,48,.6) !important; border-color:rgba(53,215,209,.15) !important; }
html.apprefonte body.page-my-requests .pv-req-card-msg{ border-left-color:rgba(53,215,209,.30) !important; }
html.apprefonte body.page-my-requests .pv-composer textarea{ border-color:rgba(53,215,209,.20) !important; }
html.apprefonte body.page-my-requests .pv-composer textarea:focus{ border-color:rgba(53,215,209,.48) !important; }
html.apprefonte body.page-my-requests .pv-send-btn{ background:rgba(53,215,209,.14) !important; border-color:rgba(53,215,209,.38) !important; color:#35D7D1 !important; }
html.apprefonte body.page-my-requests .pv-send-btn:hover{ background:rgba(53,215,209,.26) !important; }
