.ccev-page,.ccev{--ink:#282735;--accent:var(--cultu-primary);--line:var(--cultu-line);--soft:var(--cultu-soft);color:var(--ink)}
.ccev,.ccev *{box-sizing:border-box}
.ccev{font-family:system-ui,sans-serif}
.ccev-page{max-width:78rem;margin:auto;padding:clamp(1rem,4vw,4rem);font-family:system-ui,sans-serif}
.ccev-page>header{padding:clamp(1.5rem,5vw,4rem);border-top:5px solid var(--accent);background:var(--soft)}
.ccev-page>header>p:first-child{color:var(--accent);font-weight:700}
.ccev-page h1,.ccev-page h2,.ccev h3{font-family:Georgia,serif;line-height:1.15;text-wrap:balance}
.ccev-page h1{font-size:clamp(2.5rem,6vw,5rem);margin:.25em 0}
.ccev-page h2{font-size:clamp(1.8rem,4vw,3rem);margin:1.6em 0 .5em}
.ccev-page>nav,.ccev nav{display:flex;flex-wrap:wrap;gap:.5rem;padding:1rem 0}
.ccev nav a,.ccev-page>nav a{padding:.65rem 1rem;border:1px solid var(--line);border-radius:.6rem;background:white;color:var(--ink);text-decoration:none}
.ccev nav [aria-current]{background:var(--accent);color:white}
.ccev nav .ccev-pagination-gap{align-self:center;padding:.6rem .25rem;color:var(--ink)}
.ccev nav a[data-ccev-loading]{
    position:relative;
    cursor:progress;
}
.ccev nav a[data-ccev-loading] > span{opacity:0}
.ccev nav a[data-ccev-loading]::after,
.ccev-field[data-ccev-loading]>label::after,
.ccev-filter-actions>button[data-ccev-loading]::after{
    content:"";
    display:inline-block;
    width:1rem;
    height:1rem;
    border:2px solid currentColor;
    border-right-color:transparent;
    border-radius:50%;
}
.ccev nav a[data-ccev-loading]::after{position:absolute;inset:0;margin:auto}
.ccev-field[data-ccev-loading]>label::after,
.ccev-filter-actions>button[data-ccev-loading]::after{margin-inline-start:.5rem;vertical-align:middle}
.ccev-filters{display:flex;flex-wrap:wrap;align-items:end;gap:1rem;padding:1.25rem;background:var(--soft);border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:1rem}
.ccev-field{flex:1 1 10rem;min-width:0}
.ccev-field>label{display:block;margin:0 0 .5rem;color:var(--ink);font-size:.9rem;font-weight:700;letter-spacing:.025em}
.ccev .ccev-field>input,.ccev .ccev-field>select{display:block;width:100%;height:3rem;min-height:3rem;margin:0;padding:.7rem .85rem;border:1px solid var(--line);border-radius:.6rem;background:white;color:var(--ink);font:inherit;font-size:.9rem;line-height:1.5;box-shadow:0 2px 3px #28273504}
.ccev .ccev-filter-actions>button{height:3rem;min-height:3rem;padding:.7rem 1.5rem;border:0;border-radius:.6rem;background:var(--accent);color:white;font:inherit;font-weight:700;cursor:pointer}
.ccev-filter-actions>a{align-self:center;color:var(--accent);font-size:.9rem;text-underline-offset:3px}
.ccev-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1.5rem 0 1rem}
.ccev-toolbar p{margin:0;font-size:.9rem;color:#665f6a}
.ccev-toolbar--empty{display:grid;grid-template-columns:minmax(0,1fr)}
.ccev-toolbar--empty .ccev-display-controls{grid-row:1;justify-self:end;max-width:100%;flex-wrap:wrap}
.ccev-toolbar .ccev-empty-message{grid-row:2;display:flex;flex-direction:column;align-items:center;gap:1.25rem;padding:1rem 0;text-align:center;line-height:1.6}
.ccev-empty-message img{display:block;flex-shrink:0;width:clamp(160px,24vw,240px);max-width:100%;height:auto}
.ccev-view-switch{display:none;padding:.25rem;background:var(--soft);border-radius:.65rem;gap:.2rem;flex-shrink:0}
.ccev-view-switch a{padding:.5rem .8rem;border-radius:.45rem;color:#665f6a;font-size:.9rem;text-decoration:none}
.ccev-view-switch [aria-current]{background:white;color:var(--accent);box-shadow:0 2px 5px #28273512;font-weight:700}
.ccev-results{display:grid;gap:1.4rem}
.ccev-results>.ccev-card{order:var(--ccev-pin-order,0)}
.ccev .ccev-period-heading{
    grid-column:1/-1;
    margin:.5rem 0 0;
    padding-top:1rem;
    border-top:1px solid var(--line);
    font:750 clamp(1.25rem,2.5vw,1.65rem)/1.25 system-ui,sans-serif;
}
.ccev-card-badges{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;max-width:100%}
.ccev-card-status{
    display:inline-flex;
    align-items:center;
    gap:.4em;
    padding:5px 8px;
    border:1px solid transparent;
    border-radius:999px;
    font-size:.9rem;
    font-weight:700;
    line-height:1.25;
}
.ccev-card-status--upcoming{background:#E7F0FF;color:#1D4B83}
.ccev-card-status--ongoing{background:#E4F5EB;color:#1C5F3D}
.ccev-card-status--ended{background:#EEF0F3;color:#465161}
.ccev-card-status--canceled{background:#FCE9E8;color:#8D252B}
.ccev-card-status--pinned{background:#FFF2CC;color:#76500B}
.ccev-card-status::before{
    content:"";
    flex:0 0 .5em;
    height:.5em;
    border-radius:50%;
    background:currentColor;
}
.ccev-card-status--ongoing::before{background:#23834F}
@media(prefers-reduced-motion:no-preference){
    .ccev nav a[data-ccev-loading]::after,
    .ccev-field[data-ccev-loading]>label::after,
    .ccev-filter-actions>button[data-ccev-loading]::after{animation:ccev-page-loading .7s linear infinite}
    .ccev-card-status--ongoing::before,
    .ccev-card-status--pinned::before{animation:ccev-status-breathe 2.4s ease-in-out infinite}
    .ccev-card-status--pinned{animation:ccev-status-gold 2.4s ease-in-out infinite}
}
@keyframes ccev-page-loading{to{transform:rotate(360deg)}}
@keyframes ccev-status-breathe{
    50%{transform:scale(1.3);opacity:.55}
}
@keyframes ccev-status-gold{
    50%{color:#905806;text-shadow:0 0 3px #edbc57}
}
.ccev .ccev-card{position:relative;min-width:0;margin:0;padding:0;border:1px solid var(--line);border-radius:1rem;background:white;box-shadow:0 3px 12px #28273506;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.ccev-card-media{overflow:hidden;border-radius:1rem 1rem 0 0;background:var(--soft);aspect-ratio:16/10}
.ccev .ccev-card img{display:block;width:100%;height:100%;object-fit:cover;margin:0;transition:transform .35s ease}
.ccev-card-placeholder{display:grid;place-items:center;height:100%;font:italic 2.5rem Georgia,serif;color:var(--accent);background:linear-gradient(135deg,white,var(--line))}
.ccev-card-body{display:flex;flex-direction:column;align-items:start;padding:1.25rem;gap:.65rem;background:linear-gradient(90deg,var(--soft) 0%,#fff 72%);border-radius:inherit}
.ccev-card-theme{display:inline-flex;align-items:center;padding:5px 8px;border:1px solid var(--line);border-radius:999px;background:var(--soft);color:var(--accent);font-size:.9rem;font-weight:750;line-height:1.25;text-decoration:none}
.ccev .ccev-card-date{color:var(--accent);font-size:.9rem;font-weight:650}
.ccev .ccev-card :is(h3,.ccev-card-title){font-size:1.4rem;margin:0}
.ccev .ccev-card :is(h3,.ccev-card-title) a{color:var(--ink);text-decoration:none}
.ccev-card :is(h3,.ccev-card-title) a:after{content:"";position:absolute;inset:0;border-radius:1rem;z-index:1}
.ccev .ccev-card-city{display:flex;align-items:center;gap:.4rem;color:#746c76;font-size:.9rem;margin:0}
.ccev-card-date--with-icon{display:flex;align-items:flex-start;gap:.4rem;line-height:1.5}
.ccev-city-icon,.ccev-date-icon{width:1.1rem;height:1.1rem;flex-shrink:0}
.ccev-date-icon{margin-top:.1rem}
.ccev-card-discover{display:flex;justify-content:space-between;width:100%;margin-top:.5rem;padding-top:.8rem;border-top:1px solid var(--line);color:var(--accent);font-size:.9rem;font-weight:650}
.ccev-card-discover span{font-size:.9rem}
.ccev .ccev-compact .ccev-card :is(h3,.ccev-card-title){font:inherit;font-weight:700}
.ccev-compact .ccev-card-discover{display:none}
.ccev:focus{outline:none}
.ccev a:focus-visible,.ccev button:focus-visible,.ccev input:focus-visible,.ccev select:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.ccev-card:focus-within{outline:3px solid var(--accent);outline-offset:4px}
.ccev[aria-busy=true] .ccev-filter-actions>button{opacity:.6;cursor:progress}
@media(hover:hover){.ccev .ccev-card:hover{box-shadow:0 12px 24px -8px #28273530,0 4px 8px -4px #28273515;border-color:var(--accent)}}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.ccev-card:hover{transform:translateY(-5px)}.ccev-card:hover img{transform:scale(1.035)}}
@media(min-width:48rem){.ccev-cards{grid-template-columns:repeat(var(--cols),minmax(0,1fr))}.ccev-view-switch{display:flex}.ccev-list .ccev-card{display:grid;grid-template-columns:minmax(12rem,30%) 1fr}.ccev-list .ccev-card-media{aspect-ratio:auto;border-radius:1rem 0 0 1rem;min-height:15rem}.ccev-list .ccev-card-body{padding:1.5rem 2rem}.ccev-list .ccev-card :is(h3,.ccev-card-title){font-size:1.75rem}}
@media(max-width:38rem){.ccev-field{flex-basis:100%}.ccev-filters{gap:.8rem}.ccev .ccev-filter-actions>button{flex:1}}
@media(prefers-reduced-motion:reduce){.ccev-card,.ccev-card img{transition:none}}

.ccev{font-size:.9rem}
.ccev-field{flex-basis:11rem}
.ccev-filters{align-items:start}
.ccev-filter-actions{display:flex;flex-direction:column;align-items:stretch;gap:.5rem;padding-top:1.65rem}
.ccev-filter-actions>a{text-align:center}
.ccev-display-controls{display:flex;align-items:center;gap:.5rem}
.ccev-sort-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:2.75rem;min-height:2.75rem;border:1px solid var(--line);border-radius:.65rem;background:var(--soft);color:var(--accent);text-decoration:none;font-size:1.3rem;font-weight:700}
.ccev-sort-toggle:hover{background:var(--line)}
.ccev-sort-label{font-size:.9rem;color:var(--accent)}
@media(max-width:38rem){.ccev-filter-actions{width:100%;padding-top:0}.ccev-toolbar{flex-wrap:wrap}}

/* Cartes en grille : repère de date et hiérarchie éditoriale. */
:is(.ccev-cards,.ccev-list) .ccev-card{display:flex;flex-direction:column;isolation:isolate;border-radius:1.15rem;box-shadow:0 5px 18px #2827350a}
:is(.ccev-cards,.ccev-list) .ccev-card-media{aspect-ratio:1/1;border-radius:1.15rem 1.15rem 0 0;border-bottom:4px solid var(--accent)}
:is(.ccev-cards,.ccev-list) .ccev-card-body{flex:1;padding:1.2rem 1.4rem 1.3rem;gap:.8rem;border-radius:0 0 1.15rem 1.15rem}
:is(.ccev-cards,.ccev-list) .ccev-card-calendar{position:absolute;bottom:1rem;left:1.4rem;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:4.6rem;margin:0;padding:.65rem .85rem;background:var(--accent);color:white;border:3px solid white;border-radius:.85rem;box-shadow:0 4px 12px #28273520;line-height:1;pointer-events:none}
:is(.ccev-cards,.ccev-list) .ccev-card-calendar-day{font-size:2rem;font-weight:800;letter-spacing:-.06em;font-variant-numeric:tabular-nums}
:is(.ccev-cards,.ccev-list) .ccev-card-calendar-month{font-size:.9rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-top:.3rem}
:is(.ccev-cards,.ccev-list) .ccev-card-calendar-year{font-size:.9rem;margin-top:.3rem;opacity:.85}
:is(.ccev-cards,.ccev-list) .ccev-card-theme{max-width:100%;overflow-wrap:anywhere}
.ccev :is(.ccev-cards,.ccev-list) .ccev-card :is(h3,.ccev-card-title){font-family:system-ui,sans-serif;font-size:clamp(1.25rem,1.6vw,1.5rem);font-weight:750;line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere}
:is(.ccev-cards,.ccev-list) .ccev-card :is(h3,.ccev-card-title){order:1}
.ccev :is(.ccev-cards,.ccev-list) .ccev-card-date{order:2;color:var(--accent);font-weight:650;line-height:1.5}
.ccev :is(.ccev-cards,.ccev-list) .ccev-card-city{order:3;align-items:flex-start;line-height:1.5}
:is(.ccev-cards,.ccev-list) .ccev-city-icon{margin-top:.1rem;color:var(--accent)}
.ccev .ccev-list .ccev-card-summary{order:4;margin:0;font-size:.9rem;line-height:1.6;color:var(--cultu-magazine-muted,#596273);white-space:pre-line;overflow-wrap:anywhere}
:is(.ccev-cards,.ccev-list) .ccev-card-discover{order:5;margin-top:auto;padding-top:1rem;align-items:center;font-weight:700}
:is(.ccev-cards,.ccev-list) .ccev-card-discover>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:var(--soft);color:var(--accent);font-size:1.1rem}
:is(.ccev-cards,.ccev-list) .ccev-card-placeholder{background:radial-gradient(circle at 80% 20%,var(--line) 0 18%,transparent 18.5%),linear-gradient(135deg,white,var(--soft));font-size:3rem}
@media(hover:hover){:is(.ccev-cards,.ccev-list) .ccev-card:hover :is(h3,.ccev-card-title) a{color:var(--accent)}:is(.ccev-cards,.ccev-list) .ccev-card:hover .ccev-card-discover>span{background:var(--accent);color:white}}
@media(hover:hover){.ccev-card:hover .ccev-card-theme{border-color:var(--accent);background:#fff}}

/* L’image est retirée du flux pour que sa hauteur native ne déforme pas la carte. */
.ccev :is(.ccev-cards,.ccev-list) .ccev-card-media{position:relative;min-height:0;flex-shrink:0}
.ccev :is(.ccev-cards,.ccev-list) .ccev-card-media img{position:absolute;inset:0;width:100%;height:100%;max-height:none;max-width:none;object-fit:cover}
.ccev :is(.ccev-cards,.ccev-list) .ccev-card-placeholder{position:absolute;inset:0}
@media(min-width:48rem){
    .ccev .ccev-list .ccev-card{display:grid;grid-template-columns:minmax(14rem,30%) minmax(0,1fr)}
    .ccev .ccev-list .ccev-card-media{grid-column:1;grid-row:1;aspect-ratio:auto;min-height:16rem;border-radius:1.15rem 0 0 1.15rem;border-bottom:0;border-right:4px solid var(--accent)}
    .ccev .ccev-list .ccev-card-calendar{position:absolute;top:1rem;bottom:auto;left:1rem;margin:0;z-index:1}
    .ccev .ccev-list .ccev-card-body{grid-column:2;grid-row:1;padding:1.35rem 1.6rem;gap:.7rem;border-radius:0 1.15rem 1.15rem 0}
    .ccev .ccev-list .ccev-card :is(h3,.ccev-card-title){font-size:clamp(1.3rem,2vw,1.7rem)}
    .ccev .ccev-list .ccev-card-discover{padding-top:.8rem}
}
