/* Variables CSS */
:root {
    --primary-color: #2d7a3e;
    --primary-dark: #1e5329;
    --primary-light: #4a9d5a;
    --accent-color: #8bc34a;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(45,122,62,0.2);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--primary-dark);
}

/* Bannière */
.site-banner {
    width: 100%;
    background-color: var(--primary-dark);
    overflow: hidden;
}

.site-banner img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Header (Barre de navigation) */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.main-nav {
    width: 100%;
}

/* Alignement horizontal de la liste principale */
.main-nav ul.nav-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    list-style: none !important;
    gap: 2.5rem !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.main-nav a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap;
}

/* Effet ligne verte au survol (sauf sur l'admin) */
.main-nav ul.nav-list > li:not(.menu-item-admin) a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.main-nav ul.nav-list > li:not(.menu-item-admin) a:hover:after {
    width: 100%;
}

/* Sous-menus */
.main-nav .has-submenu {
    position: relative;
}

.main-nav .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-dark);
    min-width: 200px;
    padding: 0.5rem 0;
    border-radius: 0 0 5px 5px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.main-nav .has-submenu:hover .submenu {
    display: block;
}

.main-nav .submenu li {
    margin: 0;
    width: 100%;
}

.main-nav .submenu a {
    display: block;
    padding: 0.7rem 1.5rem;
    font-weight: 400;
}

.main-nav .submenu a:hover {
    background: rgba(255,255,255,0.1);
}

.main-nav .submenu a:after {
    display: none !important;
}

/* =========================================================================
   STYLE DU BOUTON ADMIN EXPULSÉ À DROITE
   ========================================================================= */
.main-nav ul.nav-list li.menu-item-admin {
    margin-left: auto !important; /* Pousse l'administration tout à droite */
}

.main-nav ul.nav-list li.menu-item-admin a {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 5px !important;
    font-weight: 500 !important;
    transition: background 0.3s !important;
    display: inline-block !important;
}

.main-nav ul.nav-list li.menu-item-admin a:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: var(--white) !important;
}

.main-nav ul.nav-list li.menu-item-admin a:after {
    display: none !important;
}

/* Menu Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* Contenu principal */
.content {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.content h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

/* Articles */
.article-card {
    background: var(--white);
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.article-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.article-content h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.article-excerpt {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.btn-read-more, .btn-cta, .btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn-read-more:hover, .btn-cta:hover, .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: var(--white);
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sponsors, .info-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.sponsors h3, .info-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.sponsor-item {
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s;
}

.sponsor-item:hover {
    transform: scale(1.05);
}

.sponsor-item img {
    max-height: 80px;
    margin: 0 auto;
}

.info-box p {
    margin-bottom: 1rem;
}

.info-box .btn-cta {
    width: 100%;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn-pagination {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    font-weight: 500;
}

.page-info {
    color: var(--text-light);
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: var(--white);
    margin-top: 4rem;
    padding: 2rem 0 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    opacity: 0.8;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Page unique */
.single-article {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.single-article h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.single-article .article-meta {
    margin-bottom: 2rem;
}

.single-article .article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin: 2rem 0;
}

.single-article .article-body {
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Styles pour le contenu HTML des articles */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul, .article-body ol {
    margin: 1rem 0 1rem 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    color: var(--primary-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--primary-color);
    font-weight: 500;
}

.back-link:before {
    content: '← ';
}

/* Page de contact */
.contact-info {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* Pages statiques */
.page-content {
    line-height: 1.8;
}

.page-content h2 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.page-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 968px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }
    
    .main-nav.active {
        max-height: 500px;
    }
    
    .main-nav ul.nav-list {
        flex-direction: column !important;
        gap: 0 !important;
        padding-top: 1rem !important;
    }
    
    .main-nav li {
        border-top: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
    
    .main-nav a {
        display: block;
        padding: 1rem 0;
    }
    
    .content, .sponsors