/* ObMoA - Styles personnalisés (complète Bootstrap) */

body {
    background-color: #f8f9fa;
}

/* --- Explorateur : carte + panneau coulissant --- */
#explorateur-map {
    height: calc(100vh - 180px);
    min-height: 500px;
    width: 100%;
}

#slide-panel {
    position: fixed;
    top: 0;
    right: -820px;
    width: 820px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 12px rgba(0, 0, 0, .15);
    overflow-y: auto;
    transition: right .3s ease;
    z-index: 1050;
}

#slide-panel.open {
    right: 0;
}

#territoire_list {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

/*.view-toggle .btn.active {
    background-color: #0d6efd;
    color: #fff;
}*/

/* --- Blog --- */
.article-card img {
    height: 180px;
    object-fit: cover;
}

/* --- Impression --- */
@media print {
    nav, footer, .modal-header .btn-close, .modal-footer .btn-secondary {
        display: none !important;
    }
}


.bg-edmoa {
    background: #1F4E78;
    background: linear-gradient(90deg, rgba(31, 78, 120, 1) 0%, rgba(0, 147, 154, 1) 14%, rgba(55, 149, 59, 1) 28%, rgba(133, 156, 48, 1) 42%, rgba(255, 192, 0, 1) 56%, rgba(230, 115, 0, 1) 70%, rgba(192, 0, 0, 1) 85%, rgba(155, 0, 132, 1) 100%);
}

.theme-tile-img { height: 160px; object-fit: cover; }
.theme-tile-placeholder {
    height: 160px; display: flex; align-items: center; justify-content: center;
    background: #f1f3f5; font-size: 2.5rem; color: #adb5bd;
}
.page-banner {
    position: relative;
    height: 50vh;
    background-size: cover;
    background-position: center;
}

/* Dégradé progressif vers le blanc en bas du bandeau — utilisable partout où
   .page-banner est déjà en place, pas seulement sur la fiche réseau. */
.page-banner-fade::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 25%;
    background: linear-gradient(to bottom, rgba(248, 249, 250, 0) 0%, rgba(248, 249, 250, .85) 75%, rgba(248, 249, 250, 1.0) 100%);
    pointer-events: none;
}

/* Fait chevaucher le bloc titre/actions sur la zone dégradée du bandeau,
   plutôt que de le placer entièrement en dessous. */
.page-header-overlap {
    position: relative;
    z-index: 1;
    margin-top: -85px;
}
@media (max-width: 767.98px) {
    .page-header-overlap {
        margin-top: -60px;
    }
}

/* Fond propre derrière le titre : garantit un contraste constant quelle que
   soit l'image (le dégradé seul ne suffit pas selon la luminosité/le
   contenu de l'image), plutôt que de dépendre uniquement du dégradé. */
.page-header-card {
    background: linear-gradient(to bottom, rgba(248, 249, 250, .5) 0%, rgba(248, 249, 250, 1.0) 100%);
    border-radius: .75rem;
    padding: 1rem 1.25rem;
    /*box-shadow: 0 6px 24px rgba(0, 0, 0, .1);*/
}
.page-header-card h1 {
    font-weight: 700;
    letter-spacing: -.01em;
}
.page-banner-back {
    position: absolute;
    top: 1rem;
    left: 2rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #fff !important;
    text-decoration: none;
    padding: .5rem 1.1rem;
    border-radius: .375rem;
    font-size: .875rem;
    font-weight: 500;
    border: none;
    background: linear-gradient(90deg, rgba(31, 78, 120, 1) 0%, rgba(0, 147, 154, 1) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    transition: filter .15s ease;
}
.page-banner-back:hover {
    color: #fff !important;
    filter: brightness(1.08);
}
.dossier-content img { max-width: 100%; height: auto; }

.actu-card-img-wrap { height: 160px; overflow: hidden; background: #f1f3f5; }
.actu-card-img { width: 100%; height: 160px; object-fit: cover; }
.actu-card-placeholder {
    height: 160px; display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: #adb5bd;
}

.masonry-gallery {
    column-count: 3;
    column-gap: 1rem;
}
.masonry-gallery img {
    width: 100%;
    display: block;
    margin-bottom: 1rem;
    border-radius: .375rem;
    break-inside: avoid;
}
@media (max-width: 768px) {
    .masonry-gallery { column-count: 2; }
}
@media (max-width: 480px) {
    .masonry-gallery { column-count: 1; }
}

/* ============================================================================
   Page d'accueil
   ============================================================================ */

.home-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(31, 78, 120, 1) 0%, rgba(0, 147, 154, 1) 14%, rgba(55, 149, 59, 1) 28%, rgba(133, 156, 48, 1) 42%, rgba(255, 192, 0, 1) 56%, rgba(230, 115, 0, 1) 70%, rgba(192, 0, 0, 1) 85%, rgba(155, 0, 132, 1) 100%);
    color: #fff;
    padding: 1.5rem 1rem 5.5rem;
}
.home-hero-deco {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.home-hero-content {
    position: relative;
    z-index: 1;
}
.home-hero h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
}
.home-hero .lead {
    max-width: 620px;
    opacity: .94;
}

.home-stats-strip {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 2.5rem 0;
}
.home-stat-card {
    text-align: center;
}
.home-stat-icon {
    font-size: 1.3rem;
    margin-bottom: .4rem;
}
.home-stat-number {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
}
.home-stat-label {
    font-size: .78rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: .35rem;
}

.home-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin: 0 auto 1rem;
}


.home-version-strip {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.home-auteur-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
}
.home-auteur-photo-placeholder {
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #adb5bd;
}
.home-auteur-links a {
    display: inline-block;
    margin: 0 .35rem;
    color: #6c757d;
    font-size: 1.1rem;
}
.home-auteur-links a:hover {
    color: #00939A;
}

.aom-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    color: #495057;
}
.aom-stats-row.small {
    font-size: .78rem;
    gap: .35rem .75rem;
}
.aom-stat-item i {
    color: #00939A;
    margin-right: .2rem;
}

.explo-tile-img { height: 160px; object-fit: cover; }
.explo-tile-placeholder {
    height: 160px; display: flex; align-items: center; justify-content: center;
    background: #f1f3f5; font-size: 2.5rem; color: #adb5bd;
}

.legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.15);
    flex-shrink: 0;
}

.aom-lignes-badge span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1F4E78;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
}

.osm-grayscale-tiles {
    filter: grayscale(100%) contrast(1.05);
}

/* ============================================================================
   Contrôle de carte partagé (assets/js/map_toolbar.js)
   Panneau permanent (non repliable), positionné en bas à gauche par Leaflet
   pour ne jamais chevaucher les boutons de zoom (en haut à gauche).
   ============================================================================ */

.map-toolbar {
    background: #fff;
    border-radius: .375rem;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .4);
    padding: .6rem .75rem;
    width: 195px;
    max-height: 50vh;
    overflow-y: auto;
    font-size: .8rem;
}
.map-toolbar .form-check {
    margin-bottom: .15rem;
}
.map-toolbar-title {
    font-weight: 600;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
    margin-bottom: .25rem;
}
.map-toolbar-section {
    margin-bottom: .6rem;
}
.map-toolbar-section:last-child {
    margin-bottom: 0;
}
/* Variante plus large pour le panneau de détail/statistiques (plan du
   réseau) : accueille des badges de ligne et des phrases plus longues que
   le panneau de calques. */
.map-detail-panel {
    width: 260px;
    max-height: 60vh;
}
@media (max-width: 576px) {
    .map-toolbar {
        width: 165px;
        max-height: 38vh;
        padding: .5rem .6rem;
        font-size: .75rem;
    }
}

.custom-range::-webkit-slider-thumb {
  background: var(--bs-primary);
}

.custom-range::-moz-range-thumb {
  background: var(--bs-primary);
}

.custom-range::-ms-thumb {
  background: var(--bs-primary);
}

.custom-range:focus::-webkit-slider-thumb{
    box-shadow: var(--bs-primary);
    background: var(--bs-primary);
}

.custom-range:focus::-moz-range-thumb{
    box-shadow: var(--bs-primary);
    background: var(--bs-primary);
}

.custom-range:focus::-ms-thumb {
    box-shadow: var(--bs-primary);
    background: var(--bs-primary);
}

.custom-range:active::-webkit-slider-thumb{
    box-shadow: var(--bs-primary);
    background: var(--bs-primary);
}

.custom-range:active::-moz-range-thumb{
    box-shadow: var(--bs-primary);
    background: var(--bs-primary);
}

.custom-range:active::-ms-thumb {
    box-shadow: var(--bs-primary);
    background: var(--bs-primary);
}

/* ============================================================================
   Comparateur — en-tête compact par territoire (comparateur.php)
   Même esprit que la bannière de reseau.php (image + nom en surimpression),
   mais en format réduit pour cohabiter plusieurs territoires côte à côte.
   ============================================================================ */

.comp-territoire-banner {
    position: relative;
    height: 33vh;
    background-size: cover;
    background-position: center;
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
}
.comp-territoire-banner::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    top:25vh;
    height: 8vh;
    padding: 10px;
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
    background: linear-gradient(to bottom, rgba(248, 249, 250, .5) 0%, rgba(248, 249, 250, 1.0) 100%);
    pointer-events: none;
}
.comp-territoire-banner-title {
    position: absolute;
    left: 10px;
    right: 0;
    bottom: 0;
    z-index: 1;
    color: #000;
    margin : 10px;
    font-weight: 700;
    font-size: 24pt;
}
