/**
 * Styles Pages Spécifiques
 * Styles pour les pages actualités, galerie, articles, etc.
 * Dépend de: variables-globales.css et composants-communs.css
 */

/* ========================================
   POSTS / ACTUALITÉS
   ======================================== */

.post-card {
    border: 0;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    background: var(--background-gradient);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.post-thumb {
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-600);
    margin-bottom: var(--spacing-md);
}

.post-meta .badge {
    border-radius: var(--border-radius-pill);
}

.post-meta .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #adb5bd;
    display: inline-block;
    margin: 0 var(--spacing-sm);
}

/* News cards variante */
.news-card .card-img-top {
    transition: transform var(--transition-slow);
}

.news-card:hover .card-img-top {
    transform: scale(1.05);
}

/* ========================================
   ARTICLE DÉTAIL
   ======================================== */

.article-hero {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    margin-bottom: var(--spacing-2xl);
}

.article-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-900);
}

.article-body h3 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    color: var(--text-900);
}

.article-body p {
    margin-bottom: var(--spacing-lg);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    margin: var(--spacing-lg) 0;
}

.share {
    padding: var(--spacing-lg);
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    margin-top: var(--spacing-2xl);
}

.share .btn {
    border-radius: var(--border-radius-pill);
}

/* ========================================
   GALERIE
   ======================================== */

.gallery .thumb {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.gallery .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery a:hover img {
    transform: scale(1.03);
    box-shadow: 0 16px 36px var(--glass-brd);
}

/* Ratio harmonisé pour galerie (4:3) */
.ratio-4x3 {
    --bs-aspect-ratio: calc(3 / 4 * 100%);
}

/* Gallery card avec preview */
.gallery-card {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: white;
    box-shadow: var(--card-shadow);
}

.gallery-preview {
    gap: 5px;
    display: flex;
    flex-wrap: wrap;
}

.gallery-thumb {
    flex: 1 1 48%;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
}

.gallery-thumb img {
    transition: transform var(--transition-slow) ease;
}

.gallery-thumb:hover img {
    transform: scale(1.05);
}

/* Play button pour vidéos */
.play-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.play-btn i {
    font-size: 1.2rem;
}

/* ========================================
   LIGHTBOX / MODAL GALERIE
   ======================================== */

#galleryModal .modal-content {
    background: rgba(0, 0, 0, .9);
}

#galleryModal .modal-body {
    padding: 0;
}

#galleryModal .carousel-item img {
    max-height: calc(100vh - 140px);
    object-fit: contain;
}

/* ========================================
   RECHERCHE
   ======================================== */

.search-head {
    margin-bottom: var(--spacing-xl);
}

.search-head .input-group {
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-brd);
}

.search-hit {
    padding: var(--spacing-lg);
    background: var(--background);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--card-shadow);
}

.search-hit mark {
    background: var(--glass-brd);
    padding: .1rem .2rem;
    border-radius: .25rem;
}

/* ========================================
   FAQ
   ======================================== */

.faq .accordion-item {
    border: 1px solid var(--glass-shadow-light) !important;
    border-radius: var(--border-radius-md) !important;
    overflow: hidden;
    background: var(--background-gradient);
    box-shadow: var(--card-shadow);
    margin-bottom: var(--spacing-md);
}

.faq .accordion-button {
    font-weight: 600;
    background: transparent;
}

.faq .accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background: rgba(13, 110, 253, .06);
}

.faq .accordion-body {
    color: var(--text-600);
}

/* ========================================
   TÉMOIGNAGES
   ======================================== */

.testi-quote {
    position: relative;
    padding-left: 2.25rem;
}

.testi-quote::before {
    content: "";
    position: absolute;
    left: 0;
    top: -.25rem;
    font-size: 2.5rem;
    line-height: 1;
    color: rgba(13, 110, 253, .25);
}

/* ========================================
   CTA BAND
   ======================================== */

.cta-band {
    background: var(--cta-bg-color);
    border: 1px solid var(--glass-shadow-light);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 40px var(--glass-shadow-light);
    padding: var(--spacing-2xl) var(--spacing-xl);
}

/* ========================================
   PARTENAIRES / SPONSORS
   ======================================== */
@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

.partner-logos {
    display: flex;
    flex-wrap: wrap;
}

.partner-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.partner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    padding: var(--spacing-md);
}

.partner-logo {
    filter: grayscale(1) contrast(1.1);
    opacity: .8;
    transition: filter var(--transition-base), opacity var(--transition-base), transform var(--transition-base);
    max-height: 100px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partner-link:hover .partner-logo {
    filter: none;
    opacity: 1;
    transform: translateY(-2px);
}

.partner-name {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* ========================================
   FEATURE BOXES
   ======================================== */

.feature-box {
    border: 1px solid var(--glass-shadow-light);
    border-radius: var(--border-radius-lg);
    background: var(--background-gradient);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    height: 100%;
    padding: var(--spacing-xl);
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.feature-box .fx-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--glass-shadow-light), rgba(102, 16, 242, .10));
    color: var(--primary-color);
    border: 1px solid rgba(13, 110, 253, .2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 24px rgba(13, 110, 253, .10);
}

/* ========================================
   SPLIT CONTENT (photo/texte)
   ======================================== */

.split-left img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-md);
}

.split-left .tile {
    overflow: hidden;
}

/* ========================================
   MAP / LEAFLET
   ======================================== */

.map-wrap {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-brd);
}

#leafletMap {
    width: 100%;
    height: 380px;
}

.leaflet-control-attribution {
    font-size: 11px;
}

/* ========================================
   PAGINATION
   ======================================== */

.pager {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
}

.pager .page-link {
    border-radius: var(--border-radius-pill);
    border: 1px solid rgba(13, 110, 253, .18);
    background: var(--background);
    box-shadow: 0 6px 14px var(--shadow-light);
    padding: .3rem .7rem;
    transition: all var(--transition-fast);
}

.pager .page-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px var(--glass-shadow-light);
}

.pager .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--btn-text-color);
    box-shadow: 0 8px 18px rgba(13, 110, 253, .25);
}

.pager .page-item.disabled .page-link {
    opacity: .6;
    background: #f5f7ff;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .article-body {
        font-size: 1rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--spacing-md);
    }

    .partner-logos {
        gap: var(--spacing-md);
    }

    .partner-logos img {
        max-height: 32px;
    }
}


.text-block {
    max-width: 100%;
}

.text-block-content {
    line-height: 1.8;
    text-align: justify;
}

.text-block-content p:last-child {
    margin-bottom: 0;
}

.text-block-content ul,
.text-block-content ol {
    margin-bottom: 1rem;
}

.text-block-buttons {
    margin-top: var(--spacing-lg);
}

.text-justify {
    text-align: justify;
}
