/* =========================================================
   DIVERS UTILITAIRES
   ========================================================= */

.date-target {
    white-space:nowrap;
}


/* =========================================================
   EVENTS - FILTRES ET FORMULAIRES
   ========================================================= */

.filter-fields {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
}

.field-group {
    display: flex;
    flex-direction: column;
    flex:1 1 30%;
}

.field-group label,
.filter-fields .filter_title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}


.field-group label:before,
.filter-fields .filter_title:before {
    content:"";
    display:block;
    width:50px;
    height:4px;
    margin-bottom:3px;
    background:#000;
}

.field-group input[type="date"] {
    background:#fff;
    padding: 6px 12px;
    height:44px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    font-weight:500;
    padding:6px 6px 6px 9px;
    max-width: 135px;
}

.events-date-filter {
    display:flex;
    gap:5px;
}

.events-filter-btn {
    padding: 10px 15px 10px 13px;
    height:44px;
    border: none;
    border-radius: 0 40px 40px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: var(--astro-rose);
    color: white;
    margin-top:auto;
    max-width:80px;
}

.events-filter-btn i {
    font-size:1.6em;
}

.events-filter-btn:hover {
    background: #005a87;
}

.events-filter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.events-extra-filters {
    display:flex;
    flex-direction:column;
    gap:0 40px;
}

.extra-group {
    display: flex;
    flex-direction:column;
}

.events-extra-filters.category {
    margin-top:auto;
}

.filters-container {
    display:flex;
    gap:40px;
}

.events-extra-filters .checkboxes {
    height:44px;
    display:flex;
    align-items:center;
    gap:20px;
    border-radius:60px;
}

.events-extra-filters .cats {
    display:flex;
    align-items:stretch;
    gap:10px;
    margin-left:1em;
    flex-wrap:wrap;
    min-width: 335px;
}

.events-extra-filters .cats a {
    display:inline-flex;
    font-weight:600;
    font-size:0.92em;
    line-height:1.2;
    border-radius:50px;
    padding:8px 10px;
    flex: 0 1 auto;
    text-align:center;
    align-items:center; 
    justify-content: center;
}

.events-extra-filters label {
    display:flex;
    flex-direction:column-reverse;
    align-items:flex-start;
    gap:0px;
    white-space:nowrap;
    color:var(--astro-rose);
    text-transform:uppercase;
    font-weight:600;
    font-size:0.9em;
    line-height:1;
    -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.events-extra-filters label small {
    font-size:0.9em;
    margin-right:4px;
}

.events-extra-filters input {
    appearance: none;
    background-color: rgb(0 0 0 / 0.3);
    border-radius: 72px;
    border-style: none;
    flex-shrink: 0;
    height: 20px;
    margin: 5px 0 0 0;
    position: relative;
    width: 40px;
}

.events-extra-filters input::before {
    bottom: -6px;
    content: "";
    left: -6px;
    position: absolute;
    right: -6px;
    top: -6px;
}

.events-extra-filters input,
.events-extra-filters input::after {
    transition: all 100ms ease-out;
}

.events-extra-filters input::after {
    background-color: #fff;
    border-radius: 50%;
    content: "";
    height: 14px;
    left: 3px;
    position: absolute;
    top: 3px;
    width: 14px;
}

.events-extra-filters input[type=checkbox] {
    cursor: default;
}
.events-extra-filters input:hover {
    background-color: rgb(0 0 0 / 0.5);
    transition-duration: 0s;
}
.events-extra-filters input:hover::after {
    background-color: #fff;
}

.events-extra-filters input:checked,
.events-extra-filters input:hover:checked,
.events-extra-filters input:focus:checked {
    background-color: var(--astro-rose);
}

.events-extra-filters input:checked::after {
    background-color: #fff;
    left: 23px;
}

.events-extra-filters :focus:not(.focus-visible) {
    outline: 0;
}

.events-extra-filters input:checked:hover::after {
    background-color: #fff;
}

button.toggle {
    font-size:0.95em;
    background:#fff;
    color:var(--astro-rose);
    padding:10px 15px 9px 15px;
}


.toggle-pink button.toggle{
    color:#fff;
    background:var(--astro-rose);
}

button.toggle-content {
    font-size: 0.72em;
    padding:9px 15px 7px 15px;
    color:#fff;
    border:2px solid #fff;
    background:transparent;
}

button.toggle-content.open {
    color:#000;
    background:#fff;
}

button.open {
    position: relative;
}

.events-filter-form-element {
    position: relative;
}

.events-filter-toggle {
    display: none;
}

.events-extra-filters .cats a,
.events-extra-filters .cats a:visited {
    border:2px solid var(--cat-color, #183557);
    color:var(--cat-color, #183557)!important;
}

.events-extra-filters .cats a:hover {
    background-color:var(--cat-color, #183557);
    color:#fff!important;
}

.sticky-filters {
    padding:1em 1em 2em 1em;
    will-change: opacity, transform, box-shadow;
}

.sticky-filters.elementor-sticky--active {
    box-shadow: rgb(93 76 58 / 0.25) 0px 8px 30px 0px;
    border-bottom:1px solid var(--astro-jaune);
}

.elementor-sticky--active.bg-on-sticky {
    background:var(--astro-jaune-clair)!important;
}

.events-filter-form-element.open .events-extra-filters .cats a,
.elementor-sticky--active.bg-on-sticky .events-extra-filters .cats a {
    background:#fff;
    border-color:#fff;
}

.events-filter-form-element.open .events-extra-filters .cats a:hover,
.elementor-sticky--active.bg-on-sticky .events-extra-filters .cats a:hover {
    background:var(--astro-bleu);
    border-color:var(--astro-bleu);
}

@media screen and (max-width:1023px) {
    .events-filter-form-element {
        display: none;
    }
    .events-filter-toggle {
        display: flex;
        align-items: center;
        gap:15px;
    }

    .events-filter-toggle + form {
        margin-top:15px;
    }
    .active-filters-summary {
        line-height:1.2;
        color: var(--astro-rose);
        font-weight: bold;
    }
    .events-extra-filters input {
        transform: scale(1.42);
        transform-origin: top left;
        margin-bottom:1em;
    }
    .sticky-filters {
        background:var(--astro-jaune-clair)!important;
        padding:1em;
    }
    .elementor-sticky--active .filters-container {
        flex-wrap:wrap;
    }
    .elementor-sticky--active .events-extra-filters .cats {
        margin-left:0;
    }
}

@media screen and (max-width:767px) {
    
    .filters-container {
        flex-wrap:wrap;
        gap:20px;
    }
    
    .filter-fields {
        gap: 20px 40px;
        flex-wrap:wrap;
    }

    .field-group input[type="date"] {
        width:122px;
    }

    .events-filter-btn {
        padding: 8px;
    }

    .events-extra-filters .checkboxes {
        height:auto;
        margin:0;
        gap: 15px 30px;
        flex-wrap:wrap;
    }

    .active-filters-summary {
        font-size: 0.8em;
    }
    
    .events-extra-filters .cats {
        flex-wrap:nowrap;
        max-width:calc(100vw - 3em);
        padding-bottom:5px;
        overflow-y:auto;
        flex:1 1 100%;
        margin-left:0;
    }
    
    .events-extra-filters .cats a {
        background:#fff;
        border-color:#fff;
        font-size: 0.8em;
    }
    
    .events-extra-filters .cats a:hover {
        background:var(--astro-bleu);
        border-color:var(--astro-bleu);
    }
}

@media screen and (min-width:1024px) {
    .filter-fields {
        flex-wrap:nowrap;
    }
    .elementor-sticky--active.fullwidth-on-sticky {
        left:0!important;
        right:0!important;
        width: 100vw!important;
    }
    .elementor-sticky--active.fullwidth-on-sticky > div {
        width:1400px;
        max-width:100%;
        margin:0 auto;
    }
}

/* =========================================================
   EVENTS - AFFICHAGE DES POSTS D'ÉVÉNEMENTS
   ========================================================= */

.no-events-message {
    background:rgb(0 0 0 / 5%);
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
    color: var(--astro-rose);
    font-style: italic;
    font-weight:bold;
}

.button.btn-view-all {
    background:#111;
    color:#fff;
    font-size:0.85em;
    line-height:1.2em;
    border-radius:100px;
    margin-top: 1em;
    display: inline-block;
}

.event-post {
    background: var(--cat-gradient, #183557);
    will-change: opacity, transform, height;
}

.event-post .tag {
    background:var(--cat-color, #183557);
}

.event-post .event-bg {
    content: "";
    z-index:-1;
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    mix-blend-mode: color-dodge;
    opacity: 0.05;
    pointer-events: none;
    will-change: filter, opacity, transform;
    transform: translateZ(0);
}

@media screen and (min-width:768px){
    .event-post .event-bg {
        opacity: 0.22;
        filter: blur(12px);
    }
}

.event-post:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.event-post a {
    color:#fff;
}

.event-post-title a {
    font-family:'Kufam', sans-serif;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 900;
}

.event-post-title a:hover {
    color: #fba818;
}

.events-error-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.event-table[data-initial="week"] .numdaymonthyear,
.event-table[data-showfilters="false"] h3.event-range {
    display:none;
}

.next-date {
    font-size:0.8em;
    letter-spacing:0.05em;
    font-weight:600;
    color:#fff;
    opacity:0.8;
}

.no-date-range .event-range {
    display:none;
}

.events-category-title {
    font-family:'Montserrat', sans-serif;
    font-style:italic;
    font-weight: 800;
    font-size: 3em;
    text-transform: uppercase;
    color: #183557;
}

.events-category-desc {
    font-family:'Montserrat', sans-serif;
    font-weight:500;
    font-style:italic;
    margin-bottom:40px;
    font-size:1.4em;
    color:#282828;
}

.event-post {
    position: relative;
    border-radius: 16px;
    display:flex;
    padding:25px;
    gap:50px;
    margin:0 0 42px 0;
    font-size:1em;
    line-height:1.5;
    min-height:326px;
}

.event-post .tag {
    display:block;
    position:absolute;
    color:#fff;
    border-radius:6px;
    top:-13px;
    font-size:0.85em;
    line-height:1;
    padding:8px 12px 6px 12px;
    font-style:italic;
    font-weight:500;
    font-family:'Kufam', sans-serif;
}

.event-data {
    display:flex;
    flex-wrap:wrap;
    row-gap:18px;
    column-gap:7%;
    padding:10px 0 0 0;
}

.event-description {
    flex:0 0 30%;
}

.event-public {
    flex:1 1 26%;
}

.event-occurrences {
    flex:1 1 15%;
}

.event-next-dates {
    display:none;
    font-size:0.96em;
}

.occurrence-date {
    white-space: nowrap;
}

.occurrence-date + .occurrence-date {
    margin-top:3px;
}

.occurrence-date .time {
    font-weight:500;
}

.more-dates {
    font-weight:normal;
    font-size:0.72em;
    font-style:italic;
}

.event-duration {
    color:var(--astro-jaune);
    margin-bottom:8px;
}

.event-post img {
    margin:0;
}

.event-post-thumbnail {
    flex-basis:385px;
}

.event-post-thumbnail a,
.vertical-event-post-thumbnail a {
    height:100%;
    display:block;
}

.vertical-event-post-thumbnail img,
.event-post-thumbnail img {
    height:100%;
    width: 100%;
    object-fit: cover;
    border-radius:12px;
}

.event-post-content {
    flex: 1;
    color:#cccff2;
    display:flex;
    flex-wrap:wrap;
}

.event-post-title {
    font-size:1.34em;
    flex:1 0 100%;
}

.event-post span.title {
    display:inline-block;
    margin-bottom:8px;
}

.event-post-excerpt,
.event-public-txt,
.occurrence-date .time,
.event-pricing {
    font-size:0.88em; /*+- 14px*/
}

.event-public-txt {
    color:rgb(255 255 255 / 0.9);
}

.event-post-excerpt {
    font-style:italic;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 4;
}

.event-ctas {
    flex:1 0 100%;
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:1em;
    margin-top:1em;
}

.event-ctas .event-duration,
.event-description .event-pricing {
    display:none;
}

.event-ctas-pricing {
    display:flex;
    gap:1.3em;
    align-items:center;
    margin-bottom:-5px;
}

a.event-discover {
    display:inline-block;
    margin-top:1em;
    border-bottom:1px solid #fff;
}

a.event-discover i {
    margin-left:0.6em;
}

a.event-book {
    background:var(--astro-jaune);
    text-transform:uppercase;
    font-family:'Kufam',sans-serif;
    font-weight:800;
    letter-spacing:0.1em;
    line-height:1em;
    padding:11px 15px 6px 15px;
    border-radius:50px;
    border:3px solid var(--astro-jaune);
}

.event-book:hover {
    background:transparent;
    color:var(--astro-jaune);
}

ul.occurences {
    list-style: none;
    padding: 0 10px 0 0;
    margin: 0;
    color:#fff;
    font-family:'Kufam', sans-serif;
    font-weight:600;
    line-height:1.2;
    letter-spacing:0.01em;
    max-height: 7.0em;
    overflow-x:hidden;
    overflow-y: auto;
    scrollbar-color: var(--astro-jaune) transparent;
  scrollbar-width: 5px;
}

.toggle-content {
    display:none;
}

@media screen and (min-width:768px) and (max-width:1249px) {
    .event-post {
        gap:35px;
    }
    .event-post-thumbnail {
        flex-basis: 28%;
    }
    .event-description {
        flex: 0 0 45%;
    }
    a.event-discover {
        display:none;
    }
    .event-post-thumbnail img {
        height:100%;
    }
    .event-ctas-pricing {
        justify-content:space-between;
        flex:1;
    }
}

@media screen and (max-width:767px) {

    a.event-discover,
    .event-public,
    .event-description,
    .event-occurrences:not(.always-visible),
    .event-ctas .event-pricing,
    .event-ctas .event-duration {
        display:none;
    }
    .toggle-content {
        display:block;
    }
    .event-data {
        row-gap:10px;
        align-items:flex-start;
        padding:5px 0 0 0;
    }
    .mobile-content {
        flex-basis:100%;
        display:flex;
        gap:15px;
    }
    .events-category-title {
        font-size: 2.2em;
    }
    .events-category-desc {
        font-size:1.3em;
    }
    .event-post .tag {
        padding: 5px 12px 3px 12px;
        top: -10px;
    }
    .event-post-excerpt {
        -webkit-line-clamp: 6;
    }
    .event-description .event-duration {
        margin-bottom:0;
    }
    .event-description .event-pricing {
        display:block;
        margin-bottom:15px;
    }
    .event-post {
        min-height:100px;
        padding:16px;
        column-gap: 15px;
        row-gap:0;
        flex-wrap:wrap;
    }
    .event-post-thumbnail {
        flex-basis:35%;
    }
    .event-description {
        flex: 1 0 90%;
        margin-top:15px;
    }
    .event-post-title {
        order:-2;
        font-size:1.1em;
    }
    .event-ctas {
        order:-1;
        margin-top:auto;
    }
    .event-ctas-pricing {
        justify-content:space-between;
        flex:1;
        gap:5px;
        flex-wrap:wrap;
        margin:0;
    }
    .event-book {
        order:-5;
        margin-bottom:5px;
    }
    .dynamic-next-date.hidden {
        display:none;
    }
    .event-next-dates {
        display:block;
        order:-1;
    }
}

@media screen and (max-width:365px) {
    .event-post-thumbnail {
        flex-basis:27%;
    }
}

/* =========================================================
   LOADERS & SPINNERS
   ========================================================= */

.events-loader {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.loader-spinner {
    display: inline-block;
}

.events-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: events-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes events-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* =========================================================
   EVENTS - STYLES PAR CATÉGORIE (data-cat-slug)
   ========================================================= */

[data-cat-slug^="observation-du-ciel"] {
    --cat-color: #6f58e4;
    --cat-gradient: linear-gradient(45deg, #173557, #2f1863);
}

[data-cat-slug^="planetarium"] {
    --cat-color: #00bade;
    --cat-gradient: linear-gradient(45deg, #173557, #005c6e);
}

[data-cat-slug^="evenement"] {
    --cat-color: #fba818;
    --cat-gradient: linear-gradient(45deg, #173557, #19395e);
}

[data-cat-slug^="visites-guidees"] {
    --cat-color: #d45195;
    --cat-gradient: linear-gradient(45deg, #730c41, #8b1c56);
}

.events-category-group {
    margin-bottom: 95px;
}
