/**
 * Thème Mercier 2026 - Campagne Municipale Bourges
 * Couleurs principales :
 * - Bleu foncé (#1a3a5f) : couleur principale
 * - Blanc (#ffffff) : fond
 * - Violet/Pourpre (#6b3fa0) : accent
 * - Orange (#ff6b35), Jaune (#ffc107), Rouge (#dc3545), Vert (#28a745), Bleu (#007bff) : points colorés
 */

/* === Variables CSS === */
:root {
    --color-primary: #1a3a5f;
    --color-primary-light: #2a4a6f;
    --color-primary-dark: #0f2a4f;
    --color-accent: #6b3fa0;
    --color-accent-light: #8b5fc0;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    --color-orange: #ff6b35;
    --color-yellow: #ffc107;
    --color-red: #dc3545;
    --color-green: #28a745;
    --color-blue: #007bff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition: all 0.3s ease;
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
}

#container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header === */
#header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#header_content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* Logo et navigation sur la même ligne sur desktop */
@media (min-width: 769px) {
    #header_content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    
    #header-top {
        margin-bottom: 0;
        flex: 0 0 auto;
    }
    
    #navigation {
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    #navigation ul {
        margin: 0;
    }
}

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

#logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#logo-link {
    display: block;
    text-decoration: none;
}

#logo {
    height: 60px;
    width: auto;
    display: block;
    object-fit: contain;
}

#logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

#logo-text h1 a {
    color: var(--color-white);
    text-decoration: none;
    transition: var(--transition);
}

#logo-text h1 a:hover {
    color: var(--color-accent-light);
}

#slogan {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0.15rem 0;
    font-weight: 300;
    font-style: italic;
}

#campaign-year {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

#campaign-year span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.color-dots {
    display: flex;
    gap: 3px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-orange { background-color: var(--color-orange); }
.dot-yellow { background-color: var(--color-yellow); }
.dot-red { background-color: var(--color-red); }
.dot-green { background-color: var(--color-green); }
.dot-blue { background-color: var(--color-blue); }

/* === Mobile Menu Button === */
#mobile_menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

#mobile_menu span {
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    border-radius: 2px;
    transition: var(--transition);
}

#mobile_menu:hover span {
    background-color: var(--color-accent-light);
}

/* === Navigation === */
#navigation ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#navigation li {
    margin: 0;
}

#navigation a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: block;
    transition: var(--transition);
    border-radius: 4px;
}

#navigation a:hover,
#navigation a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-accent-light);
}

#navigation a.active {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* === Alert Messages === */
#alert-msg {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 2rem;
}

.msg {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.msg.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--color-green);
}

.msg.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--color-red);
}

.msg.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--color-blue);
}

.msg.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--color-yellow);
}

.msg-button-close {
    cursor: pointer;
    margin-left: 1rem;
    color: inherit;
    opacity: 0.7;
    transition: var(--transition);
}

.msg-button-close:hover {
    opacity: 1;
}

/* === Main Content === */
#body {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

#pageTitle {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-primary);
}

#pageTitle h1 {
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: 700;
}

#body-page {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

#content {
    min-width: 0;
}

#content h1, #content h2, #content h3 {
    color: var(--color-primary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

#content h1 { font-size: 2rem; }
#content h2 { font-size: 1.75rem; }
#content h3 { font-size: 1.5rem; }

#content p {
    margin-bottom: 1rem;
    text-align: justify;
}

#content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

#content a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

#content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

#content ul, #content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

#content li {
    margin-bottom: 0.5rem;
}

/* === Sidebar === */
#modulesSidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebarModule {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebarModuleTitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
}

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

.sidebarModuleContent a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

.sidebarModuleContent a:hover {
    color: var(--color-accent);
}

/* === Footer === */
#footer {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    margin-top: 3rem;
    padding: 2rem 0;
}

#footer_content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

#footer-brand {
    display: flex;
    align-items: center;
}

#footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#footer-logo-img {
    width: 50px;
    height: auto;
    object-fit: contain;
}

#footer-slogan {
    font-size: 1rem;
    font-weight: 300;
    font-style: italic;
    margin: 0.25rem 0;
    color: rgba(255, 255, 255, 0.9);
}

#footer-year {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

#footer-links {
    text-align: right;
}

#footer-links p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.5rem 0;
}

#footer-links a {
    color: var(--color-white);
    text-decoration: none;
    transition: var(--transition);
}

#footer-links a:hover {
    color: var(--color-accent-light);
}

/* === Buttons === */
.button,
button[type="submit"],
input[type="submit"] {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button.success {
    background-color: var(--color-green);
}

.button.error {
    background-color: var(--color-red);
}

/* === Forms === */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-primary);
}

/* === Responsive Design === */
@media (max-width: 968px) {
    #body-page {
        grid-template-columns: 1fr;
    }
    
    #modulesSidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    #header_content {
        padding: 1rem;
    }
    
    #header-top {
        flex-wrap: wrap;
    }
    
    #mobile_menu {
        display: flex;
    }
    
    #navigation {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }
    
    #navigation.active {
        display: block;
    }
    
    #navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    #navigation a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #body {
        padding: 1rem;
    }
    
    #footer_content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    #footer-links {
        text-align: center;
    }
    
    #logo {
        width: 30px;
        height: 30px;
    }
    
    #logo-text h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    #logo-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #logo-text h1 {
        font-size: 1rem;
    }
    
    #slogan {
        font-size: 0.8rem;
    }
}

