/* Agenda web : cartes, liste, mois et fiche détaillée. S'adapte à la couleur principale du thème. */
.pw-agenda, .pw-single, .pw-preview-grid {
	--pw-accent: var(--wp--preset--color--primary, #e8161f);
	--pw-ink: var(--wp--preset--color--contrast, #1c1d1f);
	--pw-muted: #6c7076;
	--pw-line: rgba(20, 20, 20, .12);
	--pw-bg: #fff;
	--pw-soft: #f4f4f1;
	--pw-r: 16px;
	font-family: inherit;
	color: inherit;
}
.pw-agenda *, .pw-single *, .pw-preview-grid * { box-sizing: border-box; }

/* Barre d'outils */
.pw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 24px; }
.pw-search { flex: 1 1 240px; }
.pw-search input { width: 100%; padding: 11px 16px; border: 1px solid var(--pw-line); border-radius: 999px; background: var(--pw-bg); font: inherit; }
.pw-search input:focus { outline: 2px solid var(--pw-accent); outline-offset: 1px; }
.pw-views, .pw-when-toggle { display: inline-flex; padding: 3px; background: var(--pw-soft); border-radius: 999px; }
.pw-views button, .pw-when-toggle button { padding: 7px 16px; border: 0; background: transparent; border-radius: 999px; font: inherit; font-size: .875em; cursor: pointer; color: inherit; transition: background .2s, box-shadow .2s; }
.pw-views button[aria-pressed="true"], .pw-when-toggle button[aria-pressed="true"] { background: var(--pw-bg); box-shadow: 0 1px 4px rgba(20, 20, 20, .15); font-weight: 600; }
.pw-chips { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.pw-chips button { padding: 6px 14px; border: 1px solid var(--pw-line); border-radius: 999px; background: var(--pw-bg); font: inherit; font-size: .8125em; cursor: pointer; color: inherit; transition: background .2s, color .2s, border-color .2s; }
.pw-chips button:hover { border-color: var(--pw-accent); }
.pw-chips button.on { background: var(--pw-accent); border-color: var(--pw-accent); color: #fff; }

/* Cartes */
.pw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.pw-grid[hidden], .pw-month[hidden], .pw-empty[hidden] { display: none; }
.pw-card { display: flex; flex-direction: column; background: var(--pw-bg); border: 1px solid var(--pw-line); border-radius: var(--pw-r); overflow: hidden; transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; animation: pw-in .4s both; }
.pw-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(20, 20, 20, .12); }
@keyframes pw-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pw-media { position: relative; display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--pw-accent), #1c1d1f); overflow: hidden; }
.pw-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.pw-card:hover .pw-media img { transform: scale(1.05); }
.pw-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4em; font-weight: 700; color: rgba(255, 255, 255, .35); }
.pw-date { position: absolute; top: 12px; left: 12px; display: grid; justify-items: center; min-width: 52px; padding: 6px 8px; background: var(--pw-bg); color: var(--pw-ink); border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); line-height: 1.05; }
.pw-date b { font-size: 1.4em; }
.pw-date i { font-style: normal; font-size: .72em; text-transform: uppercase; letter-spacing: .05em; color: var(--pw-accent); font-weight: 700; }
.pw-badges { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pw-badge { padding: 3px 10px; border-radius: 999px; background: #fff; font-size: .72em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pw-badge.bad { background: #b3261e; color: #fff; } .pw-badge.warn { background: #f5a524; color: #1c1d1f; } .pw-badge.ok { background: #1d7a46; color: #fff; }
.pw-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.pw-when { margin: 0; font-size: .8125em; text-transform: capitalize; color: var(--pw-accent); font-weight: 600; }
.pw-title { margin: 0; font-size: 1.15em; line-height: 1.3; }
.pw-title a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .3s; }
.pw-title a:hover { background-size: 100% 2px; }
.pw-tagline { margin: 0; color: var(--pw-muted); font-size: .9em; }
.pw-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; font-size: .8125em; color: var(--pw-muted); }
.pw-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding-top: 6px; }
.pw-tag { padding: 2px 10px; border-radius: 999px; background: var(--pw-soft); font-size: .75em; }
.pw-cancelled .pw-media { filter: grayscale(1); } .pw-cancelled .pw-title a { text-decoration: line-through; }

/* Vue liste */
.pw-agenda[data-view="list"] .pw-grid { grid-template-columns: 1fr; gap: 14px; }
.pw-agenda[data-view="list"] .pw-card { flex-direction: row; }
.pw-agenda[data-view="list"] .pw-media { aspect-ratio: auto; flex: 0 0 200px; min-height: 130px; }
@media (max-width: 600px) { .pw-agenda[data-view="list"] .pw-card { flex-direction: column; } .pw-agenda[data-view="list"] .pw-media { aspect-ratio: 16 / 9; flex-basis: auto; } }

/* Vue mois */
.pw-month .pw-mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pw-month .pw-mh strong { font-size: 1.2em; text-transform: capitalize; }
.pw-month .pw-mh button { padding: 6px 14px; border: 1px solid var(--pw-line); border-radius: 999px; background: var(--pw-bg); cursor: pointer; font: inherit; color: inherit; }
.pw-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--pw-line); border: 1px solid var(--pw-line); border-radius: 12px; overflow: hidden; }
.pw-mdow { padding: 6px 8px; background: var(--pw-soft); font-size: .72em; font-weight: 700; text-transform: uppercase; color: var(--pw-muted); }
.pw-mcell { min-height: 92px; padding: 5px 6px; background: var(--pw-bg); display: flex; flex-direction: column; gap: 3px; }
.pw-mcell.out { background: #fafaf8; opacity: .6; }
.pw-mcell.today > span:first-child { background: var(--pw-accent); color: #fff; }
.pw-mcell > span:first-child { align-self: flex-start; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 11px; font-size: .75em; font-weight: 600; }
.pw-mcell a { padding: 2px 6px; border-left: 3px solid var(--pw-accent); border-radius: 4px; background: var(--pw-soft); font-size: .75em; line-height: 1.3; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-mcell a:hover { background: rgba(0, 0, 0, .08); }
.pw-empty { padding: 32px; text-align: center; color: var(--pw-muted); }

/* Fiche détaillée */
.pw-single { max-width: 860px; margin-inline: auto; }
.pw-lead { font-size: 1.25em; line-height: 1.5; color: var(--pw-muted); margin: 0 0 14px; }
.pw-facts { margin: 22px 0 28px; padding: 22px; border: 1px solid var(--pw-line); border-radius: var(--pw-r); background: var(--pw-soft); }
.pw-facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 24px; }
.pw-facts li { display: flex; gap: 12px; align-items: flex-start; }
.pw-facts li svg { flex: none; margin-top: 2px; color: var(--pw-accent); }
.pw-facts li div { display: flex; flex-direction: column; gap: 2px; font-size: .95em; }
.pw-facts li strong { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; color: var(--pw-muted); }
.pw-facts li a { font-size: .85em; color: var(--pw-accent); }
.pw-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--pw-line); }
.pw-btn { display: inline-flex; align-items: center; padding: 12px 24px; border: 2px solid var(--pw-accent); border-radius: 999px; color: var(--pw-accent); font-weight: 600; text-decoration: none; transition: background .2s, color .2s, transform .15s, box-shadow .2s; }
.pw-btn:hover { background: var(--pw-accent); color: #fff; transform: translateY(-2px); }
.pw-btn.primary { background: var(--pw-accent); color: #fff; }
.pw-btn.primary:hover { box-shadow: 0 8px 22px rgba(232, 22, 31, .35); }
.pw-alert { margin: 0; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.pw-alert.bad { background: #fbe6e4; color: #b3261e; } .pw-alert.warn { background: #fbf0d9; color: #9a5b00; }
.pw-text { line-height: 1.7; }

/* Aperçu dans l'outil */
.pw-preview-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 800px) { .pw-preview-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .pw-card, .pw-card * { animation: none !important; transition: none !important; } }

.pw-agenda [hidden] { display: none !important; }

/* ===== Fiche détaillée v2 : deux colonnes, typographie protégée du thème ===== */
.pw-single { max-width: 1040px; margin: 0 auto; font-size: 1rem; color: var(--pw-ink); }
.pw-single p, .pw-single li, .pw-single span, .pw-single div, .pw-single a { font-weight: 400; }
.pw-single strong, .pw-single b, .pw-single h2, .pw-single h3 { font-weight: 700; }
.pw-hero { position: relative; margin: 0 0 28px; border-radius: var(--pw-r); overflow: hidden; aspect-ratio: 21 / 9; background: linear-gradient(135deg, var(--pw-accent), #1c1d1f); }
.pw-hero img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.pw-date.big { top: 18px; left: 18px; min-width: 66px; padding: 10px 12px; }
.pw-date.big b { font-size: 1.9em; }
.pw-date.big i { font-size: .8em; }
.pw-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.pw-main { min-width: 0; }
.pw-single .pw-lead { font-size: 1.3em; line-height: 1.5; color: var(--pw-ink); margin: 0 0 14px; font-weight: 500; }
.pw-single .pw-text, .pw-single .pw-text p { font-size: 1.02em; line-height: 1.75; color: #2b2d31; max-width: 72ch; }
.pw-single .pw-text p { margin: 0 0 1.1em; }
.pw-single .pw-facts { position: sticky; top: 24px; margin: 0; padding: 22px; background: var(--pw-bg); box-shadow: 0 10px 30px rgba(20, 20, 20, .08); }
.pw-single .pw-facts ul { grid-template-columns: 1fr; gap: 16px; }
.pw-single .pw-actions { flex-direction: column; align-items: stretch; }
.pw-single .pw-btn { justify-content: center; text-align: center; }
@media (max-width: 860px) { .pw-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; } .pw-single .pw-facts { position: static; order: -1; } .pw-hero { aspect-ratio: 16 / 9; } }

/* ===== Page événement (modèle propre) ===== */
.pw-page { padding: 48px 20px 90px; background: #fff; }
.pw-wrap { max-width: 1040px; margin: 0 auto; }
.pw-crumbs { font-size: .85rem; color: #6c7076; margin: 0 0 18px; }
.pw-crumbs a { color: inherit; text-decoration: none; }
.pw-crumbs a:hover { color: var(--pw-accent, #e8161f); text-decoration: underline; }
.pw-crumbs span { color: #1c1d1f; }
.pw-h1 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.15; margin: 0 0 24px; font-weight: 800; letter-spacing: -.01em; color: #1c1d1f; max-width: 24ch; }
.pw-back { margin: 40px 0 0; }
.pw-back a { color: var(--pw-accent, #e8161f); text-decoration: none; font-weight: 600; }
.pw-back a:hover { text-decoration: underline; }

/* ===== Corrections de compatibilité avec les thèmes (tailles en px, listes et puces du thème neutralisées) ===== */
.pw-agenda, .pw-single, .pw-preview-grid { font-size: 16px; line-height: 1.6; }
.pw-single { padding: 0 4px; }
.pw-agenda ul, .pw-agenda li, .pw-single ul, .pw-single li { list-style: none !important; margin: 0; padding: 0; background: none; }
.pw-single li::before, .pw-single li::after, .pw-agenda li::before, .pw-agenda li::after { content: none !important; display: none !important; }
.pw-single .pw-facts li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.pw-single .pw-facts li:last-child { margin-bottom: 0; }
.pw-single .pw-facts li svg { width: 20px; height: 20px; min-width: 20px; flex: none; margin-top: 2px; }
.pw-h1 { font-size: clamp(26px, 3.2vw, 40px); }
.pw-single .pw-lead { font-size: 21px; }
.pw-single .pw-text, .pw-single .pw-text p { font-size: 16px; line-height: 1.75; }
.pw-single .pw-facts li div { font-size: 15px; }
.pw-single .pw-facts li strong { font-size: 11px; }
.pw-single .pw-tag, .pw-agenda .pw-tag { font-size: 12px; }
.pw-agenda .pw-title { font-size: 19px; }
.pw-agenda .pw-when { font-size: 13px; }
.pw-agenda .pw-meta, .pw-agenda .pw-tagline { font-size: 14px; }
.pw-single .pw-btn, .pw-agenda .pw-btn { font-size: 16px; }

/* ===== v1.0.6 : image protégée du thème, texte mis en forme, listes ===== */
.pw-single .pw-hero { position: relative; margin: 0 0 28px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #f4f4f1; aspect-ratio: auto; line-height: 0; }
.pw-single .pw-hero::before, .pw-single .pw-hero::after { content: none !important; display: none !important; }
.pw-single img.pw-hero-img { display: block !important; position: static !important; width: 100% !important; height: auto !important; max-width: 100% !important; max-height: 560px !important; object-fit: contain !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; filter: none !important; transform: none !important; clip-path: none !important; -webkit-mask: none !important; mask: none !important; animation: none !important; opacity: 1 !important; }
.pw-single .pw-text ul, .pw-single .pw-text ol { margin: 0 0 1.1em 1.4em !important; padding: 0 !important; }
.pw-single .pw-text ul { list-style: disc !important; }
.pw-single .pw-text ol { list-style: decimal !important; }
.pw-single .pw-text li { list-style: inherit !important; display: list-item !important; margin: 0 0 .4em !important; padding: 0 !important; }
.pw-single .pw-text li::before, .pw-single .pw-text li::after { content: none !important; display: none !important; }
.pw-single .pw-text a { color: var(--pw-accent); text-decoration: underline; }
.pw-single .pw-text h2, .pw-single .pw-text h3 { margin: 1.4em 0 .5em; line-height: 1.3; }
.pw-single .pw-text strong, .pw-single .pw-text b { font-weight: 700 !important; }
.pw-single .pw-text em, .pw-single .pw-text i { font-style: italic; }
.pw-single .pw-text u { text-decoration: underline; }

/* ===== v1.0.7 : thèmes dont l'en-tête de page place le contenu dans une colonne étroite à côté d'un cercle (ex. INNOZH) ===== */
body.single-pops_web_event .headerPage .container { max-width: min(1120px, 94vw) !important; }
body.single-pops_web_event .headerPage .row > .position-relative,
body.single-pops_web_event .headerPage__img,
body.single-pops_web_event .headerPage__circle { display: none !important; }
body.single-pops_web_event .headerPage .row > [class*="col-lg"]:first-child { flex: 0 0 100% !important; max-width: 100% !important; margin-left: 0 !important; }
body.single-pops_web_event .headerPage__description, body.single-pops_web_event .headerPage__text { max-width: 100% !important; width: 100% !important; }
body.single-pops_web_event .headerPage__description { margin-top: 28px; }

/* ===== v1.0.8 : zone principale remplacée ===== */
.pw-page { padding: clamp(36px, 6vw, 80px) 20px 96px; background: #fff; }
.pw-page .pw-wrap { max-width: 1120px; margin: 0 auto; }
.pw-page .pw-h1 { margin: 0 0 26px; max-width: 22ch; font-weight: 800; letter-spacing: -.015em; line-height: 1.12; }
