/* Gestion : accueil en tuiles + un écran par rubrique (partagé V1 / V2) */
.ap-header { padding: 10px 16px; padding-top: calc(env(safe-area-inset-top) + 18px); }
.ap-back { min-height: 48px; padding: 0 16px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); font-size: 16px; font-weight: 800; border-radius: 14px; display: flex; align-items: center; gap: 8px; }
.ap-back::before { content: "←"; font-size: 18px; margin-right: 2px; }
.ap-back img { width: 26px; height: 26px; border-radius: 6px; }
.ap-title { font-size: 17px; }
.ap-sidebar { display: none !important; }
.ap-layout { display: block; min-height: 0; }
.ap-body { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(env(safe-area-inset-bottom) + 24px); gap: 12px; box-sizing: border-box; }

/* Accueil */
.adm-group { font-size: 11px; font-weight: 800; color: var(--text2); text-transform: uppercase; letter-spacing: 1.2px; margin: 8px 2px -2px; }
.adm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .adm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adm-tile { min-height: 112px; border-radius: 16px; background: var(--bg2); border: 2px solid var(--border); color: var(--text); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; padding: 14px; cursor: pointer; text-align: left; font-family: inherit; }
.adm-tile:active { border-color: var(--accent); background: var(--bg3); }
.adm-tile-icon { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.adm-tile-title { font-size: 16px; font-weight: 800; }
.adm-tile-sub { font-size: 12.5px; color: var(--text2); line-height: 1.3; }
.adm-tile-sub .warn { color: var(--red); font-weight: 800; }

/* Écrans */
.adm-toolbar { display: flex; gap: 8px; align-items: center; position: sticky; top: calc(env(safe-area-inset-top) + 88px); z-index: 20; background: var(--bg); padding: 6px 0; margin: -6px 0 0; }
.adm-search { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; background: var(--bg2); border: 1.5px solid var(--border); border-radius: 12px; color: var(--text); font-size: 16px; outline: none; box-sizing: border-box; font-family: inherit; }
.adm-search:focus { border-color: var(--accent); }
.adm-btn { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg3); color: var(--text); font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; font-family: inherit; flex-shrink: 0; }
.adm-btn:active { border-color: var(--accent); }
.adm-btn.primary { background: var(--accent); border-color: var(--accent); color: #000; }
.adm-btn.danger { color: var(--red); border-color: rgba(231,76,60,.45); background: rgba(231,76,60,.1); }
.adm-btn.good { color: var(--green, #2ecc71); border-color: rgba(46,204,113,.45); background: rgba(46,204,113,.1); }
.adm-btn.wide { width: 100%; }
.adm-btn.adm-sticky { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 20; min-height: 52px; background: var(--bg2); box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.adm-btn:disabled { opacity: .4; cursor: not-allowed; }
.adm-icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg3); font-size: 17px; cursor: pointer; margin-left: auto; }
.adm-icon-btn.danger { border-color: rgba(231,76,60,.35); background: rgba(231,76,60,.08); }
.adm-list { display: flex; flex-direction: column; gap: 8px; }
.adm-list > [hidden], [data-group][hidden] { display: none !important; }
.adm-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.adm-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-color: rgba(52,152,219,.35); background: linear-gradient(135deg, rgba(52,152,219,.12), rgba(155,89,182,.08)); }
.adm-hint { font-size: 13px; color: var(--text2); line-height: 1.4; margin-top: 2px; }
.adm-empty { font-size: 14px; color: var(--text2); font-style: italic; padding: 18px 4px; text-align: center; }
.adm-section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 800; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin: 10px 2px 0; }
.adm-links { display: flex; gap: 6px; text-transform: none; letter-spacing: 0; }
.adm-links button { min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: none; color: var(--text2); font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.adm-year { font-size: 12px; font-weight: 800; color: var(--accent); margin: 8px 2px 6px; text-transform: uppercase; letter-spacing: .5px; }
.adm-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-chip { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg2); color: var(--text2); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.adm-chip.on { border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,.1); }
.adm-check { width: 22px; height: 22px; accent-color: #e74c3c; cursor: pointer; flex-shrink: 0; }
.adm-check.restore { accent-color: #27ae60; }
.ap-archive-row.sel-archive { border-color: rgba(231,76,60,.5); background: rgba(231,76,60,.05); }
.ap-archive-row.sel-restore { border-color: rgba(39,174,96,.5); background: rgba(39,174,96,.05); }
.ap-archive-row.archived { opacity: .85; }
.ap-archive-badge.old { background: var(--bg3); color: var(--text2); }
.ap-archive-meta { flex: 1; min-width: 0; }
.adm-user-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.adm-user-actions .adm-btn { flex: 1; }
.ap-user-hdr { min-height: 56px; }
.ap-circuit-btn { min-width: 52px; min-height: 40px; }
.adm-textarea { width: 100%; background: var(--bg2); border: 1.5px solid var(--border); border-radius: 10px; color: var(--text); font-size: 15px; padding: 10px 12px; outline: none; resize: vertical; min-height: 80px; box-sizing: border-box; font-family: inherit; }
.adm-plan { width: 100%; text-align: left; cursor: pointer; font-family: inherit; color: var(--text); }
.adm-choice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg2); cursor: pointer; text-align: left; width: 100%; font-family: inherit; color: var(--text); }
.adm-choice.on { border-color: var(--accent); background: rgba(245,166,35,.08); }
.adm-choice-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.adm-choice-text b { font-size: 15px; }
.adm-choice-text span { font-size: 12.5px; color: var(--text2); }
.adm-swatch { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.adm-check-mark { color: var(--accent); font-size: 20px; font-weight: 800; }
