/*
Theme Name:   Pèlerinages - Enfant Astra
Theme URI:    https://pelrinages.jdarc35.org
Description:  Thème enfant du thème Astra pour le site de pèlerinages de la paroisse Sainte Jeanne d'Arc de Rennes.
Author:       Paroisse Sainte Jeanne d'Arc Rennes
Template:     astra
Version:      1.3.7
Text Domain:  pelerinages-child
*/

/* =========================================
   Identité visuelle — charte jdarc35.org
   ========================================= */
:root {
    --pel-primary:    #005380;
    --pel-dark:       #00324d;
    --pel-light-bg:   #F0F5FA;
    --pel-text:       #334155;
    --pel-accent:     #c8a13a;   /* or pèlerin — rappel des vitraux */
    --pel-route:      #8b1a1a;   /* couleur du sentier sur la carte */
}

/* =========================================
   En-tête — Astra utilise .ast-primary-header-bar
   et des variables CSS internes qu'on écrase ici
   ========================================= */

/* Logo */
.custom-logo { max-height: 90px !important; width: auto !important; }

/* Dropdown menu */
.main-header-menu .sub-menu { background-color: #00324d !important; border-radius: 6px !important; left: auto !important; right: 0 !important; width: max-content !important; }
.main-header-menu .sub-menu a { color: #ffffff !important; white-space: nowrap !important; }
.main-header-menu .sub-menu a:hover { background-color: #005380 !important; color: #ffffff !important; }

/* Override des variables Astra pour le header */
.ast-primary-header-bar {
    --ast-global-color-primary: var(--pel-dark);
    background-color: var(--pel-dark) !important;
}

/* Tous les sélecteurs possibles selon la version Astra */
#masthead,
.site-header,
.ast-header-break-point #masthead,
.main-header-bar,
.ast-above-header,
.ast-below-header {
    background-color: var(--pel-dark) !important;
}

/* Titre du site */
.ast-site-identity .site-title a,
.ast-site-identity .site-title a:visited,
.site-title a,
.site-title a:visited {
    color: #ffffff !important;
}

/* Tagline */
.site-description {
    color: rgba(255,255,255,0.75) !important;
}

/* =========================================
   Navigation principale — Astra
   ========================================= */
.ast-primary-header-bar .main-header-menu .menu-item > a,
.ast-primary-header-bar .main-navigation .menu-item > a,
.main-header-menu .menu-item > a,
.main-navigation .menu-item > a,
#site-navigation .menu-item > a {
    color: #ffffff !important;
}

.ast-primary-header-bar .main-header-menu .menu-item > a:hover,
.main-header-menu .menu-item > a:hover {
    color: var(--pel-accent) !important;
}

/* Menu mobile */
.ast-mobile-header-wrap {
    background-color: var(--pel-dark) !important;
}

/* =========================================
   Corps — typographie
   ========================================= */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--pel-text);
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6,
.entry-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--pel-dark);
}

a {
    color: var(--pel-primary);
}
a:hover {
    color: var(--pel-dark);
}

/* =========================================
   Bannière hero — page d'accueil
   ========================================= */
.pel-hero {
    position: relative;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.pel-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,50,77,0.3) 0%, rgba(0,50,77,0.75) 100%);
}

.pel-hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 800px;
}

.pel-hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.pel-hero-content p {
    font-size: 1.1rem;
    opacity: 0.92;
}

/* =========================================
   Carte Leaflet
   ========================================= */
#pel-map {
    width: 100%;
    height: 70vh;
    min-height: 480px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,50,77,0.18);
    margin: 2rem 0;
    z-index: 0;
}

/* Légende sous la carte */
.pel-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 1rem 1.5rem;
    background: var(--pel-light-bg);
    border-radius: 6px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--pel-text);
}

.pel-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pel-legend-line {
    display: inline-block;
    width: 28px;
    height: 4px;
    border-radius: 2px;
}

.pel-legend-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Popup Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    max-width: 280px;
}

.pel-popup h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--pel-dark);
    margin: 0 0 0.4rem;
}

.pel-popup img {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.pel-popup p {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.pel-popup .pel-popup-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 10px;
    margin-bottom: 0.4rem;
}

.pel-cat-historique  { background: #e8f0fe; color: #1a56db; }
.pel-cat-spirituel   { background: #fef3c7; color: #92400e; }
.pel-cat-pratique    { background: #d1fae5; color: #065f46; }

/* =========================================
   Avertissement tronçon manquant
   ========================================= */
.pel-notice {
    background: #fff8e1;
    border-left: 4px solid var(--pel-accent);
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* =========================================
   Listes dans le contenu de page
   ========================================= */
.entry-content .wp-block-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.entry-content .wp-block-list li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    list-style: none !important;
}

.entry-content .wp-block-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--pel-primary);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

/* Items avec bouton info en bout de ligne */
.entry-content .wp-block-list li.pel-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pel-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--pel-primary);
    color: var(--pel-primary);
    background: #fff;
    text-decoration: none !important;
    transition: background .15s, color .15s;
    font-style: italic;
    font-weight: 700;
    font-size: 1rem;
    font-family: Georgia, serif;
    line-height: 1;
}
.pel-info-btn::after {
    content: 'i';
}
.pel-info-btn:hover {
    background: var(--pel-primary);
    color: #fff;
}

/* =========================================
   Pied de page
   ========================================= */
#jdarc-footer,
.site-footer {
    background-color: var(--pel-dark) !important;
    color: rgba(255,255,255,0.8) !important;
}

/* Masquer le crédit "Powered by Astra WordPress Theme" */
.ast-footer-copyright .ast-copyright-link,
.site-footer .ast-copyright-link,
.footer-bar .ast-copyright-link {
    display: none !important;
}
/* Masquer le séparateur " | " qui précède le lien */
.ast-footer-copyright [data-section="section-footer-builder"] .ast-copyright-link,
.ast-footer-copyright > span:last-child {
    display: none !important;
}

/* =========================================
   Page d'accueil — intro
   ========================================= */
.home .entry-content > p:first-of-type {
    font-size: 1.25rem;
    color: var(--pel-dark);
    margin-bottom: 1.5rem;
}

/* =========================================
   Liste pèlerinages — page d'accueil
   ========================================= */
.pel-liste {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pel-card {
    display: block;
    position: relative;
    height: 320px;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--pel-dark);
    background-size: cover;
    background-position: center;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.pel-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,50,77,0.85) 0%, rgba(0,50,77,0.15) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.pel-card__title {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    #pel-map {
        height: 55vh;
        min-height: 340px;
    }
    .pel-card { height: 220px; }
}
