/**
 * vigicrecy-villages — single-vgc_village.css
 * Template single village charte VigiCrécy®
 * Layout 75/25, mini-carte, navigation, cards suggérées, sidebar pub
 */

.vgv-single-wrap {
    background: #F8FAFB;
    padding: 20px 0 40px;
}

.vgv-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.vgv-breadcrumb {
    font-size: 13px;
    color: #667;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #E1E6ED;
}
.vgv-breadcrumb a {
    color: #016AB1;
    text-decoration: none;
}
.vgv-breadcrumb a:hover { text-decoration: underline; }
.vgv-breadcrumb .vgv-sep {
    color: #bbb;
    margin: 0 8px;
}

/* Grille principale 75/25 */
.vgv-single-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
}
@media (max-width: 900px) {
    .vgv-single-grid { grid-template-columns: 1fr; }
}

/* Colonne principale */
.vgv-single-main {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #E1E6ED;
}

/* Hero */
.vgv-hero {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    position: relative;
}
.vgv-hero-inner {
    padding: 24px;
    width: 100%;
}
.vgv-hero-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.vgv-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.vgv-hero-title {
    color: #fff;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
@media (max-width: 600px) {
    .vgv-hero-title { font-size: 22px; }
}

/* Métadonnées */
.vgv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #F0F4F8;
    border-radius: 8px;
    margin-bottom: 22px;
    font-size: 13px;
    color: #445;
}
.vgv-meta-item strong { font-weight: 600; color: #1a2e4a; }
.vgv-meta-sep { color: #bbb; }
.vgv-meta-spacer { flex: 1; }

.vgv-meta-author {
    color: #016AB1;
    text-decoration: none;
    font-weight: 600;
    transition: color .15s;
}
.vgv-meta-author:hover {
    color: #06D9FA;
    text-decoration: underline;
}

.vgv-meta-comments {
    color: #016AB1;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(1, 106, 177, 0.08);
    transition: background .15s, color .15s;
}
.vgv-meta-comments:hover {
    background: #016AB1;
    color: #fff;
}

/* Scroll doux pour les ancres internes (#comments) */
html { scroll-behavior: smooth; }

/* Bouton retour en haut — flottant bas-droite, apparaît après 400px de scroll */
.vgv-back-to-top {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #016AB1, #06D9FA);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(1, 106, 177, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity .25s, transform .25s, visibility .25s, box-shadow .2s;
    z-index: 99990 !important;
    padding: 0;
    margin: 0;
}
.vgv-back-to-top.vgv-visible {
    opacity: 0.92;
    visibility: visible;
    transform: translateY(0);
}
.vgv-back-to-top:hover {
    opacity: 1;
    box-shadow: 0 6px 20px rgba(1, 106, 177, 0.5);
    transform: translateY(-2px);
}
.vgv-back-to-top:focus {
    outline: 3px solid rgba(6, 217, 250, 0.4);
    outline-offset: 2px;
}
@media (max-width: 600px) {
    .vgv-back-to-top { bottom: 16px; right: 16px; width: 42px; height: 42px; }
}

/* Contenu éditorial — serif magazine */
.vgv-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.75;
    color: #2c3e50;
}
.vgv-content p { margin: 0 0 16px; }
.vgv-content p:first-of-type::first-letter {
    font-size: 52px;
    float: left;
    line-height: 0.9;
    margin: 6px 10px 0 0;
    color: #016AB1;
    font-weight: 700;
    font-family: Georgia, serif;
}
.vgv-content h2,
.vgv-content h3 {
    font-family: Georgia, serif;
    color: #1a2e4a;
    margin: 28px 0 14px;
    line-height: 1.3;
}
.vgv-content h2 { font-size: 22px; }
.vgv-content h3 { font-size: 18px; }
.vgv-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.vgv-content blockquote {
    border-left: 4px solid #06D9FA;
    background: #F8FBFF;
    padding: 12px 18px;
    margin: 18px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #445;
}
.vgv-content a {
    color: #016AB1;
    text-decoration: underline;
}

/* Mini-carte Leaflet */
.vgv-mini-map-wrap {
    margin: 24px 0;
    background: #F0F4F8;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E1E6ED;
}
#vgv-mini-map {
    width: 100%;
    height: 240px;
    background: #F0F4F8;
}
.vgv-mini-map-caption {
    padding: 8px 14px;
    font-size: 12px;
    color: #667;
    background: #F8FBFF;
    border-top: 1px solid #E1E6ED;
}

/* CTA vote */
.vgv-vote-cta {
    background: #F8FBFF;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 24px 0;
}
.vgv-vote-cta-label {
    font-size: 14px;
    color: #5a7a9a;
    margin-bottom: 12px;
}

/* Navigation préc/suivant */
.vgv-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 28px 0 0;
    padding-top: 22px;
    border-top: 1px solid #E1E6ED;
}
@media (max-width: 600px) {
    .vgv-pager { grid-template-columns: 1fr; }
}
.vgv-pager-link {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #F8FBFF;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid #E1E6ED;
}
.vgv-pager-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 106, 177, 0.12);
}
.vgv-pager-next {
    flex-direction: row-reverse;
    text-align: right;
}
.vgv-pager-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    flex-shrink: 0;
    background: #e0e6ed;
}
.vgv-pager-text { flex: 1; min-width: 0; }
.vgv-pager-dir {
    font-size: 11px;
    color: #888;
    font-weight: 500;
    margin-bottom: 3px;
}
.vgv-pager-title {
    font-size: 13px;
    color: #1a2e4a;
    font-weight: 600;
    line-height: 1.3;
}
.vgv-pager-bassin {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

/* Cards suggérées */
.vgv-suggested {
    margin: 28px 0 0;
    padding-top: 22px;
    border-top: 1px solid #E1E6ED;
}
.vgv-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a2e4a;
    margin: 0 0 14px;
    font-family: inherit;
}
.vgv-suggested-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 700px) {
    .vgv-suggested-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .vgv-suggested-grid { grid-template-columns: 1fr; }
}
.vgv-suggested-card {
    text-decoration: none;
    color: inherit;
    background: #F8FBFF;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #E1E6ED;
}
.vgv-suggested-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(1, 106, 177, 0.15);
}
.vgv-suggested-thumb {
    width: 100%;
    height: 100px;
    background: #e0e6ed;
}
.vgv-suggested-text { padding: 10px 12px; }
.vgv-suggested-commune {
    font-size: 12px;
    color: #1a2e4a;
    font-weight: 600;
    line-height: 1.3;
}
.vgv-suggested-ep {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

/* Commentaires natifs WP */
.vgv-comments {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #E1E6ED;
}

/* Sidebar */
.vgv-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.vgv-widget {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #E1E6ED;
}
.vgv-widget-title {
    font-size: 12px;
    font-weight: 600;
    color: #016AB1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* Recherche */
.vgv-widget-search form { position: relative; }
.vgv-widget-search input[type="search"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D8DFE6;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    background: #fff;
}
.vgv-widget-search input[type="search"]:focus {
    border-color: #016AB1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 106, 177, 0.1);
}

/* Publicité */
.vgv-ad-slot {
    border: 1px dashed #D4DAE2;
    text-align: center;
}
.vgv-ad-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #999;
    margin-bottom: 8px;
}
.vgv-ad-placeholder {
    background: linear-gradient(135deg, #f0f4f8, #e5ebf2);
    border-radius: 6px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aab3bc;
    font-size: 12px;
    margin-bottom: 6px;
}
.vgv-ad-placeholder-small { height: 180px; }
.vgv-ad-cta { font-size: 11px; color: #888; }
.vgv-ad-cta a { color: #016AB1; text-decoration: underline; }

/* Articles récents */
.vgv-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vgv-recent-list a {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s;
}
.vgv-recent-list a:hover { opacity: 0.8; }
.vgv-recent-thumb {
    width: 44px;
    height: 44px;
    background: #e0e6ed;
    border-radius: 6px;
    flex-shrink: 0;
}
.vgv-recent-text { flex: 1; min-width: 0; }
.vgv-recent-title {
    font-size: 12px;
    color: #1a2e4a;
    font-weight: 500;
    line-height: 1.3;
}
.vgv-recent-date {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

/* Liens par bassin */
.vgv-bassin-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vgv-bassin-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #F0F4F8;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s;
}
.vgv-bassin-links a:hover { background: #E4ECF3; }
.vgv-bassin-links a strong {
    font-weight: 600;
    font-size: 13px;
}

/* ─── LIGHTBOX ─────────────────────────────────────────────────────────── */

.vgv-hero-clickable {
    cursor: zoom-in;
    position: relative;
    transition: filter 0.2s;
}
.vgv-hero-clickable:hover { filter: brightness(1.05); }
.vgv-hero-clickable:focus { outline: 3px solid #06D9FA; outline-offset: 2px; }
.vgv-hero-zoom-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.vgv-hero-clickable:hover .vgv-hero-zoom-hint,
.vgv-hero-clickable:focus .vgv-hero-zoom-hint { opacity: 1; }

.vgv-content img { cursor: zoom-in; transition: opacity 0.15s; }
.vgv-content img:hover { opacity: 0.92; }

.vgv-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    padding: 40px;
    box-sizing: border-box;
}
.vgv-lightbox.vgv-lightbox-open {
    opacity: 1;
    visibility: visible;
}
.vgv-lightbox-content {
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.vgv-lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 40px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #111;
}
.vgv-lightbox-caption {
    color: #fff;
    font-size: 14px;
    text-align: center;
    max-width: 700px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
}
.vgv-lightbox-caption:empty { display: none; }

.vgv-lightbox-close,
.vgv-lightbox-prev,
.vgv-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 26px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    z-index: 2;
}
.vgv-lightbox-close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
}
.vgv-lightbox-prev,
.vgv-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
}
.vgv-lightbox-prev { left: 20px; }
.vgv-lightbox-next { right: 20px; }
.vgv-lightbox-close:hover,
.vgv-lightbox-prev:hover,
.vgv-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.22);
}
.vgv-lightbox-prev:hover,
.vgv-lightbox-next:hover {
    transform: translateY(-50%) scale(1.08);
}

@media (max-width: 600px) {
    .vgv-lightbox { padding: 10px; }
    .vgv-lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; }
    .vgv-lightbox-prev { left: 8px; width: 42px; height: 42px; font-size: 26px; }
    .vgv-lightbox-next { right: 8px; width: 42px; height: 42px; font-size: 26px; }
}
