/* ===== RESET ET BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 15px;
}

/* ===== HEADER ET NAVIGATION ===== */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c5530;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-logo {
    height: 70px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin: 0 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link i {
    margin-right: 0.5rem;
}

.nav-link:hover {
    background: #2c5530;
    color: white;
    transform: translateY(-2px);
}

/* ===== DROPDOWN MENU ===== */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e9ecef;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-link:hover {
    background: #f8f9fa;
    color: #2c5530;
    transform: translateX(5px);
}

.dropdown-link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.admin-link {
    background: #dc3545;
    color: white !important;
}

.admin-link:hover {
    background: #c82333;
}

.logout-link {
    background: #6c757d;
    color: white !important;
}

.logout-link:hover {
    background: #5a6268;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 80vh;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(135, 206, 235, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: heroAnimation 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes heroAnimation {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title i {
    margin-right: 1rem;
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: #2c5530;
    color: white;
}

.btn-primary:hover {
    background: #1e3a21;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 85, 48, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2c5530;
}

.btn-outline {
    background: transparent;
    color: #2c5530;
    border: 2px solid #2c5530;
}

.btn-outline:hover {
    background: #2c5530;
    color: white;
}

.btn-admin {
    background: #dc3545;
    color: white;
}

.btn-admin:hover {
    background: #c82333;
}

/* ===== SECTIONS ===== */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.section-header h2 i {
    margin-right: 1rem;
    color: #4a7c59;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* ===== VILLAGE INTRO ===== */
.village-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.village-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.village-intro .container {
    position: relative;
    z-index: 2;
}

.intro-content h2 {
    font-size: 2.2rem;
    color: #2c5530;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.intro-content h2 i {
    margin-right: 1rem;
    color: #4a7c59;
    animation: leafSway 3s ease-in-out infinite;
}

@keyframes leafSway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

.intro-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555;
    text-align: justify;
}

.intro-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #2c5530, #4a7c59);
}

.intro-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    z-index: 2;
    opacity: 0;
}

.intro-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.intro-image:hover img {
    transform: scale(1.05);
}

.intro-image:hover::before {
    transform: translate(-50%, -50%) scale(1.1);
    transition: transform 0.3s ease;
}

/* ===== ALBUMS GRID ===== */
.recent-albums {
    background: #f8f9fa;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.album-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.album-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.album-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-card:hover .album-image img {
    transform: scale(1.1);
}

.album-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-card:hover .album-overlay {
    opacity: 1;
}

.album-info {
    color: white;
}

.photo-count {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.photo-count i {
    margin-right: 0.5rem;
}

.album-content {
    padding: 1.5rem;
}

.album-title {
    margin-bottom: 0.5rem;
}

.album-title a {
    text-decoration: none;
    color: #2c5530;
    font-size: 1.3rem;
    font-weight: 600;
}

.album-title a:hover {
    color: #4a7c59;
}

.album-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.album-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.album-date {
    color: #888;
    font-size: 0.9rem;
}

.album-date i {
    margin-right: 0.3rem;
}

.album-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* ===== NEWS SECTION ===== */
.news-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(44, 85, 48, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(74, 124, 89, 0.03) 0%, transparent 50%);
    z-index: 1;
}

.news-section .container {
    position: relative;
    z-index: 2;
}

.news-list {
    margin-bottom: 2rem;
}

.news-item {
    display: flex;
    padding: 2rem;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.news-item:hover {
    background: rgba(248, 249, 250, 0.9);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.news-date {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    text-align: center;
    margin-right: 2rem;
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    border-radius: 15px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(44, 85, 48, 0.3);
    position: relative;
    overflow: hidden;
}

.news-date::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.news-date .day {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.news-date .month {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.news-content h3 {
    color: #2c5530;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.news-item:hover .news-content h3 {
    color: #4a7c59;
}

.news-content p {
    color: #666;
    margin-bottom: 1.2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.read-more {
    color: #4a7c59;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: #2c5530;
    transform: translateX(5px);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* ===== SIDEBAR ===== */
.sidebar {
    padding-left: 2rem;
}

.widget {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.widget h3 {
    color: #2c5530;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.widget h3 i {
    margin-right: 0.5rem;
    color: #4a7c59;
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list i {
    margin-right: 0.5rem;
    color: #4a7c59;
    width: 20px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.event-date {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #2c5530;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 1rem;
}

.event-info h4 {
    color: #2c5530;
    margin-bottom: 0.2rem;
}

.event-info p {
    color: #666;
    font-size: 0.9rem;
}

/* ===== ADMIN ACTIONS ===== */
.admin-actions {
    background: #dc3545;
    color: white;
}

.admin-panel {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.admin-panel h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.admin-panel h3 i {
    margin-right: 0.5rem;
}

.admin-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.main-footer {
    background: #2c5530;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section h3 i {
    margin-right: 0.5rem;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info i {
    margin-right: 0.5rem;
    color: #ffd700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: #ffd700;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #ffd700;
    color: #2c5530;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .col-md-4,
    .col-md-6,
    .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .albums-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding-left: 0;
        margin-top: 2rem;
    }

    .admin-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .album-content {
        padding: 1rem;
    }

    .news-item {
        flex-direction: column;
        text-align: center;
    }

    .news-date {
        margin-right: 0;
        margin-bottom: 1rem;
        align-self: center;
    }
}
