/* LIGHT THEME - Papyrus & Terre cuite */
body {
    background: #f8f1e3;
    color: #3c2f1e;
}

.nav {
    background: #f5e8c7;
    border-bottom: 1px solid #8c6f4e;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: #f8f1e3;
    color: #3c2f1e;
}

/* === BEAUTIFUL ATMOSPHERIC HERO - Light (respects exact palette) === */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        /* Warm papyrus depth */
        radial-gradient(ellipse at 50% 22%, rgba(245, 232, 199, 0.65) 0%, transparent 58%),
        radial-gradient(ellipse at 28% 78%, rgba(214, 195, 163, 0.45) 0%, transparent 62%),
        /* Very subtle golden "sunlight" ancient glow */
        radial-gradient(circle at 50% 18%, rgba(140, 111, 78, 0.09) 0%, transparent 68%),
        /* Gentle vignette */
        linear-gradient(to bottom, rgba(248,241,227,0.28) 0%, transparent 22%, transparent 78%, rgba(248,241,227,0.32) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Large faded cuneiform watermark (warm, very subtle) */
.hero::after {
    content: '𒀭';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    font-size: 42vw;
    line-height: 1;
    color: #8c6f4e;
    opacity: 0.04;
    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 4px 25px rgba(140,111,78,0.35);
    letter-spacing: 8px;
    color: #3c2f1e;
}

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

.lead { 
    font-size: 1.4rem; 
    max-width: 720px; 
    margin: 0 auto 3.5rem; 
    color: #5c4630;
}

.btn-primary {
    display: inline-block;
    padding: 18px 52px;
    background: #8c6f4e;
    color: #f5e8c7;
    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: #fffef0;
    border: 1px solid #d4c3a3;
    padding: 2.8rem;
    margin-bottom: 3.5rem;
    border-radius: 14px;
}

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

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

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

.footer {
    background: #3c2f1e;
    color: #d4c3a3;
    text-align: center;
    padding: 4.5rem 2rem;
}
/* ====================== 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: #f5e8c7;
    color: #8c6f4e;
}

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

.accordion-content {
    padding: 1.75rem;
    line-height: 1.75;
    background: #fffef0;
    color: #3c2f1e;
    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: #8c6f4e;        /* Marron foncé signature */
    color: #f5e8c7;             /* Beige clair */
    font-weight: bold;
}

.ancient-table tr:nth-child(even) {
    background: #f5e8c7;        /* Ton terre cuite doux */
}

.ancient-table tr:nth-child(odd) {
    background: #fffef0;        /* Papyrus clair */
}

.ancient-table td {
    color: #3c2f1e;
}
/* === MECANISME PHYSIQUE 360 JOURS - LIGHT === */
.physic-box {
    background: #fffef0;
    border: 1px solid #d4c3a3;
    color: #3c2f1e;
}

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

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

.physic-box.explain {
    background: #fffef0;
    border-left: 5px solid #8c6f4e;
    color: #5c4630;
}
/* ====================== 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 - Light Theme */
.ecdo-popup .leaflet-popup-content-wrapper {
    background: #fffef0 !important;
    color: #3c2f1e !important;
    border: 2px solid #8c6f4e !important;
    border-radius: 12px !important;
}

.ecdo-popup .leaflet-popup-tip {
    background: #fffef0 !important;
    border: 2px solid #8c6f4e !important;
}

.ecdo-tooltip {
    background: #f5e8c7 !important;
    color: #8c6f4e !important;
    border: 1px solid #8c6f4e !important;
    border-radius: 8px !important;
}
.marker-cluster {
    background: #8c6f4e !important;
    color: #f5e8c7 !important;
    border: 3px solid #c9a66b !important;
    border-radius: 50% !important;
    font-weight: bold;
    font-size: 14px;
    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;
}
/* 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);
}
/* ====================== CORRECTIONS THÈME CLAIR ====================== */

/* Encarts généraux quote-card en clair */
.quote-card {
    background: #fffef0 !important;
    border: 1px solid #d4c3a3 !important;
    color: #3c2f1e !important;
}

/* Encart spécial "L’explication la plus simple" (bordure dorée forte) */
.quote-card.border-2.border-\\[\\#c9a66b\\] {
    background: #f5e8c7 !important;
    border: 2px solid #8c6f4e !important;
}

/* Tableau "Comment sait-on qu’un monument est aligné ?" */
.ancient-table th {
    background: #8c6f4e !important;
    color: #f5e8c7 !important;
}

.ancient-table td {
    background: #fffef0 !important;
    color: #3c2f1e !important;
}

.ancient-table tr:nth-child(even) {
    background: #f5e8c7 !important;
}

/* Encart "Dates et superposition" et autres encarts sombres en clair */
.quote-card.border.border-\\[\\#c9a66b\\]\\/60 {
    background: #fffef0 !important;
    border: 1px solid #8c6f4e !important;
    color: #3c2f1e !important;
}

/* Texte doré en clair */
.text-\\[\\#c9a66b\\] {
    color: #8c6f4e !important;
}
/* ====================== SOUS-ENCARTS CITATIONS (thème clair) ====================== */

/* Sous-encarts sombres qui doivent s'adapter en clair */
.quote-card .bg-\\[\\#1a120b\\] {
    background: #fffef0 !important;
    border: 1px solid #8c6f4e !important;
    color: #3c2f1e !important;
}

/* Texte doré dans ces encarts en clair */
.quote-card .text-\\[\\#c9a66b\\] {
    color: #8c6f4e !important;
}

/* Italique et citation dans les sous-encarts */
.quote-card .bg-\\[\\#1a120b\\] p,
.quote-card .bg-\\[\\#1a120b\\] div {
    color: #3c2f1e !important;
}
.special-quote {
    background: #fffef0 !important;
    color: #3c2f1e !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;
}

/* FOOTER - Thème clair (papyrus / terre cuite) */
.footer.light,
body.light .footer {
    background: #f8f1e3;           /* même fond que le body */
    color: #3c2f1e;
    border-top: 1px solid #d4c3a3;
}

.footer.light a {
    color: #5c4630;
}

.footer.light a:hover {
    color: #8c6f4e;
}

.footer.light h4 {
    color: #8c6f4e;
}

.footer.light .border-t {
    border-color: #d4c3a3;
}
/* LIGHT */
#welcomeBanner {
    box-shadow: 0 4px 20px rgba(140,111,78,0.2);
}

/* ============================================
   AESTHETIC POLISH — Light Theme (2026)
   All colors strictly from existing palette.
   Warmer, papyrus/terracotta, still solemn.
   ============================================ */

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

/* Refined title on light hero */
.hero .title {
    text-shadow: 0 3px 18px rgba(140, 111, 78, 0.28);
    letter-spacing: 9px;
}

.hero .subtitle {
    text-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* Quote cards — softer papyrus "tablet" */
.quote-card, .special-section {
    background: #fffef0;
    border: 1px solid #d4c3a3;
    border-radius: 16px;
    padding: 3rem 3.25rem;
    margin-bottom: 3.25rem;
    box-shadow: 0 8px 24px rgba(140, 111, 78, 0.12);
}

/* === 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.012);
    box-shadow: 0 18px 38px rgba(140, 111, 78, 0.22);
    border-color: #8c6f4e !important;
}

.quote-card h3 {
    color: #8c6f4e;
    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: #5c4630;
    border-left: 7px solid #8c6f4e;
    padding-left: 2.35rem;
    margin: 1.65rem 0 1.35rem;
}

/* Elegant section titles with warm 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, #8c6f4e, transparent);
    border-radius: 1px;
}

/* Journey cards on homepage — warmer & tactile */
#parcours .grid > div,
div[class*="grid"][class*="md:grid-cols-4"] > div {
    background: #fffef0;
    border: 1px solid #d4c3a355;
    border-radius: 14px;
    padding: 1.85rem 1.6rem 2rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(140,111,78,0.08);
}

#parcours .grid > div:hover,
div[class*="grid"][class*="md:grid-cols-4"] > div:hover {
    border-color: #8c6f4e;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(140,111,78,0.14);
}

#parcours .grid > div .text-5xl,
div[class*="grid"][class*="md:grid-cols-4"] > div .text-5xl {
    color: #8c6f4e;
    opacity: 0.85;
}

/* Buttons — pill, warm terracotta */
.btn-primary {
    padding: 17px 48px;
    background: #8c6f4e;
    color: #f5e8c7;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 3px;
    border-radius: 9999px;
    border: 1px solid #c9a66b33;
    box-shadow: 0 3px 12px rgba(140,111,78,0.18);
}

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

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

/* Better focus (warm gold) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #8c6f4e;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Reading comfort */
p, li, blockquote {
    line-height: 1.72;
}

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

/* Map polish for light */
#npMap {
    border-radius: 16px;
    border: 1px solid #d4c3a3;
    box-shadow: 0 8px 28px rgba(140,111,78,0.13);
}

/* ============================================
   QUOTE MODAL (ecritures.php) — Light version
   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 #8c6f4e;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(140, 111, 78, 0.35);
    padding: 0;
}

#quoteModal::backdrop {
    background: rgba(60, 47, 30, 0.65);
    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: #8c6f4e;
    padding-left: 1.75rem;
    margin-bottom: 2rem;
    color: #3c2f1e;
}

#modalContent .text-lg {
    color: #8c6f4e;
}

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

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