/**
 * Magazine Footer Bar - Reproduction fidèle de L'Info CSC
 * Source: https://linfo-csc.be (thème paf-60)
 */

/* ==========================================================================
   ICOMOON FONT
   ========================================================================== */

@font-face {
    font-family: 'icomoon';
    src: url('../icons/icomoon.woff') format('woff'),
         url('../icons/icomoon.ttf') format('truetype'),
         url('../icons/icomoon.svg#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="ico-"], [class*=" ico-"] {
    font-family: 'icomoon' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Icons Unicode mapping */
.ico-search-check:before { content: "\e900"; }
.ico-youtube:before { content: "\e901"; }
.ico-print:before { content: "\e902"; }
.ico-bluesky:before { content: "\e903"; }
.ico-twitter:before { content: "\e904"; }
.ico-facebook:before { content: "\e905"; }
.ico-instagram:before { content: "\e906"; }
.ico-question:before { content: "\e907"; }
.ico-arobase:before { content: "\e908"; }
.ico-close:before { content: "\e909"; }
.ico-quotes:before { content: "\e90a"; }
.ico-burger:before { content: "\e90b"; }
.ico-arrow-left-large:before { content: "\e90c"; }
.ico-arrow-right-large:before { content: "\e90d"; }
.ico-share:before { content: "\e90e"; }
.ico-panels:before { content: "\e90f"; }
.ico-search:before { content: "\e910"; }
.ico-info:before { content: "\e911"; }
.ico-a-more:before { content: "\e912"; }
.ico-a-less:before { content: "\e913"; }
.ico-arrow-right-circle:before { content: "\e914"; }
.ico-arrow-left-circle:before { content: "\e915"; }
.ico-sound-active:before { content: "\e916"; }
.ico-linkedin:before { content: "\e917"; }
.ico-mail:before { content: "\e918"; }
.ico-whatsapp:before { content: "\e919"; }
.ico-sound-pause:before { content: "\e91a"; }

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
    --mag-primary-color: #95BA39;
    --mag-primary-light: #CADD9C;
    --mag-primary-pale: #DFEAC3;
    --mag-primary-hover: #7a9a2e;
    --mag-text-color: #333;
    --mag-text-light: #666;
    --mag-border-color: #ddd;
    --mag-bg-color: #fff;
}

/* ==========================================================================
   FOOTER BAR - FIXED BOTTOM (Exact L'Info CSC)
   ========================================================================== */

.mag-footer-bar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    padding: 18px 0;
    background: #ffffff;
    z-index: 1002;
    margin: auto;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s background ease;
}

.mag-footer-bar.hidden {
    transform: translateY(100%);
}

/* Cover/Homepage variant: green background like L'Info CSC theme_essentiel
   Double class selector for higher specificity over later generic rules */
.mag-footer-bar.mag-footer-bar--cover {
    background: var(--mag-primary-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.mag-footer-bar.mag-footer-bar--cover .mag-btn-icon i {
    color: #ffffff;
}

.mag-footer-bar.mag-footer-bar--cover .mag-page-counter {
    border-left-color: #ffffff;
    border-right-color: #ffffff;
}

.mag-footer-bar.mag-footer-bar--cover .mag-page-counter__current {
    color: #ffffff;
}

.mag-footer-bar.mag-footer-bar--cover .mag-page-counter__total {
    color: rgba(255, 255, 255, 0.6);
}

.mag-footer-bar.mag-footer-bar--cover .mag-btn-nav {
    background: rgba(255, 255, 255, 0.25) !important;
}

.mag-footer-bar.mag-footer-bar--cover .mag-btn-nav i {
    color: #ffffff;
}

.mag-footer-bar__container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.mag-footer-bar__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* Group Left - Page Counter + Info */
.mag-footer-bar__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 auto 0 0;
}

/* Group Center - Action Buttons */
.mag-footer-bar__center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 auto;
}

/* Group Right - Navigation */
.mag-footer-bar__right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 0 auto;
}

/* Tablet */
@media (max-width: 1024.98px) {
    .mag-footer-bar {
        padding: 12px 0;
    }
}

/* ==========================================================================
   PAGE COUNTER (Exact L'Info CSC: .nbr-status)
   ========================================================================== */

.mag-page-counter {
    display: flex;
    align-items: center;
    border-left: solid 2px var(--mag-primary-color);
    border-right: solid 2px var(--mag-primary-color);
    margin: auto 0;
    padding: 3px 10px;
}

.mag-page-counter span {
    font-family: 'Antonio', sans-serif;
    font-weight: 700;
    font-size: 25px;
    line-height: 1;
    letter-spacing: 1px;
}

.mag-page-counter__current {
    color: var(--mag-text-color);
}

.mag-page-counter__total {
    color: var(--mag-primary-light);
}

@media (max-width: 1024.98px) {
    .mag-page-counter span {
        font-size: 18px;
    }
}

/* ==========================================================================
   ICON BUTTONS (Exact L'Info CSC: .btn--ico-solo)
   ========================================================================== */

.mag-btn-icon {
    transition: 0.25s all ease;
    font-size: 31px;
    background: none !important;
    border: none;
    padding: 0;
    margin: 0 12px;
    transform: scale(1);
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    cursor: pointer;
    text-decoration: none;
}

.mag-btn-icon:hover {
    transform: scale(1.2);
}

.mag-btn-icon:focus {
    outline: none;
}

/* Footer icon buttons are green */
.mag-footer-bar .mag-btn-icon i {
    color: var(--mag-primary-color);
}

/* Larger spacing on desktop */
@media (min-width: 1200px) {
    .mag-footer-bar__center .mag-btn-icon {
        margin: 0 20px;
    }
}

@media (min-width: 1025px) {
    .mag-footer-bar__center .mag-btn-icon {
        margin: 0 16px;
    }
}

/* Tablet */
@media (max-width: 1024.98px) {
    .mag-btn-icon {
        font-size: 26px;
        margin: 0 8px;
    }
}

/* ==========================================================================
   NAVIGATION ARROWS (Exact L'Info CSC: .btn--ico-prev / .btn--ico-next)
   ========================================================================== */

.mag-btn-nav {
    position: relative;
    background: var(--mag-primary-pale) !important;
    border-radius: 100%;
    border: 0;
    width: 42px;
    height: 42px;
    margin: 0 4px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s all ease;
}

.mag-btn-nav i {
    color: #ffffff;
    font-size: 24px;
}

.mag-btn-nav:hover {
    transform: scale(1.1);
}

.mag-btn-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tablet */
@media (max-width: 1024.98px) {
    .mag-btn-nav {
        width: 34px;
        height: 34px;
    }

    .mag-btn-nav i {
        font-size: 18px;
    }
}

/* ==========================================================================
   FONT SIZE CONTROLS (Hidden on mobile, like L'Info CSC: d-none d-sm-block)
   ========================================================================== */

.mag-font-controls {
    display: none;
    align-items: center;
    margin: 0 8px;
}

@media (min-width: 576px) {
    .mag-font-controls {
        display: flex;
    }
}

.mag-font-controls .mag-btn-icon {
    margin: 0 4px;
}

/* ==========================================================================
   MOBILE FIXED SHARE BUTTON (Exact L'Info CSC: .mobile-fixed-share)
   ========================================================================== */

.mag-share-mobile {
    display: none;
    position: fixed;
    top: calc(50% - 80px);
    left: 0;
    z-index: 1001;
    background: var(--mag-primary-color) !important;
    padding: 7px;
    margin: 0 !important;
    border: none;
    cursor: pointer;
    transition: 0.2s all ease;
}

.mag-share-mobile i {
    color: #ffffff !important;
    font-size: 26px;
}

.mag-share-mobile:hover {
    background: var(--mag-primary-light) !important;
}

@media (max-width: 1024.98px) {
    .mag-share-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 1025px) {
    .mag-share-mobile {
        display: none;
    }
}

/* ==========================================================================
   FLOATING BURGER MENU (Top Right - Exact L'Info CSC: .summary-burger)
   ========================================================================== */

.mag-burger-menu {
    position: fixed;
    top: 20px;
    right: calc((100vw - 1395px) / 2);
    z-index: 1003;
    width: 67px;
    height: 67px;
    background: var(--mag-primary-color) !important;
    color: #fff;
    border: none !important;
    border-radius: 100%;
    cursor: pointer;
    padding: 0;
    margin: 0 !important;
    outline: none !important;
    transition: 0.2s all ease;
}

.mag-burger-menu i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: #ffffff !important;
}

.mag-burger-menu:hover {
    background: var(--mag-primary-light) !important;
}

/* Color variants per category (like L'Info CSC) */
.mag-burger-menu.v-primary   { background: #95BA39 !important; }
.mag-burger-menu.v-secondary { background: #7D286F !important; }
.mag-burger-menu.v-tertiary  { background: #2A8D94 !important; }
.mag-burger-menu.v-quaternary { background: #AD4C29 !important; }
.mag-burger-menu.v-quinary   { background: #DE8C3F !important; }

/* Tablet */
@media (max-width: 1440px) {
    .mag-burger-menu {
        right: 20px;
        top: 18px;
    }
}

/* Tablet icon size */
@media (max-width: 1024.98px) {
    .mag-burger-menu i {
        font-size: 27px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .mag-burger-menu {
        width: 47px;
        height: 47px;
        top: 6px;
        right: 10px;
    }

    .mag-burger-menu i {
        font-size: 27px;
    }
}

/* ==========================================================================
   MODALS (Exact L'Info CSC: .modal)
   ========================================================================== */

.mag-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mag-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mag-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.mag-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.mag-modal.active .mag-modal__content {
    transform: translateY(0);
}

/* Full screen modal */
.mag-modal--full .mag-modal__content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: 24px;
}

/* Close button (Exact L'Info CSC: .btn--close) */
.mag-modal__close {
    position: fixed;
    top: 20px;
    right: calc((100vw - 1400px) / 2);
    width: auto;
    height: auto;
    background: var(--mag-primary-light);
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 13px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: 0.2s all ease;
}

.mag-modal__close i {
    font-size: 22px;
    font-weight: 900;
    transition: 0s all ease;
}

.mag-modal__close:hover {
    background: #b8cf7a;
}

.mag-modal__close:hover i {
    transition: 0.2s all ease;
    transform: rotate(90deg);
}

@media (max-width: 1440px) {
    .mag-modal__close {
        right: 20px;
    }
}

@media (max-width: 767px) {
    .mag-modal__close {
        top: 15px;
        right: 15px;
        padding: 10px;
    }

    .mag-modal__close i {
        font-size: 16px;
    }
}

.mag-modal__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #333;
}

/* Title skew style like L'Info CSC */
.mag-modal--full .mag-modal__title {
    display: inline-block;
    background: var(--mag-primary-color);
    color: #fff;
    padding: 8px 20px;
    transform: skewX(-5deg);
    text-align: left;
    font-size: 22px;
}

/* ==========================================================================
   SHARE MODAL
   ========================================================================== */

.mag-share-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.mag-share-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
    min-width: 80px;
}

.mag-share-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mag-share-link i {
    font-size: 32px;
    margin-bottom: 8px;
}

.mag-share-link span {
    font-size: 12px;
    font-weight: 500;
}

.mag-share-link--facebook i { color: #1877F2; }
.mag-share-link--bluesky i { color: #0085FF; }
.mag-share-link--whatsapp i { color: #25D366; }
.mag-share-link--linkedin i { color: #0A66C2; }
.mag-share-link--mail i { color: #EA4335; }

/* ==========================================================================
   SEARCH MODAL
   ========================================================================== */

.mag-search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.mag-search-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

.mag-search-form input[type="text"]:focus {
    border-color: var(--mag-primary-color);
}

.mag-search-form button {
    padding: 12px 24px;
    background: var(--mag-primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
}

.mag-search-form button:hover {
    background: var(--mag-primary-hover);
}

.mag-search-results {
    max-height: 400px;
    overflow-y: auto;
}

.mag-search-result {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.mag-search-result:last-child {
    border-bottom: none;
}

.mag-search-result a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.mag-search-result a:hover {
    color: var(--mag-primary-color);
}

/* Sommaire modal: gray background + green accent stripe like original */
#mag-modal-sommaire .mag-modal__overlay {
    background: #E5E5E5;
}

#mag-modal-sommaire .mag-modal__content {
    background: #E5E5E5;
}

#mag-modal-sommaire .mag-modal__content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 11px;
    height: 100%;
    background: var(--mag-primary-color);
    z-index: 1;
}

/* ==========================================================================
   SOMMAIRE MODAL (Exact L'Info CSC: .summary-tile)
   ========================================================================== */

.mag-sommaire {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 20px 0;
}

.mag-sommaire-item {
    position: relative;
    display: flex;
    gap: 0;
    padding: 0;
    background: #ffffff;
    min-height: 74px;
    height: 100%;
    transition: 0.25s all ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.mag-sommaire-item:hover .mag-sommaire-item__image img {
    transform: scale(1.2);
}

/* Hover overlay (green tint on full tile) */
.mag-sommaire-item::after {
    content: "";
    transition: 0.25s all ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: rgba(149, 186, 57, 0.25);
    opacity: 0;
    z-index: 1;
}

.mag-sommaire-item:hover::after {
    opacity: 1;
}

.mag-sommaire-item.active {
    pointer-events: none;
}

.mag-sommaire-item.active::after {
    opacity: 1;
}

.mag-sommaire-item__image {
    width: 100px;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.mag-sommaire-item__image img {
    transition: 0.25s all ease;
    vertical-align: middle;
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.mag-sommaire-item__content {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px 50px 15px 15px;
    margin: auto 0;
}

.mag-sommaire-item__category {
    display: block;
    font-size: 18px;
    font-family: 'Antonio', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.mag-sommaire-item__title {
    font-family: 'Antonio', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #212121;
    margin: 0;
    line-height: 1.2;
}

.mag-sommaire-item__page {
    font-family: 'Antonio', sans-serif;
    font-size: 18px;
    font-weight: 700;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 767.98px) {
    .mag-sommaire {
        grid-template-columns: 1fr;
    }

    .mag-sommaire-item__content {
        padding: 10px 50px 10px 10px;
    }

    .mag-sommaire-item__page {
        top: inherit;
        transform: none;
        bottom: 10px;
    }
}

/* ==========================================================================
   GUIDE MODAL
   ========================================================================== */

.mag-guide-slides {
    position: relative;
}

.mag-guide-slide {
    display: none;
}

.mag-guide-slide.active {
    display: block;
}

.mag-guide-slide img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.mag-guide-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.mag-guide-nav button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    padding: 0;
}

.mag-guide-nav button.active {
    background: var(--mag-primary-color);
}

/* ==========================================================================
   BODY PADDING (for fixed footer)
   ========================================================================== */

body.has-mag-footer {
    padding-bottom: 80px;
}

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

@media (max-width: 1024.98px) {
    .mag-footer-bar__content {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .mag-footer-bar {
        padding: 8px 0;
    }
}

/* ==========================================================================
   NO PRINT
   ========================================================================== */

@media print {
    .mag-footer-bar,
    .mag-share-mobile,
    .mag-burger-menu,
    .mag-modal {
        display: none !important;
    }

    body.has-mag-footer {
        padding-bottom: 0;
    }
}
