:root {
    --primary: #2c5e3f; 
    --primary-light: #3a7a53;
    --secondary: #e67e22; 
    --dark: #2d3436;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #636e72;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--light);
    padding-top: 120px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
}

.logo span {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links > li > a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links > li > a:hover {
    color: var(--primary);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--dark);
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 25px;
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1506260408121-e353d10b87c7?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(44, 94, 63, 0.7), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
    animation: slideUp 1s ease;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 1px 2px 5px rgba(0,0,0,0.3);
    animation: slideUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
    margin-right: 15px;
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(44, 94, 63, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark);
    transform: translateY(-3px);
}

.hero-buttons {
    animation: slideUp 1s ease 0.4s;
    animation-fill-mode: both;
}

/* Sections */
.section {
    padding: 5rem 5%;
}

.section.bg-light {
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

/* Cards (Actualités) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 15px;
    /* overflow: hidden removed to preserve box shadows */
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: var(--transition);
}

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

.card-content {
    padding: 2rem;
    position: relative;
    background: var(--white);
}

.tag {
    background: var(--primary-light);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.tag.alert {
    background: #e74c3c;
}

.card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.card p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary);
    gap: 10px;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--light);
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-info h4, .footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-info p {
    color: var(--gray);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--gray);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
    .mobile-menu { display: block; }
    .nav-links { display: none; }
    .hero-content h2 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-buttons { display: flex; flex-direction: column; gap: 15px; }
    .btn-primary { margin-right: 0; }
}

/* Editorial Layout for Village and similar pages */
.editorial-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.editorial-section {
    padding: 2.5rem 0;
}

.editorial-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.editorial-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.editorial-lead {
    font-size: 1.25rem;
    font-style: italic;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.editorial-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.2rem;
}

.editorial-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.editorial-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.editorial-list li::before {
    content: '✿';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.editorial-list.minimal li::before {
    content: '•';
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1;
    top: 2px;
}

.editorial-highlight {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
    font-size: 1.1rem;
    font-style: italic;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.editorial-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
    margin: 1rem 0;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.highlight-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a5298 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.highlight-box .editorial-title {
    color: white;
}

.highlight-box .editorial-title::after {
    background: white;
}

.highlight-box p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .editorial-container {
        padding: 1.5rem;
    }
    
    .highlight-box {
        padding: 2rem;
    }
}

.editorial-image-container {
    margin: 2rem 0;
    text-align: center;
}
.editorial-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.editorial-image.float-right {
    float: right;
    max-width: 40%;
    margin: 0 0 1rem 2rem;
}
.editorial-image.float-left {
    float: left;
    max-width: 40%;
    margin: 0 2rem 1rem 0;
}
@media (max-width: 768px) {
    .editorial-image.float-right, .editorial-image.float-left {
        float: none;
        max-width: 100%;
        margin: 1rem 0;
    }
}


/* --- NESTED DROPDOWN SUPPORT --- */
.dropdown-menu .dropdown {
    position: relative;
}
.dropdown-menu .dropdown-menu {
    display: none !important;
    position: absolute;
    top: 0;
    left: 100%; 
    min-width: 150px;
}
.dropdown-menu .dropdown:hover > .dropdown-menu {
    display: block !important;
}
.dropdown-menu .dropdown > a::after {
    content: " \25B6"; /* Right arrow */
    float: right;
    font-size: 0.8em;
    margin-top: 3px;
    margin-right: 5px;
    opacity: 0.6;
}
/* -------------------------------- */

/* Info Grid Styles (Global) */
.info-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 40px !important;
    align-items: start !important;
    width: 100% !important;
}
@media (max-width: 1200px) {
    .info-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 900px) {
    .info-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    .info-grid { grid-template-columns: 1fr !important; }
}

/* Hide table borders for layout in village page */
.page-container table, .page-container th, .page-container td { border: none !important; }

/* TinyMCE Table Borders */
table.table-bordered {
    border-collapse: collapse;
}
table.table-bordered td, table.table-bordered th {
    border: 1px solid #333 !important;
    padding: 8px;
}

/* TinyMCE Table Layout Fixes */
.page-main-content table, .page-text-block table, .page-container table {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100%;
    width: max-content !important; 
    min-width: 60%;
}

/* Restore list padding stripped by global reset */
.page-main-content ul, .page-text-block ul, .page-container ul {
    padding-left: 25px;
}
.page-main-content ol, .page-text-block ol, .page-container ol {
    padding-left: 25px;
}

/* --- MOBILE RESPONSIVENESS FIXES --- */
img {
    max-width: 100% !important;
    height: auto !important;
}

.page-container img, .page-main-content img, .page-text-block img, .page-blocks img {
    max-width: 100% !important;
    height: auto !important;
}

.page-main-content table, .page-text-block table, .page-container table {
    width: 100% !important;
    max-width: 100vw !important;
    display: block;
    overflow-x: auto;
}

.page-main-content, .page-text-block, .page-container {
    max-width: 100vw;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}

.container {
    max-width: 100%;
    /* overflow: hidden removed to preserve box shadows */
}

@media (max-width: 768px) {
    .container {
        padding: 15px !important;
    }
}
