/* EventSika — Administration des organisateurs.
   Charger après style.css. Variables locales et thème sombre par défaut.
   Les règles data-theme="light" conservent les couleurs claires du fichier fourni.
   Les media queries restent distinctes pour préserver les adaptations responsive.
*/

.ao-page {
    --ao-bg: #11182b;
    --ao-text: #f1f5f9;
    --ao-muted: #a8b5ce;
    --ao-border: #303c56;
    color: var(--ao-text);
    width: min(1200px, 92%);
    font-family: "Segoe UI", sans-serif;
}

html[data-theme="light"] .ao-page {
    --ao-bg: #fff;
    --ao-text: #172033;
    --ao-muted: #52617c;
    --ao-border: #dce3ef;
}

.ao-page * {
    box-sizing: border-box;
}

.ao-page h1,
.ao-page h2,
.ao-page strong {
    color: var(--ao-text);
}

.ao-page h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
    margin: 10px 0;
    letter-spacing: -.03em;
}

.ao-page h2 {
    font-size: 1.2rem;
    margin: 0 0 20px;
}

.ao-page p {
    color: var(--ao-muted);
    line-height: 1.7;
}

.ao-page .ao-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ao-page .ao-eyebrow {
    font-weight: 700;
}

html[data-theme="light"] .ao-page .ao-eyebrow {
    color: #6d28d9;
}

.ao-page .ao-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ao-page .ao-stats>div,
.ao-page .ao-panel,
.ao-page .ao-filters {
    background: var(--ao-bg);
    border: 1px solid var(--ao-border);
}

.ao-page .ao-stats span,
.ao-page .ao-muted {
    color: var(--ao-muted);
}

.ao-page .ao-stats strong {
    display: block;
}

.ao-page .ao-filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.ao-page .ao-filters>div:first-child {
    flex: 1 1 280px;
}

.ao-page .ao-filters label {
    display: block;
    margin-bottom: 7px;
}

.ao-page .ao-filters input,
.ao-page .ao-filters select {
    color: var(--ao-text);
    border: 1px solid var(--ao-border);
    width: 100%;
    padding: 10px 12px;
    font: inherit;
}

.ao-page .ao-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    background: #6d28d9;
    color: #fff;
    font: 600 .9rem "Segoe UI", sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.ao-page .ao-button:hover {
    background: #5b21b6;
}

.ao-page .ao-secondary {
    background: var(--ao-bg);
    color: var(--ao-text);
    border-color: var(--ao-border);
}

.ao-page .ao-secondary:hover {
    border-color: #8b5cf6;
}

.ao-page .ao-danger {
    background: #b91c1c;
}

.ao-page .ao-danger:hover {
    background: #991b1b;
}

.ao-page .ao-link {
    font-weight: 600;
}

.ao-page .ao-reset,
.ao-page .ao-pagination a {
    color: #c4b5fd;
    font-weight: 600;
}

html[data-theme="light"] .ao-page .ao-link,
html[data-theme="light"] .ao-page .ao-reset,
html[data-theme="light"] .ao-page .ao-pagination a {
    color: #6d28d9;
}

.ao-page .ao-count {
    margin: 0;
}

.ao-page .ao-table-wrap {
    overflow-x: auto;
}

.ao-page table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ao-page th,
.ao-page td {
    border-bottom: 1px solid var(--ao-border);
    vertical-align: middle;
}

.ao-page th {
    color: var(--ao-muted);
    white-space: nowrap;
}

.ao-page td {
    color: var(--ao-text);
    overflow-wrap: anywhere;
}

.ao-page tbody tr:last-child td {
    border-bottom: 0;
}

.ao-page small {
    display: block;
    color: var(--ao-muted);
    margin-top: 5px;
}

.ao-page .ao-badge {
    border-radius: 50px;
    font-weight: 700;
}

.ao-page .ao-active {
    background: #dcfce7;
    color: #166534;
}

.ao-page .ao-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.ao-page .ao-empty {
    text-align: center;
    padding: 45px 20px;
    color: var(--ao-muted);
}

.ao-page .ao-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 24px;
}

.ao-page .ao-profile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 32px;
}

.ao-page dt {
    color: var(--ao-muted);
    font-size: .85rem;
}

.ao-page dd {
    margin: 4px 0 18px;
    overflow-wrap: anywhere;
}

.ao-page .ao-confirm {
    display: flex;
    align-items: start;
    gap: 10px;
    margin: 20px 0;
    font-size: .9rem;
}

.ao-page .ao-confirm input {
    margin-top: 4px;
}

.ao-page :is(a, button, input, select):focus-visible {
    outline: 3px solid #a78bfa;
    outline-offset: 3px;
}

.ao-page .ao-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width:700px) {
    .ao-page .ao-heading {
        align-items: start;
        flex-direction: column;
    }

    .ao-page .ao-profile {
        grid-template-columns: 1fr;
    }

    .ao-page .ao-stats {
        gap: 8px;
    }

    .ao-page .ao-stats>div,
    .ao-page th,
    .ao-page td {
        padding: 14px;
    }

    .ao-page .ao-filters>div {
        width: 100%;
    }
}

.ao-page {
    --ao-accent: #a78bfa;
    --ao-soft: rgba(139, 92, 246, .1);
    --ao-shadow: 0 10px 32px rgba(0, 0, 0, .12);
    margin: 0 auto;
    padding: 150px 0 70px;
    font-size: 15px;
}

html[data-theme="light"] .ao-page {
    --ao-accent: #6d28d9;
    --ao-soft: #f5f1ff;
    --ao-shadow: 0 8px 30px rgba(32, 24, 72, .05);
}

.ao-page .ao-heading {
    padding: 28px 30px;
    margin-bottom: 26px;
    border: 1px solid var(--ao-border);
    border-radius: 22px;
    background: linear-gradient(120deg, var(--ao-soft), transparent), var(--ao-bg);
    box-shadow: var(--ao-shadow);
}

.ao-page .ao-heading h1 {
    font-weight: 750;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.ao-page .ao-heading p {
    margin: 8px 0 0;
    font-size: .95rem;
}

.ao-page .ao-eyebrow {
    color: var(--ao-accent);
    font-size: .7rem;
    letter-spacing: .15em;
}

.ao-page .ao-stats {
    gap: 20px;
    margin: 0 0 26px;
}

.ao-page .ao-stats>div {
    position: relative;
    overflow: hidden;
    padding: 24px 26px;
    border-radius: 18px;
    box-shadow: var(--ao-shadow);
    border-top: 3px solid #8b5cf6;
}

.ao-page .ao-stats>div:nth-child(2) {
    border-top-color: #10b981;
}

.ao-page .ao-stats>div:nth-child(3) {
    border-top-color: #f59e0b;
}

.ao-page .ao-stats>div::after {
    content: "";
    position: absolute;
    right: -12px;
    bottom: -28px;
    width: 110px;
    height: 110px;
    border: 18px solid var(--ao-soft);
    border-radius: 50%;
    pointer-events: none;
}

.ao-page .ao-stats span {
    font-size: .85rem;
    font-weight: 600;
}

.ao-page .ao-stats strong {
    font-size: 2.4rem;
    font-weight: 750;
    line-height: 1.2;
    margin-top: 14px;
}

.ao-page .ao-filters {
    padding: 24px;
    gap: 16px;
    box-shadow: var(--ao-shadow);
    border-radius: 18px;
}

.ao-page .ao-filters label {
    font-weight: 600;
    color: var(--ao-text);
    font-size: .8rem;
}

.ao-page .ao-filters input,
.ao-page .ao-filters select {
    min-height: 48px;
    background: var(--ao-soft);
    border-color: var(--ao-border);
    border-radius: 11px;
}

.ao-page .ao-filters input::placeholder {
    color: var(--ao-muted);
    opacity: 1;
}

.ao-page .ao-filters input:focus,
.ao-page .ao-filters select:focus {
    border-color: #8b5cf6;
}

.ao-page .ao-button {
    min-height: 46px;
    border-radius: 11px;
    transition: background .2s ease, box-shadow .2s ease;
}

.ao-page .ao-button:not(.ao-secondary):not(.ao-danger) {
    background: linear-gradient(115deg, #6d28d9, #9333ea);
    box-shadow: 0 5px 14px rgba(109, 40, 217, .18);
}

.ao-page .ao-button:not(.ao-secondary):not(.ao-danger):hover {
    background: #5b21b6;
    box-shadow: 0 7px 20px rgba(109, 40, 217, .25);
}

.ao-page .ao-secondary {
    white-space: nowrap;
}

.ao-page .ao-reset {
    padding: 12px 0;
    text-decoration: none;
    font-size: .85rem;
}

.ao-page .ao-reset:hover {
    text-decoration: underline;
}

.ao-page .ao-panel {
    border-radius: 18px;
    box-shadow: var(--ao-shadow);
}

.ao-page .ao-count {
    padding: 20px 24px;
    font-weight: 600;
    font-size: .85rem;
    border-bottom: 1px solid var(--ao-border);
}

.ao-page table {
    font-size: .875rem;
}

.ao-page th {
    padding: 16px 22px;
    background: var(--ao-soft);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.ao-page td {
    padding: 22px;
}

.ao-page tbody tr:hover {
    background: var(--ao-soft);
}

.ao-page td strong {
    font-weight: 650;
}

.ao-page small {
    font-size: .75rem;
    line-height: 1.5;
}

.ao-page .ao-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    font-size: .73rem;
}

.ao-page .ao-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ao-page .ao-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--ao-border);
    border-radius: 9px;
    background: var(--ao-soft);
    color: var(--ao-accent);
    font-size: .8rem;
    text-decoration: none;
    white-space: nowrap;
}

.ao-page .ao-link:hover {
    background: #6d28d9;
    color: #fff;
    border-color: #6d28d9;
}

html[data-theme="light"] .ao-page .ao-link:hover {
    color: #fff;
}

.ao-page .ao-pagination a {
    padding: 9px 14px;
    background: var(--ao-bg);
    border: 1px solid var(--ao-border);
    border-radius: 10px;
    text-decoration: none;
}

.ao-page .ao-pagination span {
    color: var(--ao-muted);
    font-size: .85rem;
}

.ao-page .ao-profile {
    gap: 22px;
}

.ao-page .ao-padding {
    padding: 28px;
}

.ao-page .ao-profile h2 {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ao-border);
}

@media (max-width:700px) {
    .ao-page {
        padding-top: 120px;
    }

    .ao-page .ao-heading {
        padding: 22px;
    }

    .ao-page .ao-stats {
        gap: 10px;
    }

    .ao-page .ao-stats>div {
        padding: 18px 14px;
    }

    .ao-page .ao-stats strong {
        font-size: 1.9rem;
    }

    .ao-page .ao-stats>div::after {
        display: none;
    }

    .ao-page .ao-filters {
        padding: 18px;
    }

    .ao-page th,
    .ao-page td {
        padding: 16px;
    }

    .ao-page .ao-padding {
        padding: 22px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .ao-page .ao-button {
        transition: none;
    }
}
