/*
 * News section (/news/ and its sub-pages) and the home page's featured
 * announcement. Chantier _to-do/canal-news-notifications.md, phase 1.
 * Tokens of Docs/identite-visuelle; dark mode follows body.darkClass like
 * the rest of the site.
 */
.cwn {
    --cwn-card: #FFFFFF;
    --cwn-sep: #E9ECEF;
    --cwn-text: #495057;
    --cwn-strong: #15171A;
    --cwn-muted: #ADB6BD;
    --cwn-blue: #4672D6;
    --cwn-blue-border: #2D4B91;
    --cwn-orange: #EE835B;
    --cwn-raised: #F1F3F5;
    --cwn-hero: #4672D6;
    --cwn-green: #2F9E44;
    --cwn-link: #4672D6;
}
body.darkClass .cwn {
    --cwn-card: #343A40;
    --cwn-sep: #21252A;
    --cwn-text: #B0BEC5;
    --cwn-strong: #FFFFFF;
    --cwn-muted: #77838F;
    --cwn-raised: #495057;
    --cwn-hero: #495057;
    --cwn-green: #87D37C;
    --cwn-link: #FFFFFF;
}

.cwn-block { margin: 0 50px; }
.cwn-block + .cwn-block { margin-top: 26px; }
.cwn-section { padding-bottom: 30px; }
.cwn-section .cwn-block { padding-top: 40px; }
.cwn-section .cwn-block + .cwn-block { padding-top: 0; }
.cwn-section > .mobile-button { margin: 0 50px; }
.cwn-page-title + .cwn-chips-wrap { margin-top: 0; }
/* The first section sits right under the page title: no 40 px above the first announcement (Jean-Marie, 2026-11-04) */
.cwn-page-title ~ .cwn-section:first-of-type > .cwn-block:first-child { padding-top: 0; }
.cwn-more { display: inline-block; margin-top: 16px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--cwn-link) !important; text-decoration: none; }
.cwn-more i { font-size: 9px; margin-left: 3px; }
.title-sub-container-inner h2 span.cwn-sub { display: block; font-size: 10px; color: #ADB6BD; font-weight: 500; padding-top: 4px; letter-spacing: 1px; }
body.darkClass .title-sub-container-inner h2 span.cwn-sub { color: #77838F; }
.cwn-empty { margin: 0; padding: 24px; background: var(--cwn-card); border-radius: 6px; color: var(--cwn-text); font-style: italic; }

/* Sidebar counters */
.sidebar-lines a.cwn-nav { position: relative; }
.sidebar-lines a.cwn-nav em { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; font-weight: 700; color: #ADB6BD; }
.sidebar-lines a.cwn-nav.active em { display: none; }

/* Section chips, where the sidebar is hidden (below 1024 px) */
.cwn-chips { display: none; }
@media (max-width: 1023px) {
    .cwn-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 20px; padding: 2px 0 4px; scrollbar-width: none; }
    .cwn-chips::-webkit-scrollbar { display: none; }
    .cwn-chips a { flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; padding: 8px 13px; border-radius: 16px; background: var(--cwn-card); color: var(--cwn-text) !important; box-shadow: 0 0 4px rgba(0,0,0,.06); text-decoration: none; }
    .cwn-chips a.is-active { background: var(--cwn-blue); color: #FFFFFF !important; }
    body.darkClass .cwn-chips a.is-active { background: #FFFFFF; color: #21252A !important; }
}

/* Featured announcement */
.cwn-hero { display: grid; grid-template-columns: 1fr 1.15fr; background: var(--cwn-hero); border-radius: 12px; overflow: hidden; color: #FFFFFF; min-height: 300px; }
.cwn-hero-txt { padding: 38px 40px 34px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.cwn-pill { display: inline-block; align-self: flex-start; background: rgba(255,255,255,.18); color: #FFFFFF; font-size: 10px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; border-radius: 4px; padding: 5px 9px; margin-bottom: 14px; }
.cwn-pill i { margin-right: 5px; }
.cwn-hero h2, .cwn-hero h3 { margin: 0 0 10px; font-size: 30px; line-height: 1.15; font-weight: 900; color: #FFFFFF !important; text-transform: none; letter-spacing: 0; float: none; }
.cwn-hero p { margin: 0 0 18px; font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.92); }
.cwn-hero ul { margin: 0 0 20px; padding: 0; list-style: none; }
.cwn-hero li { position: relative; padding: 3px 0 3px 26px; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.92); list-style: none; }
.cwn-hero li i { position: absolute; left: 0; top: 7px; font-size: 14px; color: #FFFFFF; }
.cwn-hero .cwn-date { margin: 16px 0 0; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.7); }
.cwn-btn { display: inline-block; align-self: flex-start; background: #FFFFFF; color: #4672D6 !important; font-size: 13px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; padding: 11px 20px; border-radius: 6px; border-bottom: 3px solid #CED4DA; text-decoration: none; }
.cwn-btn:hover { background: #F1F3F5; }
body.darkClass .cwn-btn { background: #4672D6; color: #FFFFFF !important; border-bottom-color: #2D4B91; }
body.darkClass .cwn-btn:hover { background: #3256A0; }
/* The banner fills its half: cover, anchored top left (asked by Jean-Marie 2026-11-04) */
.cwn-hero-img { position: relative; overflow: hidden; min-height: 260px; }
.cwn-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.cwn-hero.no-image { grid-template-columns: 1fr; }

/* Announcement cards */
.cwn-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cwn-card { background: var(--cwn-card); border-radius: 6px; box-shadow: 0 0 4px rgba(0,0,0,.05); overflow: hidden; display: flex; flex-direction: column; color: var(--cwn-text); }
.cwn-card-img { aspect-ratio: 1200 / 630; background: var(--cwn-raised); overflow: hidden; display: block; }
.cwn-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cwn-card-body { padding: 14px 16px 16px; }
.cwn-card h3 { margin: 4px 0 6px; font-size: 13px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--cwn-strong); line-height: 1.35; }
.cwn-card h3 a { color: inherit !important; text-decoration: none; }
.cwn-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cwn-text); }
.cwn-card .cwn-more { margin-top: 10px; }
.cwn-kicker { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--cwn-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwn-kicker b { font-weight: 900; color: var(--cwn-green); }
.cwn-kicker b.is-announce, .cwn-kicker b.is-theme { color: var(--cwn-link); }

/* Catalogue cards */
.cwn-cat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 26px; }
.cwn-cat-item { display: flex; gap: 16px; align-items: center; background: var(--cwn-card); border-radius: 6px; box-shadow: 0 0 4px rgba(0,0,0,.05); padding: 10px; overflow: hidden; color: var(--cwn-text); text-decoration: none !important; transition: box-shadow .15s; }
.cwn-cat-item:hover { box-shadow: 0 0 4px rgba(0,0,0,.1); }
.cwn-cat-tile { flex: 0 0 132px; height: 88px; border-radius: 4px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cwn-cat-tile .cwn-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .1; filter: grayscale(1); }
.cwn-cat-tile:after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.14); }
.cwn-cat-tile img { max-width: 80%; max-height: 70%; position: relative; z-index: 2; transition: transform .2s; }
.cwn-cat-item:hover .cwn-cat-tile img { transform: scale(1.04); }
.cwn-cat-tile .cwn-tile-name { position: relative; z-index: 2; color: #FFFFFF; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; text-align: center; padding: 0 6px; }
.cwn-cat-txt { min-width: 0; flex: 1; }
.cwn-cat-txt h3 { margin: 3px 0; font-size: 14px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--cwn-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwn-cat-txt p { margin: 0; font-size: 12.5px; color: var(--cwn-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwn-cat-star { flex: 0 0 auto; margin-right: 8px; color: #FABE58; font-size: 13px; }

/* Toy grids reuse the site's .toys-grid; the home's featured block reuses its section */
.cwn-section .toys-grid { padding-top: 40px; }
.cwn-home-featured .cwn-block { padding: 40px 0 10px; }
.cwn-home-featured .mobile-button { margin: 20px 50px 0; }

.cwn-pagination { margin: 0 50px; }

@media (max-width: 1365px) {
    .cwn-hero h2, .cwn-hero h3 { font-size: 26px; }
    .cwn-grid3 { grid-template-columns: repeat(2, 1fr); }
    .cwn-grid3 > :nth-child(3) { display: none; }
    .cwn-page-announcements .cwn-grid3 > :nth-child(3) { display: flex; }
}
@media (max-width: 1023px) {
    .cwn-block { margin: 0 30px; }
    .cwn-pagination { margin: 0 30px; }
    .cwn-section > .mobile-button { margin: 0 30px; }
    .cwn-chips-wrap { padding-top: 24px; }
    .cwn-chips-wrap + .cwn-section > .cwn-block:first-child { padding-top: 0; }
    /* Long French or German section names: wrap instead of the site's ellipsis */
    .cwn .title-sub-container-inner h1, .cwn .title-sub-container-inner h2 { white-space: normal; font-size: 1.5em; line-height: 1.15; }
    .cwn .title-sub-container-inner h1 span, .cwn .title-sub-container-inner h2 span.cwn-sub { white-space: normal; line-height: 1.4; }
    .cwn-home-featured .mobile-button { margin: 20px 30px 0; }
    .cwn-hero { grid-template-columns: 1fr; min-height: 0; }
    .cwn-hero-txt { padding: 26px 22px 22px; }
    .cwn-hero h2, .cwn-hero h3 { font-size: 24px; }
    .cwn-hero p { font-size: 15px; }
    .cwn-hero-img { min-height: 0; aspect-ratio: 1200 / 630; }
    .cwn-cat { grid-template-columns: 1fr; gap: 10px; }
    .cwn-cat-tile { flex-basis: 96px; height: 64px; }
}
@media (max-width: 767px) {
    .cwn-grid3 { grid-template-columns: 1fr; gap: 12px; }
    .cwn-grid3 > :nth-child(3) { display: flex; }
    .cwn-card { flex-direction: row; align-items: center; }
    .cwn-card-img { flex: 0 0 112px; height: 84px; aspect-ratio: auto; margin: 10px 0 10px 10px; border-radius: 4px; }
    .cwn-card-body { padding: 10px 14px; min-width: 0; }
    .cwn-card p, .cwn-card .cwn-more { display: none; }
    .cwn-card h3 { font-size: 12px; }
    .cwn-page-announcements .cwn-card { flex-direction: column; align-items: stretch; }
    .cwn-page-announcements .cwn-card-img { flex: none; height: auto; aspect-ratio: 1200 / 630; margin: 0; border-radius: 0; }
    .cwn-page-announcements .cwn-card p, .cwn-page-announcements .cwn-card .cwn-more { display: block; }
}
