/*
 * AUL Communauté — habillage « Bootstrap moderne ».
 * Palette : marron #DA870C, blanc #FFFFFF, gris foncé #282623.
 * Contraste : le marron n'est jamais du texte sur fond blanc ; il sert de fond (texte gris foncé), de filet ou d'accent.
 * Tout est préfixé .aulx- et variables locales : on peut surcharger depuis le thème (ex. .aulx-scope { --x-radius: 8px; }).
 */
.aulx-scope {
    --x-brand: #DA870C;
    --x-brand-600: #C27709;
    --x-brand-300: #F2B65A;
    --x-brand-soft: #FDF3E1;
    --x-ink: #282623;
    --x-ink-2: #3A3733;
    --x-white: #FFFFFF;
    --x-paper: #FAF7F2;
    --x-line: #ECE6DA;
    --x-muted: #6A655D;
    --x-error: #9B2C1D;
    --x-ok: #1E6B3A;
    --x-radius: 16px;
    --x-radius-sm: 10px;
    --x-shadow-sm: 0 1px 2px rgba(40, 38, 35, .06), 0 1px 3px rgba(40, 38, 35, .05);
    --x-shadow: 0 2px 4px rgba(40, 38, 35, .04), 0 8px 24px rgba(40, 38, 35, .08);
    --x-shadow-lg: 0 4px 8px rgba(40, 38, 35, .05), 0 16px 40px rgba(40, 38, 35, .14);
    --x-ring: 0 0 0 4px rgba(218, 135, 12, .35);
    color: var(--x-ink);
    line-height: 1.6;
    box-sizing: border-box;
}
.aulx-scope *, .aulx-scope *::before, .aulx-scope *::after { box-sizing: inherit; }
.aulx-scope a { color: var(--x-ink); text-decoration-color: var(--x-brand); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: background-color .15s ease, text-decoration-color .15s ease; }
.aulx-scope a:hover { background: var(--x-brand-soft); text-decoration-color: var(--x-ink); }
.aulx-scope :focus-visible { outline: 2px solid var(--x-ink); outline-offset: 2px; box-shadow: var(--x-ring); border-radius: 6px; }
.aulx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Espace contributeur : grille 3 / 7 / 2 sur 12 ---------- */
.aulx-wrap { container-type: inline-size; container-name: aulx; width: 100%; }
.aulx-space { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px; align-items: start; }
.aulx-col--3 { grid-column: span 3; }
.aulx-col--7 { grid-column: span 7; min-width: 0; }
.aulx-col--2 { grid-column: span 2; }
.aulx-col--3 { position: sticky; top: 24px; }
@container aulx (max-width: 980px) {
    .aulx-col--3 { grid-column: span 4; }
    .aulx-col--7 { grid-column: span 8; }
    .aulx-col--2 { grid-column: 1 / -1; order: 3; }
}
@container aulx (max-width: 640px) {
    .aulx-col--3, .aulx-col--7, .aulx-col--2 { grid-column: 1 / -1; position: static; }
}

/* ---------- Cartes ---------- */
.aulx-card {
    background: var(--x-white);
    border: 1px solid var(--x-line);
    border-radius: var(--x-radius);
    padding: 22px;
    margin: 0 0 22px;
    box-shadow: var(--x-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.aulx-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--x-brand), var(--x-brand-300)); }
.aulx-me.aulx-card, .aulx-hero.aulx-card { box-shadow: var(--x-shadow); }
.aulx-memberlist .aulx-card, .aulx-item.aulx-card, .aulx-tile.aulx-card { box-shadow: var(--x-shadow-sm); }
.aulx-item.aulx-card:hover, .aulx-tile.aulx-card:hover, .aulx-memberlist .aulx-card:hover { box-shadow: var(--x-shadow); transform: translateY(-2px); border-color: #E2D6BD; }

.aulx-title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.15; margin: 0 0 18px; color: var(--x-ink); font-weight: 800; letter-spacing: -.02em; }
.aulx-lead { color: var(--x-muted); font-size: 1.05rem; margin: 0 0 20px; max-width: 62ch; }
.aulx-count { font-weight: 500; color: var(--x-muted); }
.aulx-muted, .aulx-hint { color: var(--x-muted); font-size: .9rem; margin: 4px 0; }
.aulx-section { margin: 0 0 32px; }
.aulx-section__title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.aulx-section__title::before { content: ""; width: 6px; height: 1.2em; border-radius: 99px; background: var(--x-brand); flex: none; }
.aulx-card .aulx-section__title { margin-top: 0; }

/* ---------- Avatars, étoiles ---------- */
.aulx-avatar { border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; background: var(--x-brand-soft); box-shadow: 0 0 0 3px var(--x-white), 0 0 0 5px var(--x-brand-300); }
.aulx-avatar--empty { display: inline-flex; align-items: center; justify-content: center; color: var(--x-brand-600); background: linear-gradient(135deg, var(--x-brand-soft), #F8E2B8); }
.aulx-avatars .aulx-avatar, .aulx-comment__avatar .aulx-avatar, .aulx-member .aulx-avatar { box-shadow: 0 0 0 2px var(--x-white), 0 0 0 3px var(--x-line); }
.aulx-avatar-link { display: inline-block; border-radius: 50%; text-decoration: none; transition: transform .15s ease; }
.aulx-avatar-link:hover { transform: scale(1.1); background: none; }
.aulx-stars { display: inline-flex; gap: 2px; font-size: 1.15rem; line-height: 1; }
.aulx-star { color: #D9D2C3; }
.aulx-star.is-on { color: var(--x-brand); text-shadow: 0 0 1px var(--x-ink), 0 0 1px var(--x-ink); }

/* ---------- Colonne 1 ---------- */
.aulx-me { text-align: center; padding-top: 28px; }
.aulx-me__avatar { margin-bottom: 14px; }
.aulx-me__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.aulx-me__pseudo { margin: 2px 0 0; color: var(--x-muted); }
.aulx-level { margin: 16px 0; padding: 14px; background: var(--x-paper); border-radius: var(--x-radius-sm); }
.aulx-level__name { font-weight: 700; margin: 6px 0 0; }
.aulx-level__count { margin: 0; color: var(--x-muted); font-size: .9rem; }
.aulx-progress { height: 10px; background: #E9E2D3; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.aulx-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--x-brand), var(--x-brand-300)); border-radius: 99px; }
.aulx-me__cta { margin: 16px 0 0; }
.aulx-menu { padding: 10px; }
.aulx-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.aulx-menu a { display: block; padding: 11px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; overflow-wrap: anywhere; transition: background-color .15s ease, padding-left .15s ease; }
.aulx-menu a:hover { background: var(--x-brand-soft); padding-left: 18px; }
.aulx-menu a[aria-current="page"] { background: var(--x-ink); color: var(--x-white); box-shadow: inset 4px 0 0 var(--x-brand); }

/* ---------- Colonne 3 ---------- */
.aulx-network { padding: 18px; }
.aulx-network__title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--x-muted); font-weight: 700; margin: 0 0 10px; }
.aulx-avatars { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Boutons ---------- */
.aulx-scope .aulx-btn,
.aulx-scope button.aulx-btn,
.aulx-scope a.aulx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(180deg, #E8951A, var(--x-brand)); color: var(--x-ink) !important;
    border: 0; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 700; line-height: 1.2;
    text-decoration: none; cursor: pointer; overflow-wrap: anywhere;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 4px 12px rgba(218, 135, 12, .35);
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.aulx-scope .aulx-btn:hover, .aulx-scope button.aulx-btn:hover, .aulx-scope a.aulx-btn:hover { background: var(--x-ink); color: var(--x-white) !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(40, 38, 35, .3); }
.aulx-scope .aulx-btn:active { transform: translateY(0); }
.aulx-scope .aulx-btn--ghost, .aulx-scope button.aulx-btn--ghost, .aulx-scope a.aulx-btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--x-ink); }
.aulx-scope .aulx-btn--ghost:hover, .aulx-scope button.aulx-btn--ghost:hover, .aulx-scope a.aulx-btn--ghost:hover { background: var(--x-ink); }
.aulx-scope .aulx-btn--block { display: flex; width: 100%; }
.aulx-link { font-weight: 700; }

/* ---------- Messages ---------- */
.aulx-notice { border: 1px solid var(--x-line); border-left: 5px solid var(--x-ink); background: var(--x-white); padding: 14px 16px; border-radius: var(--x-radius-sm); margin: 0 0 18px; box-shadow: var(--x-shadow-sm); }
.aulx-notice--success { border-left-color: var(--x-ok); background: #F0F9F3; }
.aulx-notice--error { border-left-color: var(--x-error); background: #FDF1EF; }
.aulx-notice--info { border-left-color: var(--x-brand); background: var(--x-brand-soft); }
.aulx-error { color: var(--x-error); font-size: .9rem; margin: 6px 0 0; font-weight: 600; }
.aulx-callout { background: linear-gradient(135deg, var(--x-brand-soft), #FFF9EE); border: 1px solid #F1DDB4; border-radius: var(--x-radius); padding: 22px; margin: 0 0 22px; }
.aulx-callout p:last-child { margin-bottom: 0; }

/* ---------- Listes, fil ---------- */
.aulx-list, .aulx-feed, .aulx-memberlist, .aulx-grid { list-style: none; margin: 0; padding: 0; }
.aulx-item__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.aulx-item__title { font-size: 1.08rem; font-weight: 700; }
.aulx-item__meta { color: var(--x-muted); font-size: .9rem; margin: 4px 0 10px; }
.aulx-feed__item { background: var(--x-white); border: 1px solid var(--x-line); border-radius: var(--x-radius); padding: 18px 20px; margin: 0 0 14px; box-shadow: var(--x-shadow-sm); transition: box-shadow .2s ease, transform .2s ease; }
.aulx-feed__item:hover { box-shadow: var(--x-shadow); transform: translateY(-2px); }
.aulx-feed--priority .aulx-feed__item { border-left: 5px solid var(--x-brand); background: linear-gradient(90deg, #FFFBF3, var(--x-white) 40%); }
.aulx-feed__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--x-muted); font-size: .85rem; margin: 0 0 8px; }
.aulx-feed__kind { font-weight: 700; color: var(--x-ink); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
.aulx-feed__title { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
.aulx-feed__excerpt { margin: 0; color: var(--x-muted); }
.aulx-quote { margin: 0 0 10px; padding: 10px 16px; border-left: 4px solid var(--x-brand); border-radius: 0 var(--x-radius-sm) var(--x-radius-sm) 0; color: var(--x-ink); background: var(--x-paper); font-style: italic; }
.aulx-memberlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.aulx-memberlist .aulx-card { margin: 0; padding: 16px; }
.aulx-member { display: inline-flex; gap: 12px; align-items: center; }
.aulx-member__text { display: flex; flex-direction: column; gap: 2px; }

.aulx-chip { display: inline-flex; align-items: center; background: var(--x-brand-soft); color: var(--x-ink); border: 1px solid #F0D6A4; border-radius: 999px; padding: 2px 12px; font-size: .8rem; font-weight: 600; }
.aulx-chip--dark { background: var(--x-ink); color: var(--x-white); border-color: var(--x-ink); }
.aulx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.aulx-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 12px; font-size: .78rem; font-weight: 700; background: var(--x-paper); border: 1px solid var(--x-line); color: var(--x-ink); }
.aulx-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; }
.aulx-badge--pending { background: #FFF8E6; border-color: #F1DDB4; }
.aulx-badge--published { background: #EAF6EE; border-color: #A9D5B9; color: var(--x-ok); }
.aulx-badge--validated { background: var(--x-brand-soft); border-color: #F0D6A4; color: #7A4A00; }
.aulx-badge--rejected { background: #FDF1EF; border-color: #E7B7B0; color: var(--x-error); }

/* ---------- Formulaires ---------- */
.aulx-form { padding: 26px; }
.aulx-form .aulx-field { margin: 0 0 16px; }
.aulx-fieldset { border: 1px solid var(--x-line); border-radius: var(--x-radius-sm); padding: 18px 20px; margin: 0 0 22px; background: #FFFEFC; }
.aulx-fieldset legend { font-weight: 800; padding: 0 10px; font-size: .95rem; letter-spacing: -.01em; }
.aulx-label { display: block; font-weight: 700; font-size: .92rem; margin: 0 0 6px; }
.aulx-scope input[type="text"], .aulx-scope input[type="search"], .aulx-scope input[type="date"], .aulx-scope input[type="password"],
.aulx-scope select, .aulx-scope textarea {
    width: 100%; max-width: 100%; padding: 11px 14px; border: 1.5px solid #B9B1A2; border-radius: 12px; font: inherit;
    background: var(--x-white); color: var(--x-ink); box-shadow: 0 1px 2px rgba(40, 38, 35, .04) inset;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.aulx-scope input[type="text"]:hover, .aulx-scope input[type="search"]:hover, .aulx-scope input[type="date"]:hover,
.aulx-scope input[type="password"]:hover, .aulx-scope select:hover, .aulx-scope textarea:hover { border-color: var(--x-ink-2); }
.aulx-scope input:focus, .aulx-scope select:focus, .aulx-scope textarea:focus { border-color: var(--x-ink); outline: none; box-shadow: var(--x-ring); }
.aulx-scope input[type="file"] { width: 100%; padding: 10px; border: 2px dashed #CBBFA4; border-radius: 12px; background: var(--x-paper); font: inherit; }
.aulx-scope input[type="file"]::file-selector-button { margin-right: 12px; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--x-ink); color: var(--x-white); font-weight: 700; cursor: pointer; }
.aulx-scope input[type="checkbox"] { accent-color: var(--x-brand); width: 18px; height: 18px; }
.aulx-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.aulx-field--check label { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; cursor: pointer; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; transition: background-color .15s ease; }
.aulx-field--check label:hover { background: var(--x-brand-soft); }
.aulx-field--check input { margin-top: 3px; flex: none; }
.aulx-field--check small { display: block; font-weight: 400; }
.aulx-checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 18px; }
.aulx-photo { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.aulx-photo__fields { flex: 1 1 260px; min-width: 0; }
.aulx-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* ---------- Annuaire ---------- */
.aulx-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; align-items: end; padding: 22px; box-shadow: var(--x-shadow); }
.aulx-filters .aulx-field { margin: 0; }
.aulx-filters__actions { display: flex; gap: 16px; align-items: center; }
.aulx-results { margin: 0 0 16px; color: var(--x-muted); font-weight: 600; }
.aulx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.aulx-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 0; padding: 28px 18px 22px; }
.aulx-tile__link { display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; }
.aulx-tile__link:hover { background: none; }
.aulx-tile__name { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.aulx-tile__level { font-weight: 700; font-size: .85rem; }
.aulx-tile__count { color: var(--x-muted); font-size: .85rem; background: var(--x-paper); border-radius: 999px; padding: 2px 12px; }

/* ---------- Profil public ---------- */
.aulx-hero { display: flex; gap: 28px; flex-wrap: wrap; padding: 32px; background: linear-gradient(135deg, #FFFFFF 55%, var(--x-brand-soft)); }
.aulx-hero__main { flex: 1 1 320px; min-width: 0; }
.aulx-hero .aulx-title { margin-bottom: 8px; }
.aulx-stats { list-style: none; display: flex; gap: 12px; flex-wrap: wrap; padding: 0; margin: 14px 0; }
.aulx-stats li { background: var(--x-white); border: 1px solid var(--x-line); border-radius: 12px; padding: 8px 16px; box-shadow: var(--x-shadow-sm); }
.aulx-stats strong { font-size: 1.25rem; font-weight: 800; margin-right: 4px; }
.aulx-bio { margin: 12px 0; font-size: 1.05rem; }
.aulx-hero__actions { margin-top: 16px; }
.aulx-public__cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .aulx-public__cols { grid-template-columns: 1fr; } .aulx-hero { padding: 22px; } }

/* ---------- Pagination ---------- */
.aulx-pagination { margin: 26px 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.aulx-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border: 1.5px solid var(--x-line); border-radius: 12px; text-decoration: none; color: var(--x-ink); background: var(--x-white); font-weight: 700; box-shadow: var(--x-shadow-sm); transition: transform .15s ease, background-color .15s ease; }
.aulx-pagination .page-numbers.current { background: var(--x-ink); border-color: var(--x-ink); color: var(--x-white); }
.aulx-pagination a.page-numbers:hover { background: var(--x-brand); border-color: var(--x-brand); transform: translateY(-1px); }

/* ---------- Commentaires ---------- */
.aulx-comments { margin: 48px 0 0; padding: 28px; background: var(--x-paper); border-radius: var(--x-radius); border: 1px solid var(--x-line); }
.aulx-comments__heading { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 18px; }
.aulx-comments__list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.aulx-comment { display: flex; gap: 16px; padding: 18px; background: var(--x-white); border: 1px solid var(--x-line); border-radius: var(--x-radius); box-shadow: var(--x-shadow-sm); }
.aulx-comment__body { flex: 1; min-width: 0; }
.aulx-comment__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; color: var(--x-muted); font-size: .88rem; }
.aulx-comment__author { color: var(--x-ink); font-weight: 800; }
.aulx-comment__text p { margin: 0 0 8px; }
.aulx-comments__title { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.aulx-comments textarea { min-height: 130px; }
.aulx-comments .aulx-callout { background: var(--x-white); }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: no-preference) { .aulx-progress span { transition: width .6s ease; } }
@media (prefers-reduced-motion: reduce) {
    .aulx-scope *, .aulx-scope *::before, .aulx-scope *::after { transition: none !important; }
    .aulx-card:hover, .aulx-feed__item:hover, .aulx-scope .aulx-btn:hover { transform: none !important; }
}

/* ---------- Bandeau et fond des modèles de page du thème ---------- */
.aulx-page { color: #282623; }
.aulx-band {
    position: relative; overflow: hidden; color: #FFFFFF; padding: 72px 0 64px;
    background: radial-gradient(1200px 400px at 85% -20%, rgba(218, 135, 12, .45), transparent 60%), linear-gradient(135deg, #282623, #3A3733);
    border-bottom: 5px solid #DA870C;
}
.aulx-band::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; border: 48px solid rgba(218, 135, 12, .18); }
.aulx-band > * { position: relative; z-index: 1; }
.aulx-band h1 { color: #FFFFFF; margin: 0 0 12px; font-size: clamp(2rem, 1.4rem + 2.5vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.aulx-band h1 em { color: #F2B65A; font-style: normal; }
.aulx-band p { margin: 0; max-width: 60ch; color: #EDE7DC; font-size: 1.1rem; }
.aulx-eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; color: #282623; background: #DA870C; border-radius: 999px; padding: 4px 14px; margin: 0 0 14px; }
.aulx-paper { background: linear-gradient(180deg, #FAF7F2, #F3EEE4); padding: 48px 0 72px; }