/* Coin lecture [asptt_documents] (extrait de module-documents.php, v2.86.0).
   Astra ecrase <a>, <button> et les emoji : regles scopees #asptt-doc-wrap ... !important. */

/* Ecran de connexion */
.asptt-doc-login-box{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:28px 24px;
                      text-align:center;box-shadow:0 1px 6px rgba(0,0,0,.08);max-width:400px;margin:0 auto}
.asptt-doc-login-box h2{color:#1e3a5f;margin:0 0 8px;font-size:20px}
.doc-login-input{width:100%;padding:11px 14px;border:2px solid #d1d5db;border-radius:8px;
                        font-size:16px;text-align:center;box-sizing:border-box;margin-bottom:0}
.doc-login-input:focus{outline:none;border-color:#1e3a5f}
.asptt-doc-login-btn{width:100%;background:#1e3a5f;color:#fff;border:none;border-radius:8px;
                      padding:12px 24px;font-size:15px;font-weight:700;cursor:pointer}
.asptt-doc-login-btn:hover{background:#162d4a}

/* Coin */
.asptt-doc-wrap{font-family:system-ui,sans-serif;font-size:15px;color:#1f2937;min-width:0}
#asptt-doc-wrap img.emoji{display:inline !important;vertical-align:-0.1em !important;width:1em !important;height:1em !important;margin:0 !important}

/* Aide */
.asptt-doc-help{background:#f0f9ff;border:1px solid #bae6fd;border-radius:8px;padding:14px 16px;
                margin:0 0 12px;font-size:12px;line-height:1.6}
.asptt-doc-help h4{color:#1e40af;font-size:13px;margin:0 0 8px}
.asptt-doc-help h5{color:#1e3a5f;font-size:12px;font-weight:700;margin:10px 0 3px}

.asptt-doc-count{font-size:13px;color:#6b7280;margin:0 0 10px}
.asptt-doc-vide{color:#9ca3af;font-style:italic;text-align:center;padding:30px 0}

/* Recherche (2.87.0, au-dela de 6 documents) */
.asptt-doc-search{position:relative;margin:0 0 10px;max-width:420px}
#asptt-doc-wrap .asptt-doc-search > svg.asptt-doc-svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#6b7280 !important;pointer-events:none}
#asptt-doc-wrap #asptt-doc-q{width:100% !important;box-sizing:border-box !important;height:44px !important;margin:0 !important;
                padding:0 44px 0 38px !important;border:1.5px solid #d1d5db !important;border-radius:10px !important;background:#fff !important;
                font-size:16px !important;color:#1f2937 !important;box-shadow:none !important;-webkit-appearance:none;appearance:none}
#asptt-doc-wrap #asptt-doc-q:focus{outline:none !important;border-color:#1e3a5f !important;box-shadow:0 0 0 3px rgba(30,58,95,.12) !important}
#asptt-doc-wrap #asptt-doc-q::-webkit-search-cancel-button{-webkit-appearance:none;display:none}
#asptt-doc-wrap .asptt-doc-q-clear{all:unset;box-sizing:border-box;position:absolute;right:2px;top:2px;width:40px;height:40px;cursor:pointer;
                display:flex !important;align-items:center;justify-content:center;border-radius:8px;color:#6b7280 !important;background:transparent !important}
#asptt-doc-wrap .asptt-doc-q-clear[hidden]{display:none !important}
#asptt-doc-wrap .asptt-doc-q-clear:hover{color:#1e3a5f !important;background:#f3f4f6 !important}
#asptt-doc-wrap .asptt-doc-item[hidden],#asptt-doc-wrap .asptt-doc-list[hidden],#asptt-doc-wrap .asptt-doc-aucun[hidden]{display:none !important}
.asptt-doc-aucun{background:#fff;border:1px dashed #d1d5db;border-radius:12px;padding:18px 16px;text-align:center;color:#6b7280;font-size:14px}
#asptt-doc-wrap .asptt-doc-q-reset{all:unset;cursor:pointer;color:#1e3a5f !important;font-weight:700 !important;text-decoration:underline !important;
                text-transform:none !important;background:transparent !important}

/* Ordinateur : grille de cartes */
.asptt-doc-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.asptt-doc-item{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:14px;cursor:pointer;min-width:0;
                display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:12px;row-gap:10px;
                transition:border-color .15s,box-shadow .15s}
.asptt-doc-item:hover{border-color:#1e3a5f;box-shadow:0 4px 14px rgba(30,58,95,.1)}
.asptt-doc-item:focus-visible{outline:2px solid #0e7490;outline-offset:2px}
.asptt-doc-ico{width:44px;height:44px;border-radius:10px;background:#e8eef6;display:flex;align-items:center;justify-content:center;
               font-size:22px;line-height:1}
.asptt-doc-txt{min-width:0}
.asptt-doc-titre{font-weight:700;color:#1e3a5f;font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.asptt-doc-desc{font-size:13px;color:#6b7280;line-height:1.4;margin-top:2px;
                display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.asptt-doc-desc-vide{font-style:italic;opacity:.75}
.asptt-doc-acts{grid-column:1 / -1;display:flex;gap:8px;align-self:end;flex-wrap:wrap}
#asptt-doc-wrap .asptt-doc-btn{display:inline-flex !important;align-items:center !important;gap:6px !important;border-radius:8px !important;
                padding:7px 12px !important;font-size:13.5px !important;font-weight:600 !important;line-height:1.3 !important;
                text-transform:none !important;letter-spacing:normal !important;text-decoration:none !important;cursor:pointer !important;
                box-shadow:none !important;min-height:0 !important}
#asptt-doc-wrap .asptt-doc-btn-lire{background:#1e3a5f !important;color:#fff !important;border:1px solid #1e3a5f !important}
#asptt-doc-wrap .asptt-doc-btn-lire:hover{background:#162d4a !important}
#asptt-doc-wrap .asptt-doc-btn-dl{background:#fff !important;color:#374151 !important;border:1px solid #d1d5db !important}
#asptt-doc-wrap .asptt-doc-btn-dl:hover{background:#f3f4f6 !important}
#asptt-doc-wrap .asptt-doc-dl-ico{display:none !important}
#asptt-doc-wrap svg.asptt-doc-svg{width:16px !important;height:16px !important;fill:none !important;stroke:currentColor !important;stroke-width:2 !important;
                stroke-linecap:round;stroke-linejoin:round;flex:none;display:inline-block !important}

/* Telephone : lignes compactes dans un seul bloc, la ligne entiere ouvre le document */
@media (max-width:720px){
  /* separateurs par l'espace de 1 px : restent justes quand la recherche masque des lignes */
  .asptt-doc-list{grid-template-columns:1fr;gap:1px;background:#e5e7eb;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden}
  .asptt-doc-item{display:flex;align-items:center;gap:12px;border:0;border-radius:0;padding:10px 6px 10px 12px}
  .asptt-doc-search{max-width:none}
  .asptt-doc-item:hover{box-shadow:none;background:#f3f6fa}
  .asptt-doc-ico{width:40px;height:40px;font-size:20px;flex:none}
  .asptt-doc-txt{flex:1}
  .asptt-doc-acts{display:none}
  #asptt-doc-wrap .asptt-doc-dl-ico{display:flex !important;align-items:center !important;justify-content:center !important;
                  width:44px !important;height:44px !important;border-radius:10px !important;color:#6b7280 !important;flex:none;
                  background:transparent !important;text-decoration:none !important}
  #asptt-doc-wrap .asptt-doc-dl-ico:hover{background:#eef2f6 !important;color:#1e3a5f !important}
  #asptt-doc-wrap .asptt-doc-dl-ico svg.asptt-doc-svg{width:20px !important;height:20px !important}
}

/* Visionneuse (2.86.1) : fenetre sur ordinateur, plein ecran sur telephone, pages et zoom en bas.
   Hors de #asptt-doc-wrap : boutons scopes #asptt-doc-viewer-overlay ... !important contre Astra. */
html.asptt-doc-noscroll,html.asptt-doc-noscroll body{overflow:hidden}
.asptt-modal-overlay{display:none;position:fixed;inset:0;background:rgba(10,20,35,.55);
                      z-index:99990;align-items:center;justify-content:center;padding:20px;font-family:system-ui,sans-serif}
.asptt-modal-overlay.open{display:flex}
.asptt-doc-viewer-box{background:#fff;border-radius:14px;max-width:860px;width:100%;height:92vh;
                       display:flex;flex-direction:column;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,.25)}
.asptt-doc-viewer-hdr{background:#1e3a5f;color:#fff;padding:8px 10px;display:flex;align-items:center;gap:8px;flex:none}
#asptt-doc-viewer-titre{flex:1;min-width:0;font-weight:700;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#asptt-doc-viewer-overlay .asptt-doc-vhb{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex !important;align-items:center !important;gap:6px !important;
                min-height:40px !important;padding:6px 10px !important;border-radius:8px !important;color:#fff !important;background:transparent !important;
                font-size:13.5px !important;font-weight:600 !important;text-transform:none !important;letter-spacing:normal !important;
                text-decoration:none !important;line-height:1.2 !important;flex:none}
#asptt-doc-viewer-overlay .asptt-doc-vhb:hover{background:rgba(255,255,255,.12) !important}
.asptt-doc-viewer-canvas-wrap{overflow:auto;flex:1;min-height:0;text-align:center;padding:16px;background:#dfe5ec;-webkit-overflow-scrolling:touch}
#asptt-doc-loading{color:#4b5563;padding:40px 16px;text-align:center;font-size:14px}
#asptt-doc-canvas{box-shadow:0 1px 8px rgba(0,0,0,.18);background:#fff;vertical-align:top;max-width:none}
.asptt-doc-viewer-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;flex:none;
                       padding:8px 12px;padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px));border-top:1px solid #e5e7eb;background:#fff}
.asptt-doc-vgrp{display:flex;align-items:center;gap:6px}
#asptt-doc-viewer-overlay .asptt-doc-vb{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex !important;align-items:center !important;justify-content:center !important;
                gap:5px !important;height:44px !important;min-width:44px !important;padding:0 12px !important;border-radius:10px !important;
                background:#f3f4f6 !important;border:1px solid #d1d5db !important;color:#1f2937 !important;font-size:18px !important;font-weight:600 !important;
                text-transform:none !important;letter-spacing:normal !important;line-height:1 !important;box-shadow:none !important}
#asptt-doc-viewer-overlay .asptt-doc-vb .asptt-doc-vlbl{font-size:13.5px}
#asptt-doc-viewer-overlay .asptt-doc-vb:hover{background:#e5e7eb !important}
#asptt-doc-viewer-overlay .asptt-doc-vb:disabled{opacity:.4 !important;cursor:default !important}
#asptt-doc-viewer-overlay .asptt-doc-vb:focus-visible,#asptt-doc-viewer-overlay .asptt-doc-vhb:focus-visible{outline:2px solid #0e7490 !important;outline-offset:2px}
#asptt-doc-page-info{font-family:ui-monospace,Consolas,monospace;font-size:13px;color:#4b5563;min-width:64px;text-align:center;font-variant-numeric:tabular-nums}
#asptt-doc-viewer-overlay svg.asptt-doc-svg{width:20px !important;height:20px !important;fill:none !important;stroke:currentColor !important;stroke-width:2 !important;
                stroke-linecap:round;stroke-linejoin:round;flex:none;display:inline-block !important}
@media (max-width:720px){
  .asptt-modal-overlay{padding:0}
  .asptt-doc-viewer-box{max-width:none;height:100%;border-radius:0;box-shadow:none}
  .asptt-doc-viewer-hdr{padding-top:calc(8px + env(safe-area-inset-top, 0px))}
  .asptt-doc-viewer-canvas-wrap{padding:8px}
  #asptt-doc-viewer-overlay .asptt-doc-vlbl{display:none}
  .asptt-doc-viewer-bar{flex-wrap:nowrap;padding-left:8px;padding-right:8px}
}
