/* Intégration de la police aptos */
@font-face {
    font-family: aptos;
    src: url("https://use.typekit.net/af/d92408/000000000000000077371c20/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --monceau-navy: #3973b9;
    --monceau-orange: #3973b9;
    --monceau-green: #3973b9;
    --monceau-bg-light: #afd7df;
    --monceau-accent: #004380;
}

body {
    font-family: aptos, 'Open Sans', sans-serif;
    color: #333;
}

h1, h2, h3, .navbar-brand {
    font-family: aptos, sans-serif;
}

.color-primary { color: var(--monceau-navy); }
.color-accent { color: var(--monceau-orange); }
.bg-navy { background-color: var(--monceau-navy); }

.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 5454; padding: 0 !important; /* (ancien : left -7.5px + width 100vw → débordement horizontal) */
}
.navbar .container{
    padding: 0 !important;
}
.navbar .nav {
    margin: 15px auto;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, .25);
    background-color: #fff;
    transition: background .3s, border .3s, border-radius .3s, box-shadow .3s;
    padding: 0;
    font-family: "aptos", "Open Sans", Sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 21px 31px;
    
}
.navbar .nav-link {
    text-transform: uppercase;
    color: var( --monceau-navy)
}
/* Hero Banner */
.hero-banner {
    min-height: 75vh;
    background: linear-gradient(rgba(15, 34, 59, 0.8), rgba(15, 34, 59, 0.8)), 
                url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070') center/cover;
}

/* Boutons */
.cta-contact {
    background-color: var(--monceau-green) !important;
    border-color: var(--monceau-green) !important;
    border-radius: 8px;
    font-weight: 600;
}
.btn-outline-white {
    color: #ffffff;
    border-color: #ffffff;
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: #000
}
.btn-outline-primary {
    color: var(--monceau-navy);
    border-color: var(--monceau-navy);
}

.btn-outline-primary:hover {
    background-color: var(--monceau-navy);
}
.btn {
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px 8px 8px 8px;
}
.btn-primary {
    background-color: var(--monceau-green);
    border-color: var(--monceau-green);
    color: #fff;
}
.btn-primary:hover {
    background-color: #3973b9;
    border-color: #3973b9;
}
/* Accordion Custom */
.accordion-button:not(.collapsed) {
    background-color: #f3f6f9;
    color: var(--monceau-navy);
}

.accordion-button::after {
    filter: grayscale(1);
}
.p-acc {
    padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x) !important;
    font-family: aptos, sans-serif;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .display-3 { font-size: 2.5rem; }
}
.modal{z-index: 7575 !important;}
/* Couleurs personnalisées pour les tableaux */
.bg-navy { background-color: var(--monceau-navy) !important; }
.bg-accent { background-color: var(--monceau-accent) !important; }

/* Style des badges de performance YTD */
.bg-soft-green {
    background-color: #e7f5e9;
    color: #2e7d32;
    font-weight: 600;
    border-radius: 6px;
}

/* On peut aussi prévoir un style pour les perfs négatives si l'API le permet */
.bg-soft-red {
    background-color: #ffebee;
    color: #c62828;
}

/* Amélioration de la table */
.table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8fbff; /* Bleu très léger au survol */
}

/* Modale : ajustement pour le header */
.modal-header.bg-navy {
    border-bottom: 4px solid var(--monceau-orange);
}
div#chart_range_menu, span#chart_range__span {
    display: none !important;
}

/* ==========================================
   MÉDIA QUERIES VUE MOBILE (index.php)
   ========================================== */

@media (max-width: 991px) {
    /* Navbar : on réduit le padding et on gère le menu déplié */
    .navbar .nav {
        margin: 5px;
        padding: 10px 15px;
		justify-content: space-between;
    }
    .navbar-brand img {
        width: 180px; /* Logo plus petit sur tablette/mobile */
    }
    .navbar-collapse {
        background: #fff;
        margin-top: 15px;
        border-radius: 8px;
        padding: 10px;
    }
	.navbar {
		position: fixed;
		top: 0;
		left: 0 !important;
		padding: 0 !important;
	}
	.nav-item .btn{margin: 10px auto !important;}
	section.py-5.bg-navy.text-white .container {
		padding: 0 30px;
	}
	.table-carac-grid .item{width: 100% !important}
}

@media (max-width: 767px) {
    /* Hero Banner : Texte moins agressif */
    .hero-banner {
        min-height: 60vh;
        text-align: center;
        padding-top: 100px !important;
    }
    .hero-banner h1.display-3 {
        font-size: 2.2rem;
    }
    .hero-banner .lead {
        font-size: 1rem;
    }

    /* Section VL : On empile les cartes et on réduit la taille des polices */
    #vl .h2 { font-size: 1.5rem; }
    .fund-card .card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .table td, .table th {
        font-size: 0.85rem;
        padding: 8px 5px !important;
    }
    .btn-info-fonds {
        width: 100%;
        font-size: 0.8rem;
    }

    /* Section Légal : On empile les lignes "Lien direct" */
    .accordion-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
        padding: 15px !important;
    }
    .accordion-item .btn-sm {
        width: 100%;
        text-align: center;
    }

    /* Présentation et gestion : colonne de droite empilée sous la colonne principale */
    #apropos .border-start {
        border-left: 0 !important;
        border-top: 1px solid #dee2e6;
        padding-top: 20px;
        padding-left: 12px !important;
    }
    footer .text-lg-end {
        text-align: center !important;
        margin-top: 20px;
    }
}
/* ==========================================
   SECTION "NOS FONDS" : groupes + slider
   ========================================== */
.funds-group-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f223b;
    border-left: 5px solid var(--monceau-navy);
    padding-left: 12px;
}
.funds-group-head p { padding-left: 17px; }
.funds-slider { padding-bottom: 6px; }
.funds-slider .swiper-slide { height: auto; display: flex; }
.funds-slider .swiper-slide > .card { width: 100%; }
.fund-facts td { font-size: .9rem; }
.funds-slider-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 2px solid var(--monceau-navy);
    background: #fff;
    color: var(--monceau-navy);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s, opacity .2s;
}
.funds-slider-btn:hover:not(.swiper-button-disabled) { background: var(--monceau-navy); color: #fff; }
.funds-slider-btn.swiper-button-disabled { opacity: .35; cursor: default; }
.funds-slider-btn.swiper-button-lock { display: none; }
.funds-slider-pagination .swiper-pagination-bullet { width: 10px; height: 10px; background: var(--monceau-navy); opacity: .3; margin: 0 5px !important; }
.funds-slider-pagination .swiper-pagination-bullet-active { opacity: 1; }

@media (max-width: 767px) {
    .funds-group-title { font-size: 1.1rem; }
    .fund-card-static .card-header { flex-direction: column; text-align: center; }
    .fund-facts td { font-size: .82rem; }
    .fund-facts td.text-end { white-space: normal; }
}

/* ==========================================
   CORRECTIFS RESPONSIVE / ACCESSIBILITÉ (audit nov. 2026)
   ========================================== */
/* Ancres du menu : la section ciblée n'est plus cachée sous la navbar fixe */
html { scroll-padding-top: 150px; }   /* navbar desktop : 144 px */
@media (max-width: 991.98px) { html { scroll-padding-top: 90px; } }   /* navbar mobile/tablette : 84 px */

/* Logos : jamais plus larges que l'écran */
.navbar-brand img, footer img { max-width: 100%; height: auto; }

/* Badges YTD / SFDR lisibles (9,8 px auparavant sur mobile) */
.fund-card .badge, .fund-facts .badge { font-size: 12px; }

/* Pagination du slider : zone tactile élargie autour des puces */
.funds-slider-pagination .swiper-pagination-bullet { position: relative; width: 12px; height: 12px; margin: 0 8px !important; }
.funds-slider-pagination .swiper-pagination-bullet::after { content: ""; position: absolute; inset: -12px; }

/* Fenêtre modale « Informations & Documents » : pleine largeur sur tablette (500 px par défaut sous 1200 px) */
@media (min-width: 576px) and (max-width: 1199.98px) {
    .modal-xl { --bs-modal-width: calc(100% - 2rem); }
}

/* Slider en tablette (2 cartes par vue entre 768 et 991 px) : en-tête empilé, bouton pleine largeur */
@media (min-width: 768px) and (max-width: 991.98px) {
    .funds-slider .card-header { flex-direction: column; align-items: stretch !important; text-align: center; }
    .funds-slider .card-header .btn-info-fonds { width: 100%; font-size: .85rem; }
}

@media (max-width: 767.98px) {
    /* Tableaux des cartes : les valeurs ne collent plus au bord */
    .table td, .table th { padding: 8px 12px !important; }
    /* Texte justifié illisible sur petit écran (grands espaces entre les mots) */
    .text-justify { text-align: left !important; }
    /* Zones tactiles du pied de page et du menu */
    footer a { display: inline-block; padding: 8px 0; }
    .navbar .nav-link { padding-top: 10px; padding-bottom: 10px; }
    .accordion-item .btn-sm { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
}

/* ==========================================
   MENU (lot du 23/11/2026) : plus grand, aligné à gauche à côté du logo
   ========================================== */
.navbar .nav-link { font-size: 16px; letter-spacing: .02em; padding-left: .9rem !important; padding-right: .9rem !important; }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: #3973b9; }
@media (min-width: 992px) {
    .navbar .navbar-brand { margin-right: 0; }
    .navbar .navbar-nav { border-left: 1px solid #e3e8ef; padding-left: .75rem; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar .nav-link { font-size: 14px; padding-left: .6rem !important; padding-right: .6rem !important; }
}
/* Sliders « Nos fonds » : flèches et pagination masquées quand tous les fonds tiennent dans la vue */
.funds-slider-btn.swiper-button-lock, .funds-slider-pagination.swiper-pagination-lock { display: none !important; }
