/* FB Article Submit — frontend (Padlet-inspired, friendly UI) */
.fbas-shell { max-width: 760px; margin: 32px auto; padding: 0 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1c1e21; }
.fbas-card { background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.08); padding: 24px; }

.fbas-form-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.fbas-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #1877f2, #4f8ef7); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.fbas-form-head small { display: block; color: #65676b; font-size: 13px; margin-top: 2px; }

.fbas-title { width: 100%; border: 0; outline: 0; font-size: 30px; font-weight: 700; padding: 10px 0 16px; border-bottom: 2px solid #f0f2f5; margin-bottom: 18px; background: transparent; }
.fbas-title:focus { border-color: #1877f2; }
.fbas-title::placeholder { color: #b0b3b8; font-weight: 600; }

/* Champ catégorie */
.fbas-field { margin-bottom: 18px; }
.fbas-label { display: block; font-size: 14px; font-weight: 600; color: #1c1e21; margin-bottom: 8px; }
.fbas-select { width: 100%; padding: 12px 14px; border: 1px solid #e4e6eb; border-radius: 10px; background: #f7f8fa; font-size: 15px; font-family: inherit; color: #1c1e21; cursor: pointer; transition: border-color .15s, background .15s; }
.fbas-select:focus { outline: 0; border-color: #1877f2; background: #fff; }

/* Sections */
.fbas-section { margin: 24px 0 18px; padding-top: 18px; border-top: 1px solid #f0f2f5; }
.fbas-section-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: #1c1e21; }
.fbas-section-help { font-size: 13px; color: #65676b; margin: 0 0 12px; }

.fbas-editor-wrap { margin-bottom: 18px; }
.fbas-editor-wrap .wp-editor-container { border-radius: 12px; overflow: hidden; border: 1px solid #e4e6eb; }
.fbas-editor-wrap .mce-toolbar-grp { background: #f7f8fa !important; border-bottom: 1px solid #e4e6eb !important; }

/* Boutons d'ajout style Padlet */
.fbas-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.fbas-block-btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f7f8fa; border: 2px dashed #d0d3d9; border-radius: 12px; cursor: pointer; text-align: left; transition: all .15s; font-family: inherit; }
.fbas-block-btn:hover { background: #e7f0fe; border-color: #1877f2; transform: translateY(-1px); }
.fbas-block-btn .fbas-block-icon { font-size: 28px; line-height: 1; }
.fbas-block-btn strong { display: block; font-size: 15px; color: #1c1e21; }
.fbas-block-btn small { display: block; font-size: 12px; color: #65676b; margin-top: 2px; }
@media (max-width: 520px) { .fbas-blocks { grid-template-columns: 1fr; } }

.fbas-gallery-zone { padding-top: 4px; }
.fbas-drop { border: 2px dashed #d0d3d9; border-radius: 12px; padding: 24px 16px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.fbas-drop:hover, .fbas-drop.is-drag { background: #f0f7ff; border-color: #1877f2; }
.fbas-drop-icon { display: inline-block; font-size: 28px; line-height: 1; color: #1877f2; margin-bottom: 6px; }
.fbas-drop p { margin: 4px 0; }
.fbas-muted { color: #65676b; font-size: 13px; }

.fbas-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fbas-grid li { position: relative; background: #f0f2f5; border-radius: 12px; overflow: hidden; aspect-ratio: 1/1; display: flex; flex-direction: column; cursor: grab; }
.fbas-grid li.is-cover { outline: 3px solid #1877f2; outline-offset: -3px; }
.fbas-grid li.is-cover .fbas-cover-badge { display: block; }
.fbas-cover-badge { display: none; position: absolute; top: 8px; left: 8px; background: #1877f2; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .3px; }
.fbas-grid img { width: 100%; height: 70%; object-fit: cover; display: block; }
.fbas-grid .fbas-cap { border: 0; outline: 0; padding: 6px 8px; font-size: 12px; background: #fff; flex: 1; }
.fbas-grid .fbas-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.fbas-iconbtn { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 14px; }
.fbas-iconbtn:hover { background: #e41e3f; }
.fbas-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.1); }
.fbas-progress > span { display: block; height: 100%; background: #1877f2; width: 0; transition: width .2s; }

/* Liste PDF */
.fbas-pdf-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 20px; }
.fbas-pdf-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f7f8fa; border-radius: 10px; border: 1px solid #e4e6eb; }
.fbas-pdf-item.is-uploading { opacity: .65; }
.fbas-pdf-ico { font-size: 22px; }
.fbas-pdf-title { flex: 1; font-size: 14px; font-weight: 500; word-break: break-all; }
.fbas-pdf-state { font-size: 12px; color: #65676b; }
.fbas-pdf-del { background: rgba(0,0,0,.4); }

.fbas-form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid #f0f2f5; gap: 12px; flex-wrap: wrap; }
.fbas-actions-foot { display: flex; gap: 8px; }
.fbas-status { color: #65676b; font-size: 13px; min-height: 1em; }
.fbas-status.is-error { color: #d93025; }
.fbas-status.is-success { color: #0a8754; font-weight: 600; }

.fbas-btn { display: inline-block; padding: 11px 20px; border-radius: 10px; border: 0; font-weight: 600; cursor: pointer; font-size: 14px; text-decoration: none; transition: all .15s; }
.fbas-btn-primary { background: #1877f2; color: #fff; }
.fbas-btn-primary:hover { background: #166fe5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(24,119,242,.3); }
.fbas-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.fbas-btn-ghost { background: #e4e6eb; color: #1c1e21; }
.fbas-btn-ghost:hover { background: #d8dadf; }

.fbas-auth h2 { margin-top: 0; }

/* Modale d'aperçu */
.fbas-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; }
.fbas-modal[hidden] { display: none; }
.fbas-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); }
.fbas-modal-box { position: relative; background: #fff; border-radius: 16px; max-width: 760px; width: 100%; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.fbas-modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f0f2f5; cursor: pointer; font-size: 16px; }
.fbas-modal-close:hover { background: #e4e6eb; }
.fbas-modal-body h1 { margin-top: 0; font-size: 32px; }

/* PDF embed (frontend + preview) */
.fbas-pdf-embed { margin: 24px 0; border: 1px solid #e4e6eb; border-radius: 12px; overflow: hidden; background: #f7f8fa; }
.fbas-pdf-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e4e6eb; }
.fbas-pdf-icon { font-size: 18px; }
.fbas-pdf-name { flex: 1; font-weight: 600; font-size: 14px; }
.fbas-pdf-dl { font-size: 13px; color: #1877f2; text-decoration: none; font-weight: 600; }
.fbas-pdf-dl:hover { text-decoration: underline; }
.fbas-pdf-frame { width: 100%; height: 600px; border: 0; display: block; }

/* Galerie publique en bas des articles */
.fbas-gallery-title { font-size: 22px; font-weight: 700; margin: 32px 0 12px; padding-top: 24px; border-top: 1px solid #e4e6eb; }
.fbas-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 16px 0 32px; }
.fbas-gallery-item { margin: 0; background: #f7f8fa; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; }
.fbas-gallery-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.fbas-gallery-item a { display: block; }
.fbas-gallery-item img { width: 100%; height: 200px; object-fit: cover; display: block; }
.fbas-gallery-item figcaption { font-size: 13px; color: #65676b; padding: 8px 12px; text-align: center; }
