/**
 * Styles pour l'agenda
 * Fichier fusionné pour éviter les doublons tout en préservant les fonctionnalités
 */


/* Structure générale */

.archive-agenda-container {
    position: relative;
    padding: 30px 0 60px;
    background-color: #fff;
}


/* Fil d'ariane */

.breadcrumb-row {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb-row p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.breadcrumb-row a {
    color: #132540;
    text-decoration: none;
}

.breadcrumb-row a:hover {
    color: #b09760;
}


/* En-tête de page */

.agenda-header-content {
    margin-bottom: 50px;
}

.agenda-header-content h1,
.agenda-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #132540;
}

.agenda-header-content h2,
.agenda-subtitle {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.agenda-header-content p,
.agenda-description {
    font-size: 16px;
    margin-bottom: 20px;
    color: #666;
    max-width: 600px;
    line-height: 1.6;
}

.agenda-header-content a.more-link,
.more-link a {
    color: #B09760;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.agenda-header-content a.more-link i {
    margin-left: 5px;
}

.agenda-featured-image {
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.agenda-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}


/* Boutons latéraux */

.side-buttons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.side-button {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.side-button:hover {
    transform: translateX(-5px);
}

.side-button span {
    color: #132540;
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
}

.icon-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gold-bg {
    background-color: #b09760;
}

.icon-circle img {
    width: 16px;
    height: 16px;
}


/* Compteur d'événements */

.events-count {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
}


/* Section des événements */

.events-container {
    margin-top: 30px;
}


/* Section de filtrage */

.filter-box {
    border: 2px solid #132540;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: none;
}

.filter-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: #132540;
}

.filter-title i {
    margin-right: 10px;
    color: #132540;
}

.filter-content h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}


/* Style des cases à cocher personnalisées */

.filter-checkboxes {
    display: flex;
    flex-direction: column;
}

.filter-checkboxes label {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    transition: color 0.2s;
}

.filter-checkboxes input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    border: 1px solid #cdd5e0;
    border-radius: 4px;
    background-color: #fff;
}

.filter-checkboxes label:hover input~.checkmark {
    border-color: #B09760;
}

.filter-checkboxes input:checked~.checkmark {
    background-color: #fff;
    border-color: #B09760;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-checkboxes input:checked~.checkmark:after {
    display: block;
}

.filter-checkboxes label .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #B09760;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#clear-filters {
    margin-top: 20px;
    background-color: #132540;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

#clear-filters:hover {
    background-color: #0e1b30;
}


/* Loader */

#events-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #B09760;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* Grille d'événements - Force la disposition en grille */

.events-grid {
    position: relative;
}

.events-grid .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
    width: calc(100% + 30px);
    max-width: none;
}


/* Cartes d'événements - Design exact comme l'image */

.event-card-wrapper {
    margin-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
    width: 50%;
    box-sizing: border-box;
    float: left;
}

.event-card {
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}


/* Pour la table qui contient les événements */

.events-table {
    table-layout: fixed;
}

.event-cell {
    vertical-align: top;
}

.event-row {
    height: 1px;
    /* Force toutes les lignes à avoir la même hauteur */
}


/* En-tête de la date */

.event-date {
    background-color: #132540;
    color: white !important;
    padding: 15px;
}


/* Style spécifique pour la date dans la page archive-agenda */

.event-card .event-date {
    display: flex;
    align-items: center;
    text-align: left;
}

.event-card .event-date .date-number,
.event-card .event-date .date-month,
.event-card .event-date .date-year,
.event-card .event-date .calendar-icon {
    color: white !important;
}

.event-card .date-wrapper {
    display: flex;
    align-items: center;
}

.event-card .date-number {
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    margin-right: 10px;
}

.event-card .date-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-card .date-month {
    font-size: 15px;
    text-transform: uppercase;
    line-height: 1.2;
    font-weight: 600;
}

.event-card .date-year {
    font-size: 13px;
    line-height: 1.2;
    opacity: 0.8;
}

.event-card .calendar-icon {
    font-size: 20px;
    margin-right: 12px;
    color: white !important;
}


/* Style alternatif pour l'en-tête de date (format centré) */

.event-date.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    text-align: center;
}

.date-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 15px;
    text-transform: uppercase;
    margin-top: 2px;
}

.date-year {
    font-size: 13px;
    margin-top: 2px;
}


/* Contenu de la carte */

.event-content {
    background-color: #f9f7f0;
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-title-card {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px;
    color: #132540;
    line-height: 1.3;
    min-height: 52px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-location {
    margin: 0 0 15px;
}

.location-tag {
    display: inline-block;
    background-color: #B09760;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.event-description-card {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.event-description-card p {
    margin: 0;
}


/* Hauteur fixe optionnelle pour l'extrait */

.fixed-height .event-description-card {
    height: 72px;
    /* Hauteur fixe pour 3 lignes */
    overflow: hidden;
}

.fixed-height .event-description-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Partie inférieure de la carte */

.event-time {
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.event-time i {
    margin-right: 8px;
    color: #B09760;
}

.event-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Bouton Je m'inscris */

.btn-inscription {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #B09760;
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    text-transform: none;
}


/* Supprime toute transformation de texte qui pourrait être héritée */

.btn-inscription span,
.btn-inscription {
    text-transform: none !important;
}

.btn-inscription i {
    margin-left: 8px;
    transition: transform 0.2s;
    transform: rotate(-45deg);
}

.btn-inscription:hover {
    background-color: #9a834f;
    color: white !important;
    text-decoration: none;
}

.btn-inscription:hover i {
    transform: rotate(-45deg) translateX(3px);
}


/* Lien Ajouter à l'agenda */

.btn-add-calendar-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.btn-add-calendar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666 !important;
    padding: 5px 0;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.btn-add-calendar i {
    margin-right: 5px;
    color: #B09760;
    font-size: 14px;
    transition: transform 0.2s;
}

.btn-add-calendar:hover {
    color: #B09760 !important;
    text-decoration: none;
}

.btn-add-calendar:hover i {
    transform: scale(1.1);
}


/* Message "Aucun événement" */

.events-grid>p {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
    border: 1px dashed #ddd;
}


/* Pagination */

.pagination,
.pagination-wrapper {
    margin-top: 30px;
    text-align: center;
    clear: both;
}

.pagination .page-numbers,
.pagination-wrapper a,
.pagination-wrapper span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers {
    border: 1px solid #e0e0e0;
    color: #666;
}

.pagination-wrapper a {
    background-color: #f0f0f0;
    color: #333;
}

.pagination .page-numbers.current,
.pagination-wrapper span.current {
    background-color: #132540;
    color: white;
    border-color: #132540;
}

.pagination .page-numbers:hover:not(.current) {
    background-color: #f0f0f0;
    color: #333;
}


/* Clearfix pour résoudre les problèmes de flottement */

.events-grid .row:after {
    content: "";
    display: table;
    clear: both;
}


/* Animations pour les cartes lors du chargement */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.events-grid .row .event-card-wrapper:nth-child(2) .event-card {
    animation-delay: 0.1s;
}

.events-grid .row .event-card-wrapper:nth-child(3) .event-card {
    animation-delay: 0.2s;
}

.events-grid .row .event-card-wrapper:nth-child(4) .event-card {
    animation-delay: 0.3s;
}


/* Styles pour l'affichage des événements sur la page d'accueil - Version référence exacte */

.homepage-events-container {
    padding: 15px 0;
    position: relative;
}

.homepage-events-container .events-count {
    font-size: 14px;
    color: #333;
    margin: 0 0 15px;
    padding-left: 30px;
}

.events-row {
    display: flex;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}


/* Style des blocs d'événements */

.event-block {
    width: 50%;
    padding: 0 20px;
    position: relative;
}


/* Bloc de droite avec séparateur vertical */

.event-block.event-right {
    position: relative;
}

.event-block.event-right:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background-color: #ddd;
}


/* En-tête avec date et lieu */

.event-date-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.event-day {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: #333;
    margin-right: 10px;
}

.event-date-meta {
    display: flex;
    flex-direction: column;
}

.event-month {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    text-transform: capitalize;
}

.event-year {
    font-size: 14px;
    color: #666;
    line-height: 1.2;
}

.event-location-badge {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #b09760;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
}


/* Contenu spécifique pour la page d'accueil */

.event-block .event-content {
    padding-right: 20px;
    background-color: transparent;
}

.event-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.event-time-info {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.event-time-info i {
    margin-right: 5px;
    color: #666;
    font-size: 12px;
}


/* Liens d'action */

.event-links {
    display: flex;
    gap: 20px;
}

.link-je-minscris,
.link-ajouter-agenda {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    text-decoration: none;
    position: relative;
}

.link-je-minscris {
    color: #333 !important;
}

.link-ajouter-agenda {
    color: #666 !important;
}

.link-je-minscris::after,
.link-ajouter-agenda::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.link-je-minscris i {
    margin-left: 5px;
    transform: rotate(-45deg);
    font-size: 10px;
}

.link-ajouter-agenda i {
    margin-right: 5px;
    font-size: 12px;
}

.link-je-minscris:hover,
.link-ajouter-agenda:hover {
    color: #b09760 !important;
}

.link-je-minscris:hover::after,
.link-ajouter-agenda:hover::after {
    background-color: #b09760;
}

.link-je-minscris:hover i,
.link-ajouter-agenda:hover i {
    color: #b09760;
}


/* Bouton Notre agenda */

.notre-agenda-btn {
    position: absolute;
    right: 30px;
    top: 40px;
}

.notre-agenda-btn a {
    display: inline-flex;
    align-items: center;
    background-color: #b09760;
    color: white !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 50px;
    transition: background-color 0.3s;
}

.notre-agenda-btn a i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.notre-agenda-btn a:hover {
    background-color: #95805a;
}

.notre-agenda-btn a:hover i {
    transform: translateX(3px);
}


/* Responsive */

@media (max-width: 991px) {
    .side-buttons {
        display: none;
    }
}

@media (max-width: 767px) {
    .event-card-wrapper {
        width: 100%;
    }
    .event-info {
        flex-direction: column;
    }
    .event-date {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .event-actions {
        flex-direction: column;
        gap: 10px;
    }
    .event-content {
        padding: 20px;
    }
    .event-title-card {
        font-size: 18px;
        min-height: auto;
    }
    .event-description-card {
        height: auto;
    }
    .fixed-height .event-description-card {
        max-height: 72px;
    }
    .btn-inscription {
        padding: 10px 18px;
    }
    .events-row {
        flex-direction: column;
    }
    .event-block {
        width: 100%;
        padding: 0;
        margin-bottom: 25px;
    }
    .event-block.event-right:before {
        display: none;
    }
    .notre-agenda-btn {
        position: static;
        text-align: center;
        margin-top: 20px;
    }
    .event-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .archive-agenda-container .col-md-9 {
        padding-left: 30px;
    }
    .archive-agenda-container .row {
        display: flex;
    }
}