/* Espace Certificats — front-end styles */

.bmc-account__title { margin: 1.5em 0 .75em; }

/* Quick search */
.bmc-quick-search { margin: 0 0 2em; padding: 1.25em; background: #f7f9fc; border: 1px solid #e3e8ef; border-radius: 10px; }
.bmc-quick-search__label { display: block; font-weight: 600; margin-bottom: .5em; font-size: 1.05em; }
.bmc-quick-search__field { position: relative; }
.bmc-quick-search__input { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; padding: .75em 2.5em .75em 1em; border: 1px solid #cfd6e0; border-radius: 8px; font-size: 1em; }
.bmc-quick-search__spinner { position: absolute; right: .9em; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid #cfd6e0; border-top-color: #2563eb; border-radius: 50%; opacity: 0; animation: bmc-spin .7s linear infinite; }
.bmc-quick-search.is-loading .bmc-quick-search__spinner { opacity: 1; }
@keyframes bmc-spin { to { transform: rotate(360deg); } }
.bmc-quick-search__results { margin-top: .5em; }
.bmc-quick-search__results a { display: flex; justify-content: space-between; gap: 1em; padding: .6em .8em; background: #fff; border: 1px solid #e3e8ef; border-radius: 6px; margin-bottom: .4em; text-decoration: none; color: inherit; }
.bmc-quick-search__results a:hover { border-color: #2563eb; }
.bmc-quick-search__results .bmc-qs-meta { color: #6b7280; font-size: .9em; }

/* Filters */
.bmc-filters { margin-bottom: 1.5em; padding: 1.25em; background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; }
.bmc-filters__row { display: flex; flex-wrap: wrap; gap: 1em; margin-bottom: 1em; }
.bmc-filters__row:last-child { margin-bottom: 0; }
.bmc-field { display: flex; flex-direction: column; flex: 1 1 160px; min-width: 0; }
.bmc-field--wide { flex: 2 1 220px; }
.bmc-field--actions { flex-direction: row; align-items: flex-end; gap: .75em; flex: 1 1 auto; }
.bmc-field label { font-size: .85em; font-weight: 600; color: #374151; margin-bottom: .3em; }
.bmc-field input, .bmc-field select { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; padding: .55em .7em; border: 1px solid #cfd6e0; border-radius: 6px; font-size: .95em; }
.bmc-reset { align-self: center; font-size: .9em; }

/* Table */
.bmc-table-wrap { overflow-x: auto; }
.bmc-table { width: 100%; border-collapse: collapse; }
.bmc-table th, .bmc-table td { padding: .75em .9em; text-align: left; border-bottom: 1px solid #eef1f5; }
.bmc-table thead th { background: #f7f9fc; font-size: .82em; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
.bmc-table tbody tr:hover { background: #fafbfd; }
.bmc-version { display: inline-block; margin-left: .35em; padding: 0 .4em; font-size: .75em; background: #eef2ff; color: #4338ca; border-radius: 4px; }
.bmc-muted { color: #9ca3af; }

.bmc-download { display: inline-flex; align-items: center; gap: .3em; font-weight: 600; text-decoration: none; color: #047857; }
.bmc-download .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Status badges */
.bmc-badge { display: inline-block; padding: .2em .6em; border-radius: 999px; font-size: .78em; font-weight: 600; }
.bmc-badge--valid { background: #dcfce7; color: #166534; }
.bmc-badge--expired { background: #fee2e2; color: #991b1b; }
.bmc-badge--replaced { background: #fef3c7; color: #92400e; }

/* Pagination */
.bmc-pagination { display: flex; gap: .4em; margin-top: 1.25em; flex-wrap: wrap; }
.bmc-page { padding: .35em .7em; border: 1px solid #e3e8ef; border-radius: 6px; text-decoration: none; color: #374151; }
.bmc-page--current { background: #2563eb; color: #fff; border-color: #2563eb; }

.bmc-empty { padding: 1.5em; background: #f7f9fc; border-radius: 8px; color: #6b7280; text-align: center; }

/* Info grid (verification page) */
.bmc-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9em; margin: .5em 0 0; }
.bmc-info-grid dt { font-size: .8em; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
.bmc-info-grid dd { margin: .15em 0 0; font-weight: 600; }

.bmc-order-notice { padding: .75em 1em; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; }

/* Verification page */
.bmc-verification { max-width: 640px; margin: 0 auto; }
.bmc-verification__field { display: flex; gap: .5em; }
.bmc-verification__field input { flex: 1; padding: .7em .9em; border: 1px solid #cfd6e0; border-radius: 8px; }
.bmc-verification__hint { font-size: .85em; color: #6b7280; margin-top: .5em; }
.bmc-verification__result { display: flex; gap: 1em; align-items: flex-start; margin-top: 1.5em; padding: 1.25em; border-radius: 10px; }
.bmc-verification__result .dashicons { font-size: 28px; width: 28px; height: 28px; }
.bmc-verification__result--valid { background: #f0fdf4; border: 1px solid #bbf7d0; }
.bmc-verification__result--valid .dashicons { color: #16a34a; }
.bmc-verification__result--expired { background: #fef2f2; border: 1px solid #fecaca; }
.bmc-verification__result--expired .dashicons { color: #dc2626; }
.bmc-verification__result--replaced { background: #fffbeb; border: 1px solid #fde68a; }
.bmc-verification__result--replaced .dashicons { color: #d97706; }
.bmc-verification__result--unknown { background: #f9fafb; border: 1px solid #e5e7eb; }
.bmc-verification__download { margin: 1em 0 0; }
.bmc-verification__download .dashicons { font-size: 18px; width: 18px; height: 18px; vertical-align: text-bottom; }

/* QR Code column ("Mes certificats") */
.bmc-qr-link { display: inline-flex; align-items: center; gap: .3em; font-weight: 600; text-decoration: none; color: #2563eb; }
.bmc-qr-link .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Bulk selection / ZIP download */
.bmc-col-check { width: 2.5em; text-align: center; }
.bmc-col-check input { width: 1.1em; height: 1.1em; }
.bmc-bulk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75em; margin-top: 1em; }
.bmc-bulk-button { display: inline-flex; align-items: center; gap: .3em; }
.bmc-bulk-hint { color: #6b7280; font-size: .85em; }

/* Responsive: stacked table */
@media (max-width: 640px) {
	.bmc-table thead { display: none; }
	.bmc-table, .bmc-table tbody, .bmc-table tr, .bmc-table td { display: block; width: 100%; }
	.bmc-table tr { margin-bottom: 1em; border: 1px solid #e3e8ef; border-radius: 8px; padding: .5em; }
	.bmc-table td { border: none; display: flex; justify-content: space-between; padding: .4em .5em; }
	.bmc-table td::before { content: attr(data-label); font-weight: 600; color: #6b7280; }
}
