/* AnimyJob V6 — communauté, jeux, médias et coloriathèque. Scope strict. */
.aj-community-v6 {
  --ajc-ink: #083f58;
  --ajc-muted: #526b78;
  --ajc-blue: #1976a3;
  --ajc-blue-dark: #0d5877;
  --ajc-orange: #f47c1c;
  --ajc-soft: #eef7fa;
  --ajc-cream: #fff6ed;
  --ajc-line: #d7e3e8;
  --ajc-card: #fff;
  --ajc-shadow: 0 18px 52px rgba(20,43,74,.09);
  color: var(--ajc-ink);
  background: linear-gradient(180deg,#f7fafb 0,#fff 560px);
  isolation: isolate;
}

.aj-community-v6 *,
.aj-community-v6 *::before,
.aj-community-v6 *::after { box-sizing: border-box; }

.aj-community-v6 .aj-community-v6__hero,
.aj-community-v6.aj-community-v6__hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(25,118,163,.18);
  border-radius: 30px;
  background:
    radial-gradient(circle at 89% 12%,rgba(244,124,28,.16),transparent 27%),
    radial-gradient(circle at 72% 115%,rgba(25,118,163,.14),transparent 33%),
    linear-gradient(135deg,#fff,#eef7fa);
  box-shadow: 0 24px 70px rgba(20,80,145,.10);
}

.aj-community-v6 .aj-community-v6__hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -88px;
  right: -64px;
  border: 30px solid rgba(255,255,255,.58);
  border-radius: 50%;
  pointer-events: none;
}

.aj-community-v6 .aj-community-v6__hero > * { position: relative; z-index: 1; }
.aj-community-v6 .aj-community-v6__hero h1 {
  color: var(--ajc-ink);
  font-family: "Manrope","Nunito",system-ui,sans-serif;
  font-size: clamp(38px,5vw,64px);
  letter-spacing: -.045em;
  line-height: 1.03;
}

.aj-community-v6 .aj-community-v6__layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 310px;
  align-items: start;
  gap: 28px;
}

.aj-community-v6 .aj-community-v6__panel,
.aj-community-v6 .forum-main,
.aj-community-v6 .forum-sidebar-card,
.aj-community-v6 .ajg-content-section,
.aj-community-v6 .aj-section,
.aj-community-v6 .aj-search-panel {
  border-color: var(--ajc-line);
  border-radius: 24px;
  background: var(--ajc-card);
  box-shadow: 0 13px 40px rgba(20,43,74,.06);
}

.aj-community-v6 :where(input,select,textarea) { border-color: #cfdaea; border-radius: 12px; }
.aj-community-v6 :where(input,select,textarea):focus {
  border-color: var(--ajc-blue);
  box-shadow: 0 0 0 4px rgba(18,104,232,.10);
  outline: 0;
}
.aj-community-v6 :where(button,.btn,[class*="button"]) { border-radius: 12px; }

/* Anecdotes et médiathèque legacy. */
.aj-community-v6--legacy .main-page-title {
  width: min(1180px,calc(100% - 40px));
  margin: 24px auto 28px;
  padding: clamp(30px,5vw,58px);
}
.aj-community-v6--legacy .main-page-title .container { width: 100%; padding: 0; }
.aj-community-v6--legacy > .container {
  width: min(1180px,calc(100% - 40px));
  margin-inline: auto;
}
.aj-community-v6--legacy .presentation,
.aj-community-v6--legacy form,
.aj-community-v6--legacy .quest,
.aj-community-v6--legacy .job-side-wrap2,
.aj-community-v6--legacy #affichervideo {
  border: 1px solid var(--ajc-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--ajc-shadow);
}
.aj-community-v6--legacy .presentation,
.aj-community-v6--legacy form { padding: 24px; }
.aj-community-v6--legacy .quest { overflow: hidden; margin-bottom: 18px; padding: 22px; }
.aj-community-v6--legacy .video {
  overflow: hidden;
  border: 1px solid var(--ajc-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20,43,74,.07);
  transition: transform .2s ease,box-shadow .2s ease;
}
.aj-community-v6--legacy .video:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20,80,145,.13); }
.aj-community-v6--legacy #affichervideo { min-height: 140px; padding: 18px; }
.aj-community-v6--legacy .aj-community-v6__main { padding-bottom: 54px; }
.aj-community-v6--legacy .aj-community-v6__intro,
.aj-community-v6--legacy .aj-community-v6__content,
.aj-community-v6--legacy .aj-community-v6__form-card {
  width: min(1180px,calc(100% - 40px));
  margin-inline: auto;
}
.aj-community-v6--legacy .aj-community-v6__intro { padding: 0; }
.aj-community-v6--legacy .aj-community-v6__form-card { overflow: hidden; padding: clamp(22px,3vw,34px); }
.aj-community-v6--legacy .aj-community-v6__section-head { margin-bottom: 20px; }
.aj-community-v6--legacy .aj-community-v6__section-head span {
  color: var(--ajc-orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.aj-community-v6--legacy .aj-community-v6__section-head h2 { margin: 4px 0 0; color: var(--ajc-ink); }
.aj-community-v6--legacy .aj-community-v6__story-card { border-left: 4px solid var(--ajc-blue); }
.aj-community-v6--legacy .aj-community-v6__sidebar { min-width: 0; }
.aj-community-v6--legacy .aj-community-v6__sidebar > * { margin-bottom: 20px; }
.aj-community-v6--legacy .aj-community-v6__pagination { margin-top: 24px; }
.aj-community-v6--media .aj-community-v6__ad { float: none; padding: 0; }
.aj-community-v6--media .aj-community-v6__media-layout {
  display: grid;
  grid-template-columns: minmax(240px,300px) minmax(0,1fr);
  align-items: start;
  gap: 28px;
}
.aj-community-v6--media .aj-community-v6__media-sidebar {
  position: sticky;
  top: 22px;
  min-width: 0;
}
.aj-community-v6--media .aj-community-v6__media-sidebar .aj-community-v6__form-card { width: 100%; }
.aj-community-v6--media .aj-community-v6__player { margin: 20px 0 0; }
.aj-community-v6--media .aj-community-v6__player .col-md-12 { float: none; width: 100%; padding: 0; }
.aj-community-v6--media .aj-community-v6__media-library {
  min-width: 0;
  padding: clamp(22px,3vw,34px);
  border: 1px solid var(--ajc-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--ajc-shadow);
}
.aj-community-v6--media .aj-community-v6__video-card { height: 100%; cursor: pointer; }

/* Forum : garde les postLinks, formulaires et IDs, affine la composition. */
.aj-community-v6--forum .forum-hero { margin: 0 auto 28px; }
.aj-community-v6--forum .forum-hero-inner,
.aj-community-v6--forum .forum-content { width: min(1180px,calc(100% - 40px)); }
.aj-community-v6--forum .forum-hero-inner { padding: clamp(32px,5vw,60px); }
.aj-community-v6--forum .aj-community-v6__forum-workspace { display: block; }
.aj-community-v6--forum .forum-layout { grid-template-columns: minmax(0,1fr) 310px; gap: 28px; }
.aj-community-v6--forum .forum-main { padding: clamp(20px,3vw,34px); }
.aj-community-v6--forum :where(.forum-question-card,.forum-thread-card,.forum-reply-card,.forum-form-card) {
  border-color: var(--ajc-line);
  border-radius: 20px;
  box-shadow: 0 10px 32px rgba(20,43,74,.065);
}
.aj-community-v6--forum .forum-sidebar { position: sticky; top: 22px; }
.aj-community-v6--forum .forum-sidebar-card { overflow: hidden; }
.aj-community-v6--forum .forum-hero p { color: var(--ajc-muted); }
.aj-community-v6--forum .forum-benefit {
  border-color: var(--ajc-line);
  background: #fff;
  color: var(--ajc-ink);
}
.aj-community-v6--forum .forum-benefit::before { background: var(--ajc-soft); color: var(--ajc-blue-dark); }
.aj-community-v6--forum .forum-submit-button {
  border-color: var(--ajc-blue) !important;
  background: var(--ajc-blue) !important;
  color: #fff !important;
}
.aj-community-v6--forum .forum-submit-button:hover,
.aj-community-v6--forum .forum-submit-button:focus {
  border-color: var(--ajc-blue-dark) !important;
  background: var(--ajc-blue-dark) !important;
  color: #fff !important;
}

/* Jeux d’animation. */
.aj-community-v6--games .ajg-hero,
.aj-community-v6--games .ajg-category-hero,
.aj-community-v6--games .ajg-game-hero { border-radius: 0 0 34px 34px; }
.aj-community-v6--games .ajg-shell { width: min(1180px,calc(100% - 40px)); }
.aj-community-v6--games .ajg-hero__grid,
.aj-community-v6--games .ajg-category-hero__content,
.aj-community-v6--games .ajg-game-hero__grid { padding-block: clamp(30px,5vw,62px); }
.aj-community-v6--games .aj-community-v6__game-catalog,
.aj-community-v6--games .aj-community-v6__game-detail { display: flow-root; padding-bottom: 18px; }
.aj-community-v6--games :where(.ajg-results,.ajg-category-section,.ajg-editorial,.ajg-fact-panel,.ajg-similar) {
  margin-block: 28px;
  padding: clamp(22px,3vw,36px);
  border: 1px solid var(--ajc-line);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 13px 40px rgba(20,43,74,.06);
}
.aj-community-v6--games :where(.ajg-card,.ajg-category-card,.ajg-sidebar-card,.ajg-toc) {
  border-color: var(--ajc-line);
  border-radius: 19px;
}
.aj-community-v6--games .ajg-game-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 28px; }
.aj-community-v6--games .ajg-game-sidebar { position: sticky; top: 22px; }
.aj-community-v6--games .ajg-hero { color: var(--ajc-ink); }
.aj-community-v6--games .ajg-breadcrumb,
.aj-community-v6--games .ajg-breadcrumb a,
.aj-community-v6--games .ajg-hero__lead { color: var(--ajc-text); }
.aj-community-v6--games .ajg-hero__proofs span { border-color: var(--ajc-line); background: #fff; color: var(--ajc-text); backdrop-filter: none; }
.aj-community-v6--games .ajg-hero__proofs strong { color: var(--ajc-blue-dark); }
.aj-community-v6--games .ajg-hero__answer { border-color: var(--ajc-line); background: #fff; color: var(--ajc-text); box-shadow: 0 14px 38px rgba(20,43,74,.08); }
.aj-community-v6--games .ajg-hero__answer strong { color: var(--ajc-ink); }
.aj-community-v6--games .ajg-hero__answer p { color: var(--ajc-text); }
.aj-community-v6--games .ajg-filters__toggle { width: 100%; padding: 14px 0 0; border: 0; border-radius: 0; justify-content: space-between; background: transparent; color: var(--ajc-blue-dark); box-shadow: none; }
.aj-community-v6--games .ajg-filters__toggle:hover { border: 0; background: transparent; color: var(--ajc-blue); box-shadow: none; transform: none; }
.aj-community-v6--games .ajg-button--primary { border-color: var(--ajc-orange); background: var(--ajc-orange); color: #fff; }

/* Coloriathèque : conserve galerie, modale, sélection et PDF. */
.aj-community-v6--coloring.aj-color { background: linear-gradient(180deg,#f7fafb,#fff 560px); }
.aj-community-v6--coloring .aj-container { width: min(1180px,calc(100% - 40px)); }
.aj-community-v6--coloring .aj-hero,
.aj-community-v6--coloring .aj-collection-hero { padding: clamp(28px,4vw,52px); }
.aj-community-v6--coloring .aj-search-panel,
.aj-community-v6--coloring .aj-section,
.aj-community-v6--coloring .aj-editorial { margin-block: 28px; padding: clamp(22px,3vw,36px); }
.aj-community-v6--coloring :where(.aj-card,.aj-coloring,.aj-info,.aj-statbox) {
  border-color: var(--ajc-line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(20,43,74,.065);
}
.aj-community-v6--coloring :where(.aj-card,.aj-coloring) { transition: transform .2s ease,box-shadow .2s ease; }
.aj-community-v6--coloring :where(.aj-card,.aj-coloring):hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(20,80,145,.13); }
.aj-community-v6--coloring .aj-bookbar { border-radius: 20px 20px 0 0; box-shadow: 0 -12px 34px rgba(20,43,74,.12); }

@media (max-width:900px) {
  .aj-community-v6 .aj-community-v6__layout,
  .aj-community-v6--forum .forum-layout,
  .aj-community-v6--games .ajg-game-layout,
  .aj-community-v6--media .aj-community-v6__media-layout { grid-template-columns: 1fr; }
  .aj-community-v6--forum .forum-sidebar,
  .aj-community-v6--games .ajg-game-sidebar,
  .aj-community-v6--media .aj-community-v6__media-sidebar { position: static; }
}

@media (max-width:680px) {
  .aj-community-v6--legacy .main-page-title,
  .aj-community-v6--legacy > .container,
  .aj-community-v6--legacy .aj-community-v6__intro,
  .aj-community-v6--legacy .aj-community-v6__content,
  .aj-community-v6--legacy .aj-community-v6__form-card,
  .aj-community-v6--forum .forum-hero-inner,
  .aj-community-v6--forum .forum-content,
  .aj-community-v6--games .ajg-shell,
  .aj-community-v6--coloring .aj-container { width: min(100% - 24px,1180px); }
  .aj-community-v6 .aj-community-v6__hero h1 { font-size: clamp(34px,10vw,46px); }
  .aj-community-v6--games .ajg-filters__main,
  .aj-community-v6--games .ajg-filters__advanced { grid-template-columns: 1fr; }
  .aj-community-v6--games .ajg-filters__actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion:reduce) {
  .aj-community-v6 :where(.video,.aj-card,.aj-coloring) { transition: none; }
}

@media print {
  .aj-community-v6 { background:#fff; }
  .aj-community-v6 :where(.aj-community-v6__hero,.aj-section,.aj-coloring,.forum-main) { box-shadow:none; }
}

/* Actions communautaires 2026 : lisibles et sans effet de semelle. */
.aj-community-v6 :where(button,.btn,.forum-primary-button,.ajg-button) {
  border:1px solid var(--ajc-blue);
  border-radius:12px;
  background:var(--ajc-blue);
  color:#fff;
  box-shadow:none;
  font-weight:800;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
.aj-community-v6 :where(button,.btn,.forum-primary-button,.ajg-button):hover {
  border-color:var(--ajc-blue-dark);
  background:var(--ajc-blue-dark);
  color:#fff;
  box-shadow:none;
  transform:translateY(-1px);
}
.aj-community-v6 :where(.btn-secondary,.btn-outline,.ajg-button--ghost) {
  border:1px solid var(--ajc-blue);
  background:#fff;
  color:var(--ajc-blue-dark);
  box-shadow:none;
}
.aj-community-v6 :where(.btn-secondary,.btn-outline,.ajg-button--ghost):hover {
  background:var(--ajc-soft);
  color:var(--ajc-blue-dark);
}
.aj-community-v6 :where(.eyebrow,.kicker,[class*="eyebrow"],[class*="kicker"]) { color:var(--ajc-orange); }
