/* Bonjour · boîte de réception, charte vert profond / or (sans panneau blanc). */
body[data-bonjour-pwa="1"] #homeView .home-top-actions .bonjour-inbox-button{
  position:relative;display:grid!important;place-items:center!important;flex:0 0 44px;
  width:44px;height:44px;border-radius:14px!important;
  border:1px solid rgba(255,204,73,.90)!important;
  background:linear-gradient(155deg,#12473e,#052b25)!important;
  color:#ffd35c!important;box-shadow:0 6px 18px rgba(3,22,18,.25)!important;cursor:pointer;
}
body[data-bonjour-pwa="1"] #homeView .home-top-actions .bonjour-inbox-button svg{stroke:#ffd35c!important}
.bonjour-inbox-count{position:absolute;top:-7px;right:-7px;background:linear-gradient(#ffe07e,#fcb637);color:#0b3f3c;border:1px solid #e7b13d;border-radius:20px;min-width:20px;padding:2px 5px;font:700 11px/15px Roboto,Arial,sans-serif;text-align:center}
.bonjour-inbox-panel{position:fixed;z-index:999990;right:max(12px,env(safe-area-inset-right));top:72px;width:min(394px,calc(100vw - 24px));max-height:min(72dvh,620px);background:linear-gradient(155deg,#0b3933 0%,#061d19 70%,#031512 100%);color:#f7faf8;border:1px solid rgba(239,195,88,.42);border-radius:17px;box-shadow:0 22px 50px rgba(2,11,9,.6);overflow:hidden}
.bonjour-inbox-panel.hidden,.bonjour-inbox-count.hidden{display:none!important}
.bonjour-inbox-heading{display:flex;align-items:center;justify-content:space-between;padding:15px 17px;border-bottom:1px solid rgba(255,226,144,.17);background:rgba(0,0,0,.11)}
.bonjour-inbox-heading strong{font:700 15px/1.35 Roboto,Arial,sans-serif;color:#ffce58}
.bonjour-inbox-heading button{display:grid;place-items:center;width:37px;height:37px;background:linear-gradient(145deg,#10483e,#06241e);border:1px solid rgba(255,211,93,.28);border-radius:11px;color:#f8faf8;font-size:23px;cursor:pointer}
.bonjour-inbox-content{overflow:auto;max-height:min(63dvh,520px);padding:9px}
.bonjour-inbox-item{display:flex;flex-direction:column;gap:5px;width:100%;min-height:88px;text-align:left;background:linear-gradient(150deg,#103d35,#092722);border:1px solid rgba(255,230,166,.13);margin:0 0 9px;padding:12px 13px;border-radius:13px;color:#f6faf8;cursor:pointer;overflow-wrap:anywhere}
.bonjour-inbox-item:hover,.bonjour-inbox-item:focus-visible{border-color:rgba(255,205,78,.72);background:linear-gradient(150deg,#155044,#0a2c25)}
.bonjour-inbox-item[data-unread="true"]{border-left:4px solid #ffcd58;background:linear-gradient(155deg,#154a3e,#082d26)}
.bonjour-inbox-item strong{font:700 14px/1.32 Roboto,Arial,sans-serif;color:#fff}
.bonjour-inbox-item span{font:400 13px/1.5 Roboto,Arial,sans-serif;color:#e3ede9;white-space:pre-wrap}
.bonjour-inbox-item small{font:400 11px/1.3 Roboto,Arial,sans-serif;color:#a9c3ba}
.bonjour-inbox-item em{font:700 12px/1.35 Roboto,Arial,sans-serif;font-style:normal;color:#ffd162;margin-top:3px}
.bonjour-inbox-empty{padding:22px 16px;text-align:center;font:400 13px/1.65 Roboto,Arial,sans-serif;color:#d8e5df}
@media(max-width:760px){.bonjour-inbox-panel{top:calc(64px + env(safe-area-inset-top));max-height:72dvh}body[data-bonjour-pwa="1"] #homeView .home-top-actions .bonjour-inbox-button{width:38px;height:38px;flex-basis:38px;border-radius:12px!important}}
/* Bonjour 1.22.38 : actions distinctes, consultation et suppression persistantes. */
.bonjour-inbox-item{cursor:default}
.bonjour-inbox-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:8px}
.bonjour-inbox-actions button{min-height:38px;max-width:100%;padding:8px 13px;border-radius:10px;font:700 12px/1.25 Roboto,Arial,sans-serif;cursor:pointer}
.bonjour-inbox-open{flex:1 1 155px;border:1px solid rgba(255,207,94,.94);background:linear-gradient(180deg,#ffe17c,#ffb52e);color:#103b35}
.bonjour-inbox-delete{flex:0 0 auto;background:linear-gradient(155deg,#12473e,#052b25);border:1px solid rgba(255,204,73,.72);color:#ffd35c}
.bonjour-inbox-actions button:focus-visible{outline:2px solid #ffe17c;outline-offset:3px}
@media(max-width:360px){.bonjour-inbox-actions{gap:6px}.bonjour-inbox-actions button{font-size:11px;padding:8px 10px}}

/* Feedback sur les écritures de notifications : visible sans masquer les messages. */
.bonjour-inbox-feedback{margin:5px 0 12px;padding:11px 13px;border-radius:11px;border:1px solid rgba(255,206,95,.45);background:linear-gradient(150deg,#123f36,#08251f);color:#f9e4a8;font:500 12px/1.5 Roboto,Arial,sans-serif}
.bonjour-inbox-actions button{touch-action:manipulation;pointer-events:auto;position:relative;z-index:1}

/* 1.22.43 — Détail lisible lorsque les archives ne contiennent pas de route précise. */
.bonjour-inbox-detail{display:flex;flex-direction:column;gap:12px;padding:14px 13px 21px;color:#f7faf8}
.bonjour-inbox-detail strong{font:700 clamp(17px,4.2vw,21px)/1.25 Dubai,Roboto,Arial,sans-serif;color:#fff}
.bonjour-inbox-detail p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:500 14px/1.55 Dubai,Roboto,Arial,sans-serif;color:#e6f0eb}
.bonjour-inbox-detail small{color:#b9cac3;font:400 12px Dubai,Roboto,Arial,sans-serif}
.bonjour-inbox-detail .bonjour-inbox-detail-note{font-size:12px;color:#b7d0c5}
.bonjour-inbox-detail button{min-height:40px;border-radius:10px;cursor:pointer;font:700 13px/1.25 Dubai,Roboto,Arial,sans-serif}
.bonjour-inbox-detail-back{align-self:flex-start;padding:6px 14px;background:linear-gradient(145deg,#12463d,#072720);color:#ffcf5c;border:1px solid #eabb50}
.bonjour-inbox-detail-go{padding:10px 16px;background:linear-gradient(180deg,#ffe17c,#ffb52e);color:#12372f;border:0}

/* 1.22.49 — Sur tablette / laptop / PC, la messagerie devient une fenêtre centrée,
   comme les autres dialogues Bonjour. L’ancrage mobile reste inchangé. */
.bonjour-inbox-backdrop.hidden{display:none!important}
@media(min-width:761px){
  .bonjour-inbox-backdrop:not(.hidden){
    display:block;position:fixed;inset:0;z-index:999989;
    background:rgba(1,13,11,.47);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  }
  body[data-bonjour-pwa="1"] .bonjour-inbox-panel:not(.hidden){
    position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;
    transform:translate(-50%,-50%)!important;
    width:min(610px,calc(100vw - 48px))!important;
    max-width:calc(100vw - 48px)!important;max-height:min(82dvh,770px)!important;
    border-radius:20px!important;box-shadow:0 28px 75px rgba(0,0,0,.54)!important;
  }
  body[data-bonjour-pwa="1"] .bonjour-inbox-panel .bonjour-inbox-content{
    max-height:min(69dvh,655px)!important;overscroll-behavior:contain;
  }
  body[data-bonjour-pwa="1"] .bonjour-inbox-panel .bonjour-inbox-heading{padding:20px 23px}
  body[data-bonjour-pwa="1"] .bonjour-inbox-panel .bonjour-inbox-heading strong{
    font:700 21px/1.2 Dubai,Roboto,Arial,sans-serif!important;
  }
}
@media(max-width:760px){.bonjour-inbox-backdrop{display:none!important}}
