:root {
    --primary: #2c3e50;
    --secondary: #8e44ad;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Merriweather', serif;
    line-height: 1.8;
    color: var(--dark);
    background-color: #f9f9f9;
}

header {
    background: var(--primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

nav {
    background: var(--secondary);
    padding: 1rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav li {
    margin: 0 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.banner {
    text-align: center;
    margin-bottom: 3rem;
}

.banner h1 {
    font-size: 3rem;
    color: var(--primary);
}

.banner p {
    font-size: 1.2rem;
    color: var(--secondary);
}

.today-readings {
    margin-bottom: 3rem;
}

.today-readings h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.reading {
    background: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.reading h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.reference {
    font-style: italic;
    color: var(--accent);
    margin-bottom: 1rem;
}

.newsletter {
    background: var(--light);
    padding: 2rem;
    border-radius: 5px;
    text-align: center;
}

.newsletter h2 {
    margin-bottom: 1rem;
}
.newsletter input[type="email"] {
    padding: 0.8rem;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.newsletter button {
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter button:hover {
    background: #c0392b;
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--dark);
    color: white;
    margin-top: 2rem;
}
/* Header */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.logo-img {
    height: 80px;
    width: auto;
}

.logo-text h1 {
    margin: 0;
    font-size: 2rem;
    color: white;
}
.logo-text p {
    margin: 0;
    font-style: italic;
    color: var(--light);
}

/* Menu */
.menu-toggle {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 15px;
    padding: 10px 0;
}
nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.2);
}

.admin-link {
    background: var(--accent);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 30px 0 15px;
    text-align: center;
}
.footer-content {
    display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: var(--accent);
    margin-bottom: 15px;
}

.social-icons {
    font-size: 1.5rem;
    margin: 15px 0;
}
.social-icons a {
    color: white;
    margin: 0 10px;
}

.copyright {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Styles pour les lectures */
.lectures-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.date-navigation {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-navigation input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.no-readings {
    text-align: center;
    font-style: italic;
    color: #666;
    margin: 40px 0;
}

/* Styles admin */
.admin-container {
    display: flex;
    min-height: calc(100vh - 120px);
}

.sidebar {
    width: 250px;
    background: var(--dark);
    padding: 20px;
}

.admin-content {
    flex: 1;
    padding: 20px;
}

.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
/* Pages secondaires */
.page-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}



/* Page contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 30px;
}
.contact-info {
    background: white;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-info h2 {
    color: var(--secondary);
    margin: 20px 0 10px;
    font-size: 1.1rem;
}

.contact-info h2:first-child {
    margin-top: 0;
}

.contact-form {
    background: white;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
}

/* Page Communiquer */
.communications-container {
    margin-top: 30px;
}

.communication {
    background: white;
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.communication.messe {
    border-left-color: var(--accent);
}
.communication.evenement {
    border-left-color: #8e44ad;
}

.communication.urgence {
    border-left-color: #e74c3c;
}

.communication-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.category-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--primary);
    color: white;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-bottom: 5px;
}
.communication.messe .category-badge {
    background: var(--accent);
}

.communication.evenement .category-badge {
    background: #8e44ad;
}

.communication.urgence .category-badge {
    background: #e74c3c;
}

.communication h2 {
    margin: 5px 0;
    color: var(--dark);
}
.communication time {
    color: #666;
    font-size: 0.9rem;
}

.communication-content {
    line-height: 1.6;
}

.messe-times {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    color: var(--accent);
    font-weight: bold;
}

/* Admin Communications */
.add-communication {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}
.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.communications-list {
    margin-top: 30px;
}

.communication.published {
    opacity: 1;
}

.communication.unpublished {
    opacity: 0.6;
}
.btn-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}



/* Historique */
.history-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.history-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.history-header h1 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.timeline-bar {
    height: 4px;
    background: linear-gradient(to right, var(--gold), var(--secondary));
    width: 80%;
    margin: 30px auto 0;
    position: relative;
}

.history-timeline {
    position: relative;
    margin: 60px 0;
}

.timeline-entry {
    display: flex;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.timeline-entry.animate {
    opacity: 1;
    transform: translateY(0);
}

.timeline-year {
    flex: 0 0 120px;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold);
    position: relative;
}

.timeline-year:after {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: var(--gold);
    border-radius: 50%;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
    margin-left: 30px;
}

.timeline-content:before {
    content: '';
    position: absolute;
    top: 30px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: white;
    transform: rotate(45deg);
}

.history-image {
    margin-bottom: 20px;
}

.history-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.history-text {
    line-height: 1.8;
    color: #444;
}



/* Galerie */
.gallery-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--light);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 280px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 80%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.lightbox-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 30px;
    color: white;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--gold);
}

.lightbox-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav button:hover {
    background: var(--gold);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}



/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablets and Small Laptops (768px - 1024px) */
@media (max-width: 1024px) {
    .page-container,
    .gallery-container,
    .history-container {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-img {
        height: 60px;
    }
    
    .banner h1 {
        font-size: 2.2rem;
    }
    
    .banner p {
        font-size: 1.1rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 5px;
    }
    
    nav li {
        margin: 5px 0;
    }
    
    main {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .newsletter input[type="email"] {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .timeline-entry {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-year:after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .timeline-content {
        margin-left: 0;
        margin-top: 20px;
    }
    
    .timeline-content:before {
        top: -15px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    header {
        padding: 1rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .banner h1 {
        font-size: 1.8rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    .reading {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .date-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-nav button {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .lightbox-image {
        max-width: 95%;
    }
    
    .lightbox-nav button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .close-btn {
        top: 15px;
        right: 15px;
        font-size: 30px;
    }
}

/* Very Small Devices (320px and below) */
@media (max-width: 320px) {
    body {
        font-size: 14px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .banner h1 {
        font-size: 1.5rem;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .newsletter {
        padding: 1rem;
    }
    
    .newsletter button {
        width: 100%;
        margin-top: 10px;
    }
}

/* Orientation-specific styles */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 1rem 0;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .banner {
        margin-bottom: 1rem;
    }
    
    .reading {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
}

/* High-resolution displays */
@media (min-resolution: 192dpi) {
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    nav,
    .newsletter,
    .social-icons,
    .menu-toggle {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .reading {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}