/* ============================================
   ACTU & MÉDIA - Styles Optimisés v4
   2 Thèmes : Sombre (défaut) + Clair
   Nettoyé et sans duplications
   ============================================ */

/* ============================================
   THÈME SOMBRE (par défaut) - VARIABLES
   ============================================ */
:root {
    /* Couleurs principales */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #f472b6;
    
    /* Fonds - Valeurs optimisées pour lisibilité */
    --bg-body: #000000;
    --bg-card: rgba(255, 255, 255, 0.15);
    --bg-elevated: rgba(255, 255, 255, 0.18);
    
    /* Bordures et ombres */
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    /* Textes - Valeurs optimisées pour lisibilité */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* États */
    --danger: #ef4444;
    --success: #10b981;
}

/* ============================================
   THÈME CLAIR - VARIABLES
   ============================================ */
[data-theme="light"] {
    /* Couleurs principales */
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --accent: #ec4899;
    
    /* Fonds */
    --bg-body: #e8ecf1;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-elevated: rgba(255, 255, 255, 0.90);
    
    /* Bordures et ombres */
    --border-color: rgba(0, 0, 0, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.08);
    
    /* Textes */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0 0 20px 20px;
    gap: 0.6rem;
    background: rgb(20 20 20);
    border: 1px solid var(--border-color);
    border-top: none;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.header-left-btns,
.header-right-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.logo {
    font-size: 1.5rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* Boutons du header */
.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-elevated);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.header-btn:active {
    transform: scale(0.95);
}

.header-btn .material-icons {
    font-size: 1.4rem;
}

.header-btn.support .material-icons {
    color: #f472b6;
}

/* Bouton thème */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-elevated);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
}

.theme-toggle .material-icons {
    font-size: 1.2rem;
}

/* ============================================
   MODE CLAIR - Header
   ============================================ */
[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .header-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

[data-theme="light"] .header-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

[data-theme="light"] .header h1 {
    background: linear-gradient(135deg, #1e293b 0%, var(--primary) 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   MODE CLAIR - Modales
   ============================================ */
[data-theme="light"] .modal,
[data-theme="light"] .modal-content,
[data-theme="light"] .support-panel,
[data-theme="light"] .pwa-modal,
[data-theme="light"] .install-prompt,
[data-theme="light"] .install-banner,
[data-theme="light"] .pwa-install-banner {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ============================================
   MODE CLAIR - Sections et cartes
   ============================================ */
[data-theme="light"] .section,
[data-theme="light"] .card,
[data-theme="light"] .glass {
    background: rgb(243 244 247);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .news-carousel,
[data-theme="light"] .news-item,
[data-theme="light"] .cinema-section,
[data-theme="light"] .community-section,
[data-theme="light"] .quick-links-section,
[data-theme="light"] .local-sites-section,
[data-theme="light"] .footer {
    background: #ffffff4d;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .tile {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .community-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .news-item-content {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   MODE CLAIR - Boutons et liens rapides
   ============================================ */
[data-theme="light"] .quick-link-item,
[data-theme="light"] .local-site-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .quick-link-item:hover,
[data-theme="light"] .local-site-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

/* ============================================
   MODE CLAIR - Textes
   ============================================ */
[data-theme="light"] .section-title,
[data-theme="light"] .card-title,
[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3 {
    color: #1e293b;
}

[data-theme="light"] p,
[data-theme="light"] .description,
[data-theme="light"] .subtitle,
[data-theme="light"] .community-item-desc,
[data-theme="light"] .seo-section p {
    color: #334155 !important;
}

/* ============================================
   MODE CLAIR - Widget météo
   ============================================ */
[data-theme="light"] .weather-widget {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .weather-widget * {
    color: #1e293b;
}

[data-theme="light"] .weather-bar {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   MODE CLAIR - Footer
   ============================================ */
[data-theme="light"] .footer {
    background: rgb(243 244 247);
    color: #64748b;
}

[data-theme="light"] .footer a {
    color: var(--primary);
}

/* ============================================
   MODE SOMBRE - Sections principales
   ============================================ */
.news-carousel,
.cinema-section,
.community-section,
.quick-links-section,
.local-sites-section,
.section,
.card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Items dans les sections */
.news-item,
.cinema-item,
.community-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-item:hover,
.cinema-item:hover,
.community-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   MODE SOMBRE - Modales avec fond solide
   ============================================ */
.modal-overlay,
.support-overlay,
.pwa-modal-overlay,
.install-prompt-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.modal,
.modal-content,
.support-panel,
.pwa-modal,
.install-prompt,
.install-banner,
.pwa-install-banner {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-sizing: border-box;
    background: rgb(77 77 77);
    border: 1px solid var(--border-color);
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-primary);
}

.footer-sub {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .footer {
        margin: 1rem auto;
        margin-bottom: 2rem;
    }
}

/* ============================================
   BARRE MÉTÉO
   ============================================ */
.weather-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border-radius: 50px;
    width: 100%;
    max-width: 340px;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.weather-bar:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: scale(1.02);
}

.weather-day {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.4rem;
}

.weather-day-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.weather-day-icon {
    font-size: 1.3rem;
}

.weather-day-temp {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.weather-separator {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
    flex-shrink: 0;
}

/* ============================================
   NEWS TICKER / SWIPER
   ============================================ */
.news-ticker-section {
    margin: 1rem;
    padding: 1rem;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.news-ticker-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-ticker-header .material-icons {
    color: var(--danger);
    font-size: 1.25rem;
}

.pulse {
    animation: pulse 2s ease infinite;
}

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

.news-ticker-container {
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

.news-ticker-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.75rem;
    color: var(--text-muted);
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.news-slides {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
}

.news-slide {
    flex: 0 0 100%;
    padding: 0 0.5rem;
}

.news-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 140px;
    padding: 0;
    background: var(--bg-elevated);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    overflow: hidden;
}

.news-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

/* Image de l'article */
.news-item-image {
    position: relative;
    width: 220px;
    min-width: 220px;
    height: auto;
    min-height: 160px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 14px;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}

.news-item:hover .news-item-image:not(.no-image) img {
    transform: scale(1.03);
}

/* Placeholder quand pas d'image */
.news-item-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.news-item-placeholder .material-icons {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.5);
}

.news-item-image.no-image .news-item-placeholder {
    display: none;
}

.news-item-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("/images/news-default.jpg");
    background-size: cover;
    background-position: center;
}

.news-item-image.no-image img {
    display: none;
}

.news-item-image.no-image::after {
    content: "article";
    font-family: "Material Icons";
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenu de l'article */
.news-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.2rem;
    flex: 1;
    min-width: 0;
}

.news-item-source {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.65rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    width: fit-content;
}

.news-item-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.news-item-date {
    font-size: 0.75rem;
    margin-top: auto;
}

/* Navigation ticker */
.news-ticker-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.ticker-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-elevated);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticker-nav-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.ticker-nav-btn:active {
    transform: scale(0.95);
}

.ticker-dots {
    display: flex;
    gap: 0.5rem;
}

.ticker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticker-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* ============================================
   TUILES SITES LOCAUX
   ============================================ */
.tiles-section {
    padding: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.section-title .material-icons {
    font-size: 1.25rem;
    color: var(--primary-light);
}

/* Titres de section */
h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
    background: rgb(77 77 77);
    border: 1px solid var(--border-color);
}

.tile:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px var(--shadow-color);
    background: var(--bg-elevated);
}

.tile:active {
    transform: scale(0.98);
}

.tile-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.tile-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.tile-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tuiles supplémentaires */
.tiles-extra {
    display: none;
    margin-top: 1rem;
}

.tiles-extra.show {
    display: grid;
    animation: fadeInUp 0.4s ease;
}

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

/* Bouton toggle villes */
.tiles-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tiles-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    border-style: solid;
}

.tiles-toggle .material-icons {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.tiles-toggle.expanded .material-icons {
    transform: rotate(180deg);
}

/* ============================================
   WIDGET CINÉMA
   ============================================ */
.agenda-section, .cinema-section {
    margin: 1rem;
    padding: 1.25rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.cinema-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cinema-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.cinema-title .material-icons {
    color: var(--danger);
}

.cinema-link {   
    display: flex;
    gap: 0.25rem;
    padding: 0.2rem 0.7rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
}

.cinema-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cinema-content {
    position: relative;
}

.cinema-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    gap: 0.75rem;
    color: var(--text-muted);
}

.cinema-loading .material-icons {
    font-size: 2rem;
    color: var(--danger);
}

/* Films avec scroll limité */
.cinema-films {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scroll-behavior: smooth;
}

.cinema-films::-webkit-scrollbar {
    width: 4px;
}

.cinema-films::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: 10px;
}

.cinema-films::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.cinema-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.cinema-film {
    display: block;
    padding: 1.2rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.cinema-film:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cinema-film:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Mode clair - séparation plus visible */
[data-theme="light"] .cinema-film {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.cinema-film-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cinema-film-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
	flex-direction: column;
}

.cinema-film-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cinema-time {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   POPUP INSTALLATION PWA
   ============================================ */
.install-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #22222b;
    border-top: 1px solid var(--border-color);
    padding: 1.25rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 -10px 40px var(--shadow-color);
}

.install-prompt.show {
    transform: translateY(0);
}

.install-prompt-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.install-prompt-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.install-prompt-text {
    flex: 1;
}

.install-prompt-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.install-prompt-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.install-prompt-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.install-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.install-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.install-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.install-btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.install-btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* iOS Install Modal */
.ios-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ios-install-modal.show {
    display: flex;
}

.ios-install-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    max-width: 340px;
    text-align: center;
}

[data-theme="light"] .ios-install-content {
    background: #ffffff;
}

.ios-install-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.ios-install-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.ios-install-step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    color: white;
}

.ios-install-step-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.ios-install-close {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: var(--bg-elevated);
    border: none;
    border-radius: 50px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}

.ios-install-close:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* ============================================
   SECTION SEO
   ============================================ */
.seo-section {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-sizing: border-box;
    background: rgb(77 77 77);
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .seo-section {
        margin: 1rem auto;
    }
}

.seo-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.seo-section p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
}

.seo-section p:last-child {
    margin-bottom: 0;
}

.seo-section strong {
    color: var(--primary-light);
}

[data-theme="light"] .seo-section strong {
    color: var(--primary);
}

/* ============================================
   MODAL TV
   ============================================ */
.tv-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tv-modal.show {
    display: flex;
}

.tv-modal-content {
    background: rgb(22 22 21);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    max-width: 380px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

[data-theme="light"] .tv-modal-content {
    background: rgba(255, 255, 255, 0.95);
}

.tv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.tv-modal-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.tv-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-elevated);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tv-modal-close:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.tv-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tv-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.tv-item:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(4px);
}

.tv-icon {
    font-size: 1.75rem;
}

.tv-info {
    flex: 1;
}

.tv-info strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.tv-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   SECTION INFOS COMMUNAUTÉ
   ============================================ */
.community-section {
    margin: 1rem;
    padding: 1.25rem;
    border-radius: 24px;
    box-sizing: border-box;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .community-section {
        margin: 1rem auto;
    }
}

.community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.community-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.community-title .material-icons {
    color: var(--primary-light);
    font-size: 1.5rem;
}

.community-propose-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.community-propose-btn .material-icons {
    font-size: 1rem;
}

.community-propose-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.community-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.community-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Item communauté */
.community-item {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    flex-direction: column;
}

.community-item:hover {
    background: rgba(99, 102, 241, 0.08);
}

.community-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.community-item-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.community-item-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.community-item-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    max-height: 80px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
}

.community-item-desc.expanded {
    max-height: 2000px;
}

.community-item-desc:not(.expanded).truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--bg-card));
    pointer-events: none;
}

.community-item.expanded .community-item-desc {
    display: block;
    -webkit-line-clamp: unset;
}

.community-item-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    justify-content: flex-start;
}

.community-item-meta span {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.community-item-meta .material-icons {
    font-size: 0.9rem;
}

/* Wrapper image avec effet zoom */
.community-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0.75rem 0;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
}

.community-image-zoom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.community-image-zoom .material-icons {
    font-size: 1.2rem;
}

.community-image-wrapper:hover .community-image-zoom {
    opacity: 1;
}

/* Image dans les items communauté */
.community-item-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.community-item-image:hover {
    transform: scale(1.01);
    opacity: 0.95;
}

/* Lien dans les items communauté */
.community-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

.community-item-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.community-item-link .material-icons {
    font-size: 1rem;
}

/* Modal pour agrandir les images */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
}

.image-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-modal.show .image-modal-content {
    transform: scale(1);
}

.image-modal-content img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Bouton Voir plus / Voir moins */
.see-more-btn {
    display: none;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.see-more-btn.visible {
    display: inline-flex;
}

.see-more-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.see-more-btn .material-icons {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.see-more-btn.expanded .material-icons {
    transform: rotate(180deg);
}

/* État vide communauté */
.community-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.community-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.community-empty p {
    margin: 0;
    font-size: 0.95rem;
}

.community-empty-sub {
    font-size: 0.8rem !important;
    margin-top: 0.35rem !important;
    opacity: 0.7;
}

/* === COMMENTAIRES === */
.community-comments-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.comments-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    color: var(--primary-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.comments-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.comments-toggle-btn .material-icons {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.comments-toggle-btn.open .material-icons.arrow {
    transform: rotate(180deg);
}

.comments-container {
    display: none;
    margin-top: 0.75rem;
}

.comments-container.open {
    display: block;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.comment-item {
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.comment-item-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-light);
}

.comment-item-date {
    font-size: 0.7rem;
}

.comment-item-content {
    font-size: 0.85rem;
    line-height: 1.5;
}

.comments-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.comments-empty-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Formulaire commentaire */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
}

.comment-form-row {
    display: flex;
    gap: 0.5rem;
}

.comment-input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-input::placeholder {
    color: var(--text-muted);
}

.comment-textarea {
    min-height: 60px;
    resize: vertical;
}

.comment-submit-btn {
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.3s ease;
}

.comment-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-submit-btn .material-icons {
    font-size: 1rem;
}

.comment-success {
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: #10b981;
    font-size: 0.85rem;
    text-align: center;
}

.load-more-comments {
    padding: 0.5rem;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.load-more-comments:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

/* === LIKES === */
.community-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 20px;
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

.like-btn.liked {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
    color: white;
}

.like-btn.liked:hover {
    background: #dc2626;
}

.like-btn .material-icons {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.like-btn:hover .material-icons {
    transform: scale(1.2);
}

.like-btn.liked .material-icons {
    animation: likeAnimation 0.4s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.like-count {
    font-weight: 600;
}

/* Compteur de vues */
.views-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.views-count .material-icons {
    font-size: 1rem;
}

/* ============================================
   SECTION ADMIN
   ============================================ */
.admin-section {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background: rgba(99, 102, 241, 0.2);
}

.admin-link .material-icons {
    font-size: 1.2rem;
}

.admin-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #ef4444;
    border-radius: 11px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification toast globale */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    max-width: 300px;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast-icon {
    font-size: 1.5rem;
}

.notification-toast-content {
    flex: 1;
}

.notification-toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.notification-toast-text {
    font-size: 0.8rem;
    opacity: 0.9;
}

.notification-toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.notification-toast-close:hover {
    opacity: 1;
}

/* Icône propose */
.support-action-icon.propose {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* ============================================
   POPUP NOTIFICATIONS
   ============================================ */
.notif-prompt {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    z-index: 10000;
    width: calc(100% - 2rem);
    max-width: 360px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-prompt.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.notif-prompt-content {
    background: rgb(20 20 20);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

[data-theme="light"] .notif-prompt-content {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.notif-prompt-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s;
}

.notif-prompt-close:hover {
    color: var(--text-primary);
}

.notif-prompt-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    animation: bellRing 1s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(10deg); }
    20%, 40% { transform: rotate(-10deg); }
    50% { transform: rotate(0deg); }
}

.notif-prompt-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.notif-prompt-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.notif-prompt-actions {
    display: flex;
    gap: 0.75rem;
}

.notif-prompt-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notif-prompt-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.notif-prompt-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.notif-prompt-btn.secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.notif-prompt-btn.secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

/* ============================================
   AMÉLIORATION GLOBALE DU TEXTE
   ============================================ */
/* Texte plus clair et plus grand dans les descriptions */
p, 
.description, 
.community-item-desc, 
.seo-section p, 
.news-item-content {
    color: rgba(255, 255, 255, 0.85) !important; 
    font-size: 0.95rem;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .news-item {
        flex-direction: column;
        min-height: auto;
    }

    .news-item-image {
        width: 100%;
        min-width: 100%;
        height: 200px;
        min-height: 200px;
        border-radius: 12px;
        overflow: hidden;
    }

    .news-item-image img {
        object-fit: cover;
        object-position: center;
    }

    .news-item-image.no-image {
        background-size: cover;
        background-position: center;
    }

    .news-item-content {
        padding: 0.75rem;
    }

    .news-item-title {
        -webkit-line-clamp: 3;
        font-size: 1rem;
    }
    
    p {
        margin-bottom: 1rem;
    }
    
    .install-prompt-content {
        flex-direction: column;
        text-align: center;
    }
    
    .install-prompt-actions {
        width: 100%;
        justify-content: center;
    }
    
    .community-image-zoom {
        opacity: 1;
        padding: 0.5rem;
        font-size: 0.75rem;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
    }
    
    .community-image-zoom .material-icons {
        font-size: 1rem;
    }
    
    .community-item-image {
        max-height: 250px;
        border-radius: 10px;
        margin: 0.5rem auto;
    }
    
    .image-modal {
        padding: 0.5rem;
    }
    
    .image-modal-content {
        max-width: 98vw;
    }
    
    .image-modal-content img {
        max-width: 98vw;
        max-height: 75vh;
        border-radius: 4px;
    }
    
    .image-modal-close {
        top: -40px;
        width: 36px;
        height: 36px;
    }
}

/* Petit mobile (< 480px) */
@media (max-width: 479px) {
    .community-item-image {
        max-height: 220px;
        border-radius: 8px;
        margin: 0.5rem auto;
    }
    
    .image-modal-content img {
        max-width: 100vw;
        max-height: 70vh;
        border-radius: 0;
    }
    
    .image-modal-close {
        top: 10px;
        right: 10px;
        position: fixed;
    }
    
    .community-item-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   RESPONSIVE - Tablette (768px - 1024px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    .tiles-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .news-ticker-section,
    .cinema-section,
    .community-section,
    .seo-section,
    .tiles-section,
	.agenda-section,
    .footer {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .header {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .cinema-films {
        max-height: 350px;
    }
    
    .community-item-image {
        max-height: 220px;
    }
    
    .image-modal-content img {
        max-width: 90vw;
        max-height: 80vh;
    }
}

/* Swiper PC */
@media (min-width: 769px) {
    .news-ticker-container {
        min-height: auto;
    }
    
    .news-item {
        min-height: 180px;
        max-height: 200px;
    }
    
    .news-item-image {
        height: 180px;
        min-height: 180px;
        max-height: 200px;
    }
    
    .news-ticker-nav {
        margin-top: 0.75rem;
    }
}

/* ============================================
   RESPONSIVE - PC (> 1024px)
   ============================================ */
@media (min-width: 1025px) {
    .tiles-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .news-ticker-section,
    .cinema-section,
    .community-section,
    .seo-section,
    .tiles-section,
	.agenda-section,
    .footer {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .header {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .cinema-films {
        max-height: 400px;
    }
    
    .news-ticker-section {
        padding: 1.25rem;
    }
    
    .news-item {
        min-height: 160px;
        max-height: 180px;
        padding: 0.5rem;
    }
    
    .news-item-image {
        width: 180px;
        min-width: 180px;
        height: 160px;
        min-height: 160px;
        max-height: 180px;
    }
    
    .news-item-title {
        font-size: 1.15rem;
    }
    
    .tile {
        padding: 2rem 1.5rem;
    }
    
    .tile-icon {
        font-size: 3rem;
    }
    
    .tile-name {
        font-size: 1rem;
    }
    
    .community-item-image {
        max-height: 250px;
    }
    
    .image-modal-content {
        max-width: 80vw;
    }
    
    .image-modal-content img {
        max-width: 80vw;
        max-height: 85vh;
    }
}

/* Grand écran PC */
@media (min-width: 1024px) {
    .news-ticker-section {
        padding: 1.25rem;
    }
    
    .news-item {
        min-height: 160px;
        max-height: 180px;
    }
    
    .news-item-image {
        width: 180px;
        min-width: 180px;
        height: 160px;
        min-height: 160px;
        max-height: 180px;
    }
}

/* Safe area pour iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }
    
    .install-prompt {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    }
}

/* ============================================
   1. NOUVELLE DISPOSITION CARTES COMMUNAUTÉ
   ============================================ */

/* Header de la carte (Emoji + Auteur + Date EN HAUT) */
.community-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.community-item-header .community-item-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.community-item-author {
    font-weight: 600;
    color: var(--text-primary);
}

.community-item-separator {
    color: var(--text-muted);
    font-weight: 300;
}

.community-item-date {
    color: var(--text-muted);
}

/* Footer de la carte (Lieu + Vues EN BAS) */
.community-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.community-item-footer .community-item-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.community-item-footer .community-item-location .material-icons {
    font-size: 1.1rem;
    color: var(--primary-light);
}

.community-item-footer .community-item-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.community-item-footer .community-item-views .material-icons {
    font-size: 1.1rem;
}

/* Masquer l'ancienne section meta si elle existe encore */
.community-item-meta {
    display: none !important;
}

/* ============================================
   2. CORRECTIONS VISIBILITÉ MODE SOMBRE
   ============================================ */

/* Bouton Voir plus - style jaune/orange */
.see-more-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transition: all 0.2s ease;
}

.see-more-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Bouton Commenter - style jaune/orange */
.comments-toggle-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transition: all 0.2s ease;
}

.comments-toggle-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.comments-toggle-btn .material-icons {
    font-size: 1.1rem;
}

/* Section SEO - textes et liens plus visibles */
.seo-section {
    color: rgba(255, 255, 255, 0.85);
}

.seo-section p {
    color: rgba(255, 255, 255, 0.8);
}

.seo-section a {
    color: #a5b4fc !important;
    text-decoration: underline;
}

.seo-section a:hover {
    color: #c7d2fe !important;
}

.seo-section strong {
    color: #a5b4fc !important;
}

/* Mode clair - corrections */
[data-theme="light"] .comments-toggle-btn {
    background: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #6366f1 !important;
}

[data-theme="light"] .comments-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .see-more-btn {
    background: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #6366f1 !important;
}

[data-theme="light"] .see-more-btn:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .seo-section {
    color: #334155;
}

[data-theme="light"] .seo-section p {
    color: #475569;
}

[data-theme="light"] .seo-section a {
    color: #6366f1 !important;
}

[data-theme="light"] .seo-section strong {
    color: #6366f1 !important;
}

/* ============================================
   3. SÉLECTEUR TAILLE DE TEXTE
   ============================================ */

/* Container du sélecteur */
.font-size-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.font-size-selector-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

/* Boutons de taille */
.font-size-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-size-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-light);
}

.font-size-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
    color: white;
}

/* Appliquer la taille moyenne (plus subtile) */
[data-font-size="medium"] {
    font-size: 105%;
}

[data-font-size="medium"] .news-item-title,
[data-font-size="medium"] .community-item-title,
[data-font-size="medium"] .cinema-film-title {
    font-size: 1.08rem;
}

[data-font-size="medium"] .news-item-excerpt,
[data-font-size="medium"] .community-item-desc {
    font-size: 1rem;
}

[data-font-size="medium"] .seo-section p {
    font-size: 1rem;
}

/* Mode clair - sélecteur */
[data-theme="light"] .font-size-selector {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .font-size-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

[data-theme="light"] .font-size-btn:hover {
    background: #e2e8f0;
    border-color: #6366f1;
}

[data-theme="light"] .font-size-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    border-color: #6366f1;
    color: white;
}

/* ============================================
   AGENDA LOCAL
   ============================================ */

.agenda-section {
    padding: 1rem;
    border-radius: 16px;
}

.agenda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.agenda-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.agenda-title .material-icons {
    color: var(--primary-light);
}

.agenda-link {    
    display: flex;
    gap: 0.25rem;
    padding: 0.2rem 0.7rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
}

.agenda-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.agenda-link .material-icons {
    font-size: 1rem;
}

.agenda-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agenda-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-muted);
}

/* Carte événement */
.agenda-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.agenda-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Date à gauche */
.agenda-item-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    color: white;
    text-align: center;
}

.agenda-item-day {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.agenda-item-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Contenu à droite */
.agenda-item-content {
    flex: 1;
    min-width: 0;
}

.agenda-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agenda-item-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.agenda-item-info span {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.agenda-item-info .material-icons {
    font-size: 0.9rem;
}

/* Badge catégorie */
.agenda-item-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--primary-light);
    margin-top: 0.35rem;
}

/* Empty state */
.agenda-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.agenda-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.agenda-empty-text {
    font-size: 0.9rem;
}

/* Catégories */
.agenda-item-category.sport { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.agenda-item-category.culture { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.agenda-item-category.marche { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.agenda-item-category.brocante { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.agenda-item-category.concert { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.agenda-item-category.fete { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Mode lecture - masquer agenda */
[data-reading-mode="true"] .agenda-section {
    display: none !important;
}

/* Mode clair */
[data-theme="light"] .agenda-item {
    background: white;
}

[data-theme="light"] .agenda-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Agenda items cliquables */
a.agenda-item {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.agenda-item:hover {
    border-color: var(--primary);
}