/* ==========================================
   AGAPE-LOGOS - Midnight Gold Design System
   ========================================== */

/* Variables CSS */
:root {
    --bg-dark-deep: #070B12;      /* Bleu nuit très profond */
    --bg-dark-card: #0F1626;      /* Arrière-plan des cartes */
    --bg-dark-input: #172033;     /* Arrière-plan recherche */
    --text-primary: #E2E8F0;       /* Crème / blanc doux */
    --text-secondary: #94A3B8;     /* Gris bleuté pour sous-titres */
    --accent-gold: #C5A880;        /* Or chaud mat (pour le précieux) */
    --accent-gold-bright: #F59E0B; /* Or brillant */
    --accent-gold-muted: #8C704D;  /* Or sombre */
    --accent-red-muted: #B91C1C;   /* Rouge sourd pour le vernis */
    --accent-green-muted: #10B981; /* Vert sourd */
    
    --border-glass: rgba(197, 168, 128, 0.15); /* Bordure or en verre */
    --shadow-gold: rgba(197, 168, 128, 0.1);
    
    /* Variables dynamiques pour le Tooltip */
    --bg-word-item: rgba(15, 22, 38, 0.4);
    --bg-tooltip: rgba(25, 25, 28, 0.95);
    --border-tooltip: var(--border-glass);
    --shadow-tooltip: rgba(0, 0, 0, 0.6);
    --text-tooltip-section: rgba(255, 255, 255, 0.5);
    --border-tooltip-header: rgba(255, 255, 255, 0.1);
    
    /* Variables dynamiques de badges */
    --bg-badge: var(--accent-gold);
    --text-badge: #070B12;
    --border-badge: transparent;
    
    --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
    --font-serif-body: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Réinitialisations de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden !important;
}

body {
    background-color: var(--bg-dark-deep);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-gold-muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* Structure globale */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.mobile-header {
    display: none;
}

/* ==========================
   SIDEBAR (Navigation)
   ========================== */
.sidebar {
    --sidebar-text-scale: 1; /* Variable pour le zoom à deux doigts sur mobile */
    width: 320px;
    min-width: 320px;
    background-color: var(--bg-sidebar, #0B101D);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-glass);
}

.logo {
  font-family: var(--font-serif);
  font-size: calc(28px * (1 + (var(--sidebar-text-scale, 1) - 1) * 0.45));
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 2px;
  text-shadow: 0 0 10px var(--shadow-gold);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--shadow-gold);
  object-fit: cover;
}

.drawer-logo .logo-img {
  width: 40px;
  height: 40px;
}

.tagline {
    font-size: calc(10.5px * (1 + (var(--sidebar-text-scale, 1) - 1) * 0.45));
    font-weight: 400;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Recherche */
.search-box {
    padding: 16px 24px 8px 24px;
    position: relative;
}

#search-input {
    width: 100%;
    background-color: var(--bg-dark-input);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 10px 14px 10px 38px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: calc(14px * (1 + (var(--sidebar-text-scale, 1) - 1) * 0.45));
    outline: none;
    transition: var(--transition-smooth);
}

#search-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(197, 168, 128, 0.2);
}

.search-icon {
    position: absolute;
    left: 36px;
    top: 23px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Filtres de catégorie */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 24px 16px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 4px 12px;
    color: var(--text-secondary);
    font-size: calc(11px * (1 + (var(--sidebar-text-scale, 1) - 1) * 0.45));
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
    border-color: var(--accent-gold);
}

/* Index Alphabétique */
.alphabet-container {
    padding: 10px 24px 8px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.alphabet-bar {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.alphabet-bar::-webkit-scrollbar {
    height: 3px;
}

.letter-btn {
    min-width: calc(20px * (1 + (var(--sidebar-text-scale, 1) - 1) * 0.45));
    height: calc(20px * (1 + (var(--sidebar-text-scale, 1) - 1) * 0.45));
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: calc(11px * (1 + (var(--sidebar-text-scale, 1) - 1) * 0.45));
    font-weight: 600;
    cursor: pointer;
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.letter-btn:hover:not(:disabled) {
    color: var(--accent-gold);
    background-color: rgba(197, 168, 128, 0.1);
}

.letter-btn.active {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
}

.letter-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Liste des mots */
.word-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.word-list {
    list-style: none;
}

.word-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: var(--bg-word-item);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.word-item:hover {
    background-color: var(--bg-dark-card);
    border-color: var(--border-glass);
    transform: translateY(-2px);
}

.word-item.active {
    background-color: var(--bg-dark-card);
    border-color: var(--accent-gold);
    box-shadow: 0 0 12px rgba(197, 168, 128, 0.1);
}

.word-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.word-item-title {
    font-family: var(--font-serif);
    font-size: calc(16px * var(--sidebar-text-scale, 1));
    font-weight: 600;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.word-item-strong {
    font-size: calc(10px * var(--sidebar-text-scale, 1));
    color: var(--text-secondary);
    background-color: var(--bg-dark-input);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
    flex-shrink: 0;
    margin-left: auto;
}

.word-item-snippet {
    font-size: calc(12px * var(--sidebar-text-scale, 1));
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer Sidebar */
.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
    background-color: var(--bg-sidebar, #090D17);
}

.verses-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: calc(11px * var(--sidebar-text-scale, 1));
    color: var(--accent-gold-muted);
    text-align: center;
}

/* ==========================
   MAIN CONTENT AREA
   ========================== */
.main-content {
    --main-content-scale: 1; /* Échelle de zoom pour l'affichage principal */
    flex: 1;
    height: 100%;
    overflow-y: auto;
    background-color: var(--bg-dark-deep);
    position: relative;
}

/* WELCOME VIEW */
.welcome-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 40px;
}

.welcome-card {
    max-width: 720px;
    width: 100%;
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--accent-gold-muted);
    padding-bottom: 16px;
}

.welcome-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--shadow-gold);
    object-fit: cover;
    flex-shrink: 0;
}

.welcome-title {
    font-family: var(--font-serif);
    font-size: calc(32px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    margin-bottom: 16px;
    border-bottom: 2px solid var(--accent-gold-muted);
    padding-bottom: 12px;
}

.welcome-header .welcome-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.welcome-intro {
    font-size: calc(15px * var(--main-content-scale, 1));
    color: var(--text-primary);
    margin-bottom: 24px;
}

.quote-container {
    border-left: 3px solid var(--accent-gold);
    padding-left: 20px;
    margin: 24px 0;
}

.quote-container blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: calc(18px * var(--main-content-scale, 1));
    color: var(--accent-gold);
}

.quote-container cite {
    display: block;
    font-family: var(--font-sans);
    font-style: normal;
    font-size: calc(12px * var(--main-content-scale, 1));
    color: var(--text-secondary);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.welcome-guidelines h3 {
    font-family: var(--font-serif);
    font-size: calc(18px * var(--main-content-scale, 1));
    color: var(--text-primary);
    margin-bottom: 12px;
}

.welcome-guidelines ul {
    list-style-type: none;
    margin-bottom: 24px;
}

.welcome-guidelines li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    font-size: calc(14px * var(--main-content-scale, 1));
}

.welcome-guidelines li::before {
    content: "✨";
    position: absolute;
    left: 0;
    top: 0;
    font-size: calc(12px * var(--main-content-scale, 1));
}

.select-hint {
    text-align: center;
    color: var(--accent-gold);
    font-weight: 500;
    font-size: calc(14px * var(--main-content-scale, 1));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ==========================
   DETAIL VIEW (Fiche Mot)
   ========================== */
.word-detail {
    padding: 40px;
    max-width: 960px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-back-btn {
    display: none;
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 20px;
}

.detail-header {
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 24px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.detail-header-main {
    flex: 1;
}

.detail-header-related {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    max-width: 320px;
}

.related-label {
    font-size: calc(10px * var(--base-text-scale, 1) * var(--main-content-scale, 1));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.related-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
}

.related-list::-webkit-scrollbar {
    height: 3px;
}

.related-list::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 2px;
}

.related-tag {
    display: inline-block;
    text-decoration: none;
    background: rgba(197, 168, 128, 0.08);
    border: 1px solid rgba(197, 168, 128, 0.2);
    border-radius: 12px;
    padding: 3px 10px;
    color: var(--accent-gold);
    font-size: calc(11px * var(--base-text-scale, 1) * var(--main-content-scale, 1));
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.related-tag:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
    border-color: var(--accent-gold);
    box-shadow: 0 2px 8px rgba(197, 168, 128, 0.2);
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.detail-category {
    font-size: calc(11px * var(--base-text-scale, 1) * var(--main-content-scale, 1));
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: var(--bg-dark-input);
    padding: 3px 10px;
    border-radius: 12px;
    color: var(--accent-gold);
    border: 1px solid var(--border-glass);
    font-weight: 500;
}

.detail-strong {
    font-size: calc(11px * var(--base-text-scale, 1) * var(--main-content-scale, 1));
    font-family: monospace;
    color: var(--text-secondary);
}

.detail-word-title {
    font-family: var(--font-serif);
    font-size: calc(42px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 6px 0;
}

.detail-word-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: calc(18px * var(--base-text-scale, 1) * var(--main-content-scale, 1));
    color: var(--text-secondary);
}

/* Définition principale */
.definition-section {
    font-size: calc(16px * var(--main-content-scale, 1));
    line-height: 1.7;
    margin-bottom: 32px;
    color: var(--text-primary);
}

/* Galerie d'images hybride */
.image-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 36px;
}

.gallery-item h4 {
    font-family: var(--font-serif);
    font-size: calc(13px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-container {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    background-color: #080D18;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.image-container img:hover {
    transform: scale(1.05);
}

.image-source-caption {
    font-size: calc(10px * var(--base-text-scale, 1) * var(--main-content-scale, 1));
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: right;
    font-style: italic;
}

/* Grille de comparaison (💎 Précieux vs ⚠️ Vernis) */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.comparison-card {
    background-color: var(--bg-dark-card);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.precious-card {
    border: 1px solid rgba(16, 185, 129, 0.25); /* Mince bordure verte */
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, rgba(0,0,0,0) 100%);
}

.varnish-card {
    border: 1px solid rgba(185, 28, 28, 0.25); /* Mince bordure rouge */
    background: linear-gradient(180deg, rgba(185, 28, 28, 0.03) 0%, rgba(0,0,0,0) 100%);
}

.comparison-header {
    font-family: var(--font-serif);
    font-size: calc(18px * var(--main-content-scale, 1));
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.precious-card .comparison-header {
    color: var(--accent-gold);
}

.varnish-card .comparison-header {
    color: #F87171; /* Rouge orangé doux */
}

.comparison-header .subtitle {
    font-size: calc(11px * var(--main-content-scale, 1));
    font-family: var(--font-sans);
    color: var(--text-secondary);
    margin-top: 2px;
}

.precious-list, .varnish-list {
    list-style: none;
}

.precious-list li, .varnish-list li {
    font-size: calc(13.5px * var(--main-content-scale, 1));
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    color: var(--text-primary);
}

.precious-list li::before {
    content: "✦";
    color: var(--accent-gold);
    position: absolute;
    left: 0;
    top: 0;
}

.varnish-list li::before {
    content: "✕";
    color: #EF4444;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    font-size: calc(11px * var(--main-content-scale, 1));
}

/* ==========================
   EXPERTS SECTION
   ========================== */
.experts-section {
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 28px;
    margin-top: 40px;
}

.experts-title {
    font-family: var(--font-serif);
    font-size: calc(20px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    margin-bottom: 4px;
}

.experts-subtitle {
    font-size: calc(12px * var(--main-content-scale, 1));
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Sélecteurs des experts */
.expert-selectors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.expert-btn {
    background-color: var(--bg-dark-input);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: var(--transition-smooth);
}

.expert-btn:hover {
    border-color: var(--accent-gold);
    background-color: rgba(197, 168, 128, 0.05);
}

.expert-btn.active {
    border-color: var(--accent-gold);
    background-color: rgba(197, 168, 128, 0.15);
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.1);
}

.expert-avatar {
    font-size: 22px;
}

.expert-meta {
    display: flex;
    flex-direction: column;
}

.expert-name {
    font-size: calc(12.5px * var(--main-content-scale, 1));
    font-weight: 600;
    color: var(--text-primary);
}

.expert-spec {
    font-size: calc(10px * var(--main-content-scale, 1));
    color: var(--text-secondary);
}

/* Bulle de discours de l'expert */
.expert-response-container {
    position: relative;
    margin-top: 16px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.expert-speech-bubble {
    background-color: var(--bg-dark-deep);
    border-left: 4px solid var(--accent-gold);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.bubble-header {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.bubble-expert-title {
    font-family: var(--font-serif);
    font-size: calc(14px * var(--main-content-scale, 1));
    font-weight: 700;
    color: var(--accent-gold);
}

.bubble-expert-role {
    font-size: calc(11px * var(--main-content-scale, 1));
    color: var(--text-secondary);
}

.bubble-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: calc(14.5px * var(--main-content-scale, 1));
    line-height: 1.7;
    color: var(--text-primary);
}

/* États et Visibilité */
.hidden {
    display: none !important;
}

/* Navigation du Sidebar */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 24px 16px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-color: rgba(197, 168, 128, 0.4);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.15), rgba(197, 168, 128, 0.05));
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.08);
}

/* Sections Esprit du Projet (Manifeste) */
.project-card {
    max-width: 800px;
    margin: 0 auto;
}

.project-intro-tagline {
    font-size: calc(16px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 24px;
    font-style: italic;
    opacity: 0.9;
}

.project-manifesto {
    line-height: 1.8;
    font-size: calc(15px * var(--main-content-scale, 1));
    color: var(--text-primary);
    margin-bottom: 32px;
}

.project-manifesto p {
    margin-bottom: 16px;
}

.manifesto-section-title {
    font-family: var(--font-serif);
    font-size: calc(20px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 8px;
}

.manifesto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.pillar-card:hover {
    transform: translateY(-2px);
    border-color: rgba(197, 168, 128, 0.3);
}

.pillar-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 12px;
}

.pillar-card h4 {
    font-family: var(--font-serif);
    font-size: calc(16px * var(--main-content-scale, 1));
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pillar-card p {
    font-size: calc(13px * var(--main-content-scale, 1));
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Section Soutenir & Dons */
.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.support-action-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.support-action-card:hover {
    border-color: rgba(197, 168, 128, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-badge);
    color: var(--text-badge);
    border: var(--border-badge, none);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: calc(10px * var(--main-content-scale, 1));
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px var(--shadow-gold);
}

.support-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 16px;
}

.support-action-card h3 {
    font-family: var(--font-serif);
    font-size: calc(19px * var(--main-content-scale, 1));
    color: var(--text-primary);
    margin-bottom: 12px;
}

.support-action-card p {
    font-size: calc(13px * var(--main-content-scale, 1));
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.book-details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-glass);
    border-radius: 8px;
    padding: 10px;
    font-size: calc(11px * var(--main-content-scale, 1)) !important;
    margin-bottom: 20px;
}

.action-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: calc(13px * var(--main-content-scale, 1));
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.amazon-btn {
    background: linear-gradient(135deg, #e47911, #ff9900);
    color: #111;
    border: none;
}

.amazon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.paypal-btn {
    background: linear-gradient(135deg, #0079c1, #00457c);
    color: #fff;
    border: none;
}

.paypal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 121, 193, 0.3);
}

/* Style du Contenu Long (Études Théologiques) */
.long-content-section {
    margin-top: 32px;
    animation: fadeIn 0.4s ease-out;
}

.study-article {
    color: var(--text-primary);
}

.study-lead {
    font-size: calc(16px * var(--main-content-scale, 1));
    line-height: 1.8;
    color: var(--accent-gold);
    font-family: var(--font-serif-body);
    font-style: italic;
    margin-bottom: 28px;
    border-left: 3px solid var(--accent-gold);
    padding-left: 16px;
}

.study-section-title {
    font-family: var(--font-serif);
    font-size: calc(20px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    margin-top: 36px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 8px;
}

.study-paragraphs p {
    font-size: calc(14.5px * var(--main-content-scale, 1));
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.study-paragraphs strong {
    color: var(--accent-gold);
}

/* Tableaux d'études */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
}

.study-table {
    width: 100%;
    border-collapse: collapse;
    font-size: calc(13.5px * var(--main-content-scale, 1));
    text-align: left;
}

.study-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-gold);
    font-family: var(--font-serif);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-glass);
}

.study-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
    line-height: 1.6;
    vertical-align: top;
}

.study-table tr:last-child td {
    border-bottom: none;
}

.study-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* ==========================
   RESPONSIVE DESIGN
   ========================== */
/* Styles Accueil Mobile Dynamique (masqués par défaut sur Desktop) */
.mobile-welcome-container {
    display: none;
}
.sidebar-overlay {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: var(--bg-sidebar, #090D17);
        border-bottom: 1px solid var(--border-glass);
        padding: 0 16px;
        height: 60px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        z-index: 19998; /* En dessous du menu tiroir (20000) mais au-dessus de la sidebar (10000) */
        box-sizing: border-box;
    }
    
    .mobile-menu-btn {
        background: none;
        border: 1px solid rgba(197, 168, 128, 0.4);
        color: var(--accent-gold);
        font-size: 20px;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s;
    }
    
    .mobile-menu-btn:active {
        background-color: rgba(197, 168, 128, 0.1);
    }
    
    .mobile-logo {
        font-family: var(--font-serif);
        color: var(--accent-gold);
        font-weight: bold;
        font-size: 20px;
        letter-spacing: 1px;
        text-shadow: 0 0 10px var(--shadow-gold);
    }
    
    .mobile-lang-selector {
        display: flex;
        gap: 6px;
    }
    
    .mobile-lang-btn {
        background: none;
        border: 1px solid rgba(197, 168, 128, 0.3);
        color: #ffffff;
        font-size: 12px;
        font-weight: bold;
        padding: 5px 9px;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-lang-btn.active {
        background-color: var(--accent-gold) !important;
        color: #0B101D !important;
        border-color: var(--accent-gold) !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .app-container {
        flex-direction: column;
        height: calc(100vh - 60px);
        width: 100vw;
        padding-top: 60px; /* Compense le header mobile fixe */
        overflow-x: hidden !important; /* Élimine tout scroll horizontal parasite */
    }
    
    /* Volet latéral (Drawer) pour la sidebar */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -320px !important; /* Hors écran physiquement par défaut */
        width: 320px !important; /* Largeur fixe standard et propre */
        max-width: 320px !important;
        min-width: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        z-index: 20005 !important;
        border-right: 1px solid var(--border-glass) !important;
        display: flex !important;
        transform: none !important; /* Plus de transform complexe */
        transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        background-color: var(--bg-sidebar, #090D17) !important;
        box-shadow: none !important; /* Plus d'ombre portée quand elle est fermée */
        cursor: default;
    }
    
    .sidebar:not(.open) .word-list-container {
        overflow-y: hidden !important;
    }
    
    .sidebar.open {
        left: 0 !important; /* Coulisse vers la zone visible */
        transform: none !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.8) !important; /* Ombre uniquement quand ouverte */
        cursor: default;
    }
    
    /* Réduction du logo dans la sidebar mobile */
    .sidebar .logo {
        font-size: 20px !important;
        gap: 8px !important;
    }
    .sidebar .logo-img {
        width: 36px !important;
        height: 36px !important;
    }
    .sidebar .logo-row {
        gap: 8px !important;
    }

    /* Overlay de floutage et assombrissement */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(4, 6, 12, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 20004;
        animation: fadeIn 0.2s ease-out;
    }
    
    .sidebar-overlay.active {
        display: block !important;
    }
    
    .main-content {
        display: block !important; /* Toujours visible pour l'accueil */
        width: 100% !important;
        height: 100% !important; /* Prend la hauteur restante sous le header */
        overflow-y: auto !important;
        overflow-x: hidden !important; /* Évite tout scroll horizontal parasite */
        background-color: var(--bg-dark-deep) !important;
        margin-left: 0 !important;
        padding-left: 0 !important; /* Plus de languette à compenser */
    }
    
    /* Masquage de l'accueil de base desktop et neutralisation des styles flex sur mobile */
    .welcome-screen {
        padding: 0 !important;
        display: block !important;
        min-height: auto !important;
    }
    #welcome-view .welcome-card {
        display: none !important;
    }

    /* Style pour les welcome-card secondaires sur mobile (links, pdf, project, ecosystem) */
    .project-screen .welcome-card {
        max-width: 100% !important;
        padding: 24px 16px !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        margin: 0 !important;
    }
    
    /* Affichage de l'accueil mobile dynamique (parfaitement aéré et centré) */
    .mobile-welcome-container {
        display: block !important;
        padding: 24px 20px 40px 20px !important;
        animation: fadeIn 0.4s ease-out;
    }

    /* Gestion des vues sur mobile */
    .app-container:not(.has-selection) #welcome-view:not(.hidden) {
        display: block !important;
    }
    .app-container:not(.has-selection) #detail-view {
        display: none !important;
    }
    
    .app-container.has-selection #welcome-view {
        display: none !important;
    }
    .app-container.has-selection #detail-view:not(.hidden) {
        display: block !important;
    }

    /* En-tête de l'accueil mobile */
    .mobile-home-header {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 24px;
        border-bottom: 1px solid var(--border-glass);
        padding-bottom: 16px;
    }
    
    .mobile-logo-title {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        color: var(--text-primary);
        font-family: var(--font-serif);
        font-weight: 700;
        font-size: calc(24px * var(--main-content-scale, 1));
        letter-spacing: 2px;
    }
    
    .mobile-logo {
        width: 48px;
        height: 48px;
    }
    
    .mobile-welcome-intro {
        font-size: calc(14px * var(--main-content-scale, 1));
        color: var(--text-secondary);
        line-height: 1.5;
        text-align: center;
        margin-bottom: 24px;
        font-style: italic;
    }
    
    /* Suggestions de mots (Badges) */
    .mobile-featured-words {
        margin-bottom: 28px;
    }
    
    .featured-title {
        font-size: calc(11px * var(--main-content-scale, 1));
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        margin-bottom: 10px;
        font-weight: 600;
    }
    
    .featured-badges {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .featured-badge-btn {
        background: rgba(197, 168, 128, 0.05);
        border: 1px solid rgba(197, 168, 128, 0.15);
        color: var(--text-primary);
        border-radius: 16px;
        padding: 6px 12px;
        font-size: calc(12px * var(--main-content-scale, 1));
        cursor: pointer;
        transition: var(--transition-smooth);
    }
    
    .featured-badge-btn:hover {
        border-color: var(--accent-gold);
        background: rgba(197, 168, 128, 0.1);
    }
    
    /* Cartes aléatoires */
    .mobile-random-articles {
        margin-bottom: 20px;
    }
    
    .random-articles-title {
        font-size: calc(11px * var(--main-content-scale, 1));
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        margin-bottom: 12px;
        font-weight: 600;
    }
    
    .random-articles-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .random-article-card {
        background: rgba(25, 25, 28, 0.55);
        border: 1px solid var(--border-glass);
        border-radius: 12px;
        overflow: hidden;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease, border-color 0.3s ease;
    }
    
    .random-article-card:hover {
        transform: translateY(-2px);
        border-color: rgba(197, 168, 128, 0.4);
    }
    
    .card-image-box {
        height: 110px;
        width: 100%;
        overflow: hidden;
        border-bottom: 1px solid var(--border-glass);
    }
    
    .card-image-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .card-info-box {
        padding: 14px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
    
    .card-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
    }
    
    .card-category {
        font-size: calc(9px * var(--main-content-scale, 1));
        text-transform: uppercase;
        color: var(--accent-gold);
        letter-spacing: 0.5px;
        font-weight: 600;
    }
    
    .card-strong {
        font-size: calc(9px * var(--main-content-scale, 1));
        font-family: monospace;
        color: var(--text-secondary);
    }
    
    .card-word-title {
        font-family: var(--font-serif);
        font-size: calc(18px * var(--main-content-scale, 1));
        color: var(--accent-gold);
        margin-bottom: 2px;
        font-weight: 600;
    }
    
    .card-word-subtitle {
        font-size: calc(11px * var(--main-content-scale, 1));
        font-style: italic;
        color: var(--text-secondary);
        margin-bottom: 8px;
        font-family: var(--font-serif);
    }
    
    .card-definition-snippet {
        font-size: calc(12px * var(--main-content-scale, 1));
        color: var(--text-secondary);
        line-height: 1.4;
        margin-bottom: 12px;
        flex-grow: 1;
    }
    
    .card-read-btn {
        background: transparent;
        border: none;
        color: var(--accent-gold);
        font-size: calc(12px * var(--main-content-scale, 1));
        font-weight: 600;
        cursor: pointer;
        align-self: flex-start;
        padding: 0;
        transition: color 0.2s;
    }
    
    .card-read-btn:hover {
        color: var(--text-primary);
    }
    
    .category-filters {
        padding-bottom: 12px;
    }
    
    .word-list-container {
        max-height: none;
        flex: 1;
    }
    
    .word-detail {
        padding: 24px 20px 40px 20px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .newsletter-section {
        padding: 0 20px !important; /* Alignement parfait sur mobile/tablette */
    }
    
    .detail-word-title {
        font-size: 32px;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .expert-selectors {
        grid-template-columns: 1fr 1fr;
    }
    
    .mobile-back-btn {
        display: block;
    }
    
    .manifesto-grid, .support-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sidebar-nav {
        padding: 0 16px 12px 16px;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .detail-header-related {
        align-items: flex-start;
        max-width: 100%;
        width: 100%;
    }

    /* Barre supérieure de contrôles adaptative sur mobile (Grid à double rangée) */
    .detail-top-bar {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        grid-template-rows: auto auto !important;
        gap: 12px 8px !important;
        padding-bottom: 12px !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    #prev-word-btn {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }
    
    .detail-top-bar .mobile-back-btn {
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: center !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    
    #next-word-btn {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }
    
    .view-controls-bar {
        grid-column: 1 / span 3 !important;
        grid-row: 2 !important;
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin-left: 0 !important;
        gap: 6px !important;
    }

    .view-controls-bar .lang-selector {
        flex-shrink: 0 !important;
    }

    .view-controls-bar #toggle-theme-btn {
        flex-grow: 0 !important;
        text-align: center !important;
        font-size: 11px !important;
        padding: 6px 8px !important;
        white-space: nowrap !important;
    }

    .view-controls-bar #toggle-theme-btn .theme-text {
        display: none !important;
    }

    .view-controls-bar .font-size-controls {
        flex-shrink: 0 !important;
    }
}

/* ==========================================
   CONTRÔLES DE VUE & MODE PARCHEMIN
   ========================================== */

/* Thème Parchemin (Mode Clair Critique) */
html.parchment-theme, body.parchment-theme, :root.parchment-theme {
    --bg-dark-deep: #FAF7F2;      /* Crème parchemin clair */
    --bg-dark-card: #F2ECE1;      /* Crème un peu plus soutenu */
    --bg-dark-input: #EBE3D5;     /* Recherche */
    --bg-sidebar: #E5DCCF;        /* Sidebar */
    --text-primary: #1C2321;       /* Texte foncé */
    --text-secondary: #7A6953;     /* Marron sable chaud et élégant */
    --border-glass: rgba(140, 112, 77, 0.3);
    --shadow-gold: rgba(140, 112, 77, 0.15);
    --accent-gold: #8C704D;        /* Or mat plus sombre pour lisibilité */
    --accent-gold-muted: #5C4831;  /* Marron-or sombre pour contraste élevé des textes atténués */
    
    /* Variables de composants adaptatives */
    --bg-word-item: rgba(255, 255, 255, 0.45); /* Blanc crème doux translucide pour les cartes de mots inactives */
    --bg-tooltip: rgba(229, 220, 207, 0.98);
    --border-tooltip: rgba(140, 112, 77, 0.4);
    --shadow-tooltip: rgba(140, 112, 77, 0.25);
    --text-tooltip-section: rgba(28, 35, 33, 0.6);
    --border-tooltip-header: rgba(140, 112, 77, 0.2);
    
    /* Variables de badges en mode clair */
    --bg-badge: var(--bg-dark-deep);
    --text-badge: var(--accent-gold);
    --border-badge: 1px solid var(--border-glass);
}

/* Structure de la barre de contrôles supérieure */
.detail-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 16px;
    gap: 16px;
}

.detail-top-bar .mobile-back-btn {
    margin-bottom: 0; /* Alignement */
}

.view-controls-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2px 8px;
    background: var(--bg-dark-card);
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: var(--transition-smooth);
}

.control-btn:hover {
    background: var(--border-glass);
    color: var(--accent-gold);
}

.control-arrow-btn {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.control-arrow-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 0 8px var(--shadow-gold);
    transform: scale(1.1);
}

.word-item-literal {
    font-size: 10px;
    font-style: italic;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.2;
    display: inline-block;
    word-wrap: break-word;
    font-weight: normal;
    opacity: 0.85;
}

.detail-title-literal {
    font-size: 15px;
    font-style: italic;
    color: var(--accent-gold);
    font-weight: normal;
    margin-left: 10px;
    font-family: var(--font-serif);
}

.font-size-indicator {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    min-width: 38px;
    text-align: center;
}

.bible-references-bar {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-glass);
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bible-references-icon {
    font-size: 14px;
}

.bible-references-title {
    font-weight: 600;
    color: var(--text-primary);
}

#detail-bible-references strong {
    color: var(--accent-gold);
    font-weight: 700;
}

/* Prononciation Audio (TTS) */
.title-with-audio {
    display: flex;
    align-items: center;
    gap: 16px;
}

.audio-speak-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--accent-gold);
    border-radius: 16px;
    padding: 4px 12px;
    font-size: calc(11px * var(--main-content-scale, 1));
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.audio-speak-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-dark-deep);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px var(--shadow-gold);
}

/* Application du Zoom proportionnel sur le contenu de lecture */
.detail-body {
    font-size: calc(1rem * var(--base-text-scale, 1) * var(--main-content-scale, 1));
    transition: font-size 0.2s ease;
}

.detail-body p,
.detail-body li,
.detail-body td,
.detail-body th,
.detail-body blockquote {
    font-size: calc(1em * var(--base-text-scale, 1));
}

/* Styles du Sélecteur de Langue */
.lang-selector {
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2px 4px;
    background: var(--bg-dark-card);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-family: var(--font-sans);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-btn.active, .lang-btn:hover {
    background: var(--border-glass);
    color: var(--accent-gold);
}

/* Formulaire de Contact & Signalements */
.contact-card {
    padding: 32px;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-family: var(--font-serif);
    font-size: calc(13px * var(--main-content-scale, 1));
    color: var(--accent-gold);
    letter-spacing: 0.5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-dark-input);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: calc(14px * var(--main-content-scale, 1));
    transition: var(--transition-smooth);
    outline: none;
}

.form-group select option {
    background-color: var(--bg-dark-card);
    color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px var(--shadow-gold);
    background: var(--bg-dark-card);
}

.form-group select option {
    background: var(--bg-dark-deep);
    color: var(--text-primary);
}

.form-actions {
    margin-top: 12px;
}

.submit-btn {
    width: auto;
    min-width: 180px;
    background: linear-gradient(135deg, var(--accent-gold), #A98A59);
    color: var(--bg-dark-deep) !important;
    border: none;
    font-weight: 700;
    font-family: var(--font-serif);
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-subtle);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 168, 128, 0.35);
}

.form-status {
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: var(--font-sans);
    line-height: 1.5;
    animation: fadeIn 0.3s ease-out;
}

.form-status.info {
    background: rgba(197, 168, 128, 0.05);
    border: 1px solid rgba(197, 168, 128, 0.2);
    color: var(--accent-gold);
}

.form-status.success {
    background: rgba(46, 117, 89, 0.1);
    border: 1px solid rgba(46, 117, 89, 0.3);
    color: #4CAF50;
}

.form-status.error {
    background: rgba(186, 45, 45, 0.1);
    border: 1px solid rgba(186, 45, 45, 0.3);
    color: #FF5252;
}

/* Responsive pour le formulaire */
@media (max-width: 1024px) {
    .contact-form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .contact-card {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .word-item {
        padding: 10px 12px;
    }
}

/* ==========================
   GLOBAL FOOTER
   ========================== */
.app-global-footer {
    width: 100%;
    padding: 32px 24px;
    margin-top: 40px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(15, 22, 38, 0.4));
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-gold-muted);
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.8;
}

.footer-copyright {
    opacity: 0.8;
}

/* ==========================================
   MENU GLISSANT (DRAWER OVERLAY) & PDF GRIDS
   ========================================== */

/* Logo Row and Menu Toggle Button */
.logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.menu-toggle-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    color: var(--accent-gold);
    font-size: 20px;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.menu-toggle-btn:hover {
    background: rgba(197, 168, 128, 0.1);
    border-color: var(--accent-gold);
}

/* Sidebar Controls (Lang & Theme vertical stack) */
.sidebar-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-lang-selector {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.sidebar-lang-btn {
    background: transparent;
    border: 1px solid rgba(197, 168, 128, 0.25);
    color: var(--text-secondary);
    font-size: 9px;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1.1;
    min-width: 26px;
    text-align: center;
}

.sidebar-lang-btn:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.sidebar-lang-btn.active {
    background: var(--accent-gold);
    color: #0B101D;
    border-color: var(--accent-gold);
    box-shadow: 0 2px 6px rgba(197, 168, 128, 0.2);
}

/* Unified Theme Toggle Button */
.theme-toggle-btn-unified {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--accent-gold);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    font-size: 11px;
    padding: 0;
    flex-shrink: 0;
}

#mobile-toggle-theme-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
    margin-left: 8px;
}

.theme-toggle-btn-unified:hover {
    background: rgba(197, 168, 128, 0.1);
    border-color: var(--accent-gold);
    transform: translateY(-1px);
}

/* Sliding Menu Drawer */
.menu-drawer {
    --drawer-text-scale: 1; /* Variable pour zoomer le menu glissant mobile */
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background-color: var(--bg-sidebar, #0B101D);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    z-index: 20000 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-drawer.open {
    left: 0;
}

/* Drawer Overlay (Blur background) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 10, 0.6);
    backdrop-filter: blur(4px);
    z-index: 19999 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Drawer Header */
.drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-logo {
  font-family: var(--font-serif);
  font-size: calc(22px * var(--drawer-text-scale, 1));
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.drawer-close-btn:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* Drawer Navigation Buttons */
.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.drawer-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px 18px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: calc(14px * var(--drawer-text-scale, 1));
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.drawer-nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(197, 168, 128, 0.4);
}

.drawer-nav-btn.active {
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.15), rgba(197, 168, 128, 0.05));
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.08);
}

/* Drawer Footer */
.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-glass);
    background-color: var(--bg-sidebar, #090D17);
}

/* PDF Grid Layout */
.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.pdf-item-card {
    background-color: var(--bg-word-item);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition-smooth);
}

.pdf-item-card:hover {
    background-color: var(--bg-dark-card);
    border-color: rgba(197, 168, 128, 0.3);
    transform: translateY(-3px);
}

.pdf-icon {
    font-size: calc(32px * var(--main-content-scale, 1));
    align-self: flex-start;
}

.pdf-item-card h3 {
    font-family: var(--font-serif);
    color: var(--accent-gold);
    font-size: calc(18px * var(--main-content-scale, 1));
    font-weight: 600;
}

.pdf-desc {
    font-size: calc(13px * var(--main-content-scale, 1));
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.6;
}

.pdf-meta {
    font-size: calc(11px * var(--main-content-scale, 1));
    color: var(--accent-gold-muted);
    font-weight: 500;
}

.pdf-download-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-family: var(--font-serif);
    font-size: calc(13px * var(--main-content-scale, 1));
    font-weight: 600;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pdf-download-btn:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
}

/* ==========================================
   ÉCOSYSTÈME POEMIA & AGAPE-LOGOS (GRID)
   ========================================== */

.ecosystem-main-card {
    max-width: 960px !important; /* Permet un affichage plus large côte à côte */
    width: 100%;
}

.ecosystem-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 20px;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.ecosystem-card {
    position: relative;
    background-color: var(--bg-word-item);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-smooth);
}

.ecosystem-card h3,
.partner-card-body h3 {
    font-size: calc(18px * var(--main-content-scale, 1));
}

.ecosystem-card p,
.partner-card-body p {
    font-size: calc(13px * var(--main-content-scale, 1));
}

/* Miroir de lueur : Violet pour Poemia (Technique & IA) */
.ecosystem-card.poemia-card {
    border: 1px solid rgba(168, 85, 247, 0.18);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.03);
}

.ecosystem-card.poemia-card:hover {
    border-color: rgba(168, 85, 247, 0.35);
    background-color: var(--bg-dark-card);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.08);
}

/* Miroir de lueur : Or pour Agape-Logos, Book, Donation (Académique & Soutien) */
.ecosystem-card.agape-card,
.ecosystem-card.book-card,
.ecosystem-card.donation-card {
    border: 1px solid rgba(197, 168, 128, 0.18);
    box-shadow: 0 4px 20px rgba(197, 168, 128, 0.03);
}

.ecosystem-card.agape-card:hover,
.ecosystem-card.book-card:hover,
.ecosystem-card.donation-card:hover {
    border-color: rgba(197, 168, 128, 0.35);
    background-color: var(--bg-dark-card);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(197, 168, 128, 0.08);
}

/* Miroir de lueur : Bleu pour les sites partenaires */
.ecosystem-card.partner-card {
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.03);
    padding: 0 !important;
    overflow: hidden;
}

.ecosystem-card.partner-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background-color: var(--bg-dark-card);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.08);
}

.partner-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.partner-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ecosystem-card.partner-card:hover .partner-card-img {
    transform: scale(1.06);
}

.partner-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 12px;
}


.ecosystem-surtitre {
    font-size: calc(10px * var(--main-content-scale, 1));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.ecosystem-card.poemia-card .ecosystem-surtitre {
    color: #C084FC; /* Violet clair */
}

.ecosystem-card.agape-card .ecosystem-surtitre {
    color: var(--accent-gold);
}

.ecosystem-card.partner-card .ecosystem-surtitre {
    color: #60A5FA; /* Bleu clair */
}

.ecosystem-card h2 {
    font-family: var(--font-serif);
    font-size: calc(24px * var(--main-content-scale, 1));
    font-weight: 700;
    margin-bottom: 4px;
}

.ecosystem-card.poemia-card h2 {
    color: #E9D5FF;
}

.ecosystem-card.agape-card h2 {
    color: var(--accent-gold);
}

.ecosystem-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ecosystem-section h4 {
    font-family: var(--font-sans);
    font-size: calc(14px * var(--main-content-scale, 1));
    font-weight: 600;
    color: var(--text-primary);
}

.ecosystem-section p {
    font-size: calc(13px * var(--main-content-scale, 1));
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Boutons d'action Écosystème */
.ecosystem-btn {
    width: 100%;
    margin-top: auto;
    font-family: var(--font-serif);
    font-size: calc(13px * var(--main-content-scale, 1));
    font-weight: 600;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.poemia-btn {
    background: transparent;
    border: 1px solid #A855F7;
    color: #E9D5FF;
}

.poemia-btn:hover {
    background-color: #A855F7;
    color: var(--bg-dark-deep);
}

.agape-btn {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
}

.agape-btn:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
}

/* Responsive pour l'écosystème */
@media (max-width: 1024px) {
    .ecosystem-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* -------------------------------------
   COOKIE BANNER
------------------------------------- */
.prefs-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-tooltip);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-glass);
    z-index: 9999;
    padding: 20px;
    box-shadow: 0 -10px 30px var(--shadow-tooltip);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.prefs-banner:not(.hidden) {
    transform: translateY(0);
}

.prefs-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 1024px) {
    .prefs-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.prefs-text h4 {
    margin: 0 0 5px 0;
    color: var(--accent-gold);
    font-family: var(--font-serif);
    font-size: 16px;
}

.prefs-text p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.prefs-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.prefs-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refuse-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

.refuse-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.accept-btn {
    background: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    color: var(--bg-dark-deep);
}

.accept-btn:hover {
    background: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* -------------------------------------
   POEMIA VERSE TOOLTIP
------------------------------------- */
.verse-hover {
    color: var(--accent-gold);
    border-bottom: 1px dotted var(--accent-gold);
    cursor: help;
    transition: all 0.2s ease;
    position: relative;
}

.verse-hover:hover {
    background: rgba(212, 175, 55, 0.1);
}

.word-link {
    color: var(--accent-gold);
    border-bottom: 1px dashed var(--accent-gold);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.word-link:hover {
    background: rgba(212, 175, 55, 0.15);
    text-shadow: 0 0 8px rgba(197, 168, 128, 0.4);
}

.verse-tooltip {
    position: fixed;
    z-index: 10000;
    width: 320px;
    background: var(--bg-tooltip);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-tooltip);
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--shadow-tooltip);
    padding: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(10px);
    max-height: 400px;
    overflow-y: auto;
    font-size: calc(1rem * var(--base-text-scale, 1) * var(--tooltip-text-scale, 1));
}
.verse-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* Permet le clic et le survol de la bulle */
    cursor: pointer;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-tooltip-header);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.tooltip-header:active {
    cursor: grabbing;
}

.tooltip-title {
    font-family: var(--font-serif);
    color: var(--accent-gold);
    font-size: calc(14px * var(--base-text-scale, 1) * var(--tooltip-text-scale, 1));
    font-weight: 600;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tooltip-section-title {
    margin: 0 0 4px 0;
    font-size: calc(11px * var(--base-text-scale, 1) * var(--tooltip-text-scale, 1));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tooltip-section);
}

.tooltip-text {
    margin: 0;
    font-size: calc(13px * var(--base-text-scale, 1) * var(--tooltip-text-scale, 1));
    line-height: 1.5;
}

.poemia-text {
    color: var(--text-primary);
    font-style: italic !important;
    text-transform: none !important;
}

.paraphrase-text {
    color: var(--text-secondary);
    font-family: var(--font-serif-body) !important;
    font-style: italic !important;
    text-transform: none !important;
}

@media (max-width: 600px) {
    .verse-tooltip {
        width: 280px;
    }
}

/* -------------------------------------
   POEMIA APP MODAL
------------------------------------- */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.app-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    width: 90%;
    max-width: 450px;
    max-height: 90vh; /* Limite la hauteur de la carte à 90% de l'écran */
    overflow-y: auto; /* Active le défilement vertical si nécessaire */
    background: rgba(25, 25, 28, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    padding: 24px;
    z-index: 10006;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-modal.hidden .modal-card {
    transform: scale(0.9);
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--accent-gold);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-icon {
    font-size: 24px;
}

.modal-header h3 {
    margin: 0;
    font-family: var(--font-serif);
    color: var(--accent-gold);
    font-size: 18px;
}

.modal-body {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-status {
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.modal-appeal {
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-style: italic;
    background: rgba(212, 175, 55, 0.05);
    border-left: 2px solid var(--accent-gold);
    padding: 10px 14px;
    margin: 16px 0 0 0;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-support-btn {
    background: var(--accent-gold);
    color: var(--bg-dark-deep) !important;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-support-btn:hover {
    background: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.modal-cancel-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* CAROUSEL IN MODAL */
.modal-carousel {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 320px; /* Un peu plus compact pour le PC */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    animation: fadeEffect 0.5s ease-in-out;
}

.carousel-slide.active {
    display: flex;
}

.carousel-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.carousel-caption {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: var(--accent-gold-muted);
    text-align: center;
    font-style: italic;
    min-height: 40px; /* Evite les sauts de hauteur entre les slides */
    line-height: 1.4;
    padding: 0 10px;
}

.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

.carousel-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dots .dot.active {
    background: var(--accent-gold);
    transform: scale(1.3);
}

@keyframes fadeEffect {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Ajustement de la hauteur sur les petits écrans */
@media (max-height: 800px) {
    .carousel-container {
        height: 240px; /* Plus court si l'écran est petit verticalement */
    }
}

/* LIGHTBOX POUR AGRANDIR LES CAPTURES */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10010; /* Au-dessus de la modale */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-lightbox.hidden {
    opacity: 0;
    pointer-events: none;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    transform: scale(1);
    transition: transform 0.3s ease;
    cursor: zoom-out;
}

.image-lightbox.hidden .lightbox-content {
    transform: scale(0.95);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-secondary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.lightbox-close:hover {
    color: var(--accent-gold);
}

/* Curseur zoom-in sur les images du carousel pour indiquer qu'on peut cliquer */
.carousel-img {
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.carousel-img:hover {
    transform: scale(1.02);
}

/* ==========================
   MARQUEE TICKER & DONATION BUTTONS
   ========================== */
.marquee-ticker {
    width: 100%;
    overflow: hidden;
    background: rgba(197, 168, 128, 0.05);
    border-top: 1px solid rgba(197, 168, 128, 0.15);
    border-bottom: 1px solid rgba(197, 168, 128, 0.15);
    padding: 6px 0;
    margin-top: 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll 25s linear infinite;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: var(--accent-gold);
    text-transform: uppercase;
}

.ticker-content:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(100%, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Boutons secondaires d'action PayPal (Contributeur Régulier) */
.action-btn.paypal-btn-outline {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
}

.action-btn.paypal-btn-outline:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.2);
}

.ecosystem-btn.paypal-btn-outline {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
}

.ecosystem-btn.paypal-btn-outline:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.2);
}

/* ==========================
   NEWSLETTER SECTION
   ========================== */
.newsletter-section {
    width: 100%;
    max-width: 100% !important; /* Laisse la carte interne contrôler la largeur maximale */
    margin: 0 auto;
    padding: 0 40px;
    margin-top: calc(40px * var(--main-content-scale, 1));
    margin-bottom: 40px;
}

.newsletter-card {
    width: 100%;
    margin: 0 auto;
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-glass);
    border-radius: calc(12px * var(--main-content-scale, 1));
    padding: calc(32px * var(--main-content-scale, 1));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    text-align: center;
    background: linear-gradient(145deg, var(--bg-dark-deep), var(--bg-dark-card));
    transition: max-width 0.3s ease;
    max-width: 720px; /* Largeur par défaut */
}

/* --- ADAPTATION DYNAMIQUE DE LA NEWSLETTER --- */
#lexicon-view:not(.hidden) ~ #newsletter-section .newsletter-card,
#ecosystem-view:not(.hidden) ~ #newsletter-section .newsletter-card {
    max-width: 960px;
}

#detail-view:not(.hidden) ~ #newsletter-section .newsletter-card {
    max-width: 880px; /* 960px max-width of .word-detail - 80px horizontal padding */
}

#project-view:not(.hidden) ~ #newsletter-section .newsletter-card {
    max-width: 800px;
}

#welcome-view:not(.hidden) ~ #newsletter-section .newsletter-card,
#pdf-view:not(.hidden) ~ #newsletter-section .newsletter-card,
#links-view:not(.hidden) ~ #newsletter-section .newsletter-card,
#contact-view:not(.hidden) ~ #newsletter-section .newsletter-card,
#help-view:not(.hidden) ~ #newsletter-section .newsletter-card {
    max-width: 720px;
}

.newsletter-title {
    font-family: var(--font-serif);
    font-size: calc(22px * var(--main-content-scale, 1));
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: calc(8px * var(--main-content-scale, 1));
    letter-spacing: 1px;
}

.newsletter-desc {
    font-family: var(--font-sans);
    font-size: calc(14px * var(--main-content-scale, 1));
    color: var(--text-secondary);
    margin-bottom: calc(24px * var(--main-content-scale, 1));
    line-height: 1.5;
}

.newsletter-form-grid {
    max-width: 600px; /* Reste compact au centre */
    width: 100%;
    margin: 0 auto;
}

.newsletter-input-group {
    display: flex;
    flex-wrap: wrap; /* Permet un wrap fluide */
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    background-color: var(--bg-dark-input);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: calc(12px * var(--main-content-scale, 1)) calc(16px * var(--main-content-scale, 1));
    border-radius: calc(6px * var(--main-content-scale, 1));
    font-family: var(--font-sans);
    font-size: calc(14px * var(--main-content-scale, 1));
    outline: none;
    transition: var(--transition-smooth);
}

.newsletter-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.newsletter-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.2);
}

.newsletter-btn {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
    border: none;
    padding: calc(12px * var(--main-content-scale, 1)) calc(24px * var(--main-content-scale, 1));
    border-radius: calc(6px * var(--main-content-scale, 1));
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: calc(14px * var(--main-content-scale, 1));
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(8px * var(--main-content-scale, 1));
    white-space: nowrap;
}

.newsletter-btn:hover {
    background-color: var(--accent-gold-bright);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.3);
}

.newsletter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.newsletter-status {
    margin-top: 16px;
    font-size: 13.5px;
    padding: 10px 14px;
    border-radius: 6px;
    text-align: left;
    font-family: var(--font-sans);
    line-height: 1.4;
    transition: var(--transition-smooth);
}

.newsletter-status.info {
    background-color: rgba(197, 168, 128, 0.1);
    border-left: 3px solid var(--accent-gold);
    color: var(--accent-gold);
}

.newsletter-status.success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--accent-green-muted);
    color: var(--accent-green-muted);
}

.newsletter-status.error {
    background-color: rgba(185, 28, 28, 0.1);
    border-left: 3px solid var(--accent-red-muted);
    color: var(--accent-red-muted);
}

.newsletter-status.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .newsletter-input-group {
        flex-direction: column;
        gap: calc(10px * var(--main-content-scale, 1));
    }
    
    .newsletter-btn {
        width: 100%;
        padding: calc(14px * var(--main-content-scale, 1));
    }
    
    .newsletter-card {
        padding: calc(24px * var(--main-content-scale, 1)) calc(16px * var(--main-content-scale, 1));
    }
}

/* --- LEXIQUE ÉPURÉ STYLING --- */
.lexicon-row-main td {
    border-bottom: none !important;
}

.lexicon-row-occurrences {
    background: rgba(255, 255, 255, 0.015);
}

.lexicon-row-occurrences td {
    padding: 6px 16px 14px 16px !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(197, 168, 128, 0.15) !important;
}

.lexicon-verse-tag {
    transition: all 0.2s ease;
    display: inline-block;
    background: rgba(197, 168, 128, 0.12);
    border: 1px dashed rgba(197, 168, 128, 0.3);
    color: var(--accent-gold);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin: 2px;
    font-weight: 500;
    cursor: help;
}

.lexicon-verse-tag:hover {
    background: rgba(197, 168, 128, 0.25) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lexicon-verse-tag.first-occurrence {
    border: 1px solid var(--accent-gold) !important;
    background: rgba(197, 168, 128, 0.3) !important;
    color: #fff !important;
    font-weight: bold !important;
    box-shadow: 0 0 4px rgba(197, 168, 128, 0.3);
}

.lexicon-verse-tag.first-occurrence:hover {
    background: rgba(197, 168, 128, 0.45) !important;
}

/* --- CENTRAGE DES VUES SECONDAIRES SUR GRAND ÉCRAN --- */
.project-screen .welcome-card {
    margin: 40px auto;
}

.lexicon-card {
    max-width: 960px !important;
}

/* --- LEXICON NAVIGATION & CONTROLS --- */
.lexicon-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 24px;
    background: var(--bg-dark-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 20px;
    z-index: 100;
    box-shadow: 0 8px 32px var(--shadow-gold);
}

.lexicon-search-box {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 300px;
    width: 100%;
}

.lexicon-search-icon {
    position: absolute;
    left: 12px;
    color: var(--accent-gold);
    font-size: 14px;
    pointer-events: none;
}

.lexicon-search-box input {
    width: 100%;
    background-color: var(--bg-dark-input);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 10px 12px 10px 36px;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
}

.lexicon-search-box input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(197, 168, 128, 0.25);
}

.lexicon-alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.lexicon-letter-btn {
    background-color: var(--bg-word-item);
    border: 1px solid var(--border-glass);
    color: var(--accent-gold-muted);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    min-width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lexicon-letter-btn:hover {
    background-color: rgba(197, 168, 128, 0.1);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: translateY(-1px);
}

.lexicon-letter-btn.active {
    background-color: var(--accent-gold);
    color: var(--bg-dark-deep);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px var(--shadow-gold);
}

/* Surlignage au défilement / recherche */
@keyframes rowFlash {
    0% { background-color: rgba(197, 168, 128, 0.35); }
    100% { background-color: transparent; }
}

.row-scroll-highlight {
    animation: rowFlash 1.5s ease-out;
}

/* Responsive pour mobile */
@media (max-width: 1024px) {
    .lexicon-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .lexicon-search-box {
        max-width: 100%;
    }
    
    .lexicon-alphabet-bar {
        justify-content: center;
    }
}

/* Bouton de retour en haut flottant */
.lexicon-back-to-top-btn {
    position: fixed;
    bottom: 30px;
    left: calc(50vw + 160px); /* Centré sur la page de contenu (100vw - 320px sidebar) / 2 + 320px */
    transform: translateX(-50%) scale(0.9);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent; /* Intérieur 100% transparent pour voir la page à travers */
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold) !important;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s, transform 0.3s, background-color 0.3s, border-color 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.lexicon-back-to-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}

.lexicon-back-to-top-btn:hover {
    transform: translateX(-50%) scale(1.1);
    background-color: rgba(197, 168, 128, 0.15); /* Légère surbrillance au survol */
    border-color: #fff;
    color: #fff !important;
}

/* Alignement mobile pour le centrage */
@media (max-width: 1024px) {
    .lexicon-back-to-top-btn {
        left: 50%; /* Centré sur toute la largeur de l'écran sur mobile */
    }
}




/* Stabilotage des termes de recherche */
.search-highlight {
    background-color: #E2B25B !important; /* Or/Jaune plus prononcé et lumineux */
    color: #090D17 !important; /* Texte bleu nuit sombre pour un contraste maximum */
    border-radius: 2px !important;
    padding: 0 2px !important;
    font-weight: bold !important;
    border-bottom: 2px solid #C5A880 !important;
}


