/* Éléments partagés : boutons, alertes, étiquettes, sections repliables, indicateur de chargement. */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: 15px; transition: background-color .15s, border-color .15s, opacity .15s; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--border); font-weight: 500; }
.btn.ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--faint); transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .i { width: 16px; height: 16px; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-top: 16px; }
.alert .i { margin-top: 2px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert li + li { margin-top: 2px; }
.alert.warn { background: var(--warn-bg); color: var(--text); } .alert.warn .i { color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--text); } .alert.bad .i { color: var(--bad); }
.alert strong { display: block; margin-bottom: 2px; }

.tag { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 4px; line-height: 18px; }
.tag.warn { color: var(--warn); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

details.more { border: 1px solid var(--border); border-radius: 10px; margin-top: 12px; }
details.more > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; min-height: 44px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .chev { margin-left: auto; transition: transform .15s; color: var(--faint); }
details.more[open] > summary .chev { transform: rotate(180deg); }
details.more > .body { padding: 0 14px 14px; font-size: 14px; display: grid; gap: 12px; }

.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--focus); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.btn .spinner { width: 16px; height: 16px; border-color: rgb(255 255 255 / .35); border-top-color: #fff; }
