/* ==========================
   Styles IC Événements
   ========================== */

/* Conteneur principal */
.ic-events-container {
    font-family: 'Albert Sans', sans-serif;
    background: transparent;
    margin: 0;
}

/* ---------- HEADER ---------- */

.ic-events-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0;
    margin-bottom: 24px;
    border-bottom: 4px solid #344E79; /* trait bleu foncé */
}

.ic-events-header-title {
    margin: 0;
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;
    color: #344E79;
}

/* Switcher Liste / Calendrier */
.ic-events-view-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background-color: #FFFFFF;
    border: 1px solid rgba(52, 78, 121, 0.2);
    border-radius: 999px;
}

.ic-events-view-switch .ic-view-btn {
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 8px 20px;
    border-radius: 999px;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #344E79;

    transition: background-color 0.2s ease, color 0.2s ease;
}

.ic-events-view-switch .ic-view-btn.is-active {
    background-color: #344E79;
    color: #FFFFFF;
}

/* Wrapper des vues */
.ic-events-views-wrapper {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Affichage / masquage des vues */
.ic-events-view {
    display: none;
}

.ic-events-view.is-active {
    display: block;
}

/* ---------- VUE LISTE ---------- */

.ic-event-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

/* Barre colorée en haut de la carte
   (couleur dynamique via style inline, fallback = #344E79) */
.ic-event-card-left-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #344E79;
    z-index: 1;
}

/* Contenu texte */
.ic-event-card-content {
    flex: 1;
    padding: 24px 32px;
    z-index: 2;
}

.ic-event-date {
    margin: 0 0 4px 0;
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 24px;
    color: #344E79;
}

.ic-event-title {
    margin: 0;
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;
    color: #344E79;
}

.ic-event-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 24px;
    color: #344E79;
}

.ic-event-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ic-event-meta-item .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.ic-event-excerpt {
    margin-top: 12px;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 24px;
    color: #344E79;
}

/* Zone du bouton CTA à droite */
.ic-event-card-cta {
    display: flex;
    align-items: center;
    padding: 24px 32px;
    z-index: 2;
}

/* Bouton “Plus d’infos”
   – la couleur de fond est dynamique via inline style
   – fallback = #82BCDA, texte blanc */
.ic-event-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    cursor: pointer;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #FFFFFF;

    background-color: #82BCDA;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ic-event-btn:hover,
.ic-event-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.20);
}

.ic-event-btn-arrow {
    font-size: 16px;
    line-height: 1;
}

/* Pied de liste : “Voir tous les événements” */
.ic-events-footer {
    margin-top: 24px;
}

.ic-events-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 999px;
    text-decoration: none;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;

    background-color: #82BCDA;
    color: #FFFFFF;

    transition: opacity 0.2s ease;
}

.ic-events-footer-link .ic-event-btn-arrow {
    font-size: 16px;
    line-height: 1;
}

.ic-events-footer-link:hover,
.ic-events-footer-link:focus {
    opacity: 0.9;
}

/* ---------- VUE CALENDRIER ---------- */

.ic-events-view-calendar {
    margin-top: 0;
}

/* En-tête du calendrier (flèches + mois) */
.ic-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.ic-cal-nav {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #344E79;
    background-color: #FFFFFF;
    color: #344E79;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;

    transition: background-color 0.2s ease, color 0.2s ease;
}

.ic-cal-nav:hover,
.ic-cal-nav:focus {
    background-color: #344E79;
    color: #FFFFFF;
}

.ic-cal-current-month {
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #344E79;
}

/* Grille */
.ic-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid rgba(52, 78, 121, 0.2);
    border-left: 1px solid rgba(52, 78, 121, 0.2);
}

.ic-cal-cell {
    min-height: 72px;
    border-right: 1px solid rgba(52, 78, 121, 0.2);
    border-bottom: 1px solid rgba(52, 78, 121, 0.2);
    padding: 4px 6px;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 14px;
    color: #344D78;

    background-color: #FFFFFF;
}

/* Cellules vides (avant ou après le mois) */
.ic-cal-cell.ic-cal-cell-empty {
    background-color: #F9FAFC;
    cursor: default;
}

/* Ligne des jours (Lun, Mar, ...) */
.ic-cal-cell.ic-cal-cell-header {
    background-color: #F3F6FB;
    font-weight: 400;
    font-size: 12px;
    line-height: 14px;
    color: #344D78;
}

/* Numéro du jour */
.ic-cal-day-number {
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 14px;
    color: #344D78;
    margin-bottom: 4px;
}

.ic-cal-day-number-today {
    background-color: #82BCDA;   /* bleu plein */
    color: #FFFFFF !important;              /* texte blanc lisible */
    border-radius: 999px;        /* cercle/pillule */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    height: 25px;
    padding: 2px;                /* léger padding autour du chiffre */
}

/* Événements dans une case */
.ic-cal-events {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ic-cal-event-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 6px;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 12px;
    /* Couleur du texte par défaut : blanc. Peut être surchargée via JS avec la
     * couleur du terme de taxonomie. */
    color: #FFFFFF;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
  
}

.ic-cal-cell.has-events {
    cursor: pointer;
}

/* ---------- POPUP DÉTAIL CALENDRIER ---------- */

.ic-calendar-detail {
    margin-top: 16px;
    max-width: 320px;
    padding: 20px 24px;
    border-radius: 12px;
    background-color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: none;
    position: relative;
}

.ic-calendar-detail.is-visible {
    display: block;
}

/* Lorsque le popup est flottant, on passe en position absolue et on annule la marge */
.ic-calendar-detail.is-floating {
    position: absolute;
    margin-top: 0;
    z-index: 100;
}

/* Bouton de fermeture (croix) du popup */
.ic-calendar-detail-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: inherit;
}

/* Texte supplémentaire dans le popup */
.ic-calendar-detail-text {
    margin: 4px 0;
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 12px;
    line-height: 18px;
    color: #344E79;
}

/* Titre */
.ic-calendar-detail-title {
    margin: 0 0 4px 0;
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #344E79;
}

/* Date + texte */
.ic-calendar-detail-date,
.ic-calendar-detail-meta,
.ic-calendar-detail-location {
    margin: 0 0 4px 0;
    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 12px;
    line-height: 18px;
    color: #344E79;
}

.ic-calendar-detail-meta span {
    margin-right: 4px;
}

/* Bouton Voir (mêmes specs typographiques que les autres boutons) */
.ic-calendar-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #FFFFFF;

    background-color: #82BCDA;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ic-calendar-detail-btn:hover,
.ic-calendar-detail-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ---------- ÉTAT VIDE ---------- */

.ic-events-empty {
    padding: 16px;
    border-radius: 10px;
    background-color: #F3F4F6;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 20px;
    color: #4B5563;
}

/* Conteneur des évènements dans la case */
.ic-cal-cell .ic-cal-events {
    margin-top: 4px;
}

/* Le pill doit prendre toute la largeur de la cellule */
.ic-cal-cell .ic-cal-event-pill {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Le texte ne dépasse jamais visuellement */
.ic-cal-cell .ic-cal-event-title {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis; /* "…" si trop long */
}

/* ==========================
   Styles "Trouvé dans" (recherche)
   ========================== */

.ic-found-in-files {
    margin-top: 8px;
    padding: 6px 12px;
    background-color: #F3F6FB;
    border-radius: 6px;
    border-left: 3px solid #82BCDA;

    font-family: 'Albert Sans', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 12px;
    line-height: 18px;
    color: #344E79;
}

.ic-found-in-files-label {
    font-weight: 500;
    color: #344E79;
}

.ic-found-in-files-list {
    color: #5A6B82;
}

/* ==========================
   Styles Résultats de recherche
   ========================== */

/* Conteneur des résultats */
.ic-search-results-list-inner,
.ic-comm-search-results-list-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Carte de résultat */
.ic-search-result-card,
.ic-comm-result {
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Titre de la section résultats */
.ic-search-results-title,
.ic-comm-search-results-title {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;
    color: #344E79;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 4px solid #344E79;
}

/* Wrapper des résultats */
.ic-search-results-wrapper,
.ic-comm-search-results-wrapper {
    margin-top: 24px;
}

