/* DARK THEME - Sanctuaire nocturne */
body {
    background: #1a120b;
    color: #d4c3a3;
}

.nav {
    background: #1a120b;
    border-bottom: 1px solid #8c6f4e40;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: #1a120b;
    color: #f5e8c7;
}

/* === BEAUTIFUL ATMOSPHERIC HERO - Dark (respects exact palette) === */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        /* Deep base + subtle depth */
        radial-gradient(ellipse at 50% 20%, rgba(60, 47, 30, 0.55) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 80%, rgba(42, 33, 24, 0.7) 0%, transparent 60%),
        /* Very subtle warm gold "ancient light" glow from top */
        radial-gradient(circle at 50% 15%, rgba(201, 166, 107, 0.08) 0%, transparent 70%),
        /* Soft vignette for solemn focus */
        linear-gradient(to bottom, rgba(26,18,11,0.35) 0%, transparent 25%, transparent 75%, rgba(26,18,11,0.45) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Large faded cuneiform symbol as ancient watermark (very subtle) */
.hero::after {
    content: '𒀭';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    font-size: 42vw;
    line-height: 1;
    color: #c9a66b;
    opacity: 0.035;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    font-family: serif;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 4.8rem;
    line-height: 1.05;
    text-shadow: 0 0 50px rgba(140,111,78,0.75);
    letter-spacing: 8px;
}

.subtitle { 
    font-size: 1.85rem; 
    color: #c9a66b; 
    margin: 2.5rem 0; 
}

.lead { 
    font-size: 1.4rem; 
    max-width: 720px; 
    margin: 0 auto 3.5rem; 
    opacity: 0.95;
}

.btn-primary {
    display: inline-block;
    padding: 18px 52px;
    background: #8c6f4e;
    color: #1a120b;
    font-weight: bold;
    font-size: 1.25rem;
    letter-spacing: 2.5px;
    border-radius: 8px;
    transition: all 0.4s ease;
}
.btn-primary:hover { 
    background: #c9a66b; 
    transform: scale(1.06); 
}

/* Cards */
.quote-card, .special-section {
    background: #2a2118;
    border: 1px solid #8c6f4e;
    padding: 2.8rem;
    margin-bottom: 3.5rem;
    border-radius: 14px;
}

.quote-card h3 { 
    color: #c9a66b; 
    font-size: 1.65rem; 
    margin-bottom: 1.2rem; 
}

.quote-card blockquote {
    font-size: 1.45rem;
    font-style: italic;
    color: #f5e8c7;
    border-left: 8px solid #8c6f4e;
    padding-left: 2.2rem;
    margin: 1.5rem 0;
}

.section-title {
    font-size: 2.9rem;
    text-align: center;
    color: #c9a66b;
    margin-bottom: 4.5rem;
    letter-spacing: 1px;
}

.footer {
    background: #1a120b;
    text-align: center;
    padding: 4.5rem 2rem;
    color: #8c6f4e;
    border-top: 1px solid #8c6f4e30;
}
.footer {
    background: #1a120b;
    color: #d4c3a3;
}

.footer a:hover {
    color: #c9a66b;
}

.footer h4 {
    color: #c9a66b;
}
/* ====================== ACCORDÉONS ====================== */
.accordion {
    margin-bottom: 1.25rem;
    border: 1px solid #8c6f4e40;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
}

.accordion-summary {
    padding: 1.25rem 1.75rem;
    font-weight: bold;
    font-size: 1.25rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #3c2f1e;
    color: #c9a66b;
}

.accordion-summary::-webkit-details-marker {
    display: none;
}

.accordion-content {
    padding: 1.75rem;
    line-height: 1.75;
    background: #2a2118;
    color: #d4c3a3;
    border-top: 1px solid #8c6f4e30;
}

/* ====================== TABLEAU ====================== */
.ancient-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 1.05rem;
}

.ancient-table th,
.ancient-table td {
    padding: 1.25rem 1.5rem;
    border: 1px solid #8c6f4e50;
    text-align: left;
}

.ancient-table th {
    background: #3c2f1e;
    color: #c9a66b;
    font-weight: bold;
}

.ancient-table tr:nth-child(even) {
    background: #2a211820;
}
/* === MECANISME PHYSIQUE 360 JOURS - DARK === */
.physic-box {
    background: #2a2118;
    border: 1px solid #8c6f4e;
    color: #f5e8c7;
}

.physic-box.ratio {
    background: #3c2f1e;
    border-color: #c9a66b;
    color: #f5e8c7;
}

.physic-box.formula {
    background: #3c2f1e;
    border: 2px solid #8c6f4e;
}

.physic-box.explain {
    background: #2a2118;
    border-left: 5px solid #c9a66b;
    color: #d4c3a3;
}
/* ====================== TOOLTIP LLVP ====================== */
.llvp-tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #c9a66b;
}

.llvp-tooltip .tooltip-content {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    width: 320px;
    background: #2a2118;
    color: #f5e8c7;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    font-size: 0.95rem;
    line-height: 1.55;
    z-index: 50;
    white-space: normal;
    text-align: left;
    border: 1px solid #c9a66b;
}

.light .llvp-tooltip .tooltip-content,
body.light .llvp-tooltip .tooltip-content {
    background: #fffef0;
    color: #3c2f1e;
    border-color: #8c6f4e;
    box-shadow: 0 10px 25px rgba(140,111,78,0.2);
}

.llvp-tooltip:hover .tooltip-content {
    visibility: visible;
}

/* Petit triangle optionnel sous la bulle (plus joli) */
.llvp-tooltip .tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: #2a2118;
}

.light .llvp-tooltip .tooltip-content::after,
body.light .llvp-tooltip .tooltip-content::after {
    border-top-color: #fffef0;
}
/* Carte Leaflet - Dark Theme */
.ecdo-popup .leaflet-popup-content-wrapper {
    background: #2a2118 !important;
    color: #d4c3a3 !important;
    border: 2px solid #c9a66b !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
}

.ecdo-popup .leaflet-popup-tip {
    background: #2a2118 !important;
    border: 2px solid #c9a66b !important;
}

.ecdo-tooltip {
    background: #1a120b !important;
    color: #c9a66b !important;
    border: 1px solid #8c6f4e !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}
.marker-cluster {
    background: #c9a66b !important;
    color: #1a120b !important;
    border: 3px solid #8c6f4e !important;
    border-radius: 50% !important;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6) !important;
}

.marker-cluster div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Marqueurs spéciaux Np' et Sp' - toujours au-dessus */
.np-marker, .sp-marker {
    background: transparent !important;
    border: none !important;
    z-index: 1000 !important;
}
/* Bouton Écritures amélioré */

/* Amélioration hover bouton Écritures */
.nav a[href*="ecritures.php"] {
    transition: all 0.3s ease;
}

.nav a[href*="ecritures.php"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(140, 111, 78, 0.25);
}
.special-quote {
    background: #1a120b !important;
    color: #d4c3a3 !important;
}
/* Fix tooltip dans les accordéons (force la bulle à sortir) */
.accordion {
    overflow: visible !important;           /* important pour casser le hidden */
}

.accordion-summary {
    overflow: visible !important;
    position: relative;
    z-index: 10;
}

.accordion-summary .llvp-tooltip .tooltip-content {
    z-index: 9999 !important;
    bottom: 130% !important;                /* on la pousse encore plus haut */
    box-shadow: 0 15px 35px rgba(0,0,0,0.6) !important;
}
/* DARK */
#welcomeBanner {
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

/* ============================================
   AESTHETIC POLISH — Dark Theme (2026)
   All colors strictly from existing palette.
   Goal: more premium, solemn, ancient feel.
   ============================================ */

/* Hero inner content — better breathing & presence */
.hero > div {
    position: relative;
    z-index: 2;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Refined title treatment on hero */
.hero .title {
    text-shadow: 
        0 0 60px rgba(140, 111, 78, 0.6),
        0 4px 30px rgba(0, 0, 0, 0.6);
    letter-spacing: 9px;
}

/* More elegant subtitle/lead on hero */
.hero .subtitle {
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* Quote cards — more refined, "stone tablet" feel */
.quote-card, .special-section {
    background: #2a2118;
    border: 1px solid #8c6f4e;
    border-radius: 16px;
    padding: 3rem 3.25rem;
    margin-bottom: 3.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* === Hover interactif uniquement pour les cartes de citations sur ecritures.php === */
.quote-card--interactive {
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s ease;
}

.quote-card--interactive:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.48);
    border-color: #c9a66b;
}

.quote-card h3 {
    color: #c9a66b;
    font-size: 1.7rem;
    margin-bottom: 1.35rem;
    letter-spacing: 0.3px;
}

.quote-card blockquote {
    font-size: 1.48rem;
    line-height: 1.55;
    font-style: italic;
    color: #f5e8c7;
    border-left: 7px solid #c9a66b;
    padding-left: 2.35rem;
    margin: 1.65rem 0 1.35rem;
    opacity: 0.97;
}

/* Elegant section titles with subtle ancient underline */
.section-title {
    font-size: 2.85rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.6rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 68px;
    height: 2px;
    background: linear-gradient(to right, transparent, #c9a66b, transparent);
    border-radius: 1px;
}

/* Journey steps (homepage 4 cards) — more carved / precious */
#parcours .grid > div,
div[class*="grid"][class*="md:grid-cols-4"] > div {
    background: #2a2118;
    border: 1px solid #8c6f4e55;
    border-radius: 14px;
    padding: 1.85rem 1.6rem 2rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

#parcours .grid > div:hover,
div[class*="grid"][class*="md:grid-cols-4"] > div:hover {
    border-color: #c9a66b;
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.32);
}

/* Number badges in journey feel more "engraved" */
#parcours .grid > div .text-5xl,
div[class*="grid"][class*="md:grid-cols-4"] > div .text-5xl {
    color: #c9a66b;
    opacity: 0.9;
    text-shadow: 0 0 20px rgba(201,166,107,0.25);
}

/* Buttons — more refined primary action */
.btn-primary {
    padding: 17px 48px;
    background: #8c6f4e;
    color: #1a120b;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 3px;
    border-radius: 9999px; /* softer pill */
    border: 1px solid #c9a66b33;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: #c9a66b;
    color: #1a120b;
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 8px 22px rgba(140,111,78,0.35);
}

/* Subtle ancient dividers */
hr, .ancient-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #8c6f4e55, transparent);
    margin: 3rem 0;
}

/* Improved focus states (accessibility + beauty) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #c9a66b;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Slightly better reading rhythm on long content pages */
p, li, blockquote {
    line-height: 1.72;
}

h2, h3 {
    letter-spacing: 0.3px;
}

/* Map container polish */
#npMap {
    border-radius: 16px;
    border: 1px solid #8c6f4e55;
    box-shadow: 0 10px 35px rgba(0,0,0,0.45);
}

/* ============================================
   QUOTE MODAL (ecritures.php) — Restore + Enhance
   Large elegant pop-up with context + edit link
   ============================================ */
#quoteModal {
    position: fixed;
    inset: 0;
    margin: auto;
    max-width: 720px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    border: 2px solid #c9a66b;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75);
    padding: 0;
}

#quoteModal::backdrop {
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(3px);
}

#modalContent {
    padding: 3rem 3.25rem 3.5rem;
}

#modalContent blockquote {
    font-size: 1.65rem;
    line-height: 1.55;
    border-left-width: 6px;
    border-color: #c9a66b;
    padding-left: 1.75rem;
    margin-bottom: 2rem;
    color: #f5e8c7;
}

#modalContent .text-lg {
    color: #c9a66b;
}

#modalContent a[href*="ajouter-ecriture.php?mode=edit"] {
    display: block;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    border: 2px solid #c9a66b;
    border-radius: 9999px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    color: #c9a66b;
}

#modalContent a[href*="ajouter-ecriture.php?mode=edit"]:hover {
    background: #c9a66b;
    color: #1a120b;
    transform: translateY(-1px);
}